Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        public override bool CanStackWith(Thing other)
        {
            MinifiedThing minifiedThing = other as MinifiedThing;

            if (minifiedThing == null)
            {
                return(false);
            }
            return(base.CanStackWith(other) && InnerThing.CanStackWith(minifiedThing.InnerThing));
        }
Beispiel #3
0
        public override string GetInspectString()
        {
            string text          = "NotInstalled".Translate();
            string inspectString = InnerThing.GetInspectString();

            if (!inspectString.NullOrEmpty())
            {
                text += "\n";
                text += inspectString;
            }
            return(text);
        }
Beispiel #4
0
 public override void Tick()
 {
     if (InnerThing == null)
     {
         Destroy(DestroyMode.Vanish);
         return;
     }
     base.Tick();
     if (InnerThing is Building_EmpBomb)
     {
         InnerThing.Tick();
     }
 }