Files
Yogstation/code/controllers/subsystem/adjacent_air.dm
Altoids1 119ea82e32 The initial subsystem loading now gives an approximate % to completion, among other style tweaks (#13645)
* Makes the HEY LISTEN dialog a bit quieter

Now it only prints to admins. It's still logged and everything, for those who want to shave off the <100 ms it takes the server to usually handle this atmos equalization stuff.

TBH this is such a, weird debug line, I don't really know why it was kept in as a big dumb to_chat(world) for so long.

* Makes the subsystem init dialog look nicer

Now, instead of displaying performance times to the whole `world`, an approximate loading % is printed to everyone (with admins getting the old dialog in span_notice style).

EDIT: Fixes some stuff Gamer complained about
EDIT EDIT: I don't get how SHOULD_CALL_PARENT works

* Update yogstation/code/controllers/subsystem/yogs.dm

Co-authored-by: nmajask <nmajask@gmail.com>

Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
Co-authored-by: nmajask <nmajask@gmail.com>
2022-04-16 00:07:42 +01:00

40 lines
889 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/Initialize()
while(length(queue))
fire(mc_check = FALSE)
return ..()
/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