mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-18 14:12:20 +00:00
additional debugging tweaks
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -170,8 +170,8 @@ datum
|
|||||||
|
|
||||||
proc/tick()
|
proc/tick()
|
||||||
. = 1 //Set the default return value, for runtime detection.
|
. = 1 //Set the default return value, for runtime detection.
|
||||||
tick_progress = 0
|
|
||||||
|
|
||||||
|
tick_progress = 0
|
||||||
if(current_cycle >= next_stat_check)
|
if(current_cycle >= next_stat_check)
|
||||||
var/zone/z = pick(zones)
|
var/zone/z = pick(zones)
|
||||||
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY-air.txt")]")
|
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY-air.txt")]")
|
||||||
@@ -179,7 +179,6 @@ datum
|
|||||||
next_stat_check = current_cycle + (rand(5,7)*60)
|
next_stat_check = current_cycle + (rand(5,7)*60)
|
||||||
|
|
||||||
tick_progress = 1
|
tick_progress = 1
|
||||||
|
|
||||||
if(tiles_to_update.len) //If there are tiles to update, do so.
|
if(tiles_to_update.len) //If there are tiles to update, do so.
|
||||||
for(var/turf/simulated/T in tiles_to_update)
|
for(var/turf/simulated/T in tiles_to_update)
|
||||||
var/output = T.update_air_properties()
|
var/output = T.update_air_properties()
|
||||||
@@ -190,21 +189,18 @@ datum
|
|||||||
tiles_to_update = list()
|
tiles_to_update = list()
|
||||||
|
|
||||||
tick_progress = 2
|
tick_progress = 2
|
||||||
|
|
||||||
if(connections_to_check.len)
|
if(connections_to_check.len)
|
||||||
for(var/connection/C in connections_to_check)
|
for(var/connection/C in connections_to_check)
|
||||||
C.CheckPassSanity()
|
C.CheckPassSanity()
|
||||||
connections_to_check = list()
|
connections_to_check = list()
|
||||||
|
|
||||||
tick_progress = 3
|
tick_progress = 3
|
||||||
|
|
||||||
if(tiles_to_reconsider_zones.len)
|
if(tiles_to_reconsider_zones.len)
|
||||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||||
if(!T.zone)
|
if(!T.zone)
|
||||||
new /zone(T)
|
new /zone(T)
|
||||||
|
|
||||||
tick_progress = 4
|
tick_progress = 4
|
||||||
|
|
||||||
for(var/zone/Z in zones)
|
for(var/zone/Z in zones)
|
||||||
if(Z.last_update < current_cycle)
|
if(Z.last_update < current_cycle)
|
||||||
var/output = Z.process()
|
var/output = Z.process()
|
||||||
@@ -216,7 +212,6 @@ datum
|
|||||||
alerted = 1
|
alerted = 1
|
||||||
|
|
||||||
tick_progress = 5
|
tick_progress = 5
|
||||||
|
|
||||||
for(var/obj/fire/F in active_hotspots)
|
for(var/obj/fire/F in active_hotspots)
|
||||||
var/output = F.process()
|
var/output = F.process()
|
||||||
if(. && F && !output)
|
if(. && F && !output)
|
||||||
|
|||||||
@@ -176,6 +176,22 @@ datum/controller/game_controller
|
|||||||
air_master.current_cycle++
|
air_master.current_cycle++
|
||||||
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
|
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
|
||||||
if(!success) //Runtimed.
|
if(!success) //Runtimed.
|
||||||
|
var/section = "unknown"
|
||||||
|
switch(air_master.tick_progress)
|
||||||
|
if(0)
|
||||||
|
section = "next_stat_check (atmos statistics)"
|
||||||
|
if(1)
|
||||||
|
section = "update_air_properties"
|
||||||
|
if(2)
|
||||||
|
section = "connections_to_check"
|
||||||
|
if(3)
|
||||||
|
section = "tiles_to_reconsider_zones"
|
||||||
|
if(4)
|
||||||
|
section = "zone/process"
|
||||||
|
if(5)
|
||||||
|
section = "active_hotspots (fire)"
|
||||||
|
if(6)
|
||||||
|
section = "success"
|
||||||
log_admin("ZASALERT: air_system/tick() failed with progress: [air_master.tick_progress]")
|
log_admin("ZASALERT: air_system/tick() failed with progress: [air_master.tick_progress]")
|
||||||
air_master.failed_ticks++
|
air_master.failed_ticks++
|
||||||
if(air_master.failed_ticks > 20)
|
if(air_master.failed_ticks > 20)
|
||||||
|
|||||||
Reference in New Issue
Block a user