Ejemplo n.º 1
0
 public static void TryAttachFire(this Thing t, float fireSize)
 {
     if (t.CanEverAttachFire() && !t.HasAttachment(ThingDefOf.Fire))
     {
         Fire fire = (Fire)ThingMaker.MakeThing(ThingDefOf.Fire, null);
         fire.fireSize = fireSize;
         fire.AttachTo(t);
         GenSpawn.Spawn(fire, t.Position, t.Map, Rot4.North, false);
         Pawn pawn = t as Pawn;
         if (pawn != null)
         {
             pawn.jobs.EndCurrentJob(JobCondition.InterruptForced, true);
             pawn.records.Increment(RecordDefOf.TimesOnFire);
         }
     }
 }
Ejemplo n.º 2
0
 public static void TryAttachFire(this Thing t, float fireSize)
 {
     if (t.CanEverAttachFire() && !t.HasAttachment(ThingDefOf.Fire))
     {
         Fire fire = (Fire)ThingMaker.MakeThing(ThingDefOf.Fire);
         fire.fireSize = fireSize;
         fire.AttachTo(t);
         GenSpawn.Spawn(fire, t.Position, t.Map, Rot4.North);
         Pawn pawn = t as Pawn;
         if (pawn != null)
         {
             pawn.jobs.StopAll();
             pawn.records.Increment(RecordDefOf.TimesOnFire);
         }
     }
 }