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
+4 -4
View File
@@ -1,4 +1,4 @@
var/global/list/prevent_respawns = list()
GLOBAL_LIST_EMPTY(prevent_respawns)
/hook/death/proc/quit_notify(mob/dead)
if(ishuman(dead))
@@ -25,7 +25,7 @@ var/global/list/prevent_respawns = list()
//prevent_respawns += mind.name //Replaced by PR 4785
//Update any existing objectives involving this mob.
for(var/datum/objective/O in all_objectives)
for(var/datum/objective/O in GLOB.all_objectives)
if(O.target == src.mind)
if(O.owner && O.owner.current)
to_chat(O.owner.current,span_warning("You get the feeling your target is no longer within your reach..."))
@@ -45,8 +45,8 @@ var/global/list/prevent_respawns = list()
src.mind.special_role = null
//Cut the PDA manifest (ugh)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
if(GLOB.PDA_Manifest.len)
GLOB.PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
if((R.fields["name"] == src.real_name))
qdel(R)
+3 -3
View File
@@ -307,14 +307,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, span_warning("Another consciousness is in your body... it is resisting you."))
return
//VOREStation Add
if(prevent_respawns.Find(mind.name))
if(GLOB.prevent_respawns.Find(mind.name))
to_chat(src, span_warning("You already quit this round as this character, sorry!"))
return
//VOREStation Add End
if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune).
var/found_rune
for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune
if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune.
if(R && R.word1 == GLOB.cultwords["hell"] && R.word2 == GLOB.cultwords["travel"] && R.word3 == GLOB.cultwords["self"]) // Found an astral journey rune.
found_rune = 1
break
if(!found_rune)
@@ -858,7 +858,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
)
toggle_ghost_visibility(TRUE)
else
var/datum/gender/T = gender_datums[user.get_visible_gender()]
var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()]
user.visible_message ( \
span_warning("\The [user] just tried to smash [T.his] book into that ghost! It's not very effective."), \
span_warning("You get the feeling that the ghost can't become any more visible.") \