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

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

            base.DeSpawn();
            if (firstBlight != null)
            {
                firstBlight.Notify_PlantDeSpawned();
            }
        }
예제 #3
0
파일: Plant.cs 프로젝트: woomy144/Rimworld
        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);
            }
        }
예제 #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);
     }
 }