public override void DeSpawn(DestroyMode mode = DestroyMode.Vanish) { Blight firstBlight = base.Position.GetFirstBlight(base.Map); base.DeSpawn(mode); firstBlight?.Notify_PlantDeSpawned(); }
public override void DeSpawn() { Blight firstBlight = base.Position.GetFirstBlight(base.Map); base.DeSpawn(); if (firstBlight != null) { firstBlight.Notify_PlantDeSpawned(); } }
public override IEnumerable <Gizmo> GetGizmos() { foreach (var gizmo in base.GetGizmos()) { yield return(gizmo); } //Spread blight if (Prefs.DevMode && Blighted) { var spread = new Command_Action(); spread.defaultLabel = "Dev: Spread blight"; spread.action = () => Blight.TryReproduceNow(); yield return(spread); } }
public override IEnumerable <Gizmo> GetGizmos() { foreach (Gizmo gizmo in base.GetGizmos()) { yield return(gizmo); } if (Prefs.DevMode && Blighted) { Command_Action command_Action = new Command_Action(); command_Action.defaultLabel = "Dev: Spread blight"; command_Action.action = delegate { Blight.TryReproduceNow(); }; yield return(command_Action); } }