Properly defines a few global vars (#7948)

Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
Raeschen
2024-03-27 23:55:55 +01:00
committed by GitHub
co-authored by Selis
parent 2fbb251fca
commit 29b08a0d33
21 changed files with 92 additions and 88 deletions
@@ -1,5 +1,5 @@
var/static/list/mapped_autostrips = list()
var/static/list/mapped_autostrips_mob = list()
GLOBAL_LIST_EMPTY(mapped_autostrips)
GLOBAL_LIST_EMPTY(mapped_autostrips_mob)
/*
This should actually be refactored if it ever needs to be used again into just being
@@ -74,8 +74,8 @@ But for now, for what it's been used for, it works.
/obj/effect/step_trigger/autostrip/proc/initMappedLink()
. = FALSE
target = mapped_autostrips[targetid]
Mtarget = mapped_autostrips_mob[targetid]
target = GLOB.mapped_autostrips[targetid]
Mtarget = GLOB.mapped_autostrips_mob[targetid]
if(target)
. = TRUE
@@ -93,11 +93,11 @@ But for now, for what it's been used for, it works.
/obj/effect/autostriptarget/Initialize(mapload)
. = ..()
if(targetid)
mapped_autostrips[targetid] = src
GLOB.mapped_autostrips[targetid] = src
/obj/effect/autostriptarget/mob
name = "Autostrip target to send mobs to."
/obj/effect/autostriptarget/mob/Initialize(mapload)
if(targetid)
mapped_autostrips_mob[targetid] = src
GLOB.mapped_autostrips_mob[targetid] = src