From ba01722b310806cd2de63bc79772b45f9bfdbec4 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sun, 8 Feb 2026 17:16:37 -0700 Subject: [PATCH] [MIRROR] next set of globals (#12399) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/ATMOSPHERICS/_atmos_setup.dm | 2 - code/ATMOSPHERICS/atmospherics.dm | 22 ++----- .../components/binary_devices/dp_vent_pump.dm | 35 +++++----- .../components/binary_devices/passive_gate.dm | 14 ++-- .../components/binary_devices/pump.dm | 14 ++-- .../components/binary_devices/volume_pump.dm | 14 ++-- .../components/omni_devices/omni_base.dm | 22 +++---- .../components/portables_connector.dm | 12 ++-- .../trinary_devices/trinary_base.dm | 18 ++--- code/ATMOSPHERICS/components/tvalve.dm | 18 ++--- .../components/unary/outlet_injector.dm | 12 ++-- .../components/unary/vent_pump.dm | 27 ++++---- .../components/unary/vent_scrubber.dm | 27 ++++---- code/ATMOSPHERICS/components/valve.dm | 14 ++-- code/ATMOSPHERICS/pipes/cap.dm | 5 +- code/ATMOSPHERICS/pipes/manifold.dm | 7 +- code/ATMOSPHERICS/pipes/manifold4w.dm | 7 +- code/ATMOSPHERICS/pipes/simple.dm | 7 +- code/ATMOSPHERICS/pipes/tank.dm | 12 ++-- code/ATMOSPHERICS/pipes/universal.dm | 16 ++--- code/__defines/admin_ch.dm | 4 -- code/__defines/admin_verb.dm | 5 ++ code/__defines/damage_organs.dm | 19 ++++++ code/__defines/machinery.dm | 3 - code/__defines/time.dm | 3 + code/_global_vars/__unsorted.dm | 3 + code/_global_vars/time_vars.dm | 2 +- code/_helpers/_global_objects.dm | 14 ++++ code/_helpers/_global_objects_vr.dm | 1 - code/_helpers/global_lists.dm | 23 +++---- code/_helpers/roundend.dm | 2 +- code/controllers/admin.dm | 3 +- .../emergency_shuttle_controller.dm | 6 +- code/controllers/subsystems/alarm.dm | 2 +- code/controllers/subsystems/internal_wiki.dm | 4 +- code/controllers/subsystems/statpanel.dm | 4 +- code/controllers/subsystems/tgui.dm | 2 +- code/controllers/subsystems/ticker.dm | 4 +- code/datums/autolathe/autolathe.dm | 8 +-- .../antags/changeling/powers/hivemind.dm | 9 ++- code/game/area/areas.dm | 6 +- code/game/gamemodes/cult/narsie.dm | 6 +- code/game/gamemodes/cult/runes.dm | 6 +- .../endgame/supermatter_cascade/universe.dm | 4 +- code/game/gamemodes/game_mode.dm | 10 +-- code/game/gamemodes/game_mode_latespawn.dm | 4 +- code/game/gamemodes/newobjective.dm | 12 ++-- code/game/gamemodes/nuclear/nuclear.dm | 2 +- code/game/gamemodes/objective.dm | 8 +-- code/game/gamemodes/sandbox/sandbox.dm | 2 +- .../gamemodes/technomancer/spells/gambit.dm | 4 +- code/game/machinery/camera/camera.dm | 6 +- code/game/machinery/camera/motion.dm | 4 +- code/game/machinery/computer/atmos_alert.dm | 14 ++-- code/game/machinery/computer/shuttle.dm | 10 +-- .../machinery/computer/specops_shuttle.dm | 66 +++++++++---------- code/game/machinery/fire_alarm.dm | 4 +- code/game/machinery/floor_light.dm | 14 ++-- code/game/machinery/status_display.dm | 16 ++--- .../circuitboards/computer/camera_monitor.dm | 2 +- .../objects/items/weapons/storage/misc.dm | 6 +- .../game/objects/items/weapons/tanks/tanks.dm | 8 +-- code/game/objects/structures/girders.dm | 6 +- code/game/turfs/flooring/flooring.dm | 15 ++--- code/game/turfs/simulated/floor.dm | 2 +- code/game/turfs/simulated/floor_attackby.dm | 4 +- code/game/turfs/simulated/outdoors/grass.dm | 1 - code/modules/admin/admin_verbs.dm | 2 +- code/modules/admin/player_panel.dm | 12 ++-- code/modules/admin/topic.dm | 28 ++++---- code/modules/admin/verbs/randomverbs.dm | 18 ++--- .../loadout/loadout_accessories.dm | 2 +- .../loadout/loadout_fluffitems.dm | 2 +- .../modules/materials/materials/_materials.dm | 19 ++---- code/modules/mob/dead/observer/observer.dm | 4 +- .../mob/living/carbon/alien/diona/diona.dm | 6 +- code/modules/mob/living/carbon/alien/emote.dm | 6 +- code/modules/mob/living/carbon/brain/emote.dm | 6 +- code/modules/mob/living/carbon/human/emote.dm | 22 +++---- code/modules/mob/living/carbon/human/human.dm | 4 +- .../species/station/protean/protean_blob.dm | 4 +- code/modules/mob/living/silicon/ai/ai.dm | 4 +- code/modules/mob/living/silicon/emote.dm | 12 ++-- .../modules/mob/living/silicon/robot/emote.dm | 10 ++- code/modules/mob/living/silicon/silicon.dm | 4 +- .../subtypes/animal/alien animals/synx.dm | 2 +- .../subtypes/vore/shadekin/types.dm | 2 +- code/modules/mob/living/voice/voice.dm | 2 +- code/modules/organs/robolimbs_vr.dm | 20 +----- code/modules/power/apc.dm | 12 ++-- .../research/tg/machinery/_production.dm | 2 +- code/modules/scripting/Options.dm | 31 +++++---- code/modules/shuttles/escape_pods.dm | 8 +-- code/modules/shuttles/shuttle_emergency.dm | 26 ++++---- code/modules/spells/spell_code.dm | 2 - code/modules/tgui/modules/alarm.dm | 4 +- code/modules/tgui/modules/communications.dm | 40 +++++------ code/modules/tgui/modules/late_choices.dm | 6 +- code/modules/unit_tests/material_tests.dm | 5 +- code/modules/ventcrawl/ventcrawl.dm | 11 +--- .../ventcrawl/ventcrawl_atmospherics.dm | 4 +- code/modules/vore/eating/living_vr.dm | 4 +- maps/common/common_things.dm | 2 +- .../code/game/objects/items/weapons/RCD.dm | 2 +- .../code/modules/mob/living/emote.dm | 9 --- vorestation.dme | 2 - 106 files changed, 482 insertions(+), 547 deletions(-) delete mode 100644 code/_helpers/_global_objects_vr.dm delete mode 100644 modular_chomp/code/modules/mob/living/emote.dm diff --git a/code/ATMOSPHERICS/_atmos_setup.dm b/code/ATMOSPHERICS/_atmos_setup.dm index 9ee93f41f6..4b8373a567 100644 --- a/code/ATMOSPHERICS/_atmos_setup.dm +++ b/code/ATMOSPHERICS/_atmos_setup.dm @@ -6,8 +6,6 @@ // atmospherics devices. //-------------------------------------------- -GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE)) - /proc/pipe_color_lookup(var/color) for(var/C in GLOB.pipe_colors) if(color == GLOB.pipe_colors[C]) diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 1f598436a7..aba125e7b8 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -38,8 +38,6 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/Initialize(mapload, newdir) . = ..() - if(!icon_manager) - icon_manager = new() if(!isnull(newdir)) set_dir(newdir) if(!pipe_color) @@ -91,28 +89,16 @@ Pipelines + Other Objects -> Pipe network if(node) if(!T.is_plating() && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) //underlays += icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node)) - underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) + underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) else //underlays += icon_manager.get_atmos_icon("underlay_intact", direction, color_cache_name(node)) - underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type) + underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type) else //underlays += icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color) - underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type) + underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type) /obj/machinery/atmospherics/proc/update_underlays() - if(check_icon_cache()) - return 1 - else - return 0 - -/obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0) - if(!istype(icon_manager)) - if(!safety) //to prevent infinite loops - icon_manager = new() - check_icon_cache(1) - return 0 - - return 1 + return TRUE /obj/machinery/atmospherics/proc/color_cache_name(var/obj/machinery/atmospherics/node) //Don't use this for standard pipes diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index 3fa56b7da8..efde351896 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -64,9 +64,6 @@ air2.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800 /obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - cut_overlays() var/vent_icon = "vent" @@ -83,25 +80,25 @@ else vent_icon += "[use_power ? "[pump_direction ? "out" : "in"]" : "off"]" - add_overlay(icon_manager.get_atmos_icon("device", , , vent_icon)) + add_overlay(GLOB.icon_manager.get_atmos_icon("device", , , vent_icon)) /obj/machinery/atmospherics/binary/dp_vent_pump/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - if(!T.is_plating() && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe)) - return + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + if(!T.is_plating() && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe)) + return + else + if (node1) + add_underlay(T, node1, turn(dir, -180), node1.icon_connect_type) else - if (node1) - add_underlay(T, node1, turn(dir, -180), node1.icon_connect_type) - else - add_underlay(T, node1, turn(dir, -180)) - if (node2) - add_underlay(T, node2, dir, node2.icon_connect_type) - else - add_underlay(T, node2, dir) + add_underlay(T, node1, turn(dir, -180)) + if (node2) + add_underlay(T, node2, dir, node2.icon_connect_type) + else + add_underlay(T, node2, dir) /obj/machinery/atmospherics/binary/dp_vent_pump/hide(var/i) update_icon() diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index 9ac395439d..cb39381e4b 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -42,13 +42,13 @@ icon_state = (unlocked && flowing)? "on" : "off" /obj/machinery/atmospherics/binary/passive_gate/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node1, turn(dir, 180)) - add_underlay(T, node2, dir) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node1, turn(dir, 180)) + add_underlay(T, node2, dir) /obj/machinery/atmospherics/binary/passive_gate/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 5f0e321763..552065ee92 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -80,13 +80,13 @@ Thus, the two variables affect pump operation are set in New(): icon_state = "[use_power ? "[base_icon]-on" : "[base_icon]-off"]" /obj/machinery/atmospherics/binary/pump/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type) - add_underlay(T, node2, dir, node2?.icon_connect_type) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type) + add_underlay(T, node2, dir, node2?.icon_connect_type) /obj/machinery/atmospherics/binary/pump/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 4945a83cd9..e0cd6f58f2 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -88,13 +88,13 @@ Thus, the two variables affect pump operation are set in New(): cut_overlay(overclock_overlay) /obj/machinery/atmospherics/binary/volume_pump/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type) - add_underlay(T, node2, dir, node2?.icon_connect_type) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type) + add_underlay(T, node2, dir, node2?.icon_connect_type) /obj/machinery/atmospherics/binary/volume_pump/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index f3f7123151..8586ab9b98 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -106,9 +106,6 @@ return /obj/machinery/atmospherics/omni/proc/build_icons() - if(!check_icon_cache()) - return - var/core_icon = null if(istype(src, /obj/machinery/atmospherics/omni/mixer)) core_icon = "mixer" @@ -119,16 +116,13 @@ //directional icons are layers 1-4, with the core icon on layer 5 if(core_icon) - overlays_off[5] = icon_manager.get_atmos_icon("omni", , , core_icon) - overlays_on[5] = icon_manager.get_atmos_icon("omni", , , core_icon + "_glow") + overlays_off[5] = GLOB.icon_manager.get_atmos_icon("omni", , , core_icon) + overlays_on[5] = GLOB.icon_manager.get_atmos_icon("omni", , , core_icon + "_glow") - overlays_error[1] = icon_manager.get_atmos_icon("omni", , , core_icon) - overlays_error[2] = icon_manager.get_atmos_icon("omni", , , "error") + overlays_error[1] = GLOB.icon_manager.get_atmos_icon("omni", , , core_icon) + overlays_error[2] = GLOB.icon_manager.get_atmos_icon("omni", , , "error") /obj/machinery/atmospherics/omni/proc/update_port_icons() - if(!check_icon_cache()) - return - for(var/datum/omni_port/P in ports) if(P.update) var/ref_layer = 0 @@ -179,8 +173,8 @@ ic_on += "_filter" ic_off += "_out" - ic_on = icon_manager.get_atmos_icon("omni", , , ic_on) - ic_off = icon_manager.get_atmos_icon("omni", , , ic_off) + ic_on = GLOB.icon_manager.get_atmos_icon("omni", , , ic_on) + ic_off = GLOB.icon_manager.get_atmos_icon("omni", , , ic_off) var/pipe_state var/turf/T = get_turf(src) @@ -188,10 +182,10 @@ return if(!T.is_plating() && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 ) //pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node)) - pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down") + pipe_state = GLOB.icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down") else //pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node)) - pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact") + pipe_state = GLOB.icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact") return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state) diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index e692557d34..8f163cd670 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -42,12 +42,12 @@ icon_state = "connector" /obj/machinery/atmospherics/portables_connector/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node, dir, node?.icon_connect_type) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node, dir, node?.icon_connect_type) /obj/machinery/atmospherics/portables_connector/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index 2365938daa..7312d96433 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -32,15 +32,15 @@ initialize_directions = get_initialize_directions_trinary(dir, mirrored, tee) /obj/machinery/atmospherics/trinary/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - var/list/node_connects = get_node_connect_dirs() - add_underlay(T, node1, node_connects[1]) - add_underlay(T, node2, node_connects[2]) - add_underlay(T, node3, node_connects[3]) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + var/list/node_connects = get_node_connect_dirs() + add_underlay(T, node1, node_connects[1]) + add_underlay(T, node2, node_connects[2]) + add_underlay(T, node3, node_connects[3]) /obj/machinery/atmospherics/trinary/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 904ae90e47..548127f502 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -34,15 +34,15 @@ icon_state = "tvalve[mirrored ? "m" : ""][state]" /obj/machinery/atmospherics/tvalve/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - var/list/node_connects = get_node_connect_dirs() - add_underlay(T, node1, node_connects[1]) - add_underlay(T, node2, node_connects[2]) - add_underlay(T, node3, node_connects[3]) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + var/list/node_connects = get_node_connect_dirs() + add_underlay(T, node1, node_connects[1]) + add_underlay(T, node2, node_connects[2]) + add_underlay(T, node3, node_connects[3]) /obj/machinery/atmospherics/tvalve/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm index 59ca73c9b4..c53456d657 100644 --- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm @@ -42,12 +42,12 @@ icon_state = "[use_power ? "on" : "off"]" /obj/machinery/atmospherics/unary/outlet_injector/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node, dir) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node, dir) /obj/machinery/atmospherics/unary/outlet_injector/power_change() var/old_stat = stat diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index a81e0ff4c9..fe8aaf8369 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -146,9 +146,6 @@ air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //meant to match air injector /obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - cut_overlays() var/vent_icon = "vent" @@ -172,21 +169,21 @@ playsound(src, start_sound, 25, ignore_walls = FALSE, preference = /datum/preference/toggle/air_pump_noise) - add_overlay(icon_manager.get_atmos_icon("device", , , vent_icon)) + add_overlay(GLOB.icon_manager.get_atmos_icon("device", , , vent_icon)) /obj/machinery/atmospherics/unary/vent_pump/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) - return + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + return + else + if(node) + add_underlay(T, node, dir, node.icon_connect_type) else - if(node) - add_underlay(T, node, dir, node.icon_connect_type) - else - add_underlay(T,, dir) + add_underlay(T,, dir) /obj/machinery/atmospherics/unary/vent_pump/hide() update_icon() diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index cf7ca4ae63..98b7c1489f 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -57,9 +57,6 @@ return ..() /obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - cut_overlays() var/scrubber_icon = "scrubber" @@ -75,21 +72,21 @@ else scrubber_icon += "[use_power ? "[scrubbing ? "on" : "in"]" : "off"]" - add_overlay(icon_manager.get_atmos_icon("device", , , scrubber_icon)) + add_overlay(GLOB.icon_manager.get_atmos_icon("device", , , scrubber_icon)) /obj/machinery/atmospherics/unary/vent_scrubber/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) - return + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + return + else + if(node) + add_underlay(T, node, dir, node.icon_connect_type) else - if(node) - add_underlay(T, node, dir, node.icon_connect_type) - else - add_underlay(T,, dir) + add_underlay(T,, dir) /obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index 3ce203140d..3c26d21cb4 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -29,13 +29,13 @@ icon_state = "valve[open]" /obj/machinery/atmospherics/valve/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node1, get_dir(src, node1)) - add_underlay(T, node2, get_dir(src, node2)) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node1, get_dir(src, node1)) + add_underlay(T, node2, get_dir(src, node2)) /obj/machinery/atmospherics/valve/hide(var/i) update_underlays() diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm index 36fe8f2292..e5f731238f 100644 --- a/code/ATMOSPHERICS/pipes/cap.dm +++ b/code/ATMOSPHERICS/pipes/cap.dm @@ -48,13 +48,10 @@ node.update_underlays() /obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - alpha = 255 cut_overlays() - add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "cap[icon_connect_type]")) + add_overlay(GLOB.icon_manager.get_atmos_icon("pipe", , pipe_color, "cap[icon_connect_type]")) /obj/machinery/atmospherics/pipe/cap/atmos_init() for(var/obj/machinery/atmospherics/target in get_step(src, dir)) diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm index a0f7789c7c..101d337501 100644 --- a/code/ATMOSPHERICS/pipes/manifold.dm +++ b/code/ATMOSPHERICS/pipes/manifold.dm @@ -97,14 +97,11 @@ node3.update_underlays() /obj/machinery/atmospherics/pipe/manifold/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - alpha = 255 cut_overlays() - add_overlay(icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)) - add_overlay(icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)) + add_overlay(GLOB.icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)) + add_overlay(GLOB.icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)) underlays.Cut() var/turf/T = get_turf(src) diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm index de31d92fd4..8979693b69 100644 --- a/code/ATMOSPHERICS/pipes/manifold4w.dm +++ b/code/ATMOSPHERICS/pipes/manifold4w.dm @@ -97,14 +97,11 @@ node4.update_underlays() /obj/machinery/atmospherics/pipe/manifold4w/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - alpha = 255 cut_overlays() - add_overlay(icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)) - add_overlay(icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)) + add_overlay(GLOB.icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)) + add_overlay(GLOB.icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)) underlays.Cut() var/turf/T = get_turf(src) diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm index de5a26a8e3..a7c31b1d29 100644 --- a/code/ATMOSPHERICS/pipes/simple.dm +++ b/code/ATMOSPHERICS/pipes/simple.dm @@ -112,17 +112,14 @@ node2.update_underlays() /obj/machinery/atmospherics/pipe/simple/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - alpha = 255 cut_overlays() if(node1 && node2) - add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")) + add_overlay(GLOB.icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")) else - add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")) + add_overlay(GLOB.icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")) /obj/machinery/atmospherics/pipe/simple/update_underlays() return diff --git a/code/ATMOSPHERICS/pipes/tank.dm b/code/ATMOSPHERICS/pipes/tank.dm index c9654a6068..a514451437 100644 --- a/code/ATMOSPHERICS/pipes/tank.dm +++ b/code/ATMOSPHERICS/pipes/tank.dm @@ -37,12 +37,12 @@ return list(node1) /obj/machinery/atmospherics/pipe/tank/update_underlays() - if(..()) - underlays.Cut() - var/turf/T = get_turf(src) - if(!istype(T)) - return - add_underlay(T, node1, dir) + ..() + underlays.Cut() + var/turf/T = get_turf(src) + if(!istype(T)) + return + add_underlay(T, node1, dir) /obj/machinery/atmospherics/pipe/tank/hide() update_underlays() diff --git a/code/ATMOSPHERICS/pipes/universal.dm b/code/ATMOSPHERICS/pipes/universal.dm index e1df93ee67..e5b9907a17 100644 --- a/code/ATMOSPHERICS/pipes/universal.dm +++ b/code/ATMOSPHERICS/pipes/universal.dm @@ -11,13 +11,10 @@ pipe_state = "universal" /obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(var/safety = 0) - if(!check_icon_cache()) - return - alpha = 255 cut_overlays() - add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")) + add_overlay(GLOB.icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")) underlays.Cut() if (node1) @@ -49,13 +46,10 @@ pipe_state = "universal" /obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0) // Doesn't leak. It's a special pipe. - if(!check_icon_cache()) - return - alpha = 255 cut_overlays() - add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")) + add_overlay(GLOB.icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")) underlays.Cut() if (node1) @@ -122,8 +116,8 @@ /obj/machinery/atmospherics/proc/add_underlay_adapter(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type) //modified from add_underlay, does not make exposed underlays if(node) if(!T.is_plating() && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) - underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) + underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) else - underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type) + underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type) else - underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type) + underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type) diff --git a/code/__defines/admin_ch.dm b/code/__defines/admin_ch.dm index fffb04ae29..494b7c7fea 100644 --- a/code/__defines/admin_ch.dm +++ b/code/__defines/admin_ch.dm @@ -3,7 +3,3 @@ #define SMITE_HOTDOG "Hot Dog" #define NEWSFILE "data/news.sav" - -#define TGUI_VIEW_ATTACK_LOGS "Check Player Attack Logs" -#define TGUI_VIEW_DIALOG_LOGS "Check Player Dialogue Logs" -#define TGUI_RESIZE "Resize player" diff --git a/code/__defines/admin_verb.dm b/code/__defines/admin_verb.dm index 27b2209ff8..66b4907552 100644 --- a/code/__defines/admin_verb.dm +++ b/code/__defines/admin_verb.dm @@ -99,3 +99,8 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor // Visibility flags #define ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG "Map-Debug" + +// Tgui input list options +#define TGUI_VIEW_ATTACK_LOGS "Check Player Attack Logs" +#define TGUI_VIEW_DIALOG_LOGS "Check Player Dialogue Logs" +#define TGUI_RESIZE "Resize player" diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index e3e2a646ec..fcccbd2317 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -68,3 +68,22 @@ #define MODULAR_BODYPART_INVALID 0 // Cannot be detached or reattached. #define MODULAR_BODYPART_PROSTHETIC 1 // Can be detached or reattached freely. #define MODULAR_BODYPART_CYBERNETIC 2 // Can be detached or reattached to compatible parent organs. + +//CitRP Port +#define CYBERBEAST_MONITOR_STYLES "blank=cyber_blank;\ + default=cyber_default;\ + eyes=eyes;\ + static=cyber_static;\ + alert=cyber_alert;\ + happy=cyber_happ;\ + unhappy=cyber_unhapp;\ + flat=cyber_flat;\ + sad=cyber_sad;\ + heart=cyber_heart;\ + cross=cyber_cross;\ + wave=cyber_wave;\ + uwu=cyber_uwu;\ + question=cyber_question;\ + lowpower=cyber_lowpower;\ + idle=cyber_idle;\ + nwn=cyber_nwn" diff --git a/code/__defines/machinery.dm b/code/__defines/machinery.dm index 59c92a85d5..72c1950bc5 100644 --- a/code/__defines/machinery.dm +++ b/code/__defines/machinery.dm @@ -93,9 +93,6 @@ #define NETWORK_MAINT_DECK "Maintenance Deck" // CHHOMPAdd End -// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them. -var/list/restricted_camera_networks = list(NETWORK_ERT,NETWORK_MERCENARY,"Secret", NETWORK_COMMUNICATORS, NETWORK_EXPLORATION) - #define TRANSMISSION_WIRE 0 //Is this ever used? I don't think it is. #define TRANSMISSION_RADIO 1 //Radio transmissions (like airlock controller to pump) #define TRANSMISSION_SUBSPACE 2 //Like headsets diff --git a/code/__defines/time.dm b/code/__defines/time.dm index b580e01a1b..fe522d78f3 100644 --- a/code/__defines/time.dm +++ b/code/__defines/time.dm @@ -4,6 +4,9 @@ /// Define that just has the current in-universe year for use in whatever context you might want to display that in. (For example, 2022 -> 2562 given a 540 year offset) #define CURRENT_STATION_YEAR (GLOB.year_integer + STATION_YEAR_OFFSET) +/// Used in the GLOB year and tgui PreInit +#define UTC_YEAR time2text(world.realtime,"YYYY",NO_TIMEZONE) + /// In-universe, SS13 is set 300 years in the future from the real-world day, hence this number for determining the year-offset for the in-game year. #define STATION_YEAR_OFFSET 300 diff --git a/code/_global_vars/__unsorted.dm b/code/_global_vars/__unsorted.dm index c29aad1e81..f1c562e528 100644 --- a/code/_global_vars/__unsorted.dm +++ b/code/_global_vars/__unsorted.dm @@ -86,3 +86,6 @@ GLOBAL_DATUM_INIT(buildmode_hud, /icon, icon('icons/misc/buildmode.dmi')) GLOBAL_LIST_EMPTY(cached_character_icons) GLOBAL_VAR_INIT(triai, FALSE) + +// Pipe colors, needs to be inited before our pipe icon_manager +GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE)) diff --git a/code/_global_vars/time_vars.dm b/code/_global_vars/time_vars.dm index 1b4fc6401a..18bb727bf0 100644 --- a/code/_global_vars/time_vars.dm +++ b/code/_global_vars/time_vars.dm @@ -1,2 +1,2 @@ -GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY")) +GLOBAL_VAR_INIT(year, UTC_YEAR) GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013??? diff --git a/code/_helpers/_global_objects.dm b/code/_helpers/_global_objects.dm index a658bf3cbf..365268d4e0 100644 --- a/code/_helpers/_global_objects.dm +++ b/code/_helpers/_global_objects.dm @@ -1,4 +1,18 @@ GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new) GLOBAL_DATUM_INIT(gear_tweak_implant_location, /datum/gear_tweak/implant_location, new) +GLOBAL_DATUM_INIT(gear_tweak_collar_tag, /datum/gear_tweak/collar_tag, new) + //Underwear GLOBAL_DATUM_INIT(global_underwear, /datum/category_collection/underwear, new) + +//Global Datums +GLOBAL_DATUM_INIT(icon_manager, /datum/pipe_icon_manager, new) +GLOBAL_DATUM_INIT(emergency_shuttle, /datum/emergency_shuttle_controller, new) + +// We manually initialize the alarm handlers instead of looping over all existing types +// to make it possible to write: camera_alarm.triggerAlarm() rather than SSalarm.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof. +GLOBAL_DATUM_INIT(atmosphere_alarm, /datum/alarm_handler/atmosphere, new) +GLOBAL_DATUM_INIT(camera_alarm, /datum/alarm_handler/camera, new) +GLOBAL_DATUM_INIT(fire_alarm, /datum/alarm_handler/fire, new) +GLOBAL_DATUM_INIT(motion_alarm, /datum/alarm_handler/motion, new) +GLOBAL_DATUM_INIT(power_alarm, /datum/alarm_handler/power, new) diff --git a/code/_helpers/_global_objects_vr.dm b/code/_helpers/_global_objects_vr.dm deleted file mode 100644 index 71e7c1ee81..0000000000 --- a/code/_helpers/_global_objects_vr.dm +++ /dev/null @@ -1 +0,0 @@ -var/datum/gear_tweak/collar_tag/gear_tweak_collar_tag = new() diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index b4cc911435..58061125ab 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -22,6 +22,8 @@ GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs ta var/global/list/obj/item/pda/PDAs = list() var/global/list/obj/item/communicator/all_communicators = list() +// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them. +GLOBAL_LIST_INIT(restricted_camera_networks, list(NETWORK_ERT,NETWORK_MERCENARY,"Secret", NETWORK_COMMUNICATORS)) #define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER,HERM) #define all_genders_text_list list("Male","Female","Plural","Neuter","Herm") @@ -634,7 +636,7 @@ var/global/list/assigned_blocks[DNA_SE_LENGTH] GLOBAL_LIST_EMPTY(gear_distributed_to) GLOBAL_LIST_EMPTY(overlay_cache) //cache recent overlays -var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/spell) - list( +GLOBAL_LIST_INIT(all_technomancer_gambit_spells, typesof(/obj/item/spell) - list( /obj/item/spell, /obj/item/spell/gambit, /obj/item/spell/projectile, @@ -642,7 +644,7 @@ var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/spell) - list // /obj/item/spell/insert, /obj/item/spell/spawner, /obj/item/spell/summon, - /obj/item/spell/modifier) + /obj/item/spell/modifier)) var/global/list/image/splatter_cache=list() var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective. Clumsy, rewrite sometime. @@ -1228,18 +1230,6 @@ GLOBAL_LIST_INIT(all_tooltip_styles, list( "Clockwork" )) -//Global Datums -var/global/datum/pipe_icon_manager/icon_manager -var/global/datum/emergency_shuttle_controller/emergency_shuttle = new - -// We manually initialize the alarm handlers instead of looping over all existing types -// to make it possible to write: camera_alarm.triggerAlarm() rather than SSalarm.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof. -/var/global/datum/alarm_handler/atmosphere/atmosphere_alarm = new() -/var/global/datum/alarm_handler/camera/camera_alarm = new() -/var/global/datum/alarm_handler/fire/fire_alarm = new() -/var/global/datum/alarm_handler/motion/motion_alarm = new() -/var/global/datum/alarm_handler/power/power_alarm = new() - GLOBAL_LIST_EMPTY(gun_choices) GLOBAL_ALIST_INIT(severity_to_string, list( @@ -1653,6 +1643,11 @@ GLOBAL_LIST_INIT(suitable_fish_turf_types, list( /turf/simulated/floor/water )) +GLOBAL_LIST_INIT(ventcrawl_machinery, list( + /obj/machinery/atmospherics/unary/vent_pump, + /obj/machinery/atmospherics/unary/vent_scrubber + )) + GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/paper/dockingcodes) //Chamelion clothing was all stupid so it's done here instead. diff --git a/code/_helpers/roundend.dm b/code/_helpers/roundend.dm index 5222c0f07f..292404960a 100644 --- a/code/_helpers/roundend.dm +++ b/code/_helpers/roundend.dm @@ -15,7 +15,7 @@ if(Player.mind && !isnewplayer(Player)) if(Player.stat != DEAD) var/turf/playerTurf = get_turf(Player) - if(emergency_shuttle.departed && emergency_shuttle.evac) + if(GLOB.emergency_shuttle.departed && GLOB.emergency_shuttle.evac) if(isNotAdminLevel(playerTurf.z)) to_chat(Player, span_filter_system(span_blue(span_bold("You survived the round, but remained on [station_name()] as [Player.real_name].")))) else diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index 0bea402d97..9adf394aa3 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -79,8 +79,7 @@ ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various per //Goon PS stuff, and other yet-to-be-subsystem things. options["LEGACY: master_controller"] = GLOB.master_controller options["LEGACY: job_master"] = GLOB.job_master - options["LEGACY: SSradio"] = SSradio - options["LEGACY: emergency_shuttle"] = emergency_shuttle + options["LEGACY: emergency_shuttle"] = GLOB.emergency_shuttle options["LEGACY: paiController"] = paiController options["LEGACY: cameranet"] = cameranet options["LEGACY: transfer_controller"] = GLOB.transfer_controller diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index bc3e509a64..785724ec19 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -177,7 +177,7 @@ return 0 //not at station return (wait_for_launch || shuttle.moving_status != SHUTTLE_INTRANSIT) -//so we don't have emergency_shuttle.shuttle.location everywhere +//so we don't have GLOB.emergency_shuttle.shuttle.location everywhere /datum/emergency_shuttle_controller/proc/location() if (!shuttle) return 1 //if we dont have a shuttle datum, just act like it's at centcom @@ -228,14 +228,14 @@ /datum/emergency_shuttle_controller/proc/get_status_panel_eta() if (online()) if (shuttle.has_arrive_time()) - var/timeleft = emergency_shuttle.estimate_arrival_time() + var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time() return "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]" if (waiting_to_leave()) if (shuttle.moving_status == SHUTTLE_WARMUP) return "Departing..." - var/timeleft = emergency_shuttle.estimate_launch_time() + var/timeleft = GLOB.emergency_shuttle.estimate_launch_time() return "ETD-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]" return "" diff --git a/code/controllers/subsystems/alarm.dm b/code/controllers/subsystems/alarm.dm index 61af1f852d..27a554403a 100644 --- a/code/controllers/subsystems/alarm.dm +++ b/code/controllers/subsystems/alarm.dm @@ -10,7 +10,7 @@ SUBSYSTEM_DEF(alarm) var/static/list/active_alarm_cache = list() /datum/controller/subsystem/alarm/Initialize() - all_handlers = list(atmosphere_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm) + all_handlers = list(GLOB.atmosphere_alarm, GLOB.camera_alarm, GLOB.fire_alarm, GLOB.motion_alarm, GLOB.power_alarm) return SS_INIT_SUCCESS /datum/controller/subsystem/alarm/fire(resumed = FALSE) diff --git a/code/controllers/subsystems/internal_wiki.dm b/code/controllers/subsystems/internal_wiki.dm index 2c9ddd9f7c..4794a8e276 100644 --- a/code/controllers/subsystems/internal_wiki.dm +++ b/code/controllers/subsystems/internal_wiki.dm @@ -469,8 +469,8 @@ SUBSYSTEM_DEF(internal_wiki) SHOULD_NOT_OVERRIDE(TRUE) PRIVATE_PROC(TRUE) // assemble material wiki - for(var/mat in name_to_material) - var/datum/material/M = name_to_material[mat] + for(var/mat, value in GLOB.name_to_material) + var/datum/material/M = value if(M.wiki_flag & WIKI_SPOILER) spoiler_entries.Add(M.type) continue diff --git a/code/controllers/subsystems/statpanel.dm b/code/controllers/subsystems/statpanel.dm index d150fa4363..12e003490c 100644 --- a/code/controllers/subsystems/statpanel.dm +++ b/code/controllers/subsystems/statpanel.dm @@ -36,8 +36,8 @@ SUBSYSTEM_DEF(statpanels) "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)" ) - if(emergency_shuttle.evac) - var/ETA = emergency_shuttle.get_status_panel_eta() + if(GLOB.emergency_shuttle.evac) + var/ETA = GLOB.emergency_shuttle.get_status_panel_eta() if(ETA) global_data += "[ETA]" diff --git a/code/controllers/subsystems/tgui.dm b/code/controllers/subsystems/tgui.dm index 91cce577cd..aec707a52a 100644 --- a/code/controllers/subsystems/tgui.dm +++ b/code/controllers/subsystems/tgui.dm @@ -41,7 +41,7 @@ SUBSYSTEM_DEF(tgui) ntos_error = "" basehtml = replacetextEx(basehtml, "", ntos_error) - basehtml = replacetextEx(basehtml, "", "Nanotrasen (c) 2284-[text2num(time2text(world.realtime,"YYYY")) + STATION_YEAR_OFFSET]") + basehtml = replacetextEx(basehtml, "", "Nanotrasen (c) 2284-[text2num(UTC_YEAR) + STATION_YEAR_OFFSET]") // This can't use the GLOB as it runs before those are populated /datum/controller/subsystem/tgui/OnConfigLoad() var/storage_iframe = CONFIG_GET(string/storage_cdn_iframe) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 38a836e8cb..28dc6b218b 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -158,10 +158,10 @@ SUBSYSTEM_DEF(ticker) var/game_finished = FALSE var/mode_finished = FALSE if (CONFIG_GET(flag/continuous_rounds)) // Game keeps going after mode ends. - game_finished = (emergency_shuttle.returned() || mode.station_was_nuked) + game_finished = (GLOB.emergency_shuttle.returned() || mode.station_was_nuked) mode_finished = ((end_game_state >= END_GAME_MODE_FINISHED) || mode.check_finished()) // Short circuit if already finished. else // Game ends when mode does - game_finished = (mode.check_finished() || (emergency_shuttle.returned() && emergency_shuttle.evac == 1)) || GLOB.universe_has_ended + game_finished = (mode.check_finished() || (GLOB.emergency_shuttle.returned() && GLOB.emergency_shuttle.evac == 1)) || GLOB.universe_has_ended mode_finished = game_finished if(game_finished && mode_finished) diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm index d24e49f291..2bad2075fc 100644 --- a/code/datums/autolathe/autolathe.dm +++ b/code/datums/autolathe/autolathe.dm @@ -42,8 +42,8 @@ /datum/category_group/autolathe/all/New() ..() - for(var/Name in name_to_material) - var/datum/material/M = name_to_material[Name] + for(var/mame, value in GLOB.name_to_material) + var/datum/material/M = value if(!M.stack_type) // Shouldn't happen, but might. Never know. continue @@ -93,8 +93,8 @@ /datum/category_group/autolathe/materials/New() ..() - for(var/Name in name_to_material) - var/datum/material/M = name_to_material[Name] + for(var/name, value in GLOB.name_to_material) + var/datum/material/M = value if(!M.stack_type) // Shouldn't happen, but might. Never know. continue diff --git a/code/datums/components/antags/changeling/powers/hivemind.dm b/code/datums/components/antags/changeling/powers/hivemind.dm index 84e86afa9c..b06c60f66d 100644 --- a/code/datums/components/antags/changeling/powers/hivemind.dm +++ b/code/datums/components/antags/changeling/powers/hivemind.dm @@ -18,8 +18,7 @@ verbpath = /mob/proc/changeling_hivedownload // HIVE MIND UPLOAD/DOWNLOAD DNA - -var/list/datum/dna/hivemind_bank = list() +GLOBAL_LIST_EMPTY_TYPED(hivemind_bank, /datum/dna) /mob/proc/changeling_hiveupload() set category = "Changeling" @@ -32,7 +31,7 @@ var/list/datum/dna/hivemind_bank = list() var/list/names = list() for(var/datum/absorbed_dna/DNA in changeling.absorbed_dna) - if(!(DNA in hivemind_bank)) + if(!(DNA in GLOB.hivemind_bank)) names += DNA.name if(names.len <= 0) @@ -48,7 +47,7 @@ var/list/datum/dna/hivemind_bank = list() return changeling.chem_charges -= 10 - hivemind_bank += chosen_dna + GLOB.hivemind_bank += chosen_dna to_chat(src, span_notice("We channel the DNA of [S] to the air.")) feedback_add_details("changeling_powers","HU") return TRUE @@ -63,7 +62,7 @@ var/list/datum/dna/hivemind_bank = list() return var/list/names = list() - for(var/datum/absorbed_dna/DNA in hivemind_bank) + for(var/datum/absorbed_dna/DNA in GLOB.hivemind_bank) if(!(DNA in changeling.absorbed_dna)) names[DNA.name] = DNA diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 56d0888043..3eea724477 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -109,13 +109,13 @@ GLOBAL_LIST_EMPTY(areas_by_type) /area/proc/atmosalert(danger_level, var/alarm_source) if (danger_level == 0) - atmosphere_alarm.clearAlarm(src, alarm_source) + GLOB.atmosphere_alarm.clearAlarm(src, alarm_source) else var/obj/machinery/alarm/atmosalarm = alarm_source //maybe other things can trigger these, who knows if(istype(atmosalarm)) - atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level, hidden = atmosalarm.alarms_hidden) + GLOB.atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level, hidden = atmosalarm.alarms_hidden) else - atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level) + GLOB.atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level) //Check all the alarms before lowering atmosalm. Raising is perfectly fine. var/obj/machinery/alarm/AM = main_air_alarm?.resolve() diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index 4caac313db..9a29984722 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -53,9 +53,9 @@ GLOBAL_VAR_INIT(narsie_cometh, 0) GLOB.narsie_cometh = 1 spawn(10 SECONDS) - if(emergency_shuttle) - emergency_shuttle.call_evac() - emergency_shuttle.launch_time = 0 // Cannot recall + if(GLOB.emergency_shuttle) + GLOB.emergency_shuttle.call_evac() + GLOB.emergency_shuttle.launch_time = 0 // Cannot recall /obj/singularity/narsie/process() eat() diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 0f96794d92..a44c9a9ba1 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -203,9 +203,9 @@ GLOBAL_LIST_EMPTY(sacrificed) GLOB.narsie_cometh = 1 spawn(10 SECONDS) - if(emergency_shuttle) - emergency_shuttle.call_evac() - emergency_shuttle.launch_time = 0 // Cannot recall + if(GLOB.emergency_shuttle) + GLOB.emergency_shuttle.call_evac() + GLOB.emergency_shuttle.launch_time = 0 // Cannot recall log_and_message_admins_many(cultists, "summoned the end of days.") return diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 930580fa7a..15ed5a3ce5 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -44,9 +44,9 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) for(var/mob/M in GLOB.player_list) M.flash_eyes() - if(emergency_shuttle.can_recall()) + if(GLOB.emergency_shuttle.can_recall()) priority_announcement.Announce("The emergency shuttle has returned due to bluespace distortion.") - emergency_shuttle.recall() + GLOB.emergency_shuttle.recall() AreaSet() MiscSet() diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 78ea02fb1f..70aadc23af 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -214,8 +214,8 @@ GLOBAL_LIST_EMPTY(additional_antag_types) if(antag.is_latejoin_template()) latejoin_templates |= antag - if(emergency_shuttle && auto_recall_shuttle) - emergency_shuttle.auto_recall = 1 + if(GLOB.emergency_shuttle && auto_recall_shuttle) + GLOB.emergency_shuttle.auto_recall = 1 feedback_set_details("round_start","[time2text(world.realtime)]") INVOKE_ASYNC(SSdbcore, TYPE_PROC_REF(/datum/controller/subsystem/dbcore, SetRoundStart)) @@ -267,14 +267,14 @@ GLOBAL_LIST_EMPTY(additional_antag_types) command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time, and post-evacuation recovery efforts will be substantially delayed.","Emergency Transmission") /datum/game_mode/proc/check_finished() - if(emergency_shuttle.returned() || station_was_nuked) + if(GLOB.emergency_shuttle.returned() || station_was_nuked) return 1 if(end_on_antag_death && antag_templates && antag_templates.len) for(var/datum/antagonist/antag in antag_templates) if(!antag.antags_are_dead()) return 0 if(CONFIG_GET(flag/continuous_rounds)) - emergency_shuttle.auto_recall = 0 + GLOB.emergency_shuttle.auto_recall = 0 return 0 return 1 return 0 @@ -362,7 +362,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) var/text = "" if(surviving_total > 0) text += "
There [surviving_total>1 ? ("were " + span_bold("[surviving_total] survivors")) : ("was " + span_bold("one survivor"))] (" - text += span_bold("[escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]") + ") and " + span_bold("[ghosts] ghosts") + text += span_bold("[escaped_total>0 ? escaped_total : "none"] [GLOB.emergency_shuttle.evac ? "escaped" : "transferred"]") + ") and " + span_bold("[ghosts] ghosts") text += ".
" else text += "There were " + span_bold("no survivors") + " (" + span_bold("[ghosts] ghosts") + ")." diff --git a/code/game/gamemodes/game_mode_latespawn.dm b/code/game/gamemodes/game_mode_latespawn.dm index 9fcb4bd0ea..d1378086b9 100644 --- a/code/game/gamemodes/game_mode_latespawn.dm +++ b/code/game/gamemodes/game_mode_latespawn.dm @@ -28,10 +28,10 @@ /datum/game_mode/proc/try_latespawn(var/datum/mind/player, var/latejoin_only) - if(emergency_shuttle.departed || !round_autoantag) + if(GLOB.emergency_shuttle.departed || !round_autoantag) return - if(emergency_shuttle.shuttle && (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP || emergency_shuttle.shuttle.moving_status == SHUTTLE_INTRANSIT)) + if(GLOB.emergency_shuttle.shuttle && (GLOB.emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP || GLOB.emergency_shuttle.shuttle.moving_status == SHUTTLE_INTRANSIT)) return // Don't do anything if the shuttle's coming. var/mills = round_duration_in_ds diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index 3ad05215d7..2971040e6e 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -267,7 +267,7 @@ datum explanation_text = "Frame [target.current.real_name], the [target.assigned_role] for a crime and make sure they are arrested and brought back to the CentCom station alive. We'll handle the rest from there." check_completion() - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(target.current.stat == 2) return 0 @@ -313,7 +313,7 @@ datum explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] mercenary [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention." check_completion() - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(target.current.stat == 2) @@ -477,7 +477,7 @@ datum explanation_text = "Hijack the emergency shuttle by escaping alone." check_completion() - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(!owner.current || owner.current.stat == 2) @@ -512,7 +512,7 @@ datum explanation_text = "Escape on the shuttle alive, without being arrested." check_completion() - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(!owner.current || owner.current.stat ==2) @@ -1230,7 +1230,7 @@ datum check_completion() if(!istype(owner.current, /mob/living/silicon)) return 0 - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(!owner.current) return 0 @@ -1457,7 +1457,7 @@ datum explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left." check_completion() - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 var/area/shuttle = locate(/area/shuttle/escape/centcom) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index db33e2ed95..8791115b34 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -41,7 +41,7 @@ GLOBAL_LIST_EMPTY(nuke_disks) if(!is_type_in_list(disk_area, GLOB.centcom_areas)) disk_rescued = 0 break - var/crew_evacuated = (emergency_shuttle.returned()) + var/crew_evacuated = (GLOB.emergency_shuttle.returned()) if(!disk_rescued && station_was_nuked && !syndies_didnt_escape) feedback_set_details("round_end_result","win - syndicate nuke") diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index b8580d5352..d5722040f6 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(all_objectives) /datum/objective/hijack/check_completion() if(!owner.current || owner.current.stat) return 0 - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(issilicon(owner.current)) return 0 @@ -241,7 +241,7 @@ GLOBAL_LIST_EMPTY(all_objectives) /datum/objective/block/check_completion() if(!istype(owner.current, /mob/living/silicon)) return 0 - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(!owner.current) return 0 @@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY(all_objectives) explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left." /datum/objective/silence/check_completion() - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 for(var/mob/living/player in GLOB.player_list) @@ -284,7 +284,7 @@ GLOBAL_LIST_EMPTY(all_objectives) return 0 if(isbrain(owner.current)) return 0 - if(!emergency_shuttle.returned()) + if(!GLOB.emergency_shuttle.returned()) return 0 if(!owner.current || owner.current.stat ==2) return 0 diff --git a/code/game/gamemodes/sandbox/sandbox.dm b/code/game/gamemodes/sandbox/sandbox.dm index 5269f46d13..a42fea09f9 100644 --- a/code/game/gamemodes/sandbox/sandbox.dm +++ b/code/game/gamemodes/sandbox/sandbox.dm @@ -20,4 +20,4 @@ /datum/game_mode/sandbox/post_setup() ..() if(emergency_shuttle) - emergency_shuttle.auto_recall = 1 + GLOB.emergency_shuttle.auto_recall = 1 diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm index 0a85ddcbd3..b871ccea1f 100644 --- a/code/game/gamemodes/technomancer/spells/gambit.dm +++ b/code/game/gamemodes/technomancer/spells/gambit.dm @@ -35,7 +35,7 @@ // Gives a random spell. /obj/item/spell/gambit/proc/random_spell() - var/list/potential_spells = all_technomancer_gambit_spells.Copy() + var/list/potential_spells = GLOB.all_technomancer_gambit_spells.Copy() var/rare_spell_chance = between(0, calculate_spell_power(100) - 100, 100) // Having 120% spellpower means a 20% chance to get to roll for rare spells. if(prob(rare_spell_chance)) potential_spells += rare_spells.Copy() @@ -119,6 +119,6 @@ // Fallback method in case nothing gets added. if(!potential_spells.len) - potential_spells = all_technomancer_gambit_spells.Copy() + potential_spells = GLOB.all_technomancer_gambit_spells.Copy() return pick(potential_spells) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 7918bf8f55..605a69b881 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -310,14 +310,14 @@ /obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0) alarm_on = 1 - camera_alarm.triggerAlarm(loc, src, duration) + GLOB.camera_alarm.triggerAlarm(loc, src, duration) /obj/machinery/camera/proc/cancelCameraAlarm() if(wires.is_cut(WIRE_CAM_ALARM)) return alarm_on = 0 - camera_alarm.clearAlarm(loc, src) + GLOB.camera_alarm.clearAlarm(loc, src) //if false, then the camera is listed as DEACTIVATED and cannot be used /obj/machinery/camera/proc/can_use() @@ -462,7 +462,7 @@ /obj/machinery/camera/proc/update_coverage(var/network_change = 0) if(network_change) - var/list/open_networks = difflist(network, restricted_camera_networks) + var/list/open_networks = difflist(network, GLOB.restricted_camera_networks) // Add or remove camera from the camera net as necessary if(on_open_network && !open_networks.len) cameranet.removeCamera(src) diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index d89c123b4d..b85fae71ee 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -42,7 +42,7 @@ if (!status || (stat & NOPOWER)) return 0 if (detectTime == -1) - motion_alarm.clearAlarm(loc, src) + GLOB.motion_alarm.clearAlarm(loc, src) detectTime = 0 return 1 @@ -50,7 +50,7 @@ if (!status || (stat & NOPOWER)) return 0 if (!detectTime) return 0 - motion_alarm.triggerAlarm(loc, src) + GLOB.motion_alarm.triggerAlarm(loc, src) detectTime = -1 return 1 diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 5f00f29a29..1a4c1133ab 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -8,10 +8,10 @@ /obj/machinery/computer/atmos_alert/Initialize(mapload) . = ..() - atmosphere_alarm.register_alarm(src, /atom/proc/update_icon) + GLOB.atmosphere_alarm.register_alarm(src, /atom/proc/update_icon) /obj/machinery/computer/atmos_alert/Destroy() - atmosphere_alarm.unregister_alarm(src) + GLOB.atmosphere_alarm.unregister_alarm(src) . = ..() /obj/machinery/computer/atmos_alert/attack_hand(mob/user) @@ -28,10 +28,10 @@ var/list/major_alarms = list() var/list/minor_alarms = list() - for(var/datum/alarm/alarm in atmosphere_alarm.major_alarms(get_z(src))) + for(var/datum/alarm/alarm in GLOB.atmosphere_alarm.major_alarms(get_z(src))) major_alarms[++major_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]") - for(var/datum/alarm/alarm in atmosphere_alarm.minor_alarms(get_z(src))) + for(var/datum/alarm/alarm in GLOB.atmosphere_alarm.minor_alarms(get_z(src))) minor_alarms[++minor_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]") data["priority_alarms"] = major_alarms @@ -41,14 +41,14 @@ /obj/machinery/computer/atmos_alert/update_icon() if(!(stat & (NOPOWER|BROKEN))) - var/list/alarms = atmosphere_alarm.major_alarms() + var/list/alarms = GLOB.atmosphere_alarm.major_alarms() if(alarms.len) icon_screen = "alert:2" playsound(src, 'sound/effects/comp_alert_major.ogg', 70, 1) // CHOMPEdit: Alarm notifications spawn(100) // Wait 10 seconds, then play it again playsound(src, 'sound/effects/comp_alert_major.ogg', 70, 1) // CHOMPEdit: Alarm notifications else - alarms = atmosphere_alarm.minor_alarms() + alarms = GLOB.atmosphere_alarm.minor_alarms() if(alarms.len) icon_screen = "alert:1" playsound(src, 'sound/effects/comp_alert_minor.ogg', 50, 1) // CHOMPEdit: Alarm notifications @@ -65,7 +65,7 @@ switch(action) if("clear") - var/datum/alarm/alarm = locate(params["ref"]) in atmosphere_alarm.alarms + var/datum/alarm/alarm = locate(params["ref"]) in GLOB.atmosphere_alarm.alarms if(alarm) for(var/datum/alarm_source/alarm_source in alarm.sources) var/obj/machinery/alarm/air_alarm = alarm_source.source diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index a48dfc100c..4b240d76fa 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -10,7 +10,7 @@ /obj/machinery/computer/shuttle/attackby(var/obj/item/card/W as obj, var/mob/user as mob) if(stat & (BROKEN|NOPOWER)) return - if ((!( istype(W, /obj/item/card) ) || !( SSticker ) || emergency_shuttle.location() || !( user ))) return + if ((!( istype(W, /obj/item/card) ) || !( SSticker ) || GLOB.emergency_shuttle.location() || !( user ))) return if (istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) if (istype(W, /obj/item/pda)) var/obj/item/pda/pda = W @@ -29,7 +29,7 @@ return 0 var/choice = tgui_alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", list("Authorize", "Repeal", "Abort")) - if(emergency_shuttle.location() && user.get_active_hand() != W) + if(GLOB.emergency_shuttle.location() && user.get_active_hand() != W) return 0 switch(choice) if("Authorize") @@ -43,7 +43,7 @@ message_admins("[key_name_admin(user)] has launched the shuttle") log_game("[user.ckey] has launched the shuttle early") to_chat(world, span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!")) - emergency_shuttle.set_launch_countdown(10) + GLOB.emergency_shuttle.set_launch_countdown(10) //src.authorized = null qdel(src.authorized) src.authorized = list( ) @@ -60,11 +60,11 @@ else if (istype(W, /obj/item/card/emag) && !emagged) var/choice = tgui_alert(user, "Would you like to launch the shuttle?", "Shuttle control", list("Launch", "Cancel")) - if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W) + if(!emagged && !GLOB.emergency_shuttle.location() && user.get_active_hand() == W) switch(choice) if("Launch") to_chat(world, span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!")) - emergency_shuttle.set_launch_countdown(10) + GLOB.emergency_shuttle.set_launch_countdown(10) emagged = 1 if("Cancel") return diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index a212586552..e592a34163 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -4,12 +4,12 @@ #define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock #define SPECOPS_RETURN_DELAY 600 //Time between the shuttle is capable of moving. -var/specops_shuttle_moving_to_station = 0 -var/specops_shuttle_moving_to_centcom = 0 -var/specops_shuttle_at_station = 0 -var/specops_shuttle_can_send = 1 -var/specops_shuttle_time = 0 -var/specops_shuttle_timeleft = 0 +GLOBAL_VAR_INIT(specops_shuttle_moving_to_station, 0) +GLOBAL_VAR_INIT(specops_shuttle_moving_to_centcom, 0) +GLOBAL_VAR_INIT(specops_shuttle_at_station, 0) +GLOBAL_VAR_INIT(specops_shuttle_can_send, 1) +GLOBAL_VAR_INIT(specops_shuttle_time, 0) +GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0) /obj/machinery/computer/specops_shuttle name = "special operations shuttle control console" @@ -32,16 +32,16 @@ var/specops_shuttle_timeleft = 0 if(announcer) announcer.autosay(message, "A.L.I.C.E.", CHANNEL_RESPONSE_TEAM) - while(specops_shuttle_time - world.timeofday > 0) - var/ticksleft = specops_shuttle_time - world.timeofday + while(GLOB.specops_shuttle_time - world.timeofday > 0) + var/ticksleft = GLOB.specops_shuttle_time - world.timeofday if(ticksleft > 1e5) - specops_shuttle_time = world.timeofday + 10 // midnight rollover - specops_shuttle_timeleft = (ticksleft / 10) + GLOB.specops_shuttle_time = world.timeofday + 10 // midnight rollover + GLOB.specops_shuttle_timeleft = (ticksleft / 10) //All this does is announce the time before launch. if(announcer) - var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions. + var/rounded_time_left = round(GLOB.specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions. if(rounded_time_left in message_tracker)//If that time is in the list for message announce. message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\"" if(rounded_time_left==0) @@ -52,10 +52,10 @@ var/specops_shuttle_timeleft = 0 sleep(5) - specops_shuttle_moving_to_station = 0 - specops_shuttle_moving_to_centcom = 0 + GLOB.specops_shuttle_moving_to_station = 0 + GLOB.specops_shuttle_moving_to_centcom = 0 - specops_shuttle_at_station = 1 + GLOB.specops_shuttle_at_station = 1 var/area/start_location = locate(/area/shuttle/specops/station) var/area/end_location = locate(/area/shuttle/specops/centcom) @@ -90,7 +90,7 @@ var/specops_shuttle_timeleft = 0 var/mob/M = locate(/mob) in T to_chat(M, span_notice("You have arrived at [using_map.boss_name]. Operation has ended!")) - specops_shuttle_at_station = 0 + GLOB.specops_shuttle_at_station = 0 for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY @@ -109,16 +109,16 @@ var/specops_shuttle_timeleft = 0 // message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD" // announcer.autosay(message, "A.L.I.C.E.", CHANNEL_RESPONSE_TEAM) - while(specops_shuttle_time - world.timeofday > 0) - var/ticksleft = specops_shuttle_time - world.timeofday + while(GLOB.specops_shuttle_time - world.timeofday > 0) + var/ticksleft = GLOB.specops_shuttle_time - world.timeofday if(ticksleft > 1e5) - specops_shuttle_time = world.timeofday + 10 // midnight rollover - specops_shuttle_timeleft = (ticksleft / 10) + GLOB.specops_shuttle_time = world.timeofday + 10 // midnight rollover + GLOB.specops_shuttle_timeleft = (ticksleft / 10) //All this does is announce the time before launch. if(announcer) - var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions. + var/rounded_time_left = round(GLOB.specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions. if(rounded_time_left in message_tracker)//If that time is in the list for message announce. message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\"" if(rounded_time_left==0) @@ -129,11 +129,11 @@ var/specops_shuttle_timeleft = 0 sleep(5) - specops_shuttle_moving_to_station = 0 - specops_shuttle_moving_to_centcom = 0 + GLOB.specops_shuttle_moving_to_station = 0 + GLOB.specops_shuttle_moving_to_centcom = 0 - specops_shuttle_at_station = 1 - if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return + GLOB.specops_shuttle_at_station = 1 + if (GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return if (!specops_can_move()) to_chat(usr, span_warning("The Special Operations shuttle is unable to leave.")) @@ -239,7 +239,7 @@ var/specops_shuttle_timeleft = 0 qdel(announcer) /proc/specops_can_move() - if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) + if(GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return 0 for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines) if(world.timeofday <= S.specops_shuttle_timereset) @@ -266,8 +266,8 @@ var/specops_shuttle_timeleft = 0 dat = temp else dat += {"
Special Operations Shuttle
- \nLocation: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name()] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]
- [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":specops_shuttle_at_station ? "\nShuttle standing by...
\n
":"\nDepart to [station_name()]
\n
"] + \nLocation: [GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom ? "Departing for [station_name()] in ([GLOB.specops_shuttle_timeleft] seconds.)":GLOB.specops_shuttle_at_station ? "Station":"Dock"]
+ [GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":GLOB.specops_shuttle_at_station ? "\nShuttle standing by...
\n
":"\nDepart to [station_name()]
\n
"] \nClose"} var/datum/browser/popup = new(usr, "computer", "Computer", 575, 450) @@ -282,7 +282,7 @@ var/specops_shuttle_timeleft = 0 usr.set_machine(src) if (href_list["sendtodock"]) - if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return + if(!GLOB.specops_shuttle_at_station|| GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return if (!specops_can_move()) to_chat(usr, span_notice("[using_map.boss_name] will not allow the Special Operations shuttle to return yet.")) @@ -297,13 +297,13 @@ var/specops_shuttle_timeleft = 0 temp += "Shuttle departing.

OK" updateUsrDialog(usr) - specops_shuttle_moving_to_centcom = 1 - specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME + GLOB.specops_shuttle_moving_to_centcom = 1 + GLOB.specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME spawn(0) specops_return() else if (href_list["sendtostation"]) - if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return + if(GLOB.specops_shuttle_at_station || GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return if (!specops_can_move()) to_chat(usr, span_warning("The Special Operations shuttle is unable to leave.")) @@ -317,9 +317,9 @@ var/specops_shuttle_timeleft = 0 var/area/centcom/specops/special_ops = locate() if(special_ops) special_ops.readyalert()//Trigger alarm for the spec ops area. - specops_shuttle_moving_to_station = 1 + GLOB.specops_shuttle_moving_to_station = 1 - specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME + GLOB.specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME spawn(0) specops_process() diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index 630246285a..bf2f3e35ae 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -217,7 +217,7 @@ FIRE ALARM return var/area/area = get_area(src) for(var/obj/machinery/firealarm/FA in area) - fire_alarm.clearAlarm(src.loc, FA) + GLOB.fire_alarm.clearAlarm(src.loc, FA) FA.soundloop.stop() // CHOMPEdit: Soundloop FA.firewarn = FALSE // CHOMPEdit: Soundloop Fix update_icon() @@ -231,7 +231,7 @@ FIRE ALARM if(!firewarn && !alarms_hidden) // CHOMPAdd GLOB.global_announcer.autosay("Tripped [area]", "Fire Alarm Monitor", DEPARTMENT_ENGINEERING) for(var/obj/machinery/firealarm/FA in area) - fire_alarm.triggerAlarm(loc, FA, duration, hidden = alarms_hidden) + GLOB.fire_alarm.triggerAlarm(loc, FA, duration, hidden = alarms_hidden) FA.soundloop.start() // CHOMPEdit: Soundloop FA.firewarn = TRUE // CHOMPEdit: Soundloop Fix update_icon() diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index f0bf965c31..725dd19ffb 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -1,4 +1,4 @@ -var/list/floor_light_cache = list() +GLOBAL_LIST_EMPTY(floor_light_cache) /obj/item/floor_light name = "floor light kit" @@ -124,22 +124,22 @@ var/list/floor_light_cache = list() if(use_power && !broken()) if(isnull(damaged)) var/cache_key = "floorlight-[default_light_colour]" - if(!floor_light_cache[cache_key]) + if(!GLOB.floor_light_cache[cache_key]) var/image/I = image("on") I.color = default_light_colour I.layer = layer+0.001 - floor_light_cache[cache_key] = I - add_overlay(floor_light_cache[cache_key]) + GLOB.floor_light_cache[cache_key] = I + add_overlay(GLOB.floor_light_cache[cache_key]) else if(damaged == 0) //Needs init. damaged = rand(1,4) var/cache_key = "floorlight-broken[damaged]-[default_light_colour]" - if(!floor_light_cache[cache_key]) + if(!GLOB.floor_light_cache[cache_key]) var/image/I = image("flicker[damaged]") I.color = default_light_colour I.layer = layer+0.001 - floor_light_cache[cache_key] = I - add_overlay(floor_light_cache[cache_key]) + GLOB.floor_light_cache[cache_key] = I + add_overlay(GLOB.floor_light_cache[cache_key]) /obj/machinery/floor_light/proc/broken() return (stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 0674566f16..be7f1191a6 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -95,20 +95,20 @@ if(STATUS_DISPLAY_BLANK) //blank return 1 if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer - if(!emergency_shuttle) + if(!GLOB.emergency_shuttle) message1 = "-ETA-" message2 = "Never" // You're here forever. return 1 - if(emergency_shuttle.waiting_to_leave()) + if(GLOB.emergency_shuttle.waiting_to_leave()) message1 = "-ETD-" - if(emergency_shuttle.shuttle.is_launching()) + if(GLOB.emergency_shuttle.shuttle.is_launching()) message2 = "Launch" else message2 = get_shuttle_timer_departure() if(length(message2) > CHARS_PER_LINE) message2 = "Error" update_display(message1, message2) - else if(emergency_shuttle.has_eta()) + else if(GLOB.emergency_shuttle.has_eta()) message1 = "-ETA-" message2 = get_shuttle_timer_arrival() if(length(message2) > CHARS_PER_LINE) @@ -207,17 +207,17 @@ maptext = new_text /obj/machinery/status_display/proc/get_shuttle_timer_arrival() - if(!emergency_shuttle) + if(!GLOB.emergency_shuttle) return "Error" - var/timeleft = emergency_shuttle.estimate_arrival_time() + var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time() if(timeleft < 0) return "" return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]" /obj/machinery/status_display/proc/get_shuttle_timer_departure() - if(!emergency_shuttle) + if(!GLOB.emergency_shuttle) return "Error" - var/timeleft = emergency_shuttle.estimate_launch_time() + var/timeleft = GLOB.emergency_shuttle.estimate_launch_time() if(timeleft < 0) return "" return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]" diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm index bec8448352..05754ceb6c 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -92,7 +92,7 @@ to_chat(user, "No input found please hang up and try your call again.") return var/list/tempnetwork = splittext(input, ",") - tempnetwork = difflist(tempnetwork,restricted_camera_networks,1) + tempnetwork = difflist(tempnetwork, GLOB.restricted_camera_networks, 1) if(tempnetwork.len < 1) to_chat(user, "No network found please hang up and try your call again.") return diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index 5d048213d2..d93504df2d 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -2,7 +2,7 @@ * Donut Box */ -var/list/random_weighted_donuts = list( +GLOBAL_LIST_INIT(random_weighted_donuts, list( /obj/item/reagent_containers/food/snacks/donut/plain = 5, /obj/item/reagent_containers/food/snacks/donut/plain/jelly = 5, /obj/item/reagent_containers/food/snacks/donut/pink = 4, @@ -26,7 +26,7 @@ var/list/random_weighted_donuts = list( /obj/item/reagent_containers/food/snacks/donut/choc_sprinkles = 3, /obj/item/reagent_containers/food/snacks/donut/choc_sprinkles/jelly = 3, /obj/item/reagent_containers/food/snacks/donut/chaos = 1 -) +)) /obj/item/storage/box/donut icon = 'icons/obj/food_donuts.dmi' @@ -43,7 +43,7 @@ var/list/random_weighted_donuts = list( /obj/item/storage/box/donut/Initialize(mapload) if(!empty) for(var/i in 1 to 6) - var/type_to_spawn = pickweight(random_weighted_donuts) + var/type_to_spawn = pickweight(GLOB.random_weighted_donuts) new type_to_spawn(src) . = ..() update_icon() diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 7f8bf9db69..e97e5320b4 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -1,6 +1,6 @@ #define TANK_IDEAL_PRESSURE 1015 //Arbitrary. -var/list/global/tank_gauge_cache = list() +GLOBAL_LIST_EMPTY(tank_gauge_cache) /obj/item/tank name = "tank" @@ -377,9 +377,9 @@ var/list/global/tank_gauge_cache = list() cut_overlays() add_bomb_overlay() var/indicator = "[gauge_icon][(gauge_pressure == -1) ? "overload" : gauge_pressure]" - if(!tank_gauge_cache[indicator]) - tank_gauge_cache[indicator] = image(icon, indicator) - add_overlay(tank_gauge_cache[indicator]) + if(!GLOB.tank_gauge_cache[indicator]) + GLOB.tank_gauge_cache[indicator] = image(icon, indicator) + add_overlay(GLOB.tank_gauge_cache[indicator]) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 8a44dee8fe..e743108876 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -238,7 +238,7 @@ to_chat(user, span_notice("There isn't enough material here to construct a wall.")) return FALSE - var/datum/material/M = name_to_material[S.default_type] + var/datum/material/M = GLOB.name_to_material[S.default_type] if(!istype(M)) return FALSE @@ -279,7 +279,7 @@ to_chat(user, span_notice("There isn't enough material here to reinforce the girder.")) return 0 - var/datum/material/M = name_to_material[S.default_type] + var/datum/material/M = GLOB.name_to_material[S.default_type] if(!istype(M) || M.integrity < 50) to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.") return 0 @@ -413,7 +413,7 @@ var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built. // Apparently set_material(...) for walls requires refs to the material singletons and not strings. // This is different from how other material objects with their own set_material(...) do it, but whatever. - var/datum/material/M = name_to_material[the_rcd.material_to_use] + var/datum/material/M = GLOB.name_to_material[the_rcd.material_to_use] new_T.set_material(M, the_rcd.make_rwalls ? M : null, girder_material) new_T.add_hiddenprint(user) qdel(src) diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index cdd3274a0d..ba78cea73e 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -1,16 +1,15 @@ -var/list/flooring_types +GLOBAL_LIST_EMPTY(flooring_types) /proc/populate_flooring_types() - flooring_types = list() for (var/flooring_path in typesof(/decl/flooring)) - flooring_types["[flooring_path]"] = new flooring_path + GLOB.flooring_types["[flooring_path]"] = new flooring_path /proc/get_flooring_data(var/flooring_path) - if(!flooring_types) - flooring_types = list() - if(!flooring_types["[flooring_path]"]) - flooring_types["[flooring_path]"] = new flooring_path - return flooring_types["[flooring_path]"] + if(!GLOB.flooring_types) + GLOB.flooring_types = list() + if(!GLOB.flooring_types["[flooring_path]"]) + GLOB.flooring_types["[flooring_path]"] = new flooring_path + return GLOB.flooring_types["[flooring_path]"] // State values: // [icon_base]: initial base icon_state without edges or corners. diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 21c8548bb0..11e36d0090 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -151,7 +151,7 @@ var/turf/simulated/wall/T = get_turf(src) // Ref to the wall we just built. // Apparently set_material(...) for walls requires refs to the material singletons and not strings. // This is different from how other material objects with their own set_material(...) do it, but whatever. - var/datum/material/M = name_to_material[the_rcd.material_to_use] + var/datum/material/M = GLOB.name_to_material[the_rcd.material_to_use] T.set_material(M, the_rcd.make_rwalls ? M : null, M) T.add_hiddenprint(user) return TRUE diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm index 01999ea135..d43c7a08c9 100644 --- a/code/game/turfs/simulated/floor_attackby.dm +++ b/code/game/turfs/simulated/floor_attackby.dm @@ -101,8 +101,8 @@ return var/obj/item/stack/S = C var/decl/flooring/use_flooring - for(var/flooring_type in flooring_types) - var/decl/flooring/F = flooring_types[flooring_type] + for(var/flooring_type in GLOB.flooring_types) + var/decl/flooring/F = GLOB.flooring_types[flooring_type] if(!F.build_type) continue if((S.type == F.build_type) || (S.build_type == F.build_type)) diff --git a/code/game/turfs/simulated/outdoors/grass.dm b/code/game/turfs/simulated/outdoors/grass.dm index 87ce64c025..5b0c16334a 100644 --- a/code/game/turfs/simulated/outdoors/grass.dm +++ b/code/game/turfs/simulated/outdoors/grass.dm @@ -1,4 +1,3 @@ - /turf/simulated/floor/outdoors/grass name = "grass" icon_state = "grass0" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 8505cc9ffc..14e08734e5 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -529,7 +529,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY message_admins(span_blue("[key_name_admin(usr)] told everyone to man up and deal with it."), 1) ADMIN_VERB(give_spell, R_FUN, "Give Spell", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/spell_recipient) - var/spell/S = tgui_input_list(user, "Choose the spell to give to that guy", "ABRAKADABRA", spells) + var/spell/S = tgui_input_list(user, "Choose the spell to give to that guy", "ABRAKADABRA", typesof(/spell)) if(!S) return spell_recipient.spell_list += new S diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index aa1e81145b..9207dfc9a9 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -395,19 +395,19 @@ dat += "Current Game Mode: " + span_bold("[SSticker.mode.name]") + "
" dat += "Round Duration: " + span_bold("[roundduration2text()]") + "
" dat += span_bold("Emergency shuttle") + "
" - if (!emergency_shuttle.online()) + if (!GLOB.emergency_shuttle.online()) dat += "Call Shuttle
" else - if (emergency_shuttle.wait_for_launch) - var/timeleft = emergency_shuttle.estimate_launch_time() + if (GLOB.emergency_shuttle.wait_for_launch) + var/timeleft = GLOB.emergency_shuttle.estimate_launch_time() dat += "ETL: [(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]
" - else if (emergency_shuttle.shuttle.has_arrive_time()) - var/timeleft = emergency_shuttle.estimate_arrival_time() + else if (GLOB.emergency_shuttle.shuttle.has_arrive_time()) + var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time() dat += "ETA: [(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]
" dat += "Send Back
" - if (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP) + if (GLOB.emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP) dat += "Launching now..." dat += "[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]
" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 198ba088b8..452dbbc679 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -83,23 +83,23 @@ switch(href_list["call_shuttle"]) if("1") - if ((!( SSticker ) || !emergency_shuttle.location())) + if ((!( SSticker ) || !GLOB.emergency_shuttle.location())) return - if (emergency_shuttle.can_call()) - emergency_shuttle.call_evac() + if (GLOB.emergency_shuttle.can_call()) + GLOB.emergency_shuttle.call_evac() log_admin("[key_name(usr)] called the Emergency Shuttle") message_admins(span_blue("[key_name_admin(usr)] called the Emergency Shuttle to the station."), 1) if("2") - if (!( SSticker ) || !emergency_shuttle.location()) + if (!( SSticker ) || !GLOB.emergency_shuttle.location()) return - if (emergency_shuttle.can_call()) - emergency_shuttle.call_evac() + if (GLOB.emergency_shuttle.can_call()) + GLOB.emergency_shuttle.call_evac() log_admin("[key_name(usr)] called the Emergency Shuttle") message_admins(span_blue("[key_name_admin(usr)] called the Emergency Shuttle to the station."), 1) - else if (emergency_shuttle.can_recall()) - emergency_shuttle.recall() + else if (GLOB.emergency_shuttle.can_recall()) + GLOB.emergency_shuttle.recall() log_admin("[key_name(usr)] sent the Emergency Shuttle back") message_admins(span_blue("[key_name_admin(usr)] sent the Emergency Shuttle back."), 1) @@ -108,17 +108,17 @@ else if(href_list["edit_shuttle_time"]) if(!check_rights(R_SERVER)) return - if (emergency_shuttle.wait_for_launch) - var/new_time_left = tgui_input_number(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) + if (GLOB.emergency_shuttle.wait_for_launch) + var/new_time_left = tgui_input_number(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", GLOB.emergency_shuttle.estimate_launch_time() ) - emergency_shuttle.launch_time = world.time + new_time_left*10 + GLOB.emergency_shuttle.launch_time = world.time + new_time_left*10 log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]") message_admins(span_blue("[key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]"), 1) - else if (emergency_shuttle.shuttle.has_arrive_time()) + else if (GLOB.emergency_shuttle.shuttle.has_arrive_time()) - var/new_time_left = tgui_input_number(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) - emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10 + var/new_time_left = tgui_input_number(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", GLOB.emergency_shuttle.estimate_arrival_time() ) + GLOB.emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10 log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]") message_admins(span_blue("[key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]"), 1) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 20f14172fb..a852fee605 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -870,7 +870,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp set category = "Admin.Events" set name = "Call Shuttle" - if ((!( SSticker ) || !emergency_shuttle.location())) + if ((!( SSticker ) || !GLOB.emergency_shuttle.location())) return if(!check_rights(R_ADMIN)) return @@ -882,15 +882,15 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp if(SSticker.mode.auto_recall_shuttle) choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", "Shuttle Call", list("Confirm", "Cancel")) if(choice == "Confirm") - emergency_shuttle.auto_recall = 1 //enable auto-recall + GLOB.emergency_shuttle.auto_recall = 1 //enable auto-recall else return choice = tgui_input_list(usr, "Is this an emergency evacuation or a crew transfer?", "Shuttle Call", list("Emergency", "Crew Transfer")) if (choice == "Emergency") - emergency_shuttle.call_evac() + GLOB.emergency_shuttle.call_evac() else - emergency_shuttle.call_transfer() + GLOB.emergency_shuttle.call_transfer() feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -906,10 +906,10 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") return - if(!SSticker || !emergency_shuttle.can_recall()) + if(!SSticker || !GLOB.emergency_shuttle.can_recall()) return - emergency_shuttle.recall() + GLOB.emergency_shuttle.recall() feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] admin-recalled the emergency shuttle.") message_admins(span_blue("[key_name_admin(usr)] admin-recalled the emergency shuttle."), 1) @@ -925,10 +925,10 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp if(!check_rights(R_ADMIN)) return - emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle + GLOB.emergency_shuttle.deny_shuttle = !GLOB.emergency_shuttle.deny_shuttle - log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.") - message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.") + log_admin("[key_name(src)] has [GLOB.emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.") + message_admins("[key_name_admin(usr)] has [GLOB.emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.") /client/proc/cmd_admin_attack_log(mob/M as mob in GLOB.mob_list) set category = "Admin.Logs" diff --git a/code/modules/client/preference_setup/loadout/loadout_accessories.dm b/code/modules/client/preference_setup/loadout/loadout_accessories.dm index 55eab20149..a76e56ee15 100644 --- a/code/modules/client/preference_setup/loadout/loadout_accessories.dm +++ b/code/modules/client/preference_setup/loadout/loadout_accessories.dm @@ -395,7 +395,7 @@ /datum/gear/collar/New() ..() - gear_tweaks += gear_tweak_collar_tag + gear_tweaks += GLOB.gear_tweak_collar_tag /datum/gear/collar/golden display_name = "collar, golden" diff --git a/code/modules/client/preference_setup/loadout/loadout_fluffitems.dm b/code/modules/client/preference_setup/loadout/loadout_fluffitems.dm index b53bd8fadc..26454590f4 100644 --- a/code/modules/client/preference_setup/loadout/loadout_fluffitems.dm +++ b/code/modules/client/preference_setup/loadout/loadout_fluffitems.dm @@ -25,7 +25,7 @@ /datum/gear/fluff/collar/New() ..() - gear_tweaks += gear_tweak_collar_tag + gear_tweaks += GLOB.gear_tweak_collar_tag /* CHOMPRemove Start Virgo Fluffitems // 0-9 CKEYS diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index 39e30f88ce..357408940b 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -36,7 +36,7 @@ */ // Assoc list containing all material datums indexed by name. -var/list/name_to_material +GLOBAL_LIST_EMPTY(name_to_material) //Returns the material the object is made of, if applicable. //Will we ever need to return more than one value here? Or should we just return the "dominant" material. @@ -95,21 +95,17 @@ var/list/name_to_material // Builds the datum list above. -/proc/populate_material_list(force_remake=0) - if(name_to_material && !force_remake) return // Already set up! - name_to_material = list() +/proc/populate_material_list() for(var/type in subtypesof(/datum/material)) var/datum/material/new_mineral = new type if(!new_mineral.name) continue - name_to_material[lowertext(new_mineral.name)] = new_mineral + GLOB.name_to_material[lowertext(new_mineral.name)] = new_mineral return 1 // Safety proc to make sure the material list exists before trying to grab from it. /proc/get_material_by_name(name) - if(!name_to_material) - populate_material_list() - return name_to_material[name] + return GLOB.name_to_material[name] /proc/material_display_name(name) if(istype(name, /datum/material)) //We were fed a datum. @@ -133,15 +129,12 @@ var/list/name_to_material * - The following elements are used to generate bespoke IDs */ /proc/_GetMaterialRef(list/arguments) - if(!name_to_material) - populate_material_list() - var/datum/material/key = arguments[1] if(istype(key)) return key // we want to convert anything we're given to a material if(istext(key)) // text ID - . = name_to_material[key] + . = GLOB.name_to_material[key] if(!.) WARNING("Attempted to fetch material ref with invalid text id '[key]'") return @@ -150,7 +143,7 @@ var/list/name_to_material CRASH("Attempted to fetch material ref with invalid key [key]") key = GetIdFromArguments(arguments) - . = name_to_material[key] + . = GLOB.name_to_material[key] if(!.) WARNING("Attempted to fetch nonexistent material with key [key]") diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index e93a1fa6ef..74130da747 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -246,8 +246,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/observer/dead/get_status_tab_items() . = ..() - if(emergency_shuttle) - var/eta_status = emergency_shuttle.get_status_panel_eta() + if(GLOB.emergency_shuttle) + var/eta_status = GLOB.emergency_shuttle.get_status_panel_eta() if(eta_status) . += "" . += "[eta_status]" diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index e4a3f35c8f..d828c42ea2 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -1,4 +1,4 @@ -var/list/_nymph_default_emotes = list( +GLOBAL_LIST_INIT(nymph_default_emotes, list( /decl/emote/visible, /decl/emote/visible/scratch, /decl/emote/visible/drool, @@ -22,7 +22,7 @@ var/list/_nymph_default_emotes = list( /decl/emote/audible/bug_hiss, /decl/emote/audible/bug_chitter, /decl/emote/audible/chirp -) +)) /mob/living/carbon/alien/diona name = "diona nymph" @@ -47,7 +47,7 @@ var/list/_nymph_default_emotes = list( var/obj/item/hat /mob/living/carbon/alien/diona/get_available_emotes() - return global._nymph_default_emotes.Copy() + return GLOB.nymph_default_emotes.Copy() /mob/living/carbon/alien/diona/Initialize(mapload) . = ..() diff --git a/code/modules/mob/living/carbon/alien/emote.dm b/code/modules/mob/living/carbon/alien/emote.dm index 5f38b60b4c..d23bfca0ca 100644 --- a/code/modules/mob/living/carbon/alien/emote.dm +++ b/code/modules/mob/living/carbon/alien/emote.dm @@ -1,4 +1,4 @@ -var/list/_alien_default_emotes = list( +GLOBAL_LIST_INIT(alien_default_emotes, list( /decl/emote/visible, /decl/emote/visible/scratch, /decl/emote/visible/drool, @@ -25,7 +25,7 @@ var/list/_alien_default_emotes = list( /decl/emote/audible/moan, /decl/emote/audible/gnarl, /decl/emote/audible/chirp -) +)) /mob/living/carbon/alien/get_available_emotes() - . = global._alien_default_emotes.Copy() + . = GLOB.alien_default_emotes.Copy() diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm index 2b03935572..40ece1911d 100644 --- a/code/modules/mob/living/carbon/brain/emote.dm +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -1,4 +1,4 @@ -var/list/_brain_default_emotes = list( +GLOBAL_LIST_INIT(brain_default_emotes, list( /decl/emote/audible/alarm, /decl/emote/audible/alert, /decl/emote/audible/notice, @@ -8,10 +8,10 @@ var/list/_brain_default_emotes = list( /decl/emote/audible/boop, /decl/emote/visible/blink, /decl/emote/visible/flash -) +)) /mob/living/carbon/brain/can_emote() return (istype(container, /obj/item/mmi) && ..()) /mob/living/carbon/brain/get_available_emotes() - return global._brain_default_emotes.Copy() + return GLOB.brain_default_emotes.Copy() diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index e395740978..10d1f849a9 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -1,4 +1,4 @@ -var/list/_human_default_emotes = list( +GLOBAL_LIST_INIT(human_default_emotes, list( /decl/emote/visible/blink, /decl/emote/audible/synth, /decl/emote/audible/synth/beep, @@ -99,7 +99,6 @@ var/list/_human_default_emotes = list( /decl/emote/visible/vomit, /decl/emote/visible/floorspin, /decl/emote/visible/flip, - //VOREStation Add /decl/emote/audible/bug_hiss, /decl/emote/audible/bug_buzz, /decl/emote/audible/bug_chitter, @@ -181,8 +180,8 @@ var/list/_human_default_emotes = list( /decl/emote/audible/caw2, /decl/emote/audible/caw_m, /decl/emote/audible/gwah, - //VOREStation Add End //CHOMP Add start + /decl/emote/audible/wheeze, /decl/emote/audible/prbt2, /decl/emote/audible/pain, /decl/emote/audible/mgeow, @@ -190,21 +189,17 @@ var/list/_human_default_emotes = list( /decl/emote/audible/xenogrowl, /decl/emote/audible/xenohiss, /decl/emote/audible/xenopurr, - /decl/emote/audible/gwah, /decl/emote/audible/wawa, /decl/emote/audible/malehumanscream, /decl/emote/audible/scientist/scream, /decl/emote/audible/scientist/pain, - /decl/emote/audible/caw, /decl/emote/audible/yip, /decl/emote/audible/tailthump, /decl/emote/audible/squeal, //CHOMP Add end -) +)) - //VOREStation Add Start - -var/list/_simple_mob_default_emotes = list( +GLOBAL_LIST_INIT(simple_mob_default_emotes, list( /decl/emote/visible/blink, /decl/emote/visible/nod, /decl/emote/visible/shake, @@ -348,27 +343,26 @@ var/list/_simple_mob_default_emotes = list( /decl/emote/audible/caw_m, /decl/emote/audible/gwah, //CHOMP Add start + /decl/emote/audible/wheeze, /decl/emote/audible/prbt2, /decl/emote/audible/pain, /decl/emote/audible/mgeow, /decl/emote/audible/xenogrowl, /decl/emote/audible/xenohiss, /decl/emote/audible/xenopurr, - /decl/emote/audible/caw, /decl/emote/audible/yip, /decl/emote/audible/tailthump, /decl/emote/audible/squeal, //CHOMP Add end - ) - //VOREStation Add End + )) /mob/living/carbon/human/get_available_emotes() - . = global._human_default_emotes.Copy() + . = GLOB.human_default_emotes.Copy() if(length(species?.default_emotes)) return . | species.default_emotes /mob/living/simple_mob/get_available_emotes() - . = global._simple_mob_default_emotes.Copy() + . = GLOB.simple_mob_default_emotes.Copy() /mob/living/carbon/human/verb/pose() set name = "Set Pose" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8d81901b98..d8a6b8a0b0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -100,8 +100,8 @@ . += "" . += "Intent: [a_intent]" . += "Move Mode: [m_intent]" - if(emergency_shuttle) - var/eta_status = emergency_shuttle.get_status_panel_eta() + if(GLOB.emergency_shuttle) + var/eta_status = GLOB.emergency_shuttle.get_status_panel_eta() if(eta_status) . += "[eta_status]" diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm index 319c67a52e..b93846f5b9 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm @@ -190,8 +190,8 @@ return TRUE // yup /mob/living/simple_mob/protean_blob/get_available_emotes() - var/list/fulllist = global._robot_default_emotes.Copy() - fulllist |= global._human_default_emotes //they're living nanites, they can make whatever sounds they want + var/list/fulllist = GLOB.robot_default_emotes.Copy() + fulllist |= GLOB.human_default_emotes //they're living nanites, they can make whatever sounds they want return fulllist /mob/living/simple_mob/protean_blob/update_misc_tabs() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index da768cf71a..99cd27572d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -404,7 +404,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( call_shuttle_proc(src) // hack to display shuttle timer - if(emergency_shuttle.online()) + if(GLOB.emergency_shuttle.online()) post_status(src, "shuttle", user = src) /mob/living/silicon/ai/proc/ai_recall_shuttle() @@ -557,7 +557,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( for (var/obj/machinery/camera/C in cameranet.cameras) if(!C.can_use()) continue - var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1) + var/list/tempnetwork = difflist(C.network, GLOB.restricted_camera_networks, 1) for(var/i in tempnetwork) cameralist[i] = i diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm index e791b2ee6a..0ae5d8db16 100644 --- a/code/modules/mob/living/silicon/emote.dm +++ b/code/modules/mob/living/silicon/emote.dm @@ -1,4 +1,4 @@ -var/list/_silicon_default_emotes = list( +GLOBAL_LIST_INIT(silicon_default_emotes, list( /decl/emote/audible/synth, /decl/emote/audible/synth/beep, /decl/emote/audible/synth/bing, @@ -13,15 +13,15 @@ var/list/_silicon_default_emotes = list( /decl/emote/audible/synth/microwave, /decl/emote/audible/synth/security, /decl/emote/audible/synth/security/halt -) +)) /mob/living/silicon/get_available_emotes() - return global._silicon_default_emotes.Copy() + return GLOB.silicon_default_emotes.Copy() /mob/living/silicon/pai/get_available_emotes() var/list/fulllist = list() - fulllist |= _silicon_default_emotes - fulllist |= _robot_default_emotes - fulllist |= _human_default_emotes + fulllist |= GLOB.silicon_default_emotes + fulllist |= GLOB.robot_default_emotes + fulllist |= GLOB.human_default_emotes return fulllist diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index 6f92802684..9e450c7d95 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -1,4 +1,4 @@ -var/list/_robot_default_emotes = list( +GLOBAL_LIST_INIT(robot_default_emotes, list( /decl/emote/audible/clap, /decl/emote/visible/bow, /decl/emote/visible/salute, @@ -29,13 +29,11 @@ var/list/_robot_default_emotes = list( /decl/emote/audible/synth/microwave, /decl/emote/audible/synth/security, /decl/emote/audible/synth/security/halt, - //VOREStation Add /decl/emote/visible/mlem, /decl/emote/visible/blep - //VOREStation Add End -) +)) /mob/living/silicon/robot/get_available_emotes() - var/list/fulllist = global._robot_default_emotes.Copy() - fulllist |= _human_default_emotes + var/list/fulllist = GLOB.robot_default_emotes.Copy() + fulllist |= GLOB.human_default_emotes return fulllist diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 81a73c6bad..67ccac8eb0 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -156,8 +156,8 @@ // this function displays the shuttles ETA in the status panel if the shuttle has been called /mob/living/silicon/proc/show_emergency_shuttle_eta() - if(emergency_shuttle) - var/eta_status = emergency_shuttle.get_status_panel_eta() + if(GLOB.emergency_shuttle) + var/eta_status = GLOB.emergency_shuttle.get_status_panel_eta() if(eta_status) . = "[eta_status]" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/synx.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/synx.dm index b4caacc493..aa30e0784e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/synx.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/synx.dm @@ -151,7 +151,7 @@ /mob/living/simple_mob/animal/synx/get_available_emotes() . = ..() - . |= _human_default_emotes //Synx are great at mimicking + . |= GLOB.human_default_emotes //Synx are great at mimicking /mob/living/simple_mob/animal/synx/ai //AI controlled variant diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/types.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/types.dm index bf321775c2..16c9e83f77 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/types.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/types.dm @@ -316,7 +316,7 @@ comp.dark_energy_infinite = TRUE /mob/living/simple_mob/shadekin/red/rakshasa/get_available_emotes() - . = global._simple_mob_default_emotes.Copy() + . = GLOB.simple_mob_default_emotes.Copy() . += /decl/emote/audible/evil_laugh . += /decl/emote/audible/evil_no . += /decl/emote/audible/evil_breathing diff --git a/code/modules/mob/living/voice/voice.dm b/code/modules/mob/living/voice/voice.dm index bd242a9a70..822ee9d4ca 100644 --- a/code/modules/mob/living/voice/voice.dm +++ b/code/modules/mob/living/voice/voice.dm @@ -148,5 +148,5 @@ //CHOMPEdit Start: Emotes! /mob/living/voice/get_available_emotes() - LAZYOR(., global._simple_mob_default_emotes) + LAZYOR(., GLOB.simple_mob_default_emotes) //CHOMPEdit End diff --git a/code/modules/organs/robolimbs_vr.dm b/code/modules/organs/robolimbs_vr.dm index 35a48b8a83..74f7f94e4b 100644 --- a/code/modules/organs/robolimbs_vr.dm +++ b/code/modules/organs/robolimbs_vr.dm @@ -2,24 +2,6 @@ GLOBAL_LIST_INIT(dsi_to_species, list(SPECIES_TAJARAN = "DSI - Tajaran", SPECIES SPECIES_VULPKANIN = "DSI - Vulpkanin", SPECIES_AKULA = "DSI - Akula", SPECIES_VASILISSAN = "DSI - Vasilissan", SPECIES_ZORREN = "DSI - Zorren",\ SPECIES_TESHARI = "DSI - Teshari", SPECIES_FENNEC = "DSI - Fennec")) -//CitRP Port -var/const/cyberbeast_monitor_styles = "blank=cyber_blank;\ - default=cyber_default;\ - eyes=eyes;\ - static=cyber_static;\ - alert=cyber_alert;\ - happy=cyber_happ;\ - unhappy=cyber_unhapp;\ - flat=cyber_flat;\ - sad=cyber_sad;\ - heart=cyber_heart;\ - cross=cyber_cross;\ - wave=cyber_wave;\ - uwu=cyber_uwu;\ - question=cyber_question;\ - lowpower=cyber_lowpower;\ - idle=cyber_idle;\ - nwn=cyber_nwn" // Placeholder for protean limbs during character spawning, before they have a properly set model /datum/robolimb/protean @@ -82,7 +64,7 @@ var/const/cyberbeast_monitor_styles = "blank=cyber_blank;\ unavailable_to_build = 1 parts = list(BP_HEAD) monitor_icon = 'icons/mob/monitor_icons_vr.dmi' - monitor_styles = cyberbeast_monitor_styles + monitor_styles = CYBERBEAST_MONITOR_STYLES /obj/item/disk/limb/cyber_beast company = "Cyber Tech" diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 1cc944b921..4f44c96fa0 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1125,7 +1125,7 @@ GLOBAL_LIST_EMPTY(apcs) equipment = autoset(equipment, 0) lighting = autoset(lighting, 0) environ = autoset(environ, 0) - power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) + GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) autoflag = 0 // update icon & area power if anything changed @@ -1149,27 +1149,27 @@ GLOBAL_LIST_EMPTY(apcs) lighting = autoset(lighting, 1) environ = autoset(environ, 1) autoflag = 3 - power_alarm.clearAlarm(loc, src) + GLOB.power_alarm.clearAlarm(loc, src) else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment if(autoflag != 2) equipment = autoset(equipment, 2) lighting = autoset(lighting, 1) environ = autoset(environ, 1) - power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) + GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) autoflag = 2 else if(cell.percent() <= 15) // <15%, turn off lighting & equipment if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0)) equipment = autoset(equipment, 2) lighting = autoset(lighting, 2) environ = autoset(environ, 1) - power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) + GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) autoflag = 1 else // zero charge, turn all off if(autoflag != 0) equipment = autoset(equipment, 0) lighting = autoset(lighting, 0) environ = autoset(environ, 0) - power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) + GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden) autoflag = 0 // val 0=off, 1=off(auto) 2=on 3=on(auto) @@ -1293,7 +1293,7 @@ GLOBAL_LIST_EMPTY(apcs) //start with main breaker off, chargemode in the default state and all channels on auto upon reboot operating = 0 chargemode = initial(chargemode) - power_alarm.clearAlarm(loc, src) + GLOB.power_alarm.clearAlarm(loc, src) lighting = POWERCHAN_ON_AUTO equipment = POWERCHAN_ON_AUTO diff --git a/code/modules/research/tg/machinery/_production.dm b/code/modules/research/tg/machinery/_production.dm index dc9bd988e8..f927be85c3 100644 --- a/code/modules/research/tg/machinery/_production.dm +++ b/code/modules/research/tg/machinery/_production.dm @@ -281,7 +281,7 @@ switch(action) if("remove_mat") - var/datum/material/material = name_to_material[params["id"]] + var/datum/material/material = GLOB.name_to_material[params["id"]] if(!istype(material)) return diff --git a/code/modules/scripting/Options.dm b/code/modules/scripting/Options.dm index 1dd35da43b..52c63f4f79 100644 --- a/code/modules/scripting/Options.dm +++ b/code/modules/scripting/Options.dm @@ -1,22 +1,22 @@ /* File: Options */ -var/const //Ascii values of characters - ascii_A =65 - ascii_Z =90 - ascii_a =97 - ascii_z =122 - ascii_DOLLAR = 36 // $ - ascii_ZERO=48 - ascii_NINE=57 - ascii_UNDERSCORE=95 // _ +//Ascii values of characters +#define ASCII_A 65 +#define ASCII_Z 90 +#define ASCII_LOWER_A 97 +#define ASCII_LOWER_Z 122 +#define ASCII_DOLLAR 36 // $ +#define ASCII_ZERO 48 +#define ASCII_NINE 57 +#define ASCII_UNDERSCORE 95 // _ /* Class: n_scriptOptions */ /n_scriptOptions/proc/CanStartID(char) //returns true if the character can start a variable, function, or keyword name (by default letters or an underscore) if(!isnum(char))char=text2ascii(char) - return (char in ascii_A to ascii_Z) || (char in ascii_a to ascii_z) || char==ascii_UNDERSCORE || char==ascii_DOLLAR + return (char in ASCII_A to ASCII_Z) || (char in ASCII_LOWER_A to ASCII_LOWER_Z) || char==ASCII_UNDERSCORE || char==ASCII_DOLLAR /n_scriptOptions/proc/IsValidIDChar(char) //returns true if the character can be in the body of a variable, function, or keyword name (by default letters, numbers, and underscore) if(!isnum(char))char=text2ascii(char) @@ -24,7 +24,7 @@ var/const //Ascii values of characters /n_scriptOptions/proc/IsDigit(char) if(!isnum(char))char=text2ascii(char) - return char in ascii_ZERO to ascii_NINE + return char in ASCII_ZERO to ASCII_NINE /n_scriptOptions/proc/IsValidID(id) //returns true if all the characters in the string are okay to be in an identifier name if(!CanStartID(id)) //don't need to grab first char in id, since text2ascii does it automatically @@ -98,3 +98,12 @@ associated values are types of which the proc w .=..() for(var/O in assign_operators+binary_operators+unary_operators) if(!symbols.Find(O)) symbols+=O + +#undef ASCII_A +#undef ASCII_Z +#undef ASCII_LOWER_A +#undef ASCII_LOWER_Z +#undef ASCII_DOLLAR +#undef ASCII_ZERO +#undef ASCII_NINE +#undef ASCII_UNDERSCORE diff --git a/code/modules/shuttles/escape_pods.dm b/code/modules/shuttles/escape_pods.dm index ecf7d5ef5c..9415897801 100644 --- a/code/modules/shuttles/escape_pods.dm +++ b/code/modules/shuttles/escape_pods.dm @@ -4,9 +4,9 @@ /datum/shuttle/autodock/ferry/escape_pod/New() move_time = move_time + rand(-30, 60) - if(name in emergency_shuttle.escape_pods) + if(name in GLOB.emergency_shuttle.escape_pods) CRASH("An escape pod with the name '[name]' has already been defined.") - emergency_shuttle.escape_pods[name] = src + GLOB.emergency_shuttle.escape_pods[name] = src ..() @@ -56,7 +56,7 @@ "docking_status" = docking_program.get_docking_status(), "override_enabled" = docking_program.override_enabled, "exterior_status" = docking_program.memory["door_status"], // TGUI DATA fails silently when there's no linked pod, leading to UI crashes - "can_force" = pod?.can_force() || (emergency_shuttle.departed && pod?.can_launch()), //allow players to manually launch ahead of time if the shuttle leaves + "can_force" = pod?.can_force() || (GLOB.emergency_shuttle.departed && pod?.can_launch()), //allow players to manually launch ahead of time if the shuttle leaves "armed" = pod?.arming_controller.armed, "internalTemplateName" = "EscapePodConsole", ) @@ -72,7 +72,7 @@ if("force_launch") if(pod.can_force()) pod.force_launch(src) - else if(emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves + else if(GLOB.emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves pod.launch(src) . = TRUE diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index ff49bd8e1b..1708ba0c46 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -7,9 +7,9 @@ /datum/shuttle/autodock/ferry/emergency/New() ..() radio_connection = SSradio.add_object(src, frequency, null) - if(emergency_shuttle.shuttle) + if(GLOB.emergency_shuttle.shuttle) CRASH("An emergency shuttle has already been defined.") - emergency_shuttle.shuttle = src + GLOB.emergency_shuttle.shuttle = src /datum/shuttle/autodock/ferry/emergency/arrived() . = ..() @@ -17,7 +17,7 @@ var/obj/machinery/computer/shuttle_control/emergency/C = in_use C.reset_authorization() - emergency_shuttle.shuttle_arrived() + GLOB.emergency_shuttle.shuttle_arrived() /datum/shuttle/autodock/ferry/emergency/long_jump(var/destination, var/interim, var/travel_time) if (!location) @@ -27,17 +27,17 @@ //update move_time and launch_time so we get correct ETAs move_time = travel_time - emergency_shuttle.launch_time = world.time + GLOB.emergency_shuttle.launch_time = world.time ..(destination, interim, travel_time, direction) /datum/shuttle/autodock/ferry/emergency/perform_shuttle_move() if (current_location == landmark_station) //leaving the station spawn(0) - emergency_shuttle.departed = 1 - var/estimated_time = round(emergency_shuttle.estimate_arrival_time()/60,1) + GLOB.emergency_shuttle.departed = 1 + var/estimated_time = round(GLOB.emergency_shuttle.estimate_arrival_time()/60,1) - if (emergency_shuttle.evac) + if (GLOB.emergency_shuttle.evac) priority_announcement.Announce(replacetext(replacetext(using_map.emergency_shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s")) else priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s")) //CHOMP reversion @@ -71,8 +71,8 @@ if (!can_launch(user)) return if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console - if (emergency_shuttle.autopilot) - emergency_shuttle.autopilot = 0 + if (GLOB.emergency_shuttle.autopilot) + GLOB.emergency_shuttle.autopilot = 0 to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Launch sequence initiated!")) if(usr) @@ -85,8 +85,8 @@ if (!can_force(user)) return if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console - if (emergency_shuttle.autopilot) - emergency_shuttle.autopilot = 0 + if (GLOB.emergency_shuttle.autopilot) + GLOB.emergency_shuttle.autopilot = 0 to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!")) if(usr) @@ -99,8 +99,8 @@ if (!can_cancel(user)) return if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console - if (emergency_shuttle.autopilot) - emergency_shuttle.autopilot = 0 + if (GLOB.emergency_shuttle.autopilot) + GLOB.emergency_shuttle.autopilot = 0 to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Launch sequence aborted!")) if(usr) diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index 46e734aab1..3d4d720a95 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -1,5 +1,3 @@ -var/list/spells = typesof(/spell) //needed for the badmin verb for now - /spell var/name = "Spell" var/desc = "A spell" diff --git a/code/modules/tgui/modules/alarm.dm b/code/modules/tgui/modules/alarm.dm index 9e1615c453..6ed400d5b9 100644 --- a/code/modules/tgui/modules/alarm.dm +++ b/code/modules/tgui/modules/alarm.dm @@ -25,7 +25,7 @@ /datum/tgui_module/alarm_monitor/engineering /datum/tgui_module/alarm_monitor/engineering/New() ..() - alarm_handlers = list(atmosphere_alarm, fire_alarm, power_alarm) + alarm_handlers = list(GLOB.atmosphere_alarm, GLOB.fire_alarm, GLOB.power_alarm) // Subtype for glasses_state /datum/tgui_module/alarm_monitor/engineering/glasses @@ -44,7 +44,7 @@ /datum/tgui_module/alarm_monitor/security /datum/tgui_module/alarm_monitor/security/New() ..() - alarm_handlers = list(camera_alarm, motion_alarm) + alarm_handlers = list(GLOB.camera_alarm, GLOB.motion_alarm) // Subtype for glasses_state /datum/tgui_module/alarm_monitor/security/glasses diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index 58eef61a6c..a2c54e8630 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -145,12 +145,12 @@ data["msg_cooldown"] = message_cooldown ? (round((message_cooldown - world.time) / 10)) : 0 data["cc_cooldown"] = centcomm_message_cooldown ? (round((centcomm_message_cooldown - world.time) / 10)) : 0 - data["esc_callable"] = emergency_shuttle.location() && !emergency_shuttle.online() ? TRUE : FALSE - data["esc_recallable"] = emergency_shuttle.location() && emergency_shuttle.online() ? TRUE : FALSE + data["esc_callable"] = GLOB.emergency_shuttle.location() && !GLOB.emergency_shuttle.online() ? TRUE : FALSE + data["esc_recallable"] = GLOB.emergency_shuttle.location() && GLOB.emergency_shuttle.online() ? TRUE : FALSE data["esc_status"] = FALSE - if(emergency_shuttle.has_eta()) - var/timeleft = emergency_shuttle.estimate_arrival_time() - data["esc_status"] = emergency_shuttle.online() ? "ETA:" : "RECALLING:" + if(GLOB.emergency_shuttle.has_eta()) + var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time() + data["esc_status"] = GLOB.emergency_shuttle.online() ? "ETA:" : "RECALLING:" data["esc_status"] += " [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]" return data @@ -276,7 +276,7 @@ if(response == "Yes") //CHOMPEdit End call_shuttle_proc(ui.user) - if(emergency_shuttle.online()) + if(GLOB.emergency_shuttle.online()) post_status(src, "shuttle", user = ui.user) setMenuState(ui.user, COMM_SCREEN_MAIN) @@ -385,7 +385,7 @@ PS.allowedtocall = !(PS.allowedtocall) /proc/call_shuttle_proc(var/mob/user) - if ((!( SSticker ) || !emergency_shuttle.location())) + if ((!( SSticker ) || !GLOB.emergency_shuttle.location())) return if(!GLOB.universe.OnShuttleCall(user)) @@ -396,7 +396,7 @@ to_chat(user, "[using_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.") return - if(emergency_shuttle.deny_shuttle) + if(GLOB.emergency_shuttle.deny_shuttle) to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.") return @@ -404,11 +404,11 @@ to_chat(user, "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again.") return - if(emergency_shuttle.going_to_centcom()) + if(GLOB.emergency_shuttle.going_to_centcom()) to_chat(user, "The emergency shuttle may not be called while returning to [using_map.boss_short].") return - if(emergency_shuttle.online()) + if(GLOB.emergency_shuttle.online()) to_chat(user, "The emergency shuttle is already on its way.") return @@ -416,7 +416,7 @@ to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") return - emergency_shuttle.call_evac() + GLOB.emergency_shuttle.call_evac() log_game("[key_name(user)] has called the shuttle.") message_admins("[key_name_admin(user)] has called the shuttle.", 1) admin_chat_message(message = "Emergency evac beginning! Called by [key_name(user)]!", color = "#CC2222") //VOREStation Add @@ -424,20 +424,20 @@ return /proc/init_shift_change(var/mob/user, var/force = 0) - if ((!( SSticker ) || !emergency_shuttle.location())) + if ((!( SSticker ) || !GLOB.emergency_shuttle.location())) return - if(emergency_shuttle.going_to_centcom()) + if(GLOB.emergency_shuttle.going_to_centcom()) to_chat(user, "The shuttle may not be called while returning to [using_map.boss_short].") return - if(emergency_shuttle.online()) + if(GLOB.emergency_shuttle.online()) to_chat(user, "The shuttle is already on its way.") return // if force is 0, some things may stop the shuttle call if(!force) - if(emergency_shuttle.deny_shuttle) + if(GLOB.emergency_shuttle.deny_shuttle) to_chat(user, "[using_map.boss_short] does not currently have a shuttle available in your sector. Please try again later.") return @@ -451,13 +451,13 @@ if(SSticker.mode.auto_recall_shuttle) //New version pretends to call the shuttle but cause the shuttle to return after a random duration. - emergency_shuttle.auto_recall = 1 + GLOB.emergency_shuttle.auto_recall = 1 if(SSticker.mode.name == "blob" || SSticker.mode.name == "epidemic") to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") return - emergency_shuttle.call_transfer() + GLOB.emergency_shuttle.call_transfer() //delay events in case of an autotransfer if (isnull(user)) @@ -471,13 +471,13 @@ return /proc/cancel_call_proc(var/mob/user) - if (!( SSticker ) || !emergency_shuttle.can_recall()) + if (!( SSticker ) || !GLOB.emergency_shuttle.can_recall()) return if((SSticker.mode.name == "blob")||(SSticker.mode.name == "Meteor")) return - if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to CentCom - emergency_shuttle.recall() + if(!GLOB.emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to CentCom + GLOB.emergency_shuttle.recall() log_game("[key_name(user)] has recalled the shuttle.") message_admins("[key_name_admin(user)] has recalled the shuttle.", 1) return diff --git a/code/modules/tgui/modules/late_choices.dm b/code/modules/tgui/modules/late_choices.dm index a65ec3b9a0..acb4d05d14 100644 --- a/code/modules/tgui/modules/late_choices.dm +++ b/code/modules/tgui/modules/late_choices.dm @@ -62,10 +62,10 @@ data["name"] = name data["duration"] = roundduration2text() - if(emergency_shuttle?.going_to_centcom()) + if(GLOB.emergency_shuttle?.going_to_centcom()) data["evac"] = "Gone" - else if(emergency_shuttle?.online()) - if(emergency_shuttle.evac) + else if(GLOB.emergency_shuttle?.online()) + if(GLOB.emergency_shuttle.evac) data["evac"] = "Emergency" else data["evac"] = "Crew Transfer" diff --git a/code/modules/unit_tests/material_tests.dm b/code/modules/unit_tests/material_tests.dm index d276f2ff07..15c3f98619 100644 --- a/code/modules/unit_tests/material_tests.dm +++ b/code/modules/unit_tests/material_tests.dm @@ -5,9 +5,8 @@ /datum/unit_test/materials_shall_have_names/Run() var/list/failures = list() - populate_material_list() - for(var/name in global.name_to_material) - var/datum/material/mat = global.name_to_material[name] + for(var/name, value in GLOB.name_to_material) + var/datum/material/mat = value if(!mat) continue // how did we get here? if(!mat.display_name || !mat.use_name || !mat.sheet_singular_name || !mat.sheet_plural_name || !mat.sheet_collective_name) diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index f0360faaba..0106f305e8 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -1,8 +1,3 @@ -var/list/ventcrawl_machinery = list( - /obj/machinery/atmospherics/unary/vent_pump, - /obj/machinery/atmospherics/unary/vent_scrubber - ) - /mob/living/var/list/icon/pipes_shown = list() /mob/living/var/last_played_vent /mob/living/var/is_ventcrawling = FALSE @@ -126,7 +121,7 @@ var/list/ventcrawl_machinery = list( return ..() /mob/living/AltClickOn(var/atom/A) - if(is_type_in_list(A,ventcrawl_machinery)) + if(is_type_in_list(A, GLOB.ventcrawl_machinery)) handle_ventcrawl(A) return 1 return ..() @@ -135,7 +130,7 @@ var/list/ventcrawl_machinery = list( var/atom/pipe var/list/pipes = list() for(var/obj/machinery/atmospherics/unary/U in range(1)) - if(is_type_in_list(U,ventcrawl_machinery) && Adjacent(U) && !U.welded) + if(is_type_in_list(U, GLOB.ventcrawl_machinery) && Adjacent(U) && !U.welded) pipes |= U if(!pipes || !pipes.len) to_chat(src, "There are no pipes that you can ventcrawl into within range!") @@ -164,7 +159,7 @@ var/list/ventcrawl_machinery = list( if(!vent_found) for(var/obj/machinery/atmospherics/machine in range(1,src)) - if(is_type_in_list(machine, ventcrawl_machinery)) + if(is_type_in_list(machine, GLOB.ventcrawl_machinery)) vent_found = machine if(!vent_found || !vent_found.can_crawl_through()) diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm index 8b5c11c386..f6d21afe76 100644 --- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm +++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm @@ -32,7 +32,7 @@ /obj/machinery/atmospherics/proc/ventcrawl_to(var/mob/living/user, var/obj/machinery/atmospherics/target_move, var/direction) if(target_move) - if(is_type_in_list(target_move, ventcrawl_machinery) && target_move.can_crawl_through()) + if(is_type_in_list(target_move, GLOB.ventcrawl_machinery) && target_move.can_crawl_through()) user.remove_ventcrawl() user.forceMove(target_move.loc) //handles entering and so on user.visible_message("You hear something squeezing through the ducts.", "You climb out the ventilation system.") @@ -56,7 +56,7 @@ T.runechat_message(message) else - if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent + if((direction & initialize_directions) || is_type_in_list(src, GLOB.ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent user.remove_ventcrawl() user.forceMove(src.loc) SEND_SIGNAL(user,COMSIG_MOB_VENTCRAWL_END,src) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 3c47deadd2..5f0cc56ae8 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -924,7 +924,7 @@ ) if(O.material in rock_munch) nom = rock_munch[O.material] - M = name_to_material[O.material] + M = GLOB.name_to_material[O.material] else if(istype(O, /obj/item/ore/slag)) nom = list("nutrition" = 15, "remark" = "You taste dusty, crunchy mistakes. This is a travesty... but at least it is an edible one.", "WTF" = FALSE) else //Random rock. @@ -965,7 +965,7 @@ var/obj/item/stack/material/stack = O.split(1) //A little off the top. I = stack nom = refined_taste[O.default_type] - M = name_to_material[O.default_type] + M = GLOB.name_to_material[O.default_type] else if(istype(I, /obj/item/entrepreneur/crystal)) nom = list("nutrition" = 100, "remark" = "The crytal was particularly brittle and not difficult to break apart, but the inside was incredibly flavoursome. Though devoid of any actual healing power, it seems to be very nutritious!", "WTF" = FALSE) diff --git a/maps/common/common_things.dm b/maps/common/common_things.dm index 0334418967..7e4b22bb4a 100644 --- a/maps/common/common_things.dm +++ b/maps/common/common_things.dm @@ -146,7 +146,7 @@ spawnpoint_type = /datum/spawnpoint/tram /obj/machinery/cryopod/robot/door/tram/process() - if(emergency_shuttle.online() || emergency_shuttle.returned()) + if(GLOB.emergency_shuttle.online() || GLOB.emergency_shuttle.returned()) // Transform into a door! But first despawn anyone inside time_till_despawn = 0 ..() diff --git a/modular_chomp/code/game/objects/items/weapons/RCD.dm b/modular_chomp/code/game/objects/items/weapons/RCD.dm index 2135983fdf..6572878dee 100644 --- a/modular_chomp/code/game/objects/items/weapons/RCD.dm +++ b/modular_chomp/code/game/objects/items/weapons/RCD.dm @@ -823,7 +823,7 @@ rborosilicate = 12 var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built. // Apparently set_material(...) for walls requires refs to the material singletons and not strings. // This is different from how other material objects with their own set_material(...) do it, but whatever. - var/datum/material/M = name_to_material[the_rcd.material_to_use] + var/datum/material/M = GLOB.name_to_material[the_rcd.material_to_use] new_T.set_material(M, the_rcd.make_rwalls ? M : null, girder_material) new_T.add_hiddenprint(user) qdel(src) diff --git a/modular_chomp/code/modules/mob/living/emote.dm b/modular_chomp/code/modules/mob/living/emote.dm deleted file mode 100644 index 4a2c95f9a8..0000000000 --- a/modular_chomp/code/modules/mob/living/emote.dm +++ /dev/null @@ -1,9 +0,0 @@ -/world/New() - . = ..() - //add stuff to default emote vars specifically for chomp. - - //human default emotes - _human_default_emotes += /decl/emote/audible/wheeze - - //simple_mob default emotes - _simple_mob_default_emotes += /decl/emote/audible/wheeze diff --git a/vorestation.dme b/vorestation.dme index dd175a4ad4..4e8181a6e1 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -383,7 +383,6 @@ #include "code\_global_vars\lists\species.dm" #include "code\_global_vars\traits\_traits.dm" #include "code\_helpers\_global_objects.dm" -#include "code\_helpers\_global_objects_vr.dm" #include "code\_helpers\_lists.dm" #include "code\_helpers\admin.dm" #include "code\_helpers\announcements.dm" @@ -5390,7 +5389,6 @@ #include "modular_chomp\code\modules\mining\tools.dm" #include "modular_chomp\code\modules\mob\dead\observer\observer.dm" #include "modular_chomp\code\modules\mob\language\language.dm" -#include "modular_chomp\code\modules\mob\living\emote.dm" #include "modular_chomp\code\modules\mob\living\living.dm" #include "modular_chomp\code\modules\mob\living\carbon\carbon.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\emote.dm"