public override void Destroy(DestroyMode mode = DestroyMode.Vanish) { bool spawned = base.Spawned; Map map = base.Map; base.Destroy(mode); if (InnerThing == null) { return; } InstallBlueprintUtility.CancelBlueprintsFor(this); if (spawned) { switch (mode) { case DestroyMode.Deconstruct: SoundDefOf.Building_Deconstructed.PlayOneShot(new TargetInfo(base.Position, map)); GenLeaving.DoLeavingsFor(InnerThing, map, mode, this.OccupiedRect()); break; case DestroyMode.KillFinalize: GenLeaving.DoLeavingsFor(InnerThing, map, mode, this.OccupiedRect()); break; } } if (InnerThing is MonumentMarker) { InnerThing.Destroy(); } }
public override bool CanStackWith(Thing other) { MinifiedThing minifiedThing = other as MinifiedThing; if (minifiedThing == null) { return(false); } return(base.CanStackWith(other) && InnerThing.CanStackWith(minifiedThing.InnerThing)); }
public override string GetInspectString() { string text = "NotInstalled".Translate(); string inspectString = InnerThing.GetInspectString(); if (!inspectString.NullOrEmpty()) { text += "\n"; text += inspectString; } return(text); }
public override void Tick() { if (InnerThing == null) { Destroy(DestroyMode.Vanish); return; } base.Tick(); if (InnerThing is Building_EmpBomb) { InnerThing.Tick(); } }