/// <summary> /// Shows a message dialogue, with only End as option. /// </summary> /// <param name="Text">The message the speaker says.</param> /// <param name="CloseDialogue">Set to true, will close the dialogue with this companion. Setting to false, returns to the default dialogue and options of the companion.</param> /// <param name="Speaker">The companion who speakes this. Leaving as null picks the last speaker.</param> public static void ShowEndDialogueMessage(string Text, bool CloseDialogue = true, TerraGuardian Speaker = null, string CloseOptionText = "End") { if (Speaker == null) { Speaker = LastSpeaker; } Main.player[Main.myPlayer].GetModPlayer <PlayerMod>().IsTalkingToAGuardian = true; Main.player[Main.myPlayer].GetModPlayer <PlayerMod>().TalkingGuardianPosition = Speaker.WhoAmID; PlayerFaceGuardian(Speaker); ProceedButtonPressed = false; GuardianMouseOverAndDialogueInterface.SetDialogue(Text, Speaker); GuardianMouseOverAndDialogueInterface.Options.Clear(); if (CloseDialogue) { GuardianMouseOverAndDialogueInterface.AddOption(CloseOptionText, EndDialogueButtonAction); } else { //GuardianMouseOverAndDialogueInterface.AddOption("Return", delegate(TerraGuardian tg) //{ GuardianMouseOverAndDialogueInterface.Options.Clear(); GuardianMouseOverAndDialogueInterface.GetDefaultOptions(); ProceedButtonPressed = true; //}); } if (Thread.CurrentThread == DialogueThread) { while (!ProceedButtonPressed) { Thread.Sleep(100); } ProceedButtonPressed = false; DialogueThread.Interrupt(); } }
public static void BlueWhenListeningToHerRequest() { ZacksOutfitQuestData data = (ZacksOutfitQuestData)Data; const int BlueSlot = 0, ZacksSlot = 1; bool ZacksInTheTeam = PlayerMod.HasGuardianSummoned(Main.player[Main.myPlayer], GuardianBase.Zacks); if (ZacksInTheTeam) { Dialogue.AddParticipant(PlayerMod.GetPlayerSummonedGuardian(Main.player[Main.myPlayer], GuardianBase.Zacks)); } Dialogue.SetImportantDialogue(); Dialogue.GatherAroundGuardian(Dialogue.GetParticipant(BlueSlot)); Dialogue.ShowDialogueWithContinue("*I'm glad for Zacks back into my life, but I think we should do something about his wounds.*"); //After this point, Dialogue.GetParticipant breaks. if (ZacksInTheTeam) { Dialogue.ShowDialogueWithContinue("*I'm fine, those wounds doesn't hurt or anything.*", Dialogue.GetParticipant(ZacksSlot)); Dialogue.ShowDialogueWithContinue("*It may not be hurting, but isn't the greatest thing to look at, even more at that hole in your chest.*", Dialogue.GetParticipant(BlueSlot)); Dialogue.ShowDialogueWithContinue("*Oh, yeah... This is really a nasty thing to look at.*", Dialogue.GetParticipant(ZacksSlot)); Dialogue.ShowDialogueWithContinue("*We need to patch up the wounds on your arms and feet, and wash the blood in your paws... Is that even your blood?*", Dialogue.GetParticipant(BlueSlot)); Dialogue.ShowDialogueWithContinue("*I... Don't think... It is?*", Dialogue.GetParticipant(ZacksSlot)); Dialogue.ShowDialogueWithContinue("*We definitelly have to wash that off.*", Dialogue.GetParticipant(BlueSlot)); } Dialogue.ShowDialogueWithContinue("*We need something to patch up his wounds, and I think the Nurse may help us with that.*", Dialogue.GetParticipant(BlueSlot)); Dialogue.ShowDialogueWithContinue("*Then we will need to visit the Clothier, and see if we can find something to cover the hole on his chest.*"); if (Dialogue.ShowDialogueWithOptions("*Can you help me with this?*", new string[] { "Yes", "No" }) == 1) { if (ZacksInTheTeam) { Dialogue.ShowDialogueWithContinue("*I guess [nickname] isn't feeling like helping you with that right now.*", Dialogue.GetParticipant(ZacksSlot)); Dialogue.ShowEndDialogueMessage("*It's fine. I still want to do this some time, so if you feel like helping me, just speak to me about that.*", false, Dialogue.GetParticipant(BlueSlot)); } else { Dialogue.ShowEndDialogueMessage("*Oh... I'll leave this open for when you decide to help me with this.*", false); } return; } Dialogue.ShowDialogueWithContinue("*Thank you, [nickname].*", Dialogue.GetParticipant(BlueSlot)); if (ZacksInTheTeam) { Dialogue.ShowDialogueWithContinue("*That actually sounds like a good plan, I like it.*", Dialogue.GetParticipant(ZacksSlot)); Dialogue.ChangeSpeaker(BlueSlot); data.QuestStep = 3; } else { data.QuestStep = 2; } QuestStartedNotification(data); Dialogue.ShowDialogueWithContinue("*For this to work, we need to go see those people ourselves.*", Dialogue.GetParticipant(BlueSlot)); if (!PlayerMod.PlayerHasGuardianSummoned(Main.player[Main.myPlayer], GuardianBase.Blue)) { Dialogue.ShowDialogueOnly("*And by \"we\", that means I need to come too.*"); GuardianMouseOverAndDialogueInterface.GetDefaultOptions(); } else { Dialogue.ShowEndDialogueMessage("*So, shall we go?*", true); } }
public void GetRandomTip() { Dialogue.ShowDialogueOnly(GuardianSpawnTip.GetRandomTip()); GuardianMouseOverAndDialogueInterface.GetDefaultOptions(); }