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); } }