diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm index 7f7b575246..f686fe4962 100644 --- a/code/ZAS/Controller.dm +++ b/code/ZAS/Controller.dm @@ -79,6 +79,7 @@ Class Procs: var/list/active_fire_zones = list() var/list/active_hotspots = list() var/list/active_edges = list() + var/list/zones_planet_temperature_to_update = list() var/active_zones = 0 var/current_cycle = 0 @@ -87,11 +88,13 @@ Class Procs: /datum/controller/subsystem/air/proc/add_zone(zone/z) zones.Add(z) z.name = "Zone [next_id++]" + zones_planet_temperature_to_update.Add(z) //YW Addition - planet temp mark_zone_update(z) /datum/controller/subsystem/air/proc/remove_zone(zone/z) zones.Remove(z) zones_to_update.Remove(z) + zones_planet_temperature_to_update.Remove(z) //YW Addition - planet temp /datum/controller/subsystem/air/proc/air_blocked(turf/A, turf/B) #ifdef ZASDBG diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm index e3490ca464..9c4410a540 100644 --- a/code/controllers/subsystems/air.dm +++ b/code/controllers/subsystems/air.dm @@ -252,16 +252,18 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun /datum/controller/subsystem/air/proc/process_boiler_zones_to_update(resumed = 0) if (!resumed) //I have no idea what this is for yet - src.currentrun = zones.Copy() + src.currentrun = zones_planet_temperature_to_update.Copy() var/list/currentrun = src.currentrun while(currentrun.len) var/zone/zone = currentrun[currentrun.len] currentrun.len-- if(!zone.invalid) - var/turf/T = zone.contents[1] - if(is_station_temp_change_turf(T)) - equalize_temperature_to_planet(T, zone, thermal_energy_change) + var/turf/T = pick(zone.contents) + if(!is_station_temp_change_turf(T)) + zones_planet_temperature_to_update.Remove(zone) //Remove from the global list so we do not spend time going over it again + continue + equalize_temperature_to_planet(T, zone, thermal_energy_change) if(MC_TICK_CHECK) testing("boiler MC TICK CHECK") return @@ -324,7 +326,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun msg += "F [active_fire_zones.len] | " msg += "H [active_hotspots.len] | " msg += "Z [zones_to_update.len] " - msg += "B [zones.len] " + msg += "B [zones_planet_temperature_to_update.len] " msg += "}" ..(msg.Join())