var/global/list -> GLOB. conversion (#17928)

* These two are easy

* !!!runlevel_flags

the fact it was global.runlevel_flags.len has me a bit...iffy on this.

* !!!json_cache

Same as above. used global.

* player_list & observer_mob_list

* mechas_list

* this wasn't even used

* surgery_steps

* event_triggers

* landmarks_list

* dead_mob_list

* living_mob_list

* ai_list

* cable_list

* cleanbot_reserved_turfs

* listening_objects

* silicon_mob_list

* human_mob_list

* Update global_lists.dm

* joblist

* mob_list

* Update global_lists.dm

* holomap_markers

* mapping_units

* mapping_beacons

* hair_styles_list

* facial_hair_styles_list

* Update global_lists.dm

* facial_hair_styles_male_list

* facial_hair_styles_female_list

* body_marking_styles_list

* body_marking_nopersist_list

* ear_styles_list

* hair_styles_male_list

* tail_styles_list

* wing_styles_list

* escape_list & rune_list & endgame_exits

these were all really small

* endgame_safespawns

* stool_cache

* emotes_by_key

* random_maps & map_count

* item_tf_spawnpoints

* narsie_list

* active_radio_jammers

* unused

* paikeys

* pai_software_by_key & default_pai_software

* plant_seed_sprites

* magazine_icondata_keys  & magazine_icondata_states

* unused

* ashtray_cache

* light_type_cache

* HOLIDAY!!!

this one was annoying

* faction stuff (red?!)

* Update preferences_factions.dm

* vs edit removal

* backbaglist, pdachoicelist, exclude_jobs

* item_digestion_blacklist, edible_tech, blacklisted_artifact_effect, selectable_footstep, hexNums, syndicate_access

* string_slot_flags and hexdigits->hexNums

* possible_changeling_IDs

* vr_mob_tf_options

* vr_mob_spawner_options

* pipe_colors

* vr_mob_spawner_options

* common_tools

* newscaster_standard_feeds

* Update periodic_news.dm

* changeling_fabricated_clothing

* semirandom_mob_spawner_decisions

* id_card_states

* Update syndicate_ids.dm

* overlay_cache & gear_distributed_to

* more

* radio_channels_by_freq

* Update global_lists.dm

* proper

* default_medbay_channels & default_internal_channels

default_internal_channels is weird as it has a mapbased proc() but that proc is never called...

* valid_ringtones

* move this

* possible_plants

* more

* separate these

moves xeno2chemlist from a hook to a new global list.

* tube_dir_list

* valid_bloodreagents & monitor_states

* Junk

* valid_bloodtypes

* breach_burn_descriptors & burn

* more!!

appliance_available_recipes seems uber cursed, re-look at later

* Appliance code is cursed

* wide_chassis & flying_chassis

* allows_eye_color

* all_tooltip_styles

* direction_table

* gun_choices

* severity_to_string

* old event_viruses

* description_icons

* MOVE_KEY_MAPPINGS

* more more

* pai & robot modules

* Update global_lists.dm

* GEOSAMPLES

Also swaps a .len to LAZYLEN()

* shieldgens

* reagent recipies

* global ammo types

* rad collector

* old file and unused global

* nif_look_messages

* FESH

* nifsoft

* chamelion

* the death of sortAtom

* globulins

* lazylen that

* Update global_lists.dm

* LAZY

* Theese too

* quick fix

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-07-14 20:14:31 +02:00
committed by GitHub
co-authored by Kashargul
parent f6ccd518ac
commit 84dc5535dc
407 changed files with 2463 additions and 2473 deletions
+1 -8
View File
@@ -9,13 +9,6 @@
active_power_usage = 5
var/interference = FALSE
var/icon/plant = null
var/global/list/possible_plants = list(
"plant-1",
"plant-10",
"plant-09",
"plant-15",
"plant-13"
)
/obj/machinery/holoplant/Initialize(mapload)
. = ..()
@@ -82,7 +75,7 @@
/obj/machinery/holoplant/proc/prepare_icon(var/state)
if(!state)
state = pick(possible_plants)
state = pick(GLOB.possible_plants)
var/plant_icon = icon(icon, state)
return getHologramIcon(plant_icon, 0)
+2 -2
View File
@@ -1493,8 +1493,8 @@
/obj/structure/sign/calendar/examine(mob/user)
. = ..()
. += "The calendar shows that the date is [stationdate2text()]."
if (Holiday.len)
. += "Today is " + span_bold(span_green("[english_list(Holiday)]")) + "."
if (GLOB.Holiday.len)
. += "Today is " + span_bold(span_green("[english_list(GLOB.Holiday)]")) + "."
/obj/structure/sign/explosive
name = "\improper HIGH EXPLOSIVES sign"
@@ -46,20 +46,20 @@
cut_overlays()
// Base icon.
var/cache_key = "[base_icon]-[material.name]"
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, base_icon)
if(applies_material_colour) //VOREStation Add - Goes with added var
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
// Padding overlay.
if(padding_material)
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
if(isnull(stool_cache[padding_cache_key]))
if(isnull(GLOB.stool_cache[padding_cache_key]))
var/image/I = image(icon, "[base_icon]_padding")
I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
GLOB.stool_cache[padding_cache_key] = I
add_overlay(GLOB.stool_cache[padding_cache_key])
// Strings.
desc = initial(desc)
if(padding_material)
@@ -43,14 +43,14 @@
..()
if(has_buckled_mobs())
var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]"
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, "[base_icon]_armrest")
I.plane = MOB_PLANE
I.layer = ABOVE_MOB_LAYER
if(padding_material)
I.color = padding_material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
/obj/structure/bed/chair/proc/update_layer()
if(src.dir == NORTH)
@@ -329,14 +329,14 @@
/obj/structure/bed/chair/sofa/corner/update_icon()
..()
var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]-permanent"
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, "[base_icon]_armrest")
I.plane = MOB_PLANE
I.layer = ABOVE_MOB_LAYER
if(padding_material)
I.color = padding_material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
// Wooden nonsofa - no corners
/obj/structure/bed/chair/sofa/pew
@@ -54,66 +54,66 @@
// Base icon (base material color)
var/cache_key = "[base_icon]-[material.name]"
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, base_icon)
if(applies_material_colour)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
// Padding ('_padding') (padding material color)
if(padding_material)
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
if(isnull(stool_cache[padding_cache_key]))
if(isnull(GLOB.stool_cache[padding_cache_key]))
var/image/I = image(icon, "[base_icon]_padding")
I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
GLOB.stool_cache[padding_cache_key] = I
add_overlay(GLOB.stool_cache[padding_cache_key])
// Over ('_over') (base material color)
cache_key = "[base_icon]-[material.name]-over"
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, "[base_icon]_over")
I.plane = MOB_PLANE
I.layer = ABOVE_MOB_LAYER
if(applies_material_colour)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
// Padding Over ('_padding_over') (padding material color)
if(padding_material)
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]-over"
if(isnull(stool_cache[padding_cache_key]))
if(isnull(GLOB.stool_cache[padding_cache_key]))
var/image/I = image(icon, "[base_icon]_padding_over")
I.color = padding_material.icon_colour
I.plane = MOB_PLANE
I.layer = ABOVE_MOB_LAYER
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
GLOB.stool_cache[padding_cache_key] = I
add_overlay(GLOB.stool_cache[padding_cache_key])
if(has_buckled_mobs())
if(padding_material)
cache_key = "[base_icon]-armrest-[padding_material.name]"
// Armrest ('_armrest') (base material color)
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, "[base_icon]_armrest")
I.plane = MOB_PLANE
I.layer = ABOVE_MOB_LAYER
if(applies_material_colour)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
if(padding_material)
cache_key = "[base_icon]-padding-armrest-[padding_material.name]"
// Padding Armrest ('_padding_armrest') (padding material color)
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, "[base_icon]_padding_armrest")
I.plane = MOB_PLANE
I.layer = ABOVE_MOB_LAYER
I.color = padding_material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
/obj/structure/bed/chair/bay/chair
name = "mounted chair"
@@ -1,5 +1,4 @@
//Todo: add leather and cloth for arbitrary coloured stools.
var/global/list/stool_cache = list() //haha stool
/obj/item/stool
name = "stool"
@@ -40,19 +39,19 @@ var/global/list/stool_cache = list() //haha stool
cut_overlays()
// Base icon.
var/cache_key = "[base_icon]-[material.name]"
if(isnull(stool_cache[cache_key]))
if(isnull(GLOB.stool_cache[cache_key]))
var/image/I = image(icon, base_icon)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
GLOB.stool_cache[cache_key] = I
add_overlay(GLOB.stool_cache[cache_key])
// Padding overlay.
if(padding_material)
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
if(isnull(stool_cache[padding_cache_key]))
if(isnull(GLOB.stool_cache[padding_cache_key]))
var/image/I = image(icon, "[base_icon]_padding") //VOREStation Edit
I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
GLOB.stool_cache[padding_cache_key] = I
add_overlay(GLOB.stool_cache[padding_cache_key])
// Strings.
if(padding_material)
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
+6 -14
View File
@@ -13,13 +13,6 @@
var/exit_delay = 2
var/enter_delay = 1
// GLOB.alldirs in global.dm is the same list of directions, but since
// the specific order matters to get a usable icon_state, it is
// copied here so that, in the unlikely case that GLOB.alldirs is changed,
// this continues to work.
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
// A place where tube pods stop, and people can get in or out.
// Mappers: use "Generate Instances from Directions" for this
// one.
@@ -439,7 +432,7 @@
var/list/connected = list()
var/list/connected_auto = list()
for(var/direction in tube_dir_list)
for(var/direction in GLOB.tube_dir_list)
var/location = get_step(loc, direction)
for(var/obj/structure/transit_tube/tube in location)
if(tube.directions() == null && tube.icon_state == "auto")
@@ -454,7 +447,7 @@
tube_dirs = select_automatic_dirs(connected)
if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2]))
if(length(tube_dirs) == 2 && GLOB.tube_dir_list.Find(tube_dirs[1]) > GLOB.tube_dir_list.Find(tube_dirs[2]))
tube_dirs.Swap(1, 2)
generate_automatic_corners(tube_dirs)
@@ -527,10 +520,9 @@
// but it is probably safer to assume the existence of, and
// rely on, a sufficiently smart compiler/optimizer.
/obj/structure/transit_tube/proc/parse_dirs(text)
var/global/list/direction_table = list()
if(text in direction_table)
return direction_table[text]
if(text in GLOB.direction_table)
return GLOB.direction_table[text]
var/list/split_text = splittext(text, "-")
@@ -538,7 +530,7 @@
// a purely decorative tube, and doesn't actually
// connect to anything.
if(split_text[1] == "D")
direction_table[text] = list()
GLOB.direction_table[text] = list()
return null
var/list/directions = list()
@@ -549,7 +541,7 @@
if(direction > 0)
directions += direction
direction_table[text] = directions
GLOB.direction_table[text] = directions
return directions
+8 -19
View File
@@ -17,17 +17,6 @@
//These are types that can only spawn once, and then will be removed from this list.
//Alpha and beta lists are in their respective procs.
var/global/list/unique_gamma = list(
/obj/item/perfect_tele,
/obj/item/bluespace_harpoon,
/obj/item/clothing/glasses/thermal/syndi,
/obj/item/gun/energy/netgun,
/obj/item/gun/projectile/dartgun,
/obj/item/clothing/gloves/black/bloodletter,
/obj/item/gun/energy/mouseray/metamorphosis
)
var/global/list/allocated_gamma = list()
/obj/structure/trash_pile/Initialize(mapload)
. = ..()
@@ -53,12 +42,12 @@
/obj/structure/trash_pile/attackby(obj/item/W as obj, mob/user as mob)
var/w_type = W.type
if(w_type in allocated_gamma)
if(w_type in GLOB.allocated_gamma)
to_chat(user,span_notice("You feel \the [W] slip from your hand, and disappear into the trash pile."))
user.unEquip(W)
W.forceMove(src)
allocated_gamma -= w_type
unique_gamma += w_type
GLOB.allocated_gamma -= w_type
GLOB.unique_gamma += w_type
qdel(W)
else
@@ -332,18 +321,18 @@
return I
/obj/structure/trash_pile/proc/produce_gamma_item()
var/path = pick_n_take(unique_gamma)
var/path = pick_n_take(GLOB.unique_gamma)
if(!path) //Tapped out, reallocate?
for(var/P in allocated_gamma)
var/obj/item/I = allocated_gamma[P]
for(var/P in GLOB.allocated_gamma)
var/obj/item/I = GLOB.allocated_gamma[P]
if(QDELETED(I) || istype(I.loc,/obj/machinery/computer/cryopod))
allocated_gamma -= P
GLOB.allocated_gamma -= P
path = P
break
if(path)
var/obj/item/I = new path()
allocated_gamma[path] = I
GLOB.allocated_gamma[path] = I
return I
else
return produce_beta_item()