Properly defines a few global vars (#7938)

This commit is contained in:
Selis
2024-03-12 14:11:01 +01:00
committed by GitHub
parent 193e5b8feb
commit 24c3099b57
21 changed files with 97 additions and 93 deletions

View File

@@ -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