From 21dcf0555b7dfc25778357a9e144f165ea8cf792 Mon Sep 17 00:00:00 2001 From: Selis <12716288+ItsSelis@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:16:53 +0200 Subject: [PATCH] Conversion many Globals to Managed Globals (Part 1) (#17121) * Conversion of some Globals to Managed Globals * Fix * for later --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/__defines/talksounds.dm | 28 +-- code/_helpers/global_lists.dm | 2 +- code/_helpers/global_lists_vr.dm | 147 ++++++------ code/_helpers/matrices.dm | 8 +- code/_helpers/names.dm | 26 +- code/controllers/master_controller.dm | 7 +- code/controllers/subsystems/inactivity.dm | 2 +- code/controllers/subsystems/nightshift.dm | 2 +- code/controllers/subsystems/ticker.dm | 2 +- code/controllers/verbs.dm | 4 +- code/datums/EPv2.dm | 14 +- code/datums/datacore.dm | 10 +- code/datums/mind.dm | 14 +- code/datums/roundstats/roundstats.dm | 12 +- code/datums/supplypacks/supplypacks.dm | 40 ++-- code/defines/obj.dm | 4 +- code/game/antagonist/_antagonist_setup.dm | 34 +-- code/game/antagonist/antagonist_panel.dm | 2 +- code/game/antagonist/station/cultist.dm | 4 +- code/game/antagonist/station/traitor.dm | 8 +- code/game/area/areas.dm | 24 +- code/game/birthday.dm | 12 +- code/game/dna/dna2.dm | 10 +- code/game/dna/dna2_helpers.dm | 6 +- code/game/dna/genes/gene.dm | 2 +- code/game/gamemodes/calamity/calamity.dm | 4 +- code/game/gamemodes/cult/hell_universe.dm | 2 +- code/game/gamemodes/cult/ritual.dm | 222 +++++++++--------- code/game/gamemodes/cult/runes.dm | 44 ++-- .../endgame/supermatter_cascade/blob.dm | 2 +- .../endgame/supermatter_cascade/universe.dm | 4 +- code/game/gamemodes/events.dm | 4 +- .../gamemodes/events/holidays/Holidays.dm | 4 +- code/game/gamemodes/events/holidays/Other.dm | 4 +- code/game/gamemodes/game_mode.dm | 28 +-- code/game/gamemodes/meteor/meteor.dm | 2 +- code/game/gamemodes/meteor/meteors.dm | 2 +- code/game/gamemodes/nuclear/nuclear.dm | 8 +- code/game/gamemodes/nuclear/pinpointer.dm | 4 +- code/game/gamemodes/objective.dm | 14 +- code/game/gamemodes/setupgame.dm | 2 +- .../devices/disposable_teleporter.dm | 4 +- code/game/jobs/access.dm | 2 +- code/game/jobs/job/silicon.dm | 2 +- code/game/jobs/job_controller.dm | 2 +- code/game/jobs/whitelist.dm | 24 +- code/game/jobs/whitelist_vr.dm | 8 +- code/game/machinery/Sleeper.dm | 2 +- code/game/machinery/camera/presets.dm | 8 +- code/game/machinery/computer/ai_core.dm | 12 +- code/game/machinery/computer/arcade.dm | 12 +- code/game/machinery/computer/camera.dm | 2 +- code/game/machinery/computer/card.dm | 2 +- code/game/machinery/computer/medical.dm | 4 +- code/game/machinery/computer/prisoner.dm | 2 +- code/game/machinery/computer/prisonshuttle.dm | 62 ++--- code/game/machinery/computer/security.dm | 4 +- code/game/machinery/computer/skills.dm | 16 +- code/game/machinery/computer/supply.dm | 2 +- code/game/machinery/cryopod.dm | 6 +- code/game/machinery/doppler_array.dm | 6 +- code/game/machinery/fire_alarm.dm | 2 +- code/game/machinery/frame.dm | 12 +- code/game/machinery/gear_dispenser.dm | 2 +- code/game/machinery/holoposter.dm | 4 +- code/game/machinery/navbeacon.dm | 6 +- code/game/machinery/nuclear_bomb.dm | 18 +- code/game/machinery/requests_console.dm | 42 ++-- code/game/machinery/telecomms/broadcaster.dm | 20 +- code/game/machinery/wall_frames.dm | 4 +- code/game/magic/Uristrunes.dm | 57 +++-- code/game/mecha/mech_prosthetics.dm | 16 +- code/game/objects/effects/landmarks_vr.dm | 4 +- code/game/objects/explosion.dm | 4 +- code/game/objects/items/antag_spawners.dm | 2 +- .../items/devices/communicator/UI_tgui.dm | 2 +- .../devices/communicator/communicator.dm | 10 +- .../items/devices/communicator/messaging.dm | 2 +- .../items/devices/communicator/phone.dm | 2 +- .../items/devices/scanners/sleevemate.dm | 4 +- .../objects/items/devices/ticket_printer.dm | 2 +- .../items/devices/uplink_random_lists.dm | 4 +- code/game/objects/items/toys/mech_toys.dm | 4 +- code/game/objects/items/weapons/canes.dm | 4 +- .../circuitboards/computer/camera_monitor.dm | 2 +- code/game/objects/items/weapons/handcuffs.dm | 2 +- .../objects/items/weapons/implants/implant.dm | 2 +- .../objects/items/weapons/melee/energy.dm | 2 +- code/game/objects/items/weapons/scrolls.dm | 4 +- code/game/objects/micro_structures.dm | 8 +- .../objects/structures/ghost_pods/human.dm | 4 +- .../objects/structures/ghost_pods/survivor.dm | 2 +- code/game/objects/structures/kitchen_spike.dm | 2 +- code/game/objects/structures/watercloset.dm | 2 +- code/game/response_team.dm | 50 ++-- code/game/sound.dm | 36 +-- code/game/trader_visit.dm | 20 +- code/game/turfs/flooring/seasonal.dm | 40 ++-- code/game/turfs/simulated/floor_icon.dm | 2 +- code/modules/admin/DB ban/functions.dm | 4 +- code/modules/admin/admin.dm | 14 +- code/modules/admin/admin_verbs.dm | 6 +- code/modules/admin/player_panel.dm | 4 +- code/modules/admin/topic.dm | 10 +- code/modules/admin/verbs/change_appearance.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/artifice/cursedform.dm | 2 +- .../awaymissions/bluespaceartillery.dm | 4 +- .../preference_setup/general/03_body.dm | 12 +- .../client/preference_setup/vore/02_size.dm | 34 +-- .../client/preference_setup/vore/03_egg.dm | 4 +- .../client/preference_setup/vore/06_vantag.dm | 8 +- .../client/preference_setup/vore/07_traits.dm | 46 ++-- .../client/preference_setup/vore/09_misc.dm | 8 +- code/modules/client/preferences.dm | 4 +- .../rig/modules/specific/crusher_gauntlets.dm | 2 +- code/modules/economy/ATM.dm | 18 +- code/modules/economy/Accounts.dm | 20 +- code/modules/economy/Accounts_DB.dm | 30 +-- code/modules/economy/EFTPOS.dm | 10 +- code/modules/economy/cash_register.dm | 12 +- code/modules/economy/economy_misc.dm | 60 ++--- code/modules/economy/retail_scanner.dm | 12 +- code/modules/economy/vending.dm | 10 +- code/modules/emotes/custom_emote.dm | 2 +- code/modules/emotes/emote_define.dm | 4 +- code/modules/env_message/env_message.dm | 8 +- code/modules/events/event_dynamic.dm | 8 +- code/modules/events/grubinfestation_vr.dm | 2 +- code/modules/events/money_hacker.dm | 6 +- code/modules/events/money_lotto.dm | 6 +- code/modules/events/random_antagonist.dm | 4 +- code/modules/events/roaming_wildlife.dm | 2 +- code/modules/events/supply_demand_vr.dm | 2 +- .../event2/events/command/money_hacker.dm | 8 +- .../event2/events/command/raise_funds.dm | 4 +- .../event2/events/everyone/random_antag.dm | 4 +- code/modules/games/cards.dm | 2 +- code/modules/genetics/side_effects.dm | 2 +- code/modules/ghosttrap/trap.dm | 10 +- .../integrated_electronics/_defines.dm | 4 +- .../integrated_electronics/core/tools.dm | 28 +-- .../subtypes/illegal.dm | 2 +- code/modules/library/lib_machines.dm | 2 +- code/modules/mob/dead/observer/free_vr.dm | 8 +- code/modules/mob/dead/observer/observer.dm | 6 +- code/modules/mob/gender.dm | 4 +- code/modules/mob/living/bot/bot.dm | 4 +- code/modules/mob/living/bot/mulebot.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 6 +- .../carbon/human/descriptors/_descriptors.dm | 4 +- code/modules/mob/living/carbon/human/emote.dm | 2 +- .../mob/living/carbon/human/examine.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 12 +- .../living/carbon/human/human_attackhand.dm | 4 +- .../carbon/human/human_modular_limbs.dm | 6 +- .../mob/living/carbon/human/human_organs.dm | 2 +- .../mob/living/carbon/human/human_powers.dm | 2 +- .../living/carbon/human/human_powers_vr.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 +- .../living/carbon/human/species/species.dm | 2 +- .../carbon/human/species/species_attack.dm | 4 +- .../carbon/human/species/station/monkey.dm | 2 +- .../species/station/protean/protean_powers.dm | 4 +- .../station/station_special_abilities.dm | 8 +- .../species/station/traits/traits_tutorial.dm | 2 +- .../mob/living/carbon/human/unarmed_attack.dm | 14 +- code/modules/mob/living/living_vr.dm | 2 +- code/modules/mob/living/login.dm | 2 +- code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../modules/mob/living/silicon/ai/latejoin.dm | 6 +- .../living/silicon/pai/software_modules.dm | 4 +- .../mob/living/silicon/robot/drone/drone.dm | 4 +- .../modules/mob/living/silicon/robot/robot.dm | 4 +- .../living/silicon/robot/robot_ui_module.dm | 2 +- code/modules/mob/living/simple_mob/defense.dm | 2 +- .../subtypes/animal/alien animals/teppi.dm | 6 +- .../subtypes/animal/sif/grafadreka.dm | 4 +- .../simple_mob/subtypes/animal/squirrel.dm | 2 +- .../simple_mob/subtypes/illusion/illusion.dm | 2 +- .../simple_mob/subtypes/vore/solargrub.dm | 4 +- .../subtypes/vore/solargrub_larva.dm | 12 +- code/modules/mob/mob.dm | 8 +- code/modules/mob/mob_grab.dm | 4 +- code/modules/mob/mob_grab_specials.dm | 2 +- code/modules/mob/new_player/new_player.dm | 4 +- code/modules/mob/new_player/new_player_vr.dm | 6 +- code/modules/mob/say_vr.dm | 4 +- code/modules/mob/theme_lists.dm | 18 +- .../file_system/computer_file.dm | 6 +- .../modular_computers/laptop_vendor.dm | 2 +- code/modules/organs/organ_external.dm | 6 +- code/modules/organs/organ_icon.dm | 6 +- code/modules/organs/robolimbs.dm | 22 +- code/modules/organs/subtypes/standard.dm | 4 +- code/modules/overmap/helpers.dm | 2 +- code/modules/overmap/sectors.dm | 4 +- code/modules/overmap/turfs.dm | 2 +- code/modules/paperwork/faxmachine.dm | 28 +-- code/modules/paperwork/paper.dm | 2 +- code/modules/paperwork/paper_bundle.dm | 2 +- code/modules/paperwork/papershredder.dm | 2 +- code/modules/paperwork/photography.dm | 4 +- code/modules/pda/core_apps.dm | 2 +- code/modules/power/cable.dm | 12 +- code/modules/power/fusion/fusion_reactions.dm | 24 +- code/modules/power/supermatter/supermatter.dm | 4 +- code/modules/projectiles/gun.dm | 2 +- .../projectiles/guns/energy/gunsword_vr.dm | 2 +- .../modules/projectiles/projectile/special.dm | 2 +- code/modules/random_map/drop/droppod.dm | 4 +- code/modules/reagents/Chemistry-Logging.dm | 6 +- code/modules/research/message_server.dm | 2 +- code/modules/research/prosfab_designs.dm | 8 +- .../security levels/security levels.dm | 30 +-- code/modules/spells/general/area_teleport.dm | 6 +- code/modules/spells/general/rune_write.dm | 140 +++++------ code/modules/tgui/modules/communications.dm | 10 +- code/modules/tgui/modules/crew_manifest.dm | 2 +- .../modules/tgui/modules/ntos-only/cardmod.dm | 2 +- code/modules/vore/eating/belly_import.dm | 22 +- code/modules/vore/eating/belly_obj_vr.dm | 12 +- code/modules/vore/eating/contaminate_vr.dm | 2 +- code/modules/vore/eating/leave_remains_vr.dm | 2 +- code/modules/vore/eating/living_vr.dm | 4 +- code/modules/vore/eating/vorepanel_vr.dm | 26 +- code/modules/vore/resizing/resize_vr.dm | 4 +- code/unit_tests/map_tests.dm | 4 +- maps/~map_system/maps.dm | 4 +- 229 files changed, 1227 insertions(+), 1220 deletions(-) diff --git a/code/__defines/talksounds.dm b/code/__defines/talksounds.dm index 4f01b4fb2f..fdd08d759e 100644 --- a/code/__defines/talksounds.dm +++ b/code/__defines/talksounds.dm @@ -19,20 +19,20 @@ var/list/talk_sound_map = rlist( // "xeno speak" // Does not exist on virgo ), list( - talk_sound, - goon_speak_one_sound, - goon_speak_two_sound, - goon_speak_three_sound, - goon_speak_four_sound, - goon_speak_blub_sound, - goon_speak_bottalk_sound, - goon_speak_buwoo_sound, - goon_speak_cow_sound, - goon_speak_lizard_sound, - goon_speak_pug_sound, - goon_speak_pugg_sound, - goon_speak_roach_sound, - goon_speak_skelly_sound, + GLOB.talk_sound, + GLOB.goon_speak_one_sound, + GLOB.goon_speak_two_sound, + GLOB.goon_speak_three_sound, + GLOB.goon_speak_four_sound, + GLOB.goon_speak_blub_sound, + GLOB.goon_speak_bottalk_sound, + GLOB.goon_speak_buwoo_sound, + GLOB.goon_speak_cow_sound, + GLOB.goon_speak_lizard_sound, + GLOB.goon_speak_pug_sound, + GLOB.goon_speak_pugg_sound, + GLOB.goon_speak_roach_sound, + GLOB.goon_speak_skelly_sound, // xeno_speak_sound // Does not exist on virgo ) ) diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 5835ec5d7d..0b7447b2ec 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -371,7 +371,7 @@ GLOBAL_LIST_EMPTY(legacy_globals) GLOB.legacy_globals["visual_nets"] = visual_nets GLOB.legacy_globals["cameranet"] = cameranet GLOB.legacy_globals["cultnet"] = cultnet - GLOB.legacy_globals["existing_solargrubs"] = existing_solargrubs + GLOB.legacy_globals["existing_solargrubs"] = GLOB.existing_solargrubs var/global/list/selectable_footstep = list( "Default" = FOOTSTEP_MOB_HUMAN, diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index 31117e0f9b..570381a4e9 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -3,42 +3,42 @@ */ var/global/list/hair_accesories_list= list()// Stores /datum/sprite_accessory/hair_accessory indexed by type -var/global/list/negative_traits = list() // Negative custom species traits, indexed by path -var/global/list/neutral_traits = list() // Neutral custom species traits, indexed by path -var/global/list/positive_traits = list() // Positive custom species traits, indexed by path -var/global/list/everyone_traits_positive = list() // Neutral traits available to all species, indexed by path -var/global/list/everyone_traits_neutral = list() // Neutral traits available to all species, indexed by path -var/global/list/everyone_traits_negative = list() // Neutral traits available to all species, indexed by path -var/global/list/traits_costs = list() // Just path = cost list, saves time in char setup -var/global/list/all_traits = list() // All of 'em at once (same instances) +GLOBAL_LIST_EMPTY(negative_traits) // Negative custom species traits, indexed by path +GLOBAL_LIST_EMPTY(neutral_traits) // Neutral custom species traits, indexed by path +GLOBAL_LIST_EMPTY(positive_traits) // Positive custom species traits, indexed by path +GLOBAL_LIST_EMPTY(everyone_traits_positive) // Neutral traits available to all species, indexed by path +GLOBAL_LIST_EMPTY(everyone_traits_neutral) // Neutral traits available to all species, indexed by path +GLOBAL_LIST_EMPTY(everyone_traits_negative) // Neutral traits available to all species, indexed by path +GLOBAL_LIST_EMPTY(traits_costs) // Just path = cost list, saves time in char setup +GLOBAL_LIST_EMPTY(all_traits) // All of 'em at once (same instances) var/global/list/active_ghost_pods = list() //Global vars for making the overmap_renamer subsystem. //Collects all instances by reference of visitable overmap objects of /obj/effect/overmap/visitable like the debris field. var/global/list/visitable_overmap_object_instances = list() -var/global/list/sensorpreflist = list("Off", "Binary", "Vitals", "Tracking", "No Preference") +GLOBAL_LIST_INIT(sensorpreflist, list("Off", "Binary", "Vitals", "Tracking", "No Preference")) // Used by the ban panel to determine what departments are offmap departments. All these share an 'offmap roles' ban. -var/global/list/offmap_departments = list(DEPARTMENT_TALON) +GLOBAL_LIST_INIT(offmap_departments, list(DEPARTMENT_TALON)) // Closets have magic appearances GLOBAL_LIST_EMPTY(closet_appearances) //stores numeric player size options indexed by name -var/global/list/player_sizes_list = list( +GLOBAL_LIST_INIT(player_sizes_list, list( "Macro" = RESIZE_HUGE, "Big" = RESIZE_BIG, "Normal" = RESIZE_NORMAL, "Small" = RESIZE_SMALL, - "Tiny" = RESIZE_TINY) + "Tiny" = RESIZE_TINY)) //stores vantag settings indexed by name -var/global/list/vantag_choices_list = list( +GLOBAL_LIST_INIT(vantag_choices_list, list( VANTAG_NONE = "No Involvement", VANTAG_VORE = "Be Prey", VANTAG_KIDNAP = "Be Kidnapped", - VANTAG_KILL = "Be Killed") + VANTAG_KILL = "Be Killed")) //Blacklist to exclude items from object ingestion. Digestion blacklist located in digest_act_vr.dm var/global/list/item_vore_blacklist = list( @@ -53,7 +53,7 @@ var/global/list/item_vore_blacklist = list( /obj/item/clothing/suit/storage/hooded/wintercoat/roiz) //Classic Vore sounds -var/global/list/classic_vore_sounds = list( +GLOBAL_LIST_INIT(classic_vore_sounds, list( "Gulp" = 'sound/vore/gulp.ogg', "Insert" = 'sound/vore/insert.ogg', "Insertion1" = 'sound/vore/insertion1.ogg', @@ -70,9 +70,10 @@ var/global/list/classic_vore_sounds = list( "Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg', "Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg', "Zipper" = 'sound/items/zip.ogg', - "None" = null) + "None" = null + )) -var/global/list/classic_release_sounds = list( +GLOBAL_LIST_INIT(classic_release_sounds, list( "Rustle (cloth)" = 'sound/effects/rustle1.ogg', "Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg', "Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg', @@ -81,10 +82,10 @@ var/global/list/classic_release_sounds = list( "Zipper" = 'sound/items/zip.ogg', "Splatter" = 'sound/effects/splat.ogg', "None" = null - ) + )) //Poojy's Fancy Sounds -var/global/list/fancy_vore_sounds = list( +GLOBAL_LIST_INIT(fancy_vore_sounds, list( "Gulp" = 'sound/vore/sunesound/pred/swallow_01.ogg', "Swallow" = 'sound/vore/sunesound/pred/swallow_02.ogg', "Insertion1" = 'sound/vore/sunesound/pred/insertion_01.ogg', @@ -103,9 +104,9 @@ var/global/list/fancy_vore_sounds = list( "Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg', "Zipper" = 'sound/items/zip.ogg', "None" = null - ) + )) -var/global/list/fancy_release_sounds = list( +GLOBAL_LIST_INIT(fancy_release_sounds, list( "Rustle (cloth)" = 'sound/effects/rustle1.ogg', "Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg', "Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg', @@ -116,9 +117,9 @@ var/global/list/fancy_release_sounds = list( "Pred Escape" = 'sound/vore/sunesound/pred/escape.ogg', "Splatter" = 'sound/effects/splat.ogg', "None" = null - ) + )) -var/global/list/global_vore_egg_types = list( +GLOBAL_LIST_INIT(global_vore_egg_types, list( "Unathi", "Tajara", "Akula", @@ -151,7 +152,8 @@ var/global/list/global_vore_egg_types = list( "Purple", "Red", "Rainbow", - "Spotted Pink") + "Spotted Pink" + )) var/global/list/tf_vore_egg_types = list( "Unathi" = /obj/item/storage/vore_egg/unathi, @@ -248,16 +250,16 @@ var/global/list/edible_trash = list(/obj/item/broken_device, /obj/item/card/id ) -var/global/list/contamination_flavors = list( - "Generic" = contamination_flavors_generic, - "Acrid" = contamination_flavors_acrid, - "Dirty" = contamination_flavors_dirty, - "Musky" = contamination_flavors_musky, - "Smelly" = contamination_flavors_smelly, - "Slimy" = contamination_flavors_slimy, - "Wet" = contamination_flavors_wet) +GLOBAL_LIST_INIT(contamination_flavors, list( + "Generic" = GLOB.contamination_flavors_generic, + "Acrid" = GLOB.contamination_flavors_acrid, + "Dirty" = GLOB.contamination_flavors_dirty, + "Musky" = GLOB.contamination_flavors_musky, + "Smelly" = GLOB.contamination_flavors_smelly, + "Slimy" = GLOB.contamination_flavors_slimy, + "Wet" = GLOB.contamination_flavors_wet)) -var/global/list/contamination_flavors_generic = list("acrid", +GLOBAL_LIST_INIT(contamination_flavors_generic, list("acrid", "bedraggled", "begrimed", "churned", @@ -313,9 +315,9 @@ var/global/list/contamination_flavors_generic = list("acrid", "unclean", "unsanitary", "unsavory", - "yucky") + "yucky")) -var/global/list/contamination_flavors_wet = list("damp", +GLOBAL_LIST_INIT(contamination_flavors_wet, list("damp", "drenched", "drippy", "gloppy", @@ -334,9 +336,9 @@ var/global/list/contamination_flavors_wet = list("damp", "sopping", "squashy", "squishy", - "sticky") + "sticky")) -var/global/list/contamination_flavors_smelly = list("disgusting", +GLOBAL_LIST_INIT(contamination_flavors_smelly, list("disgusting", "filthy", "foul", "funky", @@ -357,9 +359,9 @@ var/global/list/contamination_flavors_smelly = list("disgusting", "stinky", "unsavory", "whiffy", - "yucky") + "yucky")) -var/global/list/contamination_flavors_acrid = list("acrid", +GLOBAL_LIST_INIT(contamination_flavors_acrid, list("acrid", "caustic", "churned", "chymous", @@ -398,9 +400,9 @@ var/global/list/contamination_flavors_acrid = list("acrid", "sticky", "tainted", "unsavory", - "yucky") + "yucky")) -var/global/list/contamination_flavors_dirty = list("bedraggled", +GLOBAL_LIST_INIT(contamination_flavors_dirty, list("bedraggled", "begrimed", "besmirched", "blemished", @@ -434,9 +436,9 @@ var/global/list/contamination_flavors_dirty = list("bedraggled", "tarnished", "unclean", "unsanitary", - "unsavory") + "unsavory")) -var/global/list/contamination_flavors_musky = list("drenched", +GLOBAL_LIST_INIT(contamination_flavors_musky, list("drenched", "drippy", "funky", "gooey", @@ -456,9 +458,9 @@ var/global/list/contamination_flavors_musky = list("drenched", "squashy", "squishy", "sticky", - "tainted") + "tainted")) -var/global/list/contamination_flavors_slimy = list("slimy", +GLOBAL_LIST_INIT(contamination_flavors_slimy, list("slimy", "sloppy", "drippy", "glistening", @@ -471,9 +473,10 @@ var/global/list/contamination_flavors_slimy = list("slimy", "glutinous", "syrupy", "slippery", - "gelatinous") + "gelatinous" + )) -var/global/list/contamination_colors = list("green", +GLOBAL_LIST_INIT(contamination_colors, list("green", "white", "black", "grey", @@ -487,10 +490,11 @@ var/global/list/contamination_colors = list("green", "darkred", "cyan", "beige", - "pink") + "pink" + )) //For the mechanic of leaving remains. Ones listed below are basically ones that got no bones or leave no trace after death. -var/global/list/remainless_species = list(SPECIES_PROMETHEAN, +GLOBAL_LIST_INIT(remainless_species, list(SPECIES_PROMETHEAN, SPECIES_DIONA, SPECIES_ALRAUNE, SPECIES_PROTEAN, @@ -509,9 +513,9 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, SPECIES_XENO_QUEEN, SPECIES_SHADOW, SPECIES_GOLEM, //Some special species that may or may not be ever used in event too, - SPECIES_SHADEKIN) //Shadefluffers just poof away + SPECIES_SHADEKIN)) //Shadefluffers just poof away -/var/global/list/alt_titles_with_icons = list( +GLOBAL_LIST_INIT(alt_titles_with_icons, list( JOB_ALT_VIROLOGIST, JOB_ALT_APPRENTICE_ENGINEER, JOB_ALT_MEDICAL_INTERN, @@ -520,9 +524,9 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, JOB_ALT_JR_CARGO_TECH, JOB_ALT_SERVER, JOB_ALT_ELECTRICIAN, - JOB_ALT_BARISTA) + JOB_ALT_BARISTA)) -/var/global/list/existing_solargrubs = list() +GLOBAL_LIST_EMPTY(existing_solargrubs) /hook/startup/proc/init_vore_datum_ref_lists() var/paths @@ -540,33 +544,33 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, if(!instance.name) continue //A prototype or something var/cost = instance.cost - traits_costs[path] = cost - all_traits[path] = instance + GLOB.traits_costs[path] = cost + GLOB.all_traits[path] = instance // Traitgenes Initilize trait genes - setupgenetics(all_traits) + setupgenetics(GLOB.all_traits) // Shakey shakey shake - sortTim(all_traits, GLOBAL_PROC_REF(cmp_trait_datums_name), associative = TRUE) + sortTim(GLOB.all_traits, GLOBAL_PROC_REF(cmp_trait_datums_name), associative = TRUE) // Split 'em up - for(var/traitpath in all_traits) - var/datum/trait/T = all_traits[traitpath] + for(var/traitpath in GLOB.all_traits) + var/datum/trait/T = GLOB.all_traits[traitpath] var/category = T.category if(!T.hidden) // Traitgenes forbid hidden traits from showing, done to hide genetics only traits switch(category) if(-INFINITY to -0.1) - negative_traits[traitpath] = T + GLOB.negative_traits[traitpath] = T if(!(T.custom_only)) - everyone_traits_negative[traitpath] = T + GLOB.everyone_traits_negative[traitpath] = T if(0) - neutral_traits[traitpath] = T + GLOB.neutral_traits[traitpath] = T if(!(T.custom_only)) - everyone_traits_neutral[traitpath] = T + GLOB.everyone_traits_neutral[traitpath] = T if(0.1 to INFINITY) - positive_traits[traitpath] = T + GLOB.positive_traits[traitpath] = T if(!(T.custom_only)) - everyone_traits_positive[traitpath] = T + GLOB.everyone_traits_positive[traitpath] = T // Weaver recipe stuff @@ -575,19 +579,19 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, var/datum/weaver_recipe/instance = new path() if(!instance.title) continue //A prototype or something - weavable_structures[instance.title] = instance + GLOB.weavable_structures[instance.title] = instance paths = subtypesof(/datum/weaver_recipe/item) for(var/path in paths) var/datum/weaver_recipe/instance = new path() if(!instance.title) continue //A prototype or something - weavable_items[instance.title] = instance + GLOB.weavable_items[instance.title] = instance return 1 // Hooks must return 1 -var/global/list/weavable_structures = list() -var/global/list/weavable_items = list() +GLOBAL_LIST_EMPTY(weavable_structures) +GLOBAL_LIST_EMPTY(weavable_items) var/global/list/xenobio_metal_materials_normal = list( @@ -929,7 +933,7 @@ var/global/list/event_wildlife_roaming = list( ) -var/global/list/selectable_speech_bubbles = list( +GLOBAL_LIST_INIT(selectable_speech_bubbles, list( "default", "normal", "slime", @@ -965,7 +969,8 @@ var/global/list/selectable_speech_bubbles = list( "notepad", "science", "engineering", - "cargo") + "cargo" + )) diff --git a/code/_helpers/matrices.dm b/code/_helpers/matrices.dm index cc4caadbb4..530e97ff3f 100644 --- a/code/_helpers/matrices.dm +++ b/code/_helpers/matrices.dm @@ -77,7 +77,7 @@ return list(1,0,0, 0,1,0, 0,0,1, power,power,power) -/var/list/delta_index = list( +GLOBAL_LIST_INIT(delta_index, list( 0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11, 0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24, 0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42, @@ -88,7 +88,7 @@ 2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0, 7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8, - 10.0) + 10.0)) //Exxagerates or removes brightness /proc/color_contrast(value) @@ -102,9 +102,9 @@ else x = value % 1 if(x == 0) - x = delta_index[value] + x = GLOB.delta_index[value] else - x = delta_index[value] * (1-x) + delta_index[value+1] * x//use linear interpolation for more granularity. + x = GLOB.delta_index[value] * (1-x) + GLOB.delta_index[value+1] * x//use linear interpolation for more granularity. x = x * 127 + 127 var/mult = x / 127 diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm index 5c00d9c35e..913e69b705 100644 --- a/code/_helpers/names.dm +++ b/code/_helpers/names.dm @@ -1,7 +1,7 @@ -var/church_name = null +GLOBAL_VAR(church_name) /proc/church_name() - if (church_name) - return church_name + if (GLOB.church_name) + return GLOB.church_name var/name = "" @@ -25,10 +25,10 @@ var/church_name = null return name -var/religion_name = null +GLOBAL_VAR(religion_name) /proc/religion_name() - if (religion_name) - return religion_name + if (GLOB.religion_name) + return GLOB.religion_name var/name = "" @@ -111,10 +111,10 @@ var/religion_name = null return name -var/syndicate_name = null +GLOBAL_VAR(syndicate_name) /proc/syndicate_name() - if (syndicate_name) - return syndicate_name + if (GLOB.syndicate_name) + return GLOB.syndicate_name var/name = "" @@ -138,13 +138,13 @@ var/syndicate_name = null name += pick("-", "*", "") name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive") - syndicate_name = name + GLOB.syndicate_name = name return name //Traitors and traitor silicons will get these. Revs will not. -var/syndicate_code_phrase//Code phrase for traitors. -var/syndicate_code_response//Code response for traitors. +GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors. +GLOBAL_VAR(syndicate_code_response) //Code response for traitors. /* Should be expanded. @@ -173,7 +173,7 @@ var/syndicate_code_response//Code response for traitors. var/safety[] = list(1,2,3)//Tells the proc which options to remove later on. var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation") var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","redwine","moonshine") - var/locations[] = teleportlocs.len ? teleportlocs : drinks//if null, defaults to drinks instead. + var/locations[] = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks//if null, defaults to drinks instead. var/names[] = list() for(var/datum/data/record/t in data_core.general)//Picks from crew manifest. diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index f4916255e0..4f8b17d4cf 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -27,8 +27,11 @@ var/global/last_tick_duration = 0 job_master.LoadJobs("config/jobs.txt") admin_notice(span_danger("Job setup complete"), R_DEBUG) - if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase() - if(!syndicate_code_response) syndicate_code_response = generate_code_phrase() + if(!GLOB.syndicate_code_phrase) + GLOB.syndicate_code_phrase = generate_code_phrase() + + if(!GLOB.syndicate_code_response) + GLOB.syndicate_code_response = generate_code_phrase() /datum/controller/game_controller/proc/setup() diff --git a/code/controllers/subsystems/inactivity.dm b/code/controllers/subsystems/inactivity.dm index 61b333d4bc..bd4f154a1b 100644 --- a/code/controllers/subsystems/inactivity.dm +++ b/code/controllers/subsystems/inactivity.dm @@ -40,7 +40,7 @@ SUBSYSTEM_DEF(inactivity) information = " while a silicon." if(isAI(C.mob)) var/mob/living/silicon/ai/A = C.mob - empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(A.loc) + GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(A.loc) global_announcer.autosay("[A] has been moved to intelligence storage.", "Artificial Intelligence Oversight") A.clear_client() information = " while an AI." diff --git a/code/controllers/subsystems/nightshift.dm b/code/controllers/subsystems/nightshift.dm index 882016e081..3aa66ca88c 100644 --- a/code/controllers/subsystems/nightshift.dm +++ b/code/controllers/subsystems/nightshift.dm @@ -41,7 +41,7 @@ SUBSYSTEM_DEF(nightshift) /datum/controller/subsystem/nightshift/proc/check_nightshift(check_canfire=FALSE) //This is called from elsewhere, like setting the alert levels if(check_canfire && !can_fire) return - var/emergency = security_level > SEC_LEVEL_GREEN + var/emergency = GLOB.security_level > SEC_LEVEL_GREEN var/announcing = TRUE var/night_time = using_map.get_nightshift() if(high_security_mode != emergency) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 941529e67d..453ad46d60 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -218,7 +218,7 @@ var/global/datum/controller/subsystem/ticker/ticker game_finished = (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)) || universe_has_ended + game_finished = (mode.check_finished() || (emergency_shuttle.returned() && emergency_shuttle.evac == 1)) || GLOB.universe_has_ended mode_finished = game_finished if(game_finished && mode_finished) diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 0b271d9c49..b0b913a189 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -55,12 +55,12 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick) message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.") -/client/proc/debug_antagonist_template(antag_type in all_antag_types) +/client/proc/debug_antagonist_template(antag_type in GLOB.all_antag_types) set category = "Debug.Investigate" set name = "Debug Antagonist" set desc = "Debug an antagonist template." - var/datum/antagonist/antag = all_antag_types[antag_type] + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(antag) usr.client.debug_variables(antag) message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.") diff --git a/code/datums/EPv2.dm b/code/datums/EPv2.dm index ffb586a961..61d99c61e3 100644 --- a/code/datums/EPv2.dm +++ b/code/datums/EPv2.dm @@ -30,7 +30,7 @@ The receiving atom will receive the origin atom (the atom that sent the message) It's suggested to start with an if or switch statement for the message, to determine what to do. */ -var/global/list/all_exonet_connections = list() +GLOBAL_LIST_EMPTY(all_exonet_connections) /datum/exonet_protocol var/address = "" //Resembles IPv6, but with only five 'groups', e.g. XXXX:XXXX:XXXX:XXXX:XXXX @@ -60,7 +60,7 @@ var/global/list/all_exonet_connections = list() new_address = "[addr_0]:[addr_1]" string = "[string]0" //If we did get a collision, this should make the next attempt not have one. address = new_address - all_exonet_connections |= src + GLOB.all_exonet_connections |= src // Proc: make_arbitrary_address() @@ -71,7 +71,7 @@ var/global/list/all_exonet_connections = list() if(new_address == find_address(new_address) ) //Collision test. return 0 address = new_address - all_exonet_connections |= src + GLOB.all_exonet_connections |= src return 1 // Proc: hexadecimal_to_EPv2() @@ -93,14 +93,14 @@ var/global/list/all_exonet_connections = list() // Description: Deallocates the address, freeing it for use. /datum/exonet_protocol/proc/remove_address() address = "" - all_exonet_connections.Remove(src) + GLOB.all_exonet_connections.Remove(src) // Proc: find_address() // Parameters: 1 (target_address - the desired address to find) // Description: Searches the global list all_exonet_connections for a specific address, and returns it if found, otherwise returns null. /datum/exonet_protocol/proc/find_address(var/target_address) - for(var/datum/exonet_protocol/exonet in all_exonet_connections) + for(var/datum/exonet_protocol/exonet in GLOB.all_exonet_connections) if(exonet.address == target_address) return exonet.address return null @@ -109,7 +109,7 @@ var/global/list/all_exonet_connections = list() // Parameters: 1 (target_address - the desired address to find) // Description: Searches an address for the atom it is attached for, otherwise returns null. /datum/exonet_protocol/proc/get_atom_from_address(var/target_address) - for(var/datum/exonet_protocol/exonet in all_exonet_connections) + for(var/datum/exonet_protocol/exonet in GLOB.all_exonet_connections) if(exonet.address == target_address) return exonet.holder return null @@ -124,7 +124,7 @@ var/global/list/all_exonet_connections = list() var/obj/machinery/exonet_node/node = get_exonet_node() if(!node) // Telecomms went boom, ion storm, etc. return FALSE - for(var/datum/exonet_protocol/exonet in all_exonet_connections) + for(var/datum/exonet_protocol/exonet in GLOB.all_exonet_connections) if(exonet.address == target_address) node.write_log(src.address, target_address, data_type, content) return exonet.receive_message(holder, address, data_type, content) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index e5d6ef5fd4..27117a5b3f 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -191,10 +191,10 @@ we'll only update it when it changes. The PDA_Manifest global list is zeroed ou using /datum/datacore/proc/manifest_inject( ), or manifest_insert( ) */ -var/global/list/PDA_Manifest = list() +GLOBAL_LIST_EMPTY(PDA_Manifest) /datum/datacore/proc/get_manifest_list() - if(PDA_Manifest.len) + if(GLOB.PDA_Manifest.len) return var/list/heads = list() var/list/sec = list() @@ -281,7 +281,7 @@ var/global/list/PDA_Manifest = list() bot[++bot.len] = list("name" = robot.real_name, "rank" = "[robot.modtype] [robot.braintype]", "active" = "Active") - PDA_Manifest = list( + GLOB.PDA_Manifest = list( list("cat" = "Command", "elems" = heads), list("cat" = "Security", "elems" = sec), list("cat" = "Engineering", "elems" = eng), @@ -534,8 +534,8 @@ var/global/list/PDA_Manifest = list() return M /datum/datacore/proc/ResetPDAManifest() - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() /proc/find_general_record(field, value) return find_record(field, value, data_core.general) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 2be5dd835f..3055f34022 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -136,8 +136,8 @@ out += "Assigned role: [assigned_role]. Edit
" out += "
" out += "Factions and special roles:
" - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] out += "[antag.get_panel_entry(src)]" out += "

" out += span_bold("Objectives") + "
" @@ -165,7 +165,7 @@ if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return if(href_list["add_antagonist"]) - var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]] + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["add_antagonist"]] if(antag) if(antag.add_antagonist(src, 1, 1, 0, 1, 1)) // Ignore equipment and role type for this. log_admin("[key_name_admin(usr)] made [key_name(src)] into a [antag.role_text].") @@ -173,19 +173,19 @@ to_chat(usr, span_warning("[src] could not be made into a [antag.role_text]!")) else if(href_list["remove_antagonist"]) - var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]] + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["remove_antagonist"]] if(antag) antag.remove_antagonist(src) else if(href_list["equip_antagonist"]) - var/datum/antagonist/antag = all_antag_types[href_list["equip_antagonist"]] + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["equip_antagonist"]] if(antag) antag.equip(src.current) else if(href_list["unequip_antagonist"]) - var/datum/antagonist/antag = all_antag_types[href_list["unequip_antagonist"]] + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["unequip_antagonist"]] if(antag) antag.unequip(src.current) else if(href_list["move_antag_to_spawn"]) - var/datum/antagonist/antag = all_antag_types[href_list["move_antag_to_spawn"]] + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["move_antag_to_spawn"]] if(antag) antag.place_mob(src.current) else if (href_list["role_edit"]) diff --git a/code/datums/roundstats/roundstats.dm b/code/datums/roundstats/roundstats.dm index c01a38a2e7..1b80cf31ca 100644 --- a/code/datums/roundstats/roundstats.dm +++ b/code/datums/roundstats/roundstats.dm @@ -25,7 +25,7 @@ GLOBAL_VAR_INIT(prey_eaten_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(prey_absorbed_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(prey_digested_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(items_digested_roundstat, 0) //VOREStation Edit - Obviously -var/global/list/security_printer_tickets = list() //VOREStation Edit +GLOBAL_LIST_EMPTY(security_printer_tickets) //VOREStation Edit /hook/roundend/proc/RoundTrivia()//bazinga @@ -57,15 +57,15 @@ var/global/list/security_printer_tickets = list() //VOREStation Edit valid_stats_list.Add("The disposal system flushed a whole [GLOB.disposals_flush_shift_roundstat] times for this shift. We should really invest in waste treatement.") //VOREStation add Start - Ticket time! - if(security_printer_tickets.len) - valid_stats_list.Add(span_danger("[security_printer_tickets.len] unique security tickets were issued today!") + "
Examples include:") + if(GLOB.security_printer_tickets.len) + valid_stats_list.Add(span_danger("[GLOB.security_printer_tickets.len] unique security tickets were issued today!") + "
Examples include:") var/good_num = 5 var/ourticket while(good_num > 0) ourticket = null - if(security_printer_tickets.len) - ourticket = pick(security_printer_tickets) - security_printer_tickets -= ourticket + if(GLOB.security_printer_tickets.len) + ourticket = pick(GLOB.security_printer_tickets) + GLOB.security_printer_tickets -= ourticket if(ourticket) valid_stats_list.Add(span_bold("-")+"\"[ourticket]\"") good_num-- diff --git a/code/datums/supplypacks/supplypacks.dm b/code/datums/supplypacks/supplypacks.dm index eb09085f07..daaf4a571c 100644 --- a/code/datums/supplypacks/supplypacks.dm +++ b/code/datums/supplypacks/supplypacks.dm @@ -6,26 +6,26 @@ //NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points. //NOTE NOTE: Hidden var is now deprecated, whoever removed support for it should've removed the var altogether -//var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Atmospherics","Medical","Reagents","Reagent Cartridges","Science","Hydroponics", "Supply", "Miscellaneous") -var/list/all_supply_groups = list("Atmospherics", - "Costumes", - "Engineering", - "Hospitality", - "Hydroponics", - "Materials", - "Medical", - "Miscellaneous", - "Munitions", - "Reagents", - "Reagent Cartridges", - "Recreation", - "Robotics", - "Science", - "Security", - "Supplies", - "Vendor Refills", - "Hardsuits", - "Voidsuits") +//GLOBAL_LIST_INIT(all_supply_groups, list("Operations","Security","Hospitality","Engineering","Atmospherics","Medical","Reagents","Reagent Cartridges","Science","Hydroponics", "Supply", "Miscellaneous")) +GLOBAL_LIST_INIT(all_supply_groups, list("Atmospherics", + "Costumes", + "Engineering", + "Hospitality", + "Hydroponics", + "Materials", + "Medical", + "Miscellaneous", + "Munitions", + "Reagents", + "Reagent Cartridges", + "Recreation", + "Robotics", + "Science", + "Security", + "Supplies", + "Vendor Refills", + "Hardsuits", + "Voidsuits")) /datum/supply_pack var/name = null diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 466ab1fdc7..360ea5c751 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -71,10 +71,10 @@ * This item is completely unused, but removing it will break something in R&D and Radio code causing PDA and Ninja code to fail on compile */ -/var/list/acting_rank_prefixes = list("acting", "temporary", "interim", "provisional") +GLOBAL_LIST_INIT(acting_rank_prefixes, list("acting", "temporary", "interim", "provisional")) /proc/make_list_rank(rank) - for(var/prefix in acting_rank_prefixes) + for(var/prefix in GLOB.acting_rank_prefixes) if(findtext(rank, "[prefix] ", 1, 2+length(prefix))) return copytext(rank, 2+length(prefix)) return rank diff --git a/code/game/antagonist/_antagonist_setup.dm b/code/game/antagonist/_antagonist_setup.dm index 765287ea36..b05782837c 100644 --- a/code/game/antagonist/_antagonist_setup.dm +++ b/code/game/antagonist/_antagonist_setup.dm @@ -15,29 +15,29 @@ */ // Globals. -var/global/list/all_antag_types = list() -var/global/list/all_antag_spawnpoints = list() -var/global/list/antag_names_to_ids = list() +GLOBAL_LIST_EMPTY(all_antag_types) +GLOBAL_LIST_EMPTY(all_antag_spawnpoints) +GLOBAL_LIST_EMPTY(antag_names_to_ids) // Global procs. /proc/get_antag_data(var/antag_type) - if(all_antag_types[antag_type]) - return all_antag_types[antag_type] + if(GLOB.all_antag_types[antag_type]) + return GLOB.all_antag_types[antag_type] else - for(var/cur_antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[cur_antag_type] + for(var/cur_antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[cur_antag_type] if(antag && antag.is_type(antag_type)) return antag /proc/clear_antag_roles(var/datum/mind/player, var/implanted) - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(!implanted || !(antag.flags & ANTAG_IMPLANT_IMMUNE)) antag.remove_antagonist(player, 1, implanted) /proc/update_antag_icons(var/datum/mind/player) - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(player) antag.update_icons_removed(player) if(antag.is_antagonist(player)) @@ -48,19 +48,19 @@ var/global/list/antag_names_to_ids = list() /proc/populate_antag_type_list() for(var/antag_type in subtypesof(/datum/antagonist)) var/datum/antagonist/A = new antag_type - all_antag_types[A.id] = A - all_antag_spawnpoints[A.landmark_id] = list() - antag_names_to_ids[A.role_text] = A.id + GLOB.all_antag_types[A.id] = A + GLOB.all_antag_spawnpoints[A.landmark_id] = list() + GLOB.antag_names_to_ids[A.role_text] = A.id /proc/get_antags(var/atype) - var/datum/antagonist/antag = all_antag_types[atype] + var/datum/antagonist/antag = GLOB.all_antag_types[atype] if(antag && islist(antag.current_antagonists)) return antag.current_antagonists return list() /proc/player_is_antag(var/datum/mind/player, var/only_offstation_roles = 0) - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(only_offstation_roles && !(antag.flags & ANTAG_OVERRIDE_JOB)) continue if(player in antag.current_antagonists) diff --git a/code/game/antagonist/antagonist_panel.dm b/code/game/antagonist/antagonist_panel.dm index 21ab349f83..cfa0b558dd 100644 --- a/code/game/antagonist/antagonist_panel.dm +++ b/code/game/antagonist/antagonist_panel.dm @@ -39,7 +39,7 @@ if(flags & ANTAG_HAS_NUKE) dat += "
" - for(var/obj/item/disk/nuclear/N in nuke_disks) + for(var/obj/item/disk/nuclear/N in GLOB.nuke_disks) dat += "
Nuclear disk(s)
[N.name], " var/atom/disk_loc = N.loc while(!istype(disk_loc, /turf)) diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index a90383e18b..b0649672dd 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -94,10 +94,10 @@ var/datum/antagonist/cultist/cult word = pick(allwords) // Ensure runes are randomized. - if(!cultwords["travel"]) + if(!GLOB.cultwords["travel"]) runerandom() - var/wordexp = "[cultwords[word]] is [word]..." + var/wordexp = "[GLOB.cultwords[word]] is [word]..." to_chat(cult_mob, span_warning("You remember one thing from the dark teachings of your master... [wordexp]")) cult_mob.mind.store_memory("You remember that [wordexp]", 0, 0) diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm index 1d3a4b45cd..f05e232192 100644 --- a/code/game/antagonist/station/traitor.dm +++ b/code/game/antagonist/station/traitor.dm @@ -102,10 +102,10 @@ var/datum/antagonist/traitor/traitors /datum/antagonist/traitor/proc/give_codewords(mob/living/traitor_mob) to_chat(traitor_mob, span_underline(span_bold("Your employers provided you with the following information on how to identify possible allies:"))) - to_chat(traitor_mob, span_bold("Code Phrase") + ": " + span_danger("[syndicate_code_phrase]")) - to_chat(traitor_mob, span_bold("Code Response") + ": " + span_danger("[syndicate_code_response]")) - traitor_mob.mind.store_memory(span_bold("Code Phrase") + ": [syndicate_code_phrase]") - traitor_mob.mind.store_memory(span_bold("Code Response") + ": [syndicate_code_response]") + to_chat(traitor_mob, span_bold("Code Phrase") + ": " + span_danger("[GLOB.syndicate_code_phrase]")) + to_chat(traitor_mob, span_bold("Code Response") + ": " + span_danger("[GLOB.syndicate_code_response]")) + traitor_mob.mind.store_memory(span_bold("Code Phrase") + ": [GLOB.syndicate_code_phrase]") + traitor_mob.mind.store_memory(span_bold("Code Response") + ": [GLOB.syndicate_code_response]") to_chat(traitor_mob, "Use the code words, preferably in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe.") /datum/antagonist/traitor/proc/spawn_uplink(var/mob/living/carbon/human/traitor_mob) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index ad53f1f0e0..0338793cf3 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -502,35 +502,35 @@ var/list/mob/living/forced_ambiance_list = new /*Adding a wizard area teleport list because motherfucking lag -- Urist*/ /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ -var/list/teleportlocs = list() +GLOBAL_LIST_EMPTY(teleportlocs) /hook/startup/proc/setupTeleportLocs() for(var/area/AR in world) if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue - if(teleportlocs.Find(AR.name)) continue + if(GLOB.teleportlocs.Find(AR.name)) continue var/turf/picked = pick(get_area_turfs(AR.type)) if (picked.z in using_map.station_levels) - teleportlocs += AR.name - teleportlocs[AR.name] = AR + GLOB.teleportlocs += AR.name + GLOB.teleportlocs[AR.name] = AR - teleportlocs = sortAssoc(teleportlocs) + GLOB.teleportlocs = sortAssoc(GLOB.teleportlocs) return 1 -var/list/ghostteleportlocs = list() +GLOBAL_LIST_EMPTY(ghostteleportlocs) /hook/startup/proc/setupGhostTeleportLocs() for(var/area/AR in world) - if(ghostteleportlocs.Find(AR.name)) continue + if(GLOB.ghostteleportlocs.Find(AR.name)) continue if(istype(AR, /area/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom)) - ghostteleportlocs += AR.name - ghostteleportlocs[AR.name] = AR + GLOB.ghostteleportlocs += AR.name + GLOB.ghostteleportlocs[AR.name] = AR var/turf/picked = pick(get_area_turfs(AR.type)) if (picked.z in using_map.player_levels) - ghostteleportlocs += AR.name - ghostteleportlocs[AR.name] = AR + GLOB.ghostteleportlocs += AR.name + GLOB.ghostteleportlocs[AR.name] = AR - ghostteleportlocs = sortAssoc(ghostteleportlocs) + GLOB.ghostteleportlocs = sortAssoc(GLOB.ghostteleportlocs) return 1 diff --git a/code/game/birthday.dm b/code/game/birthday.dm index 2af06c13ff..857a2092f0 100644 --- a/code/game/birthday.dm +++ b/code/game/birthday.dm @@ -6,19 +6,19 @@ if(real_name != client.prefs.real_name) //let's not celebrate the birthday of that weird mob we got dropped into return - if(!(read_preference(/datum/preference/numeric/human/last_bday_note) < world_time_year)) //you only get notified once a year + if(!(read_preference(/datum/preference/numeric/human/last_bday_note) < GLOB.world_time_year)) //you only get notified once a year return - if((world_time_month == bday_month) && (world_time_day == bday_day)) //it is your birthday + if((GLOB.world_time_month == bday_month) && (GLOB.world_time_day == bday_day)) //it is your birthday birthday(1) - else if(world_time_month > bday_month) //your birthday was in a previous month + else if(GLOB.world_time_month > bday_month) //your birthday was in a previous month birthday() - else if((world_time_month == bday_month) && (world_time_day > bday_day)) //your birthday was earlier this month + else if((GLOB.world_time_month == bday_month) && (GLOB.world_time_day > bday_day)) //your birthday was earlier this month birthday() /mob/living/carbon/human/proc/birthday(var/birthday = 0) var/msg var/lastyear = read_preference(/datum/preference/numeric/human/last_bday_note) - write_preference_directly(/datum/preference/numeric/human/last_bday_note, world_time_year) //We only want to ask once a year per character, this persists, update early in case of shenanigans + write_preference_directly(/datum/preference/numeric/human/last_bday_note, GLOB.world_time_year) //We only want to ask once a year per character, this persists, update early in case of shenanigans if(birthday) //woo msg = "Today is your birthday! Do you want to increase your character's listed age?" if(read_preference(/datum/preference/toggle/human/bday_announce)) @@ -31,7 +31,7 @@ if(lastyear == 0) //We've never been asked, so let's just assume you were keeping track before now and only add 1 age += 1 else - var/howmuch = world_time_year - lastyear + var/howmuch = GLOB.world_time_year - lastyear age += howmuch to_chat(src, span_notice("You are now [age]! Happy birthday!")) write_preference_directly(/datum/preference/numeric/human/age, age) //Set the age on the character sheet diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 0afbb113d0..90f3e590ba 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -176,10 +176,10 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) wing_style = wing_styles_list.Find(character.wing_style.type) // Playerscale (This assumes list is sorted big->small) - var/size_multiplier = player_sizes_list.len // If fail to find, take smallest - for(var/N in player_sizes_list) - if(character.size_multiplier >= player_sizes_list[N]) - size_multiplier = player_sizes_list.Find(N) + var/size_multiplier = GLOB.player_sizes_list.len // If fail to find, take smallest + for(var/N in GLOB.player_sizes_list) + if(character.size_multiplier >= GLOB.player_sizes_list[N]) + size_multiplier = GLOB.player_sizes_list.Find(N) break // Technically custom_species is not part of the UI, but this place avoids merge problems. @@ -214,7 +214,7 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) SetUIValueRange(DNA_UI_EAR_STYLE, ear_style + 1, ear_styles_list.len + 1, 1) SetUIValueRange(DNA_UI_EAR_SECONDARY_STYLE, ear_secondary_style + 1, ear_styles_list.len + 1, 1) SetUIValueRange(DNA_UI_TAIL_STYLE, tail_style + 1, tail_styles_list.len + 1, 1) - SetUIValueRange(DNA_UI_PLAYERSCALE, size_multiplier, player_sizes_list.len, 1) + SetUIValueRange(DNA_UI_PLAYERSCALE, size_multiplier, GLOB.player_sizes_list.len, 1) SetUIValueRange(DNA_UI_WING_STYLE, wing_style + 1, wing_styles_list.len + 1, 1) SetUIValueRange(DNA_UI_TAIL_R, character.r_tail, 255, 1) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index f5dc36309b..d689d4e962 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -245,9 +245,9 @@ H.a_wing = dna.GetUIValueRange(DNA_UI_WING_ALPHA, 255) // Playerscale - var/size = dna.GetUIValueRange(DNA_UI_PLAYERSCALE, player_sizes_list.len) - if((0 < size) && (size <= player_sizes_list.len)) - H.resize(player_sizes_list[player_sizes_list[size]], TRUE, ignore_prefs = TRUE) + var/size = dna.GetUIValueRange(DNA_UI_PLAYERSCALE, GLOB.player_sizes_list.len) + if((0 < size) && (size <= GLOB.player_sizes_list.len)) + H.resize(GLOB.player_sizes_list[GLOB.player_sizes_list[size]], TRUE, ignore_prefs = TRUE) // Tail/Taur Color H.r_tail = dna.GetUIValueRange(DNA_UI_TAIL_R, 255) diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index d7d6608a5a..8f20a6d348 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -103,7 +103,7 @@ // check trait if not. CONFLICT-O-TRON ENGAGE conflict_traits[P] = FALSE - var/datum/trait/instance_test = all_traits[P] + var/datum/trait/instance_test = GLOB.all_traits[P] if(path in instance_test.excludes) conflict_traits[P] = TRUE has_conflict = TRUE diff --git a/code/game/gamemodes/calamity/calamity.dm b/code/game/gamemodes/calamity/calamity.dm index 1beb9081e3..2295d07ebd 100644 --- a/code/game/gamemodes/calamity/calamity.dm +++ b/code/game/gamemodes/calamity/calamity.dm @@ -12,10 +12,10 @@ /datum/game_mode/calamity/create_antagonists() - shuffle(all_antag_types) // This is probably the only instance in the game where the order will be important. + shuffle(GLOB.all_antag_types) // This is probably the only instance in the game where the order will be important. var/i = 1 var/grab_antags = round(num_players()/ANTAG_TYPE_RATIO)+1 - for(var/antag_id in all_antag_types) + for(var/antag_id in GLOB.all_antag_types) if(i > grab_antags) break antag_tags |= antag_id diff --git a/code/game/gamemodes/cult/hell_universe.dm b/code/game/gamemodes/cult/hell_universe.dm index e5d549cec5..36f9c2f4bb 100644 --- a/code/game/gamemodes/cult/hell_universe.dm +++ b/code/game/gamemodes/cult/hell_universe.dm @@ -50,7 +50,7 @@ In short: OverlayAndAmbientSet() lightsout(0,0) - runedec += 9000 //basically removing the rune cap + GLOB.runedec += 9000 //basically removing the rune cap /datum/universal_state/hell/proc/AreaSet() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 6bf37a4f46..530c27f9d4 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -1,24 +1,24 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -var/cultwords = list() -var/runedec = 0 -var/global/list/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide") -var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri") +GLOBAL_LIST_EMPTY(cultwords) +GLOBAL_VAR_INIT(runedec, 0) +GLOBAL_LIST_INIT(engwords, list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide")) +GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri")) /client/proc/check_words() // -- Urist set category = "Admin.Secrets" set name = "Check Rune Words" set desc = "Check the rune-word meaning" - if(!cultwords["travel"]) + if(!GLOB.cultwords["travel"]) runerandom() - for (var/word in engwords) - to_chat(usr, "[cultwords[word]] is [word]") + for (var/word in GLOB.engwords) + to_chat(usr, "[GLOB.cultwords[word]] is [word]") /proc/runerandom() //randomizes word meaning - var/list/runewords=rnwords - for (var/word in engwords) - cultwords[word] = pick(runewords) - runewords-=cultwords[word] + var/list/runewords=GLOB.rnwords + for (var/word in GLOB.engwords) + GLOB.cultwords[word] = pick(runewords) + runewords -= GLOB.cultwords[word] /obj/effect/rune desc = "A strange collection of symbols drawn in blood." @@ -112,53 +112,53 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," return fizzle() // if(!src.visibility) // src.visibility=1 - if(word1 == cultwords["travel"] && word2 == cultwords["self"]) + if(word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["self"]) return teleport(src.word3) - if(word1 == cultwords["see"] && word2 == cultwords["blood"] && word3 == cultwords["hell"]) + if(word1 == GLOB.cultwords["see"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["hell"]) return tomesummon() - if(word1 == cultwords["hell"] && word2 == cultwords["destroy"] && word3 == cultwords["other"]) + if(word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["destroy"] && word3 == GLOB.cultwords["other"]) return armor() - if(word1 == cultwords["join"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) + if(word1 == GLOB.cultwords["join"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["self"]) return convert() - if(word1 == cultwords["hell"] && word2 == cultwords["join"] && word3 == cultwords["self"]) + if(word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["join"] && word3 == GLOB.cultwords["self"]) return tearreality() - if(word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["technology"]) + if(word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["technology"]) return emp(src.loc,5) - if(word1 == cultwords["travel"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) + if(word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["self"]) return drain() - if(word1 == cultwords["see"] && word2 == cultwords["hell"] && word3 == cultwords["join"]) + if(word1 == GLOB.cultwords["see"] && word2 == GLOB.cultwords["hell"] && word3 == GLOB.cultwords["join"]) return seer() - if(word1 == cultwords["blood"] && word2 == cultwords["join"] && word3 == cultwords["hell"]) + if(word1 == GLOB.cultwords["blood"] && word2 == GLOB.cultwords["join"] && word3 == GLOB.cultwords["hell"]) return raise() - if(word1 == cultwords["hide"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) + if(word1 == GLOB.cultwords["hide"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["blood"]) return obscure(4) - if(word1 == cultwords["hell"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) + if(word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["travel"] && word3 == GLOB.cultwords["self"]) return ajourney() - if(word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["travel"]) + if(word1 == GLOB.cultwords["blood"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["travel"]) return manifest() - if(word1 == cultwords["hell"] && word2 == cultwords["technology"] && word3 == cultwords["join"]) + if(word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["technology"] && word3 == GLOB.cultwords["join"]) return talisman() - if(word1 == cultwords["hell"] && word2 == cultwords["blood"] && word3 == cultwords["join"]) + if(word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["join"]) return sacrifice() - if(word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["hide"]) + if(word1 == GLOB.cultwords["blood"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["hide"]) return revealrunes(src) - if(word1 == cultwords["destroy"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) + if(word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["travel"] && word3 == GLOB.cultwords["self"]) return wall() - if(word1 == cultwords["travel"] && word2 == cultwords["technology"] && word3 == cultwords["other"]) + if(word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["technology"] && word3 == GLOB.cultwords["other"]) return freedom() - if(word1 == cultwords["join"] && word2 == cultwords["other"] && word3 == cultwords["self"]) + if(word1 == GLOB.cultwords["join"] && word2 == GLOB.cultwords["other"] && word3 == GLOB.cultwords["self"]) return cultsummon() - if(word1 == cultwords["hide"] && word2 == cultwords["other"] && word3 == cultwords["see"]) + if(word1 == GLOB.cultwords["hide"] && word2 == GLOB.cultwords["other"] && word3 == GLOB.cultwords["see"]) return deafen() - if(word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["other"]) + if(word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["other"]) return blind() - if(word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) + if(word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["blood"]) return bloodboil() - if(word1 == cultwords["self"] && word2 == cultwords["other"] && word3 == cultwords["technology"]) + if(word1 == GLOB.cultwords["self"] && word2 == GLOB.cultwords["other"] && word3 == GLOB.cultwords["technology"]) return communicate() - if(word1 == cultwords["travel"] && word2 == cultwords["other"]) + if(word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["other"]) return itemport(src.word3) - if(word1 == cultwords["join"] && word2 == cultwords["hide"] && word3 == cultwords["technology"]) + if(word1 == GLOB.cultwords["join"] && word2 == GLOB.cultwords["hide"] && word3 == GLOB.cultwords["technology"]) return runestun() else return fizzle() @@ -290,10 +290,10 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," /obj/item/book/tome/Initialize(mapload) . = ..() - if(!cultwords["travel"]) + if(!GLOB.cultwords["travel"]) runerandom() - for(var/V in cultwords) - words[cultwords[V]] = V + for(var/V in GLOB.cultwords) + words[GLOB.cultwords[V]] = V /obj/item/book/tome/attack(mob/living/M as mob, mob/living/user as mob) add_attack_logs(user,M,"Hit with [name]") @@ -318,7 +318,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if(!user.canmove || user.stat || user.restrained()) return - if(!cultwords["travel"]) + if(!GLOB.cultwords["travel"]) runerandom() if(iscultist(user)) var/C = 0 @@ -328,7 +328,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," to_chat(user, span_warning("You do not have enough space to write a proper rune.")) return - if (C>=26 + runedec + cult.current_antagonists.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist + if (C>=26 + GLOB.runedec + cult.current_antagonists.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist tgui_alert_async(user, "The cloth of reality can't take that much of a strain. Remove some runes first!") return else @@ -440,7 +440,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," /obj/item/book/tome/imbued/attack_self(mob/user as mob) if(src.cultistsonly && !iscultist(user)) return - if(!cultwords["travel"]) + if(!GLOB.cultwords["travel"]) runerandom() if(user) var/r @@ -461,8 +461,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," var/beacon if(user) beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", words, timeout=30 SECONDS) - R.word1=cultwords["travel"] - R.word2=cultwords["self"] + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["self"] R.word3=beacon R.loc = user.loc R.check_icon() @@ -471,140 +471,140 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," var/beacon if(user) beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", words, timeout=30 SECONDS) - R.word1=cultwords["travel"] - R.word2=cultwords["other"] + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["other"] R.word3=beacon R.loc = user.loc R.check_icon() if("tome") - R.word1=cultwords["see"] - R.word2=cultwords["blood"] - R.word3=cultwords["hell"] + R.word1=GLOB.cultwords["see"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["hell"] R.loc = user.loc R.check_icon() if("armor") - R.word1=cultwords["hell"] - R.word2=cultwords["destroy"] - R.word3=cultwords["other"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["destroy"] + R.word3=GLOB.cultwords["other"] R.loc = user.loc R.check_icon() if("convert") - R.word1=cultwords["join"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["join"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["self"] R.loc = user.loc R.check_icon() if("tear in reality") - R.word1=cultwords["hell"] - R.word2=cultwords["join"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["join"] + R.word3=GLOB.cultwords["self"] R.loc = user.loc R.check_icon() if("emp") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["technology"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["technology"] R.loc = user.loc R.check_icon() if("drain") - R.word1=cultwords["travel"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["self"] R.loc = user.loc R.check_icon() if("seer") - R.word1=cultwords["see"] - R.word2=cultwords["hell"] - R.word3=cultwords["join"] + R.word1=GLOB.cultwords["see"] + R.word2=GLOB.cultwords["hell"] + R.word3=GLOB.cultwords["join"] R.loc = user.loc R.check_icon() if("raise") - R.word1=cultwords["blood"] - R.word2=cultwords["join"] - R.word3=cultwords["hell"] + R.word1=GLOB.cultwords["blood"] + R.word2=GLOB.cultwords["join"] + R.word3=GLOB.cultwords["hell"] R.loc = user.loc R.check_icon() if("obscure") - R.word1=cultwords["hide"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] + R.word1=GLOB.cultwords["hide"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["blood"] R.loc = user.loc R.check_icon() if("astral journey") - R.word1=cultwords["hell"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["travel"] + R.word3=GLOB.cultwords["self"] R.loc = user.loc R.check_icon() if("manifest") - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["travel"] + R.word1=GLOB.cultwords["blood"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["travel"] R.loc = user.loc R.check_icon() if("imbue talisman") - R.word1=cultwords["hell"] - R.word2=cultwords["technology"] - R.word3=cultwords["join"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["technology"] + R.word3=GLOB.cultwords["join"] R.loc = user.loc R.check_icon() if("sacrifice") - R.word1=cultwords["hell"] - R.word2=cultwords["blood"] - R.word3=cultwords["join"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["join"] R.loc = user.loc R.check_icon() if("reveal") - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["hide"] + R.word1=GLOB.cultwords["blood"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["hide"] R.loc = user.loc R.check_icon() if("wall") - R.word1=cultwords["destroy"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["travel"] + R.word3=GLOB.cultwords["self"] R.loc = user.loc R.check_icon() if("freedom") - R.word1=cultwords["travel"] - R.word2=cultwords["technology"] - R.word3=cultwords["other"] + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["technology"] + R.word3=GLOB.cultwords["other"] R.loc = user.loc R.check_icon() if("cultsummon") - R.word1=cultwords["join"] - R.word2=cultwords["other"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["join"] + R.word2=GLOB.cultwords["other"] + R.word3=GLOB.cultwords["self"] R.loc = user.loc R.check_icon() if("deafen") - R.word1=cultwords["hide"] - R.word2=cultwords["other"] - R.word3=cultwords["see"] + R.word1=GLOB.cultwords["hide"] + R.word2=GLOB.cultwords["other"] + R.word3=GLOB.cultwords["see"] R.loc = user.loc R.check_icon() if("blind") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["other"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["other"] R.loc = user.loc R.check_icon() if("bloodboil") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["blood"] R.loc = user.loc R.check_icon() if("communicate") - R.word1=cultwords["self"] - R.word2=cultwords["other"] - R.word3=cultwords["technology"] + R.word1=GLOB.cultwords["self"] + R.word2=GLOB.cultwords["other"] + R.word3=GLOB.cultwords["technology"] R.loc = user.loc R.check_icon() if("stun") - R.word1=cultwords["join"] - R.word2=cultwords["hide"] - R.word3=cultwords["technology"] + R.word1=GLOB.cultwords["join"] + R.word2=GLOB.cultwords["hide"] + R.word3=GLOB.cultwords["technology"] R.loc = user.loc R.check_icon() diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 670f5e26fb..a508ebfaf9 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -20,7 +20,7 @@ var/list/sacrificed = list() for(var/obj/effect/rune/R in rune_list) if(R == src) continue - if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && isPlayerLevel(R.z)) + if(R.word1 == GLOB.cultwords["travel"] && R.word2 == GLOB.cultwords["self"] && R.word3 == key && isPlayerLevel(R.z)) index++ allrunesloc.len = index allrunesloc[index] = R.loc @@ -54,7 +54,7 @@ var/list/sacrificed = list() for(var/obj/effect/rune/R in rune_list) if(R == src) continue - if(R.word1 == cultwords["travel"] && R.word2 == cultwords["other"] && R.word3 == key) + if(R.word1 == GLOB.cultwords["travel"] && R.word2 == GLOB.cultwords["other"] && R.word3 == key) IP = R runecount++ if(runecount >= 2) @@ -160,7 +160,7 @@ var/list/sacrificed = list() if (!target.can_feel_pain()) target.visible_message(span_warning("The markings below \the [target] glow a bloody red.")) else - var/datum/gender/TT = gender_datums[target.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()] target.visible_message(span_warning("[target] writhes in pain as the markings below [TT.him] glow a bloody red."), span_danger("AAAAAAHHHH!"), span_warning("You hear an anguished scream.")) if(!waiting_for_input[target]) //so we don't spam them with dialogs if they hesitate @@ -235,7 +235,7 @@ var/list/sacrificed = list() /obj/effect/rune/proc/drain() var/drain = 0 for(var/obj/effect/rune/R in rune_list) - if(R.word1==cultwords["travel"] && R.word2==cultwords["blood"] && R.word3==cultwords["self"]) + if(R.word1==GLOB.cultwords["travel"] && R.word2==GLOB.cultwords["blood"] && R.word3==GLOB.cultwords["self"]) for(var/mob/living/carbon/D in R.loc) if(D.stat!=2) add_attack_logs(usr,D,"Blood drain rune") @@ -335,7 +335,7 @@ var/list/sacrificed = list() is_sacrifice_target = 0 find_sacrifice: for(var/obj/effect/rune/R in rune_list) - if(R.word1==cultwords["blood"] && R.word2==cultwords["join"] && R.word3==cultwords["hell"]) + if(R.word1==GLOB.cultwords["blood"] && R.word2==GLOB.cultwords["join"] && R.word3==GLOB.cultwords["hell"]) for(var/mob/living/carbon/human/N in R.loc) if(cult && N.mind && N.mind == cult.sacrifice_target) is_sacrifice_target = 1 @@ -366,8 +366,8 @@ var/list/sacrificed = list() if(corpse_to_raise.client) - var/datum/gender/TU = gender_datums[corpse_to_raise.get_visible_gender()] - var/datum/gender/TT = gender_datums[body_to_sacrifice.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[corpse_to_raise.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[body_to_sacrifice.get_visible_gender()] cult.add_antagonist(corpse_to_raise.mind) corpse_to_raise.revive() @@ -423,7 +423,7 @@ var/list/sacrificed = list() /obj/effect/rune/proc/ajourney() //some bits copypastaed from admin tools - Urist if(usr.loc==src.loc) var/mob/living/carbon/human/L = usr - var/datum/gender/TU = gender_datums[L.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[L.get_visible_gender()] usr.say("Fwe[pick("'","`")]sh mah erl nyag r'ya!") usr.visible_message(span_warning("[usr]'s eyes glow blue as [TU.he] freeze[TU.s] in place, absolutely motionless."), \ span_warning("The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry..."), \ @@ -526,53 +526,53 @@ var/list/sacrificed = list() for(var/obj/effect/rune/R in orange(1,src)) if(R==src) continue - if(R.word1==cultwords["travel"] && R.word2==cultwords["self"]) //teleport + if(R.word1==GLOB.cultwords["travel"] && R.word2==GLOB.cultwords["self"]) //teleport T = new(src.loc) T.imbue = "[R.word3]" T.info = "[R.word3]" imbued_from = R break - if(R.word1==cultwords["see"] && R.word2==cultwords["blood"] && R.word3==cultwords["hell"]) //tome + if(R.word1==GLOB.cultwords["see"] && R.word2==GLOB.cultwords["blood"] && R.word3==GLOB.cultwords["hell"]) //tome T = new(src.loc) T.imbue = "newtome" imbued_from = R break - if(R.word1==cultwords["destroy"] && R.word2==cultwords["see"] && R.word3==cultwords["technology"]) //emp + if(R.word1==GLOB.cultwords["destroy"] && R.word2==GLOB.cultwords["see"] && R.word3==GLOB.cultwords["technology"]) //emp T = new(src.loc) T.imbue = "emp" imbued_from = R break - if(R.word1==cultwords["blood"] && R.word2==cultwords["see"] && R.word3==cultwords["destroy"]) //conceal + if(R.word1==GLOB.cultwords["blood"] && R.word2==GLOB.cultwords["see"] && R.word3==GLOB.cultwords["destroy"]) //conceal T = new(src.loc) T.imbue = "conceal" imbued_from = R break - if(R.word1==cultwords["hell"] && R.word2==cultwords["destroy"] && R.word3==cultwords["other"]) //armor + if(R.word1==GLOB.cultwords["hell"] && R.word2==GLOB.cultwords["destroy"] && R.word3==GLOB.cultwords["other"]) //armor T = new(src.loc) T.imbue = "armor" imbued_from = R break - if(R.word1==cultwords["blood"] && R.word2==cultwords["see"] && R.word3==cultwords["hide"]) //reveal + if(R.word1==GLOB.cultwords["blood"] && R.word2==GLOB.cultwords["see"] && R.word3==GLOB.cultwords["hide"]) //reveal T = new(src.loc) T.imbue = "revealrunes" imbued_from = R break - if(R.word1==cultwords["hide"] && R.word2==cultwords["other"] && R.word3==cultwords["see"]) //deafen + if(R.word1==GLOB.cultwords["hide"] && R.word2==GLOB.cultwords["other"] && R.word3==GLOB.cultwords["see"]) //deafen T = new(src.loc) T.imbue = "deafen" imbued_from = R break - if(R.word1==cultwords["destroy"] && R.word2==cultwords["see"] && R.word3==cultwords["other"]) //blind + if(R.word1==GLOB.cultwords["destroy"] && R.word2==GLOB.cultwords["see"] && R.word3==GLOB.cultwords["other"]) //blind T = new(src.loc) T.imbue = "blind" imbued_from = R break - if(R.word1==cultwords["self"] && R.word2==cultwords["other"] && R.word3==cultwords["technology"]) //communicat + if(R.word1==GLOB.cultwords["self"] && R.word2==GLOB.cultwords["other"] && R.word3==GLOB.cultwords["technology"]) //communicat T = new(src.loc) T.imbue = "communicate" imbued_from = R break - if(R.word1==cultwords["join"] && R.word2==cultwords["hide"] && R.word3==cultwords["technology"]) //communicat + if(R.word1==GLOB.cultwords["join"] && R.word2==GLOB.cultwords["hide"] && R.word3==GLOB.cultwords["technology"]) //communicat T = new(src.loc) T.imbue = "runestun" imbued_from = R @@ -590,11 +590,11 @@ var/list/sacrificed = list() /obj/effect/rune/proc/mend() var/mob/living/user = usr - var/datum/gender/TU = gender_datums[usr.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[usr.get_visible_gender()] src = null user.say("Uhrast ka'hfa heldsagen ver[pick("'","`")]lot!") user.take_overall_damage(200, 0) - runedec+=10 + GLOB.runedec+=10 user.visible_message(span_danger("\The [user] keels over dead, [TU.his] blood glowing blue as it escapes [TU.his] body and dissipates into thin air."), \ span_danger("In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood."), \ span_warning("You hear faint rustle.")) @@ -602,7 +602,7 @@ var/list/sacrificed = list() sleep(600) if (!user) return - runedec-=10 + GLOB.runedec-=10 return @@ -878,7 +878,7 @@ var/list/sacrificed = list() if (cultist == user) //just to be sure. return if(cultist.buckled || cultist.handcuffed || (!isturf(cultist.loc) && !istype(cultist.loc, /obj/structure/closet))) - var/datum/gender/TU = gender_datums[cultist.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[cultist.get_visible_gender()] to_chat(user, span_warning("You cannot summon \the [cultist], for [TU.his] shackles of blood are strong.")) return fizzle() cultist.loc = src.loc diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index a08a6d3009..e0136f8a65 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -100,7 +100,7 @@ /turf/unsimulated/wall/supermatter/Bumped(atom/AM as mob|obj) if(isliving(AM)) var/mob/living/M = AM - var/datum/gender/T = gender_datums[M.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[M.get_visible_gender()] AM.visible_message(span_warning("\The [AM] slams into \the [src] inducing a resonance... [T.his] body starts to glow and catch flame before flashing into ash."),\ span_danger("You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\""),\ span_warning("You hear an unearthly noise as a wave of heat washes over you.")) diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 6860c37b45..0fa5600776 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -1,4 +1,4 @@ -var/global/universe_has_ended = 0 +GLOBAL_VAR_INIT(universe_has_ended, 0) /datum/universal_state/supermatter_cascade @@ -79,7 +79,7 @@ var/global/universe_has_ended = 0 spawn(5 MINUTES) ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic - universe_has_ended = 1 + GLOB.universe_has_ended = 1 return /datum/universal_state/supermatter_cascade/proc/AreaSet() diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index e24ed45867..3dacb20b6a 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -98,8 +98,8 @@ if(15) communications_blackout() */ -var/eventchance = 10 // Percent chance per 5 minutes. -var/hadevent = 0 +GLOBAL_VAR_INIT(eventchance, 10) // Percent chance per 5 minutes. +GLOBAL_VAR_INIT(hadevent, 0) /proc/appendicitis() for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index b761941a99..9329bb1862 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -305,7 +305,7 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t message_admins(span_notice("DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])"))*/ if("End of the World") - if(prob(eventchance)) GameOver() + if(prob(GLOB.eventchance)) GameOver() if("Christmas","Christmas Eve") - if(prob(eventchance)) ChristmasEvent() + if(prob(GLOB.eventchance)) ChristmasEvent() diff --git a/code/game/gamemodes/events/holidays/Other.dm b/code/game/gamemodes/events/holidays/Other.dm index d6fe5b6ba1..8c054a8ac9 100644 --- a/code/game/gamemodes/events/holidays/Other.dm +++ b/code/game/gamemodes/events/holidays/Other.dm @@ -1,6 +1,6 @@ /proc/GameOver() - if(!hadevent) - hadevent = 1 + if(!GLOB.hadevent) + GLOB.hadevent = 1 message_admins("The apocalypse has begun! (this holiday event can be disabled by toggling events off within 60 seconds)") spawn(600) if(!CONFIG_GET(flag/allow_random_events)) return diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index e67d622167..94b4c7945c 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -1,5 +1,5 @@ -var/global/antag_add_failed // Used in antag type voting. -var/global/list/additional_antag_types = list() +GLOBAL_VAR(antag_add_failed) // Used in antag type voting. +GLOBAL_LIST_EMPTY(additional_antag_types) /datum/game_mode var/name = "invalid" @@ -85,7 +85,7 @@ var/global/list/additional_antag_types = list() if(href_list["debug_antag"] == "self") usr.client.debug_variables(src) return - var/datum/antagonist/antag = all_antag_types[href_list["debug_antag"]] + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["debug_antag"]] if(antag) usr.client.debug_variables(antag) message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.") @@ -93,16 +93,16 @@ var/global/list/additional_antag_types = list() if(antag_tags && (href_list["remove_antag_type"] in antag_tags)) to_chat(usr, "Cannot remove core mode antag type.") return - var/datum/antagonist/antag = all_antag_types[href_list["remove_antag_type"]] - if(antag_templates && antag_templates.len && antag && (antag in antag_templates) && (antag.id in additional_antag_types)) + var/datum/antagonist/antag = GLOB.all_antag_types[href_list["remove_antag_type"]] + if(antag_templates && antag_templates.len && antag && (antag in antag_templates) && (antag.id in GLOB.additional_antag_types)) antag_templates -= antag - additional_antag_types -= antag.id + GLOB.additional_antag_types -= antag.id message_admins("Admin [key_name_admin(usr)] removed [antag.role_text] template from game mode.") else if(href_list["add_antag_type"]) - var/choice = tgui_input_list(usr, "Which type do you wish to add?", "Select Antag Type", all_antag_types) + var/choice = tgui_input_list(usr, "Which type do you wish to add?", "Select Antag Type", GLOB.all_antag_types) if(!choice) return - var/datum/antagonist/antag = all_antag_types[choice] + var/datum/antagonist/antag = GLOB.all_antag_types[choice] if(antag) if(!islist(ticker.mode.antag_templates)) ticker.mode.antag_templates = list() @@ -160,7 +160,7 @@ var/global/list/additional_antag_types = list() var/enemy_count = 0 if(antag_tags && antag_tags.len) for(var/antag_tag in antag_tags) - var/datum/antagonist/antag = all_antag_types[antag_tag] + var/datum/antagonist/antag = GLOB.all_antag_types[antag_tag] if(!antag) continue var/list/potential = list() @@ -389,7 +389,7 @@ var/global/list/additional_antag_types = list() var/list/players = list() var/list/candidates = list() - var/datum/antagonist/antag_template = all_antag_types[antag_id] + var/datum/antagonist/antag_template = GLOB.all_antag_types[antag_id] if(!antag_template) return candidates @@ -451,15 +451,15 @@ var/global/list/additional_antag_types = list() if(antag_tags && antag_tags.len) antag_templates = list() for(var/antag_tag in antag_tags) - var/datum/antagonist/antag = all_antag_types[antag_tag] + var/datum/antagonist/antag = GLOB.all_antag_types[antag_tag] if(antag) antag_templates |= antag - if(additional_antag_types && additional_antag_types.len) + if(GLOB.additional_antag_types && GLOB.additional_antag_types.len) if(!antag_templates) antag_templates = list() - for(var/antag_type in additional_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.additional_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(antag) antag_templates |= antag diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index f71e1f732c..4a1e3b3a69 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -16,7 +16,7 @@ /datum/game_mode/meteor/process() if(world.time >= next_wave) - next_wave = world.time + meteor_wave_delay + next_wave = world.time + GLOB.meteor_wave_delay spawn() spawn_meteors(6, meteors_normal) /datum/game_mode/meteor/declare_completion() diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 976e01a58c..99df9683a4 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -1,4 +1,4 @@ -/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds +GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths of seconds //set to at least 100 unless you want evarr ruining every round //Meteors probability of spawning during a given wave diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 9d60efdb65..0e460f6bfa 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -2,7 +2,7 @@ MERCENARY ROUNDTYPE */ -var/list/nuke_disks = list() +GLOBAL_LIST_EMPTY(nuke_disks) /datum/game_mode/nuclear name = "Mercenary" @@ -22,12 +22,12 @@ var/list/nuke_disks = list() //delete all nuke disks not on a station zlevel /datum/game_mode/nuclear/proc/check_nuke_disks() - for(var/obj/item/disk/nuclear/N in nuke_disks) + for(var/obj/item/disk/nuclear/N in GLOB.nuke_disks) if(isNotStationLevel(N.z)) qdel(N) //checks if L has a nuke disk on their person /datum/game_mode/nuclear/proc/check_mob(mob/living/L) - for(var/obj/item/disk/nuclear/N in nuke_disks) + for(var/obj/item/disk/nuclear/N in GLOB.nuke_disks) if(N.storage_depth(L) >= 0) return 1 return 0 @@ -37,7 +37,7 @@ var/list/nuke_disks = list() ..() return var/disk_rescued = 1 - for(var/obj/item/disk/nuclear/D in nuke_disks) + for(var/obj/item/disk/nuclear/D in GLOB.nuke_disks) var/disk_area = get_area(D) if(!is_type_in_list(disk_area, centcom_areas)) disk_rescued = 0 diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index b219399753..47324dbaa8 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -212,7 +212,7 @@ worklocation() /obj/item/pinpointer/nukeop/proc/workdisk() - if(bomb_set) //If the bomb is set, lead to the shuttle + if(GLOB.bomb_set) //If the bomb is set, lead to the shuttle mode = 1 //Ensures worklocation() continues to work playsound(src, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep visible_message(span_notice("Shuttle Locator active.")) //Lets the mob holding it know that the mode has changed @@ -237,7 +237,7 @@ icon_state = "pinonfar" /obj/item/pinpointer/nukeop/proc/worklocation() - if(!bomb_set) + if(!GLOB.bomb_set) mode = 0 playsound(src, 'sound/machines/twobeep.ogg', 50, 1) visible_message(span_notice("Authentication Disk Locator active.")) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index a6ba347f94..5434bf6c4e 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1,5 +1,5 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 -var/global/list/all_objectives = list() +GLOBAL_LIST_EMPTY(all_objectives) /datum/objective var/datum/mind/owner = null //Who owns the objective. @@ -9,13 +9,13 @@ var/global/list/all_objectives = list() var/completed = 0 //currently only used for custom objectives. /datum/objective/New(var/text) - all_objectives |= src + GLOB.all_objectives |= src if(text) explanation_text = text ..() /datum/objective/Destroy() - all_objectives -= src + GLOB.all_objectives -= src . = ..() /datum/objective/proc/check_completion() @@ -67,7 +67,7 @@ var/global/list/all_objectives = list() /datum/objective/anti_revolution/execute/find_target() ..() if(target && target.current) - var/datum/gender/T = gender_datums[target.current.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[target.current.get_visible_gender()] explanation_text = "[target.current.real_name], the [target.assigned_role] has extracted confidential information above their clearance. Execute [T.him]." else explanation_text = "Free Objective" @@ -77,7 +77,7 @@ var/global/list/all_objectives = list() /datum/objective/anti_revolution/execute/find_target_by_role(role, role_type=0) ..(role, role_type) if(target && target.current) - var/datum/gender/T = gender_datums[target.current.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[target.current.get_visible_gender()] explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has extracted confidential information above their clearance. Execute [T.him]." else explanation_text = "Free Objective" @@ -126,7 +126,7 @@ var/global/list/all_objectives = list() /datum/objective/anti_revolution/demote/find_target() ..() if(target && target.current) - var/datum/gender/T = gender_datums[target.current.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[target.current.get_visible_gender()] explanation_text = "[target.current.real_name], the [target.assigned_role] has been classified as harmful to [using_map.company_name]'s goals. Demote [T.him] to assistant." else explanation_text = "Free Objective" @@ -135,7 +135,7 @@ var/global/list/all_objectives = list() /datum/objective/anti_revolution/demote/find_target_by_role(role, role_type=0) ..(role, role_type) if(target && target.current) - var/datum/gender/T = gender_datums[target.current.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[target.current.get_visible_gender()] explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has been classified as harmful to [using_map.company_name]'s goals. Demote [T.him] to assistant." else explanation_text = "Free Objective" diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index db935e35a4..63178a9cd9 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -57,7 +57,7 @@ var/summery = "" for(var/path in gene.conflict_traits) if(gene.conflict_traits[path]) // check if it actually conflicts - var/datum/trait/T = all_traits[path] + var/datum/trait/T = GLOB.all_traits[path] if(summery != "") summery += ", " summery += "[T.name]" diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm index f514b75e5a..263f74491b 100644 --- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm +++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm @@ -31,10 +31,10 @@ to_chat(user, span_danger("\The [src] has ran out of uses, and is now useless to you!")) return else - var/area_wanted = tgui_input_list(user, "Area to teleport to", "Teleportation", teleportlocs) + var/area_wanted = tgui_input_list(user, "Area to teleport to", "Teleportation", GLOB.teleportlocs) if(!area_wanted) return - var/area/A = teleportlocs[area_wanted] + var/area/A = GLOB.teleportlocs[area_wanted] if(!A) return diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index a6ab070e95..bde32f4e94 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -236,7 +236,7 @@ return C.registered_name /proc/get_all_job_icons() //For all existing HUD icons - return joblist + alt_titles_with_icons + list("Prisoner") + return joblist + GLOB.alt_titles_with_icons + list("Prisoner") /obj/proc/GetJobName() //Used in secHUD icon generation var/obj/item/card/id/I = GetID() diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index cce3f69603..e7acd6219b 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -32,7 +32,7 @@ return 1 /datum/job/ai/is_position_available() - return (empty_playable_ai_cores.len != 0) + return (GLOB.empty_playable_ai_cores.len != 0) /datum/job/ai/equip_preview(mob/living/carbon/human/H) H.equip_to_slot_or_del(new /obj/item/clothing/suit/straight_jacket(H), slot_wear_suit) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 57c6ab6dde..185c644dfd 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -486,7 +486,7 @@ var/global/datum/controller/occupations/job_master if(H.mind && job.department_accounts) var/remembered_info = "" for(var/D in job.department_accounts) - var/datum/money_account/department_account = department_accounts[D] + var/datum/money_account/department_account = GLOB.department_accounts[D] if(department_account) remembered_info += span_bold("Department account number ([D]):") + " #[department_account.account_number]
" remembered_info += span_bold("Department account pin ([D]):") + " [department_account.remote_access_pin]
" diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index 9a1c99715b..a2b2e61e75 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -1,6 +1,6 @@ #define WHITELISTFILE "data/whitelist.txt" -var/list/whitelist = list() +GLOBAL_LIST_EMPTY(whitelist) /hook/startup/proc/loadWhitelist() if(CONFIG_GET(flag/usewhitelist)) @@ -8,15 +8,15 @@ var/list/whitelist = list() return 1 /proc/load_whitelist() - whitelist = file2list(WHITELISTFILE) - if(!whitelist.len) whitelist = null + GLOB.whitelist = file2list(WHITELISTFILE) + if(!GLOB.whitelist.len) GLOB.whitelist = null /proc/check_whitelist(mob/M /*, var/rank*/) - if(!whitelist) + if(!GLOB.whitelist) return 0 - return ("[M.ckey]" in whitelist) + return ("[M.ckey]" in GLOB.whitelist) -/var/list/alien_whitelist = list() +GLOBAL_LIST_EMPTY(alien_whitelist) /hook/startup/proc/loadAlienWhitelist() if(CONFIG_GET(flag/usealienwhitelist)) @@ -38,10 +38,10 @@ var/list/whitelist = list() if(key != ckey(key)) warning("Alien whitelist entry appears to have key, not ckey: [line]") // The key contains invalid ckey characters continue - var/list/our_whitelists = alien_whitelist[key] // Try to see if we have one already and add to it + var/list/our_whitelists = GLOB.alien_whitelist[key] // Try to see if we have one already and add to it if(!our_whitelists) // Guess this is their first/only whitelist entry our_whitelists = list() - alien_whitelist[key] = our_whitelists + GLOB.alien_whitelist[key] = our_whitelists our_whitelists += left_and_right[2] /proc/is_alien_whitelisted(client/C, var/datum/species/species) @@ -58,7 +58,7 @@ var/list/whitelist = list() return TRUE //Search the whitelist - var/list/our_whitelists = alien_whitelist[C.ckey] + var/list/our_whitelists = GLOB.alien_whitelist[C.ckey] if("All" in our_whitelists) return TRUE if(species.name in our_whitelists) @@ -81,7 +81,7 @@ var/list/whitelist = list() return TRUE //Search the whitelist - var/list/our_whitelists = alien_whitelist[M.ckey] + var/list/our_whitelists = GLOB.alien_whitelist[M.ckey] if("All" in our_whitelists) return TRUE if(language.name in our_whitelists) @@ -103,8 +103,8 @@ var/list/whitelist = list() return 1 //If we have a loaded file, search it - if(alien_whitelist) - for (var/s in alien_whitelist) + if(GLOB.alien_whitelist) + for (var/s in GLOB.alien_whitelist) if(findtext(s,"[M.ckey] - [module]")) return 1 if(findtext(s,"[M.ckey] - All")) diff --git a/code/game/jobs/whitelist_vr.dm b/code/game/jobs/whitelist_vr.dm index 4088a0a505..45bcec4ec4 100644 --- a/code/game/jobs/whitelist_vr.dm +++ b/code/game/jobs/whitelist_vr.dm @@ -1,4 +1,4 @@ -var/list/job_whitelist = list() +GLOBAL_LIST_EMPTY(job_whitelist) /hook/startup/proc/loadJobWhitelist() load_jobwhitelist() @@ -9,7 +9,7 @@ var/list/job_whitelist = list() if (!text) log_misc("Failed to load config/jobwhitelist.txt") else - job_whitelist = splittext(text, "\n") + GLOB.job_whitelist = splittext(text, "\n") /proc/is_job_whitelisted(mob/M, var/rank) var/datum/job/job = job_master.GetJob(rank) @@ -19,10 +19,10 @@ var/list/job_whitelist = list() return 1 if(check_rights(R_ADMIN, 0)) return 1 - if(!job_whitelist) + if(!GLOB.job_whitelist) return 0 if(M && rank) - for (var/s in job_whitelist) + for (var/s in GLOB.job_whitelist) if(findtext(s,"[lowertext(M.ckey)] - [lowertext(rank)]")) return 1 if(findtext(s,"[M.ckey] - All")) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index e1db941635..c4256ddd51 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -308,7 +308,7 @@ if(!occupant) return if(occupant.stat == DEAD) - var/datum/gender/G = gender_datums[occupant.get_visible_gender()] + var/datum/gender/G = GLOB.gender_datums[occupant.get_visible_gender()] to_chat(ui.user, span_danger("This person has no life to preserve anymore. Take [G.him] to a department capable of reanimating [G.him].")) return var/chemical = params["chemid"] diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 6e4dca1f5f..20786be30b 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -1,6 +1,6 @@ // PRESETS /* -var/global/list/station_networks = list( +GLOBAL_LIST_INIT(station_networks, list( // NETWORK_CAFE_DOCK, NETWORK_CARGO, NETWORK_CIVILIAN, @@ -20,15 +20,15 @@ var/global/list/station_networks = list( NETWORK_PRISON, NETWORK_SECURITY, NETWORK_INTERROGATION - ) + )) */ -var/global/list/engineering_networks = list( +GLOBAL_LIST_INIT(engineering_networks, list( NETWORK_ENGINE, NETWORK_ENGINEERING, //NETWORK_ENGINEERING_OUTPOST, //VOREStation Edit: Tether has no Engineering Outpost, NETWORK_ALARM_ATMOS, NETWORK_ALARM_FIRE, - NETWORK_ALARM_POWER) + NETWORK_ALARM_POWER)) /obj/machinery/camera/network/crescent network = list(NETWORK_CRESCENT) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 797314db07..e9f8800bbf 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -177,7 +177,7 @@ var/open_for_latejoin = tgui_alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", list("Yes", "No")) == "Yes" var/obj/structure/AIcore/deactivated/D = new(loc) if(open_for_latejoin) - empty_playable_ai_cores += D + GLOB.empty_playable_ai_cores += D else var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, FALSE, laws, brain) if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created @@ -197,8 +197,8 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva state = 20//So it doesn't interact based on the above. Not really necessary. /obj/structure/AIcore/deactivated/Destroy() - if(src in empty_playable_ai_cores) - empty_playable_ai_cores -= src + if(src in GLOB.empty_playable_ai_cores) + GLOB.empty_playable_ai_cores -= src return ..() /obj/structure/AIcore/deactivated/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/aicard/card, var/mob/user) @@ -274,9 +274,9 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva var/obj/structure/AIcore/deactivated/D = cores[id] if(!D) return - if(D in empty_playable_ai_cores) - empty_playable_ai_cores -= D + if(D in GLOB.empty_playable_ai_cores) + GLOB.empty_playable_ai_cores -= D to_chat(src, "\The [id] is now [span_red("not available")] for latejoining AIs.") else - empty_playable_ai_cores += D + GLOB.empty_playable_ai_cores += D to_chat(src, "\The [id] is now [span_green("available")] for latejoining AIs.") diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index c145239480..3d8e75d9c0 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1108,7 +1108,7 @@ if(..()) return - if(gamepaid == 0 && vendor_account && !vendor_account.suspended) + if(gamepaid == 0 && GLOB.vendor_account && !GLOB.vendor_account.suspended) var/paid = 0 var/obj/item/card/id/W = I.GetID() if(W) //for IDs and PDAs and wallets with IDs @@ -1208,14 +1208,14 @@ // create entry in the purchaser's account log var/datum/transaction/T = new() - T.target_name = "[vendor_account.owner_name] (via [name])" + T.target_name = "[GLOB.vendor_account.owner_name] (via [name])" T.purpose = "Purchase of arcade game([name])" if(gameprice > 0) T.amount = "([gameprice])" else T.amount = "[gameprice]" T.source_terminal = name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() customer_account.transaction_log.Add(T) @@ -1228,16 +1228,16 @@ /// Add to vendor account /obj/machinery/computer/arcade/clawmachine/proc/credit_purchase(var/target as text) - vendor_account.money += gameprice + GLOB.vendor_account.money += gameprice var/datum/transaction/T = new() T.target_name = target T.purpose = "Purchase of arcade game([name])" T.amount = "[gameprice]" T.source_terminal = name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() - vendor_account.transaction_log.Add(T) + GLOB.vendor_account.transaction_log.Add(T) /// End Payment /obj/machinery/computer/arcade/clawmachine/attack_hand(mob/living/user) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 872f0ee29b..03867e3ae6 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -195,7 +195,7 @@ GLOBAL_LIST_EMPTY(entertainment_screens) light_color = "#FAC54B" /obj/machinery/computer/security/engineering/get_default_networks() - . = engineering_networks.Copy() + . = GLOB.engineering_networks.Copy() /obj/machinery/computer/security/nuclear name = "head mounted camera monitor" diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index c4dd7558dc..0bb006e23e 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -89,7 +89,7 @@ var/list/data = ..() if(data_core) data_core.get_manifest_list() - data["manifest"] = PDA_Manifest + data["manifest"] = GLOB.PDA_Manifest return data /obj/machinery/computer/card/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 78e7b5bb3c..1302289566 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -499,8 +499,8 @@ R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+") if(5) R.fields["p_stat"] = pick("*SSD*", "Active", "Physically Unfit", "Disabled") - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 043bfc8e5d..96c73dde76 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -55,7 +55,7 @@ if((get_z(L) in using_map.station_levels) && !istype(L.loc, /turf/space)) loc_display = T.loc if(track.malfunction) - loc_display = pick(teleportlocs) + loc_display = pick(GLOB.teleportlocs) trackImplants.Add(list(list( "host" = L, "ref" = "\ref[track]", diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm index b09328ab82..ababe6e073 100644 --- a/code/game/machinery/computer/prisonshuttle.dm +++ b/code/game/machinery/computer/prisonshuttle.dm @@ -3,12 +3,12 @@ #define PRISON_STATION_AREATYPE "/area/shuttle/prison/station" //Type of the prison shuttle area for station #define PRISON_DOCK_AREATYPE "/area/shuttle/prison/prison" //Type of the prison shuttle area for dock -var/prison_shuttle_moving_to_station = 0 -var/prison_shuttle_moving_to_prison = 0 -var/prison_shuttle_at_station = 0 -var/prison_shuttle_can_send = 1 -var/prison_shuttle_time = 0 -var/prison_shuttle_timeleft = 0 +GLOBAL_VAR_INIT(prison_shuttle_moving_to_station, 0) +GLOBAL_VAR_INIT(prison_shuttle_moving_to_prison, 0) +GLOBAL_VAR_INIT(prison_shuttle_at_station, 0) +GLOBAL_VAR_INIT(prison_shuttle_can_send, 1) +GLOBAL_VAR_INIT(prison_shuttle_time, 0) +GLOBAL_VAR_INIT(prison_shuttle_timeleft, 0) /obj/machinery/computer/prison_shuttle name = "prison shuttle control console" @@ -42,8 +42,8 @@ var/prison_shuttle_timeleft = 0 dat = src.temp else dat += {"
Prison Shuttle
- \nLocation: [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]
- [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "\n*Shuttle already called*
\n
":prison_shuttle_at_station ? "\nSend to Dock
\n
":"\nSend to station
\n
"] + \nLocation: [GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison ? "Moving to station ([GLOB.prison_shuttle_timeleft] Secs.)":GLOB.prison_shuttle_at_station ? "Station":"Dock"]
+ [GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison ? "\n*Shuttle already called*
\n
":GLOB.prison_shuttle_at_station ? "\nSend to Dock
\n
":"\nSend to station
\n
"] \nClose"} user << browse("[dat]", "window=computer;size=575x450") @@ -62,13 +62,13 @@ var/prison_shuttle_timeleft = 0 if (!prison_can_move()) to_chat(usr, span_warning("The prison shuttle is unable to leave.")) return - if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return + if(!GLOB.prison_shuttle_at_station|| GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison) return post_signal("prison") to_chat(usr, span_notice("The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds.")) src.temp += "Shuttle sent.

OK" src.updateUsrDialog(usr) - prison_shuttle_moving_to_prison = 1 - prison_shuttle_time = world.timeofday + PRISON_MOVETIME + GLOB.prison_shuttle_moving_to_prison = 1 + GLOB.prison_shuttle_time = world.timeofday + PRISON_MOVETIME spawn(0) prison_process() @@ -76,13 +76,13 @@ var/prison_shuttle_timeleft = 0 if (!prison_can_move()) to_chat(usr, span_warning("The prison shuttle is unable to leave.")) return - if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return + if(GLOB.prison_shuttle_at_station || GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison) return post_signal("prison") to_chat(usr, span_notice("The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds.")) src.temp += "Shuttle sent.

OK" src.updateUsrDialog(usr) - prison_shuttle_moving_to_station = 1 - prison_shuttle_time = world.timeofday + PRISON_MOVETIME + GLOB.prison_shuttle_moving_to_station = 1 + GLOB.prison_shuttle_time = world.timeofday + PRISON_MOVETIME spawn(0) prison_process() @@ -95,20 +95,20 @@ var/prison_shuttle_timeleft = 0 /obj/machinery/computer/prison_shuttle/proc/prison_can_move() - if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0 + if(GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison) return 0 else return 1 /obj/machinery/computer/prison_shuttle/proc/prison_break() switch(prison_break) if (0) - if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return + if(!GLOB.prison_shuttle_at_station || GLOB.prison_shuttle_moving_to_prison) return - prison_shuttle_moving_to_prison = 1 - prison_shuttle_at_station = prison_shuttle_at_station + GLOB.prison_shuttle_moving_to_prison = 1 + GLOB.prison_shuttle_at_station = GLOB.prison_shuttle_at_station - if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station) - prison_shuttle_time = world.timeofday + PRISON_MOVETIME + if (!GLOB.prison_shuttle_moving_to_prison || !GLOB.prison_shuttle_moving_to_station) + GLOB.prison_shuttle_time = world.timeofday + PRISON_MOVETIME spawn(0) prison_process() prison_break = 1 @@ -128,22 +128,22 @@ var/prison_shuttle_timeleft = 0 /obj/machinery/computer/prison_shuttle/proc/prison_process() - while(prison_shuttle_time - world.timeofday > 0) - var/ticksleft = prison_shuttle_time - world.timeofday + while(GLOB.prison_shuttle_time - world.timeofday > 0) + var/ticksleft = GLOB.prison_shuttle_time - world.timeofday if(ticksleft > 1e5) - prison_shuttle_time = world.timeofday + 10 // midnight rollover + GLOB.prison_shuttle_time = world.timeofday + 10 // midnight rollover - prison_shuttle_timeleft = (ticksleft / 10) + GLOB.prison_shuttle_timeleft = (ticksleft / 10) sleep(5) - prison_shuttle_moving_to_station = 0 - prison_shuttle_moving_to_prison = 0 + GLOB.prison_shuttle_moving_to_station = 0 + GLOB.prison_shuttle_moving_to_prison = 0 - switch(prison_shuttle_at_station) + switch(GLOB.prison_shuttle_at_station) if(0) - prison_shuttle_at_station = 1 - if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return + GLOB.prison_shuttle_at_station = 1 + if (GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison) return if (!prison_can_move()) to_chat(usr, span_warning("The prison shuttle is unable to leave.")) @@ -171,8 +171,8 @@ var/prison_shuttle_timeleft = 0 start_location.move_contents_to(end_location) if(1) - prison_shuttle_at_station = 0 - if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return + GLOB.prison_shuttle_at_station = 0 + if (GLOB.prison_shuttle_moving_to_station || GLOB.prison_shuttle_moving_to_prison) return if (!prison_can_move()) to_chat(usr, span_warning("The prison shuttle is unable to leave.")) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index d3179e8e57..4399559d74 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -507,8 +507,8 @@ R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released") if(5) R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit") - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 81aa6d0522..bfab1cb8b8 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -209,8 +209,8 @@ screen = clamp(text2num(params["screen"]) || 0, GENERAL_RECORD_LIST, GENERAL_RECORD_MAINT) active1 = null if("del_all") - if(PDA_Manifest) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest) + GLOB.PDA_Manifest.Cut() for(var/datum/data/record/R in data_core.general) qdel(R) set_temp("All employment records deleted.") @@ -225,8 +225,8 @@ if(ui.user.Adjacent(src)) active1.fields["notes"] = new_notes if("del_r") - if(PDA_Manifest) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest) + GLOB.PDA_Manifest.Cut() if(active1) for(var/datum/data/record/R in data_core.medical) if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) @@ -242,8 +242,8 @@ active1 = general_record screen = GENERAL_RECORD_DATA if("new") - if(PDA_Manifest) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest) + GLOB.PDA_Manifest.Cut() active1 = data_core.CreateGeneralRecord() screen = GENERAL_RECORD_DATA set_temp("Employment record created.", "success") @@ -384,8 +384,8 @@ R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released") if(5) R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit") - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index 1077108894..f80a45158e 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -177,7 +177,7 @@ pack_list.Add(list(pack)) data["supply_packs"] = pack_list - data["categories"] = all_supply_groups + data["categories"] = GLOB.all_supply_groups return data /obj/machinery/computer/supplycomp/tgui_act(action, params, datum/tgui/ui) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 29f709225d..327d445439 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -463,7 +463,7 @@ qdel(B) //Update any existing objectives involving this mob. - for(var/datum/objective/O in all_objectives) + for(var/datum/objective/O in GLOB.all_objectives) // We don't want revs to get objectives that aren't for heads of staff. Letting // them win or lose based on cryo is silly so we remove the objective. if(O.target == to_despawn.mind) @@ -495,8 +495,8 @@ // Delete them from datacore. - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() for(var/datum/data/record/R in data_core.medical) if((R.fields["name"] == to_despawn.real_name)) qdel(R) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index fff5cc2e70..ec110438cd 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -1,4 +1,4 @@ -var/list/doppler_arrays = list() +GLOBAL_LIST_EMPTY(doppler_arrays) /obj/machinery/doppler_array anchored = TRUE @@ -11,10 +11,10 @@ var/list/doppler_arrays = list() /obj/machinery/doppler_array/Initialize(mapload) . = ..() - doppler_arrays += src + GLOB.doppler_arrays += src /obj/machinery/doppler_array/Destroy() - doppler_arrays -= src + GLOB.doppler_arrays -= src . = ..() /obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took) diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index 907a0855b6..b52d1e7285 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -49,7 +49,7 @@ FIRE ALARM offset_alarm() if(z in using_map.contact_levels) - set_security_level(security_level ? get_security_level() : "green") + set_security_level(GLOB.security_level ? get_security_level() : "green") /obj/machinery/firealarm/proc/offset_alarm() pixel_x = (dir & 3) ? 0 : (dir == 4 ? 26 : -26) diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 9d68cd33bc..b20ea2c9b5 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -1,16 +1,16 @@ -/var/global/list/construction_frame_wall -/var/global/list/construction_frame_floor +GLOBAL_LIST(construction_frame_wall) +GLOBAL_LIST(construction_frame_floor) /proc/populate_frame_types() //Create global frame type list if it hasn't been made already. - construction_frame_wall = list() - construction_frame_floor = list() + GLOB.construction_frame_wall = list() + GLOB.construction_frame_floor = list() for(var/R in subtypesof(/datum/frame/frame_types)) var/datum/frame/frame_types/type = new R if(type.frame_style == FRAME_STYLE_WALL) - construction_frame_wall += type + GLOB.construction_frame_wall += type else - construction_frame_floor += type + GLOB.construction_frame_floor += type ////////////////////////////// // Frame Type Datum - Describes the frame structures that can be created from a frame item. diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm index 44f5ebac85..65a4f6b228 100644 --- a/code/game/machinery/gear_dispenser.dm +++ b/code/game/machinery/gear_dispenser.dm @@ -8,7 +8,7 @@ #define GD_UNLIMITED 8 // will not deplete amount when gear is taken #define GD_UNIQUE 16 // each instance of this will allow people to take 1 thing -var/list/dispenser_presets = list() +GLOBAL_LIST_EMPTY(dispenser_presets) // Standard generic item list /datum/gear_disp diff --git a/code/game/machinery/holoposter.dm b/code/game/machinery/holoposter.dm index dd84e6e64c..eea5c071a9 100644 --- a/code/game/machinery/holoposter.dm +++ b/code/game/machinery/holoposter.dm @@ -54,12 +54,12 @@ GLOBAL_LIST_EMPTY(holoposters) examine_addon = "It appears to be malfunctioning." new_color = "#6A6C71" else - if((z in using_map.station_levels) && global.security_level) // 0 is fine, everything higher is alert levels + if((z in using_map.station_levels) && GLOB.security_level) // 0 is fine, everything higher is alert levels icon_state = "attention" examine_addon = "It warns you to remain calm and contact your supervisor as soon as possible." new_color = "#AA7039" alerting = TRUE - else if(alerting && !global.security_level) // coming out of alert + else if(alerting && !GLOB.security_level) // coming out of alert alerting = FALSE set_rand_sprite() return diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 7502d9f01b..7a7a540dab 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -1,7 +1,7 @@ // Navigation beacon for AI robots // Functions as a transponder: looks for incoming signal matching -var/global/list/navbeacons = list() // no I don't like putting this in, but it will do for now +GLOBAL_LIST_EMPTY(navbeacons) // no I don't like putting this in, but it will do for now /obj/machinery/navbeacon icon = 'icons/obj/objects.dmi' @@ -26,7 +26,7 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w var/turf/T = loc hide(!T.is_plating()) - navbeacons += src + GLOB.navbeacons += src // set the transponder codes assoc list from codes_txt // DEPRECATED - This is kept only for compatibilty with old map files! Do not use this! @@ -201,7 +201,7 @@ Transponder Codes:
    "} updateDialog() /obj/machinery/navbeacon/Destroy() - navbeacons.Remove(src) + GLOB.navbeacons.Remove(src) . = ..() diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index f1544b1301..0697c5ba1e 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -1,4 +1,4 @@ -var/bomb_set +GLOBAL_VAR(bomb_set) /obj/machinery/nuclearbomb name = "\improper Nuclear Fission Explosive" @@ -45,7 +45,7 @@ var/bomb_set /obj/machinery/nuclearbomb/process() if(timing) - bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed. + GLOB.bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed. timeleft-- if(timeleft <= 0) explode() @@ -274,7 +274,7 @@ var/bomb_set if(icon_state == "nuclearbomb2") icon_state = "nuclearbomb1" timing = 0 - bomb_set = 0 + GLOB.bomb_set = 0 if(light_wire == temp_wire) lighthack = !lighthack @@ -321,18 +321,18 @@ var/bomb_set if(!lighthack) icon_state = "nuclearbomb2" if(!safety) - bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N + GLOB.bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N else - bomb_set = 0 + GLOB.bomb_set = 0 else - bomb_set = 0 + GLOB.bomb_set = 0 if(!lighthack) icon_state = "nuclearbomb1" if(href_list["safety"]) safety = !(safety) if(safety) timing = 0 - bomb_set = 0 + GLOB.bomb_set = 0 if(href_list["anchor"]) if(removal_stage == 5) @@ -414,10 +414,10 @@ var/bomb_set /obj/item/disk/nuclear/Initialize(mapload) . = ..() - nuke_disks += src + GLOB.nuke_disks += src /obj/item/disk/nuclear/Destroy() - if(!nuke_disks.len && blobstart.len > 0) + if(!GLOB.nuke_disks.len && blobstart.len > 0) var/obj/D = new /obj/item/disk/nuclear(pick(blobstart)) message_admins("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") log_game("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index db0714246c..3b98470a56 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -12,10 +12,10 @@ #define RCS_MESSAUTH 7 // Authentication before sending #define RCS_ANNOUNCE 8 // Send announcement -var/req_console_assistance = list() -var/req_console_supplies = list() -var/req_console_information = list() -var/list/obj/machinery/requests_console/allConsoles = list() +GLOBAL_LIST_EMPTY(req_console_assistance) +GLOBAL_LIST_EMPTY(req_console_supplies) +GLOBAL_LIST_EMPTY(req_console_information) +GLOBAL_LIST_EMPTY_TYPED(allConsoles, /obj/machinery/requests_console) /obj/machinery/requests_console name = "requests console" @@ -61,30 +61,30 @@ var/list/obj/machinery/requests_console/allConsoles = list() announcement.newscast = 1 name = "[department] requests console" - allConsoles += src + GLOB.allConsoles += src if(departmentType & RC_ASSIST) - req_console_assistance |= department + GLOB.req_console_assistance |= department if(departmentType & RC_SUPPLY) - req_console_supplies |= department + GLOB.req_console_supplies |= department if(departmentType & RC_INFO) - req_console_information |= department + GLOB.req_console_information |= department update_icon() /obj/machinery/requests_console/Destroy() - allConsoles -= src + GLOB.allConsoles -= src var/lastDeptRC = 1 - for (var/obj/machinery/requests_console/Console in allConsoles) + for (var/obj/machinery/requests_console/Console in GLOB.allConsoles) if(Console.department == department) lastDeptRC = 0 break if(lastDeptRC) if(departmentType & RC_ASSIST) - req_console_assistance -= department + GLOB.req_console_assistance -= department if(departmentType & RC_SUPPLY) - req_console_supplies -= department + GLOB.req_console_supplies -= department if(departmentType & RC_INFO) - req_console_information -= department + GLOB.req_console_information -= department return ..() /obj/machinery/requests_console/power_change() @@ -125,9 +125,9 @@ var/list/obj/machinery/requests_console/allConsoles = list() data["silent"] = silent data["announcementConsole"] = announcementConsole - data["assist_dept"] = req_console_assistance - data["supply_dept"] = req_console_supplies - data["info_dept"] = req_console_information + data["assist_dept"] = GLOB.req_console_assistance + data["supply_dept"] = GLOB.req_console_supplies + data["info_dept"] = GLOB.req_console_information data["message"] = message data["recipient"] = recipient @@ -214,7 +214,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(tempScreen == RCS_ANNOUNCE && !announcementConsole) return if(tempScreen == RCS_VIEWMSGS) - for (var/obj/machinery/requests_console/Console in allConsoles) + for (var/obj/machinery/requests_console/Console in GLOB.allConsoles) if(Console.department == department) Console.newmessagepriority = 0 Console.update_icon() @@ -242,13 +242,13 @@ var/list/obj/machinery/requests_console/allConsoles = list() announcement.newscast = 1 name = "[department] Requests Console" - allConsoles += src + GLOB.allConsoles += src if(departmentType & RC_ASSIST) - req_console_assistance |= department + GLOB.req_console_assistance |= department if(departmentType & RC_SUPPLY) - req_console_supplies |= department + GLOB.req_console_supplies |= department if(departmentType & RC_INFO) - req_console_information |= department + GLOB.req_console_information |= department return if(istype(O, /obj/item/card/id)) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 00c32d540d..1d9d8a1b74 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -7,8 +7,8 @@ They receive their message from a server after the message has been logged. */ -var/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam -var/message_delay = 0 // To make sure restarting the recentmessages list is kept in sync +GLOBAL_LIST_EMPTY(recentmessages) // global list of recent messages broadcasted : used to circumvent massive radio spam +GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages list is kept in sync /obj/machinery/telecomms/broadcaster name = "Subspace Broadcaster" @@ -52,9 +52,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept original.data["level"] = signal.data["level"] var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]" - if(signal_message in recentmessages) + if(signal_message in GLOB.recentmessages) return - recentmessages.Add(signal_message) + GLOB.recentmessages.Add(signal_message) if(signal.data["slow"] > 0) sleep(signal.data["slow"]) // simulate the network lag if necessary @@ -104,19 +104,19 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept signal.data["compression"], signal.data["level"], signal.frequency, signal.data["verb"], forced_radios) - if(!message_delay) - message_delay = 1 + if(!GLOB.message_delay) + GLOB.message_delay = 1 spawn(10) - message_delay = 0 - recentmessages = list() + GLOB.message_delay = 0 + GLOB.recentmessages = list() /* --- Do a snazzy animation! --- */ flick("broadcaster_send", src) /obj/machinery/telecomms/broadcaster/Destroy() // In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore. - if(message_delay) - message_delay = 0 + if(GLOB.message_delay) + GLOB.message_delay = 0 . = ..() diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index 61330cb291..6c48fa0245 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -13,9 +13,9 @@ /obj/item/frame/proc/update_type_list() if(!frame_types_floor) - frame_types_floor = construction_frame_floor + frame_types_floor = GLOB.construction_frame_floor if(!frame_types_wall) - frame_types_wall = construction_frame_wall + frame_types_wall = GLOB.construction_frame_wall /obj/item/frame/attackby(obj/item/W as obj, mob/user as mob) if(W.has_tool_quality(TOOL_WRENCH)) diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm index 9bcafc2a60..7e38121aeb 100644 --- a/code/game/magic/Uristrunes.dm +++ b/code/game/magic/Uristrunes.dm @@ -1,9 +1,8 @@ - -var/list/word_to_uristrune_table = null +GLOBAL_LIST(word_to_uristrune_table) /proc/word_to_uristrune_bit(word) - if(word_to_uristrune_table == null) - word_to_uristrune_table = list() + if(GLOB.word_to_uristrune_table == null) + GLOB.word_to_uristrune_table = list() var/bit = 1 var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "mgar", "balaq", "karazet", "geeri") @@ -11,41 +10,41 @@ var/list/word_to_uristrune_table = null while(length(words)) var/w = pick(words) - word_to_uristrune_table[w] = bit + GLOB.word_to_uristrune_table[w] = bit words -= w bit <<= 1 - return word_to_uristrune_table[word] + return GLOB.word_to_uristrune_table[word] /proc/get_uristrune_cult(word1, word2, word3) var/animated - if((word1 == cultwords["travel"] && word2 == cultwords["self"]) \ - || (word1 == cultwords["join"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["join"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["see"] && word2 == cultwords["blood"] && word3 == cultwords["hell"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["technology"]) \ - || (word1 == cultwords["travel"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["see"] && word2 == cultwords["hell"] && word3 == cultwords["join"]) \ - || (word1 == cultwords["blood"] && word2 == cultwords["join"] && word3 == cultwords["hell"]) \ - || (word1 == cultwords["hide"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["travel"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["technology"] && word3 == cultwords["join"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["blood"] && word3 == cultwords["join"]) \ - || (word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["hide"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["travel"] && word2 == cultwords["technology"] && word3 == cultwords["other"]) \ - || (word1 == cultwords["join"] && word2 == cultwords["other"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["hide"] && word2 == cultwords["other"] && word3 == cultwords["see"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["other"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) \ - || (word1 == cultwords["self"] && word2 == cultwords["other"] && word3 == cultwords["technology"]) \ - || (word1 == cultwords["travel"] && word2 == cultwords["other"]) \ - || (word1 == cultwords["join"] && word2 == cultwords["hide"] && word3 == cultwords["technology"]) ) + if((word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["join"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["join"] && word3 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["see"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["hell"]) \ + || (word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["technology"]) \ + || (word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["see"] && word2 == GLOB.cultwords["hell"] && word3 == GLOB.cultwords["join"]) \ + || (word1 == GLOB.cultwords["blood"] && word2 == GLOB.cultwords["join"] && word3 == GLOB.cultwords["hell"]) \ + || (word1 == GLOB.cultwords["hide"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["blood"]) \ + || (word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["travel"] && word3 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["blood"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["travel"]) \ + || (word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["technology"] && word3 == GLOB.cultwords["join"]) \ + || (word1 == GLOB.cultwords["hell"] && word2 == GLOB.cultwords["blood"] && word3 == GLOB.cultwords["join"]) \ + || (word1 == GLOB.cultwords["blood"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["hide"]) \ + || (word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["travel"] && word3 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["technology"] && word3 == GLOB.cultwords["other"]) \ + || (word1 == GLOB.cultwords["join"] && word2 == GLOB.cultwords["other"] && word3 == GLOB.cultwords["self"]) \ + || (word1 == GLOB.cultwords["hide"] && word2 == GLOB.cultwords["other"] && word3 == GLOB.cultwords["see"]) \ + || (word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["other"]) \ + || (word1 == GLOB.cultwords["destroy"] && word2 == GLOB.cultwords["see"] && word3 == GLOB.cultwords["blood"]) \ + || (word1 == GLOB.cultwords["self"] && word2 == GLOB.cultwords["other"] && word3 == GLOB.cultwords["technology"]) \ + || (word1 == GLOB.cultwords["travel"] && word2 == GLOB.cultwords["other"]) \ + || (word1 == GLOB.cultwords["join"] && word2 == GLOB.cultwords["hide"] && word3 == GLOB.cultwords["technology"]) ) animated = 1 else animated = 0 diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index bc7bace461..ac75223887 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -72,7 +72,7 @@ /obj/machinery/mecha_part_fabricator/pros/Initialize(mapload) . = ..() - manufacturer = basic_robolimb.company + manufacturer = GLOB.basic_robolimb.company /obj/machinery/mecha_part_fabricator/pros/dispense_built_part(datum/design/D) var/obj/item/I = ..() @@ -86,10 +86,10 @@ data["species_types"] = species_types data["species"] = species - if(all_robolimbs) + if(GLOB.all_robolimbs) var/list/T = list() - for(var/A in all_robolimbs) - var/datum/robolimb/R = all_robolimbs[A] + for(var/A in GLOB.all_robolimbs) + var/datum/robolimb/R = GLOB.all_robolimbs[A] if(R.unavailable_to_build) continue if(species in R.species_cannot_use) @@ -118,8 +118,8 @@ return if("manufacturer") var/list/new_manufacturers = list() - for(var/A in all_robolimbs) - var/datum/robolimb/R = all_robolimbs[A] + for(var/A in GLOB.all_robolimbs) + var/datum/robolimb/R = GLOB.all_robolimbs[A] if(R.unavailable_to_build) continue if(species in R.species_cannot_use) @@ -138,12 +138,12 @@ if(istype(I,/obj/item/disk/limb)) var/obj/item/disk/limb/D = I - if(!D.company || !(D.company in all_robolimbs)) + if(!D.company || !(D.company in GLOB.all_robolimbs)) to_chat(user, span_warning("This disk seems to be corrupted!")) else to_chat(user, span_notice("Installing blueprint files for [D.company]...")) if(do_after(user,50,src)) - var/datum/robolimb/R = all_robolimbs[D.company] + var/datum/robolimb/R = GLOB.all_robolimbs[D.company] R.unavailable_to_build = 0 to_chat(user, span_notice("Installed [D.company] blueprints!")) qdel(I) diff --git a/code/game/objects/effects/landmarks_vr.dm b/code/game/objects/effects/landmarks_vr.dm index 9d71b94205..4318094786 100644 --- a/code/game/objects/effects/landmarks_vr.dm +++ b/code/game/objects/effects/landmarks_vr.dm @@ -17,10 +17,10 @@ /obj/effect/landmark/late_antag/Initialize(mapload) . = ..() - var/datum/antagonist/A = all_antag_types[antag_id] + var/datum/antagonist/A = GLOB.all_antag_types[antag_id] if(istype(A)) A.starting_locations |= get_turf(src) - var/list/allpoints = all_antag_spawnpoints[A.landmark_id] + var/list/allpoints = GLOB.all_antag_spawnpoints[A.landmark_id] allpoints |= get_turf(src) /obj/effect/landmark/late_antag/ert diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index b7d1d2aaa0..416d271685 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -96,8 +96,8 @@ if(Debug2) to_world_log("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.") //Machines which report explosions. - for(var/i,i<=doppler_arrays.len,i++) - var/obj/machinery/doppler_array/Array = doppler_arrays[i] + for(var/i, i <= GLOB.doppler_arrays.len, i++) + var/obj/machinery/doppler_array/Array = GLOB.doppler_arrays[i] if(Array) Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took) sleep(8) diff --git a/code/game/objects/items/antag_spawners.dm b/code/game/objects/items/antag_spawners.dm index fb0c5309f7..74902ba50d 100644 --- a/code/game/objects/items/antag_spawners.dm +++ b/code/game/objects/items/antag_spawners.dm @@ -86,7 +86,7 @@ qdel(src) /obj/item/antag_spawner/technomancer_apprentice/equip_antag(mob/technomancer_mob) - var/datum/antagonist/technomancer/antag_datum = all_antag_types[MODE_TECHNOMANCER] + var/datum/antagonist/technomancer/antag_datum = GLOB.all_antag_types[MODE_TECHNOMANCER] antag_datum.equip_apprentice(technomancer_mob) diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index 06e30f51a8..986b549f7b 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -307,7 +307,7 @@ // Update manifest' if(data_core) data_core.get_manifest_list() - data["manifest"] = PDA_Manifest + data["manifest"] = GLOB.PDA_Manifest data["mapRef"] = map_name return data diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index e3443caa50..df90cce0b3 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -2,7 +2,7 @@ // // Allows ghosts to roleplay with crewmembers without having to commit to joining the round, and also allows communications between two communicators. -var/global/list/obj/item/communicator/all_communicators = list() +GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator) // List of core tabs the communicator can switch to #define HOMETAB 1 @@ -97,8 +97,8 @@ var/global/list/obj/item/communicator/all_communicators = list() // assign the device to the holder's name automatically in a spectacularly shitty way. /obj/item/communicator/Initialize(mapload) . = ..() - all_communicators += src - all_communicators = sortAtom(all_communicators) + GLOB.all_communicators += src + GLOB.all_communicators = sortAtom(GLOB.all_communicators) node = get_exonet_node() START_PROCESSING(SSobj, src) camera = new(src) @@ -187,7 +187,7 @@ var/global/list/obj/item/communicator/all_communicators = list() src.known_devices.Cut() if(!get_connection_to_tcomms()) //If the network's down, we can't see anything. return - for(var/obj/item/communicator/comm in all_communicators) + for(var/obj/item/communicator/comm in GLOB.all_communicators) if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves. continue src.known_devices |= comm @@ -314,7 +314,7 @@ var/global/list/obj/item/communicator/all_communicators = list() node = null //Clean up references that might point at us - all_communicators -= src + GLOB.all_communicators -= src STOP_PROCESSING(SSobj, src) listening_objects.Remove(src) QDEL_NULL(camera) diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm index c964e9f28c..731e1e276e 100644 --- a/code/game/objects/items/devices/communicator/messaging.dm +++ b/code/game/objects/items/devices/communicator/messaging.dm @@ -140,7 +140,7 @@ return var/list/choices = list() - for(var/obj/item/communicator/comm in all_communicators) + for(var/obj/item/communicator/comm in GLOB.all_communicators) if(!comm.network_visibility || !comm.exonet || !comm.exonet.address) continue choices.Add(comm) diff --git a/code/game/objects/items/devices/communicator/phone.dm b/code/game/objects/items/devices/communicator/phone.dm index dc46930913..642496bae3 100644 --- a/code/game/objects/items/devices/communicator/phone.dm +++ b/code/game/objects/items/devices/communicator/phone.dm @@ -306,7 +306,7 @@ return var/list/choices = list() - for(var/obj/item/communicator/comm in all_communicators) + for(var/obj/item/communicator/comm in GLOB.all_communicators) if(!comm.network_visibility || !comm.exonet || !comm.exonet.address) continue choices.Add(comm) diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm index 774fa3a029..2a7962f24f 100644 --- a/code/game/objects/items/devices/scanners/sleevemate.dm +++ b/code/game/objects/items/devices/scanners/sleevemate.dm @@ -194,7 +194,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob //The actual options if(href_list["mindscan"]) - if(!target.mind || (target.mind.name in prevent_respawns)) + if(!target.mind || (target.mind.name in GLOB.prevent_respawns)) to_chat(usr,span_warning("Target seems totally braindead.")) return @@ -231,7 +231,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob return if(href_list["mindsteal"]) - if(!target.mind || (target.mind.name in prevent_respawns)) + if(!target.mind || (target.mind.name in GLOB.prevent_respawns)) to_chat(usr,span_warning("Target seems totally braindead.")) return diff --git a/code/game/objects/items/devices/ticket_printer.dm b/code/game/objects/items/devices/ticket_printer.dm index 51b0d3e8ba..8bc1194f54 100644 --- a/code/game/objects/items/devices/ticket_printer.dm +++ b/code/game/objects/items/devices/ticket_printer.dm @@ -41,7 +41,7 @@ p.name = "Security Citation: [ticket_name]" playsound(user, 'sound/items/ticket_printer.ogg', 75, 1) - security_printer_tickets |= details + GLOB.security_printer_tickets |= details log_and_message_admins("has issued '[ticket_name]' a security citation: \"[details]\"", user) last_print = world.time diff --git a/code/game/objects/items/devices/uplink_random_lists.dm b/code/game/objects/items/devices/uplink_random_lists.dm index 060d93a4b8..bb1ee97d77 100644 --- a/code/game/objects/items/devices/uplink_random_lists.dm +++ b/code/game/objects/items/devices/uplink_random_lists.dm @@ -108,8 +108,8 @@ var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random #ifdef DEBUG /proc/debug_uplink_purchage_log() - for(var/antag_type in all_antag_types) - var/datum/antagonist/A = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/A = GLOB.all_antag_types[antag_type] A.print_player_summary() /proc/debug_uplink_item_assoc_list() diff --git a/code/game/objects/items/toys/mech_toys.dm b/code/game/objects/items/toys/mech_toys.dm index e404e7bb55..b4b00cfe5a 100644 --- a/code/game/objects/items/toys/mech_toys.dm +++ b/code/game/objects/items/toys/mech_toys.dm @@ -166,7 +166,7 @@ return //extend the offer of battle to the other mech - var/datum/gender/T = gender_datums[user.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] to_chat(user, span_notice("You offer battle to [target.name]!")) to_chat(target, span_notice(span_bold("[user.name] wants to battle with [T.His] [name]!") + " " + span_italics("Attack them with a toy mech to initiate combat."))) wants_to_battle = TRUE @@ -393,7 +393,7 @@ /obj/item/toy/mecha/proc/check_battle_start(mob/living/carbon/user, obj/item/toy/mecha/attacker, mob/living/carbon/target) var/datum/gender/T if(target) - T = gender_datums[target.get_visible_gender()] // Doing this because Polaris Code has shitty gender datums and it's clunkier than FUCK. + T = GLOB.gender_datums[target.get_visible_gender()] // Doing this because Polaris Code has shitty gender datums and it's clunkier than FUCK. if(attacker && attacker.in_combat) to_chat(user, span_notice("[target ? T.His : "Your" ] [attacker.name] is in combat.")) if(target) diff --git a/code/game/objects/items/weapons/canes.dm b/code/game/objects/items/weapons/canes.dm index a5143939c8..af661143c0 100644 --- a/code/game/objects/items/weapons/canes.dm +++ b/code/game/objects/items/weapons/canes.dm @@ -29,7 +29,7 @@ temp_blade.attack_self() /obj/item/cane/concealed/attack_self(var/mob/user) - var/datum/gender/T = gender_datums[user.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] if(concealed_blade) user.visible_message(span_warning("[user] has unsheathed \a [concealed_blade] from [T.his] [src]!"), "You unsheathe \the [concealed_blade] from \the [src].") // Calling drop/put in hands to properly call item drop/pickup procs @@ -46,7 +46,7 @@ /obj/item/cane/concealed/attackby(var/obj/item/material/sword/katana/caneblade/W, var/mob/user) if(!src.concealed_blade && istype(W)) - var/datum/gender/T = gender_datums[user.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] user.visible_message(span_warning("[user] has sheathed \a [W] into [T.his] [src]!"), "You sheathe \the [W] into \the [src].") playsound(src, 'sound/weapons/holster/sheathin.ogg', 50, 1) user.drop_from_inventory(W) 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 6793456f49..915076be5a 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -25,7 +25,7 @@ /obj/item/circuitboard/security/engineering/Initialize(mapload) . = ..() - network = engineering_networks + network = GLOB.engineering_networks /obj/item/circuitboard/security/mining name = T_BOARD("mining camera monitor") diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index c80d132e56..f38f9af967 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -127,7 +127,7 @@ var/last_chew = 0 var/obj/item/organ/external/O = H.organs_by_name[(H.hand ? BP_L_HAND : BP_R_HAND)] if (!O) return - var/datum/gender/T = gender_datums[H.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] var/s = span_warning("[H.name] chews on [T.his] [O.name]!") H.visible_message(s, span_warning("You chew on your [O.name]!")) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 90d2ffe032..f9a07afa49 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -542,7 +542,7 @@ the implant may become unstable and either pre-maturely inject the subject or si STOP_PROCESSING(SSobj, src) if ("emp") var/obj/item/radio/headset/a = new /obj/item/radio/headset/heads/captain(null) - var/name = prob(50) ? t.name : pick(teleportlocs) + var/name = prob(50) ? t.name : pick(GLOB.teleportlocs) a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm") // a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security") // a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical") diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 4d80616d4f..bc6bcfba23 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -102,7 +102,7 @@ to_chat(user, span_notice("\The [src] does not seem to have power.")) return - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if (active) if ((CLUMSY in user.mutations) && prob(50)) user.visible_message(span_danger("\The [user] accidentally cuts [TU.himself] with \the [src]."),\ diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index fc85788880..f4d89526d9 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -46,10 +46,10 @@ return /obj/item/teleportation_scroll/proc/teleportscroll(var/mob/user) - var/A = tgui_input_list(user, "Area to jump to:", "Teleportation Scroll", teleportlocs) + var/A = tgui_input_list(user, "Area to jump to:", "Teleportation Scroll", GLOB.teleportlocs) if(!A) return - var/area/thearea = teleportlocs[A] + var/area/thearea = GLOB.teleportlocs[A] if (user.stat || user.restrained()) return diff --git a/code/game/objects/micro_structures.dm b/code/game/objects/micro_structures.dm index 6be77b82af..cbd13f68db 100644 --- a/code/game/objects/micro_structures.dm +++ b/code/game/objects/micro_structures.dm @@ -1,4 +1,4 @@ -var/global/list/micro_tunnels = list() +GLOBAL_LIST_EMPTY(micro_tunnels) /obj/structure/micro_tunnel name = "mouse hole" @@ -22,7 +22,7 @@ var/global/list/micro_tunnels = list() /obj/structure/micro_tunnel/Initialize(mapload) . = ..() - micro_tunnels.Add(src) + GLOB.micro_tunnels.Add(src) if(name == initial(name)) var/area/our_area = get_area(src) name = "[our_area.name] [name]" @@ -37,7 +37,7 @@ var/global/list/micro_tunnels = list() thing.forceMove(get_turf(src.loc)) thing.cancel_camera() - micro_tunnels.Remove(src) + GLOB.micro_tunnels.Remove(src) return ..() @@ -67,7 +67,7 @@ var/global/list/micro_tunnels = list() for(var/datum/planet/P in SSplanets.planets) if(myturf.z in P.expected_z_levels) planet = P - for(var/obj/structure/micro_tunnel/t in micro_tunnels) + for(var/obj/structure/micro_tunnel/t in GLOB.micro_tunnels) if(t == src) continue if(magic || t.magic) diff --git a/code/game/objects/structures/ghost_pods/human.dm b/code/game/objects/structures/ghost_pods/human.dm index 8ebe9e4207..8841ac998b 100644 --- a/code/game/objects/structures/ghost_pods/human.dm +++ b/code/game/objects/structures/ghost_pods/human.dm @@ -111,7 +111,7 @@ H.forceMove(T) if(make_antag) - var/datum/antagonist/antag = all_antag_types[make_antag] + var/datum/antagonist/antag = GLOB.all_antag_types[make_antag] if(antag) if(antag.add_antagonist(H.mind, 1, 1, 0, 1, 1)) log_admin("\The [src] made [key_name(src)] into a [antag.role_text].") @@ -233,7 +233,7 @@ H.forceMove(T) if(make_antag) - var/datum/antagonist/antag = all_antag_types[make_antag] + var/datum/antagonist/antag = GLOB.all_antag_types[make_antag] if(antag) if(antag.add_antagonist(H.mind, 1, 1, 0, 1, 1)) log_admin("\The [src] made [key_name(src)] into a [antag.role_text].") diff --git a/code/game/objects/structures/ghost_pods/survivor.dm b/code/game/objects/structures/ghost_pods/survivor.dm index afe758ce44..f33e00dac8 100644 --- a/code/game/objects/structures/ghost_pods/survivor.dm +++ b/code/game/objects/structures/ghost_pods/survivor.dm @@ -122,7 +122,7 @@ H.forceMove(T) if(special_role) - var/datum/antagonist/role = all_antag_types[special_role] //Explicitly NOT an antagonist. + var/datum/antagonist/role = GLOB.all_antag_types[special_role] //Explicitly NOT an antagonist. if(role) if(role.add_antagonist(H.mind, 1, 1, 0, 1, 1)) log_admin("\The [src] made [key_name(src)] into a [role.role_text].") diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 26c93c9a85..afc0f3f01d 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -19,7 +19,7 @@ to_chat(user, span_danger("The spike already has something on it, finish collecting its meat first!")) else if(spike(G.affecting)) - var/datum/gender/T = gender_datums[G.affecting.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[G.affecting.get_visible_gender()] visible_message(span_danger("[user] has forced [G.affecting] onto the spike, killing [T.him] instantly!")) var/mob/M = G.affecting M.forceMove(src) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index c34ddfc8e1..03999f92ff 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -591,7 +591,7 @@ R.cell.charge -= 20 else B.deductcharge(B.hitcost) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] user.visible_message( \ span_danger("[user] was stunned by [TU.his] wet [O]!"), \ span_userdanger("[user] was stunned by [TU.his] wet [O]!")) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 200eda7532..d00cbb559e 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -1,11 +1,11 @@ //STRIKE TEAMS //Thanks to Kilakk for the admin-button portion of this code. -var/global/send_emergency_team = 0 // Used for automagic response teams - // 'admin_emergency_team' for admin-spawned response teams -var/ert_base_chance = 10 // Default base chance. Will be incremented by increment ERT chance. -var/can_call_ert -var/silent_ert = 0 +GLOBAL_VAR_INIT(send_emergency_team, 0) // Used for automagic response teams; 'admin_emergency_team' for admin-spawned response teams + +GLOBAL_VAR_INIT(ert_base_chance, 10) // Default base chance. Will be incremented by increment ERT chance. +GLOBAL_VAR(can_call_ert) +GLOBAL_VAR_INIT(silent_ert, 0) /client/proc/response_team() set name = "Dispatch Emergency Response Team" @@ -21,17 +21,17 @@ var/silent_ert = 0 if(ticker.current_state == 1) to_chat(usr, span_danger("The round hasn't started yet!")) return - if(send_emergency_team) + if(GLOB.send_emergency_team) to_chat(usr, span_danger("[using_map.boss_name] has already dispatched an emergency response team!")) return if(tgui_alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT",list("Yes","No")) != "Yes") return if(tgui_alert(usr, "Do you want this Response Team to be announced?","ERT",list("Yes","No")) != "Yes") - silent_ert = 1 + GLOB.silent_ert = 1 if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red if(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No")) != "Yes") return - if(send_emergency_team) + if(GLOB.send_emergency_team) to_chat(usr, span_danger("Looks like somebody beat you to it!")) return @@ -50,7 +50,7 @@ var/silent_ert = 0 return if(isobserver(usr) || isnewplayer(usr)) - if(!send_emergency_team) + if(!GLOB.send_emergency_team) to_chat(usr, "No emergency response team is currently being sent.") return if(jobban_isbanned(usr, JOB_SYNDICATE) || jobban_isbanned(usr, JOB_EMERGENCY_RESPONSE_TEAM) || jobban_isbanned(usr, JOB_SECURITY_OFFICER)) @@ -90,31 +90,31 @@ var/silent_ert = 0 // Increments the ERT chance automatically, so that the later it is in the round, // the more likely an ERT is to be able to be called. /proc/increment_ert_chance() - while(send_emergency_team == 0) // There is no ERT at the time. + while(GLOB.send_emergency_team == 0) // There is no ERT at the time. if(get_security_level() == "green") - ert_base_chance += 1 + GLOB.ert_base_chance += 1 if(get_security_level() == "yellow") - ert_base_chance += 1 + GLOB.ert_base_chance += 1 if(get_security_level() == "violet") - ert_base_chance += 2 + GLOB.ert_base_chance += 2 if(get_security_level() == "orange") - ert_base_chance += 2 + GLOB.ert_base_chance += 2 if(get_security_level() == "blue") - ert_base_chance += 2 + GLOB.ert_base_chance += 2 if(get_security_level() == "red") - ert_base_chance += 3 + GLOB.ert_base_chance += 3 if(get_security_level() == "delta") - ert_base_chance += 10 // Need those big guns + GLOB.ert_base_chance += 10 // Need those big guns sleep(600 * 3) // Minute * Number of Minutes /proc/trigger_armed_response_team(var/force = 0) - if(!can_call_ert && !force) + if(!GLOB.can_call_ert && !force) return - if(send_emergency_team) + if(GLOB.send_emergency_team) return - var/send_team_chance = ert_base_chance // Is incremented by increment_ert_chance. + var/send_team_chance = GLOB.ert_base_chance // Is incremented by increment_ert_chance. send_team_chance += 2*percentage_dead() // the more people are dead, the higher the chance send_team_chance += percentage_antagonists() // the more antagonists, the higher the chance send_team_chance = min(send_team_chance, 100) @@ -124,14 +124,14 @@ var/silent_ert = 0 // there's only a certain chance a team will be sent if(!prob(send_team_chance)) command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "[using_map.boss_name]") - can_call_ert = 0 // Only one call per round, ladies. + GLOB.can_call_ert = 0 // Only one call per round, ladies. return - if(silent_ert == 0) + if(GLOB.silent_ert == 0) command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "[using_map.boss_name]") - can_call_ert = 0 // Only one call per round, gentleman. - send_emergency_team = 1 + GLOB.can_call_ert = 0 // Only one call per round, gentleman. + GLOB.send_emergency_team = 1 consider_ert_load() //VOREStation Add sleep(600 * 5) - send_emergency_team = 0 // Can no longer join the ERT. + GLOB.send_emergency_team = 0 // Can no longer join the ERT. diff --git a/code/game/sound.dm b/code/game/sound.dm index 1357d4d6d2..c9b48f619c 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -305,21 +305,21 @@ return soundin //Are these even used? //Yes -var/list/keyboard_sound = list ('sound/effects/keyboard/keyboard1.ogg','sound/effects/keyboard/keyboard2.ogg','sound/effects/keyboard/keyboard3.ogg', 'sound/effects/keyboard/keyboard4.ogg') -var/list/bodyfall_sound = list('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg') -var/list/teppi_sound = list('sound/voice/teppi/gyooh1.ogg', 'sound/voice/teppi/gyooh2.ogg', 'sound/voice/teppi/gyooh3.ogg', 'sound/voice/teppi/gyooh4.ogg', 'sound/voice/teppi/gyooh5.ogg', 'sound/voice/teppi/gyooh6.ogg', 'sound/voice/teppi/snoot1.ogg', 'sound/voice/teppi/snoot2.ogg') -var/list/talk_sound = list('sound/talksounds/a.ogg','sound/talksounds/b.ogg','sound/talksounds/c.ogg','sound/talksounds/d.ogg','sound/talksounds/e.ogg','sound/talksounds/f.ogg','sound/talksounds/g.ogg','sound/talksounds/h.ogg') -var/list/emote_sound = list('sound/talksounds/me_a.ogg','sound/talksounds/me_b.ogg','sound/talksounds/me_c.ogg','sound/talksounds/me_d.ogg','sound/talksounds/me_e.ogg','sound/talksounds/me_f.ogg') -var/list/goon_speak_one_sound = list('sound/talksounds/goon/speak_1.ogg', 'sound/talksounds/goon/speak_1_ask.ogg', 'sound/talksounds/goon/speak_1_exclaim.ogg') -var/list/goon_speak_two_sound = list('sound/talksounds/goon/speak_2.ogg', 'sound/talksounds/goon/speak_2_ask.ogg', 'sound/talksounds/goon/speak_2_exclaim.ogg') -var/list/goon_speak_three_sound = list('sound/talksounds/goon/speak_3.ogg', 'sound/talksounds/goon/speak_3_ask.ogg', 'sound/talksounds/goon/speak_3_exclaim.ogg') -var/list/goon_speak_four_sound = list('sound/talksounds/goon/speak_4.ogg', 'sound/talksounds/goon/speak_4_ask.ogg', 'sound/talksounds/goon/speak_4_exclaim.ogg') -var/list/goon_speak_blub_sound = list('sound/talksounds/goon/blub.ogg', 'sound/talksounds/goon/blub_ask.ogg', 'sound/talksounds/goon/blub_exclaim.ogg') -var/list/goon_speak_bottalk_sound = list('sound/talksounds/goon/bottalk_1.ogg', 'sound/talksounds/goon/bottalk_2.ogg', 'sound/talksounds/goon/bottalk_3.ogg', 'sound/talksounds/goon/bottalk_4.wav') -var/list/goon_speak_buwoo_sound = list('sound/talksounds/goon/buwoo.ogg', 'sound/talksounds/goon/buwoo_ask.ogg', 'sound/talksounds/goon/buwoo_exclaim.ogg') -var/list/goon_speak_cow_sound = list('sound/talksounds/goon/cow.ogg', 'sound/talksounds/goon/cow_ask.ogg', 'sound/talksounds/goon/cow_exclaim.ogg') -var/list/goon_speak_lizard_sound = list('sound/talksounds/goon/lizard.ogg', 'sound/talksounds/goon/lizard_ask.ogg', 'sound/talksounds/goon/lizard_exclaim.ogg') -var/list/goon_speak_pug_sound = list('sound/talksounds/goon/pug.ogg', 'sound/talksounds/goon/pug_ask.ogg', 'sound/talksounds/goon/pug_exclaim.ogg') -var/list/goon_speak_pugg_sound = list('sound/talksounds/goon/pugg.ogg', 'sound/talksounds/goon/pugg_ask.ogg', 'sound/talksounds/goon/pugg_exclaim.ogg') -var/list/goon_speak_roach_sound = list('sound/talksounds/goon/roach.ogg', 'sound/talksounds/goon/roach_ask.ogg', 'sound/talksounds/goon/roach_exclaim.ogg') -var/list/goon_speak_skelly_sound = list('sound/talksounds/goon/skelly.ogg', 'sound/talksounds/goon/skelly_ask.ogg', 'sound/talksounds/goon/skelly_exclaim.ogg') +GLOBAL_LIST_INIT(keyboard_sound, list('sound/effects/keyboard/keyboard1.ogg','sound/effects/keyboard/keyboard2.ogg','sound/effects/keyboard/keyboard3.ogg', 'sound/effects/keyboard/keyboard4.ogg')) +GLOBAL_LIST_INIT(bodyfall_sound, list('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg')) +GLOBAL_LIST_INIT(teppi_sound, list('sound/voice/teppi/gyooh1.ogg', 'sound/voice/teppi/gyooh2.ogg', 'sound/voice/teppi/gyooh3.ogg', 'sound/voice/teppi/gyooh4.ogg', 'sound/voice/teppi/gyooh5.ogg', 'sound/voice/teppi/gyooh6.ogg', 'sound/voice/teppi/snoot1.ogg', 'sound/voice/teppi/snoot2.ogg')) +GLOBAL_LIST_INIT(talk_sound, list('sound/talksounds/a.ogg','sound/talksounds/b.ogg','sound/talksounds/c.ogg','sound/talksounds/d.ogg','sound/talksounds/e.ogg','sound/talksounds/f.ogg','sound/talksounds/g.ogg','sound/talksounds/h.ogg')) +GLOBAL_LIST_INIT(emote_sound, list('sound/talksounds/me_a.ogg','sound/talksounds/me_b.ogg','sound/talksounds/me_c.ogg','sound/talksounds/me_d.ogg','sound/talksounds/me_e.ogg','sound/talksounds/me_f.ogg')) +GLOBAL_LIST_INIT(goon_speak_one_sound, list('sound/talksounds/goon/speak_1.ogg', 'sound/talksounds/goon/speak_1_ask.ogg', 'sound/talksounds/goon/speak_1_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_two_sound, list('sound/talksounds/goon/speak_2.ogg', 'sound/talksounds/goon/speak_2_ask.ogg', 'sound/talksounds/goon/speak_2_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_three_sound, list('sound/talksounds/goon/speak_3.ogg', 'sound/talksounds/goon/speak_3_ask.ogg', 'sound/talksounds/goon/speak_3_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_four_sound, list('sound/talksounds/goon/speak_4.ogg', 'sound/talksounds/goon/speak_4_ask.ogg', 'sound/talksounds/goon/speak_4_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_blub_sound, list('sound/talksounds/goon/blub.ogg', 'sound/talksounds/goon/blub_ask.ogg', 'sound/talksounds/goon/blub_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_bottalk_sound, list('sound/talksounds/goon/bottalk_1.ogg', 'sound/talksounds/goon/bottalk_2.ogg', 'sound/talksounds/goon/bottalk_3.ogg', 'sound/talksounds/goon/bottalk_4.wav')) +GLOBAL_LIST_INIT(goon_speak_buwoo_sound, list('sound/talksounds/goon/buwoo.ogg', 'sound/talksounds/goon/buwoo_ask.ogg', 'sound/talksounds/goon/buwoo_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_cow_sound, list('sound/talksounds/goon/cow.ogg', 'sound/talksounds/goon/cow_ask.ogg', 'sound/talksounds/goon/cow_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_lizard_sound, list('sound/talksounds/goon/lizard.ogg', 'sound/talksounds/goon/lizard_ask.ogg', 'sound/talksounds/goon/lizard_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_pug_sound, list('sound/talksounds/goon/pug.ogg', 'sound/talksounds/goon/pug_ask.ogg', 'sound/talksounds/goon/pug_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_pugg_sound, list('sound/talksounds/goon/pugg.ogg', 'sound/talksounds/goon/pugg_ask.ogg', 'sound/talksounds/goon/pugg_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_roach_sound, list('sound/talksounds/goon/roach.ogg', 'sound/talksounds/goon/roach_ask.ogg', 'sound/talksounds/goon/roach_exclaim.ogg')) +GLOBAL_LIST_INIT(goon_speak_skelly_sound, list('sound/talksounds/goon/skelly.ogg', 'sound/talksounds/goon/skelly_ask.ogg', 'sound/talksounds/goon/skelly_exclaim.ogg')) diff --git a/code/game/trader_visit.dm b/code/game/trader_visit.dm index c4762ca23c..3fbd8b250a 100644 --- a/code/game/trader_visit.dm +++ b/code/game/trader_visit.dm @@ -1,7 +1,7 @@ //Based on the ERT setup -var/global/send_beruang = 0 -var/can_call_traders = 1 +GLOBAL_VAR_INIT(send_beruang, 0) +GLOBAL_VAR_INIT(can_call_traders, 1) /client/proc/trader_ship() set name = "Dispatch Beruang Trader Ship" @@ -17,7 +17,7 @@ var/can_call_traders = 1 if(ticker.current_state == 1) to_chat(usr, span_danger("The round hasn't started yet!")) return - if(send_beruang) + if(GLOB.send_beruang) to_chat(usr, span_danger("The Beruang has already been sent this round!")) return if(tgui_alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship",list("Yes","No")) != "Yes") @@ -25,7 +25,7 @@ var/can_call_traders = 1 if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red if(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No")) != "Yes") return - if(send_beruang) + if(GLOB.send_beruang) to_chat(usr, span_danger("Looks like somebody beat you to it!")) return @@ -43,7 +43,7 @@ var/can_call_traders = 1 return if(isobserver(usr) || isnewplayer(usr)) - if(!send_beruang) + if(!GLOB.send_beruang) to_chat(usr, "The Beruang is not currently heading to the station.") return if(traders.current_antagonists.len >= traders.hard_cap) @@ -54,16 +54,16 @@ var/can_call_traders = 1 to_chat(usr, "You need to be an observer or new player to use this.") /proc/trigger_trader_visit() - if(!can_call_traders) + if(!GLOB.can_call_traders) return - if(send_beruang) + if(GLOB.send_beruang) return command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control") - can_call_traders = 0 // Only one call per round. - send_beruang = 1 + GLOB.can_call_traders = 0 // Only one call per round. + GLOB.send_beruang = 1 consider_trader_load() //VOREStation Add sleep(600 * 5) - send_beruang = 0 // Can no longer join the traders. + GLOB.send_beruang = 0 // Can no longer join the traders. diff --git a/code/game/turfs/flooring/seasonal.dm b/code/game/turfs/flooring/seasonal.dm index 1260aa268e..0cdc6ff626 100644 --- a/code/game/turfs/flooring/seasonal.dm +++ b/code/game/turfs/flooring/seasonal.dm @@ -1,23 +1,23 @@ -var/world_time_season -var/world_time_year -var/world_time_month -var/world_time_day +GLOBAL_VAR(world_time_season) +GLOBAL_VAR(world_time_year) +GLOBAL_VAR(world_time_month) +GLOBAL_VAR(world_time_day) /proc/setup_season() - world_time_month = text2num(time2text(world.timeofday, "MM")) // get the current month - switch(world_time_month) + GLOB.world_time_month = text2num(time2text(world.timeofday, "MM")) // get the current month + switch(GLOB.world_time_month) if(1 to 2) - world_time_season = "winter" + GLOB.world_time_season = "winter" if(3 to 5) - world_time_season = "spring" + GLOB.world_time_season = "spring" if(6 to 8) - world_time_season = "summer" + GLOB.world_time_season = "summer" if(9 to 11) - world_time_season = "autumn" + GLOB.world_time_season = "autumn" if(12) - world_time_season = "winter" - world_time_day = text2num(time2text(world.timeofday, "DD")) - world_time_year = text2num(time2text(world.timeofday, "YYYY")) + GLOB.world_time_season = "winter" + GLOB.world_time_day = text2num(time2text(world.timeofday, "DD")) + GLOB.world_time_year = text2num(time2text(world.timeofday, "YYYY")) /turf/simulated/floor/outdoors/grass/seasonal name = "grass" @@ -38,7 +38,7 @@ var/world_time_day /turf/simulated/floor/outdoors/grass/seasonal/Initialize(mapload) - switch(world_time_season) + switch(GLOB.world_time_season) if("spring") tree_types = list( /obj/structure/flora/tree/bigtree, @@ -181,7 +181,7 @@ var/world_time_day /turf/simulated/floor/outdoors/grass/seasonal/proc/update_desc() - switch(world_time_season) + switch(GLOB.world_time_season) if("spring") desc = "Lush green grass, flourishing! Little flowers peek out from between the blades here and there!" if("summer") @@ -195,10 +195,10 @@ var/world_time_day /turf/simulated/floor/outdoors/grass/seasonal/update_icon(update_neighbors) . = ..() update_desc() - switch(world_time_season) + switch(GLOB.world_time_season) if("spring") if(prob(50)) - var/cache_key = "[world_time_season]-overlay[rand(1,19)]" + var/cache_key = "[GLOB.world_time_season]-overlay[rand(1,19)]" if(!overlays_cache[cache_key]) var/image/I = image(icon = src.icon, icon_state = cache_key, layer = ABOVE_TURF_LAYER) // Icon should be abstracted out I.plane = TURF_PLANE @@ -210,7 +210,7 @@ var/world_time_day return if("autumn") if(prob(33)) - var/cache_key = "[world_time_season]-overlay[rand(1,6)]" + var/cache_key = "[GLOB.world_time_season]-overlay[rand(1,6)]" if(!overlays_cache[cache_key]) var/image/I = image(icon = src.icon, icon_state = cache_key, layer = ABOVE_TURF_LAYER) // Icon should be abstracted out I.plane = TURF_PLANE @@ -265,14 +265,14 @@ var/world_time_day /turf/simulated/floor/water/seasonal/Initialize(mapload) . = ..() - switch(world_time_season) + switch(GLOB.world_time_season) if("winter") if(prob(99)) ChangeTurf(/turf/simulated/floor/outdoors/ice) /turf/simulated/floor/water/deep/seasonal/Initialize(mapload) . = ..() - switch(world_time_season) + switch(GLOB.world_time_season) if("winter") if(prob(75)) ChangeTurf(/turf/simulated/floor/outdoors/ice) diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index b1ab0fb2cb..57576d027e 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -25,7 +25,7 @@ var/image/no_ceiling_image = null icon_state = flooring.icon_base //VOREStation Addition Start if(flooring.check_season) - icon_state = "[icon_state]-[world_time_season]" //VOREStation Addition End + icon_state = "[icon_state]-[GLOB.world_time_season]" //VOREStation Addition End if(flooring.has_base_range) icon_state = "[icon_state][rand(0,flooring.has_base_range)]" flooring_override = icon_state diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index b62b329f14..0fe48d1263 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -308,8 +308,8 @@ for(var/j in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC)) output += "" var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans. - for(var/antag_type in all_antag_types) // Grab other bans. - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) // Grab other bans. + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] bantypes |= antag.bantype for(var/j in bantypes) output += "" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c7234fe272..df87b32d40 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1,4 +1,4 @@ -var/global/floorIsLava = 0 +GLOBAL_VAR_INIT(floorIsLava, 0) //////////////////////////////// @@ -1420,12 +1420,12 @@ var/datum/announcement/minor/admin_min_announcer = new to_chat(usr, "Mode has not started.") return - var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", all_antag_types) - if(!antag_type || !all_antag_types[antag_type]) + var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", GLOB.all_antag_types) + if(!antag_type || !GLOB.all_antag_types[antag_type]) to_chat(usr, "Aborting.") return - var/datum/antagonist/antag = all_antag_types[antag_type] + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] message_admins("[key_name(usr)] attempting to force latespawn with template [antag.id].") antag.attempt_late_spawn() @@ -1502,8 +1502,8 @@ var/datum/announcement/minor/admin_min_announcer = new set category = "Fun.Event Kit" set name = "Send Fax" set desc = "Sends a fax to this machine" - var/department = tgui_input_list(usr, "Choose a fax", "Fax", alldepartments) - for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes) + var/department = tgui_input_list(usr, "Choose a fax", "Fax", GLOB.alldepartments) + for(var/obj/machinery/photocopier/faxmachine/sendto in GLOB.allfaxes) if(sendto.department == department) if (!istype(src,/datum/admins)) @@ -1561,7 +1561,7 @@ var/datum/announcement/minor/admin_min_announcer = new var/obj/item/rcvdcopy rcvdcopy = destination.copy(P) rcvdcopy.loc = null //hopefully this shouldn't cause trouble - adminfaxes += rcvdcopy + GLOB.adminfaxes += rcvdcopy diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 32d2a08bd9..aeeda5712e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -634,12 +634,12 @@ if(!check_rights(R_ADMIN)) return - if(security_printer_tickets.len >= 1) - var/input = tgui_input_list(usr, "Which message?", "Security Tickets", security_printer_tickets) + if(GLOB.security_printer_tickets.len >= 1) + var/input = tgui_input_list(usr, "Which message?", "Security Tickets", GLOB.security_printer_tickets) if(!input) return if(tgui_alert(usr, "Do you want to remove the following message from the global list? \"[input]\"", "Remove Ticket", list("Yes", "No")) == "Yes") - security_printer_tickets -= input + GLOB.security_printer_tickets -= input log_and_message_admins("removed a security ticket from the global list: \"[input]\"", usr) else diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 0f1e7f62c6..9c844fac91 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -412,8 +412,8 @@ dat += "[ticker.delay_end ? "End Round Normally" : "Delay Round End"]
    " dat += "
    " - for(var/antag_type in all_antag_types) - var/datum/antagonist/A = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/A = GLOB.all_antag_types[antag_type] dat += A.get_check_antag_output(src) dat += "" usr << browse(dat, "window=roundstatus;size=400x500") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5e7f86efc4..a5416c2d4c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -485,7 +485,7 @@ counter = 0 // Needs to be done early because it uses the length of the list for sizing var/list/offmap_jobs = list() - for(var/dept in offmap_departments) + for(var/dept in GLOB.offmap_departments) offmap_jobs += SSjob.get_job_titles_in_department(dept) jobs += "" jobs += "" @@ -555,11 +555,11 @@ counter = 0 var/isbanned_dept = jobban_isbanned(M, JOB_SYNDICATE) jobs += "
    Offmap Positions
    " - jobs += "" + jobs += "" // Antagonists. - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(!antag || !antag.bantype) continue @@ -668,7 +668,7 @@ if(!temp) continue joblist += temp.title if("offmapdept") - for(var/dept in offmap_departments) + for(var/dept in GLOB.offmap_departments) for(var/jobPos in SSjob.get_job_titles_in_department(dept)) if(!jobPos) continue var/datum/job/temp = job_master.GetJob(jobPos) diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm index 29834f079d..b796fdba9c 100644 --- a/code/modules/admin/verbs/change_appearance.dm +++ b/code/modules/admin/verbs/change_appearance.dm @@ -25,7 +25,7 @@ if(!H.client) to_chat(usr, span_filter_warning(" Only mobs with clients can alter their own appearance.")) return - var/datum/gender/T = gender_datums[H.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] switch(tgui_alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) if("Yes") log_and_message_admins("has allowed [H] to change [T.his] appearance, without whitelisting of races.") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 1fca5bd64a..04ee179edc 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1089,7 +1089,7 @@ Traitors and the like can also be revived with the previous role mostly intact. else if(issilicon(M)) if(isAI(M)) var/mob/living/silicon/ai/ai = M - empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(ai.loc) + GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(ai.loc) global_announcer.autosay("[ai] has been moved to intelligence storage.", "Artificial Intelligence Oversight") ai.clear_client() return diff --git a/code/modules/artifice/cursedform.dm b/code/modules/artifice/cursedform.dm index fd8f806c60..19d9dd8ada 100644 --- a/code/modules/artifice/cursedform.dm +++ b/code/modules/artifice/cursedform.dm @@ -11,7 +11,7 @@ /obj/item/paper/carbon/cursedform/burnpaper(obj/item/flame/P, mob/user) var/class = "warning" - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if(P.lit && !user.restrained()) if(istype(P, /obj/item/flame/lighter/zippo)) diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index a5e11f52ae..d2003d34b0 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -36,8 +36,8 @@ if (usr.stat || usr.restrained()) return if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - var/A = tgui_input_list(usr, "Area to jump bombard", "Open Fire", teleportlocs) - var/area/thearea = teleportlocs[A] + var/A = tgui_input_list(usr, "Area to jump bombard", "Open Fire", GLOB.teleportlocs) + var/area/thearea = GLOB.teleportlocs[A] if (usr.stat || usr.restrained()) return if(src.reload < 180) return if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index c72a5d31b7..fd3b9d99f6 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -197,7 +197,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O character.set_gender(pref.biological_gender) - character.synthetic = pref.species == "Protean" ? all_robolimbs["protean"] : null //Clear the existing var. (unless protean, then switch it to the normal protean limb) + character.synthetic = pref.species == "Protean" ? GLOB.all_robolimbs["protean"] : null //Clear the existing var. (unless protean, then switch it to the normal protean limb) var/list/organs_to_edit = list() for (var/name in list(BP_TORSO, BP_HEAD, BP_GROIN, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)) var/obj/item/organ/external/O = character.organs_by_name[name] @@ -334,16 +334,16 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if(ind > 1) . += ", " - var/datum/robolimb/R = basic_robolimb + var/datum/robolimb/R = GLOB.basic_robolimb var/key = pref.rlimb_data[name] if(!istext(key)) log_debug("Bad rlimb_data for [key_name(pref.client)], [name] was set to [key]") to_chat(usr, span_warning("Error loading robot limb data for `[name]`, clearing pref.")) pref.rlimb_data -= name else - R = LAZYACCESS(all_robolimbs, key) + R = LAZYACCESS(GLOB.all_robolimbs, key) if(!istype(R)) - R = basic_robolimb + R = GLOB.basic_robolimb . += "\t[R.company] [organ_name] prosthesis" else if(status == "amputated") ++ind @@ -924,8 +924,8 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if("Prosthesis") var/tmp_species = pref.species ? pref.species : SPECIES_HUMAN var/list/usable_manufacturers = list() - for(var/company in chargen_robolimbs) - var/datum/robolimb/M = chargen_robolimbs[company] + for(var/company in GLOB.chargen_robolimbs) + var/datum/robolimb/M = GLOB.chargen_robolimbs[company] if(!(limb in M.parts)) continue if(tmp_species in M.species_cannot_use) diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index 2cb86ff609..c86bf06078 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -55,7 +55,7 @@ pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.fuzzy)) if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE) pref.size_multiplier = initial(pref.size_multiplier) - if(!(pref.custom_speech_bubble in selectable_speech_bubbles)) + if(!(pref.custom_speech_bubble in GLOB.selectable_speech_bubbles)) pref.custom_speech_bubble = "default" if(!(pref.custom_footstep)) pref.custom_footstep = "Default" @@ -69,7 +69,7 @@ character.voice_freq = pref.voice_freq character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE) if(!pref.voice_sound) - character.voice_sounds_list = talk_sound + character.voice_sounds_list = GLOB.talk_sound else character.voice_sounds_list = get_talk_sound(pref.voice_sound) character.custom_speech_bubble = pref.custom_speech_bubble @@ -185,7 +185,7 @@ pref.voice_sound = choice return TOPIC_REFRESH else if(href_list["customize_speech_bubble"]) - var/choice = tgui_input_list(user, "What speech bubble style do you want to use? (default for automatic selection)", "Custom Speech Bubble", selectable_speech_bubbles) + var/choice = tgui_input_list(user, "What speech bubble style do you want to use? (default for automatic selection)", "Custom Speech Bubble", GLOB.selectable_speech_bubbles) if(!choice) pref.custom_speech_bubble = "default" else @@ -203,33 +203,33 @@ var/sound/S switch(pref.voice_sound) if("beep-boop") - S = sound(pick(talk_sound)) + S = sound(pick(GLOB.talk_sound)) if("goon speak 1") - S = sound(pick(goon_speak_one_sound)) + S = sound(pick(GLOB.goon_speak_one_sound)) if("goon speak 2") - S = sound(pick(goon_speak_two_sound)) + S = sound(pick(GLOB.goon_speak_two_sound)) if("goon speak 3") - S = sound(pick(goon_speak_three_sound)) + S = sound(pick(GLOB.goon_speak_three_sound)) if("goon speak 4") - S = sound(pick(goon_speak_four_sound)) + S = sound(pick(GLOB.goon_speak_four_sound)) if("goon speak blub") - S = sound(pick(goon_speak_blub_sound)) + S = sound(pick(GLOB.goon_speak_blub_sound)) if("goon speak bottalk") - S = sound(pick(goon_speak_bottalk_sound)) + S = sound(pick(GLOB.goon_speak_bottalk_sound)) if("goon speak buwoo") - S = sound(pick(goon_speak_buwoo_sound)) + S = sound(pick(GLOB.goon_speak_buwoo_sound)) if("goon speak cow") - S = sound(pick(goon_speak_cow_sound)) + S = sound(pick(GLOB.goon_speak_cow_sound)) if("goon speak lizard") - S = sound(pick(goon_speak_lizard_sound)) + S = sound(pick(GLOB.goon_speak_lizard_sound)) if("goon speak pug") - S = sound(pick(goon_speak_pug_sound)) + S = sound(pick(GLOB.goon_speak_pug_sound)) if("goon speak pugg") - S = sound(pick(goon_speak_pugg_sound)) + S = sound(pick(GLOB.goon_speak_pugg_sound)) if("goon speak roach") - S = sound(pick(goon_speak_roach_sound)) + S = sound(pick(GLOB.goon_speak_roach_sound)) if("goon speak skelly") - S = sound(pick(goon_speak_skelly_sound)) + S = sound(pick(GLOB.goon_speak_skelly_sound)) if(S) S.frequency = pick(pref.voice_freq) S.volume = 50 diff --git a/code/modules/client/preference_setup/vore/03_egg.dm b/code/modules/client/preference_setup/vore/03_egg.dm index 4b75ae2354..b462116d92 100644 --- a/code/modules/client/preference_setup/vore/03_egg.dm +++ b/code/modules/client/preference_setup/vore/03_egg.dm @@ -23,7 +23,7 @@ save_data["autohiss"] = pref.autohiss /datum/category_item/player_setup_item/vore/egg/sanitize_character() - pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, global_vore_egg_types, initial(pref.vore_egg_type)) + pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, GLOB.global_vore_egg_types, initial(pref.vore_egg_type)) /datum/category_item/player_setup_item/vore/egg/copy_to_mob(var/mob/living/carbon/human/character) character.vore_egg_type = pref.vore_egg_type @@ -51,7 +51,7 @@ return TOPIC_NOACTION else if(href_list["vore_egg_type"]) - var/list/vore_egg_types = global_vore_egg_types + var/list/vore_egg_types = GLOB.global_vore_egg_types var/selection = tgui_input_list(user, "Choose your character's egg type:", "Character Preference", vore_egg_types, pref.vore_egg_type) if(selection) pref.vore_egg_type = selection diff --git a/code/modules/client/preference_setup/vore/06_vantag.dm b/code/modules/client/preference_setup/vore/06_vantag.dm index 2b03fb95b2..70a17d6d14 100644 --- a/code/modules/client/preference_setup/vore/06_vantag.dm +++ b/code/modules/client/preference_setup/vore/06_vantag.dm @@ -18,7 +18,7 @@ /datum/category_item/player_setup_item/vore/vantag/sanitize_character() pref.vantag_volunteer = sanitize_integer(pref.vantag_volunteer, 0, 1, initial(pref.vantag_volunteer)) - pref.vantag_preference = sanitize_inlist(pref.vantag_preference, vantag_choices_list, initial(pref.vantag_preference)) + pref.vantag_preference = sanitize_inlist(pref.vantag_preference, GLOB.vantag_choices_list, initial(pref.vantag_preference)) /datum/category_item/player_setup_item/vore/vantag/copy_to_mob(var/mob/living/carbon/human/character) if(character && !istype(character,/mob/living/carbon/human/dummy)) @@ -28,7 +28,7 @@ /datum/category_item/player_setup_item/vore/vantag/content(var/mob/user) . += "
    " . += span_bold("Event Volunteer:") + " " + span_bold("[pref.vantag_volunteer ? "Yes" : "No"]") + "
    " - . += span_bold("Event Pref:") + " " + span_bold("[vantag_choices_list[pref.vantag_preference]]") + "
    " + . += span_bold("Event Pref:") + " " + span_bold("[GLOB.vantag_choices_list[pref.vantag_preference]]") + "
    " /datum/category_item/player_setup_item/vore/vantag/OnTopic(var/href, var/list/href_list, var/mob/user) if(href_list["toggle_vantag_volunteer"]) @@ -37,8 +37,8 @@ else if(href_list["change_vantag"]) var/list/names_list = list() - for(var/C in vantag_choices_list) - names_list[vantag_choices_list[C]] = C + for(var/C in GLOB.vantag_choices_list) + names_list[GLOB.vantag_choices_list[C]] = C var/selection = tgui_input_list(user, "How do you want to be involved with VS Event Characters, ERP-wise? They will see this choice on you in a HUD. Event characters are admin-selected and spawned players, possibly with assigned objectives, who are obligated to respect ERP prefs and RP their actions like any other player, though it may be a slightly shorter RP if they are pressed for time or being caught.", "Event Preference", names_list) if(selection && selection != "Normal") diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 039ccec0dd..53b03f0ec0 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -81,7 +81,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ if (!trait || !preference) return var/list/trait_prefs - var/datum/trait/instance = all_traits[trait] + var/datum/trait/instance = GLOB.all_traits[trait] var/list/traitlist switch(instance.category) if (1) @@ -180,10 +180,10 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ // Clean up positive traits for(var/datum/trait/path as anything in pref.pos_traits) - if(!(path in positive_traits)) + if(!(path in GLOB.positive_traits)) pref.pos_traits -= path continue - if(!(pref.species == SPECIES_CUSTOM) && !(path in everyone_traits_positive)) + if(!(pref.species == SPECIES_CUSTOM) && !(path in GLOB.everyone_traits_positive)) pref.pos_traits -= path continue var/take_flags = initial(path.can_take) @@ -191,11 +191,11 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ pref.pos_traits -= path //Neutral traits for(var/datum/trait/path as anything in pref.neu_traits) - if(!(path in neutral_traits)) + if(!(path in GLOB.neutral_traits)) to_world_log("removing [path] for not being in neutral_traits") pref.neu_traits -= path continue - if(!(pref.species == SPECIES_CUSTOM) && !(path in everyone_traits_neutral)) + if(!(pref.species == SPECIES_CUSTOM) && !(path in GLOB.everyone_traits_neutral)) to_world_log("removing [path] for not being a custom species") pref.neu_traits -= path continue @@ -205,10 +205,10 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ pref.neu_traits -= path //Negative traits for(var/datum/trait/path as anything in pref.neg_traits) - if(!(path in negative_traits)) + if(!(path in GLOB.negative_traits)) pref.neg_traits -= path continue - if(!(pref.species == SPECIES_CUSTOM) && !(path in everyone_traits_negative)) + if(!(pref.species == SPECIES_CUSTOM) && !(path in GLOB.everyone_traits_negative)) pref.neg_traits -= path continue var/take_flags = initial(path.can_take) @@ -287,7 +287,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ var/points_left = pref.starting_trait_points for(var/T in pref.pos_traits + pref.neg_traits) - points_left -= traits_costs[T] + points_left -= GLOB.traits_costs[T] if(T in pref.pos_traits) traits_left-- . += span_bold("Traits Left:") + " [traits_left]
    " @@ -298,21 +298,21 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ . += "Positive Trait +
    " . += "
      " for(var/T in pref.pos_traits) - var/datum/trait/trait = positive_traits[T] + var/datum/trait/trait = GLOB.positive_traits[T] . += "
    • - [trait.name] ([trait.cost]) [get_html_for_trait(trait, pref.pos_traits[T])]
    • " . += "
    " . += "Neutral Trait +
    " . += "
      " for(var/T in pref.neu_traits) - var/datum/trait/trait = neutral_traits[T] + var/datum/trait/trait = GLOB.neutral_traits[T] . += "
    • - [trait.name] ([trait.cost]) [get_html_for_trait(trait, pref.neu_traits[T])]
    • " . += "
    " . += "Negative Trait +
    " . += "
      " for(var/T in pref.neg_traits) - var/datum/trait/trait = negative_traits[T] + var/datum/trait/trait = GLOB.negative_traits[T] . += "
    • - [trait.name] ([trait.cost]) [get_html_for_trait(trait, pref.neg_traits[T])]
    • " . += "
    " @@ -391,7 +391,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ var/choice = tgui_alert(user, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") pref.pos_traits -= trait - var/datum/trait/instance = all_traits[trait] + var/datum/trait/instance = GLOB.all_traits[trait] instance.remove_pref(pref) return TOPIC_REFRESH @@ -400,7 +400,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ var/choice = tgui_alert(user, "Remove [initial(trait.name)]?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") pref.neu_traits -= trait - var/datum/trait/instance = all_traits[trait] + var/datum/trait/instance = GLOB.all_traits[trait] instance.remove_pref(pref) return TOPIC_REFRESH @@ -409,7 +409,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ var/choice = tgui_alert(user, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") pref.neg_traits -= trait - var/datum/trait/instance = all_traits[trait] + var/datum/trait/instance = GLOB.all_traits[trait] instance.remove_pref(pref) return TOPIC_REFRESH @@ -519,24 +519,24 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ switch(mode) if(POSITIVE_MODE) if(pref.species == SPECIES_CUSTOM) - picklist = positive_traits.Copy() - pref.pos_traits + picklist = GLOB.positive_traits.Copy() - pref.pos_traits mylist = pref.pos_traits else - picklist = everyone_traits_positive.Copy() - pref.pos_traits + picklist = GLOB.everyone_traits_positive.Copy() - pref.pos_traits mylist = pref.pos_traits if(NEUTRAL_MODE) if(pref.species == SPECIES_CUSTOM) - picklist = neutral_traits.Copy() - pref.neu_traits + picklist = GLOB.neutral_traits.Copy() - pref.neu_traits mylist = pref.neu_traits else - picklist = everyone_traits_neutral.Copy() - pref.neu_traits + picklist = GLOB.everyone_traits_neutral.Copy() - pref.neu_traits mylist = pref.neu_traits if(NEGATIVE_MODE) if(pref.species == SPECIES_CUSTOM) - picklist = negative_traits.Copy() - pref.neg_traits + picklist = GLOB.negative_traits.Copy() - pref.neg_traits mylist = pref.neg_traits else - picklist = everyone_traits_negative.Copy() - pref.neg_traits + picklist = GLOB.everyone_traits_negative.Copy() - pref.neg_traits mylist = pref.neg_traits if(isnull(picklist)) @@ -552,7 +552,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ var/points_left = pref.starting_trait_points for(var/T in pref.pos_traits + pref.neu_traits + pref.neg_traits) - points_left -= traits_costs[T] + points_left -= GLOB.traits_costs[T] var/traits_left = pref.max_traits - (pref.pos_traits.len + pref.neg_traits.len) @@ -584,7 +584,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ return TOPIC_REFRESH else if(trait_choice in nicelist) var/datum/trait/path = nicelist[trait_choice] - var/datum/trait/instance = all_traits[path] + var/datum/trait/instance = GLOB.all_traits[path] var/conflict = FALSE @@ -609,7 +609,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ varconflict: for(var/P in (pref.pos_traits + pref.neu_traits + pref.neg_traits)) - var/datum/trait/instance_test = all_traits[P] + var/datum/trait/instance_test = GLOB.all_traits[P] if(path in instance_test.excludes) conflict = instance_test.name break varconflict diff --git a/code/modules/client/preference_setup/vore/09_misc.dm b/code/modules/client/preference_setup/vore/09_misc.dm index 5f0286efa1..90b3546eee 100644 --- a/code/modules/client/preference_setup/vore/09_misc.dm +++ b/code/modules/client/preference_setup/vore/09_misc.dm @@ -34,7 +34,7 @@ pref.show_in_directory = sanitize_integer(pref.show_in_directory, 0, 1, initial(pref.show_in_directory)) pref.directory_tag = sanitize_inlist(pref.directory_tag, GLOB.char_directory_tags, initial(pref.directory_tag)) pref.directory_erptag = sanitize_inlist(pref.directory_erptag, GLOB.char_directory_erptags, initial(pref.directory_erptag)) - pref.sensorpref = sanitize_integer(pref.sensorpref, 1, sensorpreflist.len, initial(pref.sensorpref)) + pref.sensorpref = sanitize_integer(pref.sensorpref, 1, GLOB.sensorpreflist.len, initial(pref.sensorpref)) pref.capture_crystal = sanitize_integer(pref.capture_crystal, 0, 1, initial(pref.capture_crystal)) pref.auto_backup_implant = sanitize_integer(pref.auto_backup_implant, 0, 1, initial(pref.auto_backup_implant)) pref.borg_petting = sanitize_integer(pref.borg_petting, 0, 1, initial(pref.borg_petting)) @@ -45,7 +45,7 @@ . += span_bold("Character Directory Vore Tag:") + " [pref.directory_tag]
    " . += span_bold("Character Directory ERP Tag:") + " [pref.directory_erptag]
    " . += span_bold("Character Directory Advertisement:") + " Set Directory Ad
    " - . += span_bold("Suit Sensors Preference:") + " [sensorpreflist[pref.sensorpref]]
    " + . += span_bold("Suit Sensors Preference:") + " [GLOB.sensorpreflist[pref.sensorpref]]
    " . += span_bold("Capture Crystal Preference:") + " [pref.capture_crystal ? "Yes" : "No"]
    " . += span_bold("Spawn With Backup Implant:") + " [pref.auto_backup_implant ? "Yes" : "No"]
    " . += span_bold("Allow petting as robot:") + " [pref.borg_petting ? "Yes" : "No"]
    " @@ -75,9 +75,9 @@ pref.directory_ad = msg return TOPIC_REFRESH else if(href_list["toggle_sensor_setting"]) - var/new_sensorpref = tgui_input_list(user, "Choose your character's sensor preferences:", "Character Preferences", sensorpreflist, sensorpreflist[pref.sensorpref]) + var/new_sensorpref = tgui_input_list(user, "Choose your character's sensor preferences:", "Character Preferences", GLOB.sensorpreflist, GLOB.sensorpreflist[pref.sensorpref]) if (!isnull(new_sensorpref) && CanUseTopic(user)) - pref.sensorpref = sensorpreflist.Find(new_sensorpref) + pref.sensorpref = GLOB.sensorpreflist.Find(new_sensorpref) return TOPIC_REFRESH else if(href_list["toggle_capture_crystal"]) pref.capture_crystal = pref.capture_crystal ? 0 : 1; diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 842f6f3cba..ef693fd79d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -639,14 +639,14 @@ var/list/preferences_datums = list() character.species.icon_scale_y = 1 for (var/trait in neu_traits) if (trait in traits_to_copy) - var/datum/trait/instance = all_traits[trait] + var/datum/trait/instance = GLOB.all_traits[trait] if (!instance) continue for (var/to_edit in instance.var_changes) character.species.vars[to_edit] = instance.var_changes[to_edit] character.update_transform() if(!voice_sound) - character.voice_sounds_list = talk_sound + character.voice_sounds_list = GLOB.talk_sound else character.voice_sounds_list = get_talk_sound(voice_sound) diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/crusher_gauntlets.dm b/code/modules/clothing/spacesuits/rig/modules/specific/crusher_gauntlets.dm index b64174dc97..462b5c817f 100644 --- a/code/modules/clothing/spacesuits/rig/modules/specific/crusher_gauntlets.dm +++ b/code/modules/clothing/spacesuits/rig/modules/specific/crusher_gauntlets.dm @@ -25,7 +25,7 @@ /obj/item/rig_module/gauntlets/activate() ..() var/mob/living/M = holder.wearer - var/datum/gender/TU = gender_datums[M.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[M.get_visible_gender()] if(M.l_hand && M.r_hand) to_chat(M, span_danger("Your hands are full.")) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 9b63e8a728..90892694ad 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -36,7 +36,7 @@ log transactions var/datum/effect/effect/system/spark_spread/spark_system /obj/machinery/atm/Initialize(mapload) - machine_id = "[station_name()] RT #[num_financial_terminals++]" + machine_id = "[station_name()] RT #[GLOB.num_financial_terminals++]" . = ..() spark_system = new /datum/effect/effect/system/spark_spread spark_system.set_up(5, 0, src) @@ -113,7 +113,7 @@ log transactions T.purpose = "Credit deposit" T.amount = I:worth T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) @@ -215,7 +215,7 @@ log transactions R.info += span_italics("Account holder:") + " [authenticated_account.owner_name]
    " R.info += span_italics("Account number:") + " [authenticated_account.account_number]
    " R.info += span_italics("Balance:") + " $[authenticated_account.money]
    " - R.info += span_italics("Date and time:") + " [stationtime2text()], [current_date_string]

    " + R.info += span_italics("Date and time:") + " [stationtime2text()], [GLOB.current_date_string]

    " R.info += span_italics("Service terminal ID:") + " [machine_id]
    " //stamp the paper @@ -243,7 +243,7 @@ log transactions R.info = span_bold("Transaction logs") + "
    " R.info += span_italics("Account holder:") + " [authenticated_account.owner_name]
    " R.info += span_italics("Account number:") + " [authenticated_account.account_number]
    " - R.info += span_italics("Date and time:") + " [stationtime2text()], [current_date_string]

    " + R.info += span_italics("Date and time:") + " [stationtime2text()], [GLOB.current_date_string]

    " R.info += span_italics("Service terminal ID:") + " [machine_id]
    " R.info += "
    Antagonist Positions
    Antagonist Positions
    " R.info += "" @@ -313,7 +313,7 @@ log transactions T.target_name = failed_account.owner_name T.purpose = "Unauthorised login attempt" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() failed_account.transaction_log.Add(T) else @@ -333,7 +333,7 @@ log transactions T.target_name = authenticated_account.owner_name T.purpose = "Remote terminal access" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) @@ -361,7 +361,7 @@ log transactions T.target_name = "Account #[target_account_number]" T.purpose = transfer_purpose T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.amount = "([transfer_amount])" authenticated_account.transaction_log.Add(T) @@ -397,7 +397,7 @@ log transactions T.purpose = "Credit withdrawal" T.amount = "([amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else @@ -428,7 +428,7 @@ log transactions T.purpose = "Credit withdrawal" T.amount = "([amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index ac2b10d922..1732940911 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -41,12 +41,12 @@ M.account_number = rand(111111, 999999) else - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = source_db.machine_id - M.account_number = next_account_number - next_account_number += rand(1,25) + M.account_number = GLOB.next_account_number + GLOB.next_account_number += rand(1,25) //create a sealed package containing the account details var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(source_db.loc) @@ -59,7 +59,7 @@ R.info += "Account number: [M.account_number]
    " R.info += "Account pin: [M.remote_access_pin]
    " R.info += "Starting balance: $[M.money]
    " - R.info += "Date and time: [stationtime2text()], [current_date_string]

    " + R.info += "Date and time: [stationtime2text()], [GLOB.current_date_string]

    " R.info += "Creation terminal ID: [source_db.machine_id]
    " R.info += "Authorised NT officer overseeing creation: [source_db.held_card.registered_name]
    " @@ -74,12 +74,12 @@ //add the account M.transaction_log.Add(T) - all_money_accounts.Add(M) + GLOB.all_money_accounts.Add(M) return M /proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount) - for(var/datum/money_account/D in all_money_accounts) + for(var/datum/money_account/D in GLOB.all_money_accounts) if(D.account_number == attempt_account_number && !D.suspended) D.money += amount @@ -91,7 +91,7 @@ T.amount = "([amount])" else T.amount = "[amount]" - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = terminal_id D.transaction_log.Add(T) @@ -102,14 +102,14 @@ //this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account /proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0) - for(var/datum/money_account/D in all_money_accounts) + for(var/datum/money_account/D in GLOB.all_money_accounts) if(D.account_number == attempt_account_number) if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) ) return D break /proc/get_account(var/account_number) - for(var/datum/money_account/D in all_money_accounts) + for(var/datum/money_account/D in GLOB.all_money_accounts) if(D.account_number == account_number) return D @@ -145,7 +145,7 @@ else T.amount = "[price]" T.source_terminal = purchase_terminal - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() // Okay to move the money at this point customer_account.transaction_log.Add(T) diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index e2d914501f..1d0c06ac9e 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -27,7 +27,7 @@ T.target_name = target T.purpose = reason T.amount = amount - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = machine_id return T @@ -41,7 +41,7 @@ "} /obj/machinery/account_database/Initialize(mapload) - machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]" + machine_id = "[station_name()] Acc. DB #[GLOB.num_financial_terminals++]" . = ..() /obj/machinery/account_database/attackby(obj/O, mob/user) @@ -77,7 +77,7 @@ data["machine_id"] = machine_id data["creating_new_account"] = creating_new_account data["detailed_account_view"] = !!detailed_account_view - data["station_account_number"] = station_account.account_number + data["station_account_number"] = GLOB.station_account.account_number data["account_number"] = null data["owner_name"] = null @@ -104,8 +104,8 @@ data["transactions"] = trx var/list/accounts = list() - for(var/i in 1 to LAZYLEN(all_money_accounts)) - var/datum/money_account/D = all_money_accounts[i] + for(var/i in 1 to LAZYLEN(GLOB.all_money_accounts)) + var/datum/money_account/D = GLOB.all_money_accounts[i] if(D.offmap) continue accounts.Add(list(list(\ @@ -145,17 +145,17 @@ var/account_name = params["holder_name"] var/starting_funds = max(text2num(params["starting_funds"]), 0) - starting_funds = CLAMP(starting_funds, 0, station_account.money) // Not authorized to put the station in debt. + starting_funds = CLAMP(starting_funds, 0, GLOB.station_account.money) // Not authorized to put the station in debt. starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap. create_account(account_name, starting_funds, src) if(starting_funds > 0) //subtract the money - station_account.money -= starting_funds + GLOB.station_account.money -= starting_funds //create a transaction log entry var/trx = create_transation(account_name, "New account activation", "([starting_funds])") - station_account.transaction_log.Add(trx) + GLOB.station_account.transaction_log.Add(trx) creating_new_account = 0 @@ -178,8 +178,8 @@ if("view_account_detail") var/index = text2num(params["account_index"]) - if(index && index <= all_money_accounts.len) - detailed_account_view = all_money_accounts[index] + if(index && index <= GLOB.all_money_accounts.len) + detailed_account_view = GLOB.all_money_accounts[index] if("view_accounts_list") detailed_account_view = null @@ -187,14 +187,14 @@ if("revoke_payroll") var/funds = detailed_account_view.money - var/account_trx = create_transation(station_account.owner_name, "Revoke payroll", "([funds])") + var/account_trx = create_transation(GLOB.station_account.owner_name, "Revoke payroll", "([funds])") var/station_trx = create_transation(detailed_account_view.owner_name, "Revoke payroll", funds) - station_account.money += funds + GLOB.station_account.money += funds detailed_account_view.money = 0 detailed_account_view.transaction_log.Add(account_trx) - station_account.transaction_log.Add(station_trx) + GLOB.station_account.transaction_log.Add(station_trx) callHook("revoke_payroll", list(detailed_account_view)) @@ -261,8 +261,8 @@ "} - for(var/i=1, i<=all_money_accounts.len, i++) - var/datum/money_account/D = all_money_accounts[i] + for(var/i=1, i <= GLOB.all_money_accounts.len, i++) + var/datum/money_account/D = GLOB.all_money_accounts[i] text += {" diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 8ff578f764..6bcbf82867 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -18,9 +18,9 @@ . = ..() //by default, connect to the station account //the user of the EFTPOS device can change the target account though, and no-one will be the wiser (except whoever's being charged) - linked_account = station_account + linked_account = GLOB.station_account - machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]" + machine_id = "[station_name()] EFTPOS #[GLOB.num_financial_terminals++]" access_code = rand(1111,111111) print_reference() @@ -130,7 +130,7 @@ T.purpose = (transaction_purpose ? transaction_purpose : "None supplied.") T.amount = transaction_amount T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) else @@ -255,7 +255,7 @@ else T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() D.transaction_log.Add(T) // @@ -264,7 +264,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) else diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index 76bf121449..b67782c186 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -26,13 +26,13 @@ // Claim machine ID /obj/machinery/cash_register/Initialize(mapload) - machine_id = "[station_name()] RETAIL #[num_financial_terminals++]" + machine_id = "[station_name()] RETAIL #[GLOB.num_financial_terminals++]" . = ..() cash_stored = rand(10, 70)*10 - transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() + GLOB.transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() /obj/machinery/cash_register/Destroy() - transaction_devices -= src + GLOB.transaction_devices -= src . = ..() /obj/machinery/cash_register/examine(mob/user as mob) @@ -261,7 +261,7 @@ T.purpose = transaction_purpose T.amount = "([transaction_amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() D.transaction_log.Add(T) @@ -271,7 +271,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) @@ -309,7 +309,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 3d7cea259d..ecc3ce4385 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -15,19 +15,19 @@ //Destroyers are medium sized vessels, often used for escorting larger ships but able to go toe-to-toe with them if need be. //Frigates are medium sized vessels, often used for escorting larger ships. They will rapidly find themselves outclassed if forced to face heavy warships head on. -var/global/current_date_string +GLOBAL_VAR(current_date_string) -var/global/datum/money_account/vendor_account -var/global/datum/money_account/station_account -var/global/list/datum/money_account/department_accounts = list() -var/global/num_financial_terminals = 1 -var/global/next_account_number = 0 -var/global/list/all_money_accounts = list() -var/global/list/transaction_devices = list() -var/global/economy_init = 0 +GLOBAL_DATUM(vendor_account, /datum/money_account) +GLOBAL_DATUM(station_account, /datum/money_account) +GLOBAL_LIST_EMPTY_TYPED(department_accounts, /datum/money_account) +GLOBAL_VAR_INIT(num_financial_terminals, 1) +GLOBAL_VAR_INIT(next_account_number, 0) +GLOBAL_LIST_EMPTY(all_money_accounts) +GLOBAL_LIST_EMPTY(transaction_devices) +GLOBAL_VAR_INIT(economy_init, 0) /proc/setup_economy() - if(economy_init) + if(GLOB.economy_init) return 2 //news_network.CreateFeedChannel("The [using_map.starsys_name] Times", "[using_map.starsys_name] Times ExoNode - [using_map.station_short]", 1, 1) @@ -44,33 +44,33 @@ var/global/economy_init = 0 for(var/department in station_departments) create_department_account(department) create_department_account("Vendor") - vendor_account = department_accounts["Vendor"] + GLOB.vendor_account = GLOB.department_accounts["Vendor"] - for(var/obj/item/retail_scanner/RS in transaction_devices) + for(var/obj/item/retail_scanner/RS in GLOB.transaction_devices) if(RS.account_to_connect) - RS.linked_account = department_accounts[RS.account_to_connect] - for(var/obj/machinery/cash_register/CR in transaction_devices) + RS.linked_account = GLOB.department_accounts[RS.account_to_connect] + for(var/obj/machinery/cash_register/CR in GLOB.transaction_devices) if(CR.account_to_connect) - CR.linked_account = department_accounts[CR.account_to_connect] + CR.linked_account = GLOB.department_accounts[CR.account_to_connect] - current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [game_year]" + GLOB.current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [game_year]" - economy_init = 1 + GLOB.economy_init = 1 return 1 /proc/create_station_account() - if(!station_account) - next_account_number = rand(111111, 999999) + if(!GLOB.station_account) + GLOB.next_account_number = rand(111111, 999999) - station_account = new() - station_account.owner_name = "[station_name()] Station Account" - station_account.account_number = rand(111111, 999999) - station_account.remote_access_pin = rand(1111, 111111) - station_account.money = 75000 + GLOB.station_account = new() + GLOB.station_account.owner_name = "[station_name()] Station Account" + GLOB.station_account.account_number = rand(111111, 999999) + GLOB.station_account.remote_access_pin = rand(1111, 111111) + GLOB.station_account.money = 75000 //create an entry in the account transaction log for when it was created var/datum/transaction/T = new() - T.target_name = station_account.owner_name + T.target_name = GLOB.station_account.owner_name T.purpose = "Account creation" T.amount = 75000 T.date = "2nd April, 2555" @@ -78,11 +78,11 @@ var/global/economy_init = 0 T.source_terminal = "Biesel GalaxyNet Terminal #277" //add the account - station_account.transaction_log.Add(T) - all_money_accounts.Add(station_account) + GLOB.station_account.transaction_log.Add(T) + GLOB.all_money_accounts.Add(GLOB.station_account) /proc/create_department_account(department) - next_account_number = rand(111111, 999999) + GLOB.next_account_number = rand(111111, 999999) var/datum/money_account/department_account = new() department_account.owner_name = "[department] Account" @@ -101,6 +101,6 @@ var/global/economy_init = 0 //add the account department_account.transaction_log.Add(T) - all_money_accounts.Add(department_account) + GLOB.all_money_accounts.Add(department_account) - department_accounts[department] = department_account + GLOB.department_accounts[department] = department_account diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index 6ec759f3e4..35c6f4baa8 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -26,14 +26,14 @@ // Claim machine ID /obj/item/retail_scanner/Initialize(mapload) . = ..() - machine_id = "[station_name()] RETAIL #[num_financial_terminals++]" + machine_id = "[station_name()] RETAIL #[GLOB.num_financial_terminals++]" if(locate(/obj/structure/table) in loc) pixel_y = 3 - transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() + GLOB.transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() /obj/item/retail_scanner/Destroy() - transaction_devices -= src + GLOB.transaction_devices -= src . = ..() // Always face the user when put on a table @@ -242,7 +242,7 @@ T.purpose = transaction_purpose T.amount = "([transaction_amount])" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() D.transaction_log.Add(T) @@ -252,7 +252,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) @@ -285,7 +285,7 @@ T.purpose = transaction_purpose T.amount = "[transaction_amount]" T.source_terminal = machine_id - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() linked_account.transaction_log.Add(T) diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm index b8a59061a3..73bfd7af94 100644 --- a/code/modules/economy/vending.dm +++ b/code/modules/economy/vending.dm @@ -316,7 +316,7 @@ GLOBAL_LIST_EMPTY(vending_products) /obj/machinery/vending/proc/pay_with_card(obj/item/card/id/I, mob/M) visible_message(span_info("[M] swipes a card through [src].")) playsound(src, 'sound/machines/id_swipe.ogg', 50, 1) - if(!purchase_with_id_card(I, M, vendor_account.owner_name, name, "Purchase of [currently_vending.item_name]", currently_vending.price)) + if(!purchase_with_id_card(I, M, GLOB.vendor_account.owner_name, name, "Purchase of [currently_vending.item_name]", currently_vending.price)) return FALSE // Give the vendor the money. We use the account owner name, which means // that purchases made with stolen/borrowed card will look like the card @@ -331,16 +331,16 @@ GLOBAL_LIST_EMPTY(vending_products) * Called after the money has already been taken from the customer. */ /obj/machinery/vending/proc/credit_purchase(var/target as text) - vendor_account.money += currently_vending.price + GLOB.vendor_account.money += currently_vending.price var/datum/transaction/T = new() T.target_name = target T.purpose = "Purchase of [currently_vending.item_name]" T.amount = "[currently_vending.price]" T.source_terminal = name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() - vendor_account.transaction_log.Add(T) + GLOB.vendor_account.transaction_log.Add(T) /obj/machinery/vending/attack_ghost(mob/user) return attack_hand(user) @@ -500,7 +500,7 @@ GLOBAL_LIST_EMPTY(vending_products) var/mob/living/carbon/human/H = ui.user var/obj/item/card/id/C = H.GetIdCard() - if(!vendor_account || vendor_account.suspended) + if(!GLOB.vendor_account || GLOB.vendor_account.suspended) to_chat(ui.user, span_filter_notice("Vendor account offline. Unable to process transaction.")) flick("[icon_state]-deny",src) vend_ready = TRUE diff --git a/code/modules/emotes/custom_emote.dm b/code/modules/emotes/custom_emote.dm index cc061bed56..1d6c6decfc 100644 --- a/code/modules/emotes/custom_emote.dm +++ b/code/modules/emotes/custom_emote.dm @@ -62,7 +62,7 @@ if(!T) return if(client) - playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds) + playsound(T, pick(GLOB.emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds) var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE) var/list/m_viewers = in_range["mobs"] diff --git a/code/modules/emotes/emote_define.dm b/code/modules/emotes/emote_define.dm index 4ec63ef70f..455ec3039c 100644 --- a/code/modules/emotes/emote_define.dm +++ b/code/modules/emotes/emote_define.dm @@ -153,7 +153,7 @@ var/global/list/emotes_by_key /decl/emote/proc/replace_target_tokens(var/msg, var/atom/target) . = msg if(istype(target)) - var/datum/gender/target_gender = gender_datums[target.get_visible_gender()] + var/datum/gender/target_gender = GLOB.gender_datums[target.get_visible_gender()] . = replacetext(., "TARGET_THEM", target_gender.him) . = replacetext(., "TARGET_THEIR", target_gender.his) . = replacetext(., "TARGET_SELF", target_gender.himself) @@ -162,7 +162,7 @@ var/global/list/emotes_by_key /decl/emote/proc/replace_user_tokens(var/msg, var/atom/user) . = msg if(istype(user)) - var/datum/gender/user_gender = gender_datums[user.get_visible_gender()] + var/datum/gender/user_gender = GLOB.gender_datums[user.get_visible_gender()] . = replacetext(., "USER_THEM", user_gender.him) . = replacetext(., "USER_THEIR", user_gender.his) . = replacetext(., "USER_SELF", user_gender.himself) diff --git a/code/modules/env_message/env_message.dm b/code/modules/env_message/env_message.dm index 2ddc3c0afb..a466713014 100644 --- a/code/modules/env_message/env_message.dm +++ b/code/modules/env_message/env_message.dm @@ -1,4 +1,4 @@ -var/global/list/env_messages = list() +GLOBAL_LIST_EMPTY(env_messages) /obj/effect/env_message name = "Env message" @@ -12,10 +12,10 @@ var/global/list/env_messages = list() /obj/effect/env_message/Initialize(mapload) .=..() - env_messages += src + GLOB.env_messages += src /obj/effect/env_message/Destroy() - env_messages -= src + GLOB.env_messages -= src return ..() /obj/effect/env_message/examine(mob/user) @@ -60,7 +60,7 @@ var/global/list/env_messages = list() ..() /proc/clear_env_message(var/tckey) - for(var/obj/effect/env_message/EM in env_messages) + for(var/obj/effect/env_message/EM in GLOB.env_messages) if(tckey in EM.message_list) EM.remove_message(tckey) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 65bd640e6f..5aa58aaa59 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -20,7 +20,7 @@ sleep(2400) */ -var/list/event_last_fired = list() +GLOBAL_LIST_EMPTY(event_last_fired) //Always triggers an event when called, dynamically chooses events based on job population /proc/spawn_dynamic_event() @@ -84,15 +84,15 @@ var/list/event_last_fired = list() possibleEvents[/datum/event/spider_infestation] = max(active_with_role[DEPARTMENT_SECURITY], 5) + 5 possibleEvents[/datum/event/random_antag] = max(active_with_role[DEPARTMENT_SECURITY], 5) + 2.5 - for(var/event_type in event_last_fired) if(possibleEvents[event_type]) - var/time_passed = world.time - event_last_fired[event_type] + for(var/event_type in GLOB.event_last_fired) if(possibleEvents[event_type]) + var/time_passed = world.time - GLOB.event_last_fired[event_type] var/full_recharge_after = 60 * 60 * 10 * 3 // 3 hours var/weight_modifier = max(0, (full_recharge_after - time_passed) / 300) possibleEvents[event_type] = max(possibleEvents[event_type] - weight_modifier, 0) var/picked_event = pickweight(possibleEvents) - event_last_fired[picked_event] = world.time + GLOB.event_last_fired[picked_event] = world.time // Debug code below here, very useful for testing so don't delete please. var/debug_message = "Firing random event. " diff --git a/code/modules/events/grubinfestation_vr.dm b/code/modules/events/grubinfestation_vr.dm index b256b1d7e4..3ec85c7b89 100644 --- a/code/modules/events/grubinfestation_vr.dm +++ b/code/modules/events/grubinfestation_vr.dm @@ -32,7 +32,7 @@ /datum/event/grub_infestation/end() var/list/area_names = list() - for(var/mob/living/G as anything in existing_solargrubs) + for(var/mob/living/G as anything in GLOB.existing_solargrubs) if(!G || G.stat == DEAD) continue if(istype(G, /mob/living/simple_mob/animal/solargrub_larva)) diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index 09510bec60..ad3c07d1b6 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -9,8 +9,8 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) /datum/event/money_hacker/setup() end_time = world.time + 6000 - if(all_money_accounts.len) - affected_account = pick(all_money_accounts) + if(GLOB.all_money_accounts.len) + affected_account = pick(GLOB.all_money_accounts) GLOB.account_hack_attempted = 1 else @@ -50,7 +50,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) T.amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])") var/date1 = "31 December, 1999" var/date2 = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [rand(1000,3000)]" - T.date = pick("", current_date_string, date1, date2) + T.date = pick("", GLOB.current_date_string, date1, date2) var/time1 = rand(0, 99999999) var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]" T.time = pick("", stationtime2text(), time2) diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index a4df20cd08..5e361a9a7b 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -5,8 +5,8 @@ /datum/event/money_lotto/start() winner_sum = pick(5000, 10000, 50000, 100000, 500000, 1000000, 1500000) - if(all_money_accounts.len) - var/datum/money_account/D = pick(all_money_accounts) + if(GLOB.all_money_accounts.len) + var/datum/money_account/D = pick(GLOB.all_money_accounts) winner_name = D.owner_name if(!D.suspended) D.money += winner_sum @@ -15,7 +15,7 @@ T.target_name = "The [using_map.starsys_name] Times Grand Slam -Stellar- Lottery" T.purpose = "Winner!" T.amount = winner_sum - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() T.source_terminal = "Sif TCD Terminal #[rand(111,333)]" D.transaction_log.Add(T) diff --git a/code/modules/events/random_antagonist.dm b/code/modules/events/random_antagonist.dm index abe07472d1..af63728040 100644 --- a/code/modules/events/random_antagonist.dm +++ b/code/modules/events/random_antagonist.dm @@ -4,8 +4,8 @@ /datum/event/random_antag/start() var/list/valid_types = list() - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(antag.flags & ANTAG_RANDSPAWN) valid_types |= antag if(valid_types.len) diff --git a/code/modules/events/roaming_wildlife.dm b/code/modules/events/roaming_wildlife.dm index 55ef610664..1d855d2c21 100644 --- a/code/modules/events/roaming_wildlife.dm +++ b/code/modules/events/roaming_wildlife.dm @@ -10,7 +10,7 @@ for(var/obj/effect/landmark/C in landmarks_list) if(istype(C, /obj/effect/landmark/wildlife)) var/obj/effect/landmark/wildlife/WLLM = C - if(world_time_season == "winter" && WLLM.wildlife_type == 1) //fish forbidden in winter because ice now aparently + if(GLOB.world_time_season == "winter" && WLLM.wildlife_type == 1) //fish forbidden in winter because ice now aparently continue possible_spawns.Add(C) diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index ff1b1978a0..b3f27b2934 100644 --- a/code/modules/events/supply_demand_vr.dm +++ b/code/modules/events/supply_demand_vr.dm @@ -59,7 +59,7 @@ message += "
    " message += "Deliver these items to [command_name()] via the supply shuttle. Please put the ones you can into crates!
    " - for(var/dpt in req_console_supplies) + for(var/dpt in GLOB.req_console_supplies) send_console_message(message, dpt); // Also announce over main comms so people know to look diff --git a/code/modules/gamemaster/event2/events/command/money_hacker.dm b/code/modules/gamemaster/event2/events/command/money_hacker.dm index 6b9e734018..0d1e5c1f02 100644 --- a/code/modules/gamemaster/event2/events/command/money_hacker.dm +++ b/code/modules/gamemaster/event2/events/command/money_hacker.dm @@ -10,7 +10,7 @@ if(!command) return 0 - return 30 + (command * 20) + (all_money_accounts.len * 5) + return 30 + (command * 20) + (GLOB.all_money_accounts.len * 5) @@ -20,8 +20,8 @@ var/datum/money_account/targeted_account = null /datum/event2/event/money_hacker/set_up() - if(LAZYLEN(all_money_accounts)) - targeted_account = pick(all_money_accounts) + if(LAZYLEN(GLOB.all_money_accounts)) + targeted_account = pick(GLOB.all_money_accounts) if(!targeted_account) log_debug("Money hacker event could not find an account to hack. Aborting.") @@ -99,7 +99,7 @@ var/date1 = "1 January 1970" // Unix epoch. var/date2 = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [rand(1000,3000)]" - T.date = pick("", current_date_string, date1, date2,"Nowhen") + T.date = pick("", GLOB.current_date_string, date1, date2,"Nowhen") var/time1 = rand(0, 99999999) var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]" diff --git a/code/modules/gamemaster/event2/events/command/raise_funds.dm b/code/modules/gamemaster/event2/events/command/raise_funds.dm index 69c8bc6d1d..eb0f0c4b8b 100644 --- a/code/modules/gamemaster/event2/events/command/raise_funds.dm +++ b/code/modules/gamemaster/event2/events/command/raise_funds.dm @@ -84,9 +84,9 @@ // Returns the sum of the station account and all the departmental accounts. /datum/event2/event/raise_funds/proc/count_money() . = 0 - . += station_account.money + . += GLOB.station_account.money for(var/i = 1 to SSjob.department_datums.len) - var/datum/money_account/account = LAZYACCESS(department_accounts, SSjob.department_datums[i]) + var/datum/money_account/account = LAZYACCESS(GLOB.department_accounts, SSjob.department_datums[i]) if(istype(account)) . += account.money diff --git a/code/modules/gamemaster/event2/events/everyone/random_antag.dm b/code/modules/gamemaster/event2/events/everyone/random_antag.dm index 205c78923b..b061ffc58d 100644 --- a/code/modules/gamemaster/event2/events/everyone/random_antag.dm +++ b/code/modules/gamemaster/event2/events/everyone/random_antag.dm @@ -22,8 +22,8 @@ // The random spawn proc on the antag datum will handle announcing the spawn and whatnot, in theory. /datum/event2/event/random_antagonist/start() var/list/valid_types = list() - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] + for(var/antag_type in GLOB.all_antag_types) + var/datum/antagonist/antag = GLOB.all_antag_types[antag_type] if(antag.flags & ANTAG_RANDSPAWN) valid_types |= antag if(valid_types.len) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index bab6ad0cf2..06af186f30 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -175,7 +175,7 @@ H.concealed = 1 H.update_icon() if(user==target) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] user.visible_message(span_notice("\The [user] deals [dcard] card(s) to [TU.himself].")) else user.visible_message(span_notice("\The [user] deals [dcard] card(s) to \the [target].")) diff --git a/code/modules/genetics/side_effects.dm b/code/modules/genetics/side_effects.dm index 44c6ea5c94..02249672bc 100644 --- a/code/modules/genetics/side_effects.dm +++ b/code/modules/genetics/side_effects.dm @@ -69,7 +69,7 @@ /datum/genetics/side_effect/confuse/start(mob/living/carbon/human/H) ..() - var/datum/gender/T = gender_datums[H.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] H.automatic_custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.", check_stat = TRUE) /datum/genetics/side_effect/confuse/finish(datum/weakref/WR) diff --git a/code/modules/ghosttrap/trap.dm b/code/modules/ghosttrap/trap.dm index 1032fc1356..8ac5698566 100644 --- a/code/modules/ghosttrap/trap.dm +++ b/code/modules/ghosttrap/trap.dm @@ -1,18 +1,18 @@ // This system is used to grab a ghost from observers with the required preferences and // lack of bans set. See posibrain.dm for an example of how they are called/used. ~Z -var/list/ghost_traps +GLOBAL_LIST(ghost_traps) /proc/get_ghost_trap(var/trap_key) - if(!ghost_traps) + if(!GLOB.ghost_traps) populate_ghost_traps() - return ghost_traps[trap_key] + return GLOB.ghost_traps[trap_key] /proc/populate_ghost_traps() - ghost_traps = list() + GLOB.ghost_traps = list() for(var/traptype in typesof(/datum/ghosttrap)) var/datum/ghosttrap/G = new traptype - ghost_traps[G.object] = G + GLOB.ghost_traps[G.object] = G /datum/ghosttrap var/object = "positronic brain" diff --git a/code/modules/integrated_electronics/_defines.dm b/code/modules/integrated_electronics/_defines.dm index 80b740d45a..68fc1d9c86 100644 --- a/code/modules/integrated_electronics/_defines.dm +++ b/code/modules/integrated_electronics/_defines.dm @@ -36,11 +36,11 @@ // Data limits. #define IC_MAX_LIST_LENGTH 200 -var/list/all_integrated_circuits = list() +GLOBAL_LIST_EMPTY(all_integrated_circuits) /proc/initialize_integrated_circuits_list() for(var/thing in typesof(/obj/item/integrated_circuit)) - all_integrated_circuits += new thing() + GLOB.all_integrated_circuits += new thing() /obj/item/integrated_circuit name = "integrated circuit" diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index 875358c94d..3420b9f838 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -338,7 +338,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/arithmetic/Initialize(mapload) - for(var/obj/item/integrated_circuit/arithmetic/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/arithmetic/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -355,7 +355,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/trig/Initialize(mapload) - for(var/obj/item/integrated_circuit/trig/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/trig/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -372,7 +372,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/input/Initialize(mapload) - for(var/obj/item/integrated_circuit/input/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/input/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -389,7 +389,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/output/Initialize(mapload) - for(var/obj/item/integrated_circuit/output/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/output/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -406,7 +406,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/memory/Initialize(mapload) - for(var/obj/item/integrated_circuit/memory/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/memory/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -423,7 +423,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/logic/Initialize(mapload) - for(var/obj/item/integrated_circuit/logic/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/logic/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -440,7 +440,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/time/Initialize(mapload) - for(var/obj/item/integrated_circuit/time/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/time/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -457,7 +457,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/reagents/Initialize(mapload) - for(var/obj/item/integrated_circuit/reagent/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/reagent/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -474,7 +474,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/transfer/Initialize(mapload) - for(var/obj/item/integrated_circuit/transfer/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/transfer/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -491,7 +491,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/converter/Initialize(mapload) - for(var/obj/item/integrated_circuit/converter/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/converter/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -507,7 +507,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/smart/Initialize(mapload) - for(var/obj/item/integrated_circuit/smart/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/smart/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -523,7 +523,7 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/manipulation/Initialize(mapload) - for(var/obj/item/integrated_circuit/manipulation/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/manipulation/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) @@ -540,11 +540,11 @@ spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH /obj/item/storage/bag/circuits/mini/power/Initialize(mapload) - for(var/obj/item/integrated_circuit/passive/power/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/passive/power/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) - for(var/obj/item/integrated_circuit/power/IC in all_integrated_circuits) + for(var/obj/item/integrated_circuit/power/IC in GLOB.all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) new IC.type(src) diff --git a/code/modules/integrated_electronics/subtypes/illegal.dm b/code/modules/integrated_electronics/subtypes/illegal.dm index 2bd9b94699..5bf62e2b65 100644 --- a/code/modules/integrated_electronics/subtypes/illegal.dm +++ b/code/modules/integrated_electronics/subtypes/illegal.dm @@ -108,7 +108,7 @@ else var/list/addresses = list() - for(var/datum/exonet_protocol/target_exonet in all_exonet_connections) + for(var/datum/exonet_protocol/target_exonet in GLOB.all_exonet_connections) if(target_exonet.address && istext(target_exonet.address)) var/random = rand(200,350) random = random / 10 diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 6caa464755..203ff1ec20 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -186,7 +186,7 @@ dat += "7. Access the Forbidden Lore Vault
    " if(src.arcanecheckout) new /obj/item/book/tome(src.loc) - var/datum/gender/T = gender_datums[user.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] to_chat(user, span_warning("Your sanity barely endures the seconds spent in the vault's browsing window. The only thing to remind you of this when you stop browsing is a dusty old tome sitting on the desk. You don't really remember printing it.")) user.visible_message(span_infoplain(span_bold("\The [user]") + " stares at the blank screen for a few moments, [T.his] expression frozen in fear. When [T.he] finally awakens from it, [T.he] looks a lot older."), 2) src.arcanecheckout = 0 diff --git a/code/modules/mob/dead/observer/free_vr.dm b/code/modules/mob/dead/observer/free_vr.dm index 7473dd7d3a..3c47edd972 100644 --- a/code/modules/mob/dead/observer/free_vr.dm +++ b/code/modules/mob/dead/observer/free_vr.dm @@ -1,4 +1,4 @@ -var/global/list/prevent_respawns = list() +GLOBAL_LIST_EMPTY(prevent_respawns) /hook/death/proc/quit_notify(mob/dead) if(ishuman(dead)) @@ -25,7 +25,7 @@ var/global/list/prevent_respawns = list() //prevent_respawns += mind.name //Replaced by PR 4785 //Update any existing objectives involving this mob. - for(var/datum/objective/O in all_objectives) + for(var/datum/objective/O in GLOB.all_objectives) if(O.target == src.mind) if(O.owner && O.owner.current) to_chat(O.owner.current,span_warning("You get the feeling your target is no longer within your reach...")) @@ -45,8 +45,8 @@ var/global/list/prevent_respawns = list() src.mind.special_role = null //Cut the PDA manifest (ugh) - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() for(var/datum/data/record/R in data_core.medical) if((R.fields["name"] == src.real_name)) qdel(R) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 6ae7e6960c..abefdead64 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -307,14 +307,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, span_warning("Another consciousness is in your body... it is resisting you.")) return //VOREStation Add - if(prevent_respawns.Find(mind.name)) + if(GLOB.prevent_respawns.Find(mind.name)) to_chat(src, span_warning("You already quit this round as this character, sorry!")) return //VOREStation Add End if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). var/found_rune for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune - if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune. + if(R && R.word1 == GLOB.cultwords["hell"] && R.word2 == GLOB.cultwords["travel"] && R.word3 == GLOB.cultwords["self"]) // Found an astral journey rune. found_rune = 1 break if(!found_rune) @@ -858,7 +858,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp ) toggle_ghost_visibility(TRUE) else - var/datum/gender/T = gender_datums[user.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] user.visible_message ( \ span_warning("\The [user] just tried to smash [T.his] book into that ghost! It's not very effective."), \ span_warning("You get the feeling that the ghost can't become any more visible.") \ diff --git a/code/modules/mob/gender.dm b/code/modules/mob/gender.dm index 0e9bf244b5..3ca23531b1 100644 --- a/code/modules/mob/gender.dm +++ b/code/modules/mob/gender.dm @@ -1,10 +1,10 @@ -/var/list/gender_datums = list() +GLOBAL_LIST_EMPTY(gender_datums) /hook/startup/proc/populate_gender_datum_list() for(var/type in typesof(/datum/gender)) var/datum/gender/G = new type - gender_datums[G.key] = G + GLOB.gender_datums[G.key] = G return 1 /datum/gender diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 54ee400717..e870b89e11 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -329,7 +329,7 @@ var/obj/machinery/navbeacon/targ = locate() in get_turf(src) if(!targ) - for(var/obj/machinery/navbeacon/N in navbeacons) + for(var/obj/machinery/navbeacon/N in GLOB.navbeacons) if(!N.codes["patrol"]) continue if(get_dist(src, N) < minDist) @@ -337,7 +337,7 @@ targ = N if(targ && targ.codes["next_patrol"]) - for(var/obj/machinery/navbeacon/N in navbeacons) + for(var/obj/machinery/navbeacon/N in GLOB.navbeacons) if(N.location == targ.codes["next_patrol"]) targ = N break diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index 9bf35ff457..2626b2c802 100644 --- a/code/modules/mob/living/bot/mulebot.dm +++ b/code/modules/mob/living/bot/mulebot.dm @@ -267,7 +267,7 @@ /mob/living/bot/mulebot/proc/GetBeaconList() var/list/beaconlist = list() - for(var/obj/machinery/navbeacon/N in navbeacons) + for(var/obj/machinery/navbeacon/N in GLOB.navbeacons) if(!N.codes["delivery"]) continue beaconlist.Add(N.location) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ee1f641a28..c96997c24e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -168,7 +168,7 @@ if (src.health >= CONFIG_GET(number/health_threshold_crit)) if(src == M && ishuman(src)) var/mob/living/carbon/human/H = src - var/datum/gender/T = gender_datums[H.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] src.visible_message( \ span_notice("[src] examines [T.himself]."), \ span_notice("You check yourself for injuries.") \ @@ -250,7 +250,7 @@ var/show_ssd var/mob/living/carbon/human/H = src - var/datum/gender/T = gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()! + var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()! if(istype(H)) show_ssd = H.species.show_ssd if(show_ssd && !client && !teleop) M.visible_message(span_notice("[M] shakes [src] trying to wake [T.him] up!"), \ @@ -264,7 +264,7 @@ span_notice("You shake [src] trying to wake [T.him] up!")) else var/mob/living/carbon/human/hugger = M - var/datum/gender/TM = gender_datums[M.get_visible_gender()] + var/datum/gender/TM = GLOB.gender_datums[M.get_visible_gender()] if(M.resting == 1) //Are they resting on the ground? M.visible_message(span_notice("[M] grabs onto [src] and pulls [TM.himself] up"), \ span_notice("You grip onto [src] and pull yourself up off the ground!")) diff --git a/code/modules/mob/living/carbon/human/descriptors/_descriptors.dm b/code/modules/mob/living/carbon/human/descriptors/_descriptors.dm index 815914f40c..44e58d41aa 100644 --- a/code/modules/mob/living/carbon/human/descriptors/_descriptors.dm +++ b/code/modules/mob/living/carbon/human/descriptors/_descriptors.dm @@ -75,8 +75,8 @@ /datum/mob_descriptor/proc/get_comparative_value_descriptor(var/my_value, var/mob/observer, var/mob/me) // Store our gender info for later. - var/datum/gender/my_gender = gender_datums[me.get_gender()] - var/datum/gender/other_gender = gender_datums[observer.get_gender()] + var/datum/gender/my_gender = GLOB.gender_datums[me.get_gender()] + var/datum/gender/other_gender = GLOB.gender_datums[observer.get_gender()] . = get_initial_comparison_component(me, my_gender, other_gender, my_value) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 1f2d4492ec..787b2a3a87 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -335,7 +335,7 @@ var/list/_simple_mob_default_emotes = list( set desc = "Sets a description which will be shown when someone examines you." set category = "IC.Settings" - var/datum/gender/T = gender_datums[get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[get_visible_gender()] pose = strip_html_simple(tgui_input_text(src, "This is [src]. [T.he]...", "Pose", null)) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index f370219796..87fab5e641 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -80,7 +80,7 @@ var/gender_hidden = (skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE) var/gender_key = get_visible_gender(user, gender_hidden) - var/datum/gender/T = gender_datums[gender_key] + var/datum/gender/T = GLOB.gender_datums[gender_key] if (!T) CRASH({"Null gender datum on examine: mob="[src]",hidden="[gender_hidden]",key="[gender_key]",bio="[gender]",id="[identifying_gender]""}) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f508b81250..6e84658e4d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -544,8 +544,8 @@ if(setmedical != "Cancel") R.fields["p_stat"] = setmedical modified = 1 - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() spawn() if(ishuman(usr)) @@ -861,7 +861,7 @@ /mob/living/carbon/human/proc/play_xylophone() if(!src.xylophone) - var/datum/gender/T = gender_datums[get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[get_visible_gender()] visible_message(span_filter_notice("[span_red("\The [src] begins playing [T.his] ribcage like a xylophone. It's quite spooky.")]"),span_notice("You begin to play a spooky refrain on your ribcage."),span_filter_notice("[span_red("You hear a spooky xylophone melody.")]")) var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg') playsound(src, song, 50, 1, -1) @@ -952,7 +952,7 @@ gender = NEUTER regenerate_icons() check_dna() - var/datum/gender/T = gender_datums[get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[get_visible_gender()] visible_message(span_notice("\The [src] morphs and changes [T.his] appearance!"), span_notice("You change your appearance!"), span_filter_notice("[span_red("Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")]")) /mob/living/carbon/human/proc/remotesay() @@ -1222,8 +1222,8 @@ if(usr.stat || usr.restrained() || !isliving(usr)) return - var/datum/gender/TU = gender_datums[usr.get_visible_gender()] - var/datum/gender/T = gender_datums[get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[usr.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[get_visible_gender()] if(usr == src) self = 1 diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 39ef895937..d396bb5686 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -33,7 +33,7 @@ return null /mob/living/carbon/human/attack_hand(mob/living/M as mob) - var/datum/gender/TT = gender_datums[M.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[M.get_visible_gender()] var/mob/living/carbon/human/H = M if(is_incorporeal()) @@ -499,7 +499,7 @@ to_chat(user,message) return FALSE - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if(user == src) user.visible_message(span_filter_notice("\The [user] starts applying pressure to [TU.his] [organ.name]!"), span_filter_notice("You start applying pressure to your [organ.name]!")) diff --git a/code/modules/mob/living/carbon/human/human_modular_limbs.dm b/code/modules/mob/living/carbon/human/human_modular_limbs.dm index 2c64195a44..5ddee831ab 100644 --- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm +++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm @@ -11,7 +11,7 @@ /obj/item/organ/external/proc/get_modular_limb_category() . = MODULAR_BODYPART_INVALID if(robotic >= ORGAN_ROBOT && model) - var/datum/robolimb/manufacturer = all_robolimbs[model] + var/datum/robolimb/manufacturer = GLOB.all_robolimbs[model] if(!isnull(manufacturer?.modular_bodyparts)) . = manufacturer.modular_bodyparts @@ -167,7 +167,7 @@ for(var/obj/item/organ/external/child in E.children) child.status &= ~ORGAN_CUT_AWAY - var/datum/gender/G = gender_datums[gender] + var/datum/gender/G = GLOB.gender_datums[gender] visible_message( span_notice("\The [src] attaches \the [E] to [G.his] body!"), span_notice("You attach \the [E] to your body!")) @@ -195,7 +195,7 @@ E.removed(src) E.dropInto(loc) put_in_hands(E) - var/datum/gender/G = gender_datums[gender] + var/datum/gender/G = GLOB.gender_datums[gender] visible_message( span_notice("\The [src] detaches [G.his] [E.name]!"), span_notice("You detach your [E.name]!")) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index bd29c4caf9..9df3fa2591 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -199,7 +199,7 @@ return if(refresh_traits && species.traits) for(var/TR in species.traits) - var/datum/trait/T = all_traits[TR] + var/datum/trait/T = GLOB.all_traits[TR] if(!T) continue if(!T.linked_gene) diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index c5b73ec911..c48454119f 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -350,7 +350,7 @@ if(!E) to_chat(src,span_warning("You don't seem to have a head!")) return - var/datum/robolimb/robohead = all_robolimbs[E.model] + var/datum/robolimb/robohead = GLOB.all_robolimbs[E.model] if(!robohead.monitor_styles || !robohead.monitor_icon) to_chat(src,span_warning("Your head doesn't have a monitor, or it doesn't support being changed!")) return diff --git a/code/modules/mob/living/carbon/human/human_powers_vr.dm b/code/modules/mob/living/carbon/human/human_powers_vr.dm index c51b27914c..ca37a328e8 100644 --- a/code/modules/mob/living/carbon/human/human_powers_vr.dm +++ b/code/modules/mob/living/carbon/human/human_powers_vr.dm @@ -31,7 +31,7 @@ update_icons_body() if(H.robotic) - var/datum/robolimb/robohead = all_robolimbs[H.model] + var/datum/robolimb/robohead = GLOB.all_robolimbs[H.model] if(robohead.monitor_styles && robohead.monitor_icon) to_chat(src, span_notice("You reconfigure the rendering order of your facial display.")) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index edb3b1052c..94ac5b92f6 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1735,7 +1735,7 @@ if(seer==1) var/obj/effect/rune/R = locate() in loc - if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"]) + if(R && R.word1 == GLOB.cultwords["see"] && R.word2 == GLOB.cultwords["hell"] && R.word3 == GLOB.cultwords["join"]) see_invisible = SEE_INVISIBLE_CULT else see_invisible = see_invisible_default diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 04b96b2ab3..eb6394509e 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -764,7 +764,7 @@ //If you had traits, apply them if(new_copy.traits) for(var/trait in new_copy.traits) - var/datum/trait/T = all_traits[trait] + var/datum/trait/T = GLOB.all_traits[trait] T.apply(new_copy, H, new_copy.traits[trait]) //Set up a mob diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm index 1ad8a7bfaf..fbf50852ca 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack.dm @@ -27,8 +27,8 @@ /datum/unarmed_attack/claws/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) var/obj/item/organ/external/affecting = target.get_organ(zone) - var/datum/gender/T = gender_datums[user.get_visible_gender()] - var/datum/gender/TT = gender_datums[target.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()] attack_damage = CLAMP(attack_damage, 1, 5) if(target == user) diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index 4a5dce90c7..099a9947cb 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -66,7 +66,7 @@ if(!H.species || !H.species.traits || H.species.traits.len == 0) H.emote(pick("scratch","jump","roll","tail")) // fallbacks else - var/datum/trait/T = all_traits[pick(H.species.traits)] + var/datum/trait/T = GLOB.all_traits[pick(H.species.traits)] if(T) var/geneexpression if(T.primitive_expression_messages.len) diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm index 6cb87ddb75..0ca4cbf0fd 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm @@ -66,8 +66,8 @@ //Organ exists, let's reshape it var/list/usable_manufacturers = list() - for(var/company in chargen_robolimbs) - var/datum/robolimb/M = chargen_robolimbs[company] + for(var/company in GLOB.chargen_robolimbs) + var/datum/robolimb/M = GLOB.chargen_robolimbs[company] if(!(choice in M.parts)) continue if(species?.base_species in M.species_cannot_use) diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm index 7584304bd3..099d782e85 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm @@ -1007,8 +1007,8 @@ var/finalized = "No" while(finalized == "No" && src.client) - choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", weavable_structures) - desired_result = weavable_structures[choice] + choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", GLOB.weavable_structures) + desired_result = GLOB.weavable_structures[choice] if(!desired_result || !istype(desired_result)) return @@ -1066,8 +1066,8 @@ var/finalized = "No" while(finalized == "No" && src.client) - choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", weavable_items) - desired_result = weavable_items[choice] + choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", GLOB.weavable_items) + desired_result = GLOB.weavable_items[choice] if(!desired_result || !istype(desired_result)) return diff --git a/code/modules/mob/living/carbon/human/species/station/traits/traits_tutorial.dm b/code/modules/mob/living/carbon/human/species/station/traits/traits_tutorial.dm index b3146ebf0c..ec30b9bc16 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/traits_tutorial.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/traits_tutorial.dm @@ -50,7 +50,7 @@ TGUI frontend path: tgui\packages\tgui\interfaces\TraitTutorial.tsx var/trait_desc = list() // name:desc var/trait_tutorial = list() //name:tutorial for(var/trait in list_of_traits) - var/datum/trait/T = all_traits[trait] + var/datum/trait/T = GLOB.all_traits[trait] trait_names += T.name trait_desc[T.name] = T.desc trait_tutorial[T.name] = T.tutorial diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 4464a17673..1e3b7b8dbe 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -46,7 +46,7 @@ var/global/list/sparring_attack_cache = list() /datum/unarmed_attack/proc/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone) var/stun_chance = rand(0, 100) - var/datum/gender/TT = gender_datums[target.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()] if(attack_damage >= 5 && armour < 2 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance switch(zone) // strong punches can have effects depending on where they hit @@ -97,8 +97,8 @@ var/global/list/sparring_attack_cache = list() /datum/unarmed_attack/proc/handle_eye_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target) var/obj/item/organ/internal/eyes/eyes = target.internal_organs_by_name[O_EYES] - var/datum/gender/TU = gender_datums[user.get_visible_gender()] - var/datum/gender/TT = gender_datums[target.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()] if(eyes) eyes.take_damage(rand(3,4), 1) user.visible_message(span_danger("[user] presses [TU.his] [eye_attack_text] into [target]'s [eyes.name]!")) @@ -145,8 +145,8 @@ var/global/list/sparring_attack_cache = list() var/obj/item/organ/external/affecting = target.get_organ(zone) var/organ = affecting.name - var/datum/gender/TU = gender_datums[user.get_visible_gender()] - var/datum/gender/TT = gender_datums[target.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()] attack_damage = CLAMP(attack_damage, 1, 5) // We expect damage input of 1 to 5 for this proc. But we leave this check juuust in case. @@ -220,7 +220,7 @@ var/global/list/sparring_attack_cache = list() /datum/unarmed_attack/kick/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) var/obj/item/organ/external/affecting = target.get_organ(zone) - var/datum/gender/TT = gender_datums[target.get_visible_gender()] + var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()] var/organ = affecting.name attack_damage = CLAMP(attack_damage, 1, 5) @@ -268,7 +268,7 @@ var/global/list/sparring_attack_cache = list() var/obj/item/organ/external/affecting = target.get_organ(zone) var/organ = affecting.name var/obj/item/clothing/shoes = user.shoes - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] attack_damage = CLAMP(attack_damage, 1, 5) diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index 0466c27f89..1eb3684979 100644 --- a/code/modules/mob/living/living_vr.dm +++ b/code/modules/mob/living/living_vr.dm @@ -143,7 +143,7 @@ var/list/possible_voice_types = get_talk_sound() var/choice = tgui_input_list(src, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types) if(!choice) - voice_sounds_list = talk_sound + voice_sounds_list = GLOB.talk_sound voice_sounds_list = get_talk_sound(choice) /mob/living/proc/save_private_notes(mob/user) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 2ed3503585..2cb3e76daf 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -43,7 +43,7 @@ var/prefsound = client.prefs.voice_sound voice_sounds_list = get_talk_sound(prefsound) else - voice_sounds_list = talk_sound + voice_sounds_list = GLOB.talk_sound resize(size_multiplier, animate = FALSE, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE, aura_animation = FALSE) return . diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 42a24b0fb4..ed921e905f 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -174,7 +174,7 @@ var/list/ai_verbs_default = list( if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. - empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal. + GLOB.empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal. return INITIALIZE_HINT_QDEL //Delete AI. if (B.brainmob.mind) diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index d5a11e74b0..bcb9f54423 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -1,4 +1,4 @@ -var/global/list/empty_playable_ai_cores = list() +GLOBAL_LIST_EMPTY(empty_playable_ai_cores) /hook/roundstart/proc/spawn_empty_ai() for(var/obj/effect/landmark/start/S in landmarks_list) @@ -6,7 +6,7 @@ var/global/list/empty_playable_ai_cores = list() continue if(locate(/mob/living) in S.loc) continue - empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S)) + GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S)) return 1 @@ -24,7 +24,7 @@ var/global/list/empty_playable_ai_cores = list() return // We warned you. - empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc) + GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc) global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight") //Handle job slot/tater cleanup. diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 85cacbcc26..0eeafb9390 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -70,7 +70,7 @@ count++ // Check the carrier - var/datum/gender/TM = gender_datums[M.get_visible_gender()] + var/datum/gender/TM = GLOB.gender_datums[M.get_visible_gender()] var/answer = tgui_alert(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", list("Yes", "No")) if(answer == "Yes") var/turf/T = get_turf(P.loc) @@ -113,7 +113,7 @@ var/list/data = ..() if(data_core) data_core.get_manifest_list() - data["manifest"] = PDA_Manifest + data["manifest"] = GLOB.PDA_Manifest return data /datum/pai_software/messenger diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index d8bb48352d..b7c91775e6 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -230,7 +230,7 @@ var/list/mob_hat_cache = list() return else if (istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if(stat == 2) if(!CONFIG_GET(flag/allow_drone_spawn) || emagged || health < -35) //It's dead, Dave. @@ -288,7 +288,7 @@ var/list/mob_hat_cache = list() clear_supplied_laws() clear_inherent_laws() laws = new /datum/ai_laws/syndicate_override - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.") to_chat(src, span_infoplain(span_bold("Obey these laws:"))) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 0533ef79d7..3f012f490e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1270,7 +1270,7 @@ to_chat(user, span_filter_notice("You assigned yourself as [src]'s operator.")) message_admins("[key_name_admin(user)] assigned as operator on cyborg [key_name_admin(src)]. Syndicate Operator change.") log_game("[key_name(user)] assigned as operator on cyborg [key_name(src)]. Syndicate Operator change.") - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.") to_chat(src, span_infoplain(span_bold("Obey these laws:"))) laws.show_laws(src) @@ -1303,7 +1303,7 @@ laws = new /datum/ai_laws/syndicate_override var/time = time2text(world.realtime,"hh:mm:ss") lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.") . = 1 spawn() diff --git a/code/modules/mob/living/silicon/robot/robot_ui_module.dm b/code/modules/mob/living/silicon/robot/robot_ui_module.dm index d7397831c4..f76cebdec1 100644 --- a/code/modules/mob/living/silicon/robot/robot_ui_module.dm +++ b/code/modules/mob/living/silicon/robot/robot_ui_module.dm @@ -42,7 +42,7 @@ modules.Add(shell_module_types) else modules.Add(robot_module_types) - if(R.crisis || security_level >= SEC_LEVEL_RED || R.crisis_override) + if(R.crisis || GLOB.security_level >= SEC_LEVEL_RED || R.crisis_override) to_chat(R, span_red("Crisis mode active. Combat module available.")) modules |= emergency_module_types for(var/module_name in whitelisted_module_types) diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index da4c74d24c..73f12b441f 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -78,7 +78,7 @@ adjustBruteLoss(-MED.heal_brute) visible_message(span_infoplain(span_bold("\The [user]") + " applies the [MED] on [src].")) else - var/datum/gender/T = gender_datums[src.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[src.get_visible_gender()] to_chat(user, span_notice("\The [src] is dead, medical items won't bring [T.him] back to life.")) // the gender lookup is somewhat overkill, but it functions identically to the obsolete gender macros and future-proofs this code if(can_butcher(user, O)) //if the animal can be butchered, do so and return. It's likely to be gibbed. harvest(user, O) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm index c3683c74f7..dba72108eb 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm @@ -555,7 +555,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? if(!client && lets_eat(user) && prob(1)) visible_message(span_danger("\The [src] scromfs \the [user] along with the food!")) to_chat(user, span_notice("\The [src] leans in close, spreading its jaws in front of you. A hot, humid gust of breath blows over you as the weight of \the [src]'s presses you over, knocking you off of your feet as the warm gooey tough of jaws scromf over your figure, rapidly guzzling you away with the [O], leaving you to tumble down into the depths of its body...")) - playsound(src, pick(bodyfall_sound), 75, 1) + playsound(src, pick(GLOB.bodyfall_sound), 75, 1) teppi_pounce(user) if(yum && nutrition >= 500) to_chat(user, span_notice("\The [src] seems satisfied.")) @@ -641,7 +641,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? else if(lets_eat(M) && prob(50)) to_chat(M, span_notice("\The [src] grumbles a bit... and then bowls you over, pressing their weight into yours to knock you off of your feet! In a rush of chaotic presses and schlorps, the gooey touch of Teppi flesh grinds over you as you're guzzled away! Casually swallowed down in retaliation for all of the pettings. Pumped down deep into the grumbling depths of \the [src].")) visible_message(span_danger("\The [src] scromfs \the [M], before chuffing and settling down again.")) - playsound(src, pick(bodyfall_sound), 75, 1) + playsound(src, pick(GLOB.bodyfall_sound), 75, 1) teppi_pounce(M) wantpet = 100 else @@ -731,7 +731,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? return if(resting) return - playsound(src, pick(teppi_sound), 75, 1) + playsound(src, pick(GLOB.teppi_sound), 75, 1) /mob/living/simple_mob/vore/alienanimals/teppi/proc/teppi_shear(var/mob/user as mob, tool) var/sheartime = 3 SECONDS diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm index ba1f3b3a44..04e15410ef 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm @@ -212,7 +212,7 @@ Field studies suggest analytical abilities on par with some species of cepholapo var/list/original_armor -var/global/list/wounds_being_tended_by_drakes = list() +GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes) /mob/living/simple_mob/animal/sif/grafadreka/proc/can_tend_wounds(var/mob/living/friend) // We can't heal robots. @@ -220,7 +220,7 @@ var/global/list/wounds_being_tended_by_drakes = list() return FALSE // Check if someone else is looking after them already. - if(global.wounds_being_tended_by_drakes["\ref[friend]"] > world.time) + if(GLOB.wounds_being_tended_by_drakes["\ref[friend]"] > world.time) return FALSE // Humans need to have a bleeding external organ to qualify. diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm b/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm index 8cae159ef0..b0ef9ad1e5 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm @@ -157,7 +157,7 @@ /mob/living/simple_mob/vore/squirrel/Initialize(mapload) . = ..() if(do_seasons) - switch(world_time_season) + switch(GLOB.world_time_season) if("spring") if(prob(1)) winterize() diff --git a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm index e90eb8dac5..08605bab71 100644 --- a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm +++ b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm @@ -63,7 +63,7 @@ else switch(M.a_intent) if(I_HELP) - var/datum/gender/T = gender_datums[src.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[src.get_visible_gender()] M.visible_message( span_notice("\The [M] hugs [src] to make [T.him] feel better!"), \ span_notice("You hug [src] to make [T.him] feel better!") diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm index b21f6afb92..7670b3544b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm @@ -68,7 +68,7 @@ List of things solar grubs should be able to do: /mob/living/simple_mob/vore/solargrub/Initialize(mapload) . = ..() - existing_solargrubs += src + GLOB.existing_solargrubs += src /mob/living/simple_mob/vore/solargrub/Life() . = ..() @@ -160,7 +160,7 @@ List of things solar grubs should be able to do: ..() /mob/living/simple_mob/vore/solargrub/Destroy() - existing_solargrubs -= src + GLOB.existing_solargrubs -= src . = ..() /mob/living/simple_mob/vore/solargrub/handle_light() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index 1f24831a5e..3adc4726d0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -1,4 +1,4 @@ -var/global/list/grub_machine_overlays = list() +GLOBAL_LIST_EMPTY(grub_machine_overlays) /mob/living/simple_mob/animal/solargrub_larva name = "solargrub larva" @@ -55,7 +55,7 @@ var/global/list/grub_machine_overlays = list() /mob/living/simple_mob/animal/solargrub_larva/Initialize(mapload) . = ..() - existing_solargrubs += src + GLOB.existing_solargrubs += src powermachine = new(src) sparks = new(src) sparks.set_up() @@ -68,7 +68,7 @@ var/global/list/grub_machine_overlays = list() return ..() /mob/living/simple_mob/animal/solargrub_larva/Destroy() - existing_solargrubs -= src + GLOB.existing_solargrubs -= src QDEL_NULL(powermachine) QDEL_NULL(sparks) QDEL_NULL(machine_effect) @@ -123,9 +123,9 @@ var/global/list/grub_machine_overlays = list() forceMove(M) powermachine.draining = 2 visible_message(span_warning("\The [src] finds an opening and crawls inside \the [M].")) - if(!(M.type in grub_machine_overlays)) + if(!(M.type in GLOB.grub_machine_overlays)) generate_machine_effect(M) - machine_effect = image(grub_machine_overlays[M.type], M) //Can't do this the reasonable way with an overlay, + machine_effect = image(GLOB.grub_machine_overlays[M.type], M) //Can't do this the reasonable way with an overlay, for(var/mob/L in player_list) //because nearly every machine updates its icon by removing all overlays first L << machine_effect @@ -133,7 +133,7 @@ var/global/list/grub_machine_overlays = list() var/icon/I = new /icon(M.icon, M.icon_state) I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD) I.Blend(new /icon('icons/effects/alert.dmi', "_red"),ICON_MULTIPLY) - grub_machine_overlays[M.type] = I + GLOB.grub_machine_overlays[M.type] = I /mob/living/simple_mob/animal/solargrub_larva/proc/eject_from_machine(var/obj/machinery/M) if(!M) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4e585a8dce..94672c6878 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -389,7 +389,7 @@ "Quit This Round",list("Quit Round","No")) if(extra_check == "Quit Round") //Update any existing objectives involving this mob. - for(var/datum/objective/O in all_objectives) + for(var/datum/objective/O in GLOB.all_objectives) if(O.target == mind) if(O.owner && O.owner.current) to_chat(O.owner.current,span_warning("You get the feeling your target is no longer within your reach...")) @@ -409,8 +409,8 @@ mind.special_role = null //Cut the PDA manifest (ugh) - if(PDA_Manifest.len) - PDA_Manifest.Cut() + if(GLOB.PDA_Manifest.len) + GLOB.PDA_Manifest.Cut() for(var/datum/data/record/R in data_core.medical) if((R.fields["name"] == real_name)) qdel(R) @@ -479,7 +479,7 @@ var/list/targets = list() - targets += observe_list_format(nuke_disks) + targets += observe_list_format(GLOB.nuke_disks) targets += observe_list_format(all_singularities) targets += getmobs() targets += observe_list_format(sortAtom(mechas_list)) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 7a7c50ab8e..f2acabe492 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -244,7 +244,7 @@ qdel(src) return - var/datum/gender/TU = gender_datums[assailant.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[assailant.get_visible_gender()] last_action = world.time @@ -349,7 +349,7 @@ /obj/item/grab/proc/reset_kill_state() if(state == GRAB_KILL) - var/datum/gender/T = gender_datums[assailant.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[assailant.get_visible_gender()] assailant.visible_message(span_warning("[assailant] lost [T.his] tight grip on [affecting]'s neck!")) hud.icon_state = "kill" state = GRAB_NECK diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index f72491301b..ed3313d1d0 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -90,7 +90,7 @@ return if(target.lying) return - var/datum/gender/T = gender_datums[attacker.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[attacker.get_visible_gender()] attacker.visible_message(span_danger("[attacker] thrusts [T.his] head into [target]'s skull!")) var/damage = 20 diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 6bbfb0b2df..f41e2fda16 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -483,8 +483,8 @@ if(J.mob_type & JOB_SILICON_AI) // IsJobAvailable for AI checks that there is an empty core available in this list - var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1] - empty_playable_ai_cores -= C + var/obj/structure/AIcore/deactivated/C = GLOB.empty_playable_ai_cores[1] + GLOB.empty_playable_ai_cores -= C character.loc = C.loc diff --git a/code/modules/mob/new_player/new_player_vr.dm b/code/modules/mob/new_player/new_player_vr.dm index 24082784b6..aeaba0fbe0 100644 --- a/code/modules/mob/new_player/new_player_vr.dm +++ b/code/modules/mob/new_player/new_player_vr.dm @@ -17,7 +17,7 @@ pass = FALSE //Are they on the VERBOTEN LIST? - if (prevent_respawns.Find(client?.prefs?.real_name)) + if (GLOB.prevent_respawns.Find(client?.prefs?.real_name)) to_chat(src,span_warning("You've already quit the round as this character. You can't go back now that you've free'd your job slot. Play another character, or wait for the next round.")) pass = FALSE @@ -46,7 +46,7 @@ var/pref_synth = client.prefs.dirty_synth var/pref_meat = client.prefs.gross_meatbag for(var/datum/trait/T as anything in megalist) - var/cost = traits_costs[T] + var/cost = GLOB.traits_costs[T] if(T.category == TRAIT_TYPE_POSITIVE) traits_left-- @@ -57,7 +57,7 @@ to_chat(src,span_warning("Your species is not playable. One or more traits appear to have been removed from the game or renamed. Enter character setup to correct this.")) break else - points_left -= traits_costs[T] + points_left -= GLOB.traits_costs[T] var/take_flags = initial(T.can_take) if((pref_synth && !(take_flags & SYNTHETICS)) || (pref_meat && !(take_flags & ORGANICS))) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 7dbc61aa0d..d95a6ccb98 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -473,7 +473,7 @@ ourfreq = voice_freq if(client) - playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds) + playsound(T, pick(GLOB.emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds) var/list/in_range = get_mobs_and_objs_in_view_fast(T,world.view,2,remote_ghosts = client ? TRUE : FALSE) var/list/m_viewers = in_range["mobs"] @@ -491,6 +491,6 @@ set name = "Select Speech Bubble" set category = "OOC.Chat Settings" - var/new_speech_bubble = tgui_input_list(src, "Pick new voice (default for automatic selection)", "Character Preference", selectable_speech_bubbles) + var/new_speech_bubble = tgui_input_list(src, "Pick new voice (default for automatic selection)", "Character Preference", GLOB.selectable_speech_bubbles) if(new_speech_bubble) custom_speech_bubble = new_speech_bubble diff --git a/code/modules/mob/theme_lists.dm b/code/modules/mob/theme_lists.dm index f93277c3c1..a5d9139bd6 100644 --- a/code/modules/mob/theme_lists.dm +++ b/code/modules/mob/theme_lists.dm @@ -1,10 +1,10 @@ //For use with various spawners! Put your selections inside of a list! -/var/global/list/theme_animal = list() -/var/global/list/theme_monster = list() -/var/global/list/theme_alien = list() -/var/global/list/theme_cold = list() -/var/global/list/theme_hot = list() -/var/global/list/theme_aquatic = list() -/var/global/list/theme_dark = list() -/var/global/list/theme_forest = list() -/var/global/list/theme_humanoid = list() +GLOBAL_LIST_EMPTY(theme_animal) +GLOBAL_LIST_EMPTY(theme_monster) +GLOBAL_LIST_EMPTY(theme_alien) +GLOBAL_LIST_EMPTY(theme_cold) +GLOBAL_LIST_EMPTY(theme_hot) +GLOBAL_LIST_EMPTY(theme_aquatic) +GLOBAL_LIST_EMPTY(theme_dark) +GLOBAL_LIST_EMPTY(theme_forest) +GLOBAL_LIST_EMPTY(theme_humanoid) diff --git a/code/modules/modular_computers/file_system/computer_file.dm b/code/modules/modular_computers/file_system/computer_file.dm index d076aeefd6..285799dd27 100644 --- a/code/modules/modular_computers/file_system/computer_file.dm +++ b/code/modules/modular_computers/file_system/computer_file.dm @@ -1,4 +1,4 @@ -var/global/file_uid = 0 +GLOBAL_VAR_INIT(file_uid, 0) /datum/computer_file/ /// Placeholder. Whitespace and most special characters are not allowed. @@ -26,8 +26,8 @@ var/global/file_uid = 0 /datum/computer_file/New(list/md = null) ..() - uid = file_uid - file_uid++ + uid = GLOB.file_uid + GLOB.file_uid++ if(islist(md)) metadata = md.Copy() diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index b62b8600c8..4969a9e739 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -302,7 +302,7 @@ T.purpose = "Purchase of [(devtype == 1) ? "laptop computer" : "tablet microcomputer"]." T.amount = total_price T.source_terminal = src.name - T.date = current_date_string + T.date = GLOB.current_date_string T.time = stationtime2text() customer_account.transaction_log.Add(T) return 1 diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 5172d45120..c288b9d6f9 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -529,7 +529,7 @@ if(damage_desc) var/fix_verb = (damage_amount > repair_amount) ? "patches" : "finishes patching" if(user == src.owner) - var/datum/gender/T = gender_datums[user.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] user.visible_message(span_infoplain(span_bold("\The [user]") + " [fix_verb] [damage_desc] on [T.his] [src.name] with [tool].")) else user.visible_message(span_infoplain(span_bold("\The [user]") + " [fix_verb] [damage_desc] on [owner]'s [src.name] with [tool].")) @@ -1201,9 +1201,9 @@ Note that amputating the affected organ does in fact remove the infection from t if(company) model = company - var/datum/robolimb/R = all_robolimbs[company] + var/datum/robolimb/R = GLOB.all_robolimbs[company] if(!R || (data.get_species_name() in R.species_cannot_use)) - R = basic_robolimb + R = GLOB.basic_robolimb if(R) force_icon = R.icon brute_mod *= R.robo_brute_mod diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 11725c00ec..bd96495530 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -17,7 +17,7 @@ var/global/list/limb_icon_cache = list() s_col = null h_col = null if(robotic >= ORGAN_ROBOT) - var/datum/robolimb/franchise = all_robolimbs[model] + var/datum/robolimb/franchise = GLOB.all_robolimbs[model] if(!(franchise && franchise.skin_tone) && !(franchise && franchise.skin_color)) if(human.synth_color) s_col = list(human.r_synth, human.g_synth, human.b_synth) @@ -35,7 +35,7 @@ var/global/list/limb_icon_cache = list() s_col = null h_col = null if(robotic >= ORGAN_ROBOT) - var/datum/robolimb/franchise = all_robolimbs[model] + var/datum/robolimb/franchise = GLOB.all_robolimbs[model] if(!(franchise && franchise.skin_tone) && !(franchise && franchise.skin_color)) return if(!isnull(data.skin_tone) && (data.get_species_appearance_flags() & HAS_SKIN_TONE)) @@ -281,7 +281,7 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F var/b = 0.11 * int temp.color = list(r, r, r, g, g, g, b, b, b) else if(model) - var/datum/robolimb/R = all_robolimbs[model] + var/datum/robolimb/R = GLOB.all_robolimbs[model] if(istype(R)) var/r = 0.30 * R.health_hud_intensity var/g = 0.59 * R.health_hud_intensity diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index eba848b62e..2b47b267e8 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -1,7 +1,7 @@ -var/list/all_robolimbs = list() -var/list/robolimb_data = list() -var/list/chargen_robolimbs = list() -var/datum/robolimb/basic_robolimb +GLOBAL_LIST_EMPTY(all_robolimbs) +GLOBAL_LIST_EMPTY(robolimb_data) +GLOBAL_LIST_EMPTY(chargen_robolimbs) +GLOBAL_DATUM(basic_robolimb, /datum/robolimb) var/const/standard_monitor_styles = "blank=ipc_blank;\ pink=ipc_pink;\ green=ipc_green;\ @@ -26,20 +26,20 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ database=ipc_database" /proc/populate_robolimb_list() - basic_robolimb = new() + GLOB.basic_robolimb = new() for(var/limb_type in typesof(/datum/robolimb)) var/datum/robolimb/R = new limb_type() - all_robolimbs[R.company] = R + GLOB.all_robolimbs[R.company] = R if(!R.unavailable_at_chargen) - chargen_robolimbs[R.company] = R //List only main brands and solo parts. + GLOB.chargen_robolimbs[R.company] = R //List only main brands and solo parts. - for(var/company in all_robolimbs) - var/datum/robolimb/R = all_robolimbs[company] + for(var/company in GLOB.all_robolimbs) + var/datum/robolimb/R = GLOB.all_robolimbs[company] if(R.species_alternates) for(var/species in R.species_alternates) var/species_company = R.species_alternates[species] - if(species_company in all_robolimbs) - R.species_alternates[species] = all_robolimbs[species_company] + if(species_company in GLOB.all_robolimbs) + R.species_alternates[species] = GLOB.all_robolimbs[species_company] /datum/robolimb var/company = "Unbranded" // Shown when selecting the limb. diff --git a/code/modules/organs/subtypes/standard.dm b/code/modules/organs/subtypes/standard.dm index 119ae129d8..76c90007fa 100644 --- a/code/modules/organs/subtypes/standard.dm +++ b/code/modules/organs/subtypes/standard.dm @@ -34,7 +34,7 @@ owner.internal_organs_by_name[O_HEATSINK] = new /obj/item/organ/internal/robotic/heatsink(owner,1) owner.internal_organs_by_name[O_DIAGNOSTIC] = new /obj/item/organ/internal/robotic/diagnostic(owner,1) - var/datum/robolimb/R = all_robolimbs[model] // company should be set in parent by now + var/datum/robolimb/R = GLOB.all_robolimbs[model] // company should be set in parent by now if(!R) log_error("A torso was robotize() but has no model that can be found: [model]. May affect FBPs.") owner.synthetic = R @@ -300,7 +300,7 @@ /obj/item/organ/external/head/robotize(var/company, var/skip_prosthetics, var/keep_organs) . = ..(company, skip_prosthetics, 1) if(model) - var/datum/robolimb/robohead = all_robolimbs[model] + var/datum/robolimb/robohead = GLOB.all_robolimbs[model] if(robohead?.monitor_styles && robohead?.monitor_icon) LAZYDISTINCTADD(organ_verbs, /mob/living/carbon/human/proc/setmonitor_state) else diff --git a/code/modules/overmap/helpers.dm b/code/modules/overmap/helpers.dm index e07be07ac0..bf4e7396ab 100644 --- a/code/modules/overmap/helpers.dm +++ b/code/modules/overmap/helpers.dm @@ -1,5 +1,5 @@ /proc/get_overmap_sector(var/z) if(using_map.use_overmap) - return map_sectors["[z]"] + return GLOB.map_sectors["[z]"] else return null diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm index 4cfc80c2f1..abceccddd3 100644 --- a/code/modules/overmap/sectors.dm +++ b/code/modules/overmap/sectors.dm @@ -148,7 +148,7 @@ /obj/effect/overmap/visitable/proc/register_z_levels() for(var/zlevel in map_z) - map_sectors["[zlevel]"] = src + GLOB.map_sectors["[zlevel]"] = src global.using_map.player_levels |= map_z if(!in_space) @@ -161,7 +161,7 @@ */ /obj/effect/overmap/visitable/proc/unregister_z_levels() - map_sectors -= map_z + GLOB.map_sectors -= map_z global.using_map.player_levels -= map_z if(!in_space) diff --git a/code/modules/overmap/turfs.dm b/code/modules/overmap/turfs.dm index 6c5cbebbf2..c4f4955f57 100644 --- a/code/modules/overmap/turfs.dm +++ b/code/modules/overmap/turfs.dm @@ -1,5 +1,5 @@ //Dimension of overmap (squares 4 lyfe) -var/global/list/map_sectors = list() +GLOBAL_LIST_EMPTY(map_sectors) /area/overmap name = "System Map" diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index a7c0d2faa6..9e35cbab68 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -1,9 +1,9 @@ -var/list/obj/machinery/photocopier/faxmachine/allfaxes = list() +GLOBAL_LIST_EMPTY_TYPED(allfaxes, /obj/machinery/photocopier/faxmachine) var/list/admin_departments = list("[using_map.boss_name]", "Virgo-Prime Governmental Authority", "Virgo-Erigonne Job Boards", "Supply") -var/list/alldepartments = list() -var/global/last_fax_role_request +GLOBAL_LIST_EMPTY(alldepartments) +GLOBAL_VAR(last_fax_role_request) -var/list/adminfaxes = list() //cache for faxes that have been sent to admins +GLOBAL_LIST_EMPTY(adminfaxes) //cache for faxes that have been sent to admins /obj/machinery/photocopier/faxmachine name = "fax machine" @@ -30,10 +30,10 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins /obj/machinery/photocopier/faxmachine/Initialize(mapload) . = ..() - allfaxes += src + GLOB.allfaxes += src if(!destination) destination = "[using_map.boss_name]" - if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) ) - alldepartments |= department + if( !(("[department]" in GLOB.alldepartments) || ("[department]" in admin_departments)) ) + GLOB.alldepartments |= department /obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob) user.set_machine(src) @@ -76,7 +76,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins return if(L.stat || L.restrained()) return - if(last_fax_role_request && (world.time - last_fax_role_request < 5 MINUTES)) + if(GLOB.last_fax_role_request && (world.time - GLOB.last_fax_role_request < 5 MINUTES)) to_chat(L, span_warning("The global automated relays are still recalibrating. Try again later or relay your request in written form for processing.")) return @@ -146,7 +146,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins message_color = ping_dept.color message_chat_rolerequest(message_color, ping_name, reason, role) - last_fax_role_request = world.time + GLOB.last_fax_role_request = world.time to_chat(L, span_notice("Your request was transmitted.")) /obj/machinery/photocopier/faxmachine/tgui_interact(mob/user, datum/tgui/ui) @@ -249,7 +249,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if("dept") var/lastdestination = destination - destination = tgui_input_list(ui.user, "Which department?", "Choose a department", (alldepartments + admin_departments)) + destination = tgui_input_list(ui.user, "Which department?", "Choose a department", (GLOB.alldepartments + admin_departments)) if(!destination) destination = lastdestination @@ -300,8 +300,8 @@ Extracted to its own procedure for easier logic handling with paper bundles. to_chat(user, "No input found. Please hang up and try your call again.") return department = input - if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) && !(department == "Unknown")) - alldepartments |= department + if( !(("[department]" in GLOB.alldepartments) || ("[department]" in admin_departments)) && !(department == "Unknown")) + GLOB.alldepartments |= department else if(istype(O, /obj/item/toner)) if(toner <= 10) //allow replacing when low toner is affecting the print darkness user.drop_item() @@ -324,7 +324,7 @@ Extracted to its own procedure for easier logic handling with paper bundles. use_power(200) var/success = 0 - for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) + for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes) if( F.department == destination ) success = F.receivefax(copyitem) @@ -379,7 +379,7 @@ Extracted to its own procedure for easier logic handling with paper bundles. return rcvdcopy.loc = null //hopefully this shouldn't cause trouble - adminfaxes += rcvdcopy + GLOB.adminfaxes += rcvdcopy //message badmins that a fax has arrived diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 2c549e5df6..1e70e06e36 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -377,7 +377,7 @@ /obj/item/paper/proc/burnpaper(obj/item/flame/P, mob/user) var/class = "warning" - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if(P.lit && !user.restrained()) if(istype(P, /obj/item/flame/lighter/zippo)) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 3fd26d33b6..e9498a3dda 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -78,7 +78,7 @@ if(P.lit && !user.restrained()) if(istype(P, /obj/item/flame/lighter/zippo)) class = "rose>" - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] user.visible_message("[user] holds \the [P] up to \the [src], it looks like [TU.he] [TU.is] trying to burn it!", \ "You hold \the [P] up to \the [src], burning it slowly.") diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 429cf692fc..b628c73b31 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -162,7 +162,7 @@ ..() /obj/item/shreddedp/proc/burnpaper(var/obj/item/flame/lighter/P, var/mob/user) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if(user.restrained()) return if(!P.lit) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index f14d9f8e33..c33829ede9 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -21,7 +21,7 @@ /******** * photo * ********/ -var/global/photo_count = 0 +GLOBAL_VAR_INIT(photo_count, 0) /obj/item/photo name = "photo" @@ -39,7 +39,7 @@ var/global/photo_count = 0 /obj/item/photo/Initialize(mapload) . = ..() - id = photo_count++ + id = GLOB.photo_count++ /obj/item/photo/attack_self(mob/user as mob) user.examinate(src) diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm index 9c45b8c929..633d665736 100644 --- a/code/modules/pda/core_apps.dm +++ b/code/modules/pda/core_apps.dm @@ -209,7 +209,7 @@ /datum/data/pda/app/manifest/update_ui(mob/user as mob, list/data) if(data_core) data_core.get_manifest_list() - data["manifest"] = PDA_Manifest + data["manifest"] = GLOB.PDA_Manifest /datum/data/pda/app/manifest/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index a775df514d..396b334234 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -21,7 +21,7 @@ If d1 = 0 and d2 = dir, it's a O-X cable, getting from the center of the tile to If d1 = dir1 and d2 = dir2, it's a full X-X cable, getting from dir1 to dir2 By design, d1 is the smallest direction and d2 is the highest */ -var/list/possible_cable_coil_colours = list( +GLOBAL_LIST_INIT(possible_cable_coil_colours, list( "White" = COLOR_WHITE, "Silver" = COLOR_SILVER, "Gray" = COLOR_GRAY, @@ -41,7 +41,7 @@ var/list/possible_cable_coil_colours = list( "Orange" = COLOR_ORANGE, "Beige" = COLOR_BEIGE, "Brown" = COLOR_BROWN - ) + )) /obj/structure/cable level = 1 @@ -589,9 +589,9 @@ var/list/possible_cable_coil_colours = list( if(!selected_color) return - var/final_color = possible_cable_coil_colours[selected_color] + var/final_color = GLOB.possible_cable_coil_colours[selected_color] if(!final_color) - final_color = possible_cable_coil_colours["Red"] + final_color = GLOB.possible_cable_coil_colours["Red"] selected_color = "red" color = final_color to_chat(user, span_notice("You change \the [src]'s color to [lowertext(selected_color)].")) @@ -604,7 +604,7 @@ var/list/possible_cable_coil_colours = list( /obj/item/stack/cable_coil/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/multitool)) - var/selected_type = tgui_input_list(user, "Pick new colour.", "Cable Colour", possible_cable_coil_colours) + var/selected_type = tgui_input_list(user, "Pick new colour.", "Cable Colour", GLOB.possible_cable_coil_colours) set_cable_color(selected_type, user) return return ..() @@ -630,7 +630,7 @@ var/list/possible_cable_coil_colours = list( set name = "Change Colour" set category = "Object" - var/selected_type = tgui_input_list(usr, "Pick new colour.", "Cable Colour", possible_cable_coil_colours) + var/selected_type = tgui_input_list(usr, "Pick new colour.", "Cable Colour", GLOB.possible_cable_coil_colours) set_cable_color(selected_type, usr) // Items usable on a cable coil : diff --git a/code/modules/power/fusion/fusion_reactions.dm b/code/modules/power/fusion/fusion_reactions.dm index d0617f94de..12bc788d68 100644 --- a/code/modules/power/fusion/fusion_reactions.dm +++ b/code/modules/power/fusion/fusion_reactions.dm @@ -1,4 +1,4 @@ -var/list/fusion_reactions +GLOBAL_LIST(fusion_reactions) /decl/fusion_reaction var/p_react = "" // Primary reactant. @@ -15,21 +15,21 @@ var/list/fusion_reactions return 0 /proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy) - if(!fusion_reactions) - fusion_reactions = list() + if(!GLOB.fusion_reactions) + GLOB.fusion_reactions = list() for(var/rtype in subtypesof(/decl/fusion_reaction)) var/decl/fusion_reaction/cur_reaction = new rtype() - if(!fusion_reactions[cur_reaction.p_react]) - fusion_reactions[cur_reaction.p_react] = list() - fusion_reactions[cur_reaction.p_react][cur_reaction.s_react] = cur_reaction - if(!fusion_reactions[cur_reaction.s_react]) - fusion_reactions[cur_reaction.s_react] = list() - fusion_reactions[cur_reaction.s_react][cur_reaction.p_react] = cur_reaction + if(!GLOB.fusion_reactions[cur_reaction.p_react]) + GLOB.fusion_reactions[cur_reaction.p_react] = list() + GLOB.fusion_reactions[cur_reaction.p_react][cur_reaction.s_react] = cur_reaction + if(!GLOB.fusion_reactions[cur_reaction.s_react]) + GLOB.fusion_reactions[cur_reaction.s_react] = list() + GLOB.fusion_reactions[cur_reaction.s_react][cur_reaction.p_react] = cur_reaction - if(fusion_reactions.Find(p_react)) - var/list/secondary_reactions = fusion_reactions[p_react] + if(GLOB.fusion_reactions.Find(p_react)) + var/list/secondary_reactions = GLOB.fusion_reactions[p_react] if(secondary_reactions.Find(s_react)) - return fusion_reactions[p_react][s_react] + return GLOB.fusion_reactions[p_react][s_react] // Material fuels // deuterium diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 68ae172f08..238204dc81 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -425,7 +425,7 @@ tgui_interact(user) /obj/machinery/power/supermatter/attack_hand(mob/user as mob) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] user.visible_message(span_warning("\The [user] reaches out and touches \the [src], inducing a resonance... [TU.his] body starts to glow and bursts into flames before flashing into ash."),\ span_danger("You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\""),\ span_warning("You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) @@ -474,7 +474,7 @@ return if(isliving(AM)) var/mob/living/M = AM - var/datum/gender/T = gender_datums[M.get_visible_gender()] + var/datum/gender/T = GLOB.gender_datums[M.get_visible_gender()] AM.visible_message(span_warning("\The [AM] slams into \the [src] inducing a resonance... [T.his] body starts to glow and catch flame before flashing into ash."),\ span_danger("You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\""),\ span_warning("You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d01d71fcb2..f1c3db9519 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -206,7 +206,7 @@ if(P) if(process_projectile(P, user, user, pick(BP_L_FOOT, BP_R_FOOT))) handle_post_fire(user, user) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] user.visible_message( span_danger("\The [user] shoots [TU.himself] in the foot with \the [src]!"), span_danger("You shoot yourself in the foot with \the [src]!") diff --git a/code/modules/projectiles/guns/energy/gunsword_vr.dm b/code/modules/projectiles/guns/energy/gunsword_vr.dm index 4d36306f38..3bf609a449 100644 --- a/code/modules/projectiles/guns/energy/gunsword_vr.dm +++ b/code/modules/projectiles/guns/energy/gunsword_vr.dm @@ -96,7 +96,7 @@ /obj/item/cell/device/weapon/gunsword/attack_self(mob/living/user as mob) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] + var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if (active) if ((CLUMSY in user.mutations) && prob(50)) user.visible_message(span_danger("\The [user] accidentally cuts [TU.himself] with \the [src]."),\ diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index a33695041e..956c17c243 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -159,7 +159,7 @@ if(prob(15)) M.apply_effect((rand(30,80)),IRRADIATE) M.Weaken(5) - var/datum/gender/TM = gender_datums[M.get_visible_gender()] + var/datum/gender/TM = GLOB.gender_datums[M.get_visible_gender()] for (var/mob/V in viewers(src)) V.show_message(span_red("[M] writhes in pain as [TM.his] vacuoles boil."), 3, span_red("You hear the crunching of leaves."), 2) if(prob(35)) diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm index 4123664214..4b5be5de62 100644 --- a/code/modules/random_map/drop/droppod.dm +++ b/code/modules/random_map/drop/droppod.dm @@ -195,9 +195,9 @@ // Equip them, if they are human and it is desirable. if(ishuman(spawned_mob)) - var/antag_type = tgui_input_list(usr, "Select an equipment template to use or cancel for nude.", all_antag_types) + var/antag_type = tgui_input_list(usr, "Select an equipment template to use or cancel for nude.", GLOB.all_antag_types) if(antag_type) - var/datum/antagonist/A = all_antag_types[antag_type] + var/datum/antagonist/A = GLOB.all_antag_types[antag_type] A.equip(spawned_mob) if(tgui_alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) != "Yes") diff --git a/code/modules/reagents/Chemistry-Logging.dm b/code/modules/reagents/Chemistry-Logging.dm index fda650a5f0..70657e4c1b 100644 --- a/code/modules/reagents/Chemistry-Logging.dm +++ b/code/modules/reagents/Chemistry-Logging.dm @@ -1,5 +1,5 @@ -/var/list/chemical_reaction_logs = list() +GLOBAL_LIST_EMPTY(chemical_reaction_logs) /proc/log_chemical_reaction(atom/A, decl/chemical_reaction/R, multiplier) if(!A || !R) @@ -8,7 +8,7 @@ var/turf/T = get_turf(A) var/logstr = "[usr ? key_name(usr) : "EVENT"] mixed [R.name] ([R.result]) (x[multiplier]) in \the [A] at [T ? "[T.x],[T.y],[T.z]" : "*null*"]" - chemical_reaction_logs += "\[[time_stamp()]\] [logstr]" + GLOB.chemical_reaction_logs += "\[[time_stamp()]\] [logstr]" if(R.log_is_important) message_admins(logstr) @@ -22,7 +22,7 @@ return var/html = "" - for(var/entry in chemical_reaction_logs) + for(var/entry in GLOB.chemical_reaction_logs) html += "[entry]
    " usr << browse("[html]", "window=chemlogs") diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index f3b7ff395f..20b8ecb0c6 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -117,7 +117,7 @@ var/global/list/obj/machinery/message_server/message_servers = list() authmsg += "([id_auth])\n" if (stamp) authmsg += "([stamp])\n" - for (var/obj/machinery/requests_console/Console in allConsoles) + for (var/obj/machinery/requests_console/Console in GLOB.allConsoles) if (ckey(Console.department) == ckey(recipient)) if(Console.inoperable()) Console.message_log += list(list("Message lost due to console failure.","Please contact [station_name()] system adminsitrator or AI for technical assistance.")) diff --git a/code/modules/research/prosfab_designs.dm b/code/modules/research/prosfab_designs.dm index 1b208148ac..1f10eace63 100644 --- a/code/modules/research/prosfab_designs.dm +++ b/code/modules/research/prosfab_designs.dm @@ -12,10 +12,10 @@ var/obj/machinery/mecha_part_fabricator/pros/prosfab = fabricator var/obj/item/organ/O = new build_path(newloc) if(prosfab.manufacturer) - var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer] + var/datum/robolimb/manf = GLOB.all_robolimbs[prosfab.manufacturer] if(!(O.organ_tag in manf.parts)) // Make sure we're using an actually present icon. - manf = all_robolimbs["Unbranded"] + manf = GLOB.all_robolimbs["Unbranded"] if(prosfab.species in manf.species_alternates) // If the prosthetics fab is set to say, Unbranded, and species set to 'Tajaran', it will make the Taj variant of Unbranded, if it exists. manf = manf.species_alternates[prosfab.species] @@ -36,7 +36,7 @@ var/obj/machinery/mecha_part_fabricator/pros/prosfab = fabricator var/newspecies = "Human" - var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer] + var/datum/robolimb/manf = GLOB.all_robolimbs[prosfab.manufacturer] if(manf) if(prosfab.species in manf.species_alternates) // If the prosthetics fab is set to say, Unbranded, and species set to 'Tajaran', it will make the Taj variant of Unbranded, if it exists. @@ -60,7 +60,7 @@ O.data.setup_from_species(GLOB.all_species[newspecies]) if(!(O.organ_tag in manf.parts)) // Make sure we're using an actually present icon. - manf = all_robolimbs["Unbranded"] + manf = GLOB.all_robolimbs["Unbranded"] O.robotize(manf.company) O.data.setup_from_dna() diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm index 3f07c83a6f..5c18b36df5 100644 --- a/code/modules/security levels/security levels.dm +++ b/code/modules/security levels/security levels.dm @@ -1,4 +1,4 @@ -/var/security_level = 0 +GLOBAL_VAR_INIT(security_level, 0) //0 = code green //1 = code yellow //2 = code violet @@ -29,44 +29,44 @@ level = SEC_LEVEL_DELTA //Will not be announced if you try to set to the same level as it already is - if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level) + if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level) switch(level) if(SEC_LEVEL_GREEN) security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_green)]", "Attention! Alert level lowered to code green.") - security_level = SEC_LEVEL_GREEN + GLOB.security_level = SEC_LEVEL_GREEN if(SEC_LEVEL_YELLOW) - if(security_level < SEC_LEVEL_YELLOW) + if(GLOB.security_level < SEC_LEVEL_YELLOW) security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_yellow_upto)]", "Attention! Alert level elevated to yellow") else security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_yellow_downto)]", "Attention! Alert level lowered to yellow") - security_level = SEC_LEVEL_YELLOW + GLOB.security_level = SEC_LEVEL_YELLOW if(SEC_LEVEL_VIOLET) - if(security_level < SEC_LEVEL_VIOLET) + if(GLOB.security_level < SEC_LEVEL_VIOLET) security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_violet_upto)]", "Attention! Alert level elevated to violet") else security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_violet_downto)]", "Attention! Alert level lowered to violet") - security_level = SEC_LEVEL_VIOLET + GLOB.security_level = SEC_LEVEL_VIOLET if(SEC_LEVEL_ORANGE) - if(security_level < SEC_LEVEL_ORANGE) + if(GLOB.security_level < SEC_LEVEL_ORANGE) security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_orange_upto)]", "Attention! Alert level elevated to orange") else security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_orange_downto)]", "Attention! Alert level lowered to orange") - security_level = SEC_LEVEL_ORANGE + GLOB.security_level = SEC_LEVEL_ORANGE if(SEC_LEVEL_BLUE) - if(security_level < SEC_LEVEL_BLUE) + if(GLOB.security_level < SEC_LEVEL_BLUE) security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_blue_upto)]", "Attention! Alert level elevated to blue") else security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_blue_downto)]", "Attention! Alert level lowered to blue") - security_level = SEC_LEVEL_BLUE + GLOB.security_level = SEC_LEVEL_BLUE if(SEC_LEVEL_RED) - if(security_level < SEC_LEVEL_RED) + if(GLOB.security_level < SEC_LEVEL_RED) security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_red_upto)]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75)) else security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_red_downto)]", "Attention! Code red!") - security_level = SEC_LEVEL_RED + GLOB.security_level = SEC_LEVEL_RED if(SEC_LEVEL_DELTA) security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_delta)]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg') - security_level = SEC_LEVEL_DELTA + GLOB.security_level = SEC_LEVEL_DELTA var/newlevel = get_security_level() for(var/obj/machinery/firealarm/FA in machines) @@ -91,7 +91,7 @@ admin_chat_message(message = "Security level is now: [uppertext(get_security_level())]", color = "#CC2222") //VOREStation Add /proc/get_security_level() - switch(security_level) + switch(GLOB.security_level) if(SEC_LEVEL_GREEN) return "green" if(SEC_LEVEL_YELLOW) diff --git a/code/modules/spells/general/area_teleport.dm b/code/modules/spells/general/area_teleport.dm index 9358d2703e..38b8397222 100644 --- a/code/modules/spells/general/area_teleport.dm +++ b/code/modules/spells/general/area_teleport.dm @@ -26,11 +26,11 @@ var/A = null if(!randomise_selection) - A = tgui_input_list(user, "Area to teleport to", "Teleport", teleportlocs) + A = tgui_input_list(user, "Area to teleport to", "Teleport", GLOB.teleportlocs) else - A = pick(teleportlocs) + A = pick(GLOB.teleportlocs) - var/area/thearea = teleportlocs[A] + var/area/thearea = GLOB.teleportlocs[A] return list(thearea) diff --git a/code/modules/spells/general/rune_write.dm b/code/modules/spells/general/rune_write.dm index 6f09c9ed2e..844b1480d6 100644 --- a/code/modules/spells/general/rune_write.dm +++ b/code/modules/spells/general/rune_write.dm @@ -17,7 +17,7 @@ return list(user) /spell/rune_write/cast(null, mob/user = usr) - if(!cultwords["travel"]) + if(!GLOB.cultwords["travel"]) runerandom() var/list/runes = list("Teleport", "Teleport Other", "Spawn a Tome", "Change Construct Type", "Convert", "EMP", "Drain Blood", "See Invisible", "Resurrect", "Hide Runes", "Reveal Runes", "Astral Journey", "Manifest a Ghost", "Imbue Talisman", "Sacrifice", "Wall", "Free Cultist", "Summon Cultist", "Deafen", "Blind", "BloodBoil", "Communicate", "Stun") var/r = tgui_input_list(user, "Choose a rune to scribe", "Rune Scribing", runes, timeout=30 SECONDS) @@ -30,145 +30,145 @@ if(cast_check(1)) var/beacon if(user) - beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", rnwords, timeout=30 SECONDS) - R.word1=cultwords["travel"] - R.word2=cultwords["self"] + beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", GLOB.rnwords, timeout=30 SECONDS) + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["self"] R.word3=beacon R.check_icon() if("Teleport Other") if(cast_check(1)) var/beacon if(user) - beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", rnwords, timeout=30 SECONDS) - R.word1=cultwords["travel"] - R.word2=cultwords["other"] + beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", GLOB.rnwords, timeout=30 SECONDS) + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["other"] R.word3=beacon R.check_icon() if("Spawn a Tome") if(cast_check(1)) - R.word1=cultwords["see"] - R.word2=cultwords["blood"] - R.word3=cultwords["hell"] + R.word1=GLOB.cultwords["see"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["hell"] R.check_icon() if("Change Construct Type") if(cast_check(1)) - R.word1=cultwords["hell"] - R.word2=cultwords["destroy"] - R.word3=cultwords["other"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["destroy"] + R.word3=GLOB.cultwords["other"] R.check_icon() if("Convert") if(cast_check(1)) - R.word1=cultwords["join"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["join"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["self"] R.check_icon() if("EMP") if(cast_check(1)) - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["technology"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["technology"] R.check_icon() if("Drain Blood") if(cast_check(1)) - R.word1=cultwords["travel"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["self"] R.check_icon() if("See Invisible") if(cast_check(1)) - R.word1=cultwords["see"] - R.word2=cultwords["hell"] - R.word3=cultwords["join"] + R.word1=GLOB.cultwords["see"] + R.word2=GLOB.cultwords["hell"] + R.word3=GLOB.cultwords["join"] R.check_icon() if("Resurrect") if(cast_check(1)) - R.word1=cultwords["blood"] - R.word2=cultwords["join"] - R.word3=cultwords["hell"] + R.word1=GLOB.cultwords["blood"] + R.word2=GLOB.cultwords["join"] + R.word3=GLOB.cultwords["hell"] R.check_icon() if("Hide Runes") if(cast_check(1)) - R.word1=cultwords["hide"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] + R.word1=GLOB.cultwords["hide"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["blood"] R.check_icon() if("Astral Journey") if(cast_check(1)) - R.word1=cultwords["hell"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["travel"] + R.word3=GLOB.cultwords["self"] R.check_icon() if("Manifest a Ghost") if(cast_check(1)) - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["travel"] + R.word1=GLOB.cultwords["blood"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["travel"] R.check_icon() if("Imbue Talisman") if(cast_check(1)) - R.word1=cultwords["hell"] - R.word2=cultwords["technology"] - R.word3=cultwords["join"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["technology"] + R.word3=GLOB.cultwords["join"] R.check_icon() if("Sacrifice") if(cast_check(1)) - R.word1=cultwords["hell"] - R.word2=cultwords["blood"] - R.word3=cultwords["join"] + R.word1=GLOB.cultwords["hell"] + R.word2=GLOB.cultwords["blood"] + R.word3=GLOB.cultwords["join"] R.check_icon() if("Reveal Runes") if(cast_check(1)) - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["hide"] + R.word1=GLOB.cultwords["blood"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["hide"] R.check_icon() if("Wall") if(cast_check(1)) - R.word1=cultwords["destroy"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["travel"] + R.word3=GLOB.cultwords["self"] R.check_icon() if("Freedom") if(cast_check(1)) - R.word1=cultwords["travel"] - R.word2=cultwords["technology"] - R.word3=cultwords["other"] + R.word1=GLOB.cultwords["travel"] + R.word2=GLOB.cultwords["technology"] + R.word3=GLOB.cultwords["other"] R.check_icon() if("Cultsummon") if(cast_check(1)) - R.word1=cultwords["join"] - R.word2=cultwords["other"] - R.word3=cultwords["self"] + R.word1=GLOB.cultwords["join"] + R.word2=GLOB.cultwords["other"] + R.word3=GLOB.cultwords["self"] R.check_icon() if("Deafen") if(cast_check(1)) - R.word1=cultwords["hide"] - R.word2=cultwords["other"] - R.word3=cultwords["see"] + R.word1=GLOB.cultwords["hide"] + R.word2=GLOB.cultwords["other"] + R.word3=GLOB.cultwords["see"] R.check_icon() if("Blind") if(cast_check(1)) - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["other"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["other"] R.check_icon() if("BloodBoil") if(cast_check(1)) - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] + R.word1=GLOB.cultwords["destroy"] + R.word2=GLOB.cultwords["see"] + R.word3=GLOB.cultwords["blood"] R.check_icon() if("Communicate") if(cast_check(1)) - R.word1=cultwords["self"] - R.word2=cultwords["other"] - R.word3=cultwords["technology"] + R.word1=GLOB.cultwords["self"] + R.word2=GLOB.cultwords["other"] + R.word3=GLOB.cultwords["technology"] R.check_icon() if("Stun") if(cast_check(1)) - R.word1=cultwords["join"] - R.word2=cultwords["hide"] - R.word3=cultwords["technology"] + R.word1=GLOB.cultwords["join"] + R.word2=GLOB.cultwords["hide"] + R.word3=GLOB.cultwords["technology"] R.check_icon() else to_chat(user, span_warning("You do not have enough space to write a proper rune.")) diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index a222ceeecf..dd873c49c6 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -64,16 +64,16 @@ /datum/tgui_module/communications/proc/change_security_level(mob/user, new_level) tmp_alertlevel = new_level - var/old_level = security_level + var/old_level = GLOB.security_level if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this set_security_level(tmp_alertlevel) - if(security_level != old_level) + if(GLOB.security_level != old_level) //Only notify the admins if an actual change happened log_game("[key_name(user)] has changed the security level to [get_security_level()].") message_admins("[key_name_admin(user)] has changed the security level to [get_security_level()].") - switch(security_level) + switch(GLOB.security_level) if(SEC_LEVEL_GREEN) feedback_inc("alert_comms_green",1) if(SEC_LEVEL_YELLOW) @@ -110,8 +110,8 @@ ), ) - data["security_level"] = security_level - switch(security_level) + data["security_level"] = GLOB.security_level + switch(GLOB.security_level) if(SEC_LEVEL_BLUE) data["security_level_color"] = "blue"; if(SEC_LEVEL_ORANGE) diff --git a/code/modules/tgui/modules/crew_manifest.dm b/code/modules/tgui/modules/crew_manifest.dm index 877a03d536..5813340358 100644 --- a/code/modules/tgui/modules/crew_manifest.dm +++ b/code/modules/tgui/modules/crew_manifest.dm @@ -6,7 +6,7 @@ var/list/data = ..() if(data_core) data_core.get_manifest_list() - data["manifest"] = PDA_Manifest + data["manifest"] = GLOB.PDA_Manifest return data /datum/tgui_module/crew_manifest/robot diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm index e50efdd95e..85422ab9ba 100644 --- a/code/modules/tgui/modules/ntos-only/cardmod.dm +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -11,7 +11,7 @@ var/list/data = ..() if(data_core) data_core.get_manifest_list() - data["manifest"] = PDA_Manifest + data["manifest"] = GLOB.PDA_Manifest return data /datum/tgui_module/cardmod/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) diff --git a/code/modules/vore/eating/belly_import.dm b/code/modules/vore/eating/belly_import.dm index 114d6f48b9..4e829c99b7 100644 --- a/code/modules/vore/eating/belly_import.dm +++ b/code/modules/vore/eating/belly_import.dm @@ -440,13 +440,13 @@ if(istext(belly_data["contamination_flavor"])) var/new_contamination_flavor = sanitize(belly_data["contamination_flavor"],MAX_MESSAGE_LEN,0,0,0) if(new_contamination_flavor) - if(new_contamination_flavor in contamination_flavors) + if(new_contamination_flavor in GLOB.contamination_flavors) new_belly.contamination_flavor = new_contamination_flavor if(istext(belly_data["contamination_color"])) var/new_contamination_color = sanitize(belly_data["contamination_color"],MAX_MESSAGE_LEN,0,0,0) if(new_contamination_color) - if(new_contamination_color in contamination_colors) + if(new_contamination_color in GLOB.contamination_colors) new_belly.contamination_color = new_contamination_color if(isnum(belly_data["nutrition_percent"])) @@ -535,7 +535,7 @@ if(istext(belly_data["egg_type"])) var/new_egg_type = sanitize(belly_data["egg_type"],MAX_MESSAGE_LEN,0,0,0) if(new_egg_type) - if(new_egg_type in global_vore_egg_types) + if(new_egg_type in GLOB.global_vore_egg_types) new_belly.egg_type = new_egg_type if(istext(belly_data["egg_name"])) @@ -622,30 +622,30 @@ new_belly.fancy_vore = TRUE if(new_belly.fancy_vore) - if(!(new_belly.vore_sound in fancy_vore_sounds)) + if(!(new_belly.vore_sound in GLOB.fancy_vore_sounds)) new_belly.vore_sound = "Gulp" - if(!(new_belly.release_sound in fancy_vore_sounds)) + if(!(new_belly.release_sound in GLOB.fancy_vore_sounds)) new_belly.release_sound = "Splatter" else - if(!(new_belly.vore_sound in classic_vore_sounds)) + if(!(new_belly.vore_sound in GLOB.classic_vore_sounds)) new_belly.vore_sound = "Gulp" - if(!(new_belly.release_sound in classic_vore_sounds)) + if(!(new_belly.release_sound in GLOB.classic_vore_sounds)) new_belly.release_sound = "Splatter" if(istext(belly_data["vore_sound"])) var/new_vore_sound = sanitize(belly_data["vore_sound"],MAX_MESSAGE_LEN,0,0,0) if(new_vore_sound) - if (new_belly.fancy_vore && (new_vore_sound in fancy_vore_sounds)) + if (new_belly.fancy_vore && (new_vore_sound in GLOB.fancy_vore_sounds)) new_belly.vore_sound = new_vore_sound - if (!new_belly.fancy_vore && (new_vore_sound in classic_vore_sounds)) + if (!new_belly.fancy_vore && (new_vore_sound in GLOB.classic_vore_sounds)) new_belly.vore_sound = new_vore_sound if(istext(belly_data["release_sound"])) var/new_release_sound = sanitize(belly_data["release_sound"],MAX_MESSAGE_LEN,0,0,0) if(new_release_sound) - if (new_belly.fancy_vore && (new_release_sound in fancy_release_sounds)) + if (new_belly.fancy_vore && (new_release_sound in GLOB.fancy_release_sounds)) new_belly.release_sound = new_release_sound - if (!new_belly.fancy_vore && (new_release_sound in classic_release_sounds)) + if (!new_belly.fancy_vore && (new_release_sound in GLOB.classic_release_sounds)) new_belly.release_sound = new_release_sound if(isnum(belly_data["sound_volume"])) diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 9a91e669dd..d68f6b5d29 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -526,9 +526,9 @@ if(vore_sound && !recent_sound && !istype(thing, /mob/observer)) var/soundfile if(!fancy_vore) - soundfile = classic_vore_sounds[vore_sound] + soundfile = GLOB.classic_vore_sounds[vore_sound] else - soundfile = fancy_vore_sounds[vore_sound] + soundfile = GLOB.fancy_vore_sounds[vore_sound] if(special_entrance_sound) // Custom sound set by mob's init_vore or ingame varedits. soundfile = special_entrance_sound if(soundfile) @@ -839,9 +839,9 @@ owner.visible_message(span_vnotice(span_green(span_bold("[owner] [release_verb] everything from their [lowertext(name)]!"))), range = privacy_range) var/soundfile if(!fancy_vore) - soundfile = classic_release_sounds[release_sound] + soundfile = GLOB.classic_release_sounds[release_sound] else - soundfile = fancy_release_sounds[release_sound] + soundfile = GLOB.fancy_release_sounds[release_sound] if(soundfile) playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/preference/toggle/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) @@ -924,9 +924,9 @@ owner.visible_message(span_vnotice(span_green(span_bold("[owner] [release_verb] [M] from their [lowertext(name)]!"))),range = privacy_range) var/soundfile if(!fancy_vore) - soundfile = classic_release_sounds[release_sound] + soundfile = GLOB.classic_release_sounds[release_sound] else - soundfile = fancy_release_sounds[release_sound] + soundfile = GLOB.fancy_release_sounds[release_sound] if(soundfile) playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/preference/toggle/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //Should fix your view not following you out of mobs sometimes! diff --git a/code/modules/vore/eating/contaminate_vr.dm b/code/modules/vore/eating/contaminate_vr.dm index 27b0f8e6f2..e6deabbbe6 100644 --- a/code/modules/vore/eating/contaminate_vr.dm +++ b/code/modules/vore/eating/contaminate_vr.dm @@ -35,7 +35,7 @@ var/list/gurgled_overlays = list( gurgled_color = contamination_color if(!isbelly(src.loc)) //Moved non-worn overlay stuff to belly_obj_vr.dm Exited proc. No need to add overlays to things that won't make it out. add_overlay(gurgled_overlays[gurgled_color]) - var/list/pickfrom = contamination_flavors[contamination_flavor] + var/list/pickfrom = GLOB.contamination_flavors[contamination_flavor] var/gurgleflavor = pick(pickfrom) cleanname = src.name cleandesc = src.desc diff --git a/code/modules/vore/eating/leave_remains_vr.dm b/code/modules/vore/eating/leave_remains_vr.dm index 5d39e212cd..4fbb326e33 100644 --- a/code/modules/vore/eating/leave_remains_vr.dm +++ b/code/modules/vore/eating/leave_remains_vr.dm @@ -62,7 +62,7 @@ var/mob/living/carbon/human/H = M - if((H.species.name in remainless_species)) //Don't leave anything if there is nothing to leave + if((H.species.name in GLOB.remainless_species)) //Don't leave anything if there is nothing to leave return if(prob(20) && !H.isSynthetic()) //ribcage surviving whole is some luck //Edit: no robor diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index fb8920753b..6614724620 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -1586,9 +1586,9 @@ var/soundfile if(!RTB.fancy_vore) - soundfile = classic_release_sounds[RTB.release_sound] + soundfile = GLOB.classic_release_sounds[RTB.release_sound] else - soundfile = fancy_release_sounds[RTB.release_sound] + soundfile = GLOB.fancy_release_sounds[RTB.release_sound] if(soundfile) playsound(src, soundfile, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/preference/toggle/eating_noises) diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index c8d1091788..f067b0dfec 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -1444,7 +1444,7 @@ if(isobserver(target)) var/mob/observer/T = target - if(!ismob(T.body_backup) || prevent_respawns.Find(T.mind.name) || ispAI(T.body_backup)) + if(!ismob(T.body_backup) || GLOB.prevent_respawns.Find(T.mind.name) || ispAI(T.body_backup)) to_chat(user,span_warning("They don't seem to be reformable!")) return TRUE @@ -1514,7 +1514,7 @@ announce_ghost_joinleave(T.mind, 0, "They now occupy their body again.") else if(istype(target,/obj/item/mmi)) // A good bit of repeated code, sure, but... cleanest way to do this. var/obj/item/mmi/MMI = target - if(!ismob(MMI.body_backup) || !MMI.brainmob.mind || prevent_respawns.Find(MMI.brainmob.mind.name)) + if(!ismob(MMI.body_backup) || !MMI.brainmob.mind || GLOB.prevent_respawns.Find(MMI.brainmob.mind.name)) to_chat(user,span_warning("They don't seem to be reformable!")) return TRUE var/accepted = tgui_alert(MMI.brainmob, "[host] is trying to reform your body! Would you like to get reformed inside [host]'s [lowertext(host.vore_selected.name)]?", "Reforming Attempt", list("Yes", "No")) @@ -1775,14 +1775,14 @@ host.vore_selected.contaminates = !host.vore_selected.contaminates . = TRUE if("b_contamination_flavor") - var/list/menu_list = contamination_flavors.Copy() + var/list/menu_list = GLOB.contamination_flavors.Copy() var/new_flavor = tgui_input_list(user, "Choose Contamination Flavor Text Type (currently [host.vore_selected.contamination_flavor])", "Flavor Choice", menu_list) if(!new_flavor) return FALSE host.vore_selected.contamination_flavor = new_flavor . = TRUE if("b_contamination_color") - var/list/menu_list = contamination_colors.Copy() + var/list/menu_list = GLOB.contamination_colors.Copy() var/new_color = tgui_input_list(user, "Choose Contamination Color (currently [host.vore_selected.contamination_color])", "Color Choice", menu_list) if(!new_color) return FALSE @@ -1790,7 +1790,7 @@ host.vore_selected.items_preserved.Cut() //To re-contaminate for new color . = TRUE if("b_egg_type") - var/list/menu_list = global_vore_egg_types.Copy() + var/list/menu_list = GLOB.global_vore_egg_types.Copy() var/new_egg_type = tgui_input_list(user, "Choose Egg Type (currently [host.vore_selected.egg_type])", "Egg Choice", menu_list) if(!new_egg_type) return FALSE @@ -2252,9 +2252,9 @@ if("b_release") var/choice if(host.vore_selected.fancy_vore) - choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", fancy_release_sounds) + choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", GLOB.fancy_release_sounds) else - choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", classic_release_sounds) + choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", GLOB.classic_release_sounds) if(!choice) return FALSE @@ -2264,9 +2264,9 @@ if("b_releasesoundtest") var/sound/releasetest if(host.vore_selected.fancy_vore) - releasetest = fancy_release_sounds[host.vore_selected.release_sound] + releasetest = GLOB.fancy_release_sounds[host.vore_selected.release_sound] else - releasetest = classic_release_sounds[host.vore_selected.release_sound] + releasetest = GLOB.classic_release_sounds[host.vore_selected.release_sound] if(releasetest) releasetest = sound(releasetest) @@ -2277,9 +2277,9 @@ if("b_sound") var/choice if(host.vore_selected.fancy_vore) - choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", fancy_vore_sounds) + choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", GLOB.fancy_vore_sounds) else - choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", classic_vore_sounds) + choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", GLOB.classic_vore_sounds) if(!choice) return FALSE @@ -2289,9 +2289,9 @@ if("b_soundtest") var/sound/voretest if(host.vore_selected.fancy_vore) - voretest = fancy_vore_sounds[host.vore_selected.vore_sound] + voretest = GLOB.fancy_vore_sounds[host.vore_selected.vore_sound] else - voretest = classic_vore_sounds[host.vore_selected.vore_sound] + voretest = GLOB.classic_vore_sounds[host.vore_selected.vore_sound] if(voretest) voretest = sound(voretest) voretest.volume = host.vore_selected.sound_volume diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index d364df1b7f..fcdc0a9d58 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -21,9 +21,9 @@ // The reverse lookup of player_sizes_list, number to name. /proc/player_size_name(var/size_multiplier) // (This assumes list is sorted big->small) - for(var/N in player_sizes_list) + for(var/N in GLOB.player_sizes_list) . = N // So we return the smallest if we get to the end - if(size_multiplier >= player_sizes_list[N]) + if(size_multiplier >= GLOB.player_sizes_list[N]) return N /** diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index a2f1ea816d..be51e6f9f4 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -99,7 +99,7 @@ var/list/zs_to_test = using_map.unit_test_z_levels || list(1) //Either you set it, or you just get z1 - for(var/color in possible_cable_coil_colours) + for(var/color in GLOB.possible_cable_coil_colours) cable_turfs = list() for(C in world) @@ -108,7 +108,7 @@ T = get_turf(C) var/area/A = get_area(T) if(T && (T.z in zs_to_test) && !(A.type in exempt_from_wires)) - if(C.color == possible_cable_coil_colours[color]) + if(C.color == GLOB.possible_cable_coil_colours[color]) cable_turfs |= get_turf(C) for(T in cable_turfs) diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index bdd750c155..e697f5d2b4 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -213,8 +213,8 @@ var/list/all_maps = list() /datum/map/proc/get_empty_zlevel() // Try to free up a z level from existing temp sectors if(!empty_levels.len) - for(var/Z in map_sectors) - var/obj/effect/overmap/visitable/sector/temporary/T = map_sectors[Z] + for(var/Z in GLOB.map_sectors) + var/obj/effect/overmap/visitable/sector/temporary/T = GLOB.map_sectors[Z] T.cleanup() // If we can release some of these, do that. // Else, we need to buy a new one.
    #[D.account_number]