Example #1
0
        public static QuestPart_JoinPlayer JoinPlayer(this Quest quest, MapParent mapParent, IEnumerable <Pawn> pawns, bool joinPlayer = false, bool makePrisoners = false, string inSignal = null)
        {
            QuestPart_JoinPlayer questPart_JoinPlayer = new QuestPart_JoinPlayer();

            questPart_JoinPlayer.inSignal      = QuestGenUtility.HardcodedSignalWithQuestID(inSignal) ?? QuestGen.slate.Get <string>("inSignal");
            questPart_JoinPlayer.joinPlayer    = joinPlayer;
            questPart_JoinPlayer.makePrisoners = makePrisoners;
            questPart_JoinPlayer.mapParent     = mapParent;
            questPart_JoinPlayer.pawns.AddRange(pawns);
            quest.AddPart(questPart_JoinPlayer);
            return(questPart_JoinPlayer);
        }
Example #2
0
        protected override void RunInt()
        {
            Slate slate = QuestGen.slate;

            if (pawns.GetValue(slate) != null)
            {
                QuestPart_JoinPlayer questPart_JoinPlayer = new QuestPart_JoinPlayer();
                questPart_JoinPlayer.inSignal      = (QuestGenUtility.HardcodedSignalWithQuestID(inSignal.GetValue(slate)) ?? QuestGen.slate.Get <string>("inSignal"));
                questPart_JoinPlayer.joinPlayer    = joinPlayer.GetValue(slate);
                questPart_JoinPlayer.makePrisoners = makePrisoners.GetValue(slate);
                questPart_JoinPlayer.mapParent     = QuestGen.slate.Get <Map>("map").Parent;
                questPart_JoinPlayer.pawns.AddRange(pawns.GetValue(slate));
                QuestGen.quest.AddPart(questPart_JoinPlayer);
            }
        }