public void Notify_ConstructMayBeLost(Pawn_Construct construct) { if (spawnedConstructs.Contains(construct)) { spawnedConstructs.Remove(construct); Notify_ConstructLost(); } }
public virtual Pawn_Construct MakeConstruct() { Pawn_Construct construct = (Pawn_Construct)PawnGenerator.GeneratePawn(ConstructDefOf.CanoptekScarab, Faction); construct.station = this; spawnedConstructs.Add(construct); return(construct); }
public override void Tick() { base.Tick(); if (ConstructsLeft > 0 && !lockdown && this.IsHashIntervalTick(60) && GetComp <CompPowerTrader>()?.PowerOn != false) { Job job = TryGiveJob(); if (job != null) { job.playerForced = true; job.expiryInterval = -1; Pawn_Construct construct = MakeConstruct(); GenSpawn.Spawn(construct, Position, Map); construct.jobs.StartJob(job); } } }