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
@@ -197,7 +197,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
character.set_gender(pref.biological_gender)
character.synthetic = pref.species == "Protean" ? all_robolimbs["protean"] : null //Clear the existing var. (unless protean, then switch it to the normal protean limb)
character.synthetic = pref.species == "Protean" ? GLOB.all_robolimbs["protean"] : null //Clear the existing var. (unless protean, then switch it to the normal protean limb)
var/list/organs_to_edit = list()
for (var/name in list(BP_TORSO, BP_HEAD, BP_GROIN, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT))
var/obj/item/organ/external/O = character.organs_by_name[name]
@@ -334,16 +334,16 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
if(ind > 1)
. += ", "
var/datum/robolimb/R = basic_robolimb
var/datum/robolimb/R = GLOB.basic_robolimb
var/key = pref.rlimb_data[name]
if(!istext(key))
log_debug("Bad rlimb_data for [key_name(pref.client)], [name] was set to [key]")
to_chat(usr, span_warning("Error loading robot limb data for `[name]`, clearing pref."))
pref.rlimb_data -= name
else
R = LAZYACCESS(all_robolimbs, key)
R = LAZYACCESS(GLOB.all_robolimbs, key)
if(!istype(R))
R = basic_robolimb
R = GLOB.basic_robolimb
. += "\t[R.company] [organ_name] prosthesis"
else if(status == "amputated")
++ind
@@ -924,8 +924,8 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
if("Prosthesis")
var/tmp_species = pref.species ? pref.species : SPECIES_HUMAN
var/list/usable_manufacturers = list()
for(var/company in chargen_robolimbs)
var/datum/robolimb/M = chargen_robolimbs[company]
for(var/company in GLOB.chargen_robolimbs)
var/datum/robolimb/M = GLOB.chargen_robolimbs[company]
if(!(limb in M.parts))
continue
if(tmp_species in M.species_cannot_use)