public static bool LabelsNoMatch(this MoteTracer MT, MoteDecoration MD) { return(MT.Label != MD.label); }
public static bool MoteIsDead(this MoteTracer MT) { return(MT.EmittedMote == null || !MT.EmittedMote.Spawned); }
public override void CompTick() { if (DoNothing) { return; } base.CompTick(); string debugStr = MyDebug ? parent.Label + " CompTick - " : ""; this.MaybeUpdateReservations(); //Tools.Warn(debugStr + "LivingMotes Loop", DebugOutsideLoop); for (int i = LivingMotes.Count - 1; i >= 0; i--) { MoteTracer MT = LivingMotes[i]; if (MT.MoteIsDead()) { LivingMotes.RemoveAt(i); } MT.DecreaseGraceTicks(); } //Tools.Warn(debugStr + "LivingMotes not coexisting", DebugOutsideLoop); if (this.NonCoexistingMoteInTracer()) { return; } //Tools.Warn(debugStr + "Looping around " + MoteNum + " mote params", DebugOutsideLoop); for (MoteIndex = 0; MoteIndex < MoteNum; MoteIndex++) { string debugLoopStr = "[" + (MoteIndex + 1) + "/" + MoteNum + "]"; if (NullCurItem) { Tools.Warn(debugStr + debugLoopStr + " curItem is null, skipped", DebugInsideLoop); continue; } else { Tools.Warn(debugStr + debugLoopStr + " curItem is real, going on ", DebugInsideLoop && CurItem.debug); } if (CurItem.IsInvalid) { Tools.Warn(debugStr + debugLoopStr + " is invalid, skipped", DebugInsideLoop && CurItem.debug); continue; } else { Tools.Warn(debugStr + debugLoopStr + " is valid, going on", DebugInsideLoop && CurItem.debug); } string moteName = MyDebug ? CurItem.moteDef.defName : "";; Tools.Warn(debugStr + debugLoopStr + " condition validating: " + moteName, DebugInsideLoop && CurItem.debug); if (!this.AllConditionsValidation()) { continue; } else { Tools.Warn(debugStr + " should be displayed " + moteName, DebugInsideLoop && CurItem.debug); } LivingMotes.Add( new MoteTracer( CurItem.label, GfxEffects.SpawnMote(CurItem, GetBuilding, Worker), CurItem.graceTicks, CurItem.coexistsWithSame, CurItem.coexistsWithOther ) ); } //Tools.Warn("motes end Loop", DebugOutsideLoop); }