mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Optimize Cryoplanet Subsystem (#19490)
* optimize * cleanup * use this instead
This commit is contained in:
@@ -62,15 +62,14 @@ SUBSYSTEM_DEF(cryoplanets)
|
||||
neededEnergy = max(neededEnergy, -max_thermal_change)
|
||||
|
||||
// Check if this would be affected by the station mainboiler's radiators.
|
||||
var/area/check_area = get_area(T) // If we have an active radiator in the area, then there is no point in starting a temperature war....
|
||||
if(check_area && length(SSstationheater.radiators) && target_temp < SSstationheater.target_heat_temperature)
|
||||
var/obj/structure/stationboiler/current_heater = SSstationheater.get_current_boiler()
|
||||
if(current_heater?.is_heating()) // If the current boiler isn't on... It won't matter.
|
||||
for(var/obj/machinery/stationboiler_radiator/radiator in SSstationheater.radiators)
|
||||
CHECK_TICK
|
||||
if(get_area(radiator) != check_area)
|
||||
continue
|
||||
return // Area had an active radiator, we'll drop out!
|
||||
// If we have an active radiator in the area, then there is no point in starting a temperature war....
|
||||
var/area/check_area = get_area(T)
|
||||
if(check_area && length(check_area.radiators) && target_temp < SSstationheater.target_heat_temperature)
|
||||
var/obj/machinery/stationboiler_radiator/check_rad = check_area.radiators[1] // It won't matter which radiator in the area, as they're all on the same planet anyway
|
||||
if(check_rad.get_radiating())
|
||||
return
|
||||
|
||||
// Time to chill the area...
|
||||
//testing("Energy: [neededEnergy]")
|
||||
currentAir.add_thermal_energy(neededEnergy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user