Пример #1
0
 private void RestoreDefencesAndPower()
 {
     foreach (var thing in map.spawnedThings)
     {
         if (thing.TryGetComp <CompPowerPlant>() != null || thing.TryGetComp <CompPowerBattery>() != null || (thing.def.building != null && thing.def.building.IsTurret))
         {
             CompBreakdownable bdcomp = thing.TryGetComp <CompBreakdownable>();
             if (bdcomp != null)
             {
                 bdcomp.Notify_Repaired();
             }
         }
     }
 }