Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. public override void CompTick()
  2.         {
  3.             Pawn pawn = this.parent as Pawn;
  4.             if (pawn.needs.food.CurLevelPercentage >= 0.1f)
  5.             {
  6.                 for (int i = 0; i < this.Props.pawnCount; i++)
  7.                 {
  8.                     Log.Message("Spawning");
  9.                     Log.Message("PawnKind: "+ this.Props.pawnKind);
  10.                     Log.Message("PawnCount: "+ this.Props.pawnCount);
  11.                     PawnGenerationRequest request = new PawnGenerationRequest(this.Props.pawnKind, pawn.Faction, PawnGenerationContext.NonPlayer, -1, false, true, false, false, true, false, 1f, false, true, true, false, false, false, false, null, null, null, null, null, null, null, null);
  12.                     Pawn spawn = PawnGenerator.GeneratePawn(request);
  13.                 }
  14.                 pawn.Destroy(DestroyMode.Vanish);
  15.             }
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement