mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-08 21:54:42 +01:00
03cca11f95
* Init Sanity Unit Test * Oops * Update code/modules/unit_tests/init_sanity.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Makes noticeboard less silly --------- Signed-off-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
40 lines
1.5 KiB
Plaintext
40 lines
1.5 KiB
Plaintext
// This subsystem is to initialize things which need to happen after SSatoms
|
|
// This is for things which can take a long period of time and shouldnt bog down SSatoms
|
|
// Use this for stuff like random room spawners or maze generators
|
|
// Basically, this manages atom-based maploaders
|
|
SUBSYSTEM_DEF(late_mapping)
|
|
name = "Late Mapping"
|
|
init_order = INIT_ORDER_LATE_MAPPING
|
|
flags = SS_NO_FIRE
|
|
/// List of all maze generators to process
|
|
var/list/obj/effect/mazegen/generator/maze_generators = list()
|
|
/// List of all bridge spawners to process
|
|
var/list/obj/effect/spawner/bridge/bridge_spawners = list()
|
|
|
|
/datum/controller/subsystem/late_mapping/Initialize()
|
|
if(length(maze_generators))
|
|
var/watch = start_watch()
|
|
log_startup_progress("Generating mazes...")
|
|
|
|
for(var/i in maze_generators)
|
|
var/obj/effect/mazegen/generator/MG = i
|
|
MG.run_generator()
|
|
|
|
var/list/mgcount = length(maze_generators) // Keeping track of this here because we wipe it next line down
|
|
QDEL_LIST_CONTENTS(maze_generators)
|
|
var/duration = stop_watch(watch)
|
|
log_startup_progress("Generated [mgcount] mazes in [duration]s")
|
|
|
|
if(length(bridge_spawners))
|
|
var/watch = start_watch()
|
|
log_startup_progress("Spawning bridges...")
|
|
|
|
for(var/i in bridge_spawners)
|
|
var/obj/effect/spawner/bridge/BS = i
|
|
BS.generate_bridge()
|
|
|
|
var/list/bscount = length(bridge_spawners) // Keeping track of this here because we wipe it next line down
|
|
QDEL_LIST_CONTENTS(bridge_spawners)
|
|
var/duration = stop_watch(watch)
|
|
log_startup_progress("Spawned [bscount] bridges in [duration]s")
|