protected override void RunInt() { Slate slate = QuestGen.slate; PawnGenerationRequest request = new PawnGenerationRequest(kindDef.GetValue(slate), faction.GetValue(slate), PawnGenerationContext.NonPlayer, -1, forceGenerateNewPawn: false, newborn: false, allowDead: false, allowDowned: false, canGeneratePawnRelations: true, allowAddictions: allowAddictions.GetValue(slate) ?? true, forcedTraits: forcedTraits.GetValue(slate), biocodeWeaponChance: biocodeWeaponChance.GetValue(slate), mustBeCapableOfViolence: mustBeCapableOfViolence.GetValue(slate), colonistRelationChanceFactor: 1f, forceAddFreeWarmLayerIfNeeded: false, allowGay: true, allowFood: true, inhabitant: false, certainlyBeenInCryptosleep: false, forceRedressWorldPawnIfFormerColonist: false, worldPawnFactionDoesntMatter: false, extraPawnForExtraRelationChance: extraPawnForExtraRelationChance.GetValue(slate), relationWithExtraPawnChanceFactor: relationWithExtraPawnChanceFactor.GetValue(slate)); request.BiocodeApparelChance = biocodeApparelChance.GetValue(slate); Pawn pawn = PawnGenerator.GeneratePawn(request); if (ensureNonNumericName.GetValue(slate) && (pawn.Name == null || pawn.Name.Numerical)) { pawn.Name = PawnBioAndNameGenerator.GeneratePawnName(pawn); } if (storeAs.GetValue(slate) != null) { QuestGen.slate.Set(storeAs.GetValue(slate), pawn); } if (addToList.GetValue(slate) != null) { QuestGenUtility.AddToOrMakeList(QuestGen.slate, addToList.GetValue(slate), pawn); } if (addToLists.GetValue(slate) != null) { foreach (string item in addToLists.GetValue(slate)) { QuestGenUtility.AddToOrMakeList(QuestGen.slate, item, pawn); } } QuestGen.AddToGeneratedPawns(pawn); if (!pawn.IsWorldPawn()) { Find.WorldPawns.PassToWorld(pawn); } }
protected override void RunInt() { Slate slate = QuestGen.slate; MonumentMarker value = monumentMarker.GetValue(slate); for (int i = 0; i < value.sketch.Things.Count; i++) { ThingDef def = value.sketch.Things[i].def; ThingDef stuff = value.sketch.Things[i].stuff; if (def.category == ThingCategory.Building && !def.BuildableByPlayer) { MinifiedThing obj = ThingMaker.MakeThing(def, stuff).MakeMinified(); QuestGenUtility.AddToOrMakeList(QuestGen.slate, addToList.GetValue(slate), obj); } } }
protected override void RunInt() { Slate slate = QuestGen.slate; QuestGenUtility.AddToOrMakeList(QuestGen.slate, name.GetValue(slate), value.GetValue(slate)); }
protected override bool TestRunInt(Slate slate) { QuestGenUtility.AddToOrMakeList(slate, name.GetValue(slate), value.GetValue(slate)); return(true); }