Exemplo n.º 1
0
        private void OnSessionLaunched(CampaignGameStarter game)
        {
            game.BlockSentences(
                () => !TelepathyBehaviour.MeetingInProgress,
                "main_option_discussions_1"                 // joining army
                );
            game.BlockSentences(
                () => !TelepathyBehaviour.MeetingInProgress || !TelepathySettings.Instance.HideQuestDialogLines,
                "hero_give_issue",                 // taking a quest
                "hero_task_given",                 // discuss a quest
                "caravan_create_conversation_1"    // form a caravan
                );

            game.AddPlayerLine(
                "lord_talk_ask_something_2",
                "lord_talk_ask_something_2",
                "telepathy_tell_location",
                new TextObject("{=Telepathy_Where_Are_You}Where are you?", null).ToString(),
                new ConversationSentence.OnConditionDelegate(() => meetingEncounter != null),
                null, 101, null, null);
            game.AddDialogLine(
                "telepathy_tell_location",
                "telepathy_tell_location",
                "lord_talk_ask_something_again",
                "{LORD_LOCATION_ANSWER}",
                new ConversationSentence.OnConditionDelegate(() => {
                HeroHelper.SetLastSeenLocation(meetingHero, true);
                var answer = meetingHero.LastSeenInSettlement
                                                ? new TextObject("{=Telepathy_Im_In}I'm in {Settlement}.", null)
                                                : new TextObject("{=Telepathy_Im_Near}I'm near {Settlement}.", null);
                answer.SetTextVariable("Settlement", meetingHero.LastSeenPlace.EncyclopediaLinkWithName);
                MBTextManager.SetTextVariable("LORD_LOCATION_ANSWER", answer, false);
                return(true);
            }),
                null, 100, null);
            game.AddPlayerLine(
                "lord_talk_ask_something_2",
                "lord_talk_ask_something_2",
                "telepathy_tell_objective",
                new TextObject("{=Telepathy_What_Are_You_Doing}What are you doing?", null).ToString(),
                new ConversationSentence.OnConditionDelegate(() => meetingEncounter != null),
                null, 101, null, null);
            game.AddDialogLine(
                "telepathy_tell_objective",
                "telepathy_tell_objective",
                "lord_talk_ask_something_again",
                "{LORD_OBJECTIVE_ANSWER}",
                new ConversationSentence.OnConditionDelegate(() => {
                string answer = meetingHero.PartyBelongedTo == null
                                                ? new TextObject("{=Telepathy_Nothing}Nothing actually.", null).ToString()
                                                : CampaignUIHelper.GetMobilePartyBehaviorText(meetingHero.PartyBelongedTo);
                MBTextManager.SetTextVariable("LORD_OBJECTIVE_ANSWER", answer, false);
                return(true);
            }),
                null, 100, null);
        }
Exemplo n.º 2
0
        public bool CheckUnknownBehavior(MobileParty patrol)
        {
            TextObject textObject = new TextObject("{=QXBf26Rv}Unknown Behavior", null);

            if (CampaignUIHelper.GetMobilePartyBehaviorText(patrol) == textObject.ToString())
            {
                return(true);
            }
            return(false);
        }