diff --git a/code/controllers/subsystems/cryoplanets.dm b/code/controllers/subsystems/cryoplanets.dm index b4c55664011..4879986e14c 100644 --- a/code/controllers/subsystems/cryoplanets.dm +++ b/code/controllers/subsystems/cryoplanets.dm @@ -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) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 6356d5a75d2..8ed3c532c5e 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -41,6 +41,7 @@ GLOBAL_LIST_EMPTY(areas_by_type) var/music = null var/has_gravity = TRUE // Don't check this var directly; use get_gravity() instead var/obj/machinery/power/apc/apc = null + var/list/radiators = null var/no_air = null // var/list/lights // list of all lights on this area var/list/all_doors = null //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area diff --git a/code/game/machinery/atmoalter/station_boiler_radiator.dm b/code/game/machinery/atmoalter/station_boiler_radiator.dm index b446592c3fc..2caac638fd9 100644 --- a/code/game/machinery/atmoalter/station_boiler_radiator.dm +++ b/code/game/machinery/atmoalter/station_boiler_radiator.dm @@ -17,11 +17,24 @@ /obj/machinery/stationboiler_radiator/Initialize(mapload) . = ..() SSstationheater.radiators += src + var/area/new_area = get_area(src) + if(new_area) + LAZYADD(new_area.radiators, src) /obj/machinery/stationboiler_radiator/Destroy() SSstationheater.radiators -= src + var/area/our_area = get_area(src) + if(our_area) + LAZYREMOVE(our_area.radiators, src) . = ..() +/obj/machinery/stationboiler_radiator/area_changed(area/old_area, area/new_area) + . = ..() + if(old_area) + LAZYREMOVE(old_area.radiators, src) + if(new_area) + LAZYADD(new_area.radiators, src) + /obj/machinery/stationboiler_radiator/proc/set_state(activate) if(actively_radiating == activate) return