コード例 #1
0
        public static QuestPart_SpawnWorldObject SpawnWorldObject(this Quest quest, WorldObject worldObject, List <ThingDef> defsToExcludeFromHyperlinks = null, string inSignal = null)
        {
            QuestPart_SpawnWorldObject questPart_SpawnWorldObject = new QuestPart_SpawnWorldObject();

            questPart_SpawnWorldObject.inSignal = QuestGenUtility.HardcodedSignalWithQuestID(inSignal) ?? QuestGen.slate.Get <string>("inSignal");
            questPart_SpawnWorldObject.defsToExcludeFromHyperlinks = defsToExcludeFromHyperlinks;
            questPart_SpawnWorldObject.worldObject = worldObject;
            quest.AddPart(questPart_SpawnWorldObject);
            return(questPart_SpawnWorldObject);
        }
コード例 #2
0
        protected override void RunInt()
        {
            Slate slate = QuestGen.slate;

            if (worldObjects.GetValue(slate) != null)
            {
                string text = QuestGenUtility.HardcodedSignalWithQuestID(inSignal.GetValue(slate)) ?? QuestGen.slate.Get <string>("inSignal");
                foreach (WorldObject item in worldObjects.GetValue(slate))
                {
                    QuestPart_SpawnWorldObject questPart_SpawnWorldObject = new QuestPart_SpawnWorldObject();
                    questPart_SpawnWorldObject.worldObject = item;
                    questPart_SpawnWorldObject.inSignal    = text;
                    questPart_SpawnWorldObject.defsToExcludeFromHyperlinks = defsToExcludeFromHyperlinks.GetValue(slate);
                    if (tile.GetValue(slate).HasValue)
                    {
                        item.Tile = tile.GetValue(slate).Value;
                    }
                    QuestGen.quest.AddPart(questPart_SpawnWorldObject);
                }
            }
        }