Files
Yogstation/code/controllers/subsystem/adjacent_air.dm
alexkar598 0ff2f1b025 SSMetrics (#19719)
* SSMetrics

* We were a bit too silly

* Forgot to commit this

* Logs CPU

* Removes global data from all ss

* And puts it on the metrics ss

* Update metrics.dm

* Logs profiler data

* Adds profile configs

* Update code/controllers/subsystem/metrics.dm

Co-authored-by: adamsong <adamsong@users.noreply.github.com>

* Log request errors

* Final fixes

* Rebuilds for 1.2.0-yogs1

* Apparnetly you can't split macro calls on multiple lines

* Org is called yogstation13 not yogstation

---------

Co-authored-by: alexkar598 <>
Co-authored-by: adamsong <adamsong@users.noreply.github.com>
2023-07-28 00:16:53 -05:00

44 lines
995 B
Plaintext

SUBSYSTEM_DEF(adjacent_air)
name = "Atmos Adjacency"
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
wait = 10
priority = FIRE_PRIORITY_ATMOS_ADJACENCY
loading_points = 0.7 SECONDS // Yogs -- loading times
var/list/queue = list()
/datum/controller/subsystem/adjacent_air/stat_entry(msg)
#ifdef TESTING
msg = "P:[length(queue)], S:[GLOB.atmos_adjacent_savings[1]], T:[GLOB.atmos_adjacent_savings[2]]"
#else
msg = "P:[length(queue)]"
#endif
return ..()
/datum/controller/subsystem/adjacent_air/get_metrics()
. = ..()
.["queued"] = length(queue)
/datum/controller/subsystem/adjacent_air/Initialize()
while(length(queue))
fire(mc_check = FALSE)
return SS_INIT_SUCCESS
/datum/controller/subsystem/adjacent_air/fire(resumed = FALSE, mc_check = TRUE)
var/list/queue = src.queue
while (length(queue))
var/turf/currT = queue[1]
queue.Cut(1,2)
currT.ImmediateCalculateAdjacentTurfs()
if(mc_check)
if(MC_TICK_CHECK)
break
else
CHECK_TICK