Files
Paradise/code/modules/awaymissions/zlevel_helpers.dm
Contrabang 5237a148cc Readds Atmos freezing to loading maps (#28111)
* Adds Z-level freezing to MILLA

spacing fix

lets try that again

Build Rust library

update

* Build Rust library

* Build Rust library

---------

Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
2025-02-08 17:07:28 +00:00

53 lines
1.6 KiB
Plaintext

/datum/milla_safe_must_sleep/late_setup_level
// Ensures that atmos and environment are set up.
/datum/milla_safe_must_sleep/late_setup_level/on_run(turf/bot_left, turf/top_right, smoothTurfs)
var/total_timer = start_watch()
var/subtimer = start_watch()
if(!smoothTurfs)
smoothTurfs = block(bot_left, top_right)
log_debug("Setting up atmos")
/* setup_allturfs is superfluous during server initialization because
* air subsystem will call subsequently call setup_allturfs with _every_
* turf in the world */
if(SSair && SSair.initialized)
SSair.setup_turfs(bot_left, top_right)
log_debug("Unfreezing atmos.")
set_zlevel_freeze(bot_left.z, FALSE)
log_debug("\tTook [stop_watch(subtimer)]s")
subtimer = start_watch()
log_debug("Smoothing tiles")
for(var/turf/T in smoothTurfs)
if(T.smoothing_flags)
QUEUE_SMOOTH(T)
for(var/R in T)
var/atom/A = R
if(A.smoothing_flags)
QUEUE_SMOOTH(A)
log_debug("\tTook [stop_watch(subtimer)]s")
log_debug("Late setup finished - took [stop_watch(total_timer)]s")
/proc/empty_rect(low_x,low_y, hi_x,hi_y, z)
var/timer = start_watch()
log_debug("Emptying region: ([low_x], [low_y]) to ([hi_x], [hi_y]) on z '[z]'")
empty_region(block(low_x, low_y, z, hi_x, hi_y, z))
log_debug("Took [stop_watch(timer)]s")
/proc/empty_region(list/turfs)
for(var/thing in turfs)
var/turf/T = thing
for(var/otherthing in T)
qdel(otherthing)
T.ChangeTurf(T.baseturf)
/datum/milla_safe/freeze_z_level
var/done = FALSE
// Ensures that atmos is frozen before loading
/datum/milla_safe/freeze_z_level/on_run(z)
log_debug("Freezing atmos.")
set_zlevel_freeze(z, TRUE)
done = TRUE