Rework maintenance loot spawners to fire at roundstart (#59913)

Maintenance loot spawners now fire at roundstart, rather than during the initialization of the Atoms subsystem.
Maintenance loot spawners do not qdel themselves during the spawning process, but persist, and merely hide themselves from living players.

As a cute side effect, this lets preround observers look at the colourful maintenance loot dice icons before the round starts. Observers can continue to see the loot dice post-round, but they are deliberately
very faint.
This commit is contained in:
coiax
2021-07-17 12:15:20 -03:00
committed by GitHub
parent d0160640b7
commit fd2fc3287d
3 changed files with 62 additions and 4 deletions
+8
View File
@@ -127,6 +127,7 @@ SUBSYSTEM_DEF(mapping)
setup_map_transitions()
generate_station_area_list()
initialize_reserved_level(transit.z_value)
SSticker.OnRoundstart(CALLBACK(src, .proc/spawn_maintenance_loot))
return ..()
/datum/controller/subsystem/mapping/proc/wipe_reservations(wipe_safety_delay = 100)
@@ -590,3 +591,10 @@ GLOBAL_LIST_EMPTY(the_station_areas)
isolated_ruins_z = add_new_zlevel("Isolated Ruins/Reserved", list(ZTRAIT_RESERVED = TRUE, ZTRAIT_ISOLATED_RUINS = TRUE))
initialize_reserved_level(isolated_ruins_z.z_value)
return isolated_ruins_z.z_value
/datum/controller/subsystem/mapping/proc/spawn_maintenance_loot()
for(var/obj/effect/spawner/lootdrop/maintenance/spawner as anything in GLOB.maintenance_loot_spawners)
CHECK_TICK
spawner.spawn_loot()
spawner.hide()