public override bool SubstituionWorkerExecution() { Map map = (Map)parms.target; Rot4 rot = Rot4.FromAngleFlat((map.Center - intVec).AngleFlat); for (int i = 0; i < pawnList.Count; i++) { Pawn newThing = pawnList[i]; IntVec3 loc = CellFinder.RandomClosewalkCellNear(intVec, map, 10, null); GenSpawn.Spawn(newThing, loc, map, rot, WipeMode.Vanish, false); } LordMaker.MakeNewLord(null, new LordJob_ExitMapNear(near, LocomotionUrgency.Walk, 12f, false, false), map, pawnList); IncidentDef def = incidentDef; string text = string.Format(def.letterText, AnimalType.GetLabelPlural(-1)).CapitalizeFirst(); string label = string.Format(def.letterLabel, AnimalType.GetLabelPlural(-1).CapitalizeFirst()); Find.LetterStack.ReceiveLetter(label, text, def.letterDef, pawnList[0], null, null); return(true); }
public override bool SubstituionWorkerExecution() { Map map = (Map)parms.target; Rot4 rot = Rot4.FromAngleFlat((map.Center - intVec).AngleFlat); for (int i = 0; i < pawnList.Count; i++) { Pawn pawn = pawnList[i]; IntVec3 loc = CellFinder.RandomClosewalkCellNear(intVec, map, 10, null); GenSpawn.Spawn(pawn, loc, map, rot, WipeMode.Vanish, false); pawn.mindState.mentalStateHandler.TryStartMentalState(MentalStateDefOf.ManhunterPermanent, null, false, false, null, false); pawn.mindState.exitMapAfterTick = Find.TickManager.TicksGame + Rand.Range(60000, 120000); } Find.LetterStack.ReceiveLetter("LetterLabelManhunterPackArrived".Translate(), "ManhunterPackArrived".Translate(AnimalType.GetLabelPlural(-1)), LetterDefOf.ThreatBig, pawnList[0], null, null); Find.TickManager.slower.SignalForceNormalSpeedShort(); LessonAutoActivator.TeachOpportunity(ConceptDefOf.ForbiddingDoors, OpportunityType.Critical); LessonAutoActivator.TeachOpportunity(ConceptDefOf.AllowedAreas, OpportunityType.Important); return(true); }
public override bool SubstituionWorkerExecution() { Map map = (Map)parms.target; for (int i = 0; i < AnimalNum; i++) { IntVec3 loc = CellFinder.RandomClosewalkCellNear(EntryVec, map, 12, null); Pawn pawn = PawnGenerator.GeneratePawn(AnimalType, null); GenSpawn.Spawn(pawn, loc, map, Rot4.Random, WipeMode.Vanish, false); pawn.SetFaction(Faction.OfPlayer, null); } Find.LetterStack.ReceiveLetter("LetterLabelFarmAnimalsWanderIn".Translate(AnimalType.GetLabelPlural(-1)).CapitalizeFirst(), "LetterFarmAnimalsWanderIn".Translate(AnimalType.GetLabelPlural(-1)), LetterDefOf.PositiveEvent, lookTargets, null, null); return(true); }