Conversion many Globals to Managed Globals (Part 1) (#17121)

* Conversion of some Globals to Managed Globals

* Fix

* for later

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2025-04-17 20:16:53 +02:00
committed by GitHub
parent 6a47a779d5
commit 21dcf0555b
229 changed files with 1227 additions and 1220 deletions
+5 -5
View File
@@ -1,18 +1,18 @@
// This system is used to grab a ghost from observers with the required preferences and
// lack of bans set. See posibrain.dm for an example of how they are called/used. ~Z
var/list/ghost_traps
GLOBAL_LIST(ghost_traps)
/proc/get_ghost_trap(var/trap_key)
if(!ghost_traps)
if(!GLOB.ghost_traps)
populate_ghost_traps()
return ghost_traps[trap_key]
return GLOB.ghost_traps[trap_key]
/proc/populate_ghost_traps()
ghost_traps = list()
GLOB.ghost_traps = list()
for(var/traptype in typesof(/datum/ghosttrap))
var/datum/ghosttrap/G = new traptype
ghost_traps[G.object] = G
GLOB.ghost_traps[G.object] = G
/datum/ghosttrap
var/object = "positronic brain"