Beispiel #1
0
        public override void DeSpawn(DestroyMode mode = DestroyMode.Vanish)
        {
            Blight firstBlight = base.Position.GetFirstBlight(base.Map);

            base.DeSpawn(mode);
            firstBlight?.Notify_PlantDeSpawned();
        }
Beispiel #2
0
        public override void DeSpawn()
        {
            Blight firstBlight = base.Position.GetFirstBlight(base.Map);

            base.DeSpawn();
            if (firstBlight != null)
            {
                firstBlight.Notify_PlantDeSpawned();
            }
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
 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);
     }
 }