From 72628d226c7b9b79386fc035ffb386c11c290be7 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sun, 15 Mar 2026 07:54:17 +0100 Subject: [PATCH] More globals (#19247) * More globals * planets * . * . * Update jukebox.dm * Fix timer callback syntax in jukebox.dm * . --- archive/maps/cynosure/turfs/outdoors.dm | 4 +- archive/maps/southern_cross/turfs/outdoors.dm | 2 +- code/ZAS/Debug.dm | 21 +-- code/__defines/damage_organs.dm | 24 +++ code/__defines/flags.dm | 1 + code/_helpers/global_lists.dm | 19 +- code/_helpers/unsorted.dm | 57 +++--- .../emergency_shuttle_controller.dm | 6 +- code/controllers/master_controller.dm | 3 - code/controllers/subsystems/nightshift.dm | 2 +- code/controllers/subsystems/planets.dm | 2 +- code/controllers/subsystems/ticker.dm | 4 +- code/datums/modules.dm | 12 +- code/datums/outfits/outfit.dm | 25 +-- code/datums/uplink/announcements.dm | 2 +- code/datums/uplink/badassery.dm | 4 +- code/datums/uplink/uplink_items.dm | 6 +- code/defines/procs/announce.dm | 8 +- code/defines/procs/statistics.dm | 4 +- code/game/antagonist/antagonist_place.dm | 4 +- code/game/birthday.dm | 2 +- .../endgame/supermatter_cascade/universe.dm | 4 +- code/game/gamemodes/events.dm | 10 +- code/game/gamemodes/events/clang.dm | 4 +- code/game/gamemodes/events/power_failure.dm | 6 +- code/game/gamemodes/events/wormholes.dm | 2 +- code/game/gamemodes/game_mode.dm | 2 +- .../newmalf_ability_trees/HELPERS.dm | 2 +- .../newmalf_ability_trees/tree_networking.dm | 12 +- code/game/jobs/job/captain.dm | 2 +- code/game/jobs/job/civilian.dm | 2 +- code/game/jobs/job_controller.dm | 12 +- code/game/machinery/air_alarm.dm | 1 + code/game/machinery/computer/camera.dm | 1 + code/game/machinery/door_control.dm | 1 + code/game/machinery/doors/brigdoors.dm | 1 + .../embedded_controller_base.dm | 1 + code/game/machinery/fire_alarm.dm | 1 + code/game/machinery/flasher.dm | 1 + code/game/machinery/frame.dm | 1 + code/game/machinery/jukebox.dm | 3 +- code/game/machinery/lightswitch.dm | 1 + code/game/machinery/newscaster.dm | 1 + code/game/machinery/nuclear_bomb.dm | 4 +- code/game/machinery/requests_console.dm | 1 + code/game/machinery/status_display.dm | 1 + code/game/machinery/supplybeacon.dm | 2 +- code/game/machinery/telecomms/broadcaster.dm | 56 +++--- .../machinery/telecomms/telecomunications.dm | 8 +- code/game/objects/items/devices/e_beacon.dm | 2 +- .../objects/items/devices/radio/intercom.dm | 2 +- .../game/objects/items/devices/radio/radio.dm | 18 +- code/game/objects/items/devices/uplink.dm | 6 +- .../items/devices/uplink_random_lists.dm | 12 +- code/game/objects/items/pizza_voucher_vr.dm | 2 +- code/game/objects/items/stacks/sandbags.dm | 2 +- .../objects/items/weapons/storage/secure.dm | 1 + code/game/objects/structures/extinguisher.dm | 1 + code/game/objects/structures/fireaxe.dm | 1 + code/game/objects/structures/mirror.dm | 1 + code/game/objects/structures/signs.dm | 1 + code/game/turfs/simulated/dungeon/wall.dm | 6 +- code/game/turfs/simulated/floor_icon.dm | 6 +- .../game/turfs/simulated/outdoors/outdoors.dm | 2 +- .../simulated/outdoors/survival_action_vr.dm | 4 +- code/game/turfs/simulated/water.dm | 10 +- code/modules/admin/NewBan.dm | 170 +++++++++--------- code/modules/admin/admin.dm | 20 +-- code/modules/admin/banjob.dm | 32 ++-- code/modules/admin/newbanjob.dm | 126 ++++++------- code/modules/admin/topic.dm | 40 +++-- .../admin/verbs/check_customitem_activity.dm | 18 +- code/modules/admin/verbs/diagnostics.dm | 4 +- code/modules/admin/verbs/randomverbs.dm | 6 +- code/modules/admin/verbs/secrets.dm | 4 +- code/modules/admin/verbs/smite.dm | 22 +-- code/modules/admin/verbs/striketeam.dm | 4 +- code/modules/admin/verbs/trader.dm | 2 +- .../awaymissions/bluespaceartillery.dm | 2 +- .../preference_setup/general/01_basic.dm | 4 +- .../preference_setup/loadout/02_loadout.dm | 18 +- code/modules/client/preferences.dm | 2 +- .../modules/client/preferences_spawnpoints.dm | 13 +- code/modules/client/record_updater.dm | 8 +- code/modules/customitems/item_spawning.dm | 16 +- code/modules/events/atmos_leak.dm | 2 +- code/modules/events/aurora_caelus.dm | 4 +- code/modules/events/brand_intelligence.dm | 2 +- code/modules/events/carp_migration.dm | 2 +- code/modules/events/comms_blackout.dm | 4 +- .../modules/events/communications_blackout.dm | 4 +- code/modules/events/drone_pod_vr.dm | 2 +- code/modules/events/dust.dm | 4 +- code/modules/events/electrical_storm.dm | 6 +- code/modules/events/gnat_migration.dm | 2 +- code/modules/events/gravity.dm | 12 +- code/modules/events/grubinfestation_vr.dm | 4 +- code/modules/events/ian_storm_vr.dm | 4 +- code/modules/events/infestation.dm | 2 +- code/modules/events/ion_storm.dm | 2 +- code/modules/events/jellyfish_migration.dm | 2 +- code/modules/events/meteor_strike_vr.dm | 2 +- code/modules/events/meteors.dm | 8 +- code/modules/events/prison_break.dm | 2 +- code/modules/events/radiation_storm.dm | 6 +- code/modules/events/ray_migration.dm | 2 +- code/modules/events/roaming_wildlife.dm | 2 +- code/modules/events/rogue_drones.dm | 8 +- code/modules/events/shark_migration.dm | 2 +- code/modules/events/solar_storm.dm | 6 +- code/modules/events/spacefish_migration.dm | 2 +- code/modules/events/spider_infestation.dm | 2 +- code/modules/events/supply_demand_vr.dm | 14 +- code/modules/events/wallrot.dm | 2 +- code/modules/flufftext/Dreaming.dm | 10 +- code/modules/food/food/lunch.dm | 53 +++--- .../events/command/manifest_malfunction.dm | 2 +- .../events/engineering/airlock_failure.dm | 2 +- .../event2/events/engineering/blob.dm | 2 +- .../events/engineering/brand_intelligence.dm | 2 +- .../event2/events/engineering/dust.dm | 2 +- .../event2/events/engineering/gas_leak.dm | 2 +- .../events/engineering/meteor_defense.dm | 8 +- .../event2/events/engineering/wallrot.dm | 2 +- .../event2/events/engineering/window_break.dm | 2 +- .../event2/events/everyone/comms_blackout.dm | 6 +- .../events/everyone/electrical_fault.dm | 6 +- .../event2/events/everyone/gravity_vr.dm | 4 +- .../event2/events/everyone/infestation.dm | 2 +- .../event2/events/everyone/radiation_storm.dm | 6 +- .../event2/events/everyone/solar_storm.dm | 6 +- .../events/everyone/sudden_weather_shift.dm | 2 +- .../event2/events/security/carp_migration.dm | 2 +- .../events/security/drill_announcement.dm | 2 +- .../event2/events/security/prison_break.dm | 2 +- .../event2/events/security/rogue_drones.dm | 6 +- .../events/security/security_advisement.dm | 2 +- .../events/security/spider_infestation.dm | 2 +- .../event2/events/synthetic/ion_storm.dm | 2 +- .../modules/hydroponics/beekeeping/beehive.dm | 2 +- code/modules/hydroponics/grown.dm | 14 +- code/modules/icon generation/Uristrunes.dm | 14 +- code/modules/lighting/lighting_fake_sun_vr.dm | 4 +- code/modules/lighting/lighting_turf.dm | 4 +- code/modules/materials/sheets/metals/rods.dm | 2 +- code/modules/media/media_player_vlc.dm | 27 --- code/modules/media/media_player_wmp.dm | 14 -- code/modules/mining/mine_turfs.dm | 8 +- code/modules/mob/_modifiers/horror.dm | 8 +- code/modules/mob/holder.dm | 2 - code/modules/mob/inventory.dm | 38 ++-- code/modules/mob/living/carbon/human/human.dm | 6 +- .../living/carbon/human/human_attackhand.dm | 3 +- .../mob/living/carbon/human/human_defense.dm | 8 +- .../mob/living/carbon/human/human_helpers.dm | 8 +- .../living/carbon/human/human_helpers_vr.dm | 6 +- .../carbon/human/species/lleill/lleill.dm | 18 +- .../human/species/lleill/lleill_abilities.dm | 4 +- .../carbon/human/species/species_helpers.dm | 8 +- .../human/species/species_shapeshift.dm | 28 +-- .../human/species/station/prometheans.dm | 10 +- .../human/species/station/prommie_blob.dm | 2 +- code/modules/mob/living/say.dm | 23 ++- .../mob/living/silicon/pai/software.dm | 2 +- .../mob/living/silicon/robot/drone/drone.dm | 9 +- .../living/simple_mob/subtypes/slime/slime.dm | 6 +- code/modules/mob/mob_helpers.dm | 38 ++-- .../mob/new_player/preferences_setup.dm | 2 +- code/modules/mob/say.dm | 2 +- .../NTNet/NTNRC/conversation.dm | 6 +- .../programs/security/digitalwarrant.dm | 5 +- .../hardware/network_card.dm | 6 +- code/modules/multiz/basic.dm | 16 +- code/modules/nifsoft/software/10_combat.dm | 2 +- code/modules/organs/data.dm | 11 +- code/modules/organs/organ.dm | 2 - code/modules/organs/robolimbs.dm | 37 +--- code/modules/overmap/sectors.dm | 4 +- code/modules/overmap/ships/engines/engine.dm | 6 +- code/modules/overmap/ships/ship.dm | 2 +- code/modules/paperwork/faxmachine.dm | 12 +- code/modules/persistence/noticeboard.dm | 1 + code/modules/planet/sif.dm | 8 +- code/modules/planet/virgo3b_vr.dm | 4 +- code/modules/planet/virgo3c_vr.dm | 4 +- code/modules/planet/virgo4_vr.dm | 4 +- code/modules/power/apc.dm | 1 + code/modules/power/generator.dm | 2 +- code/modules/power/grid_checker.dm | 4 +- code/modules/power/profiling.dm | 26 +-- .../machinery/dispenser/reagent_tank.dm | 1 + code/modules/research/message_server.dm | 33 ++-- code/modules/resleeving/sleevecard.dm | 2 +- code/modules/rogueminer_vr/asteroid.dm | 12 +- code/modules/rogueminer_vr/controller.dm | 22 +-- code/modules/rogueminer_vr/debug.dm | 2 +- code/modules/rogueminer_vr/zone_console.dm | 24 +-- code/modules/rogueminer_vr/zonemaster.dm | 110 ++++++------ .../security levels/keycard authentication.dm | 1 + code/modules/shuttles/crashes.dm | 2 +- code/modules/shuttles/shuttle_emergency.dm | 4 +- code/modules/shuttles/shuttles_multi.dm | 4 +- code/modules/shuttles/web_datums.dm | 4 +- code/modules/tables/tables.dm | 6 +- .../tgui/modules/appearance_changer.dm | 2 +- maps/tether/tether_things.dm | 2 +- maps/tether/tether_turfs.dm | 8 +- maps/virgo_minitest/virgo_minitest_defines.dm | 7 + maps/~map_system/maps.dm | 4 +- vorestation.dme | 2 - 210 files changed, 941 insertions(+), 990 deletions(-) delete mode 100644 code/modules/media/media_player_vlc.dm delete mode 100644 code/modules/media/media_player_wmp.dm diff --git a/archive/maps/cynosure/turfs/outdoors.dm b/archive/maps/cynosure/turfs/outdoors.dm index 805539899d..3e806f14c9 100644 --- a/archive/maps/cynosure/turfs/outdoors.dm +++ b/archive/maps/cynosure/turfs/outdoors.dm @@ -172,7 +172,7 @@ // Step trigger to fall down to planet Sif /obj/effect/step_trigger/teleporter/planetary_fall/sif/find_planet() - planet = planet_sif + planet = GLOB.planet_sif /turf/simulated/floor/concrete/sif/planetuse oxygen = MOLES_O2SIF @@ -181,4 +181,4 @@ outdoors = OUTDOORS_YES /turf/simulated/sky/moving/north/sif/planet_fall/find_planet() - return planet_sif + return GLOB.planet_sif diff --git a/archive/maps/southern_cross/turfs/outdoors.dm b/archive/maps/southern_cross/turfs/outdoors.dm index a31e008d11..98405121c8 100644 --- a/archive/maps/southern_cross/turfs/outdoors.dm +++ b/archive/maps/southern_cross/turfs/outdoors.dm @@ -162,4 +162,4 @@ // Step trigger to fall down to planet Sif /obj/effect/step_trigger/teleporter/planetary_fall/sif/find_planet() - planet = planet_sif + planet = GLOB.planet_sif diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm index fb49366c76..12ab449d6e 100644 --- a/code/ZAS/Debug.dm +++ b/code/ZAS/Debug.dm @@ -1,13 +1,13 @@ -var/image/assigned = image('icons/Testing/Zone.dmi', icon_state = "assigned") -var/image/created = image('icons/Testing/Zone.dmi', icon_state = "created") -var/image/merged = image('icons/Testing/Zone.dmi', icon_state = "merged") -var/image/invalid_zone = image('icons/Testing/Zone.dmi', icon_state = "invalid") -var/image/air_blocked = image('icons/Testing/Zone.dmi', icon_state = "block") -var/image/zone_blocked = image('icons/Testing/Zone.dmi', icon_state = "zoneblock") -var/image/blocked = image('icons/Testing/Zone.dmi', icon_state = "fullblock") -var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark") +GLOBAL_DATUM_INIT(assigned, /image, image('icons/Testing/Zone.dmi', icon_state = "assigned")) +GLOBAL_DATUM_INIT(created, /image, image('icons/Testing/Zone.dmi', icon_state = "created")) +GLOBAL_DATUM_INIT(merged, /image, image('icons/Testing/Zone.dmi', icon_state = "merged")) +GLOBAL_DATUM_INIT(invalid_zone, /image, image('icons/Testing/Zone.dmi', icon_state = "invalid")) +GLOBAL_DATUM_INIT(air_blocked, /image, image('icons/Testing/Zone.dmi', icon_state = "block")) +GLOBAL_DATUM_INIT(zone_blocked, /image, image('icons/Testing/Zone.dmi', icon_state = "zoneblock")) +GLOBAL_DATUM_INIT(blocked, /image, image('icons/Testing/Zone.dmi', icon_state = "fullblock")) +GLOBAL_DATUM_INIT(mark, /image, image('icons/Testing/Zone.dmi', icon_state = "mark")) -/connection_edge/var/dbg_out = 0 +/datum/connection_edge/var/dbg_out = 0 /turf/var/tmp/dbg_img /turf/proc/dbg(image/img, d = 0) @@ -17,4 +17,5 @@ var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark") dbg_img = img /proc/soft_assert(thing,fail) - if(!thing) message_admins(fail) + if(!thing) + message_admins(fail) diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index df33e9d1ac..3fa18541f6 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -87,3 +87,27 @@ lowpower=cyber_lowpower;\ idle=cyber_idle;\ nwn=cyber_nwn" + +//Ending a monitor style with [-colored] will override eye coloration. If you have custom colors on a monitor icon, you should do this. +#define STANDARD_MONITOR_STYLES "blank=ipc_blank;\ + pink=ipc_pink-colored;\ + green=ipc_green-colored;\ + red=ipc_red-colored;\ + blue=ipc_blue-colored;\ + shower=ipc_shower-colored;\ + orange=ipc_orange-colored;\ + nature=ipc_nature-colored;\ + eight=ipc_eight-colored;\ + goggles=ipc_goggles-colored;\ + heart=ipc_heart-colored;\ + monoeye=ipc_monoeye-colored;\ + breakout=ipc_breakoutv-colored;\ + yellow=ipc_yellow-colored;\ + static=ipc_static-colored;\ + purple=ipc_purple-colored;\ + scroll=ipc_scroll;\ + console=ipc_console;\ + glider=ipc_gol_glider;\ + rainbow=ipc_rainbow-colored;\ + smiley=ipc_smiley-colored;\ + database=ipc_database-colored" diff --git a/code/__defines/flags.dm b/code/__defines/flags.dm index 6a3e6e1ce3..3960b7c7e5 100644 --- a/code/__defines/flags.dm +++ b/code/__defines/flags.dm @@ -36,6 +36,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define OVERLAY_QUEUED (1<<7)// Atom queued to SSoverlay for COMPILE_OVERLAYS #define IS_BUSY (1<<8) // Atom has a TASK_TARGET_EXCLUSIVE do_after with it as the target. #define REMOTEVIEW_ON_ENTER (1<<9) // Object starts a remoteview of itself for any mob that enters it with a client. Items will automatically handle their own remoteview, and ignore this. +#define WALL_ITEM (1<<10) // Wall mounted objects #define ATOM_INITIALIZED (1<<23) // Atom has been initialized. Using a flag instead of a variable saves ~25mb total. //Flags for items (equipment) - Used in /obj/item/var/item_flags diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 106053b432..0a81c67dea 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -630,21 +630,20 @@ GLOBAL_LIST_INIT(all_technomancer_gambit_spells, typesof(/obj/item/spell) - list /obj/item/spell/summon, /obj/item/spell/modifier)) -var/global/list/obj/machinery/telecomms/telecomms_list = list() +GLOBAL_LIST_EMPTY_TYPED(telecomms_list, /obj/machinery/telecomms) // color-dir-dry -var/global/list/image/fluidtrack_cache=list() +GLOBAL_LIST_EMPTY_TYPED(fluidtrack_cache, /image) -var/global/list/datum/stack_recipe/sandbag_recipes = list( \ - new/datum/stack_recipe("barricade", /obj/structure/barricade/sandbag, 3, time = 5 SECONDS, one_per_turf = 1, on_floor = 1, pass_stack_color = TRUE)) +GLOBAL_LIST_INIT_TYPED(sandbag_recipes, /datum/stack_recipe, list( \ + new/datum/stack_recipe("barricade", /obj/structure/barricade/sandbag, 3, time = 5 SECONDS, one_per_turf = 1, on_floor = 1, pass_stack_color = TRUE))) -var/global/list/datum/stack_recipe/wax_recipes = list( \ - new/datum/stack_recipe("candle", /obj/item/flame/candle) \ -) -var/global/list/datum/stack_recipe/rods_recipes = list( \ +GLOBAL_LIST_INIT_TYPED(wax_recipes, /datum/stack_recipe, list( \ + new/datum/stack_recipe("candle", /obj/item/flame/candle))) + +GLOBAL_LIST_INIT_TYPED(rods_recipes, /datum/stack_recipe, list( \ new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 0), - new/datum/stack_recipe("catwalk", /obj/structure/catwalk, 2, time = 80, one_per_turf = 1, on_floor = 1)) - + new/datum/stack_recipe("catwalk", /obj/structure/catwalk, 2, time = 80, one_per_turf = 1, on_floor = 1))) GLOBAL_LIST_INIT(possible_plants, list( "plant-1", diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 94eaeecbad..87af9ad301 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1106,49 +1106,34 @@ GLOBAL_LIST_INIT(common_tools, list( /proc/reverse_direction(dir) return GLOB.reverse_dir[dir] -/* -Checks if that loc and dir has a item on the wall -TODO - Fix this ancient list of wall items. Preferably make it dynamically populated. ~Leshana -*/ -var/list/WALLITEMS = list( - /obj/machinery/power/apc, /obj/machinery/alarm, /obj/item/radio/intercom, /obj/structure/frame, - /obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank, - /obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign, - /obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/button/remote, - /obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio, - /obj/item/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth, - /obj/structure/mirror, /obj/structure/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment - ) /proc/gotwallitem(loc, dir) for(var/obj/O in loc) - for(var/item in WALLITEMS) - if(istype(O, item)) - //Direction works sometimes - if(O.dir == dir) - return 1 + if(O.flags & WALL_ITEM) + //Direction works sometimes + if(O.dir == dir) + return 1 - //Some stuff doesn't use dir properly, so we need to check pixel instead - switch(dir) - if(SOUTH) - if(O.pixel_y > 10) - return 1 - if(NORTH) - if(O.pixel_y < -10) - return 1 - if(WEST) - if(O.pixel_x > 10) - return 1 - if(EAST) - if(O.pixel_x < -10) - return 1 + //Some stuff doesn't use dir properly, so we need to check pixel instead + switch(dir) + if(SOUTH) + if(O.pixel_y > 10) + return 1 + if(NORTH) + if(O.pixel_y < -10) + return 1 + if(WEST) + if(O.pixel_x > 10) + return 1 + if(EAST) + if(O.pixel_x < -10) + return 1 //Some stuff is placed directly on the wallturf (signs) for(var/obj/O in get_step(loc, dir)) - for(var/item in WALLITEMS) - if(istype(O, item)) - if(O.pixel_x == 0 && O.pixel_y == 0) - return 1 + if(O.flags & WALL_ITEM) + if(O.pixel_x == 0 && O.pixel_y == 0) + return 1 return 0 /proc/topic_link(var/datum/D, var/arglist, var/content) diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 7b7985344b..81d7acb0f4 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -59,7 +59,7 @@ if (evac) emergency_shuttle_docked.Announce(replacetext(replacetext(using_map.emergency_shuttle_docked_message, "%dock_name%", "[using_map.dock_name]"), "%ETD%", "[estimated_time] minute\s")) else - priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_docked_message, "%dock_name%", "[using_map.dock_name]"), "%ETD%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramarrived.ogg') //VOREStation Edit - TTS + GLOB.priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_docked_message, "%dock_name%", "[using_map.dock_name]"), "%ETD%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramarrived.ogg') //VOREStation Edit - TTS //arm the escape pods if (evac) @@ -116,7 +116,7 @@ shuttle.move_time = SHUTTLE_TRANSIT_DURATION var/estimated_time = round(estimate_arrival_time()/60,1) - priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_called_message, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramcalled.ogg') + GLOB.priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_called_message, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramcalled.ogg') SSatc.shift_ending() //recalls the shuttle @@ -134,7 +134,7 @@ A.readyreset() evac = 0 else - priority_announcement.Announce(using_map.shuttle_recall_message) + GLOB.priority_announcement.Announce(using_map.shuttle_recall_message) /datum/emergency_shuttle_controller/proc/can_call() if (!GLOB.universe.OnShuttleCall(null)) diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 9478652cc0..53b1ebe391 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -48,6 +48,3 @@ GLOBAL_DATUM(master_controller, /datum/controller/game_controller) //Set in worl /datum/controller/game_controller/proc/setup_objects() // Set up antagonists. populate_antag_type_list() - - //Set up spawn points. - populate_spawn_points() diff --git a/code/controllers/subsystems/nightshift.dm b/code/controllers/subsystems/nightshift.dm index f3688bfff8..f7b6e55b0e 100644 --- a/code/controllers/subsystems/nightshift.dm +++ b/code/controllers/subsystems/nightshift.dm @@ -35,7 +35,7 @@ SUBSYSTEM_DEF(nightshift) pickedsound = 'sound/AI/dim_lights.ogg' else pickedsound = 'sound/AI/bright_lights.ogg' - priority_announcement.Announce(message, new_title = "Automated Lighting System Announcement", new_sound = pickedsound, zlevel = announce_z) + GLOB.priority_announcement.Announce(message, new_title = "Automated Lighting System Announcement", new_sound = pickedsound, zlevel = announce_z) /datum/controller/subsystem/nightshift/proc/check_nightshift(forced) //This is called from elsewhere, like setting the alert levels, sadly var/emergency = GLOB.security_level > SEC_LEVEL_GREEN diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm index 18ae51f963..d8aca54922 100644 --- a/code/controllers/subsystems/planets.dm +++ b/code/controllers/subsystems/planets.dm @@ -25,7 +25,7 @@ SUBSYSTEM_DEF(planets) var/list/planet_datums = using_map.planet_datums_to_make for(var/P in planet_datums) var/datum/planet/NP = new P() - planets.Add(NP) + planets += NP for(var/index in 1 to length(NP.expected_z_levels)) var/Z = NP.expected_z_levels[index] if(!isnum(Z)) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 9b2a617fad..5c4ac03563 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -354,8 +354,8 @@ SUBSYSTEM_DEF(ticker) feedback_set_details("end_proper", "proper completion") restart_timeleft = restart_timeout - if(blackbox) - blackbox.save_all_data_to_sql() // TODO - Blackbox or statistics subsystem + if(GLOB.blackbox) + GLOB.blackbox.save_all_data_to_sql() // TODO - Blackbox or statistics subsystem end_game_state = END_GAME_ENDING return diff --git a/code/datums/modules.dm b/code/datums/modules.dm index a8458c5c5a..594b61a6e7 100644 --- a/code/datums/modules.dm +++ b/code/datums/modules.dm @@ -13,8 +13,8 @@ var/list/modcount = list() // assoc list of the count of modules for a type -var/list/modules = list( // global associative list -"/obj/machinery/power/apc" = "card_reader,power_control,id_auth,cell_power,cell_charge") +GLOBAL_LIST_INIT(modules, list( \ +"/obj/machinery/power/apc" = "card_reader,power_control,id_auth,cell_power,cell_charge")) // global associative list /datum/module/New(var/obj/O) @@ -32,18 +32,18 @@ var/list/modules = list( // global associative list installed = needed /datum/moduletypes/proc/addmod(var/type, var/modtextlist) - modules += type // index by type text - modules[type] = modtextlist + GLOB.modules += type // index by type text + GLOB.modules[type] = modtextlist /datum/moduletypes/proc/inmodlist(var/type) - return ("[type]" in modules) + return ("[type]" in GLOB.modules) /datum/moduletypes/proc/getbitmask(var/type) var/count = modcount["[type]"] if(count) return 2**count-1 - var/modtext = modules["[type]"] + var/modtext = GLOB.modules["[type]"] var/num = 1 var/pos = 1 diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 1c8f686615..f10e6b2fdb 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -1,23 +1,12 @@ -var/list/outfits_decls_ -var/list/outfits_decls_root_ -var/list/outfits_decls_by_type_ +GLOBAL_LIST_EMPTY(outfits_decls) +GLOBAL_LIST_EMPTY(outfits_decls_by_type) +GLOBAL_DATUM_INIT(outfits_decls_root, /datum/decl/hierarchy/outfit, new) // Rewuires the above lists /proc/outfit_by_type(var/outfit_type) - if(!outfits_decls_root_) - init_outfit_decls() - return outfits_decls_by_type_[outfit_type] + return GLOB.outfits_decls_by_type[outfit_type] /proc/outfits() - if(!outfits_decls_root_) - init_outfit_decls() - return outfits_decls_ - -/proc/init_outfit_decls() - if(outfits_decls_root_) - return - outfits_decls_ = list() - outfits_decls_by_type_ = list() - outfits_decls_root_ = new /datum/decl/hierarchy/outfit() + return GLOB.outfits_decls /datum/decl/hierarchy/outfit name = "Naked" @@ -72,8 +61,8 @@ var/list/outfits_decls_by_type_ if(is_hidden_category()) return - outfits_decls_by_type_[type] = src - dd_insertObjectList(outfits_decls_, src) + GLOB.outfits_decls_by_type[type] = src + dd_insertObjectList(GLOB.outfits_decls, src) /datum/decl/hierarchy/outfit/proc/pre_equip(mob/living/carbon/human/H) switch(H.headset) diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm index a817e00da1..ac386caac6 100644 --- a/code/datums/uplink/announcements.dm +++ b/code/datums/uplink/announcements.dm @@ -26,7 +26,7 @@ /datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/uplink/U, var/location, var/mob/user, var/list/arguments) post_comm_message(arguments["title"], replacetext(arguments["message"], "\n", "
")) - command_announcement.Announce(arguments["message"], arguments["title"]) + GLOB.command_announcement.Announce(arguments["message"], arguments["title"]) return 1 /datum/uplink_item/abstract/announcements/fake_crew_arrival diff --git a/code/datums/uplink/badassery.dm b/code/datums/uplink/badassery.dm index e73a921dbc..e89a99165d 100644 --- a/code/datums/uplink/badassery.dm +++ b/code/datums/uplink/badassery.dm @@ -22,11 +22,11 @@ desc = "Buys you one random item." /datum/uplink_item/item/badassery/random_one/buy(var/obj/item/uplink/U, var/mob/user) - var/datum/uplink_item/item = default_uplink_selection.get_random_item((user ? user.mind.tcrystals : DEFAULT_TELECRYSTAL_AMOUNT), U) + var/datum/uplink_item/item = GLOB.default_uplink_selection.get_random_item((user ? user.mind.tcrystals : DEFAULT_TELECRYSTAL_AMOUNT), U) return item.buy(U, user) /datum/uplink_item/item/badassery/random_one/can_buy(var/obj/item/uplink/U, var/telecrystals) - return default_uplink_selection.get_random_item(telecrystals, U) != null + return GLOB.default_uplink_selection.get_random_item(telecrystals, U) != null /datum/uplink_item/item/badassery/random_many name = "Random Items" diff --git a/code/datums/uplink/uplink_items.dm b/code/datums/uplink/uplink_items.dm index cf4dfea459..c7b6e5874c 100644 --- a/code/datums/uplink/uplink_items.dm +++ b/code/datums/uplink/uplink_items.dm @@ -1,4 +1,4 @@ -var/datum/uplink/uplink = new() +GLOBAL_DATUM_INIT(uplink, /datum/uplink, new) /datum/uplink var/list/items_assoc @@ -182,7 +182,7 @@ var/datum/uplink/uplink = new() /proc/get_random_uplink_items(var/obj/item/uplink/U, var/remaining_TC, var/location) var/list/bought_items = list() while(remaining_TC) - var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items) + var/datum/uplink_item/I = GLOB.default_uplink_selection.get_random_item(remaining_TC, U, bought_items) if(!I) break bought_items += I @@ -194,7 +194,7 @@ var/datum/uplink/uplink = new() var/list/bought_items = list() var/override = TRUE while(remaining_TC) - var/datum/uplink_item/I = all_uplink_selection.get_random_item(remaining_TC, U, bought_items, override) + var/datum/uplink_item/I = GLOB.all_uplink_selection.get_random_item(remaining_TC, U, bought_items, override) if(!I) break bought_items += I diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 18a5bd57e5..0e72a2d994 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -1,7 +1,7 @@ //VOREStation Edit - Most of this file has been changed to use the Eris-style PA announcements. //You'll need to compare externally, or use your best judgement when merging. -/var/datum/announcement/priority/priority_announcement = new(do_log = 0) -/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1) +GLOBAL_DATUM_INIT(priority_announcement, /datum/announcement/priority, new(do_log = 0)) +GLOBAL_DATUM_INIT(command_announcement, /datum/announcement/priority/command, new(do_log = 0, do_newscast = 1)) /datum/announcement var/title = "Attention" @@ -136,10 +136,10 @@ return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name /proc/level_seven_announcement() - command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard \the [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') + GLOB.command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard \the [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') /proc/ion_storm_announcement() - command_announcement.Announce("It has come to our attention that \the [station_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") + GLOB.command_announcement.Announce("It has come to our attention that \the [station_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") /proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message, var/channel = "Common", var/zlevel) if (SSticker.current_state == GAME_STATE_PLAYING) diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm index bab8355f5c..9ac4c420cc 100644 --- a/code/defines/procs/statistics.dm +++ b/code/defines/procs/statistics.dm @@ -36,12 +36,12 @@ //This proc is used for feedback. It is executed at round end. /proc/sql_commit_feedback() - if(!blackbox) + if(!GLOB.blackbox) log_game("Round ended without a blackbox recorder. No feedback was sent to the database.") return //content is a list of lists. Each item in the list is a list with two fields, a variable name and a value. Items MUST only have these two values. - var/list/datum/feedback_variable/content = blackbox.get_round_feedback() + var/list/datum/feedback_variable/content = GLOB.blackbox.get_round_feedback() if(!content) log_game("Round ended without any feedback being generated. No feedback was sent to the database.") diff --git a/code/game/antagonist/antagonist_place.dm b/code/game/antagonist/antagonist_place.dm index 33a99a3e55..99ba23b612 100644 --- a/code/game/antagonist/antagonist_place.dm +++ b/code/game/antagonist/antagonist_place.dm @@ -15,9 +15,9 @@ if(spawn_announcement_delay) sleep(spawn_announcement_delay) if(spawn_announcement_sound) - command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]", new_sound = spawn_announcement_sound) + GLOB.command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]", new_sound = spawn_announcement_sound) else - command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]") + GLOB.command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]") return /datum/antagonist/proc/place_mob(var/mob/living/mob) diff --git a/code/game/birthday.dm b/code/game/birthday.dm index e5590bd1a3..8a8ee60289 100644 --- a/code/game/birthday.dm +++ b/code/game/birthday.dm @@ -24,7 +24,7 @@ if(read_preference(/datum/preference/toggle/human/bday_announce)) var/list/sounds = list('sound/voice/birth.ogg') var/oursound = pickweight(sounds) - command_announcement.Announce("Confirmed presence of BIRTHDAY aboard the station! It is [src.real_name]'s birthday or similar sort of celebration, name day, hatchday, WHATEVER! We encourage you to go find [src.real_name] and show them how we celebrate around here! Have a secure day!", "BIRTHDAY!", oursound) + GLOB.command_announcement.Announce("Confirmed presence of BIRTHDAY aboard the station! It is [src.real_name]'s birthday or similar sort of celebration, name day, hatchday, WHATEVER! We encourage you to go find [src.real_name] and show them how we celebrate around here! Have a secure day!", "BIRTHDAY!", oursound) else msg = "Your birthday has passed! Do you want to increase your character's listed age?" //sad, but thus is the life of an adult if(tgui_alert(src, msg,"BIRTHDAY! ([read_preference(/datum/preference/numeric/human/bday_month)]/[read_preference(/datum/preference/numeric/human/bday_day)])",list("Level me up, baby","No way, I'mma stay young forever")) == "Level me up, baby") diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 15ed5a3ce5..bcaffc2c32 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -45,7 +45,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) M.flash_eyes() if(GLOB.emergency_shuttle.can_recall()) - priority_announcement.Announce("The emergency shuttle has returned due to bluespace distortion.") + GLOB.priority_announcement.Announce("The emergency shuttle has returned due to bluespace distortion.") GLOB.emergency_shuttle.recall() AreaSet() @@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) The access requirements on the Asteroid Shuttles' consoles have now been revoked. "} - priority_announcement.Announce(txt,"SUPERMATTER CASCADE DETECTED") + GLOB.priority_announcement.Announce(txt,"SUPERMATTER CASCADE DETECTED") for(var/obj/machinery/computer/shuttle_control/C in GLOB.machines) if(istype(C, /obj/machinery/computer/shuttle_control/research) || istype(C, /obj/machinery/computer/shuttle_control/mining)) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 473508468c..f510ef3241 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -131,7 +131,7 @@ GLOBAL_VAR_INIT(hadevent, 0) spawncount-- spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes. - command_announcement.Announce("Unidentified lifesigns detected coming aboard \the [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') + GLOB.command_announcement.Announce("Unidentified lifesigns detected coming aboard \the [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /proc/high_radiation_event() @@ -161,7 +161,7 @@ GLOBAL_VAR_INIT(hadevent, 0) domutcheck(H,null,MUTCHK_FORCED) H.UpdateAppearance() sleep(100) - command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') + GLOB.command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') @@ -200,7 +200,7 @@ GLOBAL_VAR_INIT(hadevent, 0) temp_timer.timer_duration = 1 sleep(150) - command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") + GLOB.command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") else log_world("ERROR: Could not initate grey-tide. Unable find prison or brig area.") @@ -210,11 +210,11 @@ GLOBAL_VAR_INIT(hadevent, 0) new /mob/living/simple_mob/animal/space/carp(C.loc) //sleep(100) spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes. - command_announcement.Announce("Unknown biological entities have been detected near \the [station_name()], please stand-by.", "Lifesign Alert", new_sound = 'sound/AI/commandreport.ogg') + GLOB.command_announcement.Announce("Unknown biological entities have been detected near \the [station_name()], please stand-by.", "Lifesign Alert", new_sound = 'sound/AI/commandreport.ogg') /proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights if(isEvent) - command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") + GLOB.command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") if(lightsoutAmount) var/list/epicentreList = list() diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index 46aac26401..3e43aa761f 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -4,12 +4,12 @@ endWhen = 35 /datum/event/clang/announce() - command_announcement.Announce("Attention [station_name()]. Unknown ultra-dense high-velocity object entering stratosphere!", "General Alert") + GLOB.command_announcement.Announce("Attention [station_name()]. Unknown ultra-dense high-velocity object entering stratosphere!", "General Alert") if(seclevel2num(get_security_level()) < SEC_LEVEL_BLUE) set_security_level(SEC_LEVEL_BLUE) // OHNO /datum/event/clang/end() - command_announcement.Announce("What the fuck was that?!", "General Alert") + GLOB.command_announcement.Announce("What the fuck was that?!", "General Alert") /datum/event/clang/start() affecting_z = global.using_map.station_levels diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm index bc01308fce..d9b93851e5 100644 --- a/code/game/gamemodes/events/power_failure.dm +++ b/code/game/gamemodes/events/power_failure.dm @@ -1,7 +1,7 @@ /proc/power_failure(var/announce = 1) if(announce) - command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg') + GLOB.command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg') var/list/skipped_areas = list(/area/ai) @@ -27,7 +27,7 @@ var/list/skipped_areas = list(/area/ai) if(announce) - command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') + GLOB.command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/apc/C in GLOB.apcs) if(C.cell && (C.z in using_map.station_levels)) C.cell.charge = C.cell.maxcharge @@ -44,7 +44,7 @@ /proc/power_restore_quick(var/announce = 1) if(announce) - command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') + GLOB.command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/smes/S in GLOB.smeses) if(isNotStationLevel(S.z)) continue diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm index 65b21df2ea..aa05a456b3 100644 --- a/code/game/gamemodes/events/wormholes.dm +++ b/code/game/gamemodes/events/wormholes.dm @@ -14,7 +14,7 @@ var/wormhole_min_duration = round((30 SECONDS) * wormhole_duration_modifier) //All ready. Announce that bad juju is afoot. - command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg') + GLOB.command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg') //prob(20) can be approximated to 1 wormhole every 5 turfs! //admittedly less random but totally worth it >_< diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 55292cf79d..b7c7063ce2 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -264,7 +264,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) "radical Skrellian transevolutionaries", "classified security operations" ) - command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time, and post-evacuation recovery efforts will be substantially delayed.","Emergency Transmission") + GLOB.command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time, and post-evacuation recovery efforts will be substantially delayed.","Emergency Transmission") /datum/game_mode/proc/check_finished() if(GLOB.emergency_shuttle.returned() || station_was_nuked) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index 466ef0ced5..e46fec21b5 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -162,7 +162,7 @@ else fulltext = "Another hack attempt has been detected, targeting [text]. The source still seems to be your AI system." - command_announcement.Announce(fulltext) + GLOB.command_announcement.Announce(fulltext) // Proc: get_unhacked_apcs() // Parameters: None diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm index 65a86da317..ab84d16a82 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm @@ -160,21 +160,21 @@ sleep(duration/5) if(!user || user.stat == DEAD) return - command_announcement.Announce("Caution, [station_name()]. We have detected abnormal behaviour in your network. It seems someone is trying to hack your electronic systems. We will update you when we have more information.", "Network Monitoring") + GLOB.command_announcement.Announce("Caution, [station_name()]. We have detected abnormal behaviour in your network. It seems someone is trying to hack your electronic systems. We will update you when we have more information.", "Network Monitoring") sleep(duration/5) if(!user || user.stat == DEAD) return - command_announcement.Announce("We started tracing the intruder. Whoever is doing this, they seem to be on the station itself. We suggest checking all network control terminals. We will keep you updated on the situation.", "Network Monitoring") + GLOB.command_announcement.Announce("We started tracing the intruder. Whoever is doing this, they seem to be on the station itself. We suggest checking all network control terminals. We will keep you updated on the situation.", "Network Monitoring") sleep(duration/5) if(!user || user.stat == DEAD) return - command_announcement.Announce("This is highly abnormal and somewhat concerning. The intruder is too fast, he is evading our traces. No man could be this fast...", "Network Monitoring") + GLOB.command_announcement.Announce("This is highly abnormal and somewhat concerning. The intruder is too fast, he is evading our traces. No man could be this fast...", "Network Monitoring") sleep(duration/5) if(!user || user.stat == DEAD) return - command_announcement.Announce("We have traced the intrude#, it seem& t( e yo3r AI s7stem, it &# *#ck@ng th$ sel$ destru$t mechani&m, stop i# bef*@!)$#&&@@ ", "Network Monitoring") + GLOB.command_announcement.Announce("We have traced the intrude#, it seem& t( e yo3r AI s7stem, it &# *#ck@ng th$ sel$ destru$t mechani&m, stop i# bef*@!)$#&&@@ ", "Network Monitoring") else - command_announcement.Announce("We have detected a strong brute-force attack on your firewall which seems to be originating from your AI system. It already controls almost the whole network, and the only thing that's preventing it from accessing the self-destruct is this firewall. You don't have much time before it succeeds.", "Network Monitoring") + GLOB.command_announcement.Announce("We have detected a strong brute-force attack on your firewall which seems to be originating from your AI system. It already controls almost the whole network, and the only thing that's preventing it from accessing the self-destruct is this firewall. You don't have much time before it succeeds.", "Network Monitoring") to_chat(user, "## BEGINNING SYSTEM OVERRIDE.") to_chat(user, "## ESTIMATED DURATION: [round((duration+300)/600)] MINUTES") user.hacking = 1 @@ -199,7 +199,7 @@ to_chat(user, "## PRIMARY FIREWALL BYPASSED. YOU NOW HAVE FULL SYSTEM CONTROL.") - command_announcement.Announce("Our system administrators just reported that we've been locked out from your control network. Whoever did this now has full access to the station's systems.", "Network Administration Center") + GLOB.command_announcement.Announce("Our system administrators just reported that we've been locked out from your control network. Whoever did this now has full access to the station's systems.", "Network Administration Center") user.hack_can_fail = 0 user.hacking = 0 user.system_override = 2 diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index cc6a37cb2b..8fa0d6cdc7 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -1,4 +1,4 @@ -var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) +GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newscast = 1)) ////////////////////////////////// // Captain diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index bdbea93cea..e5ed62022e 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -220,7 +220,7 @@ // Internal Affairs Agent ////////////////////////////////// -//var/global/lawyer = 0//Checks for another lawyer //This changed clothes on 2nd lawyer, both IA get the same dreds. +// var/global/lawyer = 0//Checks for another lawyer //This changed clothes on 2nd lawyer, both IA get the same dreds. /datum/job/lawyer title = JOB_INTERNAL_AFFAIRS_AGENT flag = LAWYER diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 761d6b5904..a0e09aa9de 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -392,7 +392,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) if(H?.client?.prefs && !(job.mob_type & JOB_SILICON)) var/list/active_gear_list = LAZYACCESS(H.client.prefs.gear_list, "[H.client.prefs.gear_slot]") for(var/thing in active_gear_list) - var/datum/gear/G = gear_datums[thing] + var/datum/gear/G = GLOB.gear_datums[thing] if(!G) //Not a real gear datum (maybe removed, as this is loaded from their savefile) continue @@ -456,7 +456,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) // If some custom items could not be equipped before, try again now. for(var/thing in custom_equip_leftovers) - var/datum/gear/G = gear_datums[thing] + var/datum/gear/G = GLOB.gear_datums[thing] if(G.slot == slot_wear_suit && H.client?.prefs?.no_jacket) continue if(G.slot == slot_shoes && H.client?.prefs?.shoe_hater) //RS ADD @@ -508,7 +508,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) // TWEET PEEP if(rank == JOB_SITE_MANAGER && announce) var/sound/announce_sound = (SSticker.current_state <= GAME_STATE_SETTING_UP) ? null : sound('sound/misc/boatswain.ogg', volume=20) - captain_announcement.Announce("All hands, [alt_title ? alt_title : JOB_SITE_MANAGER] [H.real_name] on deck!", new_sound = announce_sound, zlevel = H.z) + GLOB.captain_announcement.Announce("All hands, [alt_title ? alt_title : JOB_SITE_MANAGER] [H.real_name] on deck!", new_sound = announce_sound, zlevel = H.z) //Deferred item spawning. if(spawn_in_storage && spawn_in_storage.len) @@ -521,7 +521,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) if(!isnull(B)) for(var/thing in spawn_in_storage) to_chat(H, span_notice("Placing \the [thing] in your [B.name]!")) - var/datum/gear/G = gear_datums[thing] + var/datum/gear/G = GLOB.gear_datums[thing] var/metadata = active_gear_list[G.display_name] G.spawn_item(B, metadata) else @@ -766,7 +766,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) else to_chat(C, span_warning("No predators were available to accept you.")) return - spawnpos = spawntypes[C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)] + spawnpos = GLOB.spawntypes[C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)] if(C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint) == "Vorespawn - Pred") //Same as above, but in reverse! var/list/preys = list() var/list/prey_names = list() //This is still cringe @@ -946,7 +946,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) to_chat(C, span_warning("Your chosen spawnpoint ([C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)]) is unavailable for the current map. Spawning you at one of the enabled spawn points instead.")) spawnpos = null else - spawnpos = spawntypes[C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)] + spawnpos = GLOB.spawntypes[C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)] //We will return a list key'd by "turf" and "msg" . = list("turf","msg", "voreny", "prey", "itemtf", "vorgans", "carrier") // Item TF spawnpoints, spawn as mob diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm index 482204e5f3..b9451e052f 100644 --- a/code/game/machinery/air_alarm.dm +++ b/code/game/machinery/air_alarm.dm @@ -68,6 +68,7 @@ clickvol = 30 blocks_emissive = NONE light_power = 0.25 + flags = WALL_ITEM var/alarm_id = null var/breach_detection = 1 // Whether to use automatic breach detection or not var/frequency = PUMPS_FREQ diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 5b481a6987..fc7dbc3273 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -67,6 +67,7 @@ network = list(NETWORK_THUNDER) density = FALSE circuit = null + flags = WALL_ITEM /obj/machinery/computer/security/telescreen/allow_pai_interaction(mob/living/silicon/pai/user, proximity_flag) return proximity_flag diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 97024b5c57..ddac48b7d2 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -5,6 +5,7 @@ icon_state = "doorctrl0" power_channel = ENVIRON layer = ABOVE_WINDOW_LAYER + flags = WALL_ITEM var/desiredstate = 0 var/exposedwires = 0 var/wires = 3 diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 8426e724ff..621aa67f76 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -25,6 +25,7 @@ req_access = list(ACCESS_BRIG) anchored = TRUE // can't pick it up density = FALSE // can walk through it. + flags = WALL_ITEM var/id = null // id of door it controls. var/activation_time = 0 var/timer_duration = 0 diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 53c205b850..06c4c44285 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -76,6 +76,7 @@ power_channel = ENVIRON density = FALSE unacidable = TRUE + flags = WALL_ITEM var/id_tag //var/radio_power_use = 50 //power used to xmit signals diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index 020b516a74..e9729b20fc 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -9,6 +9,7 @@ FIRE ALARM layer = ABOVE_WINDOW_LAYER blocks_emissive = EMISSIVE_BLOCK_NONE vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature + flags = WALL_ITEM var/detecting = 1.0 var/working = 1.0 var/time = 10.0 diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 77931f9d8c..f28d9afd00 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "mflash1" layer = ABOVE_WINDOW_LAYER + flags = WALL_ITEM var/id = null var/range = 2 //this is roughly the size of brig cell var/disable = 0 diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 30758cb1a9..b6a540e892 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -281,6 +281,7 @@ GLOBAL_LIST(construction_frame_floor) name = "frame" icon = 'icons/obj/stock_parts.dmi' icon_state = "machine_0" + flags = WALL_ITEM var/state = FRAME_PLACED var/obj/item/circuitboard/circuit = null var/need_circuit = TRUE diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index bd7f44761c..a636390741 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -231,8 +231,7 @@ M.Paralyse(4) else M.make_jittery(500) - spawn(15) - explode() + addtimer(CALLBACK(src, PROC_REF(explode)), 1.5 SECONDS, TIMER_DELETE_ME|TIMER_UNIQUE) else if(current_track == null) to_chat(ui.user, "No track selected.") else diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 68ab64ffac..7575ce20d9 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -13,6 +13,7 @@ power_channel = LIGHT blocks_emissive = EMISSIVE_BLOCK_NONE vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature + flags = WALL_ITEM var/on = 1 var/area/area = null var/otherarea = null diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index de4a915a86..979f8f7db3 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -132,6 +132,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) light_range = 2 light_color = "#00ff00" vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature + flags = WALL_ITEM var/isbroken = 0 //1 if someone banged it with something heavy var/ispowered = 1 //starts powered, changes with power_change() //var/list/datum/feed_channel/channel_list = list() //This list will contain the names of the feed channels. Each name will refer to a data region where the messages of the feed channels are stored. diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index bf67d74390..d7f5505822 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -428,8 +428,8 @@ GLOBAL_VAR(bomb_set) feedback_set_details("end_error","nuke - unhandled ending") - if(blackbox) - blackbox.save_all_data_to_sql() + if(GLOB.blackbox) + GLOB.blackbox.save_all_data_to_sql() sleep(300) log_game("Rebooting due to nuclear detonation") world.Reboot() diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 2ebf45fbcc..b3f9e65016 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_EMPTY_TYPED(allConsoles, /obj/machinery/requests_console) light_power = 0.25 light_color = "#00ff00" vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature + flags = WALL_ITEM var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department var/list/message_log = list() //List of all messages var/departmentType = 0 //Bitflag. Zero is reply-only. Map currently uses raw numbers instead of defines. diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index be7f1191a6..073cf9f30f 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -21,6 +21,7 @@ use_power = USE_POWER_IDLE idle_power_usage = 10 circuit = /obj/item/circuitboard/status_display + flags = WALL_ITEM var/mode = 1 // 0 = Blank // 1 = Shuttle timer // 2 = Arbitrary message(s) diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index 234e212053..e4d9b42939 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -117,6 +117,6 @@ var/drop_x = src.x - 2 var/drop_y = src.y - 2 var/drop_z = src.z - command_announcement.Announce("[using_map.starsys_name] Rapid Fabrication priority supply request #[rand(1000,9999)]-[rand(100,999)] received. Shipment dispatched via ballistic supply pod for immediate delivery. Have a nice day.", "Thank You For Your Patronage") + GLOB.command_announcement.Announce("[using_map.starsys_name] Rapid Fabrication priority supply request #[rand(1000,9999)]-[rand(100,999)] received. Shipment dispatched via ballistic supply pod for immediate delivery. Have a nice day.", "Thank You For Your Patronage") spawn(rand(100, 300)) new /datum/random_map/droppod/supply(null, drop_x, drop_y, drop_z, supplied_drop = drop_type) // Splat. diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index f825ddedec..7a315f3998 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -486,34 +486,34 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]" //BR.messages_admin += blackbox_admin_msg - if(istype(blackbox)) + if(istype(GLOB.blackbox)) switch(display_freq) if(PUB_FREQ) - blackbox.msg_common += blackbox_msg + GLOB.blackbox.msg_common += blackbox_msg if(SCI_FREQ) - blackbox.msg_science += blackbox_msg + GLOB.blackbox.msg_science += blackbox_msg if(COMM_FREQ) - blackbox.msg_command += blackbox_msg + GLOB.blackbox.msg_command += blackbox_msg if(MED_FREQ) - blackbox.msg_medical += blackbox_msg + GLOB.blackbox.msg_medical += blackbox_msg if(ENG_FREQ) - blackbox.msg_engineering += blackbox_msg + GLOB.blackbox.msg_engineering += blackbox_msg if(SEC_FREQ) - blackbox.msg_security += blackbox_msg + GLOB.blackbox.msg_security += blackbox_msg if(DTH_FREQ) - blackbox.msg_deathsquad += blackbox_msg + GLOB.blackbox.msg_deathsquad += blackbox_msg if(SYND_FREQ) - blackbox.msg_syndicate += blackbox_msg + GLOB.blackbox.msg_syndicate += blackbox_msg if(RAID_FREQ) - blackbox.msg_raider += blackbox_msg + GLOB.blackbox.msg_raider += blackbox_msg if(SUP_FREQ) - blackbox.msg_cargo += blackbox_msg + GLOB.blackbox.msg_cargo += blackbox_msg if(SRV_FREQ) - blackbox.msg_service += blackbox_msg + GLOB.blackbox.msg_service += blackbox_msg if(EXP_FREQ) - blackbox.msg_explorer += blackbox_msg + GLOB.blackbox.msg_explorer += blackbox_msg else - blackbox.messages += blackbox_msg + GLOB.blackbox.messages += blackbox_msg //End of research and feedback code. @@ -674,32 +674,32 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]" //BR.messages_admin += blackbox_admin_msg - if(istype(blackbox)) + if(istype(GLOB.blackbox)) switch(display_freq) if(PUB_FREQ) - blackbox.msg_common += blackbox_msg + GLOB.blackbox.msg_common += blackbox_msg if(SCI_FREQ) - blackbox.msg_science += blackbox_msg + GLOB.blackbox.msg_science += blackbox_msg if(COMM_FREQ) - blackbox.msg_command += blackbox_msg + GLOB.blackbox.msg_command += blackbox_msg if(MED_FREQ) - blackbox.msg_medical += blackbox_msg + GLOB.blackbox.msg_medical += blackbox_msg if(ENG_FREQ) - blackbox.msg_engineering += blackbox_msg + GLOB.blackbox.msg_engineering += blackbox_msg if(SEC_FREQ) - blackbox.msg_security += blackbox_msg + GLOB.blackbox.msg_security += blackbox_msg if(DTH_FREQ) - blackbox.msg_deathsquad += blackbox_msg + GLOB.blackbox.msg_deathsquad += blackbox_msg if(SYND_FREQ) - blackbox.msg_syndicate += blackbox_msg + GLOB.blackbox.msg_syndicate += blackbox_msg if(RAID_FREQ) - blackbox.msg_raider += blackbox_msg + GLOB.blackbox.msg_raider += blackbox_msg if(SUP_FREQ) - blackbox.msg_cargo += blackbox_msg + GLOB.blackbox.msg_cargo += blackbox_msg if(SRV_FREQ) - blackbox.msg_service += blackbox_msg + GLOB.blackbox.msg_service += blackbox_msg else - blackbox.messages += blackbox_msg + GLOB.blackbox.messages += blackbox_msg //End of research and feedback code. @@ -761,7 +761,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages signal.frequency = PUB_FREQ// Common channel //#### Sending the signal to all subspace receivers ####// - for(var/obj/machinery/telecomms/receiver/R in telecomms_list) + for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list) R.receive_signal(signal) if(do_sleep) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index b2b7863786..29e94cc47c 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -118,7 +118,7 @@ /obj/machinery/telecomms/Initialize(mapload) - telecomms_list += src + GLOB.telecomms_list += src ..() default_apply_parts() return INITIALIZE_HINT_LATELOAD @@ -137,12 +137,12 @@ for(var/obj/machinery/telecomms/T in orange(20, src)) add_link(T) else - for(var/obj/machinery/telecomms/T in telecomms_list) + for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) add_link(T) /obj/machinery/telecomms/Destroy() - telecomms_list -= src - for(var/obj/machinery/telecomms/comm in telecomms_list) + GLOB.telecomms_list -= src + for(var/obj/machinery/telecomms/comm in GLOB.telecomms_list) comm.links -= src links = list() . = ..() diff --git a/code/game/objects/items/devices/e_beacon.dm b/code/game/objects/items/devices/e_beacon.dm index e19486bd08..289004a529 100644 --- a/code/game/objects/items/devices/e_beacon.dm +++ b/code/game/objects/items/devices/e_beacon.dm @@ -53,7 +53,7 @@ or relay the message to those who can." for(var/zlevel in levels_for_distress) - priority_announcement.Announce(message, new_title = "Automated Personal Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) + GLOB.priority_announcement.Announce(message, new_title = "Automated Personal Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) else to_chat(user,"\The [src] is already active, or is otherwise malfunctioning. There's nothing you can do but wait. And possibly pray.") diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 76636e07f7..590ceadc41 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -7,7 +7,7 @@ anchored = TRUE w_class = ITEMSIZE_LARGE canhear_range = 7 - flags = NOBLOODY + flags = NOBLOODY | WALL_ITEM light_color = "#00ff00" light_power = 0.25 blocks_emissive = NONE diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index f64ab10b6a..18d5325248 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -74,14 +74,14 @@ /obj/item/radio/LateInitialize() if(bs_tx_preload_id) //Try to find a receiver - for(var/obj/machinery/telecomms/receiver/RX in telecomms_list) + for(var/obj/machinery/telecomms/receiver/RX in GLOB.telecomms_list) if(RX.id == bs_tx_preload_id) //Again, bs_tx is the thing to TRANSMIT TO, so a receiver. bs_tx_weakref = WEAKREF(RX) RX.link_radio(src) break //Hmm, howabout an AIO machine if(!bs_tx_weakref) - for(var/obj/machinery/telecomms/allinone/AIO in telecomms_list) + for(var/obj/machinery/telecomms/allinone/AIO in GLOB.telecomms_list) if(AIO.id == bs_tx_preload_id) bs_tx_weakref = WEAKREF(AIO) AIO.link_radio(src) @@ -92,14 +92,14 @@ if(bs_rx_preload_id) var/found = 0 //Try to find a transmitter - for(var/obj/machinery/telecomms/broadcaster/TX in telecomms_list) + for(var/obj/machinery/telecomms/broadcaster/TX in GLOB.telecomms_list) if(TX.id == bs_rx_preload_id) //Again, bs_rx is the thing to RECEIVE FROM, so a transmitter. TX.link_radio(src) found = 1 break //Hmm, howabout an AIO machine if(!found) - for(var/obj/machinery/telecomms/allinone/AIO in telecomms_list) + for(var/obj/machinery/telecomms/allinone/AIO in GLOB.telecomms_list) if(AIO.id == bs_rx_preload_id) AIO.link_radio(src) found = 1 @@ -496,11 +496,11 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) signal.transmission_method = TRANSMISSION_SUBSPACE //#### Sending the signal to all subspace receivers ####// - for(var/obj/machinery/telecomms/receiver/R in telecomms_list) + for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list) R.receive_signal(signal) // Allinone can act as receivers. - for(var/obj/machinery/telecomms/allinone/R in telecomms_list) + for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list) R.receive_signal(signal) // Receiving code can be located in Telecommunications.dm @@ -524,14 +524,14 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) signal.transmission_method = TRANSMISSION_SUBSPACE signal.data["compression"] = 0 - for(var/obj/machinery/telecomms/receiver/R in telecomms_list) + for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list) R.receive_signal(signal) // Allinone can act as receivers. - for(var/obj/machinery/telecomms/allinone/R in telecomms_list) + for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list) R.receive_signal(signal) - for(var/obj/machinery/telecomms/receiver/R in telecomms_list) + for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list) R.receive_signal(signal) if(signal.data["done"] && (pos_z in signal.data["level"])) diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index 819713775c..e4e2bfc147 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -63,7 +63,7 @@ return INITIALIZE_HINT_QDEL /obj/item/uplink/hidden/next_offer() - discount_item = default_uplink_selection.get_random_item(INFINITY) + discount_item = GLOB.default_uplink_selection.get_random_item(INFINITY) discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1) next_offer_time = world.time + offer_time SStgui.update_uis(src) @@ -168,7 +168,7 @@ var/list/data = ..() data["categories"] = list() - for(var/datum/uplink_category/category in uplink.categories) + for(var/datum/uplink_category/category in GLOB.uplink.categories) var/list/cat = list( "name" = category.name, "items" = (category == selected_cat ? list() : null) @@ -196,7 +196,7 @@ switch(action) if("buy") - var/datum/uplink_item/UI = (locate(params["ref"]) in uplink.items) + var/datum/uplink_item/UI = (locate(params["ref"]) in GLOB.uplink.items) UI.buy(src, ui.user) return TRUE if("lock") diff --git a/code/game/objects/items/devices/uplink_random_lists.dm b/code/game/objects/items/devices/uplink_random_lists.dm index c0221585dc..d0c5cd4604 100644 --- a/code/game/objects/items/devices/uplink_random_lists.dm +++ b/code/game/objects/items/devices/uplink_random_lists.dm @@ -1,5 +1,5 @@ -var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_random_selection/default() -var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random_selection/all() +GLOBAL_DATUM_INIT(default_uplink_selection, /datum/uplink_random_selection, new) +GLOBAL_DATUM_INIT(all_uplink_selection, /datum/uplink_random_selection/all, new) /datum/uplink_random_item var/uplink_item // The uplink item @@ -33,7 +33,7 @@ var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random RI = pick(items) if(!prob(RI.keep_probability)) continue - var/datum/uplink_item/I = uplink.items_assoc[RI.uplink_item] + var/datum/uplink_item/I = GLOB.uplink.items_assoc[RI.uplink_item] if(I.cost(U) > telecrystals) continue if(bought_items && (I in bought_items) && !prob(RI.reselect_probability)) @@ -44,7 +44,7 @@ var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random /datum/uplink_random_selection/all/New() ..() - for(var/datum/uplink_item/item in uplink.items) + for(var/datum/uplink_item/item in GLOB.uplink.items) if(item.blacklisted) continue else @@ -113,6 +113,6 @@ var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random A.print_player_summary() /proc/debug_uplink_item_assoc_list() - for(var/key in uplink.items_assoc) - to_chat(world, "[key] - [uplink.items_assoc[key]]") + for(var/key in GLOB.uplink.items_assoc) + to_chat(world, "[key] - [GLOB.uplink.items_assoc[key]]") #endif diff --git a/code/game/objects/items/pizza_voucher_vr.dm b/code/game/objects/items/pizza_voucher_vr.dm index 4471a91d6d..480aa0c510 100644 --- a/code/game/objects/items/pizza_voucher_vr.dm +++ b/code/game/objects/items/pizza_voucher_vr.dm @@ -33,7 +33,7 @@ span_notice("A small bluespace rift opens just above your head and spits out a pizza box!"), span_notice("You hear a fwoosh followed by a thump.")) if(special_delivery) - command_announcement.Announce("SPECIAL DELIVERY PIZZA ORDER #[rand(1000,9999)]-[rand(100,999)] HAS BEEN RECEIVED. SHIPMENT DISPATCHED VIA EXTRA-POWERFUL BALLISTIC LAUNCHERS FOR IMMEDIATE DELIVERY! THANK YOU AND ENJOY YOUR PIZZA!", "WE ALWAYS DELIVER!") + GLOB.command_announcement.Announce("SPECIAL DELIVERY PIZZA ORDER #[rand(1000,9999)]-[rand(100,999)] HAS BEEN RECEIVED. SHIPMENT DISPATCHED VIA EXTRA-POWERFUL BALLISTIC LAUNCHERS FOR IMMEDIATE DELIVERY! THANK YOU AND ENJOY YOUR PIZZA!", "WE ALWAYS DELIVER!") new /obj/effect/falling_effect/pizza_delivery/special(user.loc) else new /obj/effect/falling_effect/pizza_delivery(user.loc) diff --git a/code/game/objects/items/stacks/sandbags.dm b/code/game/objects/items/stacks/sandbags.dm index 28028c8670..1ce305ad5b 100644 --- a/code/game/objects/items/stacks/sandbags.dm +++ b/code/game/objects/items/stacks/sandbags.dm @@ -34,7 +34,7 @@ /obj/item/stack/sandbags/Initialize(mapload, var/amt, var/bag_mat) . = ..(mapload, amt) - recipes = sandbag_recipes + recipes = GLOB.sandbag_recipes update_icon() if(bag_mat) bag_material = bag_mat diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index d2fa5bebc3..43e1c6b885 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -201,6 +201,7 @@ force = 8.0 w_class = ITEMSIZE_NO_CONTAINER max_w_class = ITEMSIZE_LARGE // This was 8 previously... + flags = WALL_ITEM anchored = TRUE density = FALSE cant_hold = list(/obj/item/storage/secure/briefcase) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 880aec4ec0..4d8ca6d766 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -6,6 +6,7 @@ layer = ABOVE_WINDOW_LAYER anchored = TRUE density = FALSE + flags = WALL_ITEM var/obj/item/extinguisher/has_extinguisher var/opened = 0 diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index befcc7fec9..2b0a088e05 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -8,6 +8,7 @@ layer = ABOVE_WINDOW_LAYER anchored = TRUE density = FALSE + flags = WALL_ITEM var/open = 0 var/hitstaken = 0 var/locked = 1 diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 5c431ea12e..41e0df398b 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -7,6 +7,7 @@ layer = ABOVE_WINDOW_LAYER density = FALSE anchored = TRUE + flags = WALL_ITEM var/shattered = 0 var/glass = 1 var/datum/tgui_module/appearance_changer/mirror/M diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 4a0fd38014..65bc084b12 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -6,6 +6,7 @@ plane = OBJ_PLANE //VOREStation Edit layer = ABOVE_JUNK_LAYER //VOREStation Edit w_class = ITEMSIZE_NORMAL + flags = WALL_ITEM /obj/structure/sign/ex_act(severity) qdel(src) diff --git a/code/game/turfs/simulated/dungeon/wall.dm b/code/game/turfs/simulated/dungeon/wall.dm index 317a64c58d..dc8cefff47 100644 --- a/code/game/turfs/simulated/dungeon/wall.dm +++ b/code/game/turfs/simulated/dungeon/wall.dm @@ -49,7 +49,7 @@ desc = "This rock seems dense, impossible to drill." /turf/simulated/wall/solidrock/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32) - if(!mining_overlay_cache["[cache_id]_[direction]"]) + if(!GLOB.mining_overlay_cache["[cache_id]_[direction]"]) var/image/new_cached_image = image(icon_state, dir = direction, layer = ABOVE_TURF_LAYER) switch(direction) if(NORTH) @@ -60,10 +60,10 @@ new_cached_image.pixel_x = offset if(WEST) new_cached_image.pixel_x = -offset - mining_overlay_cache["[cache_id]_[direction]"] = new_cached_image + GLOB.mining_overlay_cache["[cache_id]_[direction]"] = new_cached_image return new_cached_image - return mining_overlay_cache["[cache_id]_[direction]"] + return GLOB.mining_overlay_cache["[cache_id]_[direction]"] /turf/simulated/wall/solidrock/update_icon(var/update_neighbors) cut_overlays() diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index f1998200db..c2fd10b22e 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -107,11 +107,11 @@ GLOBAL_DATUM_INIT(no_ceiling_image, /image, new) // They don't forbid_turf_edge if(istype(T) && T.edge_blending_priority && edge_blending_priority < T.edge_blending_priority && icon_state != T.icon_state && !T.forbid_turf_edge()) var/cache_key = "[T.get_edge_icon_state()]-[checkdir]" // Usually [icon_state]-[dirnum] - if(!turf_edge_cache[cache_key]) + if(!GLOB.turf_edge_cache[cache_key]) var/image/I = image(icon = T.icon_edge, icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir, layer = ABOVE_TURF_LAYER) // VOREStation Edit - icon_edge I.plane = TURF_PLANE - turf_edge_cache[cache_key] = I - add_overlay(turf_edge_cache[cache_key]) + GLOB.turf_edge_cache[cache_key] = I + add_overlay(GLOB.turf_edge_cache[cache_key]) // We will take this state and use it for a cache key, and append '-edge' to it to get the edge overlay (edges *from other turfs*, not our own internal edges) /turf/simulated/proc/get_edge_icon_state() diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm index 955e656c90..8cc5fb4306 100644 --- a/code/game/turfs/simulated/outdoors/outdoors.dm +++ b/code/game/turfs/simulated/outdoors/outdoors.dm @@ -1,4 +1,4 @@ -var/list/turf_edge_cache = list() +GLOBAL_LIST_EMPTY(turf_edge_cache) /turf // If greater than 0, this turf will apply edge overlays on top of other turfs cardinally adjacent to it, if those adjacent turfs are of a different icon_state, diff --git a/code/game/turfs/simulated/outdoors/survival_action_vr.dm b/code/game/turfs/simulated/outdoors/survival_action_vr.dm index 95935cb27d..64882ef79b 100644 --- a/code/game/turfs/simulated/outdoors/survival_action_vr.dm +++ b/code/game/turfs/simulated/outdoors/survival_action_vr.dm @@ -1,4 +1,4 @@ -var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9") +GLOBAL_LIST_INIT(has_rocks, list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")) /turf/simulated/floor/outdoors/newdirt/attack_hand(mob/user) if(user.pulling) @@ -7,7 +7,7 @@ var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9") return ..() if(user.a_intent != I_HELP) return ..() - if(icon_state in has_rocks) + if(icon_state in GLOB.has_rocks) user.visible_message("[user] loosens rocks from \the [src]...", "You loosen rocks from \the [src]...") if(do_after(user, 5 SECONDS, target = src)) var/obj/item/stack/material/flint/R = new(get_turf(src), rand(1,4)) diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index b8dfe2079d..fde8caba2c 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -185,7 +185,7 @@ AM.water_act(amount) inflict_water_damage(20 * amount) // Only things vulnerable to water will actually be harmed (slimes/prommies). -var/list/shoreline_icon_cache = list() +GLOBAL_LIST_EMPTY(shoreline_icon_cache) /turf/simulated/floor/water/beach name = "beach shoreline" @@ -215,8 +215,8 @@ var/list/shoreline_icon_cache = list() cut_overlays() ..() // Get the underlay first. var/cache_string = "[initial(icon_state)]_[water_state]_[dir]" - if(cache_string in shoreline_icon_cache) // Check to see if an icon already exists. - add_overlay(shoreline_icon_cache[cache_string]) + if(cache_string in GLOB.shoreline_icon_cache) // Check to see if an icon already exists. + add_overlay(GLOB.shoreline_icon_cache[cache_string]) else // If not, make one, but only once. var/icon/shoreline_water = icon(src.icon, "shoreline_water", src.dir) var/icon/shoreline_subtract = icon(src.icon, "[initial(icon_state)]_subtract", src.dir) @@ -224,8 +224,8 @@ var/list/shoreline_icon_cache = list() var/image/final = image(shoreline_water) final.layer = WATER_LAYER - shoreline_icon_cache[cache_string] = final - add_overlay(shoreline_icon_cache[cache_string]) + GLOB.shoreline_icon_cache[cache_string] = final + add_overlay(GLOB.shoreline_icon_cache[cache_string]) /turf/simulated/floor/water/is_safe_to_enter(mob/living/L) if(L.get_water_protection() < 1) diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index 6053bcacea..b569f33ae8 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -1,61 +1,61 @@ -var/CMinutes = null -var/savefile/Banlist +GLOBAL_VAR_INIT(c_minutes, 0) +GLOBAL_DATUM(banlist, /savefile) /proc/CheckBan(var/ckey, var/id, var/address) - if(!Banlist) // if Banlist cannot be located for some reason + if(!GLOB.banlist) // if Banlist cannot be located for some reason LoadBans() // try to load the bans - if(!Banlist) // uh oh, can't find bans! + if(!GLOB.banlist) // uh oh, can't find bans! return 0 // ABORT ABORT ABORT . = list() var/appeal if(config && CONFIG_GET(string/banappeals)) appeal = "\nFor more information on your ban, or to appeal, head to [CONFIG_GET(string/banappeals)]" - Banlist.cd = "/base" - if( "[ckey][id]" in Banlist.dir ) - Banlist.cd = "[ckey][id]" - if (Banlist["temp"]) - if (!GetExp(Banlist["minutes"])) + GLOB.banlist.cd = "/base" + if( "[ckey][id]" in GLOB.banlist.dir ) + GLOB.banlist.cd = "[ckey][id]" + if (GLOB.banlist["temp"]) + if (!GetExp(GLOB.banlist["minutes"])) ClearTempbans() return 0 else - .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]" + .["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: [GetExp(GLOB.banlist["minutes"])]\nBy: [GLOB.banlist["bannedby"]][appeal]" else - Banlist.cd = "/base/[ckey][id]" - .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: PERMANENT\nBy: [Banlist["bannedby"]][appeal]" + GLOB.banlist.cd = "/base/[ckey][id]" + .["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: PERMANENT\nBy: [GLOB.banlist["bannedby"]][appeal]" .["reason"] = "ckey/id" return . else - for (var/A in Banlist.dir) - Banlist.cd = "/base/[A]" + for (var/A in GLOB.banlist.dir) + GLOB.banlist.cd = "/base/[A]" var/matches - if( ckey == Banlist["key"] ) + if( ckey == GLOB.banlist["key"] ) matches += "ckey" - if( id == Banlist["id"] ) + if( id == GLOB.banlist["id"] ) if(matches) matches += "/" matches += "id" - if( address == Banlist["ip"] ) + if( address == GLOB.banlist["ip"] ) if(matches) matches += "/" matches += "ip" if(matches) - if(Banlist["temp"]) - if (!GetExp(Banlist["minutes"])) + if(GLOB.banlist["temp"]) + if (!GetExp(GLOB.banlist["minutes"])) ClearTempbans() return 0 else - .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]" + .["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: [GetExp(GLOB.banlist["minutes"])]\nBy: [GLOB.banlist["bannedby"]][appeal]" else - .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: PERMANENT\nBy: [Banlist["bannedby"]][appeal]" + .["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: PERMANENT\nBy: [GLOB.banlist["bannedby"]][appeal]" .["reason"] = matches return . return 0 /proc/UpdateTime() //No idea why i made this a proc. - CMinutes = (world.realtime / 10) / 60 + GLOB.c_minutes = (world.realtime / 10) / 60 return 1 /hook/startup/proc/loadBans() @@ -63,17 +63,17 @@ var/savefile/Banlist /proc/LoadBans() - Banlist = new("data/banlist.bdb") + GLOB.banlist = new("data/banlist.bdb") log_admin("Loading Banlist") - if (!length(Banlist.dir)) log_admin("Banlist is empty.") + if (!length(GLOB.banlist.dir)) log_admin("Banlist is empty.") - if (!Banlist.dir.Find("base")) + if (!GLOB.banlist.dir.Find("base")) log_admin("Banlist missing base dir.") - Banlist.dir.Add("base") - Banlist.cd = "/base" - else if (Banlist.dir.Find("base")) - Banlist.cd = "/base" + GLOB.banlist.dir.Add("base") + GLOB.banlist.cd = "/base" + else if (GLOB.banlist.dir.Find("base")) + GLOB.banlist.cd = "/base" ClearTempbans() return 1 @@ -81,17 +81,19 @@ var/savefile/Banlist /proc/ClearTempbans() UpdateTime() - Banlist.cd = "/base" - for (var/A in Banlist.dir) - Banlist.cd = "/base/[A]" - if (!Banlist["key"] || !Banlist["id"]) + GLOB.banlist.cd = "/base" + for (var/A in GLOB.banlist.dir) + GLOB.banlist.cd = "/base/[A]" + if (!GLOB.banlist["key"] || !GLOB.banlist["id"]) RemoveBan(A) log_admin("Invalid Ban.") message_admins("Invalid Ban.") continue - if (!Banlist["temp"]) continue - if (CMinutes >= Banlist["minutes"]) RemoveBan(A) + if (!GLOB.banlist["temp"]) + continue + if (GLOB.c_minutes >= GLOB.banlist["minutes"]) + RemoveBan(A) return 1 @@ -102,23 +104,23 @@ var/savefile/Banlist if (temp) UpdateTime() - bantimestamp = CMinutes + minutes + bantimestamp = GLOB.c_minutes + minutes - Banlist.cd = "/base" - if ( Banlist.dir.Find("[ckey][computerid]") ) + GLOB.banlist.cd = "/base" + if ( GLOB.banlist.dir.Find("[ckey][computerid]") ) to_chat(usr, span_filter_adminlog(span_warning("Ban already exists."))) return 0 else - Banlist.dir.Add("[ckey][computerid]") - Banlist.cd = "/base/[ckey][computerid]" - Banlist["key"] << ckey - Banlist["id"] << computerid - Banlist["ip"] << address - Banlist["reason"] << reason - Banlist["bannedby"] << bannedby - Banlist["temp"] << temp + GLOB.banlist.dir.Add("[ckey][computerid]") + GLOB.banlist.cd = "/base/[ckey][computerid]" + GLOB.banlist["key"] << ckey + GLOB.banlist["id"] << computerid + GLOB.banlist["ip"] << address + GLOB.banlist["reason"] << reason + GLOB.banlist["bannedby"] << bannedby + GLOB.banlist["temp"] << temp if (temp) - Banlist["minutes"] << bantimestamp + GLOB.banlist["minutes"] << bantimestamp admin_action_message(bannedby, ckey, "banned", reason, temp ? minutes : -1) //VOREStation Add return 1 @@ -126,12 +128,12 @@ var/savefile/Banlist var/key var/id - Banlist.cd = "/base/[foldername]" - Banlist["key"] >> key - Banlist["id"] >> id - Banlist.cd = "/base" + GLOB.banlist.cd = "/base/[foldername]" + GLOB.banlist["key"] >> key + GLOB.banlist["id"] >> id + GLOB.banlist.cd = "/base" - if (!Banlist.dir.Remove(foldername)) return 0 + if (!GLOB.banlist.dir.Remove(foldername)) return 0 if(!usr) log_admin("Ban Expired: [key]") @@ -142,18 +144,18 @@ var/savefile/Banlist message_admins("[key_name_admin(usr)] unbanned: [key]") feedback_inc("ban_unban",1) usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN) - for (var/A in Banlist.dir) - Banlist.cd = "/base/[A]" - if (key == Banlist["key"] /*|| id == Banlist["id"]*/) - Banlist.cd = "/base" - Banlist.dir.Remove(A) + for (var/A in GLOB.banlist.dir) + GLOB.banlist.cd = "/base/[A]" + if (key == GLOB.banlist["key"] /*|| id == GLOB.banlist["id"]*/) + GLOB.banlist.cd = "/base" + GLOB.banlist.dir.Remove(A) continue admin_action_message(usr.key, key, "unbanned", "\[Unban\]", 0) //VOREStation Add return 1 /proc/GetExp(minutes as num) UpdateTime() - var/exp = minutes - CMinutes + var/exp = minutes - GLOB.c_minutes if (exp <= 0) return 0 else @@ -170,19 +172,19 @@ var/savefile/Banlist var/count = 0 var/dat //var/dat = "
" + span_bold("Unban Player:") + " " + span_blue("(U) = Unban") + " , (E) = Edit Ban " + span_green("(Total
") - Banlist.cd = "/base" - for (var/A in Banlist.dir) + GLOB.banlist.cd = "/base" + for (var/A in GLOB.banlist.dir) count++ - Banlist.cd = "/base/[A]" + GLOB.banlist.cd = "/base/[A]" var/ref = "\ref[src]" - var/key = Banlist["key"] - var/id = Banlist["id"] - var/ip = Banlist["ip"] - var/reason = Banlist["reason"] - var/by = Banlist["bannedby"] + var/key = GLOB.banlist["key"] + var/id = GLOB.banlist["id"] + var/ip = GLOB.banlist["ip"] + var/reason = GLOB.banlist["reason"] + var/by = GLOB.banlist["bannedby"] var/expiry - if(Banlist["temp"]) - expiry = GetExp(Banlist["minutes"]) + if(GLOB.banlist["temp"]) + expiry = GetExp(GLOB.banlist["minutes"]) if(!expiry) expiry = "Removal Pending" else expiry = "Permaban" @@ -208,25 +210,25 @@ var/savefile/Banlist var/a = pick(1,0) var/b = pick(1,0) if(b) - Banlist.cd = "/base" - Banlist.dir.Add("trash[i]trashid[i]") - Banlist.cd = "/base/trash[i]trashid[i]" - to_chat(Banlist["key"], "trash[i]") + GLOB.banlist.cd = "/base" + GLOB.banlist.dir.Add("trash[i]trashid[i]") + GLOB.banlist.cd = "/base/trash[i]trashid[i]" + to_chat(GLOB.banlist["key"], "trash[i]") else - Banlist.cd = "/base" - Banlist.dir.Add("[last]trashid[i]") - Banlist.cd = "/base/[last]trashid[i]" - Banlist["key"] << last - to_chat(Banlist["id"], "trashid[i]") - to_chat(Banlist["reason"], "Trashban[i].") - Banlist["temp"] << a - Banlist["minutes"] << CMinutes + rand(1,2000) - to_chat(Banlist["bannedby"], "trashmin") + GLOB.banlist.cd = "/base" + GLOB.banlist.dir.Add("[last]trashid[i]") + GLOB.banlist.cd = "/base/[last]trashid[i]" + GLOB.banlist["key"] << last + to_chat(GLOB.banlist["id"], "trashid[i]") + to_chat(GLOB.banlist["reason"], "Trashban[i].") + GLOB.banlist["temp"] << a + GLOB.banlist["minutes"] << GLOB.c_minutes + rand(1,2000) + to_chat(GLOB.banlist["bannedby"], "trashmin") last = "trash[i]" - Banlist.cd = "/base" + GLOB.banlist.cd = "/base" /proc/ClearAllBans() - Banlist.cd = "/base" - for (var/A in Banlist.dir) + GLOB.banlist.cd = "/base" + for (var/A in GLOB.banlist.dir) RemoveBan(A) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 68a3a8227d..9418b5eec2 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -554,7 +554,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m if(!check_rights(R_BAN)) return var/dat = span_bold("Job Bans!") + "
" - for(var/t in jobban_keylist) + for(var/t in GLOB.jobban_keylist) var/r = t if( findtext(r,"##") ) r = copytext( r, 1, findtext(r,"##") )//removes the description @@ -647,8 +647,8 @@ ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.", return feedback_add_details("admin_verb","R") - if(blackbox) - blackbox.save_all_data_to_sql() + if(GLOB.blackbox) + GLOB.blackbox.save_all_data_to_sql() var/init_by = "Initiated by [user.holder.fakekey ? "Admin" : user.key]." switch(result) @@ -1109,11 +1109,11 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp if(!check_rights(R_SPAWN)) return - var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", custom_items) - if(!owner|| !custom_items[owner]) + var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", GLOB.custom_items) + if(!owner|| !GLOB.custom_items[owner]) return - var/list/possible_items = custom_items[owner] + var/list/possible_items = GLOB.custom_items[owner] var/datum/custom_item/item_to_spawn = tgui_input_list(usr, "Select an item to spawn.", "Spawn Custom Item", possible_items) if(!item_to_spawn) return @@ -1127,17 +1127,17 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp if(!check_rights(R_SPAWN)) return - if(!custom_items) + if(!GLOB.custom_items) to_chat(usr, "Custom item list is null.") return - if(!custom_items.len) + if(!length(GLOB.custom_items)) to_chat(usr, "Custom item list not populated.") return - for(var/assoc_key in custom_items) + for(var/assoc_key in GLOB.custom_items) to_chat(usr, "[assoc_key] has:") - var/list/current_items = custom_items[assoc_key] + var/list/current_items = GLOB.custom_items[assoc_key] for(var/datum/custom_item/item in current_items) to_chat(usr, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]") diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 7d1f5db646..befd7276c3 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -1,16 +1,16 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -var/jobban_runonce // Updates legacy bans with new info -var/jobban_keylist[0] //to store the keys & ranks +GLOBAL_VAR(jobban_runonce) // Updates legacy bans with new info +GLOBAL_LIST_EMPTY(jobban_keylist) //to store the keys & ranks /proc/jobban_fullban(mob/M, rank, reason) if (!M || !M.key) return - jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]")) + GLOB.jobban_keylist += "[M.ckey] - [rank] ## [reason]" jobban_savebanfile() /proc/jobban_client_fullban(ckey, rank) if (!ckey || !rank) return - jobban_keylist.Add(text("[ckey] - [rank]")) + GLOB.jobban_keylist += "[ckey] - [rank]" jobban_savebanfile() //returns a reason if M is banned from rank, returns 0 otherwise @@ -30,7 +30,7 @@ var/jobban_keylist[0] //to store the keys & ranks return 0 /proc/ckey_is_jobbanned(var/check_key, var/rank) - for(var/s in jobban_keylist) + for(var/s in GLOB.jobban_keylist) if(findtext(s,"[check_key] - [rank]") == 1 ) var/startpos = findtext(s, "## ")+3 if(startpos && startpos> jobban_keylist + S["keys[0]"] >> GLOB.jobban_keylist log_admin("Loading jobban_rank") - S["runonce"] >> jobban_runonce + S["runonce"] >> GLOB.jobban_runonce - if (!length(jobban_keylist)) - jobban_keylist=list() + if (!length(GLOB.jobban_keylist)) + GLOB.jobban_keylist=list() log_admin("jobban_keylist was empty") else if(!establish_db_connection()) @@ -83,7 +83,7 @@ DEBUG var/ckey = query.item[1] var/job = query.item[2] - jobban_keylist.Add("[ckey] - [job]") + GLOB.jobban_keylist += "[ckey] - [job]" qdel(query) //Job tempbans @@ -94,12 +94,12 @@ DEBUG var/ckey = query1.item[1] var/job = query1.item[2] - jobban_keylist.Add("[ckey] - [job]") + GLOB.jobban_keylist += "[ckey] - [job]" qdel(query1) /proc/jobban_savebanfile() var/savefile/S=new("data/job_full.ban") - S["keys[0]"] << jobban_keylist + S["keys[0]"] << GLOB.jobban_keylist /proc/jobban_unban(mob/M, rank) jobban_remove("[M.ckey] - [rank]") @@ -111,9 +111,9 @@ DEBUG /proc/jobban_remove(X) - for (var/i = 1; i <= length(jobban_keylist); i++) - if( findtext(jobban_keylist[i], "[X]") ) - jobban_keylist.Remove(jobban_keylist[i]) + for (var/i = 1; i <= length(GLOB.jobban_keylist); i++) + if( findtext(GLOB.jobban_keylist[i], "[X]") ) + GLOB.jobban_keylist.Remove(GLOB.jobban_keylist[i]) jobban_savebanfile() return 1 return 0 diff --git a/code/modules/admin/newbanjob.dm b/code/modules/admin/newbanjob.dm index 477567c2d7..31e57e2138 100644 --- a/code/modules/admin/newbanjob.dm +++ b/code/modules/admin/newbanjob.dm @@ -15,7 +15,7 @@ #define RANK_DETECTIVE_HOS "Detective_HoS" #define RANK_VIROLOGIST_RD_CMO "Virologist_RD_CMO" -var/savefile/Banlistjob +GLOBAL_DATUM(banlistjob, /savefile) /proc/_jobban_isbanned(var/client/clientvar, var/rank) @@ -26,30 +26,31 @@ var/savefile/Banlistjob if (guest_jobbans(rank)) if(config.guest_jobban && IsGuestKey(key)) return 1 - Banlistjob.cd = "/base" - if (Banlistjob.dir.Find("[key][id][rank]")) + GLOB.banlistjob.cd = "/base" + if (GLOB.banlistjob.dir.Find("[key][id][rank]")) return 1 - Banlistjob.cd = "/base" - for (var/A in Banlistjob.dir) - Banlistjob.cd = "/base/[A]" - if ((id == Banlistjob["id"] || key == Banlistjob["key"]) && rank == Banlistjob["rank"]) + GLOB.banlistjob.cd = "/base" + for (var/A in GLOB.banlistjob.dir) + GLOB.banlistjob.cd = "/base/[A]" + if ((id == GLOB.banlistjob["id"] || key == GLOB.banlistjob["key"]) && rank == GLOB.banlistjob["rank"]) return 1 return 0 /proc/LoadBansjob() - Banlistjob = new("data/job_fullnew.bdb") + GLOB.banlistjob = new("data/job_fullnew.bdb") log_admin("Loading Banlistjob") - if (!length(Banlistjob.dir)) log_admin("Banlistjob is empty.") + if (!length(GLOB.banlistjob.dir)) + log_admin("Banlistjob is empty.") - if (!Banlistjob.dir.Find("base")) + if (!GLOB.banlistjob.dir.Find("base")) log_admin("Banlistjob missing base dir.") - Banlistjob.dir.Add("base") - Banlistjob.cd = "/base" - else if (Banlistjob.dir.Find("base")) - Banlistjob.cd = "/base" + GLOB.banlistjob.dir.Add("base") + GLOB.banlistjob.cd = "/base" + else if (GLOB.banlistjob.dir.Find("base")) + GLOB.banlistjob.cd = "/base" ClearTempbansjob() return 1 @@ -57,17 +58,17 @@ var/savefile/Banlistjob /proc/ClearTempbansjob() UpdateTime() - Banlistjob.cd = "/base" - for (var/A in Banlistjob.dir) - Banlistjob.cd = "/base/[A]" - //if (!Banlistjob["key"] || !Banlistjob["id"]) + GLOB.banlistjob.cd = "/base" + for (var/A in GLOB.banlistjob.dir) + GLOB.banlistjob.cd = "/base/[A]" + //if (!GLOB.banlistjob["key"] || !GLOB.banlistjob["id"]) // RemoveBanjob(A, "full") // log_admin("Invalid Ban.") // message_admins("Invalid Ban.") // continue - if (!Banlistjob["temp"]) continue - if (CMinutes >= Banlistjob["minutes"]) RemoveBanjob(A) + if (!GLOB.banlistjob["temp"]) continue + if (CMinutes >= GLOB.banlistjob["minutes"]) RemoveBanjob(A) return 1 @@ -156,21 +157,21 @@ var/savefile/Banlistjob AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, JOB_ALT_VIROLOGIST) return 1 - Banlistjob.cd = "/base" - if ( Banlistjob.dir.Find("[ckey][computerid][rank]") ) + GLOB.banlistjob.cd = "/base" + if ( GLOB.banlistjob.dir.Find("[ckey][computerid][rank]") ) to_chat(usr, span_red("Banjob already exists.")) return 0 else - Banlistjob.dir.Add("[ckey][computerid][rank]") - Banlistjob.cd = "/base/[ckey][computerid][rank]" - Banlistjob["key"] << ckey - Banlistjob["id"] << computerid - Banlistjob["rank"] << rank - Banlistjob["reason"] << reason - Banlistjob["bannedby"] << bannedby - Banlistjob["temp"] << temp + GLOB.banlistjob.dir.Add("[ckey][computerid][rank]") + GLOB.banlistjob.cd = "/base/[ckey][computerid][rank]" + GLOB.banlistjob["key"] << ckey + GLOB.banlistjob["id"] << computerid + GLOB.banlistjob["rank"] << rank + GLOB.banlistjob["reason"] << reason + GLOB.banlistjob["bannedby"] << bannedby + GLOB.banlistjob["temp"] << temp if (temp) - Banlistjob["minutes"] << bantimestamp + GLOB.banlistjob["minutes"] << bantimestamp admin_action_message(bannedby, ckey, "jobbanned-"+rank, reason, temp ? minutes : -1) //VOREStation Add return 1 @@ -178,13 +179,14 @@ var/savefile/Banlistjob var/key var/id var/rank - Banlistjob.cd = "/base/[foldername]" - Banlistjob["key"] >> key - Banlistjob["id"] >> id - Banlistjob["rank"] >> rank - Banlistjob.cd = "/base" + GLOB.banlistjob.cd = "/base/[foldername]" + GLOB.banlistjob["key"] >> key + GLOB.banlistjob["id"] >> id + GLOB.banlistjob["rank"] >> rank + GLOB.banlistjob.cd = "/base" - if (!Banlistjob.dir.Remove(foldername)) return 0 + if (!GLOB.banlistjob.dir.Remove(foldername)) + return 0 if(!usr) log_admin("Banjob Expired: [key]") @@ -196,11 +198,11 @@ var/savefile/Banlistjob feedback_inc("ban_job_unban",1) feedback_add_details("ban_job_unban","- [rank]") - for (var/A in Banlistjob.dir) - Banlistjob.cd = "/base/[A]" - if ((key == Banlistjob["key"] || id == Banlistjob["id"]) && (rank == Banlistjob["rank"])) - Banlistjob.cd = "/base" - Banlistjob.dir.Remove(A) + for (var/A in GLOB.banlistjob.dir) + GLOB.banlistjob.cd = "/base/[A]" + if ((key == GLOB.banlistjob["key"] || id == GLOB.banlistjob["id"]) && (rank == GLOB.banlistjob["rank"])) + GLOB.banlistjob.cd = "/base" + GLOB.banlistjob.dir.Remove(A) continue admin_action_message(usr.key, key, "unjobbanned-"+rank, "\[Unban\]", 0) //VOREStation Add return 1 @@ -224,11 +226,11 @@ var/savefile/Banlistjob var/count = 0 var/dat //var/dat = "
" + span_bold("Unban Player: ") + span_blue("(U) = Unban , (E) = Edit Ban") + span_green("(Total
") - Banlistjob.cd = "/base" - for (var/A in Banlistjob.dir) + GLOB.banlistjob.cd = "/base" + for (var/A in GLOB.banlistjob.dir) count++ - Banlistjob.cd = "/base/[A]" - dat += text("") + GLOB.banlistjob.cd = "/base/[A]" + dat += text("") dat += "
(U) Key: [Banlistjob["key"]] Rank: [Banlistjob["rank"]] ([Banlistjob["temp"] ? "[GetBanExpjob(Banlistjob["minutes"]) ? GetBanExpjob(Banlistjob["minutes"]) : "Removal pending" ]" : "Permaban"])(By: [Banlistjob["bannedby"]])(Reason: [Banlistjob["reason"]])
(U) Key: [GLOB.banlistjob["key"]] Rank: [GLOB.banlistjob["rank"]] ([GLOB.banlistjob["temp"] ? "[GetBanExpjob(GLOB.banlistjob["minutes"]) ? GetBanExpjob(GLOB.banlistjob["minutes"]) : "Removal pending" ]" : "Permaban"])(By: [GLOB.banlistjob["bannedby"]])(Reason: [GLOB.banlistjob["reason"]])
" dat = "
" + span_bold("Bans:") + " " span_blue("(U) = Unban , ") + " - " + span_green("([count] Bans)") + "
[dat]" @@ -270,27 +272,27 @@ var/savefile/Banlistjob var/a = pick(1,0) var/b = pick(1,0) if(b) - Banlistjob.cd = "/base" - Banlistjob.dir.Add("trash[i]trashid[i]") - Banlistjob.cd = "/base/trash[i]trashid[i]" - to_chat(Banlistjob["key"], "trash[i]") + GLOB.banlistjob.cd = "/base" + GLOB.banlistjob.dir.Add("trash[i]trashid[i]") + GLOB.banlistjob.cd = "/base/trash[i]trashid[i]" + to_chat(GLOB.banlistjob["key"], "trash[i]") else - Banlistjob.cd = "/base" - Banlistjob.dir.Add("[last]trashid[i]") - Banlistjob.cd = "/base/[last]trashid[i]" - Banlistjob["key"] << last - to_chat(Banlistjob["id"], "trashid[i]") - to_chat(Banlistjob["reason"], "Trashban[i].") - Banlistjob["temp"] << a - Banlistjob["minutes"] << CMinutes + rand(1,2000) - to_chat(Banlistjob["bannedby"], "trashmin") + GLOB.banlistjob.cd = "/base" + GLOB.banlistjob.dir.Add("[last]trashid[i]") + GLOB.banlistjob.cd = "/base/[last]trashid[i]" + GLOB.banlistjob["key"] << last + to_chat(GLOB.banlistjob["id"], "trashid[i]") + to_chat(GLOB.banlistjob["reason"], "Trashban[i].") + GLOB.banlistjob["temp"] << a + GLOB.banlistjob["minutes"] << CMinutes + rand(1,2000) + to_chat(GLOB.banlistjob["bannedby"], "trashmin") last = "trash[i]" - Banlistjob.cd = "/base" + GLOB.banlistjob.cd = "/base" /proc/ClearAllBansjob() - Banlistjob.cd = "/base" - for (var/A in Banlistjob.dir) + GLOB.banlistjob.cd = "/base" + for (var/A in GLOB.banlistjob.dir) RemoveBanjob(A, "full") #undef RANK_HEADS diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index dd2f79c146..f7b5bf16df 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -176,11 +176,12 @@ /////////////////////////////////////new ban stuff else if(href_list["unbanf"]) - if(!check_rights(R_BAN)) return + if(!check_rights(R_BAN)) + return var/banfolder = href_list["unbanf"] - Banlist.cd = "/base/[banfolder]" - var/key = Banlist["key"] + GLOB.banlist.cd = "/base/[banfolder]" + var/key = GLOB.banlist["key"] if(tgui_alert(usr, "Are you sure you want to unban [key]?", "Confirmation", list("Yes", "No")) == "Yes") if(RemoveBan(banfolder)) unbanpanel() @@ -192,20 +193,21 @@ usr.client.warn(href_list["warn"]) else if(href_list["unbane"]) - if(!check_rights(R_BAN)) return + if(!check_rights(R_BAN)) + return UpdateTime() var/reason var/banfolder = href_list["unbane"] - Banlist.cd = "/base/[banfolder]" - var/reason2 = Banlist["reason"] - var/temp = Banlist["temp"] + GLOB.banlist.cd = "/base/[banfolder]" + var/reason2 = GLOB.banlist["reason"] + var/temp = GLOB.banlist["temp"] - var/minutes = Banlist["minutes"] + var/minutes = GLOB.banlist["minutes"] - var/banned_key = Banlist["key"] - Banlist.cd = "/base" + var/banned_key = GLOB.banlist["key"] + GLOB.banlist.cd = "/base" var/duration @@ -215,12 +217,12 @@ if("Yes") temp = 1 var/mins = 0 - if(minutes > CMinutes) - mins = minutes - CMinutes + if(minutes > GLOB.c_minutes) + mins = minutes - GLOB.c_minutes mins = tgui_input_number(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) if(!mins) return mins = min(525599,mins) - minutes = CMinutes + mins + minutes = GLOB.c_minutes + mins duration = GetExp(minutes) reason = tgui_input_text(usr,"Reason?","reason",reason2, MAX_MESSAGE_LEN) if(!reason) return @@ -233,12 +235,12 @@ log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]") ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]") message_admins(span_blue("[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]"), 1) - Banlist.cd = "/base/[banfolder]" - Banlist["reason"] << reason - Banlist["temp"] << temp - Banlist["minutes"] << minutes - Banlist["bannedby"] << usr.ckey - Banlist.cd = "/base" + GLOB.banlist.cd = "/base/[banfolder]" + GLOB.banlist["reason"] << reason + GLOB.banlist["temp"] << temp + GLOB.banlist["minutes"] << minutes + GLOB.banlist["bannedby"] << usr.ckey + GLOB.banlist.cd = "/base" feedback_inc("ban_edit",1) unbanpanel() diff --git a/code/modules/admin/verbs/check_customitem_activity.dm b/code/modules/admin/verbs/check_customitem_activity.dm index 5a2493a614..1e1c0e6351 100644 --- a/code/modules/admin/verbs/check_customitem_activity.dm +++ b/code/modules/admin/verbs/check_customitem_activity.dm @@ -1,5 +1,5 @@ -var/checked_for_inactives = 0 -var/inactive_keys = "None
" +GLOBAL_VAR_INIT(checked_for_inactives, FALSE) +GLOBAL_VAR_INIT(inactive_keys, "None
") /client/proc/check_customitem_activity() set category = "Admin.Investigate" @@ -14,8 +14,8 @@ var/inactive_keys = "None
" dat += "Populating this list is done automatically, but must be manually triggered on a per\ round basis. Populating the list may cause a lag spike, so use it sparingly.
" dat += "
" - if(checked_for_inactives) - dat += inactive_keys + if(GLOB.checked_for_inactives) + dat += GLOB.inactive_keys dat += "
" dat += "This system was implemented on March 1 2013, and the database a few days before that. Root server access is required to add or disable access to specific custom items.
" else @@ -28,7 +28,7 @@ var/inactive_keys = "None
" /proc/populate_inactive_customitems_list(var/client/C) set background = 1 - if(checked_for_inactives) + if(GLOB.checked_for_inactives) return establish_db_connection() @@ -77,13 +77,13 @@ var/inactive_keys = "None
" qdel(query_inactive) if(inactive_ckeys.len) - inactive_keys = "" + GLOB.inactive_keys = "" for(var/cur_key in inactive_ckeys) if(inactive_ckeys[cur_key]) - inactive_keys += span_bold("[cur_key]") + " - [inactive_ckeys[cur_key]]
" + GLOB.inactive_keys += span_bold("[cur_key]") + " - [inactive_ckeys[cur_key]]
" else - inactive_keys += "[cur_key] - no database entry
" + GLOB.inactive_keys += "[cur_key] - no database entry
" - checked_for_inactives = 1 + GLOB.checked_for_inactives = TRUE if(C) C.check_customitem_activity() diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index e1cfc01380..b1004afa70 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -173,7 +173,7 @@ set category = "Debug.Investigate" to_chat(usr, span_bold("Jobbans active in this round.")) - for(var/t in jobban_keylist) + for(var/t in GLOB.jobban_keylist) to_chat(usr, "[t]") /client/proc/print_jobban_old_filter() @@ -186,6 +186,6 @@ return to_chat(usr, span_bold("Jobbans active in this round.")) - for(var/t in jobban_keylist) + for(var/t in GLOB.jobban_keylist) if(findtext(t, job_filter)) to_chat(usr, "[t]") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 819e520479..8923cdc761 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -241,7 +241,7 @@ ADMIN_VERB(cmd_admin_add_random_ai_law, R_ADMIN|R_FUN, "Add Random AI Law", "Add if(!show_log) return if(show_log == "Yes") - command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') + GLOB.command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') IonStorm(0) feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -623,7 +623,7 @@ ADMIN_VERB(cmd_admin_add_freeform_ai_law, R_FUN, "Add Custom AI law", "Adds a cu var/show_log = tgui_alert(user, "Show ion message?", "Message", list("Yes", "No")) if(show_log == "Yes") - command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') + GLOB.command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_rejuvenate, R_ADMIN|R_FUN|R_MOD, "Rejuvenate", "Fully restores the target mob.", ADMIN_CATEGORY_GAME, mob/living/target_mob as mob in GLOB.mob_list) @@ -658,7 +658,7 @@ ADMIN_VERB(cmd_admin_create_centcom_report, R_ADMIN|R_SERVER|R_FUN, "Create Comm if(!confirm) return if(confirm == "Yes") - command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1); + GLOB.command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1); else to_chat(world, span_boldannounce("New [using_map.company_name] Update available at all communication consoles.")) SEND_SOUND(world, sound('sound/AI/commandreport.ogg')) diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 9b5162db49..7df9a409be 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -319,11 +319,11 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before if(GLOB.gravity_is_on) log_admin("[key_name(holder)] toggled gravity on.", 1) message_admins(span_notice("[key_name_admin(holder)] toggled gravity on."), 1) - command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") + GLOB.command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") else log_admin("[key_name(holder)] toggled gravity off.", 1) message_admins(span_notice("[key_name_admin(holder)] toggled gravity off."), 1) - command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.") + GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.") if("tripleAI") if(!is_funmin) return diff --git a/code/modules/admin/verbs/smite.dm b/code/modules/admin/verbs/smite.dm index b189028d95..cc0cc2eade 100644 --- a/code/modules/admin/verbs/smite.dm +++ b/code/modules/admin/verbs/smite.dm @@ -202,7 +202,7 @@ target.Weaken(20) target.stuttering = 20 -var/redspace_abduction_z +GLOBAL_VAR(redspace_abduction_z) /area/redspace_abduction name = "Another Time And Place" @@ -210,11 +210,11 @@ var/redspace_abduction_z dynamic_lighting = FALSE /proc/redspace_abduction(mob/living/target, user) - if(redspace_abduction_z < 0) + if(GLOB.redspace_abduction_z < 0) to_chat(user,span_warning("The abduction z-level is already being created. Please wait.")) return - if(!redspace_abduction_z) - redspace_abduction_z = -1 + if(!GLOB.redspace_abduction_z) + GLOB.redspace_abduction_z = -1 to_chat(user,span_warning("This is the first use of the verb this shift, it will take a minute to configure the abduction z-level. It will be z[world.maxz+1].")) var/z = ++world.maxz world.max_z_changed() @@ -225,7 +225,7 @@ var/redspace_abduction_z T.ChangeTurf(/turf/unsimulated/fake_space) T.plane = -100 CHECK_TICK - redspace_abduction_z = z + GLOB.redspace_abduction_z = z if(!target || !user) return @@ -244,7 +244,7 @@ var/redspace_abduction_z for(var/x = llc_x to llc_x+size_of_square) for(var/y = llc_y to llc_y+size_of_square) var/turf/T_src = locate(x,y,target.z) - var/turf/T_dest = locate(x,y,redspace_abduction_z) + var/turf/T_dest = locate(x,y,GLOB.redspace_abduction_z) T_dest.vis_contents.Cut() T_dest.vis_contents += T_src T_dest.density = T_src.density @@ -255,7 +255,7 @@ var/redspace_abduction_z for(var/x = llc_x to llc_x+1) //Left for(var/y = llc_y to llc_y+size_of_square) if(prob(50)) - var/turf/T = locate(x,y,redspace_abduction_z) + var/turf/T = locate(x,y,GLOB.redspace_abduction_z) T.density = FALSE T.opacity = FALSE T.vis_contents.Cut() @@ -263,7 +263,7 @@ var/redspace_abduction_z for(var/x = llc_x+size_of_square-1 to llc_x+size_of_square) //Right for(var/y = llc_y to llc_y+size_of_square) if(prob(50)) - var/turf/T = locate(x,y,redspace_abduction_z) + var/turf/T = locate(x,y,GLOB.redspace_abduction_z) T.density = FALSE T.opacity = FALSE T.vis_contents.Cut() @@ -271,7 +271,7 @@ var/redspace_abduction_z for(var/x = llc_x to llc_x+size_of_square) //Top for(var/y = llc_y+size_of_square-1 to llc_y+size_of_square) if(prob(50)) - var/turf/T = locate(x,y,redspace_abduction_z) + var/turf/T = locate(x,y,GLOB.redspace_abduction_z) T.density = FALSE T.opacity = FALSE T.vis_contents.Cut() @@ -279,12 +279,12 @@ var/redspace_abduction_z for(var/x = llc_x to llc_x+size_of_square) //Bottom for(var/y = llc_y to llc_y+1) if(prob(50)) - var/turf/T = locate(x,y,redspace_abduction_z) + var/turf/T = locate(x,y,GLOB.redspace_abduction_z) T.density = FALSE T.opacity = FALSE T.vis_contents.Cut() - target.forceMove(locate(target.x,target.y,redspace_abduction_z)) + target.forceMove(locate(target.x,target.y,GLOB.redspace_abduction_z)) to_chat(target,span_danger("The tug relaxes, but everything around you looks... slightly off.")) to_chat(user, span_notice("The mob has been moved. ([admin_jump_link(target, check_rights_for(usr.client, R_HOLDER))])")) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 68fdd06308..39ed4f31ab 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -178,11 +178,11 @@ GLOBAL_VAR_INIT(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]") + GLOB.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]") GLOB.can_call_ert = 0 // Only one call per round, ladies. return 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]") + GLOB.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]") GLOB.can_call_ert = 0 // Only one call per round, gentleman. GLOB.send_emergency_team = 1 diff --git a/code/modules/admin/verbs/trader.dm b/code/modules/admin/verbs/trader.dm index 2c52d99a57..fad765ca43 100644 --- a/code/modules/admin/verbs/trader.dm +++ b/code/modules/admin/verbs/trader.dm @@ -59,7 +59,7 @@ GLOBAL_VAR_INIT(can_call_traders, 1) if(GLOB.send_beruang) return - command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control") + GLOB.command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control") GLOB.can_call_traders = 0 // Only one call per round. GLOB.send_beruang = 1 diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index b7b531c2cc..5e2e780c3a 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -42,7 +42,7 @@ 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))) - command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") + GLOB.command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1) var/list/L = list() for(var/turf/T in get_area_turfs(thearea.type)) diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index 31ae74381c..b5ff2f03d7 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -304,10 +304,10 @@ if("spawnpoint") var/list/spawnkeys = list() - for(var/spawntype in spawntypes) + for(var/spawntype in GLOB.spawntypes) spawnkeys += spawntype var/choice = tgui_input_list(user, "Where would you like to spawn when late-joining?", "Late-Join Choice", spawnkeys) - if(!choice || !spawntypes[choice]) + if(!choice || !GLOB.spawntypes[choice]) return TOPIC_NOACTION pref.update_preference_by_type(/datum/preference/choiced/living/spawnpoint, choice) return TOPIC_REFRESH diff --git a/code/modules/client/preference_setup/loadout/02_loadout.dm b/code/modules/client/preference_setup/loadout/02_loadout.dm index 15d772fc52..611f8dd3cd 100644 --- a/code/modules/client/preference_setup/loadout/02_loadout.dm +++ b/code/modules/client/preference_setup/loadout/02_loadout.dm @@ -1,5 +1,5 @@ var/list/loadout_categories = list() -var/list/gear_datums = list() +GLOBAL_LIST_EMPTY_TYPED(gear_datums, /datum/gear) /datum/loadout_category var/category = "" @@ -31,8 +31,8 @@ var/list/gear_datums = list() if(!loadout_categories[use_category]) loadout_categories[use_category] = new /datum/loadout_category(use_category) var/datum/loadout_category/LC = loadout_categories[use_category] - gear_datums[use_name] = new G - LC.gear[use_name] = gear_datums[use_name] + GLOB.gear_datums[use_name] = new G + LC.gear[use_name] = GLOB.gear_datums[use_name] loadout_categories = sortAssoc(loadout_categories) for(var/loadout_category in loadout_categories) @@ -97,12 +97,12 @@ var/list/gear_datums = list() var/total_cost = 0 for(var/gear_name in active_gear_list) - if(!gear_datums[gear_name]) + if(!GLOB.gear_datums[gear_name]) to_chat(preference_mob, span_warning("You cannot have the \the [gear_name].")) active_gear_list -= gear_name continue - var/datum/gear/G = gear_datums[gear_name] + var/datum/gear/G = GLOB.gear_datums[gear_name] if(!is_valid_gear(G)) to_chat(preference_mob, span_warning("You cannot take \the [gear_name] as you are not whitelisted for the species or item.")) active_gear_list -= gear_name @@ -124,7 +124,7 @@ var/list/gear_datums = list() var/list/gear_tweaks = list() for(var/item in active_gear_list) - var/datum/gear/G = gear_datums[item] + var/datum/gear/G = GLOB.gear_datums[item] var/list/tweaks = list() for(var/datum/gear_tweak/tweak in G.gear_tweaks) UNTYPED_LIST_ADD(tweaks, list( @@ -185,7 +185,7 @@ var/list/gear_datums = list() var/list/active_gear_list = LAZYACCESS(pref.gear_list, "[pref.gear_slot]") . = 0 for(var/gear_name in active_gear_list) - var/datum/gear/G = gear_datums[gear_name] + var/datum/gear/G = GLOB.gear_datums[gear_name] if(G) . += G.cost @@ -232,7 +232,7 @@ var/list/gear_datums = list() return TOPIC_REFRESH if("toggle_gear") - var/datum/gear/TG = gear_datums[params["gear"]] + var/datum/gear/TG = GLOB.gear_datums[params["gear"]] if(TG) if(TG.display_name in active_gear_list) active_gear_list -= TG.display_name @@ -241,7 +241,7 @@ var/list/gear_datums = list() return TOPIC_REFRESH_UPDATE_PREVIEW if("gear_tweak") - var/datum/gear/gear = gear_datums[params["gear"]] + var/datum/gear/gear = GLOB.gear_datums[params["gear"]] var/datum/gear_tweak/tweak = locate(params["tweak"]) if(!tweak || !gear || !(tweak in gear.gear_tweaks)) return TOPIC_HANDLED diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 5298d1d291..dbae462d39 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -632,7 +632,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.species.deform = character.species.get_icobase(get_deform = TRUE) character.species.vanity_base_fit = bodytype_selected if(istype(character.species, /datum/species/shapeshifter)) - wrapped_species_by_ref["\ref[character]"] = bodytype_selected + GLOB.wrapped_species_by_ref["\ref[character]"] = bodytype_selected character.custom_species = custom_species character.custom_say = lowertext(trim(custom_say)) diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm index 091819814c..2b0ad8a1a9 100644 --- a/code/modules/client/preferences_spawnpoints.dm +++ b/code/modules/client/preferences_spawnpoints.dm @@ -1,15 +1,14 @@ -var/list/spawntypes = list() +GLOBAL_LIST_INIT(spawntypes, populate_spawn_points()) /proc/populate_spawn_points() - spawntypes = list() + var/list/spawns = list() for(var/type in subtypesof(/datum/spawnpoint)) - var/datum/spawnpoint/S = new type() - spawntypes[S.display_name] = S + var/datum/spawnpoint/spawn_point = new type() + spawns[spawn_point.display_name] = spawn_point + return spawns /proc/get_spawn_points() - if(!LAZYLEN(spawntypes)) - populate_spawn_points() - return spawntypes + return GLOB.spawntypes /datum/spawnpoint var/msg //Message to display on the arrivals computer. diff --git a/code/modules/client/record_updater.dm b/code/modules/client/record_updater.dm index c092fd3ca6..06ac53f6ec 100644 --- a/code/modules/client/record_updater.dm +++ b/code/modules/client/record_updater.dm @@ -1,4 +1,4 @@ -var/global/client_record_update_lock = FALSE +GLOBAL_VAR_INIT(client_record_update_lock, FALSE) // Manually updating records from medical console to a player's save. /proc/get_current_mob_from_record(var/datum/data/record/active) @@ -43,15 +43,15 @@ var/global/client_record_update_lock = FALSE record_string = "security" console_path = /obj/machinery/computer/secure_data - if(client_record_update_lock) + if(GLOB.client_record_update_lock) to_chat(user,"Update already in progress! Please wait a moment...") if(COM && !QDELETED(COM)) COM.visible_message(span_notice("\The [COM] buzzes!")) playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0) return "Update already in progress! Please wait a moment..." - client_record_update_lock = TRUE + GLOB.client_record_update_lock = TRUE spawn(60 SECONDS) - client_record_update_lock = FALSE + GLOB.client_record_update_lock = FALSE if(!active || !console_path) if(COM && !QDELETED(COM)) diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index b613eca4b2..52abb728f2 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -17,7 +17,7 @@ // If hooded, have [kit_icon]_suit_t in both files for the hood-up version. // If not using the default overlay, have [kit_icon]_light in both files for custom light overlays. -/var/list/custom_items = list() +GLOBAL_LIST_INIT(custom_items, load_custom_items()) /datum/custom_item var/assoc_key @@ -118,8 +118,8 @@ return t_icon // Parses the config file into the custom_items list. -/hook/startup/proc/load_custom_items() - +/proc/load_custom_items() + var/list/all_custom_items = list() var/datum/custom_item/current_data for(var/line in splittext(file2text("config/custom_items.txt"), "\n")) @@ -129,9 +129,9 @@ if(findtext(line, "{", 1, 2) || findtext(line, "}", 1, 2)) // New block! if(current_data && current_data.assoc_key) - if(!custom_items[current_data.assoc_key]) - custom_items[current_data.assoc_key] = list() - var/list/L = custom_items[current_data.assoc_key] + if(!all_custom_items[current_data.assoc_key]) + all_custom_items[current_data.assoc_key] = list() + var/list/L = all_custom_items[current_data.assoc_key] L |= current_data current_data = null @@ -173,11 +173,11 @@ current_data.kit_icon = field_data if("additional_data") current_data.additional_data = field_data - return 1 + return all_custom_items //gets the relevant list for the key from the listlist if it exists, check to make sure they are meant to have it and then calls the giving function /proc/equip_custom_items(mob/living/carbon/human/M) - var/list/key_list = custom_items[M.ckey] + var/list/key_list = GLOB.custom_items[M.ckey] if(!key_list || key_list.len < 1) return diff --git a/code/modules/events/atmos_leak.dm b/code/modules/events/atmos_leak.dm index b264b0f782..4bfee27fb0 100644 --- a/code/modules/events/atmos_leak.dm +++ b/code/modules/events/atmos_leak.dm @@ -92,7 +92,7 @@ return /datum/event/atmos_leak/announce() - command_announcement.Announce("Warning, hazardous [GLOB.gas_data.name[gas_type]] gas leak detected in \the [target_area], evacuate the area and contain the damage!", "Hazard Alert") + GLOB.command_announcement.Announce("Warning, hazardous [GLOB.gas_data.name[gas_type]] gas leak detected in \the [target_area], evacuate the area and contain the damage!", "Hazard Alert") /datum/event/atmos_leak/start() // Okay, time to actually put the gas in the room! diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 224443fe36..f33ecc9243 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -5,7 +5,7 @@ endWhen = 126 /datum/event/aurora_caelus/announce() - command_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your [using_map.facility_type], and will exhaust their energy battering the hull. \ + GLOB.command_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your [using_map.facility_type], and will exhaust their energy battering the hull. \ Nanotrasen has approved a short break for all employees to relax and observe this very rare event. \ During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \ Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \ @@ -26,7 +26,7 @@ return res /datum/event/aurora_caelus/end() - command_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions have returned to normal, and the cloud has dissipated. \ + GLOB.command_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions have returned to normal, and the cloud has dissipated. \ Please return to your workplace and continue work as normal. \ Have a pleasant shift, [station_name()], and thank you for watching with us.", "Nanotrasen Meteorology Division", new_sound = 'sound/AI/aurora_end.ogg') //VOREStation Edit diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index 82e6e9c336..94246ecd22 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -15,7 +15,7 @@ "you don't want to buy anything? Yeah, well I didn't want to buy your mom either.") /datum/event/brand_intelligence/announce() - command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard [station_name()], which appears to transmit \ + GLOB.command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard [station_name()], which appears to transmit \ to other nearby vendors. The original infected machine is believed to be \a [originMachine.name].", "Vendor Service Alert") diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index dc1bc82116..8985b73af5 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -20,7 +20,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by." else announcement = "Unknown biological [spawned_carp.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event/carp_migration/tick() if(activeFor % 5 != 0) diff --git a/code/modules/events/comms_blackout.dm b/code/modules/events/comms_blackout.dm index 8111afe508..c3d4d5c580 100644 --- a/code/modules/events/comms_blackout.dm +++ b/code/modules/events/comms_blackout.dm @@ -2,11 +2,11 @@ /proc/communications_blackout(var/silent = 1) if(!silent) - command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') + GLOB.command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, span_boldwarning("
")) to_chat(A, span_boldwarning("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")) to_chat(A, span_boldwarning("
")) - for(var/obj/machinery/telecomms/T in telecomms_list) + for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) T.emp_act(1) diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index a13fb5b002..81053e8afa 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -12,11 +12,11 @@ to_chat(A, span_boldwarning("
")) if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts. - command_announcement.Announce(alert, new_sound = sound('sound/misc/interference.ogg', volume=25)) + GLOB.command_announcement.Announce(alert, new_sound = sound('sound/misc/interference.ogg', volume=25)) /datum/event/communications_blackout/start() - for(var/obj/machinery/telecomms/T in telecomms_list) + for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) T.emp_act(1) for(var/obj/machinery/exonet_node/N in GLOB.machines) N.emp_act(1) diff --git a/code/modules/events/drone_pod_vr.dm b/code/modules/events/drone_pod_vr.dm index 0aa8bc153a..805b460d1d 100644 --- a/code/modules/events/drone_pod_vr.dm +++ b/code/modules/events/drone_pod_vr.dm @@ -22,7 +22,7 @@ qdel(target_spot) /datum/event/drone_pod_drop/announce() - command_announcement.Announce("An unidentified drone pod has been detected on a collision course towards the [location_name()]. Open and examine at your own risk.", "[location_name()] Sensor Network") + GLOB.command_announcement.Announce("An unidentified drone pod has been detected on a collision course towards the [location_name()]. Open and examine at your own risk.", "[location_name()] Sensor Network") /datum/event/drone_pod_drop/start() if(!land_target) diff --git a/code/modules/events/dust.dm b/code/modules/events/dust.dm index 1c28bd2c32..71d7eb7641 100644 --- a/code/modules/events/dust.dm +++ b/code/modules/events/dust.dm @@ -8,7 +8,7 @@ /datum/event/dust/announce() if(!victim) - command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching \the [location_name()]", "Dust Alert") + GLOB.command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching \the [location_name()]", "Dust Alert") /datum/event/dust/tick() if(prob(10)) @@ -17,7 +17,7 @@ /datum/event/dust/end() ..() if(!victim) - command_announcement.Announce("\The [location_name()] is no longer in danger of impact from space debris.", "Dust Notice") + GLOB.command_announcement.Announce("\The [location_name()] is no longer in danger of impact from space debris.", "Dust Notice") /datum/event/dust/proc/get_severity() switch(severity) diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index 35635b920e..54bccf0354 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -19,11 +19,11 @@ ..() switch(severity) if(EVENT_LEVEL_MUNDANE) - command_announcement.Announce("A minor electrical storm has been detected near the [location_name()]. Please watch out for possible electrical discharges.", "[location_name()] Sensor Array") + GLOB.command_announcement.Announce("A minor electrical storm has been detected near the [location_name()]. Please watch out for possible electrical discharges.", "[location_name()] Sensor Array") if(EVENT_LEVEL_MODERATE) - command_announcement.Announce("The [location_name()] is about to pass through an electrical storm. Please secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array") + GLOB.command_announcement.Announce("The [location_name()] is about to pass through an electrical storm. Please secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array") if(EVENT_LEVEL_MAJOR) - command_announcement.Announce("Alert. A strong electrical storm has been detected in proximity of the [location_name()]. It is recommended to immediately secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array") + GLOB.command_announcement.Announce("Alert. A strong electrical storm has been detected in proximity of the [location_name()]. It is recommended to immediately secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array") /datum/event/electrical_storm/start() ..() diff --git a/code/modules/events/gnat_migration.dm b/code/modules/events/gnat_migration.dm index 13d531424f..b6ada1ed70 100644 --- a/code/modules/events/gnat_migration.dm +++ b/code/modules/events/gnat_migration.dm @@ -20,7 +20,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by." else announcement = "Unknown biological [spawned_gnat.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event/gnat_migration/tick() if(activeFor % 5 != 0) diff --git a/code/modules/events/gravity.dm b/code/modules/events/gravity.dm index ad50785743..b90395679e 100644 --- a/code/modules/events/gravity.dm +++ b/code/modules/events/gravity.dm @@ -13,17 +13,17 @@ if((GG.z in zLevels) && GG.on) generators += GG - if(generators.len) + if(length(generators)) endWhen = rand(5 MINUTES, 20 MINUTES) else endWhen = rand(15, 60) /datum/event/gravity/announce() - if(generators.len) - command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. \ + if(length(generators)) + GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. \ Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure") else - command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system \ + GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system \ reinitializes. Please stand by while the gravity system reinitializes.", "Gravity Failure") /datum/event/gravity/start() @@ -47,7 +47,7 @@ var/did_anything = FALSE - if(generators.len) + if(length(generators)) for(var/obj/machinery/gravity_generator/main/GG in generators) if(!GG.on) GG.breaker = TRUE @@ -63,4 +63,4 @@ did_anything = TRUE if(did_anything) - command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored") + GLOB.command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored") diff --git a/code/modules/events/grubinfestation_vr.dm b/code/modules/events/grubinfestation_vr.dm index 7d00bb9d4e..c5a7483443 100644 --- a/code/modules/events/grubinfestation_vr.dm +++ b/code/modules/events/grubinfestation_vr.dm @@ -19,7 +19,7 @@ vents += temp_vent /datum/event/grub_infestation/announce() - command_announcement.Announce("Solargrubs detected coming aboard [station_name()]. Please clear them out before this starts to affect productivity. All crew efforts are appreciated and encouraged.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') + GLOB.command_announcement.Announce("Solargrubs detected coming aboard [station_name()]. Please clear them out before this starts to affect productivity. All crew efforts are appreciated and encouraged.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/grub_infestation/start() while((spawncount >= 1) && vents.len) @@ -51,4 +51,4 @@ area_names |= grub_area.name if(area_names.len) var/english_list = english_list(area_names) - command_announcement.Announce("Sensors have narrowed down remaining active solargrubs to the following areas: [english_list]", "Lifesign Alert") + GLOB.command_announcement.Announce("Sensors have narrowed down remaining active solargrubs to the following areas: [english_list]", "Lifesign Alert") diff --git a/code/modules/events/ian_storm_vr.dm b/code/modules/events/ian_storm_vr.dm index 65ac732b94..d0fb49f14c 100644 --- a/code/modules/events/ian_storm_vr.dm +++ b/code/modules/events/ian_storm_vr.dm @@ -4,9 +4,9 @@ endWhen = 3 /datum/event/ianstorm/announce() - command_announcement.Announce("It has come to our attention that the [using_map.facility_type] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert", 'sound/AI/ian_storm.ogg') + GLOB.command_announcement.Announce("It has come to our attention that the [using_map.facility_type] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert", 'sound/AI/ian_storm.ogg') spawn(7 SECONDS) - command_announcement.Announce("Wait. No, that's wrong. The [using_map.facility_type] passed through an IAN storm!.", "Ian Alert") + GLOB.command_announcement.Announce("Wait. No, that's wrong. The [using_map.facility_type] passed through an IAN storm!.", "Ian Alert") /datum/event/ianstorm/start() spawn() diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 8cb4abe960..063d460af9 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -79,7 +79,7 @@ /datum/event/infestation/announce() - command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding all over the facility. Clear them out, before this starts to affect productivity.", "Vermin infestation") + GLOB.command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding all over the facility. Clear them out, before this starts to affect productivity.", "Vermin infestation") #undef VERM_MICE #undef VERM_LIZARDS diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 3e526814b0..3e7bf39d74 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -22,7 +22,7 @@ announceWhen = endWhen + rand(250, 400) /datum/event/ionstorm/announce() - command_announcement.Announce("It has come to our attention that \the [location_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") + GLOB.command_announcement.Announce("It has come to our attention that \the [location_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") /datum/event/ionstorm/start() for (var/mob/living/carbon/human/player in GLOB.player_list) diff --git a/code/modules/events/jellyfish_migration.dm b/code/modules/events/jellyfish_migration.dm index 55f252de09..a5dda47a93 100644 --- a/code/modules/events/jellyfish_migration.dm +++ b/code/modules/events/jellyfish_migration.dm @@ -20,7 +20,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by." else announcement = "Unknown biological [spawned_jellyfish.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event/jellyfish_migration/tick() if(activeFor % 5 != 0) diff --git a/code/modules/events/meteor_strike_vr.dm b/code/modules/events/meteor_strike_vr.dm index 12c271c987..c4ff35d582 100644 --- a/code/modules/events/meteor_strike_vr.dm +++ b/code/modules/events/meteor_strike_vr.dm @@ -11,7 +11,7 @@ kill() /datum/event/meteor_strike/announce() - command_announcement.Announce("A meteoroid has been detected entering the atmosphere on a trajectory that will terminate near the surface facilty. Brace for impact.", "NanoTrasen Orbital Monitoring") + GLOB.command_announcement.Announce("A meteoroid has been detected entering the atmosphere on a trajectory that will terminate near the surface facilty. Brace for impact.", "NanoTrasen Orbital Monitoring") /datum/event/meteor_strike/start() new /obj/effect/meteor_falling(strike_target) diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index a5765228c0..e306956353 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -28,9 +28,9 @@ if(!victim) switch(severity) if(EVENT_LEVEL_MAJOR) - command_announcement.Announce("Meteors have been detected on collision course with \the [location_name()].", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') + GLOB.command_announcement.Announce("Meteors have been detected on collision course with \the [location_name()].", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') else - command_announcement.Announce("\The [location_name()] is now in a meteor shower.", "Meteor Alert") + GLOB.command_announcement.Announce("\The [location_name()] is now in a meteor shower.", "Meteor Alert") /datum/event/meteor_wave/tick() // Begin sending the alarm signals to shield diffusers so the field is already regenerated (if it exists) by the time actual meteors start flying around. @@ -63,9 +63,9 @@ if(!victim) switch(severity) if(EVENT_LEVEL_MAJOR) - command_announcement.Announce("\The [location_name()] has cleared the meteor storm.", "Meteor Alert") + GLOB.command_announcement.Announce("\The [location_name()] has cleared the meteor storm.", "Meteor Alert") else - command_announcement.Announce("\The [location_name()] has cleared the meteor shower", "Meteor Alert") + GLOB.command_announcement.Announce("\The [location_name()] has cleared the meteor shower", "Meteor Alert") /datum/event/meteor_wave/proc/get_meteors() switch(severity) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 757253bc0c..e4049341e1 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -37,7 +37,7 @@ /datum/event/prison_break/announce() if(areas && areas.len > 0) - command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Involvement of [using_map.facility_type] AI is recommended.", "[eventDept] Alert") + GLOB.command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Involvement of [using_map.facility_type] AI is recommended.", "[eventDept] Alert") /datum/event/prison_break/start() diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 7de8de8162..df9ce8af95 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -9,14 +9,14 @@ var/postStartTicks = 0 /datum/event/radiation_storm/announce() - command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please evacuate into one of the shielded maintenance tunnels or dorms.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') //VOREStation Edit - Dorms ref + GLOB.command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please evacuate into one of the shielded maintenance tunnels or dorms.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') //VOREStation Edit - Dorms ref /datum/event/radiation_storm/start() make_maint_all_access() /datum/event/radiation_storm/tick() if(activeFor == enterBelt) - command_announcement.Announce("The [using_map.facility_type] has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") + GLOB.command_announcement.Announce("The [using_map.facility_type] has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") radiate() if(activeFor >= enterBelt && activeFor <= leaveBelt) @@ -27,7 +27,7 @@ radiate() else if(activeFor == leaveBelt) - command_announcement.Announce("The [using_map.facility_type] has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") + GLOB.command_announcement.Announce("The [using_map.facility_type] has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") /datum/event/radiation_storm/proc/radiate() var/radiation_level = rand(15, 35) for(var/z in using_map.station_levels) diff --git a/code/modules/events/ray_migration.dm b/code/modules/events/ray_migration.dm index cdb3985ccd..ccdb7fb84d 100644 --- a/code/modules/events/ray_migration.dm +++ b/code/modules/events/ray_migration.dm @@ -20,7 +20,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by." else announcement = "Unknown biological [spawned_ray.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event/ray_migration/tick() if(activeFor % 5 != 0) diff --git a/code/modules/events/roaming_wildlife.dm b/code/modules/events/roaming_wildlife.dm index fbb7deb770..7f5b0a51ac 100644 --- a/code/modules/events/roaming_wildlife.dm +++ b/code/modules/events/roaming_wildlife.dm @@ -95,4 +95,4 @@ var/message = "Movements of [gamount_message] group[location_amount == 1 ? "" : "s"] of wildlife have been detected in regions surrounding [using_map.full_name]. The wildlife group[location_amount == 1 ? "" : "s"] [location_amount == 1 ? "is" : "are"] [threat_message] and \ [location_amount == 1 ? "is" : "are"] comprised of [amount_message].[threat_level > 2 ? " Take caution." : ""]" - command_announcement.Announce(message, "Wildlife Monitoring") + GLOB.command_announcement.Announce(message, "Wildlife Monitoring") diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 221ada8760..d768fade46 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -22,7 +22,6 @@ /datum/event/rogue_drone/announce() var/msg var/rng = rand(1,5) - //VOREStation Edit Start switch(rng) if(1) msg = "A combat drone wing operating in close orbit above Virgo 3b has failed to return from a anti-piracy sweep. If any are sighted, \ @@ -36,8 +35,7 @@ msg = "A passing derelict ship's drone defense systems have just activated. If any are sighted in the area, use caution." if(5) msg = "We're detecting a swarm of small objects approaching your [using_map.facility_type]. Most likely a bunch of drones. Please exercise caution if you see any." - //VOREStation Edit End - command_announcement.Announce(msg, "Rogue drone alert") + GLOB.command_announcement.Announce(msg, "Rogue drone alert") /datum/event/rogue_drone/end() var/num_recovered = 0 @@ -52,6 +50,6 @@ num_recovered++ if(num_recovered > drones_list.len * 0.75) - command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert") + GLOB.command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert") else - command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") + GLOB.command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") diff --git a/code/modules/events/shark_migration.dm b/code/modules/events/shark_migration.dm index be8661d537..10b0ad4eda 100644 --- a/code/modules/events/shark_migration.dm +++ b/code/modules/events/shark_migration.dm @@ -20,7 +20,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by." else announcement = "Unknown biological [spawned_shark.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event/shark_migration/tick() if(activeFor % 5 != 0) diff --git a/code/modules/events/solar_storm.dm b/code/modules/events/solar_storm.dm index 53367a6772..2cdf2ff8b5 100644 --- a/code/modules/events/solar_storm.dm +++ b/code/modules/events/solar_storm.dm @@ -9,7 +9,7 @@ endWhen = startWhen + rand(30,90) + rand(30,90) //2-6 minute duration /datum/event/solar_storm/announce() - command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. Please halt all EVA activites immediately and return to the interior of the [using_map.facility_type].", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') + GLOB.command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. Please halt all EVA activites immediately and return to the interior of the [using_map.facility_type].", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') adjust_solar_output(1.5) /datum/event/solar_storm/proc/adjust_solar_output(var/mult = 1) @@ -18,7 +18,7 @@ /datum/event/solar_storm/start() - command_announcement.Announce("The solar storm has reached the [using_map.facility_type]. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert") + GLOB.command_announcement.Announce("The solar storm has reached the [using_map.facility_type]. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert") adjust_solar_output(5) @@ -40,7 +40,7 @@ L.rad_act(rand(15, 30)) /datum/event/solar_storm/end() - command_announcement.Announce("The solar storm has passed the [using_map.facility_type]. It is now safe to resume EVA activities. Please report to medbay if you experience any unusual symptoms. ", "Anomaly Alert") + GLOB.command_announcement.Announce("The solar storm has passed the [using_map.facility_type]. It is now safe to resume EVA activities. Please report to medbay if you experience any unusual symptoms. ", "Anomaly Alert") adjust_solar_output() diff --git a/code/modules/events/spacefish_migration.dm b/code/modules/events/spacefish_migration.dm index f1a490f9fa..645bf137cf 100644 --- a/code/modules/events/spacefish_migration.dm +++ b/code/modules/events/spacefish_migration.dm @@ -35,7 +35,7 @@ announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by." else announcement = "Unknown biological [spawned_fish.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event/spacefish_migration/tick() if(activeFor % 5 != 0) diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 0bf3eedf86..2ec261f9eb 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -11,7 +11,7 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0) GLOB.sent_spiders_to_station = 0 /datum/event/spider_infestation/announce() - command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') + GLOB.command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/spider_infestation/start() diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index 892e93b773..bf9b9123c6 100644 --- a/code/modules/events/supply_demand_vr.dm +++ b/code/modules/events/supply_demand_vr.dm @@ -1,4 +1,4 @@ -/var/global/running_demand_events = list() +GLOBAL_LIST_EMPTY_TYPED(running_demand_events, /datum/event/supply_demand) // // The Supply Demand Event - CentCom asks for us to put some stuff on the shuttle @@ -14,7 +14,7 @@ /datum/event/supply_demand/setup() my_department = "[using_map.company_name] Supply Division" // Can't have company name in initial value (not const) end_time = world.time + 1 HOUR + (severity * 30 MINUTES) - running_demand_events += src + GLOB.running_demand_events += src // Decide what items are requried! // We base this on what departmets are most active, excluding departments we don't have var/list/notHaveDeptList = GLOB.metric.departments.Copy() @@ -57,7 +57,7 @@ send_console_message(message, dpt); // Also announce over main comms so people know to look - command_announcement.Announce("An order for the [using_map.facility_type] to deliver supplies to [command_name()] has been delivered to all supply Request Consoles", my_department) + GLOB.command_announcement.Announce("An order for the [using_map.facility_type] to deliver supplies to [command_name()] has been delivered to all supply Request Consoles", my_department) RegisterSignal(SSdcs, COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART, PROC_REF(handle_supply_demand_sell_shuttle)) /datum/event/supply_demand/tick() @@ -65,7 +65,7 @@ endWhen = activeFor // End early becuase we're done already! /datum/event/supply_demand/end() - running_demand_events -= src + GLOB.running_demand_events -= src UnregisterSignal(SSdcs, COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART) // Check if the crew succeeded or failed! if(required_items.len == 0) @@ -74,11 +74,11 @@ var/msg = "Great work! With those items you delivered our inventory levels all match up. " msg += "[capitalize(pick(GLOB.first_names_female))] from accounting will have nothing to complain about. " msg += "I think you'll find a little something in your supply account." - command_announcement.Announce(msg, my_department) + GLOB.command_announcement.Announce(msg, my_department) else // Fail! var/datum/supply_demand_order/random = pick(required_items) - command_announcement.Announce("What happened? Accounting is here right now and they're already asking where that [random.name] is. Damn, I gotta go", my_department) + GLOB.command_announcement.Announce("What happened? Accounting is here right now and they're already asking where that [random.name] is. Damn, I gotta go", my_department) var/message = "The delivery deadline was reached with the following needs outstanding:
" for(var/datum/supply_demand_order/req in required_items) message += req.describe() + "
" @@ -89,7 +89,7 @@ */ /datum/event/supply_demand/proc/handle_supply_demand_sell_shuttle(datum/source, list/area/supply_shuttle_areas) SIGNAL_HANDLER - for(var/datum/event/supply_demand/E in running_demand_events) + for(var/datum/event/supply_demand/E in GLOB.running_demand_events) // I don't think multiple supply shuttles have ever been used, but retaining support regardless... for(var/area/sub_area in supply_shuttle_areas) E.handle_sold_shuttle(sub_area) diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm index 677a4698a6..fe588d56ca 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -18,7 +18,7 @@ /datum/event/wallrot/announce() if(center) - command_announcement.Announce("Harmful fungi detected on \the [station_name()] and [using_map.facility_type] structures nearby [center.loc.name] may be contaminated.", "Biohazard Alert") + GLOB.command_announcement.Announce("Harmful fungi detected on \the [station_name()] and [using_map.facility_type] structures nearby [center.loc.name] may be contaminated.", "Biohazard Alert") /datum/event/wallrot/start() spawn() diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index dd715d4b21..8c65304839 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -1,5 +1,5 @@ -var/list/dreams = list( +GLOBAL_LIST_INIT(dreams, list( "an ID card","a bottle","a familiar face","a crewmember","a toolbox","a " + JOB_SECURITY_OFFICER,"the " + JOB_SITE_MANAGER, "voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness", "light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun", @@ -15,19 +15,17 @@ var/list/dreams = list( "a Teshari", "a Diona nymph","the supermatter","Major Bill","a Morpheus ship with a ridiculous name","the Exodus","a star", "a Dionaea gestalt","the chapel","a distant scream","endless chittering noises","glowing eyes in the shadows","an empty glass", "a disoriented Promethean","towers of plastic","a Gygax","a synthetic","a Man-Machine Interface","maintenance drones", - "unintelligible writings","a Fleet ship", - //VOREStation Additions after this - "slimey surroundings","a sexy squirrel","licking their lips","a gaping maw","an unlikely predator","sinking inside", + "unintelligible writings","a Fleet ship", "slimey surroundings","a sexy squirrel","licking their lips","a gaping maw","an unlikely predator","sinking inside", "vulpine assets","more dakka","churning guts","pools of fluid","an exceptional grip","mawing in faces","gaping throat", "swallowed whole","a fox","a wolf","a cat","a tiger","a dog","a taur","a xenochimera" - ) + )) /mob/living/carbon/proc/dream() dreaming = 1 spawn(0) for(var/i = rand(1,4),i > 0, i--) - to_chat(src, span_infoplain(span_blue(span_italics("... [pick(dreams)] ...")))) + to_chat(src, span_infoplain(span_blue(span_italics("... [pick(GLOB.dreams)] ...")))) sleep(rand(40,70)) if(paralysis <= 0) dreaming = 0 diff --git a/code/modules/food/food/lunch.dm b/code/modules/food/food/lunch.dm index 98b458bdb4..d6592bf5a6 100644 --- a/code/modules/food/food/lunch.dm +++ b/code/modules/food/food/lunch.dm @@ -1,4 +1,4 @@ -var/list/lunchables_lunches_ = list(/obj/item/reagent_containers/food/snacks/sandwich, +GLOBAL_LIST_INIT(lunchables_lunches, list(/obj/item/reagent_containers/food/snacks/sandwich, /obj/item/reagent_containers/food/snacks/slice/meatbread/filled, /obj/item/reagent_containers/food/snacks/slice/tofubread/filled, /obj/item/reagent_containers/food/snacks/slice/creamcheesebread/filled, @@ -29,9 +29,10 @@ var/list/lunchables_lunches_ = list(/obj/item/reagent_containers/food/snacks/san /obj/item/reagent_containers/food/snacks/packaged/sausageroll, /obj/item/reagent_containers/food/snacks/packaged/pasty, /obj/item/reagent_containers/food/snacks/packaged/scotchegg, - /obj/item/reagent_containers/food/snacks/packaged/porkpie) + /obj/item/reagent_containers/food/snacks/packaged/porkpie + )) -var/list/lunchables_snacks_ = list(/obj/item/reagent_containers/food/snacks/donut/plain/jelly, +GLOBAL_LIST_INIT(lunchables_snacks, list(/obj/item/reagent_containers/food/snacks/donut/plain/jelly, /obj/item/reagent_containers/food/snacks/donut/plain/jelly/cherryjelly, /obj/item/reagent_containers/food/snacks/muffin, /obj/item/reagent_containers/food/snacks/popcorn, @@ -83,9 +84,9 @@ var/list/lunchables_snacks_ = list(/obj/item/reagent_containers/food/snacks/donu /obj/item/storage/box/winegum, /obj/item/storage/box/custardcream, /obj/item/storage/box/bourbon - ) + )) -var/list/lunchables_drinks_ = list(/obj/item/reagent_containers/food/drinks/cans/cola, +GLOBAL_LIST_INIT(lunchables_drinks, list(/obj/item/reagent_containers/food/drinks/cans/cola, /obj/item/reagent_containers/food/drinks/cans/waterbottle, /obj/item/reagent_containers/food/drinks/cans/decaf_cola, /obj/item/reagent_containers/food/drinks/cans/space_mountain_wind, @@ -113,10 +114,10 @@ var/list/lunchables_drinks_ = list(/obj/item/reagent_containers/food/drinks/cans /obj/item/reagent_containers/food/drinks/cans/nukie_rose, /obj/item/reagent_containers/food/drinks/cans/nukie_lemon, /obj/item/reagent_containers/food/drinks/cans/nukie_fruit - ) + )) // This default list is a bit different, it contains items we don't want -var/list/lunchables_drink_reagents_ = list(/datum/reagent/drink/nothing, +GLOBAL_LIST_INIT(lunchables_drink_reagents, list(/datum/reagent/drink/nothing, /datum/reagent/drink/doctor_delight, /datum/reagent/drink/dry_ramen, /datum/reagent/drink/hell_ramen, @@ -130,11 +131,12 @@ var/list/lunchables_drink_reagents_ = list(/datum/reagent/drink/nothing, /datum/reagent/drink/coffee/nukie/mega/fast, /datum/reagent/drink/coffee/nukie/mega/high, /datum/reagent/drink/coffee/nukie/mega/shrink, - /datum/reagent/drink/coffee/nukie/mega/grow) + /datum/reagent/drink/coffee/nukie/mega/grow + )) // This default list is a bit different, it contains items we don't want -var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit, +GLOBAL_LIST_INIT(lunchables_ethanol_reagents, list(/datum/reagent/ethanol/acid_spit, /datum/reagent/ethanol/atomicbomb, /datum/reagent/ethanol/beepsky_smash, /datum/reagent/ethanol/coffee, @@ -148,32 +150,33 @@ var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit, /datum/reagent/ethanol/toxins_special, /datum/reagent/ethanol/voxdelight, /datum/reagent/ethanol/soemmerfire, - /datum/reagent/ethanol/slimeshot) + /datum/reagent/ethanol/slimeshot + )) /proc/lunchables_lunches() - if(!(lunchables_lunches_[lunchables_lunches_[1]])) - lunchables_lunches_ = init_lunchable_list(lunchables_lunches_) - return lunchables_lunches_ + if(!(GLOB.lunchables_lunches[GLOB.lunchables_lunches[1]])) + GLOB.lunchables_lunches = init_lunchable_list(GLOB.lunchables_lunches) + return GLOB.lunchables_lunches /proc/lunchables_snacks() - if(!(lunchables_snacks_[lunchables_snacks_[1]])) - lunchables_snacks_ = init_lunchable_list(lunchables_snacks_) - return lunchables_snacks_ + if(!(GLOB.lunchables_snacks[GLOB.lunchables_snacks[1]])) + GLOB.lunchables_snacks = init_lunchable_list(GLOB.lunchables_snacks) + return GLOB.lunchables_snacks /proc/lunchables_drinks() - if(!(lunchables_drinks_[lunchables_drinks_[1]])) - lunchables_drinks_ = init_lunchable_list(lunchables_drinks_) - return lunchables_drinks_ + if(!(GLOB.lunchables_drinks[GLOB.lunchables_drinks[1]])) + GLOB.lunchables_drinks = init_lunchable_list(GLOB.lunchables_drinks) + return GLOB.lunchables_drinks /proc/lunchables_drink_reagents() - if(!(lunchables_drink_reagents_[lunchables_drink_reagents_[1]])) - lunchables_drink_reagents_ = init_lunchable_reagent_list(lunchables_drink_reagents_, /datum/reagent/drink) - return lunchables_drink_reagents_ + if(!(GLOB.lunchables_drink_reagents[GLOB.lunchables_drink_reagents[1]])) + GLOB.lunchables_drink_reagents = init_lunchable_reagent_list(GLOB.lunchables_drink_reagents, /datum/reagent/drink) + return GLOB.lunchables_drink_reagents /proc/lunchables_ethanol_reagents() - if(!(lunchables_ethanol_reagents_[lunchables_ethanol_reagents_[1]])) - lunchables_ethanol_reagents_ = init_lunchable_reagent_list(lunchables_ethanol_reagents_, /datum/reagent/ethanol) - return lunchables_ethanol_reagents_ + if(!(GLOB.lunchables_ethanol_reagents[GLOB.lunchables_ethanol_reagents[1]])) + GLOB.lunchables_ethanol_reagents = init_lunchable_reagent_list(GLOB.lunchables_ethanol_reagents, /datum/reagent/ethanol) + return GLOB.lunchables_ethanol_reagents /proc/init_lunchable_list(var/list/lunches) . = list() diff --git a/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm b/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm index 9e9a54f191..1d26ec605e 100644 --- a/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm +++ b/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm @@ -43,7 +43,7 @@ message = "The [record_class_to_delete] record database server has suffered a hardware failure, and is no longer functional. \ A temporary replacement server has been activated, containing recovered data from the main server. \ A few records became corrupted, and could not be transferred." - command_announcement.Announce(message, author) + GLOB.command_announcement.Announce(message, author) /datum/event2/event/manifest_malfunction/start() for(var/i = 1 to records_to_delete) diff --git a/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm b/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm index b4f837840a..acad80594e 100644 --- a/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm +++ b/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm @@ -82,7 +82,7 @@ /datum/event2/event/airlock_failure/announce() if(prob(announce_odds)) - command_announcement.Announce("An electrical issue has been detected in the airlock grid at [english_list(affected_areas)]. \ + GLOB.command_announcement.Announce("An electrical issue has been detected in the airlock grid at [english_list(affected_areas)]. \ Some airlocks may require servicing by a qualified technician.", "Electrical Alert") diff --git a/code/modules/gamemaster/event2/events/engineering/blob.dm b/code/modules/gamemaster/event2/events/engineering/blob.dm index ae04ee2864..603da29755 100644 --- a/code/modules/gamemaster/event2/events/engineering/blob.dm +++ b/code/modules/gamemaster/event2/events/engineering/blob.dm @@ -157,4 +157,4 @@ if(danger_level >= BLOB_DIFFICULTY_SUPERHARD) lines += "Extreme caution is advised." - command_announcement.Announce(lines.Join("\n"), "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') + GLOB.command_announcement.Announce(lines.Join("\n"), "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') diff --git a/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm b/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm index 3acee05543..3713abac97 100644 --- a/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm +++ b/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm @@ -33,7 +33,7 @@ /datum/event2/event/brand_intelligence/announce() if(prob(90)) - command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard \the [location_name()], \ + GLOB.command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard \the [location_name()], \ which appears to transmit to nearby vendors. The original infected machine is believed to be \a [vender_zero].", "Vendor Service Alert") /datum/event2/event/brand_intelligence/start() diff --git a/code/modules/gamemaster/event2/events/engineering/dust.dm b/code/modules/gamemaster/event2/events/engineering/dust.dm index ecdfd18cde..29201d32ba 100644 --- a/code/modules/gamemaster/event2/events/engineering/dust.dm +++ b/code/modules/gamemaster/event2/events/engineering/dust.dm @@ -13,7 +13,7 @@ /datum/event2/event/dust/announce() if(prob(33)) - command_announcement.Announce("Dust has been detected on a collision course with \the [location_name()].") + GLOB.command_announcement.Announce("Dust has been detected on a collision course with \the [location_name()].") /datum/event2/event/dust/start() dust_swarm("norm") diff --git a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm index 7e70a9e5a7..2fb032ba75 100644 --- a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm +++ b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm @@ -31,7 +31,7 @@ /datum/event2/event/gas_leak/announce() if(chosen_turf) - command_announcement.Announce("Warning, hazardous [lowertext(GLOB.gas_data.name[chosen_gas])] gas leak detected in \the [chosen_turf.loc], evacuate the area.", "Hazard Alert") + GLOB.command_announcement.Announce("Warning, hazardous [lowertext(GLOB.gas_data.name[chosen_gas])] gas leak detected in \the [chosen_turf.loc], evacuate the area.", "Hazard Alert") /datum/event2/event/gas_leak/start() // Okay, time to actually put the gas in the room! diff --git a/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm b/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm index 9704593b6a..c8e7893906 100644 --- a/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm +++ b/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm @@ -55,7 +55,7 @@ /datum/event2/event/meteor_defense/announce() var/announcement = "Meteors are expected to approach from the [dir_text] side, in approximately [DisplayTimeText(time_to_start - world.time, 60)]." - command_announcement.Announce(announcement, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') + GLOB.command_announcement.Announce(announcement, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') /datum/event2/event/meteor_defense/wait_tick() if(!soon_announced) @@ -63,10 +63,10 @@ soon_announced = TRUE var/announcement = "The incoming meteors are expected to approach from the [dir_text] side. \ ETA to arrival is approximately [DisplayTimeText(time_to_start - world.time, 60)]." - command_announcement.Announce(announcement, "Meteor Alert - Update") + GLOB.command_announcement.Announce(announcement, "Meteor Alert - Update") /datum/event2/event/meteor_defense/start() - command_announcement.Announce("Incoming meteors approach from \the [dir_text] side!", "Meteor Alert - Update") + GLOB.command_announcement.Announce("Incoming meteors approach from \the [dir_text] side!", "Meteor Alert - Update") /datum/event2/event/meteor_defense/event_tick() if(world.time > last_wave_time + wave_delay) @@ -80,4 +80,4 @@ return waves <= 0 /datum/event2/event/meteor_defense/end() - command_announcement.Announce("\The [location_name()] will clear the incoming meteors in a moment.", "Meteor Alert - Update") + GLOB.command_announcement.Announce("\The [location_name()] will clear the incoming meteors in a moment.", "Meteor Alert - Update") diff --git a/code/modules/gamemaster/event2/events/engineering/wallrot.dm b/code/modules/gamemaster/event2/events/engineering/wallrot.dm index 4462cff158..f567211e82 100644 --- a/code/modules/gamemaster/event2/events/engineering/wallrot.dm +++ b/code/modules/gamemaster/event2/events/engineering/wallrot.dm @@ -26,7 +26,7 @@ /datum/event2/event/wallrot/announce() if(origin && prob(80)) - command_announcement.Announce("Harmful fungi detected on \the [location_name()], near \the [origin.loc]. \ + GLOB.command_announcement.Announce("Harmful fungi detected on \the [location_name()], near \the [origin.loc]. \ Station structural integrity may be compromised.", "Biohazard Alert") /datum/event2/event/wallrot/start() diff --git a/code/modules/gamemaster/event2/events/engineering/window_break.dm b/code/modules/gamemaster/event2/events/engineering/window_break.dm index 76e9bc31a4..fbfb432bdf 100644 --- a/code/modules/gamemaster/event2/events/engineering/window_break.dm +++ b/code/modules/gamemaster/event2/events/engineering/window_break.dm @@ -53,7 +53,7 @@ /datum/event2/event/window_break/announce() if(chosen_window) - command_announcement.Announce("Structural integrity of space-facing windows at \the [get_area(chosen_turf_with_windows)] are failing. \ + GLOB.command_announcement.Announce("Structural integrity of space-facing windows at \the [get_area(chosen_turf_with_windows)] are failing. \ Repair of the damaged window is advised. Personnel without EVA suits in the area should leave until repairs are complete.", "Structural Alert") /datum/event2/event/window_break/start() diff --git a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm index 6932fea2e7..30111eebb2 100644 --- a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm +++ b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm @@ -19,7 +19,7 @@ "Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \ "#4nd%;f4y6,>£%-BZZZZZZZT") if(prob(33)) - command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg') + GLOB.command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg') // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, span_boldwarning("
")) @@ -30,12 +30,12 @@ if(prob(50)) // One in two chance for the radios to turn i%t# t&_)#%, which can be more alarming than radio silence. log_game("Doing partial outage of telecomms.") - for(var/obj/machinery/telecomms/processor/P in telecomms_list) + for(var/obj/machinery/telecomms/processor/P in GLOB.telecomms_list) P.emp_act(1) else // Otherwise just shut everything down, madagascar style. log_game("Doing complete outage of telecomms.") - for(var/obj/machinery/telecomms/T in telecomms_list) + for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) T.emp_act(1) // Communicators go down no matter what. diff --git a/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm b/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm index 5aad4f0bda..6b25bbd322 100644 --- a/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm +++ b/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm @@ -30,7 +30,7 @@ /datum/event2/event/electrical_fault/announce() // Trying to be vague to avoid 'space lightning storms'. // This could be re-flavored to be a solar flare or something and have robots outside be sad. - command_announcement.Announce("External conditions near \the [location_name()] are likely \ + GLOB.command_announcement.Announce("External conditions near \the [location_name()] are likely \ to cause voltage spikes and other electrical issues very soon. Please secure sensitive electrical equipment until the situation passes.", "[location_name()] Sensor Array") /datum/event2/event/electrical_fault/set_up() @@ -43,7 +43,7 @@ valid_apcs += A /datum/event2/event/electrical_fault/start() - command_announcement.Announce("Irregularities detected in \the [location_name()] power grid.", "[location_name()] Power Grid Monitoring") + GLOB.command_announcement.Announce("Irregularities detected in \the [location_name()] power grid.", "[location_name()] Power Grid Monitoring") /datum/event2/event/electrical_fault/event_tick() if(!valid_apcs.len) @@ -59,7 +59,7 @@ affect_apc(A) /datum/event2/event/electrical_fault/end() - command_announcement.Announce("The irregular electrical conditions inside \the [location_name()] power grid has ceased.", "[location_name()] Power Grid Monitoring") + GLOB.command_announcement.Announce("The irregular electrical conditions inside \the [location_name()] power grid has ceased.", "[location_name()] Power Grid Monitoring") log_game("Electrical Fault event caused [apcs_disabled] APC\s to shut off, \ [apcs_overloaded] APC\s to overload lighting, and [apcs_emagged] APC\s to be emagged.") diff --git a/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm b/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm index 62a92f9642..a53799497c 100644 --- a/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm +++ b/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm @@ -18,7 +18,7 @@ var/list/generators = list() /datum/event2/event/gravity/announce() - command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure") + GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure") /datum/event2/event/gravity/start() GLOB.gravity_is_on = FALSE @@ -42,4 +42,4 @@ did_anything = TRUE if(did_anything) - command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored") + GLOB.command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored") diff --git a/code/modules/gamemaster/event2/events/everyone/infestation.dm b/code/modules/gamemaster/event2/events/everyone/infestation.dm index 3c83c09f6a..5afa83dfe1 100644 --- a/code/modules/gamemaster/event2/events/everyone/infestation.dm +++ b/code/modules/gamemaster/event2/events/everyone/infestation.dm @@ -64,7 +64,7 @@ /datum/event2/event/infestation/announce() var/turf/T = turfs[1] - command_announcement.Announce("Bioscans indicate that [vermin_string] have been breeding \ + GLOB.command_announcement.Announce("Bioscans indicate that [vermin_string] have been breeding \ in \the [T.loc]. Clear them out, before this starts to affect productivity.", "Vermin infestation") diff --git a/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm b/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm index 0ccf78aa06..84db701727 100644 --- a/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm @@ -17,12 +17,12 @@ length_lower_bound = 1 MINUTE /datum/event2/event/radiation_storm/announce() - command_announcement.Announce("High levels of radiation detected near \the [location_name()]. \ + GLOB.command_announcement.Announce("High levels of radiation detected near \the [location_name()]. \ Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') make_maint_all_access() /datum/event2/event/radiation_storm/start() - command_announcement.Announce("The station has entered the radiation belt. \ + GLOB.command_announcement.Announce("The station has entered the radiation belt. \ Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") /datum/event2/event/radiation_storm/event_tick() @@ -34,7 +34,7 @@ SSradiation.z_radiate(locate(1, 1, z), radiation_level, 1) /datum/event2/event/radiation_storm/end() - command_announcement.Announce("The station has passed the radiation belt. \ + GLOB.command_announcement.Announce("The station has passed the radiation belt. \ Please allow for up to one minute while radiation levels dissipate, and report to \ medbay if you experience any unusual symptoms. Maintenance will lose all \ access again shortly.", "Anomaly Alert") diff --git a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm index 86fc6dc7b9..15c3ab66b5 100644 --- a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm @@ -17,19 +17,19 @@ var/base_solar_gen_rate = null /datum/event2/event/solar_storm/announce() - command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. \ + GLOB.command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. \ Please halt all EVA activites immediately and return to the interior of the station.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') adjust_solar_output(1.5) /datum/event2/event/solar_storm/start() - command_announcement.Announce("The solar storm has reached the station. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert") + GLOB.command_announcement.Announce("The solar storm has reached the station. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert") adjust_solar_output(5) /datum/event2/event/solar_storm/event_tick() radiate() /datum/event2/event/solar_storm/end() - command_announcement.Announce("The solar storm has passed the station. It is now safe to resume EVA activities. \ + GLOB.command_announcement.Announce("The solar storm has passed the station. It is now safe to resume EVA activities. \ Please report to medbay if you experience any unusual symptoms.", "Anomaly Alert") adjust_solar_output(1) diff --git a/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm b/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm index faeead87e3..81230496e9 100644 --- a/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm +++ b/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm @@ -24,7 +24,7 @@ /datum/event2/event/sudden_weather_shift/announce() if(!chosen_planet) return - command_announcement.Announce("Local weather patterns on [chosen_planet.name] suggest that a \ + GLOB.command_announcement.Announce("Local weather patterns on [chosen_planet.name] suggest that a \ sudden atmospheric fluctuation has occurred. All groundside personnel should be wary of \ rapidly deteriorating conditions.", "Weather Alert") diff --git a/code/modules/gamemaster/event2/events/security/carp_migration.dm b/code/modules/gamemaster/event2/events/security/carp_migration.dm index 6b44023aa7..791053573d 100644 --- a/code/modules/gamemaster/event2/events/security/carp_migration.dm +++ b/code/modules/gamemaster/event2/events/security/carp_migration.dm @@ -24,7 +24,7 @@ /datum/event2/event/mob_spawning/carp_migration/announce() var/announcement = "Unknown biological entities been detected near \the [location_name()], please stand-by." - command_announcement.Announce(announcement, "Lifesign Alert") + GLOB.command_announcement.Announce(announcement, "Lifesign Alert") /datum/event2/event/mob_spawning/carp_migration/event_tick() if(last_carp_wave_time + carp_wave_cooldown > world.time) diff --git a/code/modules/gamemaster/event2/events/security/drill_announcement.dm b/code/modules/gamemaster/event2/events/security/drill_announcement.dm index 36d667a2c3..57c8b61d5d 100644 --- a/code/modules/gamemaster/event2/events/security/drill_announcement.dm +++ b/code/modules/gamemaster/event2/events/security/drill_announcement.dm @@ -17,6 +17,6 @@ return (sec * 5) + ((everyone - sec) * 1.5) /datum/event2/event/security_drill/announce() - command_announcement.Announce("[pick("A NanoTrasen security director", "A Vir-Gov correspondant", "Local Sif authoritiy")] \ + GLOB.command_announcement.Announce("[pick("A NanoTrasen security director", "A Vir-Gov correspondant", "Local Sif authoritiy")] \ has advised the enactment of [pick("a rampant wildlife", "a fire", "a hostile boarding", \ "a bomb", "an emergent intelligence")] drill with the personnel onboard \the [location_name()].", "Security Advisement") diff --git a/code/modules/gamemaster/event2/events/security/prison_break.dm b/code/modules/gamemaster/event2/events/security/prison_break.dm index bcdbd11048..39ad13b514 100644 --- a/code/modules/gamemaster/event2/events/security/prison_break.dm +++ b/code/modules/gamemaster/event2/events/security/prison_break.dm @@ -223,7 +223,7 @@ // There's between 40 seconds and one minute before the whole station knows. // If there's a baddie engineer, they can choose to keep their early announcement to themselves and get a minute to exploit it. /datum/event2/event/prison_break/end() - command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] was detected \ + GLOB.command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] was detected \ in \the [location_name()] [area_display_name] [containment_display_desc] subroutines. Secure any compromised \ areas immediately. AI involvement is recommended.", "[capitalize(containment_display_desc)] Alert") diff --git a/code/modules/gamemaster/event2/events/security/rogue_drones.dm b/code/modules/gamemaster/event2/events/security/rogue_drones.dm index d3f24b77df..31809496f2 100644 --- a/code/modules/gamemaster/event2/events/security/rogue_drones.dm +++ b/code/modules/gamemaster/event2/events/security/rogue_drones.dm @@ -40,7 +40,7 @@ msg = "We're detecting a swarm of small objects approaching your station. \ Most likely a bunch of drones. Please exercise caution if you see any." - command_announcement.Announce(msg, "Rogue drone alert") + GLOB.command_announcement.Announce(msg, "Rogue drone alert") /datum/event2/event/mob_spawning/rogue_drones/start() for(var/i = 1 to drones_to_spawn) @@ -65,6 +65,6 @@ number_recovered++ if(number_recovered > spawned_mobs.len * 0.75) - command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert") + GLOB.command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert") else - command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") + GLOB.command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") diff --git a/code/modules/gamemaster/event2/events/security/security_advisement.dm b/code/modules/gamemaster/event2/events/security/security_advisement.dm index 00af5d8916..4319028401 100644 --- a/code/modules/gamemaster/event2/events/security/security_advisement.dm +++ b/code/modules/gamemaster/event2/events/security/security_advisement.dm @@ -88,6 +88,6 @@ return /datum/event2/event/security_screening/announce() - command_announcement.Announce("[pick("A nearby Navy vessel", "A Solar official", "A Vir-Gov official", "A NanoTrasen board director")] has \ + GLOB.command_announcement.Announce("[pick("A nearby Navy vessel", "A Solar official", "A Vir-Gov official", "A NanoTrasen board director")] has \ requested the screening of [pick("every other", "every", "suspicious", "willing")] [victim] \ personnel onboard \the [location_name()].", "Security Advisement") diff --git a/code/modules/gamemaster/event2/events/security/spider_infestation.dm b/code/modules/gamemaster/event2/events/security/spider_infestation.dm index 94b26ad874..4c66560693 100644 --- a/code/modules/gamemaster/event2/events/security/spider_infestation.dm +++ b/code/modules/gamemaster/event2/events/security/spider_infestation.dm @@ -31,7 +31,7 @@ /datum/event2/event/spider_infestation/announce() - command_announcement.Announce("Unidentified lifesigns detected coming aboard \the [location_name()]. \ + GLOB.command_announcement.Announce("Unidentified lifesigns detected coming aboard \the [location_name()]. \ Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event2/event/spider_infestation/start() diff --git a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm index e27a997358..26e1d6fe1c 100644 --- a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm +++ b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm @@ -59,7 +59,7 @@ /datum/event2/event/ion_storm/announce() if(prob(announce_odds)) - command_announcement.Announce("An ion storm was detected within proximity to \the [location_name()] recently. \ + GLOB.command_announcement.Announce("An ion storm was detected within proximity to \the [location_name()] recently. \ Check all AI controlled equipment for corruption.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') // Fake variant used by traitors. diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 42474b6051..503fab41bf 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -320,7 +320,7 @@ /obj/item/stack/material/wax/Initialize(mapload) . = ..() - recipes = wax_recipes + recipes = GLOB.wax_recipes /datum/material/wax name = MAT_WAX diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index b76fa3f602..9f2a9e3c71 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -375,7 +375,7 @@ icon = 'icons/obj/hydroponics_misc.dmi' icon_state = "" -var/list/fruit_icon_cache = list() +GLOBAL_LIST_EMPTY(fruit_icon_cache) /obj/item/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, var/datum/seed/S) . = ..() @@ -391,13 +391,13 @@ var/list/fruit_icon_cache = list() var/rind_colour = S.get_trait(TRAIT_PRODUCT_COLOUR) var/flesh_colour = S.get_trait(TRAIT_FLESH_COLOUR) if(!flesh_colour) flesh_colour = rind_colour - if(!fruit_icon_cache["rind-[rind_colour]"]) + if(!GLOB.fruit_icon_cache["rind-[rind_colour]"]) var/image/I = image(icon,"fruit_rind") I.color = rind_colour - fruit_icon_cache["rind-[rind_colour]"] = I - add_overlay(fruit_icon_cache["rind-[rind_colour]"]) - if(!fruit_icon_cache["slice-[rind_colour]"]) + GLOB.fruit_icon_cache["rind-[rind_colour]"] = I + add_overlay(GLOB.fruit_icon_cache["rind-[rind_colour]"]) + if(!GLOB.fruit_icon_cache["slice-[rind_colour]"]) var/image/I = image(icon,"fruit_slice") I.color = flesh_colour - fruit_icon_cache["slice-[rind_colour]"] = I - add_overlay(fruit_icon_cache["slice-[rind_colour]"]) + GLOB.fruit_icon_cache["slice-[rind_colour]"] = I + add_overlay(GLOB.fruit_icon_cache["slice-[rind_colour]"]) diff --git a/code/modules/icon generation/Uristrunes.dm b/code/modules/icon generation/Uristrunes.dm index 4deff20821..7dae3229a9 100644 --- a/code/modules/icon generation/Uristrunes.dm +++ b/code/modules/icon generation/Uristrunes.dm @@ -115,7 +115,7 @@ //---------------------------------------- -/proc/animate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000", rune_color2 = "#00000000", border_color2 = "#d8380000", alpha = 255, alpha2 = 255, frames = rune_animation) +/proc/animate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000", rune_color2 = "#00000000", border_color2 = "#d8380000", alpha = 255, alpha2 = 255, frames = GLOB.rune_animation) var/rr1 = hex2num(copytext(rune_color, 2, 4)) var/rg1 = hex2num(copytext(rune_color, 4, 6)) var/rb1 = hex2num(copytext(rune_color, 6, 8)) @@ -143,7 +143,7 @@ return base -var/list/rune_animation = list( +GLOBAL_LIST_INIT(rune_animation, list( list(0.000, 5), list(0.020, 1), list(0.050, 1), @@ -166,15 +166,15 @@ var/list/rune_animation = list( list(0.375, 1), list(0.250, 1), list(0.125, 1), - ) + )) -/var/list/rune_cache = list() +GLOBAL_LIST_EMPTY(rune_cache) /proc/get_rune(rune_bits, animated = 0) var/lookup = "[rune_bits]-[animated]" - if(lookup in rune_cache) - return rune_cache[lookup] + if(lookup in GLOB.rune_cache) + return GLOB.rune_cache[lookup] var/icon/base = icon('icons/effects/uristrunes.dmi', "") @@ -190,7 +190,7 @@ var/list/rune_animation = list( else result = inanimate_rune(base) - rune_cache[lookup] = result + GLOB.rune_cache[lookup] = result return result diff --git a/code/modules/lighting/lighting_fake_sun_vr.dm b/code/modules/lighting/lighting_fake_sun_vr.dm index b7ce18bf8f..a1961de65d 100644 --- a/code/modules/lighting/lighting_fake_sun_vr.dm +++ b/code/modules/lighting/lighting_fake_sun_vr.dm @@ -1,4 +1,4 @@ -var/static/list/fake_sunlight_zs = list() +GLOBAL_LIST_EMPTY(fake_sunlight_zs) /obj/effect/fake_sun name = "fake sun" @@ -165,7 +165,7 @@ var/static/list/fake_sunlight_zs = list() sun.set_alpha(round(CLAMP01(choice["brightness"])*255,1)) if(do_sun) - fake_sunlight_zs |= z + GLOB.fake_sunlight_zs |= z for(var/turf/T as anything in turfs_to_use) sun.apply_to_turf(T) diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index 8a2e060023..dcddf325c8 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -96,14 +96,14 @@ ///Setter for the byond luminosity var /turf/proc/set_luminosity(new_luminosity, force) - if(((is_outdoors() && !force) || outdoors_adjacent) && (z in fake_sunlight_zs)) //Special exception for fakesun lit tiles + if(((is_outdoors() && !force) || outdoors_adjacent) && (z in GLOB.fake_sunlight_zs)) //Special exception for fakesun lit tiles return luminosity = new_luminosity ///Checks planets and fake_suns to see if our turf should be handled by either /turf/proc/check_for_sun() - if((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || (z in fake_sunlight_zs)) + if((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || (z in GLOB.fake_sunlight_zs)) return TRUE return FALSE diff --git a/code/modules/materials/sheets/metals/rods.dm b/code/modules/materials/sheets/metals/rods.dm index 81525231e8..da6e4c8827 100644 --- a/code/modules/materials/sheets/metals/rods.dm +++ b/code/modules/materials/sheets/metals/rods.dm @@ -28,7 +28,7 @@ /obj/item/stack/rods/Initialize(mapload) . = ..() - recipes = rods_recipes + recipes = GLOB.rods_recipes update_icon() /obj/item/stack/rods/update_icon() diff --git a/code/modules/media/media_player_vlc.dm b/code/modules/media/media_player_vlc.dm deleted file mode 100644 index 6d6cc09246..0000000000 --- a/code/modules/media/media_player_vlc.dm +++ /dev/null @@ -1,27 +0,0 @@ -// Open up VLC and play musique. -// Converted to VLC for cross-platform and ogg support. - N3X -var/const/PLAYER_VLC_HTML={" - - -"} diff --git a/code/modules/media/media_player_wmp.dm b/code/modules/media/media_player_wmp.dm deleted file mode 100644 index 43b64d5143..0000000000 --- a/code/modules/media/media_player_wmp.dm +++ /dev/null @@ -1,14 +0,0 @@ -// Legacy player using Windows Media Player OLE object. -// I guess it will work in IE on windows, and BYOND uses IE on windows, so alright! -var/const/PLAYER_WMP_HTML={" - - "} diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index b1efcaa20e..09fe0551db 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -1,4 +1,4 @@ -var/list/mining_overlay_cache = list() +GLOBAL_LIST_EMPTY(mining_overlay_cache) /**********************Mineral deposits**************************/ /turf/unsimulated/mineral @@ -185,7 +185,7 @@ var/list/mining_overlay_cache = list() /turf/simulated/mineral/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32) //Cache miss - if(!mining_overlay_cache["[cache_id]_[direction]"]) + if(!GLOB.mining_overlay_cache["[cache_id]_[direction]"]) var/image/new_cached_image = image(icon_state, dir = direction, layer = ABOVE_TURF_LAYER) switch(direction) if(NORTH) @@ -196,11 +196,11 @@ var/list/mining_overlay_cache = list() new_cached_image.pixel_x = offset if(WEST) new_cached_image.pixel_x = -offset - mining_overlay_cache["[cache_id]_[direction]"] = new_cached_image + GLOB.mining_overlay_cache["[cache_id]_[direction]"] = new_cached_image return new_cached_image //Cache hit - return mining_overlay_cache["[cache_id]_[direction]"] + return GLOB.mining_overlay_cache["[cache_id]_[direction]"] /turf/simulated/mineral/Initialize(mapload) . = ..() diff --git a/code/modules/mob/_modifiers/horror.dm b/code/modules/mob/_modifiers/horror.dm index b1609149ee..2ca28fce83 100644 --- a/code/modules/mob/_modifiers/horror.dm +++ b/code/modules/mob/_modifiers/horror.dm @@ -10,11 +10,11 @@ // This list needs expansion... Currently, we have very few proper redspace areas. // Tossing /area/redgate in here as well. Entering one of these areas (unless coded to do such) doesn't apply // the modifier, but if you're in one of these areas, you'll keep the modifier until you leave. -var/static/list/redspace_areas = list ( +GLOBAL_LIST_INIT(redspace_areas, list( /area/redspace_abduction, /area/redgate, /area/survivalpod/redspace // Redspace shelters effectively pull a bit of redspace into realspace, so -) +)) /datum/modifier/redspace_drain name = "redspace warp" @@ -29,7 +29,7 @@ var/static/list/redspace_areas = list ( var/mob/living/carbon/human/unfortunate_soul //The human target of our modifier. /datum/modifier/redspace_drain/can_apply(mob/living/L, suppress_output = TRUE) - if(ishuman(L) && !L.isSynthetic() && L.lastarea && is_type_in_list(L.lastarea, redspace_areas)) + if(ishuman(L) && !L.isSynthetic() && L.lastarea && is_type_in_list(L.lastarea, GLOB.redspace_areas)) return TRUE return FALSE @@ -62,7 +62,7 @@ var/static/list/redspace_areas = list ( /datum/modifier/redspace_drain/check_if_valid() //We don't call parent. This doesn't wear off without set conditions. if(holder.stat == DEAD) expire(silent = TRUE) - else if(holder.lastarea && !is_type_in_list(holder.lastarea, redspace_areas)) + else if(holder.lastarea && !is_type_in_list(holder.lastarea, GLOB.redspace_areas)) expire(silent = TRUE) /datum/modifier/redspace_drain/tick() diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 8b61ac4f69..ca9839b466 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -1,5 +1,3 @@ -var/list/holder_mob_icon_cache = list() - //Helper object for picking dionaea (and other creatures) up. /obj/item/holder name = "holder" diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 09e658122b..c9dcec3ab8 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -1,22 +1,22 @@ //The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot. -var/list/slot_equipment_priority = list( \ - slot_back,\ - slot_wear_id,\ - slot_w_uniform,\ - slot_wear_suit,\ - slot_wear_mask,\ - slot_head,\ - slot_shoes,\ - slot_gloves,\ - slot_l_ear,\ - slot_r_ear,\ - slot_glasses,\ - slot_belt,\ - slot_s_store,\ - slot_tie,\ - slot_l_store,\ - slot_r_store\ - ) +GLOBAL_LIST_INIT(slot_equipment_priority, list( + slot_back, + slot_wear_id, + slot_w_uniform, + slot_wear_suit, + slot_wear_mask, + slot_head, + slot_shoes, + slot_gloves, + slot_l_ear, + slot_r_ear, + slot_glasses, + slot_belt, + slot_s_store, + slot_tie, + slot_l_store, + slot_r_store + )) /mob var/obj/item/storage/s_active = null // Even ghosts can/should be able to peek into boxes on the ground @@ -87,7 +87,7 @@ var/list/slot_equipment_priority = list( \ //puts the item "W" into an appropriate slot in a human's inventory //returns 0 if it cannot, 1 if successful /mob/proc/equip_to_appropriate_slot(obj/item/W) - for(var/slot in slot_equipment_priority) + for(var/slot in GLOB.slot_equipment_priority) if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1)) return 1 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cb1e89260c..7781576572 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -388,10 +388,10 @@ def_zone = pick(BP_L_HAND, BP_R_HAND) if(species.siemens_coefficient == -1) - if(stored_shock_by_ref["\ref[src]"]) - stored_shock_by_ref["\ref[src]"] += shock_damage + if(GLOB.stored_shock_by_ref["\ref[src]"]) + GLOB.stored_shock_by_ref["\ref[src]"] += shock_damage else - stored_shock_by_ref["\ref[src]"] = shock_damage + GLOB.stored_shock_by_ref["\ref[src]"] = shock_damage return var/obj/item/organ/external/affected_organ = get_organ(check_zone(def_zone)) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 83a30c2ab4..e6d91ff80e 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -2,7 +2,8 @@ var/datum/unarmed_attack/default_attack /mob/living/carbon/human/proc/get_unarmed_attack(var/mob/living/carbon/human/target, var/hit_zone) - if(nif && nif.flag_check(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT)){return unarmed_hardclaws} + if(nif && nif.flag_check(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT)) + return GLOB.unarmed_hardclaws if(src.default_attack && src.default_attack.is_usable(src, target, hit_zone)) if(HAS_TRAIT(src, TRAIT_NONLETHAL_BLOWS)) var/datum/unarmed_attack/soft_type = src.default_attack.get_sparring_variant() diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 3c3f1dbc2c..6ca494b001 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -103,10 +103,10 @@ emp_act //If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values for(var/organ_name in organs_by_name) - if (organ_name in organ_rel_size) + if (organ_name in GLOB.organ_rel_size) var/obj/item/organ/external/organ = organs_by_name[organ_name] if(organ) - var/weight = organ_rel_size[organ_name] + var/weight = GLOB.organ_rel_size[organ_name] armorval += (getarmor_organ(organ, type) * weight) total += weight return (armorval/max(total, 1)) @@ -135,10 +135,10 @@ emp_act var/siemens_value = 0 var/total = 0 for(var/organ_name in organs_by_name) - if(organ_name in organ_rel_size) + if(organ_name in GLOB.organ_rel_size) var/obj/item/organ/external/organ = organs_by_name[organ_name] if(organ) - var/weight = organ_rel_size[organ_name] + var/weight = GLOB.organ_rel_size[organ_name] siemens_value += get_siemens_coefficient_organ(organ) * weight total += weight diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 1227ee53de..696b2e2c90 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -162,10 +162,10 @@ hud_list[IMPTRACK_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK) hud_list[SPECIALROLE_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL) hud_list[STATUS_HUD_OOC] = gen_hud_image(GLOB.ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC) - hud_list[HEALTH_VR_HUD] = gen_hud_image(ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR) - hud_list[STATUS_R_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R) - hud_list[BACKUP_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP) - hud_list[VANTAG_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG) + hud_list[HEALTH_VR_HUD] = gen_hud_image(GLOB.ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR) + hud_list[STATUS_R_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R) + hud_list[BACKUP_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP) + hud_list[VANTAG_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG) add_overlay(hud_list) /mob/living/carbon/human/recalculate_vis() diff --git a/code/modules/mob/living/carbon/human/human_helpers_vr.dm b/code/modules/mob/living/carbon/human/human_helpers_vr.dm index d4aff1b320..3bed2db74b 100644 --- a/code/modules/mob/living/carbon/human/human_helpers_vr.dm +++ b/code/modules/mob/living/carbon/human/human_helpers_vr.dm @@ -1,5 +1,5 @@ -var/static/icon/ingame_hud_vr = icon('icons/mob/hud_vr.dmi') -var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi') +GLOBAL_DATUM_INIT(ingame_hud_vr, /icon, icon('icons/mob/hud_vr.dmi')) +GLOBAL_DATUM_INIT(ingame_hud_med_vr, /icon, icon('icons/mob/hud_med_vr.dmi')) /mob/living/carbon/human/proc/remove_marking(var/datum/sprite_accessory/marking/mark_datum) if (!mark_datum) @@ -263,7 +263,7 @@ var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi') species?.base_species = bodytype species?.vanity_base_fit = bodytype if (istype(species, /datum/species/shapeshifter)) - wrapped_species_by_ref["\ref[src]"] = bodytype + GLOB.wrapped_species_by_ref["\ref[src]"] = bodytype custom_species = character.custom_species custom_say = character.custom_say diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill.dm index 9e256040b8..0c4def4854 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill.dm @@ -140,57 +140,57 @@ /datum/species/lleill/get_icobase(var/mob/living/carbon/human/H, var/get_deform) if(!H) return ..(null, get_deform) - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.type == src.type) return ..(H, get_deform) return S.get_icobase(H,get_deform) /datum/species/lleill/get_race_key(var/mob/living/carbon/human/H) - return "[..()]-[wrapped_species_by_ref["\ref[H]"]]" + return "[..()]-[GLOB.wrapped_species_by_ref["\ref[H]"]]" /datum/species/lleill/get_bodytype(var/mob/living/carbon/human/H) - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!H || !S) return ..() if(S.type == src.type) return ..(H) return S.get_bodytype(H) /datum/species/lleill/get_blood_mask(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.name == src.name) return ..() return S?.get_blood_mask(H) /datum/species/lleill/get_damage_mask(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.name == src.name) return ..() return S?.get_damage_mask(H) /datum/species/lleill/get_damage_overlays(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.name == src.name) return ..() return S?.get_damage_overlays(H) /datum/species/lleill/get_tail(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.name == src.name) return ..() return S?.get_tail(H) /datum/species/lleill/get_tail_animation(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.name == src.name) return ..() return S?.get_tail_animation(H) /datum/species/lleill/get_tail_hair(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] if(!S || S.name == src.name) return ..() return S?.get_tail_hair(H) diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm index 319d7a02c0..6127577390 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm @@ -49,7 +49,7 @@ var/new_species = null new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src)) - if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species) + if(!new_species || !GLOB.all_species[new_species] || GLOB.wrapped_species_by_ref["\ref[src]"] == new_species) return lleill_change_shape(new_species) @@ -57,7 +57,7 @@ if(!new_species) return - wrapped_species_by_ref["\ref[src]"] = new_species + GLOB.wrapped_species_by_ref["\ref[src]"] = new_species dna.base_species = new_species species.base_species = new_species visible_message(span_infoplain(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!")) diff --git a/code/modules/mob/living/carbon/human/species/species_helpers.dm b/code/modules/mob/living/carbon/human/species/species_helpers.dm index 3152312f1c..79c152b915 100644 --- a/code/modules/mob/living/carbon/human/species/species_helpers.dm +++ b/code/modules/mob/living/carbon/human/species/species_helpers.dm @@ -1,6 +1,6 @@ -var/list/stored_shock_by_ref = list() +GLOBAL_LIST_EMPTY(stored_shock_by_ref) /mob/living/proc/apply_stored_shock_to(var/mob/living/target) - if(stored_shock_by_ref["\ref[src]"]) - target.electrocute_act(stored_shock_by_ref["\ref[src]"]*0.9, src) - stored_shock_by_ref["\ref[src]"] = 0 + if(GLOB.stored_shock_by_ref["\ref[src]"]) + target.electrocute_act(GLOB.stored_shock_by_ref["\ref[src]"]*0.9, src) + GLOB.stored_shock_by_ref["\ref[src]"] = 0 diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index 1cada8bd23..de8d388501 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -1,7 +1,7 @@ // This is something of an intermediary species used for species that // need to emulate the appearance of another race. Currently it is only // used for slimes but it may be useful for changelings later. -var/list/wrapped_species_by_ref = list() +GLOBAL_LIST_EMPTY(wrapped_species_by_ref) /datum/species/shapeshifter @@ -22,50 +22,50 @@ var/list/wrapped_species_by_ref = list() /datum/species/shapeshifter/get_icobase(var/mob/living/carbon/human/H, var/get_deform) if(!H) return ..(null, get_deform) - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_icobase(H, get_deform) /datum/species/shapeshifter/get_race_key(var/mob/living/carbon/human/H) - return "[..()]-[wrapped_species_by_ref["\ref[H]"]]" + return "[..()]-[GLOB.wrapped_species_by_ref["\ref[H]"]]" /datum/species/shapeshifter/get_bodytype(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_bodytype(H) /datum/species/shapeshifter/get_blood_mask(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_blood_mask(H) /datum/species/shapeshifter/get_damage_mask(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_damage_mask(H) /datum/species/shapeshifter/get_damage_overlays(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_damage_overlays(H) /datum/species/shapeshifter/get_tail(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_tail(H) /datum/species/shapeshifter/get_tail_animation(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_tail_animation(H) /datum/species/shapeshifter/get_tail_hair(var/mob/living/carbon/human/H) if(!H) return ..() - var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]] + var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]] return S.get_tail_hair(H) /datum/species/shapeshifter/handle_post_spawn(var/mob/living/carbon/human/H) ..() - wrapped_species_by_ref["\ref[H]"] = base_species //VOREStation edit + GLOB.wrapped_species_by_ref["\ref[H]"] = base_species //VOREStation edit for(var/obj/item/organ/external/E in H.organs) E.sync_colour_to_human(H) @@ -158,7 +158,7 @@ var/list/wrapped_species_by_ref = list() var/new_species = null new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src)) - if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species) + if(!new_species || !GLOB.all_species[new_species] || GLOB.wrapped_species_by_ref["\ref[src]"] == new_species) return shapeshifter_change_shape(new_species) @@ -167,7 +167,7 @@ var/list/wrapped_species_by_ref = list() if(!new_species) return - wrapped_species_by_ref["\ref[src]"] = new_species + GLOB.wrapped_species_by_ref["\ref[src]"] = new_species visible_message(span_infoplain(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!")) regenerate_icons() */ @@ -565,7 +565,7 @@ var/list/wrapped_species_by_ref = list() dna.base_species = new_species species.base_species = new_species - wrapped_species_by_ref["\ref[src]"] = new_species + GLOB.wrapped_species_by_ref["\ref[src]"] = new_species if (visible) visible_message(span_filter_notice(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!")) regenerate_icons() diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 545531704c..29b480278c 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -1,5 +1,3 @@ -var/datum/species/shapeshifter/promethean/prometheans - // Species definition follows. /datum/species/shapeshifter/promethean name = SPECIES_PROMETHEAN @@ -139,10 +137,6 @@ var/datum/species/shapeshifter/promethean/prometheans footstep = FOOTSTEP_MOB_SLIME -/datum/species/shapeshifter/promethean/New() - ..() - prometheans = src - /datum/species/shapeshifter/promethean/equip_survival_gear(var/mob/living/carbon/human/H) var/boxtype = pick(list(/obj/item/storage/toolbox/lunchbox, /obj/item/storage/toolbox/lunchbox/heart, @@ -358,7 +352,7 @@ var/datum/species/shapeshifter/promethean/prometheans /datum/species/shapeshifter/promethean/get_additional_examine_text(var/mob/living/carbon/human/H) - if(!stored_shock_by_ref["\ref[H]"]) + if(!GLOB.stored_shock_by_ref["\ref[H]"]) return var/t_she = "She is" @@ -371,7 +365,7 @@ var/datum/species/shapeshifter/promethean/prometheans else if(H.identifying_gender == HERM) //VOREStation Edit t_she = "Shi is" - switch(stored_shock_by_ref["\ref[H]"]) + switch(GLOB.stored_shock_by_ref["\ref[H]"]) if(1 to 10) return "[t_she] flickering gently with a little electrical activity." if(11 to 20) diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index ffc4dff4e2..fbb197d1cc 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -314,7 +314,7 @@ return /mob/living/simple_mob/slime/promethean/get_available_emotes() - var/list/fulllist = global._slime_default_emotes.Copy() + var/list/fulllist = GLOB.slime_default_emotes.Copy() fulllist += default_emotes return fulllist /mob/living/carbon/human diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 93187a33f6..d2d43fe2bc 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -1,4 +1,4 @@ -var/list/department_radio_keys = list( +GLOBAL_LIST_INIT(department_radio_keys, list( ":r" = "right ear", ".r" = "right ear", ":l" = "left ear", ".l" = "left ear", ":i" = "intercom", ".i" = "intercom", @@ -16,8 +16,8 @@ var/list/department_radio_keys = list( ":u" = CHANNEL_SUPPLY, ".u" = CHANNEL_SUPPLY, ":v" = CHANNEL_SERVICE, ".v" = CHANNEL_SERVICE, ":p" = CHANNEL_AI_PRIVATE, ".p" = CHANNEL_AI_PRIVATE, - ":a" = CHANNEL_EXPLORATION, ".a" = CHANNEL_EXPLORATION, //VOREStation Edit - ":y" = CHANNEL_TALON, ".y" = CHANNEL_TALON, //VOREStation Add, + ":a" = CHANNEL_EXPLORATION, ".a" = CHANNEL_EXPLORATION, + ":y" = CHANNEL_TALON, ".y" = CHANNEL_TALON, ":g" = CHANNEL_CASINO, ".g" = CHANNEL_CASINO, ":R" = "right ear", ".R" = "right ear", @@ -37,7 +37,7 @@ var/list/department_radio_keys = list( ":V" = CHANNEL_SERVICE, ".V" = CHANNEL_SERVICE, ":P" = CHANNEL_AI_PRIVATE, ".P" = CHANNEL_AI_PRIVATE, ":A" = CHANNEL_EXPLORATION, ".A" = CHANNEL_EXPLORATION, - ":Y" = CHANNEL_TALON, ".Y" = CHANNEL_TALON, //VOREStation Add, + ":Y" = CHANNEL_TALON, ".Y" = CHANNEL_TALON, ":G" = CHANNEL_CASINO, ".G" = CHANNEL_CASINO, // Cyrillic characters on the same keys on the Russian QWERTY (phonetic) layout @@ -59,22 +59,21 @@ var/list/department_radio_keys = list( ":м" = CHANNEL_SERVICE, ".м" = CHANNEL_SERVICE, ":з" = CHANNEL_AI_PRIVATE, ".з" = CHANNEL_AI_PRIVATE, ":ф" = CHANNEL_EXPLORATION, ".ф" = CHANNEL_EXPLORATION, - ":н" = CHANNEL_TALON, ".н" = CHANNEL_TALON, //VOREStation Add + ":н" = CHANNEL_TALON, ".н" = CHANNEL_TALON, ":п" = CHANNEL_CASINO, ".п" = CHANNEL_CASINO, -) +)) - -var/list/channel_to_radio_key = list() +GLOBAL_LIST_EMPTY(channel_to_radio_key) /proc/get_radio_key_from_channel(var/channel) - var/key = channel_to_radio_key[channel] + var/key = GLOB.channel_to_radio_key[channel] if(!key) - for(var/radio_key in department_radio_keys) - if(department_radio_keys[radio_key] == channel) + for(var/radio_key in GLOB.department_radio_keys) + if(GLOB.department_radio_keys[radio_key] == channel) key = radio_key break if(!key) key = "" - channel_to_radio_key[channel] = key + GLOB.channel_to_radio_key[channel] = key return key diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 59693e3684..35a0e2e932 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -79,6 +79,6 @@ if("image") var/img = text2num(params["image"]) - if(1 <= img && img <= (GLOB.pai_emotions.len)) + if(1 <= img && img <= length(GLOB.pai_emotions)) card.setEmotion(img) return TRUE diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index e732d4d11c..dd11882c7c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -1,4 +1,5 @@ -var/list/mob_hat_cache = list() +GLOBAL_LIST_EMPTY(mob_hat_cache) + /proc/get_hat_icon(var/obj/item/hat, var/offset_x = 0, var/offset_y = 0) var/t_state = hat.icon_state if(LAZYACCESS(hat.item_state_slots, slot_head_str)) @@ -6,7 +7,7 @@ var/list/mob_hat_cache = list() else if(hat.item_state) t_state = hat.item_state var/key = "[t_state]_[offset_x]_[offset_y]" - if(!mob_hat_cache[key]) // Not ideal as there's no guarantee all hat icon_states + if(!GLOB.mob_hat_cache[key]) // Not ideal as there's no guarantee all hat icon_states var/t_icon = INV_HEAD_DEF_ICON // are unique across multiple dmis, but whatever. if(hat.icon_override) t_icon = hat.icon_override @@ -15,8 +16,8 @@ var/list/mob_hat_cache = list() var/image/I = image(icon = t_icon, icon_state = t_state) I.pixel_x = offset_x I.pixel_y = offset_y - mob_hat_cache[key] = I - return mob_hat_cache[key] + GLOB.mob_hat_cache[key] = I + return GLOB.mob_hat_cache[key] /mob/living/silicon/robot/drone name = "maintenance drone" diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm index 995a4311d3..6428eeb68b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm @@ -1,4 +1,4 @@ -var/list/_slime_default_emotes = list( +GLOBAL_LIST_INIT(slime_default_emotes, list( /datum/decl/emote/audible/moan, /datum/decl/emote/visible/twitch, /datum/decl/emote/visible/sway, @@ -13,7 +13,7 @@ var/list/_slime_default_emotes = list( /datum/decl/emote/slime/angry, /datum/decl/emote/slime/frown, /datum/decl/emote/slime/smile -) +)) // The top-level slime defines. Xenobio slimes and feral slimes will inherit from this. /mob/living/simple_mob/slime @@ -87,7 +87,7 @@ var/list/_slime_default_emotes = list( pain_emote_3p = list("squishes", "squelches") /mob/living/simple_mob/slime/get_available_emotes() - return global._slime_default_emotes.Copy() + return GLOB.slime_default_emotes.Copy() /datum/say_list/slime speak = list("Blorp...", "Blop...") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 1432c43f42..c94e102b3c 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -113,17 +113,17 @@ var/ran_zone = zone while (ran_zone == zone) ran_zone = pick ( - organ_rel_size[BP_HEAD]; BP_HEAD, - organ_rel_size[BP_TORSO]; BP_TORSO, - organ_rel_size[BP_GROIN]; BP_GROIN, - organ_rel_size[BP_L_ARM]; BP_L_ARM, - organ_rel_size[BP_R_ARM]; BP_R_ARM, - organ_rel_size[BP_L_LEG]; BP_L_LEG, - organ_rel_size[BP_R_LEG]; BP_R_LEG, - organ_rel_size[BP_L_HAND]; BP_L_HAND, - organ_rel_size[BP_R_HAND]; BP_R_HAND, - organ_rel_size[BP_L_FOOT]; BP_L_FOOT, - organ_rel_size[BP_R_FOOT]; BP_R_FOOT, + GLOB.organ_rel_size[BP_HEAD]; BP_HEAD, + GLOB.organ_rel_size[BP_TORSO]; BP_TORSO, + GLOB.organ_rel_size[BP_GROIN]; BP_GROIN, + GLOB.organ_rel_size[BP_L_ARM]; BP_L_ARM, + GLOB.organ_rel_size[BP_R_ARM]; BP_R_ARM, + GLOB.organ_rel_size[BP_L_LEG]; BP_L_LEG, + GLOB.organ_rel_size[BP_R_LEG]; BP_R_LEG, + GLOB.organ_rel_size[BP_L_HAND]; BP_L_HAND, + GLOB.organ_rel_size[BP_R_HAND]; BP_R_HAND, + GLOB.organ_rel_size[BP_L_FOOT]; BP_L_FOOT, + GLOB.organ_rel_size[BP_R_FOOT]; BP_R_FOOT, ) return ran_zone @@ -214,15 +214,15 @@ var/randomization_chance = 10 //This can also be set to 0 to ensure mobs ALWAYS target the limb they're originally targeting. /// First, we roll to see if we're going to target a random limb. if(randomization_chance) //We got a 10% chance! Randomize where we're targeting! - zone = pick(base_miss_chance) + zone = pick(GLOB.base_miss_chance) // Second, we make sure to see if the place we are attacking is a valid area. - if(zone in base_miss_chance) - randomization_chance = base_miss_chance[zone] + if(zone in GLOB.base_miss_chance) + randomization_chance = GLOB.base_miss_chance[zone] // Eyes and mouth can be targeted (although typically not by mobs) so we set it to the head. else if (zone == "eyes" || zone == "mouth") - randomization_chance = base_miss_chance["head"] + randomization_chance = GLOB.base_miss_chance["head"] // Finally, now that we have our newfound zone, we see if we miss it or not! if(prob(randomization_chance)) //If the mob rolled a miss chance? @@ -672,7 +672,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp //TODO: Integrate defence zones and targeting body parts with the actual organ system, move these into organ definitions. //The base miss chance for the different defence zones -var/list/global/base_miss_chance = list( +GLOBAL_LIST_INIT(base_miss_chance, list( BP_HEAD = 40, BP_TORSO = 10, BP_GROIN = 20, @@ -684,11 +684,11 @@ var/list/global/base_miss_chance = list( BP_R_HAND = 50, BP_L_FOOT = 50, BP_R_FOOT = 50, -) +)) //Used to weight organs when an organ is hit randomly (i.e. not a directed, aimed attack). //Also used to weight the protection value that armour provides for covering that body part when calculating protection from full-body effects. -var/list/global/organ_rel_size = list( +GLOBAL_LIST_INIT(organ_rel_size, list( BP_HEAD = 25, BP_TORSO = 70, BP_GROIN = 30, @@ -700,7 +700,7 @@ var/list/global/organ_rel_size = list( BP_R_HAND = 10, BP_L_FOOT = 10, BP_R_FOOT = 10, -) +)) /mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash) return diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 2698dc1b63..c79f477bfe 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -213,7 +213,7 @@ var/list/equipped_slots = list() var/list/active_gear_list = LAZYACCESS(gear_list, "[gear_slot]") for(var/thing in active_gear_list) - var/datum/gear/G = gear_datums[thing] + var/datum/gear/G = GLOB.gear_datums[thing] if(G) var/permitted = 0 if(!G.allowed_roles) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index a3b7c498be..a3b7383b0c 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -162,7 +162,7 @@ if(length(message) >= 2) var/channel_prefix = copytext(message, 1, 3) - return department_radio_keys[channel_prefix] + return GLOB.department_radio_keys[channel_prefix] return null diff --git a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm index b8d0e2be19..2e26b3f510 100644 --- a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm +++ b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm @@ -1,4 +1,4 @@ -var/global/ntnrc_uid = 0 +GLOBAL_VAR_INIT(ntnrc_uid, 0) /datum/ntnet_conversation/ var/id = null @@ -9,8 +9,8 @@ var/global/ntnrc_uid = 0 var/password /datum/ntnet_conversation/New() - id = ntnrc_uid - ntnrc_uid++ + id = GLOB.ntnrc_uid + GLOB.ntnrc_uid++ if(GLOB.ntnet_global) GLOB.ntnet_global.chat_channels.Add(src) ..() diff --git a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm index 8237d8a44a..f32f260b53 100644 --- a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm +++ b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm @@ -1,4 +1,5 @@ -var/warrant_uid = 0 +GLOBAL_VAR_INIT(warrant_uid, 0) + /datum/datacore var/list/warrants = list() @@ -7,7 +8,7 @@ var/warrant_uid = 0 /datum/data/record/warrant/New() ..() - warrant_id = warrant_uid++ + warrant_id = GLOB.warrant_uid++ /datum/computer_file/program/digitalwarrant filename = "digitalwarrant" diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index 27ccbdff39..829fcf7c4d 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -1,4 +1,4 @@ -var/global/ntnet_card_uid = 1 +GLOBAL_VAR_INIT(ntnet_card_uid, 1) /obj/item/computer_hardware/network_card/ name = "basic NTNet network card" @@ -35,8 +35,8 @@ var/global/ntnet_card_uid = 1 /obj/item/computer_hardware/network_card/Initialize(mapload) . = ..() - identification_id = ntnet_card_uid - ntnet_card_uid++ + identification_id = GLOB.ntnet_card_uid + GLOB.ntnet_card_uid++ /obj/item/computer_hardware/network_card/advanced name = "advanced NTNet network card" diff --git a/code/modules/multiz/basic.dm b/code/modules/multiz/basic.dm index f46785562c..f0e9e96bec 100644 --- a/code/modules/multiz/basic.dm +++ b/code/modules/multiz/basic.dm @@ -1,26 +1,26 @@ // If you add a more comprehensive system, just untick this file. -var/list/z_levels = list()// Each bit re... haha just kidding this is a list of bools now +GLOBAL_LIST_EMPTY(z_levels)// Each bit re... haha just kidding this is a list of bools now // If the height is more than 1, we mark all contained levels as connected. INITIALIZE_IMMEDIATE(/obj/effect/landmark/map_data) /obj/effect/landmark/map_data/Initialize(mapload) for(var/i = (z - height + 1) to (z-1)) - if (z_levels.len = world.maxz || z < 1 || z > z_levels.len) + if(z >= world.maxz || z < 1 || z > length(GLOB.z_levels)) return 0 - return z_levels[z] + return GLOB.z_levels[z] /proc/HasBelow(var/z) - if(z > world.maxz || z < 2 || (z-1) > z_levels.len) + if(z > world.maxz || z < 2 || (z-1) > length(GLOB.z_levels)) return 0 - return z_levels[z-1] + return GLOB.z_levels[z-1] // Thankfully, no bitwise magic is needed here. /proc/GetAbove(var/atom/atom) diff --git a/code/modules/nifsoft/software/10_combat.dm b/code/modules/nifsoft/software/10_combat.dm index dd0bc6f50f..b4932b3093 100644 --- a/code/modules/nifsoft/software/10_combat.dm +++ b/code/modules/nifsoft/software/10_combat.dm @@ -49,7 +49,7 @@ combat_flags = (NIF_C_HARDCLAWS) // The unarmed attack to go with the hardclaws -var/global/datum/unarmed_attack/hardclaws/unarmed_hardclaws = new() +GLOBAL_DATUM_INIT(unarmed_hardclaws, /datum/unarmed_attack/hardclaws, new) /datum/unarmed_attack/hardclaws attack_verb = list("claws") attack_noun = list("talons") diff --git a/code/modules/organs/data.dm b/code/modules/organs/data.dm index 05c7c6b9fa..af2eee5e16 100644 --- a/code/modules/organs/data.dm +++ b/code/modules/organs/data.dm @@ -46,11 +46,12 @@ // All accessed vars need to be cached during read. // Get data from species, if this fails use cached data -#define SETUP_SPECIES_CHECK(p,x)\ -var/datum/species/SP = species?.resolve();\ -if(SP)\ - cached_species_vars[p] = x;\ -return cached_species_vars[p]; +#define SETUP_SPECIES_CHECK(p, x) \ + var/datum/species/SP = species?.resolve(); \ + if (SP) { \ + cached_species_vars[p] = x; \ + } \ + return cached_species_vars[p]; /datum/organ_data/proc/get_species_name() diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 75084ad7ec..d87bdd1d7c 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -1,5 +1,3 @@ -var/list/organ_cache = list() - /obj/item/organ name = "organ" icon = 'icons/obj/surgery.dmi' diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index 1354f67129..21a126806f 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -2,29 +2,6 @@ GLOBAL_LIST_EMPTY(all_robolimbs) GLOBAL_LIST_EMPTY(robolimb_data) GLOBAL_LIST_EMPTY(chargen_robolimbs) GLOBAL_DATUM(basic_robolimb, /datum/robolimb) -//Ending a monitor style with [-colored] will override eye coloration. If you have custom colors on a monitor icon, you should do this. -var/const/standard_monitor_styles = "blank=ipc_blank;\ - pink=ipc_pink-colored;\ - green=ipc_green-colored;\ - red=ipc_red-colored;\ - blue=ipc_blue-colored;\ - shower=ipc_shower-colored;\ - orange=ipc_orange-colored;\ - nature=ipc_nature-colored;\ - eight=ipc_eight-colored;\ - goggles=ipc_goggles-colored;\ - heart=ipc_heart-colored;\ - monoeye=ipc_monoeye-colored;\ - breakout=ipc_breakoutv-colored;\ - yellow=ipc_yellow-colored;\ - static=ipc_static-colored;\ - purple=ipc_purple-colored;\ - scroll=ipc_scroll;\ - console=ipc_console;\ - glider=ipc_gol_glider;\ - rainbow=ipc_rainbow-colored;\ - smiley=ipc_smiley-colored;\ - database=ipc_database-colored" /proc/populate_robolimb_list() GLOB.basic_robolimb = new() @@ -72,7 +49,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ desc = "A generic unbranded interpretation of a popular prosthetic head model. It looks rudimentary and cheaply constructed." icon = 'icons/mob/human_races/cyberlimbs/unbranded/unbranded_monitor.dmi' parts = list(BP_HEAD) - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES unavailable_to_build = 1 /datum/robolimb/unbranded_alt1 @@ -187,7 +164,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/bishop/bishop_monitor.dmi' unavailable_to_build = 1 parts = list(BP_HEAD) - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES modular_bodyparts = MODULAR_BODYPART_PROSTHETIC //VOREStation Edit - remove the restrictions /datum/robolimb/gestaltframe @@ -272,7 +249,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/grayson/grayson_monitor.dmi' unavailable_to_build = 1 parts = list(BP_HEAD) - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES modular_bodyparts = MODULAR_BODYPART_PROSTHETIC //VOREStation Edit - remove the restrictions /datum/robolimb/hephaestus @@ -312,7 +289,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/hephaestus/hephaestus_monitor.dmi' unavailable_to_build = 1 parts = list(BP_HEAD) - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES modular_bodyparts = MODULAR_BODYPART_PROSTHETIC //VOREStation Edit - remove the restrictions /datum/robolimb/morpheus @@ -320,7 +297,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ desc = "This limb is simple and functional; no effort has been made to make it look human." icon = 'icons/mob/human_races/cyberlimbs/morpheus/morpheus_main.dmi' unavailable_to_build = 1 - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES modular_bodyparts = MODULAR_BODYPART_PROSTHETIC //VOREStation Edit - remove the restrictions /datum/robolimb/morpheus_alt1 @@ -397,7 +374,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/wardtakahashi/wardtakahashi_monitor.dmi' unavailable_to_build = 1 parts = list(BP_HEAD) - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES modular_bodyparts = MODULAR_BODYPART_PROSTHETIC //VOREStation Edit - remove the restrictions /datum/robolimb/xion @@ -449,7 +426,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/xion/xion_monitor.dmi' unavailable_to_build = 1 parts = list(BP_HEAD) - monitor_styles = standard_monitor_styles + monitor_styles = STANDARD_MONITOR_STYLES modular_bodyparts = MODULAR_BODYPART_PROSTHETIC //VOREStation Edit - remove the restrictions /datum/robolimb/zenghu diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm index 24a5f8ff2f..b08f1dfc43 100644 --- a/code/modules/overmap/sectors.dm +++ b/code/modules/overmap/sectors.dm @@ -270,7 +270,7 @@ or relay the message to those who can. This message will repeat one time in 5 minutes. Thank you for your urgent assistance." for(var/zlevel in levels_for_distress) - priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) + GLOB.priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) var/image/I = image(icon, icon_state = "distress") I.plane = PLANE_LIGHTING_ABOVE @@ -288,7 +288,7 @@ Please render assistance under your obligations per the Interplanetary Convention on Space SAR, or relay this message to a party who can. Thank you for your urgent assistance." for(var/zlevel in levels_for_distress) - priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) + GLOB.priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) /proc/build_overmap() if(!global.using_map.use_overmap) diff --git a/code/modules/overmap/ships/engines/engine.dm b/code/modules/overmap/ships/engines/engine.dm index 543b3afa15..f5817a18e9 100644 --- a/code/modules/overmap/ships/engines/engine.dm +++ b/code/modules/overmap/ships/engines/engine.dm @@ -1,6 +1,6 @@ //Engine component object -var/list/ship_engines = list() +GLOBAL_LIST_EMPTY(ship_engines) /datum/ship_engine var/name = "ship engine" var/obj/machinery/holder //actual engine object @@ -8,7 +8,7 @@ var/list/ship_engines = list() /datum/ship_engine/New(var/obj/machinery/_holder) ..() holder = _holder - ship_engines += src + GLOB.ship_engines += src /datum/ship_engine/proc/can_burn() return 0 @@ -38,7 +38,7 @@ var/list/ship_engines = list() return 1 /datum/ship_engine/Destroy() - ship_engines -= src + GLOB.ship_engines -= src for(var/obj/effect/overmap/visitable/ship/S in SSshuttles.ships) S.engines -= src holder = null diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index 4c1630c016..4ce511c58f 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -286,7 +286,7 @@ ..() for(var/obj/machinery/computer/ship/S in GLOB.machines) S.attempt_hook_up(src) - for(var/datum/ship_engine/E in ship_engines) + for(var/datum/ship_engine/E in GLOB.ship_engines) if(check_ownership(E.holder)) engines |= E diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 48dd87da52..99c6e6a101 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -1,5 +1,5 @@ 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", "Talon Headquarters") +GLOBAL_LIST_INIT(admin_departments, list("[using_map.boss_name]", "Virgo-Prime Governmental Authority", "Virgo-Erigonne Job Boards", "Supply", "Talon Headquarters")) GLOBAL_LIST_EMPTY(alldepartments) GLOBAL_VAR(last_fax_role_request) @@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) //cache for faxes that have been sent to admins . = ..() GLOB.allfaxes += src if(!destination) destination = "[using_map.boss_name]" - if( !(("[department]" in GLOB.alldepartments) || ("[department]" in admin_departments)) ) + if( !(("[department]" in GLOB.alldepartments) || ("[department]" in GLOB.admin_departments)) ) GLOB.alldepartments |= department /obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob) @@ -160,7 +160,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) //cache for faxes that have been sent to admins data["rank"] = rank data["isAI"] = isAI(user) data["isRobot"] = isrobot(user) - data["adminDepartments"] = admin_departments + data["adminDepartments"] = GLOB.admin_departments data["bossName"] = using_map.boss_name data["copyItem"] = copyitem @@ -234,7 +234,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) //cache for faxes that have been sent to admins copyitem.name = new_name if("send") if(copyitem) - if (destination in admin_departments) + if (destination in GLOB.admin_departments) if(check_if_default_title_and_rename(ui.user)) return send_admin_fax(ui.user, destination) @@ -247,7 +247,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) //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", (GLOB.alldepartments + admin_departments)) + destination = tgui_input_list(ui.user, "Which department?", "Choose a department", (GLOB.alldepartments + GLOB.admin_departments)) if(!destination) destination = lastdestination @@ -298,7 +298,7 @@ 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 GLOB.alldepartments) || ("[department]" in admin_departments)) && !(department == "Unknown")) + if( !(("[department]" in GLOB.alldepartments) || ("[department]" in GLOB.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 diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm index 428633d06a..f7f1e70091 100644 --- a/code/modules/persistence/noticeboard.dm +++ b/code/modules/persistence/noticeboard.dm @@ -6,6 +6,7 @@ layer = ABOVE_WINDOW_LAYER density = FALSE anchored = TRUE + flags = WALL_ITEM var/list/notices var/base_icon_state = "nboard0" var/const/max_notices = 5 diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index f03145bb8d..68cd214054 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -1,4 +1,4 @@ -var/datum/planet/sif/planet_sif = null +GLOBAL_DATUM(planet_sif, /datum/planet/sif) /datum/planet/sif name = "Sif" @@ -14,7 +14,7 @@ var/datum/planet/sif/planet_sif = null /datum/planet/sif/New() ..() - planet_sif = src + GLOB.planet_sif = src weather_holder = new /datum/weather_holder/sif(src) // Cold weather is also nice. // This code is horrible. @@ -103,8 +103,8 @@ var/datum/planet/sif/planet_sif = null // Returns the time datum of Sif. /proc/get_sif_time() - if(planet_sif) - return planet_sif.current_time + if(GLOB.planet_sif) + return GLOB.planet_sif.current_time //Weather definitions /datum/weather_holder/sif diff --git a/code/modules/planet/virgo3b_vr.dm b/code/modules/planet/virgo3b_vr.dm index 440740f873..2022871e4c 100644 --- a/code/modules/planet/virgo3b_vr.dm +++ b/code/modules/planet/virgo3b_vr.dm @@ -1,4 +1,4 @@ -var/datum/planet/virgo3b/planet_virgo3b = null +GLOBAL_DATUM(planet_virgo3b, /datum/planet/virgo3b) /datum/time/virgo3b seconds_in_day = 6 HOURS @@ -14,7 +14,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null /datum/planet/virgo3b/New() ..() - planet_virgo3b = src + GLOB.planet_virgo3b = src weather_holder = new /datum/weather_holder/virgo3b(src) /datum/planet/virgo3b/update_sun() diff --git a/code/modules/planet/virgo3c_vr.dm b/code/modules/planet/virgo3c_vr.dm index 2cbf398915..080a61d584 100644 --- a/code/modules/planet/virgo3c_vr.dm +++ b/code/modules/planet/virgo3c_vr.dm @@ -20,7 +20,7 @@ #define VIRGO3C_TURF_CREATE(x) x/virgo3c/nitrogen=VIRGO3C_MOL_N2;x/virgo3c/oxygen=VIRGO3C_MOL_O2;x/virgo3c/carbon_dioxide=VIRGO3C_MOL_CO2;x/virgo3c/phoron=VIRGO3C_MOL_PHORON;x/virgo3c/temperature=VIRGO3C_AVG_TEMP;x/virgo3c/outdoors=TRUE;x/virgo3c/update_graphic(list/graphic_add = null, list/graphic_remove = null) return 0 #define VIRGO3C_TURF_CREATE_UN(x) x/virgo3c/nitrogen=VIRGO3C_MOL_N2;x/virgo3c/oxygen=VIRGO3C_MOL_O2;x/virgo3c/carbon_dioxide=VIRGO3C_MOL_CO2;x/virgo3c/phoron=VIRGO3C_MOL_PHORON;x/virgo3c/temperature=VIRGO3C_AVG_TEMP -var/datum/planet/virgo3c/planet_virgo3c = null +GLOBAL_DATUM(planet_virgo3c, /datum/planet/virgo3c) /datum/time/virgo3c seconds_in_day = 6 HOURS @@ -33,7 +33,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null /datum/planet/virgo3c/New() ..() - planet_virgo3c = src + GLOB.planet_virgo3c = src weather_holder = new /datum/weather_holder/virgo3c(src) /datum/planet/virgo3c/update_sun() diff --git a/code/modules/planet/virgo4_vr.dm b/code/modules/planet/virgo4_vr.dm index fc45654094..f007769878 100644 --- a/code/modules/planet/virgo4_vr.dm +++ b/code/modules/planet/virgo4_vr.dm @@ -1,4 +1,4 @@ -var/datum/planet/virgo4/planet_virgo4 = null +GLOBAL_DATUM(planet_virgo4, /datum/planet/virgo4) /datum/time/virgo4 seconds_in_day = 24 HOURS @@ -12,7 +12,7 @@ var/datum/planet/virgo4/planet_virgo4 = null /datum/planet/virgo4/New() ..() - planet_virgo4 = src + GLOB.planet_virgo4 = src weather_holder = new /datum/weather_holder/virgo4(src) /datum/planet/virgo4/update_sun() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 1012d708a4..d057dc9240 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -102,6 +102,7 @@ GLOBAL_LIST_EMPTY(apcs) req_access = list(ACCESS_ENGINE_EQUIP) blocks_emissive = EMISSIVE_BLOCK_NONE vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature + flags = WALL_ITEM var/area/area var/areastring = null var/obj/item/cell/cell diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 685d2927ee..452c74a13a 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -256,7 +256,7 @@ GLOBAL_LIST_EMPTY(all_turbines) found_grid_checker = TRUE if(!found_grid_checker) // Otherwise lets break some stuff. spawn(1) - command_announcement.Announce("Dangerous power spike detected in the power network. Please check machinery \ + GLOB.command_announcement.Announce("Dangerous power spike detected in the power network. Please check machinery \ for electrical damage.", "Critical Power Overload") var/i = 0 diff --git a/code/modules/power/grid_checker.dm b/code/modules/power/grid_checker.dm index 255b52e76c..38f0545784 100644 --- a/code/modules/power/grid_checker.dm +++ b/code/modules/power/grid_checker.dm @@ -63,7 +63,7 @@ /obj/machinery/power/grid_checker/proc/power_failure(var/announce = TRUE) if(announce) - command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, \ + GLOB.command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, \ the colony's power will be shut off for an indeterminate duration while the powernet monitor restarts automatically, or \ when Engineering can manually resolve the issue.", "Critical Power Failure", @@ -89,7 +89,7 @@ /obj/machinery/power/grid_checker/proc/end_power_failure(var/announce = TRUE) if(announce) - command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", + GLOB.command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') power_failing = FALSE diff --git a/code/modules/power/profiling.dm b/code/modules/power/profiling.dm index d643c22a43..6122f40628 100644 --- a/code/modules/power/profiling.dm +++ b/code/modules/power/profiling.dm @@ -1,14 +1,14 @@ datum -var/global/enable_power_update_profiling = 0 +GLOBAL_VAR_INIT(enable_power_update_profiling, FALSE) -var/global/power_profiled_time = 0 -var/global/power_last_profile_time = 0 +GLOBAL_VAR_INIT(power_profiled_time, 0) +GLOBAL_VAR_INIT(power_last_profile_time, 0) GLOBAL_LIST_EMPTY(power_update_requests_by_machine) GLOBAL_LIST_EMPTY(power_update_requests_by_area) /proc/log_power_update_request(area/A, obj/machinery/M) - if (!enable_power_update_profiling) + if (!GLOB.enable_power_update_profiling) return var/machine_type = "[M.type]" @@ -22,8 +22,8 @@ GLOBAL_LIST_EMPTY(power_update_requests_by_area) else GLOB.power_update_requests_by_area[A.name] = 1 - power_profiled_time += (world.time - power_last_profile_time) - power_last_profile_time = world.time + GLOB.power_profiled_time += (world.time - GLOB.power_last_profile_time) + GLOB.power_last_profile_time = world.time /client/proc/toggle_power_update_profiling() set name = "Toggle Area Power Update Profiling" @@ -31,15 +31,15 @@ GLOBAL_LIST_EMPTY(power_update_requests_by_area) set category = "Debug" if(!check_rights(R_DEBUG)) return - if(enable_power_update_profiling) - enable_power_update_profiling = 0 + if(GLOB.enable_power_update_profiling) + GLOB.enable_power_update_profiling = FALSE to_chat(usr, "Area power update profiling disabled.") message_admins("[key_name(src)] toggled area power update profiling off.") log_admin("[key_name(src)] toggled area power update profiling off.") else - enable_power_update_profiling = 1 - power_last_profile_time = world.time + GLOB.enable_power_update_profiling = TRUE + GLOB.power_last_profile_time = world.time to_chat(usr, "Area power update profiling enabled.") message_admins("[key_name(src)] toggled area power update profiling on.") @@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(power_update_requests_by_area) if(!check_rights(R_DEBUG)) return - to_chat(usr, "Total profiling time: [power_profiled_time] ticks") + to_chat(usr, "Total profiling time: [GLOB.power_profiled_time] ticks") for (var/M in GLOB.power_update_requests_by_machine) to_chat(usr, "[M] = [GLOB.power_update_requests_by_machine[M]]") @@ -65,7 +65,7 @@ GLOBAL_LIST_EMPTY(power_update_requests_by_area) if(!check_rights(R_DEBUG)) return - to_chat(usr, "Total profiling time: [power_profiled_time] ticks") - to_chat(usr, "Total profiling time: [power_profiled_time] ticks") + to_chat(usr, "Total profiling time: [GLOB.power_profiled_time] ticks") + to_chat(usr, "Total profiling time: [GLOB.power_profiled_time] ticks") for (var/A in GLOB.power_update_requests_by_area) to_chat(usr, "[A] = [GLOB.power_update_requests_by_area[A]]") diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm index d89fb17d6c..4655dcdc89 100644 --- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm +++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm @@ -294,6 +294,7 @@ anchored = TRUE density = FALSE amount_per_transfer_from_this = 45 + flags = WALL_ITEM /obj/structure/reagent_dispensers/peppertank/Initialize(mapload) . = ..() diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 3850f75ee5..e51056478c 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -227,7 +227,7 @@ /datum/feedback_variable/proc/get_parsed() return list(variable,value,details) -var/obj/machinery/blackbox_recorder/blackbox +GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder) /obj/machinery/blackbox_recorder icon = 'icons/obj/stationobjs.dmi' @@ -261,15 +261,14 @@ var/obj/machinery/blackbox_recorder/blackbox //Only one can exist in the world! /obj/machinery/blackbox_recorder/Initialize(mapload) . = ..() - if(blackbox) - if(istype(blackbox,/obj/machinery/blackbox_recorder)) - return INITIALIZE_HINT_QDEL - blackbox = src + if(istype(GLOB.blackbox, /obj/machinery/blackbox_recorder)) + return INITIALIZE_HINT_QDEL + GLOB.blackbox = src /obj/machinery/blackbox_recorder/Destroy() var/turf/T = locate(1,1,2) if(T) - blackbox = null + GLOB.blackbox = null var/obj/machinery/blackbox_recorder/BR = new/obj/machinery/blackbox_recorder(T) BR.msg_common = msg_common BR.msg_science = msg_science @@ -284,8 +283,6 @@ var/obj/machinery/blackbox_recorder/blackbox BR.feedback = feedback BR.messages = messages BR.messages_admin = messages_admin - if(blackbox != BR) - blackbox = BR . = ..() /obj/machinery/blackbox_recorder/proc/find_feedback_datum(var/variable) @@ -371,57 +368,57 @@ var/obj/machinery/blackbox_recorder/blackbox return text /proc/feedback_set(var/variable,var/value) - if(!blackbox) return + if(!GLOB.blackbox) return variable = sql_sanitize_text(variable) - var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable) + var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable) if(!FV) return FV.set_value(value) /proc/feedback_inc(var/variable,var/value) - if(!blackbox) return + if(!GLOB.blackbox) return variable = sql_sanitize_text(variable) - var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable) + var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable) if(!FV) return FV.inc(value) /proc/feedback_dec(var/variable,var/value) - if(!blackbox) return + if(!GLOB.blackbox) return variable = sql_sanitize_text(variable) - var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable) + var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable) if(!FV) return FV.dec(value) /proc/feedback_set_details(var/variable,var/details) - if(!blackbox) return + if(!GLOB.blackbox) return variable = sql_sanitize_text(variable) details = sql_sanitize_text(details) - var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable) + var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable) if(!FV) return FV.set_details(details) /proc/feedback_add_details(var/variable,var/details) - if(!blackbox) return + if(!GLOB.blackbox) return variable = sql_sanitize_text(variable) details = sql_sanitize_text(details) - var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable) + var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable) if(!FV) return diff --git a/code/modules/resleeving/sleevecard.dm b/code/modules/resleeving/sleevecard.dm index 3b46fbfa8c..ca30bf0bf3 100644 --- a/code/modules/resleeving/sleevecard.dm +++ b/code/modules/resleeving/sleevecard.dm @@ -130,7 +130,7 @@ var/list/emote = list() emote["name"] = name emote["id"] = GLOB.pai_emotions[name] - emotions.Add(list(emote)) + UNTYPED_LIST_ADD(emotions, emote) data["emotions"] = emotions data["current_emotion"] = card.current_emotion diff --git a/code/modules/rogueminer_vr/asteroid.dm b/code/modules/rogueminer_vr/asteroid.dm index c056eae02f..9a80fb3c19 100644 --- a/code/modules/rogueminer_vr/asteroid.dm +++ b/code/modules/rogueminer_vr/asteroid.dm @@ -36,7 +36,7 @@ //Builds an empty map /datum/rogue/asteroid/New(var/core, var/tw, var/tu) - rm_controller.dbg("A(n): New asteroid, with: C:[core], TW:[tw], TU:[tu].") + GLOB.rm_controller.dbg("A(n): New asteroid, with: C:[core], TW:[tw], TU:[tu].") if(core) coresize = core @@ -46,20 +46,20 @@ type_under = tu width = coresize*3 - rm_controller.dbg("A(n): My width is [width].") + GLOB.rm_controller.dbg("A(n): My width is [width].") map = new/list(width,width,0) - rm_controller.dbg("A(n): Created empty map lists. Map now has [map.len] X-lists.") + GLOB.rm_controller.dbg("A(n): Created empty map lists. Map now has [map.len] X-lists.") //Adds something to a spot in the asteroid map /datum/rogue/asteroid/proc/spot_add(var/x,var/y,var/thing) if(!x || !y || !thing) return - rm_controller.dbg("A(sa): Adding [thing] at [x],[y] in the map.") + GLOB.rm_controller.dbg("A(sa): Adding [thing] at [x],[y] in the map.") var/list/work = map[x][y] work.Add(thing) - rm_controller.dbg("A(n): [x],[y] now contains [work.len] items.") + GLOB.rm_controller.dbg("A(n): [x],[y] now contains [work.len] items.") //Removes something from a spot in the asteroid map /datum/rogue/asteroid/proc/spot_remove(var/x,var/y,var/thing) @@ -84,7 +84,7 @@ width = 3 //Small 1-tile room by default. /datum/rogue/asteroid/predef/New() //Basically just ignore what we're told. - rm_controller.dbg("Ap(n): A predefined asteroid is created with width [width].") + GLOB.rm_controller.dbg("Ap(n): A predefined asteroid is created with width [width].") map = new/list(width,width,0) //Abandoned 1-tile hollow cargo box (pressurized). diff --git a/code/modules/rogueminer_vr/controller.dm b/code/modules/rogueminer_vr/controller.dm index 16062f6780..bab987c174 100644 --- a/code/modules/rogueminer_vr/controller.dm +++ b/code/modules/rogueminer_vr/controller.dm @@ -3,7 +3,7 @@ // Makes mining zones more difficult as you enter new ones // THIS IS THE FIRST UNIT INITIALIZED THAT STARTS EVERYTHING ////////////////////////////// -var/datum/controller/rogue/rm_controller +GLOBAL_DATUM(rm_controller, /datum/controller/rogue) /datum/controller/rogue var/list/datum/rogue/zonemaster/all_zones = list() @@ -144,37 +144,37 @@ var/datum/controller/rogue/rm_controller /datum/controller/rogue/proc/mark_clean(var/datum/rogue/zonemaster/ZM) if(!(ZM in all_zones)) //What? Who? - rm_controller.dbg("RMC(mc): Some unknown zone asked to be listed.") + GLOB.rm_controller.dbg("RMC(mc): Some unknown zone asked to be listed.") if(ZM in ready_zones) - rm_controller.dbg("RMC(mc): Finite state machine broken.") + GLOB.rm_controller.dbg("RMC(mc): Finite state machine broken.") clean_zones += ZM /datum/controller/rogue/proc/mark_ready(var/datum/rogue/zonemaster/ZM) if(!(ZM in all_zones)) //What? Who? - rm_controller.dbg("RMC(mr): Some unknown zone asked to be listed.") + GLOB.rm_controller.dbg("RMC(mr): Some unknown zone asked to be listed.") if(ZM in clean_zones) - rm_controller.dbg("RMC(mr): Finite state machine broken.") + GLOB.rm_controller.dbg("RMC(mr): Finite state machine broken.") ready_zones += ZM /datum/controller/rogue/proc/unmark_clean(var/datum/rogue/zonemaster/ZM) if(!(ZM in all_zones)) //What? Who? - rm_controller.dbg("RMC(umc): Some unknown zone asked to be listed.") + GLOB.rm_controller.dbg("RMC(umc): Some unknown zone asked to be listed.") if(!(ZM in clean_zones)) - rm_controller.dbg("RMC(umc): Finite state machine broken.") + GLOB.rm_controller.dbg("RMC(umc): Finite state machine broken.") clean_zones -= ZM /datum/controller/rogue/proc/unmark_ready(var/datum/rogue/zonemaster/ZM) if(!(ZM in all_zones)) //What? Who? - rm_controller.dbg("RMC(umr): Some unknown zone asked to be listed.") + GLOB.rm_controller.dbg("RMC(umr): Some unknown zone asked to be listed.") if(!(ZM in ready_zones)) - rm_controller.dbg("RMC(umr): Finite state machine broken.") + GLOB.rm_controller.dbg("RMC(umr): Finite state machine broken.") ready_zones -= ZM @@ -191,10 +191,10 @@ var/datum/controller/rogue/rm_controller ZM_toscore.score_zone() ZM_target.prepare_zone() else - rm_controller.dbg("RMC(pnz): I was asked for a new zone but there's no space.") + GLOB.rm_controller.dbg("RMC(pnz): I was asked for a new zone but there's no space.") if(clean_zones.len <= 1) //Need to clean the oldest one, too. - rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.") + GLOB.rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.") spawn(0) //Detatch it so we can return the new zone for now. var/datum/rogue/zonemaster/ZM_oldest = get_oldest_zone() if(ZM_oldest) ZM_oldest.clean_zone() diff --git a/code/modules/rogueminer_vr/debug.dm b/code/modules/rogueminer_vr/debug.dm index 2bba2f003f..d9114182bf 100644 --- a/code/modules/rogueminer_vr/debug.dm +++ b/code/modules/rogueminer_vr/debug.dm @@ -4,5 +4,5 @@ set desc = "Debug the RogueMiner controller." if(!check_rights_for(src, R_HOLDER)) return - debug_variables(rm_controller) + debug_variables(GLOB.rm_controller) feedback_add_details("admin_verb","DRM") diff --git a/code/modules/rogueminer_vr/zone_console.dm b/code/modules/rogueminer_vr/zone_console.dm index b3ee425f24..c3a3fca4f0 100644 --- a/code/modules/rogueminer_vr/zone_console.dm +++ b/code/modules/rogueminer_vr/zone_console.dm @@ -26,8 +26,8 @@ return INITIALIZE_HINT_LATELOAD /obj/machinery/computer/roguezones/LateInitialize() - if(!rm_controller) - rm_controller = new /datum/controller/rogue() + if(!GLOB.rm_controller) + GLOB.rm_controller = new /datum/controller/rogue() /obj/machinery/computer/roguezones/attack_ai(mob/user as mob) return attack_hand(user) @@ -45,16 +45,16 @@ ui.open() /obj/machinery/computer/roguezones/tgui_data(mob/user) - var/chargePercent = min(100, ((((world.time - rm_controller.last_scan) / 10) / 60) / rm_controller.scan_wait) * 100) - var/curZoneOccupied = rm_controller.current_zone ? rm_controller.current_zone.is_occupied() : 0 + var/chargePercent = min(100, ((((world.time - GLOB.rm_controller.last_scan) / 10) / 60) / GLOB.rm_controller.scan_wait) * 100) + var/curZoneOccupied = GLOB.rm_controller.current_zone ? GLOB.rm_controller.current_zone.is_occupied() : 0 var/list/data = ..() data["timeout_percent"] = chargePercent - data["diffstep"] = rm_controller.diffstep - data["difficulty"] = rm_controller.diffstep_strs[rm_controller.diffstep] + data["diffstep"] = GLOB.rm_controller.diffstep + data["difficulty"] = GLOB.rm_controller.diffstep_strs[GLOB.rm_controller.diffstep] data["occupied"] = curZoneOccupied data["scanning"] = scanning - data["updated"] = world.time - rm_controller.last_scan < 200 //Very recently scanned (20 seconds) + data["updated"] = world.time - GLOB.rm_controller.last_scan < 200 //Very recently scanned (20 seconds) data["debug"] = debug if(!shuttle_control) @@ -102,7 +102,7 @@ return //Set some kinda scanning var to pause UI input on console - rm_controller.last_scan = world.time + GLOB.rm_controller.last_scan = world.time scanning = 1 sleep(60) @@ -110,7 +110,7 @@ shuttle_control.shuttle_tag = null //Build and get a new zone. - var/datum/rogue/zonemaster/ZM_target = rm_controller.prepare_new_zone() + var/datum/rogue/zonemaster/ZM_target = GLOB.rm_controller.prepare_new_zone() //Update shuttle destination. var/datum/shuttle/autodock/ferry/S = SSshuttles.shuttles["Belter"] @@ -121,10 +121,10 @@ shuttle_control.shuttle_tag = "Belter" //Update rm_previous - rm_controller.previous_zone = rm_controller.current_zone + GLOB.rm_controller.previous_zone = GLOB.rm_controller.current_zone //Update rm_current - rm_controller.current_zone = ZM_target + GLOB.rm_controller.current_zone = ZM_target //Unset scanning scanning = 0 @@ -137,7 +137,7 @@ return // Shuttle computer has been destroyed if (!(shuttle_control.z in using_map.belter_belt_z)) return // Usable only when shuttle is away - if(rm_controller.current_zone && rm_controller.current_zone.is_occupied()) + if(GLOB.rm_controller.current_zone && GLOB.rm_controller.current_zone.is_occupied()) return // Not usable if shuttle is in occupied zone // Okay do it var/datum/shuttle/autodock/ferry/S = SSshuttles.shuttles["Belter"] diff --git a/code/modules/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm index 742128aeeb..8c4c330f49 100644 --- a/code/modules/rogueminer_vr/zonemaster.dm +++ b/code/modules/rogueminer_vr/zonemaster.dm @@ -37,7 +37,7 @@ if(!istype(myshuttle_landmark)) WARNING("Zonemaster cannot find a shuttle landmark in its area '[A]'") spawn(10) //This is called from controller New() and freaks out if this calls back too fast. - rm_controller.mark_clean(src) + GLOB.rm_controller.mark_clean(src) /////////////////////////////// ///// Utility Procs /////////// @@ -58,21 +58,21 @@ /////////////////////////////// /datum/rogue/zonemaster/proc/generate_asteroid(var/core_min = 2, var/core_max = 5) //Chance for a predefined structure instead, more common later - if(prob(rm_controller.diffstep*4)) - rm_controller.dbg("ZM(ga): Fell into prefab asteroid chance.") - var/prefab = pick(rm_controller.prefabs["tier[rm_controller.diffstep]"]) - rm_controller.dbg("ZM(ga): Picked [prefab] as the prefab.") + if(prob(GLOB.rm_controller.diffstep*4)) + GLOB.rm_controller.dbg("ZM(ga): Fell into prefab asteroid chance.") + var/prefab = pick(GLOB.rm_controller.prefabs["tier[GLOB.rm_controller.diffstep]"]) + GLOB.rm_controller.dbg("ZM(ga): Picked [prefab] as the prefab.") var/prefabinst = new prefab(null) return prefabinst var/datum/rogue/asteroid/A = new(rand(core_min,core_max)) - rm_controller.dbg("ZM(ga): New asteroid with C:[A.coresize], TW:[A.type_wall].") + GLOB.rm_controller.dbg("ZM(ga): New asteroid with C:[A.coresize], TW:[A.type_wall].") //Add the core to the asteroid's map - rm_controller.dbg("ZM(ga): Starting core generation for [A.coresize] size core..") + GLOB.rm_controller.dbg("ZM(ga): Starting core generation for [A.coresize] size core..") for(var/x = 1, x <= A.coresize, x++) for(var/y = 1, y <= A.coresize, y++) - rm_controller.dbg("ZM(ga): Doing core-relative [x],[y] at [A.coresize+x],[A.coresize+y], [A.type_wall].") + GLOB.rm_controller.dbg("ZM(ga): Doing core-relative [x],[y] at [A.coresize+x],[A.coresize+y], [A.type_wall].") A.spot_add(A.coresize+x, A.coresize+y, A.type_wall) var/max_armlen = A.coresize - 1 //Can tweak to change appearance. @@ -80,10 +80,10 @@ //Add the arms to the asteroid's map //Vertical arms for(var/x = A.coresize+1, x <= A.coresize*2, x++) //Start at leftmost side of core, work towards higher X. - rm_controller.dbg("ZM(ga): Vert arms. My current column is x:[x].") + GLOB.rm_controller.dbg("ZM(ga): Vert arms. My current column is x:[x].") var/B_arm = rand(0,max_armlen) var/T_arm = rand(0,max_armlen) - rm_controller.dbg("ZM(ga): B/T. Going to make B:[B_arm], T:[T_arm] for x:[x].") + GLOB.rm_controller.dbg("ZM(ga): B/T. Going to make B:[B_arm], T:[T_arm] for x:[x].") //Bottom arm for(var/y = A.coresize, y > A.coresize-B_arm, y--) //Start at bottom edge of the core, work towards lower Y. @@ -95,10 +95,10 @@ //Horizontal arms for(var/y = A.coresize+1, y <= A.coresize*2, y++) //Start at lower side of core, work towards higher Y. - rm_controller.dbg("ZM(ga): Horiz arms. My current row is y:[y].") + GLOB.rm_controller.dbg("ZM(ga): Horiz arms. My current row is y:[y].") var/R_arm = rand(0,max_armlen) var/L_arm = rand(0,max_armlen) - rm_controller.dbg("ZM(ga): R/L. Going to make R:[R_arm], L:[L_arm] for y:[y].") + GLOB.rm_controller.dbg("ZM(ga): R/L. Going to make R:[R_arm], L:[L_arm] for y:[y].") //Right arm for(var/x = (A.coresize*2)+1, x <= ((A.coresize*2)+1)+R_arm, x++) //Start at right edge of core, work towards higher X. @@ -111,31 +111,31 @@ //Diagonals // hao do - rm_controller.dbg("ZM(ga): Asteroid generation done.") + GLOB.rm_controller.dbg("ZM(ga): Asteroid generation done.") return A /datum/rogue/zonemaster/proc/place_asteroid(var/datum/rogue/asteroid/A,var/obj/asteroid_spawner/SP) ASSERT(SP && A) - rm_controller.dbg("ZM(pa): Placing at point [SP.x],[SP.y],[SP.z].") + GLOB.rm_controller.dbg("ZM(pa): Placing at point [SP.x],[SP.y],[SP.z].") SP.myasteroid = A //Bottom-left corner of our bounding box var/BLx = SP.x - (A.width/2) var/BLy = SP.y - (A.width/2) - rm_controller.dbg("ZM(pa): BLx is [BLx], BLy is [BLy].") + GLOB.rm_controller.dbg("ZM(pa): BLx is [BLx], BLy is [BLy].") - rm_controller.dbg("ZM(pa): The asteroid has [A.map.len] X-lists.") + GLOB.rm_controller.dbg("ZM(pa): The asteroid has [A.map.len] X-lists.") var/list/changedturfs = list() for(var/Ix=1, Ix <= A.map.len, Ix++) var/list/curr_x = A.map[Ix] - rm_controller.dbg("ZM(pa): Now doing X:[Ix] which has [curr_x.len] Y-lists.") + GLOB.rm_controller.dbg("ZM(pa): Now doing X:[Ix] which has [curr_x.len] Y-lists.") for(var/Iy=1, Iy <= curr_x.len, Iy++) var/list/curr_y = curr_x[Iy] - rm_controller.dbg("ZM(pa): Now doing Y:[Iy] which has [curr_y.len] items.") + GLOB.rm_controller.dbg("ZM(pa): Now doing Y:[Iy] which has [curr_y.len] items.") var/world_x = BLx+Ix var/world_y = BLy+Iy @@ -144,16 +144,16 @@ var/spot = locate(world_x,world_y,world_z) for(var/T in curr_y) - rm_controller.dbg("ZM(pa): Doing entry [T] in Y-list [Iy].") + GLOB.rm_controller.dbg("ZM(pa): Doing entry [T] in Y-list [Iy].") if(ispath(T,/turf)) //We're spawning a turf - rm_controller.dbg("ZM(pa): Turf-generate mode.") + GLOB.rm_controller.dbg("ZM(pa): Turf-generate mode.") //Make sure we locate()'d a turf and not something else if(!isturf(spot)) spot = get_turf(spot) var/turf/P = spot - rm_controller.dbg("ZM(pa): Replacing [P.type] with [T].") + GLOB.rm_controller.dbg("ZM(pa): Replacing [P.type] with [T].") var/turf/newturf = P.ChangeTurf(T) changedturfs += newturf switch(newturf.type) @@ -161,7 +161,7 @@ place_resources(newturf) else //Anything not a turf - rm_controller.dbg("ZM(pa): Creating [T].") + GLOB.rm_controller.dbg("ZM(pa): Creating [T].") new T(spot) for(var/turf/T in changedturfs) @@ -174,9 +174,9 @@ #define ARTIFACTSPAWNNUM_LOWER 1 #define ARTIFACTSPAWNNUM_UPPER 1 //Replace with difficulty-based ones. - if(!M.mineral && prob(rm_controller.diffstep_chances[rm_controller.diffstep])) //Difficulty translates directly into ore chance - rm_controller.dbg("ZM(par): Adding mineral to [M.x],[M.y].") - if(rm_controller.diffstep >= 3) + if(!M.mineral && prob(GLOB.rm_controller.diffstep_chances[GLOB.rm_controller.diffstep])) //Difficulty translates directly into ore chance + GLOB.rm_controller.dbg("ZM(par): Adding mineral to [M.x],[M.y].") + if(GLOB.rm_controller.diffstep >= 3) M.turf_resource_types |= TURF_HAS_RARE_ORE M.make_ore(TRUE) else @@ -229,7 +229,7 @@ while(turfs_to_process.len) var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process) - rm_controller.dbg("ZM(par): Adding archeo find to [M.x],[M.y].") + GLOB.rm_controller.dbg("ZM(par): Adding archeo find to [M.x],[M.y].") processed_turfs.Add(archeo_turf) if(isnull(archeo_turf.finds)) archeo_turf.finds = list() @@ -275,26 +275,26 @@ //Overall 'prepare' proc (marks as ready) /datum/rogue/zonemaster/proc/prepare_zone(var/delay = 0) - rm_controller.unmark_clean(src) - rm_controller.dbg("ZM(p): Preparing zone with difficulty level [rm_controller.diffstep].") + GLOB.rm_controller.unmark_clean(src) + GLOB.rm_controller.dbg("ZM(p): Preparing zone with difficulty level [GLOB.rm_controller.diffstep].") - rm_controller.dbg("ZM(p): Randomizing spawns.") + GLOB.rm_controller.dbg("ZM(p): Randomizing spawns.") randomize_spawns() - rm_controller.dbg("ZM(p): [rockspawns.len] picked.") + GLOB.rm_controller.dbg("ZM(p): [rockspawns.len] picked.") for(var/obj/asteroid_spawner/SP in rockspawns) - rm_controller.dbg("ZM(p): Creating asteroid for [SP.x],[SP.y],[SP.z].") + GLOB.rm_controller.dbg("ZM(p): Creating asteroid for [SP.x],[SP.y],[SP.z].") var/datum/rogue/asteroid/A = generate_asteroid() - rm_controller.dbg("ZM(p): Placing asteroid.") + GLOB.rm_controller.dbg("ZM(p): Placing asteroid.") place_asteroid(A,SP) if(delay) sleep(delay) for(var/obj/rogue_mobspawner/SP in mobspawns) - rm_controller.dbg("ZM(p): Spawning mob at [SP.x],[SP.y],[SP.z].") + GLOB.rm_controller.dbg("ZM(p): Spawning mob at [SP.x],[SP.y],[SP.z].") //Make sure we can spawn a spacemob here if(!istype(get_turf(SP),/turf/space)) - rm_controller.dbg("ZM(p): Turf blocking mob spawn at [SP.x],[SP.y],[SP.z].") + GLOB.rm_controller.dbg("ZM(p): Turf blocking mob spawn at [SP.x],[SP.y],[SP.z].") mobspawns -= SP for(var/obj/rogue_mobspawner/NS in myarea.mob_spawns) if(NS in mobspawns) @@ -303,46 +303,46 @@ SP = NS break if(SP) - rm_controller.dbg("ZM(p): Got a mob spawnpoint, so picking a type.") - var/mobchoice = pickweight(rm_controller.mobs["tier[rm_controller.diffstep]"]) - rm_controller.dbg("ZM(p): Picked [mobchoice] to spawn.") + GLOB.rm_controller.dbg("ZM(p): Got a mob spawnpoint, so picking a type.") + var/mobchoice = pickweight(GLOB.rm_controller.mobs["tier[GLOB.rm_controller.diffstep]"]) + GLOB.rm_controller.dbg("ZM(p): Picked [mobchoice] to spawn.") var/mob/living/newmob = new mobchoice(get_turf(SP)) newmob.faction = FACTION_ASTEROID_BELT spawned_mobs += newmob if(delay) sleep(delay) - rm_controller.dbg("ZM(p): Zone generation done.") + GLOB.rm_controller.dbg("ZM(p): Zone generation done.") log_world("RM(stats): PREP [myarea] at [world.time] with [spawned_mobs.len] mobs, [mineral_rocks.len] minrocks, total of [rockspawns.len] rockspawns, [mobspawns.len] mobspawns.") //DEBUG code for playtest stats gathering. prepared_at = world.time - rm_controller.mark_ready(src) + GLOB.rm_controller.mark_ready(src) return myarea //Randomize the landmarks that are enabled /datum/rogue/zonemaster/proc/randomize_spawns(var/chance = 50) - rm_controller.dbg("ZM(rs): Previously [rockspawns.len] rockspawns.") + GLOB.rm_controller.dbg("ZM(rs): Previously [rockspawns.len] rockspawns.") rockspawns.Cut() - rm_controller.dbg("ZM(rs): Now [rockspawns.len] rockspawns.") + GLOB.rm_controller.dbg("ZM(rs): Now [rockspawns.len] rockspawns.") for(var/obj/asteroid_spawner/SP in myarea.asteroid_spawns) if(prob(chance)) rockspawns += SP - rm_controller.dbg("ZM(rs): Picked [rockspawns.len] new rockspawns with [chance]% chance.") + GLOB.rm_controller.dbg("ZM(rs): Picked [rockspawns.len] new rockspawns with [chance]% chance.") - rm_controller.dbg("ZM(rs): Previously [mobspawns.len] mobspawns.") + GLOB.rm_controller.dbg("ZM(rs): Previously [mobspawns.len] mobspawns.") mobspawns.Cut() - rm_controller.dbg("ZM(rs): Now [mobspawns.len] mobspawns.") + GLOB.rm_controller.dbg("ZM(rs): Now [mobspawns.len] mobspawns.") for(var/obj/rogue_mobspawner/SP in myarea.mob_spawns) - if(prob(rm_controller.diffstep_chances[rm_controller.diffstep])) + if(prob(GLOB.rm_controller.diffstep_chances[GLOB.rm_controller.diffstep])) mobspawns += SP original_mobs++ - rm_controller.dbg("ZM(rs): Picked [mobspawns.len] new mobspawns with [chance]% chance.") + GLOB.rm_controller.dbg("ZM(rs): Picked [mobspawns.len] new mobspawns with [chance]% chance.") return myarea /////////////////////////////// ///// Zone Cleaning /////////// /////////////////////////////// /datum/rogue/zonemaster/proc/score_zone(var/bonus = 10) - rm_controller.dbg("ZM(sz): Scoring zone with area [myarea].") + GLOB.rm_controller.dbg("ZM(sz): Scoring zone with area [myarea].") scored = 1 var/tally = bonus @@ -361,26 +361,26 @@ for(var/I = 1, I <= spawned_mobs.len, I++) if(isnull(spawned_mobs[I])) tally += RM_DIFF_VALUE_MOB //Mobs so annihilated they were deleted - rm_controller.dbg("ZM(sz): Scoring one mob annihilated.") + GLOB.rm_controller.dbg("ZM(sz): Scoring one mob annihilated.") if(istype(spawned_mobs[I],/mob)) var/mob/M = spawned_mobs[I] if(M.stat > 0) //Knocked out or dead or anything other than normal tally += RM_DIFF_VALUE_MOB - rm_controller.dbg("ZM(sz): Scoring one mob dead.") + GLOB.rm_controller.dbg("ZM(sz): Scoring one mob dead.") spawned_mobs.Cut() original_mobs = 0 - rm_controller.adjust_difficulty(tally) - rm_controller.dbg("ZM(sz): Finished scoring and adjusted by [tally].") + GLOB.rm_controller.adjust_difficulty(tally) + GLOB.rm_controller.dbg("ZM(sz): Finished scoring and adjusted by [tally].") log_world("RM(stats): SCORE [myarea] for [tally].") //DEBUG code for playtest stats gathering. return tally //Overall 'destroy' proc (marks as unready) /datum/rogue/zonemaster/proc/clean_zone(var/delay = 1) - rm_controller.dbg("ZM(cz): Cleaning zone with area [myarea].") + GLOB.rm_controller.dbg("ZM(cz): Cleaning zone with area [myarea].") log_world("RM(stats): CLEAN start [myarea] at [world.time] prepared at [prepared_at].") //DEBUG code for playtest stats gathering. - rm_controller.unmark_ready(src) + GLOB.rm_controller.unmark_ready(src) //Cut these lists so qdel can dereference the things properly mineral_rocks.Cut() @@ -435,8 +435,8 @@ log_world("RM(stats): CLEAN done [myarea] at [world.time].") //DEBUG code for playtest stats gathering. - rm_controller.dbg("ZM(cz): Finished cleaning up zone area [myarea].") - rm_controller.mark_clean(src) + GLOB.rm_controller.dbg("ZM(cz): Finished cleaning up zone area [myarea].") + GLOB.rm_controller.mark_clean(src) return myarea /////////////////////////////// diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 9104fbfedd..e69784eade 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -5,6 +5,7 @@ icon_state = "auth_off" layer = ABOVE_WINDOW_LAYER circuit = /obj/item/circuitboard/keycard_auth + flags = WALL_ITEM var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made. var/event = "" var/screen = 1 diff --git a/code/modules/shuttles/crashes.dm b/code/modules/shuttles/crashes.dm index b1186c126c..562bdbb17e 100644 --- a/code/modules/shuttles/crashes.dm +++ b/code/modules/shuttles/crashes.dm @@ -69,7 +69,7 @@ var/boomsize = shuttle_turfs.len / 10 // Bigger shuttle = bigger boom explosion(epicenter, 0, boomsize, boomsize*2, boomsize*3) moving_status = SHUTTLE_CRASHED - command_announcement.Announce("[crash_message]", "Shuttle Alert") + GLOB.command_announcement.Announce("[crash_message]", "Shuttle Alert") // Put people back for(var/mob/living/L as anything in victims) diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index cdc53cc2e6..17d30a4925 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -38,9 +38,9 @@ var/estimated_time = round(GLOB.emergency_shuttle.estimate_arrival_time()/60,1) if (GLOB.emergency_shuttle.evac) - priority_announcement.Announce(replacetext(replacetext(using_map.emergency_shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s")) + GLOB.priority_announcement.Announce(replacetext(replacetext(using_map.emergency_shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s")) else - priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramdepart.ogg') + GLOB.priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramdepart.ogg') ..() /datum/shuttle/autodock/ferry/emergency/can_launch(var/user) diff --git a/code/modules/shuttles/shuttles_multi.dm b/code/modules/shuttles/shuttles_multi.dm index 334e118f3d..1e9668c50d 100644 --- a/code/modules/shuttles/shuttles_multi.dm +++ b/code/modules/shuttles/shuttles_multi.dm @@ -54,9 +54,9 @@ /datum/shuttle/autodock/multi/proc/announce_departure() if(cloaked || isnull(departure_message)) return - command_announcement.Announce(departure_message, (announcer ? announcer : "[using_map.boss_name]")) + GLOB.command_announcement.Announce(departure_message, (announcer ? announcer : "[using_map.boss_name]")) /datum/shuttle/autodock/multi/proc/announce_arrival() if(cloaked || isnull(arrival_message)) return - command_announcement.Announce(arrival_message, (announcer ? announcer : "[using_map.boss_name]")) + GLOB.command_announcement.Announce(arrival_message, (announcer ? announcer : "[using_map.boss_name]")) diff --git a/code/modules/shuttles/web_datums.dm b/code/modules/shuttles/web_datums.dm index 1137365173..060c0044ce 100644 --- a/code/modules/shuttles/web_datums.dm +++ b/code/modules/shuttles/web_datums.dm @@ -119,7 +119,7 @@ return if(!radio_announce) - command_announcement.Announce(get_departure_message(),(announcer ? announcer : "[using_map.boss_name]")) + GLOB.command_announcement.Announce(get_departure_message(),(announcer ? announcer : "[using_map.boss_name]")) else GLOB.global_announcer.autosay(get_departure_message(),(announcer ? announcer : "[using_map.boss_name]")) @@ -131,7 +131,7 @@ return if(!radio_announce) - command_announcement.Announce(get_arrival_message(),(announcer ? announcer : "[using_map.boss_name]")) + GLOB.command_announcement.Announce(get_arrival_message(),(announcer ? announcer : "[using_map.boss_name]")) else GLOB.global_announcer.autosay(get_arrival_message(),(announcer ? announcer : "[using_map.boss_name]")) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 3ee1c6cffe..835b30d7b6 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -1,4 +1,4 @@ -var/list/table_icon_cache = list() +GLOBAL_LIST_EMPTY(table_icon_cache) /obj/structure/table name = "table frame" @@ -336,14 +336,14 @@ var/list/table_icon_cache = list() /proc/get_table_image(var/icon/ticon,var/ticonstate,var/tdir,var/tcolor,var/talpha) var/icon_cache_key = "\ref[ticon]-[ticonstate]-[tdir]-[tcolor]-[talpha]" - var/image/I = table_icon_cache[icon_cache_key] + var/image/I = GLOB.table_icon_cache[icon_cache_key] if(!I) I = image(icon = ticon, icon_state = ticonstate, dir = tdir) if(tcolor) I.color = tcolor if(talpha) I.alpha = talpha - table_icon_cache[icon_cache_key] = I + GLOB.table_icon_cache[icon_cache_key] = I return I diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index cc0a8a0819..af1366a728 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -486,7 +486,7 @@ owner.species.deform = owner.species.get_icobase(get_deform = TRUE) owner.species.vanity_base_fit = new_species if(istype(owner.species, /datum/species/shapeshifter)) //TODO: See if this is still needed. - wrapped_species_by_ref["\ref[owner]"] = new_species + GLOB.wrapped_species_by_ref["\ref[owner]"] = new_species owner.regenerate_icons() generate_data(ui.user, owner) changed_hook(APPEARANCECHANGER_CHANGED_RACE) diff --git a/maps/tether/tether_things.dm b/maps/tether/tether_things.dm index 6e6404f50f..25b58ade64 100644 --- a/maps/tether/tether_things.dm +++ b/maps/tether/tether_things.dm @@ -71,7 +71,7 @@ teleport_z = Z_LEVEL_TETHER_SURFACE_LOW /obj/effect/step_trigger/teleporter/planetary_fall/virgo3b/find_planet() - planet = planet_virgo3b + planet = GLOB.planet_virgo3b // Our map is small, if the supermatter is ejected lets not have it just blow up somewhere else /obj/machinery/power/supermatter/touch_map_edge() diff --git a/maps/tether/tether_turfs.dm b/maps/tether/tether_turfs.dm index d839e9ca83..a1379e147a 100644 --- a/maps/tether/tether_turfs.dm +++ b/maps/tether/tether_turfs.dm @@ -110,13 +110,13 @@ // Virgo 3b trufs /turf/space/transit/south/virgo3b/planet_fall/find_planet() - return planet_virgo3b + return GLOB.planet_virgo3b /turf/space/transit/east/virgo3b/planet_fall/find_planet() - return planet_virgo3b + return GLOB.planet_virgo3b /turf/simulated/sky/virgo3b/south/planet_fall/find_planet() - return planet_virgo3b + return GLOB.planet_virgo3b /turf/space/v3b_midpoint/find_planet() - return planet_virgo3b + return GLOB.planet_virgo3b diff --git a/maps/virgo_minitest/virgo_minitest_defines.dm b/maps/virgo_minitest/virgo_minitest_defines.dm index ef445be928..d91ac891a4 100644 --- a/maps/virgo_minitest/virgo_minitest_defines.dm +++ b/maps/virgo_minitest/virgo_minitest_defines.dm @@ -74,3 +74,10 @@ new /datum/random_map/noise/ore(null, 1, 1, Z_LEVEL_MAIN_VIRGO_TESTING, 64, 64) */ return 1 + +// The map doesn't use shuttles +/datum/shuttle/autodock/ferry/emergency/escape + defer_initialisation = TRUE + +/datum/shuttle/autodock/ferry/supply/cargo + defer_initialisation = TRUE diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 29e5f269d5..38578fa5ff 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -1,6 +1,6 @@ var/datum/map/using_map = new USING_MAP_DATUM -var/list/all_maps = list() +GLOBAL_LIST_EMPTY(all_maps) /hook/startup/proc/initialise_map_list() for(var/type in subtypesof(/datum/map)) @@ -13,7 +13,7 @@ var/list/all_maps = list() if(!M.path) log_mapping("Map '[M]' does not have a defined path, not adding to map list!") else - all_maps[M.path] = M + GLOB.all_maps[M.path] = M return 1 diff --git a/vorestation.dme b/vorestation.dme index fcb1fc3010..875ac4e794 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -3270,8 +3270,6 @@ #include "code\modules\media\juke_remote.dm" #include "code\modules\media\media_machinery.dm" #include "code\modules\media\media_player_html5.dm" -#include "code\modules\media\media_player_vlc.dm" -#include "code\modules\media\media_player_wmp.dm" #include "code\modules\media\media_tracks.dm" #include "code\modules\media\mediamanager.dm" #include "code\modules\media\walkpod.dm"