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 void ProcessInput(Event ev) { Thing miniToInstallOrBuildingToReinstall = MiniToInstallOrBuildingToReinstall; if (miniToInstallOrBuildingToReinstall != null) { InstallBlueprintUtility.CancelBlueprintsFor(miniToInstallOrBuildingToReinstall); if (!((ThingDef)PlacingDef).rotatable) { placingRot = Rot4.North; } } base.ProcessInput(ev); }
public override void Destroy(DestroyMode mode = DestroyMode.Vanish) { bool spawned = base.Spawned; Map map = base.Map; base.Destroy(mode); if (this.InnerThing != null) { InstallBlueprintUtility.CancelBlueprintsFor(this); if (mode == DestroyMode.Deconstruct && spawned) { SoundDef.Named("BuildingDeconstructed").PlayOneShot(new TargetInfo(base.Position, map, false)); GenLeaving.DoLeavingsFor(this.InnerThing, map, mode, this.OccupiedRect()); } } }
public override void PreTraded(TradeAction action, Pawn playerNegotiator, ITrader trader) { base.PreTraded(action, playerNegotiator, trader); InstallBlueprintUtility.CancelBlueprintsFor(this); }