mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 16:13:49 +01:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user