[MIRROR] Conversion many Globals to Managed Globals (Part 1) (#10665)

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-04-17 16:06:35 -07:00
committed by GitHub
parent 06f0821bcf
commit f7219329ca
235 changed files with 1263 additions and 1255 deletions

View File

@@ -373,7 +373,7 @@ GLOBAL_LIST_EMPTY(legacy_globals)
GLOB.legacy_globals["cameranet"] = cameranet
GLOB.legacy_globals["cultnet"] = cultnet
GLOB.legacy_globals["item_tf_spawnpoints"] = item_tf_spawnpoints
GLOB.legacy_globals["existing_solargrubs"] = existing_solargrubs
GLOB.legacy_globals["existing_solargrubs"] = GLOB.existing_solargrubs
*/
var/global/list/selectable_footstep = list(

View File

@@ -3,39 +3,39 @@
*/
var/global/list/hair_accesories_list= list()// Stores /datum/sprite_accessory/hair_accessory indexed by type
var/global/list/negative_traits = list() // Negative custom species traits, indexed by path
var/global/list/neutral_traits = list() // Neutral custom species traits, indexed by path
var/global/list/positive_traits = list() // Positive custom species traits, indexed by path
var/global/list/everyone_traits_positive = list() // Neutral traits available to all species, indexed by path
var/global/list/everyone_traits_neutral = list() // Neutral traits available to all species, indexed by path
var/global/list/everyone_traits_negative = list() // Neutral traits available to all species, indexed by path
var/global/list/traits_costs = list() // Just path = cost list, saves time in char setup
var/global/list/all_traits = list() // All of 'em at once (same instances)
GLOBAL_LIST_EMPTY(negative_traits) // Negative custom species traits, indexed by path
GLOBAL_LIST_EMPTY(neutral_traits) // Neutral custom species traits, indexed by path
GLOBAL_LIST_EMPTY(positive_traits) // Positive custom species traits, indexed by path
GLOBAL_LIST_EMPTY(everyone_traits_positive) // Neutral traits available to all species, indexed by path
GLOBAL_LIST_EMPTY(everyone_traits_neutral) // Neutral traits available to all species, indexed by path
GLOBAL_LIST_EMPTY(everyone_traits_negative) // Neutral traits available to all species, indexed by path
GLOBAL_LIST_EMPTY(traits_costs) // Just path = cost list, saves time in char setup
GLOBAL_LIST_EMPTY(all_traits) // All of 'em at once (same instances)
var/global/list/active_ghost_pods = list()
//Global vars for making the overmap_renamer subsystem.
//Collects all instances by reference of visitable overmap objects of /obj/effect/overmap/visitable like the debris field.
var/global/list/visitable_overmap_object_instances = list()
var/global/list/sensorpreflist = list("Off", "Binary", "Vitals", "Tracking", "No Preference")
GLOBAL_LIST_INIT(sensorpreflist, list("Off", "Binary", "Vitals", "Tracking", "No Preference"))
// Used by the ban panel to determine what departments are offmap departments. All these share an 'offmap roles' ban.
var/global/list/offmap_departments = list(DEPARTMENT_TALON)
GLOBAL_LIST_INIT(offmap_departments, list(DEPARTMENT_TALON))
// Closets have magic appearances
GLOBAL_LIST_EMPTY(closet_appearances)
//stores numeric player size options indexed by name
var/global/list/player_sizes_list = list(
GLOBAL_LIST_INIT(player_sizes_list, list(
"Macro" = RESIZE_HUGE,
"Big" = RESIZE_BIG,
"Normal" = RESIZE_NORMAL,
"Small" = RESIZE_SMALL,
"Tiny" = RESIZE_TINY)
"Tiny" = RESIZE_TINY))
//stores vantag settings indexed by name
//CHOMPEdit start - expanding the vore hud list
var/global/list/vantag_choices_list = list(
GLOBAL_LIST_INIT(vantag_choices_list, list(
VANTAG_NONE = "No Involvement",
VANTAG_VORE = "Be Prey (Any)",
VANTAG_VORE_YE = "Be Prey (Endo)",
@@ -46,7 +46,7 @@ var/global/list/vantag_choices_list = list(
VANTAG_VORE_DD = "Be Pred (Digestion)",
VANTAG_VORE_DA = "Be Pred (Absorption)",
VANTAG_KIDNAP = "Be Kidnapped",
VANTAG_KILL = "Be Killed")
VANTAG_KILL = "Be Killed"))
//CHOMPEdit end
//Blacklist to exclude items from object ingestion. Digestion blacklist located in digest_act_vr.dm
@@ -62,7 +62,7 @@ var/global/list/item_vore_blacklist = list(
/obj/item/clothing/suit/storage/hooded/wintercoat/roiz)
//Classic Vore sounds
var/global/list/classic_vore_sounds = list(
GLOBAL_LIST_INIT(classic_vore_sounds, list(
"Gulp" = 'sound/vore/gulp.ogg',
"Insert" = 'sound/vore/insert.ogg',
"Insertion1" = 'sound/vore/insertion1.ogg',
@@ -79,9 +79,10 @@ var/global/list/classic_vore_sounds = list(
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"Zipper" = 'sound/items/zip.ogg',
"None" = null)
"None" = null
))
var/global/list/classic_release_sounds = list(
GLOBAL_LIST_INIT(classic_release_sounds, list(
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
@@ -90,10 +91,10 @@ var/global/list/classic_release_sounds = list(
"Zipper" = 'sound/items/zip.ogg',
"Splatter" = 'sound/effects/splat.ogg',
"None" = null
)
))
//Poojy's Fancy Sounds
var/global/list/fancy_vore_sounds = list(
GLOBAL_LIST_INIT(fancy_vore_sounds, list(
"Gulp" = 'sound/vore/sunesound/pred/swallow_01.ogg',
"Swallow" = 'sound/vore/sunesound/pred/swallow_02.ogg',
"Insertion1" = 'sound/vore/sunesound/pred/insertion_01.ogg',
@@ -112,9 +113,9 @@ var/global/list/fancy_vore_sounds = list(
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"Zipper" = 'sound/items/zip.ogg',
"None" = null
)
))
var/global/list/fancy_release_sounds = list(
GLOBAL_LIST_INIT(fancy_release_sounds, list(
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
@@ -125,9 +126,9 @@ var/global/list/fancy_release_sounds = list(
"Pred Escape" = 'sound/vore/sunesound/pred/escape.ogg',
"Splatter" = 'sound/effects/splat.ogg',
"None" = null
)
))
var/global/list/global_vore_egg_types = list(
GLOBAL_LIST_INIT(global_vore_egg_types, list(
"Unathi",
"Tajara",
"Akula",
@@ -160,7 +161,8 @@ var/global/list/global_vore_egg_types = list(
"Purple",
"Red",
"Rainbow",
"Spotted Pink")
"Spotted Pink"
))
var/global/list/tf_vore_egg_types = list(
"Unathi" = /obj/item/storage/vore_egg/unathi,
@@ -281,16 +283,16 @@ var/global/list/edible_trash = list(/obj/item/broken_device,
/obj/item/card/id
)
var/global/list/contamination_flavors = list(
"Generic" = contamination_flavors_generic,
"Acrid" = contamination_flavors_acrid,
"Dirty" = contamination_flavors_dirty,
"Musky" = contamination_flavors_musky,
"Smelly" = contamination_flavors_smelly,
"Slimy" = contamination_flavors_slimy,
"Wet" = contamination_flavors_wet)
GLOBAL_LIST_INIT(contamination_flavors, list(
"Generic" = GLOB.contamination_flavors_generic,
"Acrid" = GLOB.contamination_flavors_acrid,
"Dirty" = GLOB.contamination_flavors_dirty,
"Musky" = GLOB.contamination_flavors_musky,
"Smelly" = GLOB.contamination_flavors_smelly,
"Slimy" = GLOB.contamination_flavors_slimy,
"Wet" = GLOB.contamination_flavors_wet))
var/global/list/contamination_flavors_generic = list("acrid",
GLOBAL_LIST_INIT(contamination_flavors_generic, list("acrid",
"bedraggled",
"begrimed",
"churned",
@@ -346,9 +348,9 @@ var/global/list/contamination_flavors_generic = list("acrid",
"unclean",
"unsanitary",
"unsavory",
"yucky")
"yucky"))
var/global/list/contamination_flavors_wet = list("damp",
GLOBAL_LIST_INIT(contamination_flavors_wet, list("damp",
"drenched",
"drippy",
"gloppy",
@@ -367,9 +369,9 @@ var/global/list/contamination_flavors_wet = list("damp",
"sopping",
"squashy",
"squishy",
"sticky")
"sticky"))
var/global/list/contamination_flavors_smelly = list("disgusting",
GLOBAL_LIST_INIT(contamination_flavors_smelly, list("disgusting",
"filthy",
"foul",
"funky",
@@ -390,9 +392,9 @@ var/global/list/contamination_flavors_smelly = list("disgusting",
"stinky",
"unsavory",
"whiffy",
"yucky")
"yucky"))
var/global/list/contamination_flavors_acrid = list("acrid",
GLOBAL_LIST_INIT(contamination_flavors_acrid, list("acrid",
"caustic",
"churned",
"chymous",
@@ -431,9 +433,9 @@ var/global/list/contamination_flavors_acrid = list("acrid",
"sticky",
"tainted",
"unsavory",
"yucky")
"yucky"))
var/global/list/contamination_flavors_dirty = list("bedraggled",
GLOBAL_LIST_INIT(contamination_flavors_dirty, list("bedraggled",
"begrimed",
"besmirched",
"blemished",
@@ -467,9 +469,9 @@ var/global/list/contamination_flavors_dirty = list("bedraggled",
"tarnished",
"unclean",
"unsanitary",
"unsavory")
"unsavory"))
var/global/list/contamination_flavors_musky = list("drenched",
GLOBAL_LIST_INIT(contamination_flavors_musky, list("drenched",
"drippy",
"funky",
"gooey",
@@ -489,9 +491,9 @@ var/global/list/contamination_flavors_musky = list("drenched",
"squashy",
"squishy",
"sticky",
"tainted")
"tainted"))
var/global/list/contamination_flavors_slimy = list("slimy",
GLOBAL_LIST_INIT(contamination_flavors_slimy, list("slimy",
"sloppy",
"drippy",
"glistening",
@@ -504,9 +506,10 @@ var/global/list/contamination_flavors_slimy = list("slimy",
"glutinous",
"syrupy",
"slippery",
"gelatinous")
"gelatinous"
))
var/global/list/contamination_colors = list("green",
GLOBAL_LIST_INIT(contamination_colors, list("green",
"white",
"black",
"grey",
@@ -520,10 +523,11 @@ var/global/list/contamination_colors = list("green",
"darkred",
"cyan",
"beige",
"pink")
"pink"
))
//For the mechanic of leaving remains. Ones listed below are basically ones that got no bones or leave no trace after death.
var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
GLOBAL_LIST_INIT(remainless_species, list(SPECIES_PROMETHEAN,
SPECIES_DIONA,
SPECIES_ALRAUNE,
SPECIES_PROTEAN,
@@ -544,9 +548,9 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
SPECIES_XENO_QUEEN,
SPECIES_SHADOW,
SPECIES_GOLEM, //Some special species that may or may not be ever used in event too,
SPECIES_SHADEKIN) //Shadefluffers just poof away
SPECIES_SHADEKIN)) //Shadefluffers just poof away
/var/global/list/alt_titles_with_icons = list(
GLOBAL_LIST_INIT(alt_titles_with_icons, list(
JOB_ALT_VIROLOGIST,
JOB_ALT_APPRENTICE_ENGINEER,
JOB_ALT_MEDICAL_INTERN,
@@ -556,9 +560,9 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
JOB_ALT_JR_EXPLORER, //CHOMP explo keep
JOB_ALT_SERVER,
JOB_ALT_ELECTRICIAN,
JOB_ALT_BARISTA)
JOB_ALT_BARISTA))
/var/global/list/existing_solargrubs = list()
GLOBAL_LIST_EMPTY(existing_solargrubs)
/hook/startup/proc/init_vore_datum_ref_lists()
var/paths
@@ -576,33 +580,33 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
if(!instance.name)
continue //A prototype or something
var/cost = instance.cost
traits_costs[path] = cost
all_traits[path] = instance
GLOB.traits_costs[path] = cost
GLOB.all_traits[path] = instance
// Traitgenes Initilize trait genes
setupgenetics(all_traits)
setupgenetics(GLOB.all_traits)
// Shakey shakey shake
sortTim(all_traits, GLOBAL_PROC_REF(cmp_trait_datums_name), associative = TRUE)
sortTim(GLOB.all_traits, GLOBAL_PROC_REF(cmp_trait_datums_name), associative = TRUE)
// Split 'em up
for(var/traitpath in all_traits)
var/datum/trait/T = all_traits[traitpath]
for(var/traitpath in GLOB.all_traits)
var/datum/trait/T = GLOB.all_traits[traitpath]
var/category = T.category
if(!T.hidden) // Traitgenes forbid hidden traits from showing, done to hide genetics only traits
switch(category)
if(-INFINITY to -0.1)
negative_traits[traitpath] = T
GLOB.negative_traits[traitpath] = T
if(!(T.custom_only))
everyone_traits_negative[traitpath] = T
GLOB.everyone_traits_negative[traitpath] = T
if(0)
neutral_traits[traitpath] = T
GLOB.neutral_traits[traitpath] = T
if(!(T.custom_only))
everyone_traits_neutral[traitpath] = T
GLOB.everyone_traits_neutral[traitpath] = T
if(0.1 to INFINITY)
positive_traits[traitpath] = T
GLOB.positive_traits[traitpath] = T
if(!(T.custom_only))
everyone_traits_positive[traitpath] = T
GLOB.everyone_traits_positive[traitpath] = T
// Weaver recipe stuff
@@ -611,19 +615,19 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
var/datum/weaver_recipe/instance = new path()
if(!instance.title)
continue //A prototype or something
weavable_structures[instance.title] = instance
GLOB.weavable_structures[instance.title] = instance
paths = subtypesof(/datum/weaver_recipe/item)
for(var/path in paths)
var/datum/weaver_recipe/instance = new path()
if(!instance.title)
continue //A prototype or something
weavable_items[instance.title] = instance
GLOB.weavable_items[instance.title] = instance
return 1 // Hooks must return 1
var/global/list/weavable_structures = list()
var/global/list/weavable_items = list()
GLOBAL_LIST_EMPTY(weavable_structures)
GLOBAL_LIST_EMPTY(weavable_items)
var/global/list/xenobio_metal_materials_normal = list(
@@ -967,7 +971,7 @@ var/global/list/event_wildlife_roaming = list(
)
var/global/list/selectable_speech_bubbles = list(
GLOBAL_LIST_INIT(selectable_speech_bubbles, list(
"default",
"normal",
"slime",
@@ -1003,7 +1007,8 @@ var/global/list/selectable_speech_bubbles = list(
"notepad",
"science",
"engineering",
"cargo")
"cargo"
))

View File

@@ -77,7 +77,7 @@
return list(1,0,0, 0,1,0, 0,0,1, power,power,power)
/var/list/delta_index = list(
GLOBAL_LIST_INIT(delta_index, list(
0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,
0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,
0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,
@@ -88,7 +88,7 @@
2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8,
4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0,
7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8,
10.0)
10.0))
//Exxagerates or removes brightness
/proc/color_contrast(value)
@@ -102,9 +102,9 @@
else
x = value % 1
if(x == 0)
x = delta_index[value]
x = GLOB.delta_index[value]
else
x = delta_index[value] * (1-x) + delta_index[value+1] * x//use linear interpolation for more granularity.
x = GLOB.delta_index[value] * (1-x) + GLOB.delta_index[value+1] * x//use linear interpolation for more granularity.
x = x * 127 + 127
var/mult = x / 127

View File

@@ -1,7 +1,7 @@
var/church_name = null
GLOBAL_VAR(church_name)
/proc/church_name()
if (church_name)
return church_name
if (GLOB.church_name)
return GLOB.church_name
var/name = ""
@@ -25,10 +25,10 @@ var/church_name = null
return name
var/religion_name = null
GLOBAL_VAR(religion_name)
/proc/religion_name()
if (religion_name)
return religion_name
if (GLOB.religion_name)
return GLOB.religion_name
var/name = ""
@@ -111,10 +111,10 @@ var/religion_name = null
return name
var/syndicate_name = null
GLOBAL_VAR(syndicate_name)
/proc/syndicate_name()
if (syndicate_name)
return syndicate_name
if (GLOB.syndicate_name)
return GLOB.syndicate_name
var/name = ""
@@ -138,13 +138,13 @@ var/syndicate_name = null
name += pick("-", "*", "")
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
syndicate_name = name
GLOB.syndicate_name = name
return name
//Traitors and traitor silicons will get these. Revs will not.
var/syndicate_code_phrase//Code phrase for traitors.
var/syndicate_code_response//Code response for traitors.
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
/*
Should be expanded.
@@ -173,7 +173,7 @@ var/syndicate_code_response//Code response for traitors.
var/safety[] = list(1,2,3)//Tells the proc which options to remove later on.
var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","redwine","moonshine")
var/locations[] = teleportlocs.len ? teleportlocs : drinks//if null, defaults to drinks instead.
var/locations[] = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks//if null, defaults to drinks instead.
var/names[] = list()
for(var/datum/data/record/t in data_core.general)//Picks from crew manifest.