private static void Depower(MyEntity entity) { MyCubeGrid grid = entity as MyCubeGrid; if (grid != null) { grid.ChangePowerProducerState(MyMultipleEnabledEnum.AllDisabled, -1L); } }