diff --git a/archive/maps/southern_cross/events/wildlife_encounter.dm b/archive/maps/southern_cross/events/wildlife_encounter.dm index 57fde54ef1..45f504e558 100644 --- a/archive/maps/southern_cross/events/wildlife_encounter.dm +++ b/archive/maps/southern_cross/events/wildlife_encounter.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/wildlife_encounter /datum/event2/meta/wildlife_encounter/get_weight() - var/explorers = metric.count_people_with_job(/datum/job/explorer) + metric.count_people_with_job(/datum/job/sar) + var/explorers = GLOB.metric.count_people_with_job(/datum/job/explorer) + GLOB.metric.count_people_with_job(/datum/job/sar) if(!explorers) return 0 diff --git a/code/ATMOSPHERICS/_atmos_setup.dm b/code/ATMOSPHERICS/_atmos_setup.dm index bd141a30b9..217ca3062e 100644 --- a/code/ATMOSPHERICS/_atmos_setup.dm +++ b/code/ATMOSPHERICS/_atmos_setup.dm @@ -178,7 +178,7 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ var/cache_name = state - for(var/D in cardinal) + for(var/D in GLOB.cardinal) var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) underlays[cache_name + "[D]"] = I for(var/pipe_color in pipe_colors) @@ -210,7 +210,7 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ if(state == "") continue - for(var/D in cardinal) + for(var/D in GLOB.cardinal) var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) switch(state) if("intact") diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm index 47110628b1..b74a5249ae 100644 --- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm +++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm @@ -45,7 +45,7 @@ var/image/I = image(icon = icon, icon_state = "algae-pipe-overlay", dir = dir) I.color = PIPE_COLOR_BLUE add_overlay(I) - I = image(icon = icon, icon_state = "algae-pipe-overlay", dir = reverse_dir[dir]) + I = image(icon = icon, icon_state = "algae-pipe-overlay", dir = GLOB.reverse_dir[dir]) I.color = PIPE_COLOR_BLACK add_overlay(I) @@ -186,7 +186,7 @@ data["materials"] = materials_ui data["last_flow_rate"] = last_flow_rate data["last_power_draw"] = last_power_draw - data["inputDir"] = dir2text(reverse_dir[dir]) + data["inputDir"] = dir2text(GLOB.reverse_dir[dir]) data["outputDir"] = dir2text(dir) data["usePower"] = use_power data["errorText"] = ui_error diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index 8aa36e660b..172dd77419 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -31,7 +31,7 @@ icon_state = "base" ports = new() - for(var/d in cardinal) + for(var/d in GLOB.cardinal) var/datum/omni_port/new_port = new(src, d) switch(d) if(NORTH) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index f8d16f14d2..389a3d49f7 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -129,7 +129,7 @@ // Return the air from the turf in "front" of us (opposite the way the pipe is facing) /obj/machinery/atmospherics/unary/vent_pump/high_volume/wall_mounted/return_air() - var/turf/T = get_step(src, reverse_dir[dir]) + var/turf/T = get_step(src, GLOB.reverse_dir[dir]) if(isnull(T)) return ..() return T.return_air() diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index e5d2837b51..479ec37ecc 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -151,7 +151,7 @@ var/node1_dir var/node2_dir - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction diff --git a/code/ATMOSPHERICS/pipes/he_pipes.dm b/code/ATMOSPHERICS/pipes/he_pipes.dm index d2b1a5f8e3..396ef2fcd8 100644 --- a/code/ATMOSPHERICS/pipes/he_pipes.dm +++ b/code/ATMOSPHERICS/pipes/he_pipes.dm @@ -47,7 +47,7 @@ var/node1_dir var/node2_dir - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&initialize_directions_he) if (!node1_dir) node1_dir = direction diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm index 35eb418516..a0f7789c7c 100644 --- a/code/ATMOSPHERICS/pipes/manifold.dm +++ b/code/ATMOSPHERICS/pipes/manifold.dm @@ -137,7 +137,7 @@ /obj/machinery/atmospherics/pipe/manifold/atmos_init() var/connect_directions = (NORTH|SOUTH|EAST|WEST)&(~dir) - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) if (can_be_node(target, 1)) @@ -148,7 +148,7 @@ break - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) if (can_be_node(target, 2)) @@ -159,7 +159,7 @@ break - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) if (can_be_node(target, 3)) diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm index e5a029405f..de5a26a8e3 100644 --- a/code/ATMOSPHERICS/pipes/simple.dm +++ b/code/ATMOSPHERICS/pipes/simple.dm @@ -132,7 +132,7 @@ var/node1_dir var/node2_dir - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction diff --git a/code/ZAS/ConnectionManager.dm b/code/ZAS/ConnectionManager.dm index 8d7e270cde..dc0f5293b9 100644 --- a/code/ZAS/ConnectionManager.dm +++ b/code/ZAS/ConnectionManager.dm @@ -1,13 +1,13 @@ /* Overview: - The connection_manager class stores connections in each cardinal direction on a turf. + The connection_manager class stores connections in each GLOB.cardinal direction on a turf. It isn't always present if a turf has no connections, check if(connections) before using. Contains procs for mass manipulation of connection data. Class Vars: - NSEWUD - Connections to this turf in each cardinal direction. + NSEWUD - Connections to this turf in each GLOB.cardinal direction. Class Procs: diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index e78074107a..f594a3c313 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -147,7 +147,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin A.fire_act(air_contents, air_contents.temperature, air_contents.volume) //spread - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/simulated/enemy_tile = get_step(my_tile, direction) if(istype(enemy_tile)) @@ -186,7 +186,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin qdel(src) return - set_dir(pick(cardinal)) + set_dir(pick(GLOB.cardinal)) var/datum/gas_mixture/air_contents = loc.return_air() color = fire_color(air_contents.temperature) diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index ba155379a3..50d44973e7 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -59,7 +59,7 @@ var/unconnected_dirs = check_dirs #ifdef MULTIZAS - var/to_check = cornerdirsz + var/to_check = GLOB.cornerdirsz #else var/to_check = cornerdirs #endif @@ -69,7 +69,7 @@ if((dir & check_dirs) == dir) //check that they are connected by the corner turf var/connected_dirs = get_zone_neighbours(get_step(src, dir)) - if(connected_dirs && (dir & reverse_dir[connected_dirs]) == dir) + if(connected_dirs && (dir & GLOB.reverse_dir[connected_dirs]) == dir) unconnected_dirs &= ~dir //they are, so unflag the cardinals in question //it is safe to remove src from the zone if all cardinals are connected by corner turfs @@ -80,9 +80,9 @@ . = 0 if(istype(T) && T.zone) #ifdef MULTIZAS - var/to_check = cardinalz + var/to_check = GLOB.cardinalz #else - var/to_check = cardinal + var/to_check = GLOB.cardinal #endif for(var/dir in to_check) var/turf/simulated/other = get_step(T, dir) @@ -159,7 +159,7 @@ if(istype(unsim, /turf/simulated)) var/turf/simulated/sim = unsim - sim.open_directions |= reverse_dir[d] + sim.open_directions |= GLOB.reverse_dir[d] if(HAS_VALID_ZONE(sim)) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index c755d22603..362d72ecf2 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -143,10 +143,10 @@ #define WALL_CAN_OPEN 1 #define WALL_OPENING 2 -#define BOMBCAP_DVSTN_RADIUS (max_explosion_range/4) -#define BOMBCAP_HEAVY_RADIUS (max_explosion_range/2) -#define BOMBCAP_LIGHT_RADIUS max_explosion_range -#define BOMBCAP_FLASH_RADIUS (max_explosion_range*1.5) +#define BOMBCAP_DVSTN_RADIUS (GLOB.max_explosion_range/4) +#define BOMBCAP_HEAVY_RADIUS (GLOB.max_explosion_range/2) +#define BOMBCAP_LIGHT_RADIUS GLOB.max_explosion_range +#define BOMBCAP_FLASH_RADIUS (GLOB.max_explosion_range*1.5) // NTNet module-configuration values. Do not change these. If you need to add another use larger number (5..6..7 etc) #define NTNET_SOFTWAREDOWNLOAD 1 // Downloads of software from NTNet #define NTNET_PEERTOPEER 2 // P2P transfers of files between devices diff --git a/code/_global_vars/__unsorted.dm b/code/_global_vars/__unsorted.dm new file mode 100644 index 0000000000..85fc224c14 --- /dev/null +++ b/code/_global_vars/__unsorted.dm @@ -0,0 +1,86 @@ +// Items that ask to be called every cycle. +GLOBAL_DATUM(data_core, /datum/datacore) + +//I would upgrade all instances of global.machines to SSmachines.all_machines but it's used in so many places and a search returns so many matches for 'machines' that isn't a use of the global... +GLOBAL_LIST_INIT(machines, SSmachines.all_machines) + +GLOBAL_LIST_EMPTY(active_diseases) +GLOBAL_LIST_EMPTY(hud_icon_reference) + +GLOBAL_LIST_EMPTY(global_mutations) // List of hidden mutation things. + +GLOBAL_DATUM_INIT(universe, /datum/universal_state, new) + +GLOBAL_LIST(global_map) + +// Noises made when hit while typing. +GLOBAL_LIST_INIT(hit_appends, list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF")) + +// var/station_name = "Northern Star" +// var/const/station_orig = "Northern Star" //station_name can't be const due to event prefix/suffix +// var/const/station_short = "Northern Star" +// var/const/dock_name = "Vir Interstellar Spaceport" +// var/const/boss_name = "Central Command" +// var/const/boss_short = "CentCom" +// var/const/company_name = "NanoTrasen" +// var/const/company_short = "NT" +// var/const/star_name = "Vir" +// var/const/starsys_name = "Vir" +GLOBAL_VAR_INIT(game_year, (text2num(time2text(world.realtime, "YYYY")) + 300)) +GLOBAL_VAR_INIT(round_progressing, TRUE) + +GLOBAL_VAR_INIT(master_mode, "extended") // "extended" +GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode. + +GLOBAL_DATUM_INIT(mods, /datum/moduletypes, new()) + +GLOBAL_VAR_INIT(gravity_is_on, TRUE) + +GLOBAL_VAR(join_motd) + +// Metric datum, used to keep track of the round. +GLOBAL_DATUM_INIT(metric, /datum/metric, new()) + +// For FTP requests. (i.e. downloading runtime logs.) +// However it'd be ok to use for accessing attack logs and such too, which are even laggier. +GLOBAL_VAR_INIT(fileaccess_timer, 0) +GLOBAL_VAR(custom_event_msg) + + +// Used by robots and robot preferences for regular modules. +GLOBAL_LIST_INIT(robot_module_types, list( + "Standard", "Engineering", /*"Surgeon",*/ "Crisis", "Miner", + "Janitor", "Service", "Clown", "Clerical", "Security", + "Research", "Command" //"Exploration" +)) +// List of modules added during code red +GLOBAL_LIST_INIT(emergency_module_types, list( + "Combat" +)) +// List of modules available to AI shells +GLOBAL_LIST_INIT(shell_module_types, list( + "Standard", "Engineering", "Surgeon", "Crisis", "Miner", + "Janitor", "Service", "Clown", "Clerical", "Security", + "Research", "Command" //"Exploration" +)) +// List of whitelisted modules +GLOBAL_LIST_INIT(whitelisted_module_types, list( + "Lost" +)) + +// Bomb cap! +GLOBAL_VAR_INIT(max_explosion_range, 14) + +// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. +GLOBAL_DATUM_INIT(global_announcer, /obj/item/radio/intercom/omni, new /obj/item/radio/intercom/omni(null)) + +GLOBAL_LIST_INIT(station_departments, list("Command", "Medical", "Engineering", "Research", "Security", "Cargo", "Exploration", "Civilian")) + +//Icons for in-game HUD glasses. Why don't we just share these a little bit? +GLOBAL_DATUM_INIT(ingame_hud, /icon, icon('icons/mob/hud.dmi')) +GLOBAL_DATUM_INIT(ingame_hud_med, /icon, icon('icons/mob/hud_med.dmi')) +GLOBAL_DATUM_INIT(buildmode_hud, /icon, icon('icons/misc/buildmode.dmi')) + +//Keyed list for caching icons so you don't need to make them for records, IDs, etc all separately. +//Could be useful for AI impersonation or something at some point? +GLOBAL_LIST_EMPTY(cached_character_icons) diff --git a/code/_global_vars/configuration.dm b/code/_global_vars/configuration.dm index 36c08c4565..e6680b2f00 100644 --- a/code/_global_vars/configuration.dm +++ b/code/_global_vars/configuration.dm @@ -6,3 +6,6 @@ GLOBAL_DATUM_INIT(revdata, /datum/getrev, new) GLOBAL_VAR_INIT(game_version, "VOREStation") GLOBAL_VAR_INIT(changelog_hash, "") + +// Debug2 is used in conjunction with a lot of admin verbs and therefore is actually legit. +GLOBAL_VAR_INIT(Debug2, FALSE) diff --git a/code/_global_vars/lists/flavor_misc.dm b/code/_global_vars/lists/flavor_misc.dm new file mode 100644 index 0000000000..3aaa1c3d4a --- /dev/null +++ b/code/_global_vars/lists/flavor_misc.dm @@ -0,0 +1,37 @@ +GLOBAL_LIST_INIT(scarySounds, list( + 'sound/weapons/thudswoosh.ogg', + 'sound/weapons/Taser.ogg', + 'sound/weapons/armbomb.ogg', + 'sound/voice/hiss1.ogg', + 'sound/voice/hiss2.ogg', + 'sound/voice/hiss3.ogg', + 'sound/voice/hiss4.ogg', + 'sound/voice/hiss5.ogg', + 'sound/voice/hiss6.ogg', + 'sound/effects/Glassbr1.ogg', + 'sound/effects/Glassbr2.ogg', + 'sound/effects/Glassbr3.ogg', + 'sound/items/Welder.ogg', + 'sound/items/Welder2.ogg', + 'sound/machines/door/old_airlock.ogg', + 'sound/effects/clownstep1.ogg', + 'sound/effects/clownstep2.ogg', + 'sound/voice/teppi/roar.ogg', + 'sound/voice/moth/scream_moth.ogg', + 'sound/voice/nya.ogg', + 'sound/voice/succlet_shriek.ogg' +)) + +GLOBAL_LIST_INIT(scawwySownds, list( + 'sound/voice/ScawwySownds/a scawey sownd.ogg', + 'sound/voice/ScawwySownds/is that you.ogg', + 'sound/voice/ScawwySownds/lookit this darkness wow.ogg', + 'sound/voice/ScawwySownds/maint preds.ogg', + 'sound/voice/ScawwySownds/spooky sounds.ogg', + 'sound/voice/ScawwySownds/sus.ogg', + 'sound/voice/ScawwySownds/this is scaewy.ogg', + 'sound/voice/ScawwySownds/what is that behind you.ogg', + 'sound/voice/ScawwySownds/what you doin over dere.ogg', + 'sound/voice/ScawwySownds/whats up with all the trash.ogg', + 'sound/voice/ScawwySownds/youre afraid of the dark arent you.ogg' +)) diff --git a/code/_global_vars/lists/logging.dm b/code/_global_vars/lists/logging.dm new file mode 100644 index 0000000000..fb667277af --- /dev/null +++ b/code/_global_vars/lists/logging.dm @@ -0,0 +1,17 @@ +GLOBAL_LIST_EMPTY(admin_log) +GLOBAL_PROTECT(admin_log) + +GLOBAL_LIST_EMPTY(lastsignalers) // Keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]" +GLOBAL_PROTECT(lastsignalers) + +GLOBAL_LIST_EMPTY(combatlog) +GLOBAL_PROTECT(combatlog) + +GLOBAL_LIST_EMPTY(IClog) +GLOBAL_PROTECT(IClog) + +GLOBAL_LIST_EMPTY(OOClog) +GLOBAL_PROTECT(OOClog) + +GLOBAL_LIST_EMPTY(adminlog) +GLOBAL_PROTECT(adminlog) diff --git a/code/_global_vars/lists/mapping.dm b/code/_global_vars/lists/mapping.dm index 7f415df82f..df4d9c90ae 100644 --- a/code/_global_vars/lists/mapping.dm +++ b/code/_global_vars/lists/mapping.dm @@ -30,3 +30,34 @@ GLOBAL_LIST_INIT(cww_dir, list( // cww_dir[dir] = counter-clockwise rotation of 32, 40, 36, 44, 33, 41, 37, 45, 34, 42, 38, 46, 35, 43, 39, 47, // DOWN - Same as first line but +32 48, 56, 52, 60, 49, 57, 53, 61, 50, 58, 54, 62, 51, 59, 55, 63 // UP+DOWN - Same as first line but +48 )) + +GLOBAL_LIST_EMPTY(monkeystart) +GLOBAL_LIST_EMPTY(wizardstart) +GLOBAL_LIST_EMPTY(newplayer_start) + +GLOBAL_LIST_EMPTY(latejoin) +GLOBAL_LIST_EMPTY(latejoin_gateway) +GLOBAL_LIST_EMPTY(latejoin_elevator) +GLOBAL_LIST_EMPTY(latejoin_cryo) +GLOBAL_LIST_EMPTY(latejoin_cyborg) + +GLOBAL_LIST_EMPTY(prisonwarp) // Prisoners go to these +GLOBAL_LIST_EMPTY(holdingfacility) // Captured people go here +GLOBAL_LIST_EMPTY(xeno_spawn) // Aliens spawn at at these. +GLOBAL_LIST_EMPTY(tdome1) +GLOBAL_LIST_EMPTY(tdome2) +GLOBAL_LIST_EMPTY(tdomeobserve) +GLOBAL_LIST_EMPTY(tdomeadmin) +GLOBAL_LIST_EMPTY(prisonsecuritywarp) // Prison security goes to these. +GLOBAL_LIST_EMPTY(prisonwarped) // List of players already warped. +GLOBAL_LIST_EMPTY(blobstart) +GLOBAL_LIST_EMPTY(ninjastart) + +GLOBAL_LIST_EMPTY(awaydestinations) // Away missions. A list of landmarks that the warpgate can take you to. + +GLOBAL_LIST_EMPTY(vinestart) +GLOBAL_LIST_EMPTY(verminstart) + +GLOBAL_LIST_EMPTY(awayabductors) // List of scatter landmarks for Abductors in Gateways +GLOBAL_LIST_EMPTY(eventdestinations) // List of scatter landmarks for VOREStation event portals +GLOBAL_LIST_EMPTY(eventabductors) // List of scatter landmarks for VOREStation abductor portals diff --git a/code/_global_vars/logging.dm b/code/_global_vars/logging.dm index 06a240822d..5ac744da96 100644 --- a/code/_global_vars/logging.dm +++ b/code/_global_vars/logging.dm @@ -1,2 +1,32 @@ GLOBAL_VAR(round_id) GLOBAL_PROTECT(round_id) + +/// The directory in which ALL log files should be stored +GLOBAL_VAR_INIT(log_directory, "data/logs/") //See world.dm for the full calculated path +GLOBAL_PROTECT(log_directory) + +GLOBAL_VAR(diary) +GLOBAL_PROTECT(diary) + +GLOBAL_VAR(error_log) +GLOBAL_PROTECT(error_log) + +GLOBAL_VAR(sql_error_log) +GLOBAL_PROTECT(sql_error_log) + +GLOBAL_VAR(query_debug_log) +GLOBAL_PROTECT(query_debug_log) + +GLOBAL_VAR(debug_log) +GLOBAL_PROTECT(debug_log) + +GLOBAL_VAR(href_logfile) +GLOBAL_PROTECT(href_logfile) + +/// All bomb related messages +GLOBAL_LIST_EMPTY(bombers) +GLOBAL_PROTECT(bombers) + +/// Stores who uploaded laws to which silicon-based lifeform, and what the law was +GLOBAL_LIST_EMPTY(lawchanges) +GLOBAL_PROTECT(lawchanges) diff --git a/code/_helpers/files.dm b/code/_helpers/files.dm index ec2fb1ca74..a776c3363d 100644 --- a/code/_helpers/files.dm +++ b/code/_helpers/files.dm @@ -17,7 +17,6 @@ * * However it'd be ok to use for accessing attack logs and such too, which are even laggier. */ -GLOBAL_VAR_INIT(fileaccess_timer, 0) /client/proc/browse_files(root_type=BROWSE_ROOT_ALL_LOGS, max_iterations=10, list/valid_extensions=list("txt","log","htm", "html", "gz", "json")) // wow why was this ever a parameter @@ -26,7 +25,7 @@ GLOBAL_VAR_INIT(fileaccess_timer, 0) if(BROWSE_ROOT_ALL_LOGS) root = "data/logs/" if(BROWSE_ROOT_CURRENT_LOGS) - root = log_path + root = GLOB.log_directory var/path = root for(var/i in 1 to max_iterations) diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index e484e8d9b3..f0cd6a8e9b 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -383,7 +383,7 @@ else return 0 -/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions +/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the GLOB.cardinal directions //returns only NORTH, SOUTH, EAST, or WEST var/dx = finish.x - start.x var/dy = finish.y - start.y @@ -551,7 +551,7 @@ return mixedcolor /** -* Gets the highest and lowest pressures from the tiles in cardinal directions +* Gets the highest and lowest pressures from the tiles in GLOB.cardinal directions * around us, then checks the difference. */ /proc/getOPressureDifferential(var/turf/loc) diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 5cbfabd138..594f0bfe81 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -6,7 +6,7 @@ /* For logging round startup. */ /proc/start_log(log) - WRITE_LOG(log, "START: Starting up [log_path].") + WRITE_LOG(log, "START: Starting up [GLOB.log_directory].") return log /* Close open log handles. This should be called as late as possible, and no logging should hapen after. */ @@ -26,28 +26,28 @@ to_world_log("## TESTING: [msg]") /proc/log_admin(text) - admin_log.Add(text) + GLOB.admin_log.Add(text) if (CONFIG_GET(flag/log_admin)) - WRITE_LOG(diary, "ADMIN: [text]") + WRITE_LOG(GLOB.diary, "ADMIN: [text]") /proc/log_admin_private(text) - admin_log.Add(text) + GLOB.admin_log.Add(text) if (CONFIG_GET(flag/log_admin)) - WRITE_LOG(diary, "ADMINPRIVATE: [text]") + WRITE_LOG(GLOB.diary, "ADMINPRIVATE: [text]") /proc/log_adminpm(text, client/source, client/dest) - admin_log.Add(text) + GLOB.admin_log.Add(text) if (CONFIG_GET(flag/log_admin)) - WRITE_LOG(diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]") /proc/log_pray(text, client/source) - admin_log.Add(text) + GLOB.admin_log.Add(text) if (CONFIG_GET(flag/log_admin)) - WRITE_LOG(diary, "PRAY: [key_name(source)]: [text]") + WRITE_LOG(GLOB.diary, "PRAY: [key_name(source)]: [text]") /proc/log_debug(text) if (CONFIG_GET(flag/log_debug)) - WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]") + WRITE_LOG(GLOB.debug_log, "DEBUG: [sanitize(text)]") for(var/client/C in GLOB.admins) if(C.prefs?.read_preference(/datum/preference/toggle/show_debug_logs)) @@ -57,25 +57,25 @@ /proc/log_game(text) if (CONFIG_GET(flag/log_game)) - WRITE_LOG(diary, "GAME: [text]") + WRITE_LOG(GLOB.diary, "GAME: [text]") /proc/log_vote(text) if (CONFIG_GET(flag/log_vote)) - WRITE_LOG(diary, "VOTE: [text]") + WRITE_LOG(GLOB.diary, "VOTE: [text]") /proc/log_access_in(client/new_client) if (CONFIG_GET(flag/log_access)) var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]" - WRITE_LOG(diary, "ACCESS IN: [message]") //VOREStation Edit + WRITE_LOG(GLOB.diary, "ACCESS IN: [message]") //VOREStation Edit /proc/log_access_out(mob/last_mob) if (CONFIG_GET(flag/log_access)) var/message = "[key_name(last_mob)] - IP:[last_mob.lastKnownIP] - CID:Logged Out - BYOND Logged Out" - WRITE_LOG(diary, "ACCESS OUT: [message]") + WRITE_LOG(GLOB.diary, "ACCESS OUT: [message]") /proc/log_say(text, mob/speaker) if (CONFIG_GET(flag/log_say)) - WRITE_LOG(diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]") //Log the message to in-game dialogue logs, as well. if(speaker.client) @@ -84,25 +84,25 @@ /proc/log_ooc(text, client/user) if (CONFIG_GET(flag/log_ooc)) - WRITE_LOG(diary, "OOC: [user.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "OOC: [user.simple_info_line()]: [html_decode(text)]") GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("OOC:") + " - " + span_blue(span_bold("[text]")) /proc/log_aooc(text, client/user) if (CONFIG_GET(flag/log_ooc)) - WRITE_LOG(diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]") GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("AOOC:") + " - " + span_red(span_bold("[text]")) /proc/log_looc(text, client/user) if (CONFIG_GET(flag/log_ooc)) - WRITE_LOG(diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]") GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("LOOC:") + " - " + span_orange(span_bold("[text]")) /proc/log_whisper(text, mob/speaker) if (CONFIG_GET(flag/log_whisper)) - WRITE_LOG(diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]") if(speaker.client) speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("SAY:") + " - " + span_gray(span_italics("[text]")) @@ -110,7 +110,7 @@ /proc/log_emote(text, mob/speaker) if (CONFIG_GET(flag/log_emote)) - WRITE_LOG(diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]") if(speaker.client) speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("EMOTE:") + " - " + span_pink("[text]") @@ -118,38 +118,38 @@ /proc/log_attack(attacker, defender, message) if (CONFIG_GET(flag/log_attack)) - WRITE_LOG(diary, "ATTACK: [attacker] against [defender]: [message]") + WRITE_LOG(GLOB.diary, "ATTACK: [attacker] against [defender]: [message]") /proc/log_adminsay(text, mob/speaker) if (CONFIG_GET(flag/log_adminchat)) - WRITE_LOG(diary, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)]") /proc/log_modsay(text, mob/speaker) if (CONFIG_GET(flag/log_adminchat)) - WRITE_LOG(diary, "MODSAY: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "MODSAY: [speaker.simple_info_line()]: [html_decode(text)]") /proc/log_eventsay(text, mob/speaker) if (CONFIG_GET(flag/log_adminchat)) - WRITE_LOG(diary, "EVENTSAY: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "EVENTSAY: [speaker.simple_info_line()]: [html_decode(text)]") /proc/log_ghostsay(text, mob/speaker) if (CONFIG_GET(flag/log_say)) - WRITE_LOG(diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]") speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("DEADSAY:") + " - " + span_green("[text]") GLOB.round_text_log += span_small(span_purple(span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("DEADSAY:") + " - [text]")) /proc/log_ghostemote(text, mob/speaker) if (CONFIG_GET(flag/log_emote)) - WRITE_LOG(diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]") /proc/log_adminwarn(text) if (CONFIG_GET(flag/log_adminwarn)) - WRITE_LOG(diary, "ADMINWARN: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "ADMINWARN: [html_decode(text)]") /proc/log_pda(text, mob/speaker) if (CONFIG_GET(flag/log_pda)) - WRITE_LOG(diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]") speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("MSG:") + " - " + span_darkgreen("[text]") GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("MSG:") + " - " + span_darkgreen("[text]") @@ -157,24 +157,24 @@ /proc/log_to_dd(text) to_world_log(text) //this comes before the config check because it can't possibly runtime if(CONFIG_GET(flag/log_world_output)) - WRITE_LOG(diary, "DD_OUTPUT: [text]") + WRITE_LOG(GLOB.diary, "DD_OUTPUT: [text]") /proc/log_error(text) to_world_log(text) - WRITE_LOG(error_log, "RUNTIME: [text]") + WRITE_LOG(GLOB.error_log, "RUNTIME: [text]") /proc/log_misc(text) - WRITE_LOG(diary, "MISC: [text]") + WRITE_LOG(GLOB.diary, "MISC: [text]") /proc/log_sql(text) - WRITE_LOG(sql_error_log, "SQL: [text]") + WRITE_LOG(GLOB.sql_error_log, "SQL: [text]") /proc/log_query_debug(text) - WRITE_LOG(query_debug_log, "SQL: [text]") + WRITE_LOG(GLOB.query_debug_log, "SQL: [text]") /proc/log_topic(text) - if(Debug2) - WRITE_LOG(diary, "TOPIC: [text]") + if(GLOB.Debug2) + WRITE_LOG(GLOB.diary, "TOPIC: [text]") /proc/log_unit_test(text) to_world_log("## UNIT_TEST: [text]") @@ -186,7 +186,7 @@ #endif /proc/log_asset(text) - WRITE_LOG(diary, "ASSET: [text]") + WRITE_LOG(GLOB.diary, "ASSET: [text]") /proc/report_progress(var/progress_message) admin_notice(span_boldannounce("[progress_message]"), R_DEBUG) diff --git a/code/_helpers/logging/debug.dm b/code/_helpers/logging/debug.dm index 9a847ee61b..18bce9523f 100644 --- a/code/_helpers/logging/debug.dm +++ b/code/_helpers/logging/debug.dm @@ -7,5 +7,5 @@ entry += " | DATA: " entry += data - WRITE_LOG(diary, entry) + WRITE_LOG(GLOB.diary, entry) SEND_TEXT(world.log, text) diff --git a/code/_helpers/logging/ui.dm b/code/_helpers/logging/ui.dm index ed6a0b6588..57e927c5b3 100644 --- a/code/_helpers/logging/ui.dm +++ b/code/_helpers/logging/ui.dm @@ -1,6 +1,6 @@ /proc/log_href(text) //WRITE_LOG(GLOB.world_href_log, "HREF: [text]") - WRITE_LOG(href_logfile, "HREF: [text]") + WRITE_LOG(GLOB.href_logfile, "HREF: [text]") /** * Appends a tgui-related log entry. All arguments are optional. @@ -33,4 +33,4 @@ if(message) entry += "\n[message]" //WRITE_LOG(GLOB.tgui_log, entry) - WRITE_LOG(diary, entry) + WRITE_LOG(GLOB.diary, entry) diff --git a/code/_helpers/logging_vr.dm b/code/_helpers/logging_vr.dm index b0bf8d07e7..8b23c0396b 100644 --- a/code/_helpers/logging_vr.dm +++ b/code/_helpers/logging_vr.dm @@ -1,11 +1,11 @@ /proc/log_nsay(text, inside, mob/speaker) if (CONFIG_GET(flag/log_say)) - WRITE_LOG(diary, "NSAY (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "NSAY (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]") /proc/log_nme(text, inside, mob/speaker) if (CONFIG_GET(flag/log_emote)) - WRITE_LOG(diary, "NME (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "NME (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]") /proc/log_subtle(text, mob/speaker) if (CONFIG_GET(flag/log_emote)) - WRITE_LOG(diary, "SUBTLE: [speaker.simple_info_line()]: [html_decode(text)]") + WRITE_LOG(GLOB.diary, "SUBTLE: [speaker.simple_info_line()]: [html_decode(text)]") diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 7036a270a6..9b348c5b2c 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -131,7 +131,7 @@ else return "unknown" /proc/RoundHealth(health) - var/list/icon_states = cached_icon_states(ingame_hud_med) + var/list/icon_states = cached_icon_states(GLOB.ingame_hud_med) for(var/icon_state in icon_states) if(health >= text2num(icon_state)) return icon_state @@ -347,11 +347,11 @@ Proc for attack log creation, because really why not /proc/cached_character_icon(var/mob/desired) var/cachekey = "\ref[desired][desired.real_name]" - if(cached_character_icons[cachekey]) - . = cached_character_icons[cachekey] + if(GLOB.cached_character_icons[cachekey]) + . = GLOB.cached_character_icons[cachekey] else . = getCompoundIcon(desired) - cached_character_icons[cachekey] = . + GLOB.cached_character_icons[cachekey] = . /proc/not_has_ooc_text(mob/user) if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.read_preference(/datum/preference/text/living/ooc_notes) || length(user.client.prefs.read_preference(/datum/preference/text/living/ooc_notes)) < 15)) diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm index 913e69b705..988df64661 100644 --- a/code/_helpers/names.dm +++ b/code/_helpers/names.dm @@ -176,7 +176,7 @@ GLOBAL_VAR(syndicate_code_response) //Code response for traitors. var/locations[] = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks//if null, defaults to drinks instead. var/names[] = list() - for(var/datum/data/record/t in data_core.general)//Picks from crew manifest. + for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest. names += t.fields["name"] var/maxwords = words//Extra var to check for duplicates. diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index 540535383c..87c6f6ef29 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -8,6 +8,7 @@ * Misc */ +GLOBAL_LIST_INIT(alphabet_upper, list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")) /* * SQL sanitization diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 5158b76f6c..a126479431 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -303,7 +303,7 @@ Turf and target are seperate in case you want to teleport some distance from a t if(oldname) //update the datacore records! This is goig to be a bit costly. - for(var/list/L in list(data_core.general,data_core.medical,data_core.security,data_core.locked)) + for(var/list/L in list(GLOB.data_core.general, GLOB.data_core.medical, GLOB.data_core.security, GLOB.data_core.locked)) for(var/datum/data/record/R in L) if(R.fields["name"] == oldname) R.fields["name"] = newname @@ -1145,8 +1145,8 @@ var/global/list/common_tools = list( if(surface) return surface -/proc/reverse_direction(var/dir) - return global.reverse_dir[dir] +/proc/reverse_direction(dir) + return GLOB.reverse_dir[dir] /* Checks if that loc and dir has a item on the wall diff --git a/code/_macros.dm b/code/_macros.dm index ee43ee9494..f47d75f49d 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -45,3 +45,6 @@ #define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 //Needed for the R-UST port #define JOINTEXT(X) jointext(X, null) + +#define isbelly(A) istype(A, /obj/belly) +#define iscapturecrystal(A) istype(A, /obj/item/capture_crystal) diff --git a/code/_macros_vr.dm b/code/_macros_vr.dm deleted file mode 100644 index 314689541e..0000000000 --- a/code/_macros_vr.dm +++ /dev/null @@ -1,2 +0,0 @@ -#define isbelly(A) istype(A, /obj/belly) -#define iscapturecrystal(A) istype(A, /obj/item/capture_crystal) diff --git a/code/_onclick/hud/picture_in_picture.dm b/code/_onclick/hud/picture_in_picture.dm index b88e284807..4b7da6b978 100644 --- a/code/_onclick/hud/picture_in_picture.dm +++ b/code/_onclick/hud/picture_in_picture.dm @@ -41,7 +41,7 @@ base.plane = PLATING_PLANE base.appearance_flags = PIXEL_SCALE - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/mutable_appearance/dir = new /mutable_appearance(base) dir.dir = direction dir.icon_state = "background_[direction]" diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 2f0fc843e9..ab85d71902 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -106,3 +106,7 @@ /datum/config_entry/string/alert_desc_delta default = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." + +// Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes. +/datum/config_entry/number/mouse_respawn_time + default = 2.5 diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 7757e3adc0..9bdf04629d 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -136,7 +136,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle = new priority_announcement.Announce(using_map.shuttle_recall_message) /datum/emergency_shuttle_controller/proc/can_call() - if (!universe.OnShuttleCall(null)) + if (!GLOB.universe.OnShuttleCall(null)) return 0 if (deny_shuttle) return 0 diff --git a/code/controllers/subsystems/air_traffic.dm b/code/controllers/subsystems/air_traffic.dm index a4e094eece..8ee8a354fd 100644 --- a/code/controllers/subsystems/air_traffic.dm +++ b/code/controllers/subsystems/air_traffic.dm @@ -78,7 +78,7 @@ SUBSYSTEM_DEF(atc) /datum/controller/subsystem/atc/proc/msg(var/message,var/sender) ASSERT(message) - global_announcer.autosay("[message]", sender ? sender : "[using_map.dock_name] Control") + GLOB.global_announcer.autosay("[message]", sender ? sender : "[using_map.dock_name] Control") /datum/controller/subsystem/atc/proc/is_squelched() return squelched diff --git a/code/controllers/subsystems/appreciation_messages.dm b/code/controllers/subsystems/appreciation_messages.dm index e3d53ea179..2bb454ca12 100644 --- a/code/controllers/subsystems/appreciation_messages.dm +++ b/code/controllers/subsystems/appreciation_messages.dm @@ -93,7 +93,7 @@ SUBSYSTEM_DEF(appreciation) /datum/controller/subsystem/appreciation/proc/msg(var/message,var/sender) ASSERT(message) - global_announcer.autosay("[message]", sender ? sender : "Cultural Awareness") + GLOB.global_announcer.autosay("[message]", sender ? sender : "Cultural Awareness") /datum/controller/subsystem/appreciation/proc/is_squelched() return squelched diff --git a/code/controllers/subsystems/atoms.dm b/code/controllers/subsystems/atoms.dm index e74800a6f8..972765a4f2 100644 --- a/code/controllers/subsystems/atoms.dm +++ b/code/controllers/subsystems/atoms.dm @@ -126,7 +126,7 @@ SUBSYSTEM_DEF(atoms) /datum/controller/subsystem/atoms/Shutdown() var/initlog = InitLog() if(initlog) - text2file(initlog, "[log_path]-initialize.log") + text2file(initlog, "[GLOB.log_directory]-initialize.log") #undef BAD_INIT_QDEL_BEFORE #undef BAD_INIT_DIDNT_INIT diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm index 064c4307e6..7ef0dcd1a6 100644 --- a/code/controllers/subsystems/game_master.dm +++ b/code/controllers/subsystems/game_master.dm @@ -42,7 +42,7 @@ SUBSYSTEM_DEF(game_master) adjust_staleness(1) adjust_danger(-1) - var/global_afk = metric.assess_all_living_mobs() + var/global_afk = GLOB.metric.assess_all_living_mobs() global_afk = abs(global_afk - 100) global_afk = round(global_afk / 100, 0.1) adjust_staleness(global_afk) // Staleness increases faster if more people are less active. @@ -212,22 +212,22 @@ SUBSYSTEM_DEF(game_master) dat += "" dat += "All Living Mobs" - dat += "[metric.assess_all_living_mobs()]%" + dat += "[GLOB.metric.assess_all_living_mobs()]%" dat += "" dat += "" dat += "All Ghosts" - dat += "[metric.assess_all_dead_mobs()]%" + dat += "[GLOB.metric.assess_all_dead_mobs()]%" dat += "" dat += "" dat += "Departments" dat += "" - for(var/D in metric.departments) + for(var/D in GLOB.metric.departments) dat += "" dat += "[D]" - dat += "[metric.assess_department(D)]%" + dat += "[GLOB.metric.assess_department(D)]%" dat += "" dat += "" @@ -237,7 +237,7 @@ SUBSYSTEM_DEF(game_master) for(var/mob/M as anything in player_list) dat += "" dat += "[M] ([M.ckey])" - dat += "[metric.assess_player_activity(M)]%" + dat += "[GLOB.metric.assess_player_activity(M)]%" dat += "" dat += "" diff --git a/code/controllers/subsystems/holomaps.dm b/code/controllers/subsystems/holomaps.dm index 9275172973..6b4af9d334 100644 --- a/code/controllers/subsystems/holomaps.dm +++ b/code/controllers/subsystems/holomaps.dm @@ -19,6 +19,6 @@ SUBSYSTEM_DEF(holomaps) return SS_INIT_SUCCESS /datum/controller/subsystem/holomaps/stat_entry(msg) - if (!Debug2) + if (!GLOB.Debug2) return // Only show up in stat panel if debugging is enabled. . = ..() diff --git a/code/controllers/subsystems/inactivity.dm b/code/controllers/subsystems/inactivity.dm index bd4f154a1b..4696ee74cc 100644 --- a/code/controllers/subsystems/inactivity.dm +++ b/code/controllers/subsystems/inactivity.dm @@ -41,7 +41,7 @@ SUBSYSTEM_DEF(inactivity) if(isAI(C.mob)) var/mob/living/silicon/ai/A = C.mob GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(A.loc) - global_announcer.autosay("[A] has been moved to intelligence storage.", "Artificial Intelligence Oversight") + GLOB.global_announcer.autosay("[A] has been moved to intelligence storage.", "Artificial Intelligence Oversight") A.clear_client() information = " while an AI." diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm index 580bd0e948..958f65f35a 100644 --- a/code/controllers/subsystems/mapping.dm +++ b/code/controllers/subsystems/mapping.dm @@ -213,7 +213,7 @@ SUBSYSTEM_DEF(mapping) // VOREStation Edit End: Re-enable this /datum/controller/subsystem/mapping/stat_entry(msg) - if (!Debug2) + if (!GLOB.Debug2) return // Only show up in stat panel if debugging is enabled. . = ..() diff --git a/code/controllers/subsystems/motion_tracker.dm b/code/controllers/subsystems/motion_tracker.dm index a27a71bf6d..2d3127143b 100644 --- a/code/controllers/subsystems/motion_tracker.dm +++ b/code/controllers/subsystems/motion_tracker.dm @@ -65,7 +65,7 @@ SUBSYSTEM_DEF(motiontracker) if(!prob(hear_chance)) return if(hear_chance <= 40) - T = get_step(T,pick(cardinal)) + T = get_step(T,pick(GLOB.cardinal)) if(!T) // incase... return // Echo time, we have a turf diff --git a/code/controllers/subsystems/skybox.dm b/code/controllers/subsystems/skybox.dm index a1f6dcf11a..9692c55160 100644 --- a/code/controllers/subsystems/skybox.dm +++ b/code/controllers/subsystems/skybox.dm @@ -64,7 +64,7 @@ SUBSYSTEM_DEF(skybox) speedspace_cache["EW_[i]"] = MA //Over-the-edge images - for (var/dir in alldirs) + for (var/dir in GLOB.alldirs) var/mutable_appearance/MA = new(normal_space) var/matrix/M = matrix() var/horizontal = (dir & (WEST|EAST)) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 453ad46d60..a3a93d8fff 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -13,7 +13,7 @@ SUBSYSTEM_DEF(ticker) var/current_state = GAME_STATE_INIT // We aren't even at pregame yet // TODO replace with CURRENT_GAME_STATE /* Relies upon the following globals (TODO move those in here) */ - // var/master_mode = "extended" //The underlying game mode (so "secret" or the voted mode). + // var/GLOB.master_mode = "extended" //The underlying game mode (so "secret" or the voted mode). // Set by SSvote when VOTE_GAMEMODE finishes. // var/round_progressing = 1 //Whether the lobby clock is ticking down. @@ -84,7 +84,7 @@ var/global/datum/controller/subsystem/ticker/ticker // Called during GAME_STATE_PREGAME (RUNLEVEL_LOBBY) /datum/controller/subsystem/ticker/proc/pregame_tick() - if(round_progressing && last_fire) + if(GLOB.round_progressing && last_fire) pregame_timeleft -= (world.time - last_fire) / (1 SECOND) if(start_immediately) @@ -122,23 +122,23 @@ var/global/datum/controller/subsystem/ticker/ticker // Returns 0 if failed to pick a mode, otherwise 1 /datum/controller/subsystem/ticker/proc/setup_choose_gamemode() //Create and announce mode - if(master_mode == "secret") + if(GLOB.master_mode == "secret") src.hide_mode = TRUE var/list/runnable_modes = config.get_runnable_modes() - if((master_mode == "random") || (master_mode == "secret")) + if((GLOB.master_mode == "random") || (GLOB.master_mode == "secret")) if(!runnable_modes.len) to_world(span_filter_system(span_bold("Unable to choose playable game mode.") + " Reverting to pregame lobby.")) return 0 - if(secret_force_mode != "secret") - src.mode = config.pick_mode(secret_force_mode) + if(GLOB.secret_force_mode != "secret") + src.mode = config.pick_mode(GLOB.secret_force_mode) if(!src.mode) var/list/weighted_modes = list() for(var/datum/game_mode/GM in runnable_modes) weighted_modes[GM.config_tag] = CONFIG_GET(keyed_list/probabilities)[GM.config_tag] src.mode = config.gamemode_cache[pickweight(weighted_modes)] else - src.mode = config.pick_mode(master_mode) + src.mode = config.pick_mode(GLOB.master_mode) if(!src.mode) to_world(span_boldannounce("Serious error in mode setup! Reverting to pregame lobby.")) //Uses setup instead of set up due to computational context. @@ -427,7 +427,7 @@ var/global/datum/controller/subsystem/ticker/ticker // If they're a carbon, they can get manifested if(J?.mob_type & JOB_CARBON) - data_core.manifest_inject(new_char) + GLOB.data_core.manifest_inject(new_char) /datum/controller/subsystem/ticker/proc/collect_minds() for(var/mob/living/player in player_list) @@ -555,7 +555,7 @@ var/global/datum/controller/subsystem/ticker/ticker if(GAME_STATE_INIT) ..() if(GAME_STATE_PREGAME) // RUNLEVEL_LOBBY - msg = "START [round_progressing ? "[round(pregame_timeleft)]s" : "(PAUSED)"]" + msg = "START [GLOB.round_progressing ? "[round(pregame_timeleft)]s" : "(PAUSED)"]" if(GAME_STATE_SETTING_UP) // RUNLEVEL_SETUP msg = "SETUP" if(GAME_STATE_PLAYING) // RUNLEVEL_GAME diff --git a/code/controllers/subsystems/transcore_vr.dm b/code/controllers/subsystems/transcore_vr.dm index 643b7bd4f4..d8a1400b65 100644 --- a/code/controllers/subsystems/transcore_vr.dm +++ b/code/controllers/subsystems/transcore_vr.dm @@ -256,9 +256,9 @@ SUBSYSTEM_DEF(transcore) var/datum/transcore_db/db = SStranscore.db_by_mind_name(MR.mindname) var/datum/transhuman/body_record/BR = db.body_scans[MR.mindname] if(!BR) - global_announcer.autosay("[MR.mindname] is past-due for a mind backup, but lacks a corresponding body record.", "TransCore Oversight", "Medical") + GLOB.global_announcer.autosay("[MR.mindname] is past-due for a mind backup, but lacks a corresponding body record.", "TransCore Oversight", "Medical") return - global_announcer.autosay("[MR.mindname] is past-due for a mind backup.", "TransCore Oversight", BR.synthetic ? "Science" : "Medical") + GLOB.global_announcer.autosay("[MR.mindname] is past-due for a mind backup.", "TransCore Oversight", BR.synthetic ? "Science" : "Medical") // Called from mind_record to add itself to the transcore. /datum/transcore_db/proc/add_backup(var/datum/transhuman/mind_record/MR) @@ -293,8 +293,8 @@ SUBSYSTEM_DEF(transcore) // Moves all mind records from the databaes into the disk and shuts down all backup canary processing. /datum/transcore_db/proc/core_dump(var/obj/item/disk/transcore/disk) ASSERT(disk) - global_announcer.autosay("An emergency core dump has been initiated!", "TransCore Oversight", "Command") - global_announcer.autosay("An emergency core dump has been initiated!", "TransCore Oversight", "Medical") + GLOB.global_announcer.autosay("An emergency core dump has been initiated!", "TransCore Oversight", "Command") + GLOB.global_announcer.autosay("An emergency core dump has been initiated!", "TransCore Oversight", "Medical") disk.stored += backed_up backed_up.Cut() diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index aa762f190b..0d89b3684c 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -87,10 +87,10 @@ SUBSYSTEM_DEF(vote) if(choices["Continue Playing"] >= greatest_votes) greatest_votes = choices["Continue Playing"] else if(mode == VOTE_GAMEMODE) - if(master_mode in choices) - choices[master_mode] += non_voters - if(choices[master_mode] >= greatest_votes) - greatest_votes = choices[master_mode] + if(GLOB.master_mode in choices) + choices[GLOB.master_mode] += non_voters + if(choices[GLOB.master_mode] >= greatest_votes) + greatest_votes = choices[GLOB.master_mode] else if(mode == VOTE_CREW_TRANSFER) var/factor = 0.5 switch(world.time / (10 * 60)) // minutes @@ -149,12 +149,12 @@ SUBSYSTEM_DEF(vote) if(. == "Restart Round") restart = 1 if(VOTE_GAMEMODE) - if(master_mode != .) + if(GLOB.master_mode != .) world.save_mode(.) if(ticker && ticker.mode) restart = 1 else - master_mode = . + GLOB.master_mode = . if(VOTE_CREW_TRANSFER) if(. == "Initiate Crew Transfer") init_shift_change(null, 1) diff --git a/code/controllers/subsystems/xenoarch.dm b/code/controllers/subsystems/xenoarch.dm index 59dcda2de5..855032597f 100644 --- a/code/controllers/subsystems/xenoarch.dm +++ b/code/controllers/subsystems/xenoarch.dm @@ -30,7 +30,7 @@ SUBSYSTEM_DEF(xenoarch) digsite_spawning_turfs = SSxenoarch.digsite_spawning_turfs /datum/controller/subsystem/xenoarch/stat_entry(msg) - if (!Debug2) + if (!GLOB.Debug2) return // Only show up in stat panel if debugging is enabled. return ..() diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index 755888cec1..b0e464482f 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -440,7 +440,7 @@ /datum/component/overlay_lighting/proc/cast_directional_light() var/final_distance = cast_range - //Lower the distance by 1 if we're not looking at a cardinal direction, and we're not a short cast + //Lower the distance by 1 if we're not looking at a GLOB.cardinal direction, and we're not a short cast if(final_distance > SHORT_CAST && !(ALL_CARDINALS & current_direction)) final_distance -= 1 var/turf/scanning = get_turf(current_holder) @@ -448,7 +448,7 @@ . = 0 for(var/i in 1 to final_distance) var/turf/next_turf = get_step(scanning, current_direction) - if(isnull(next_turf) || IS_OPAQUE_TURF_DIR(next_turf, reverse_dir[current_direction])) + if(isnull(next_turf) || IS_OPAQUE_TURF_DIR(next_turf, GLOB.reverse_dir[current_direction])) break scanning = next_turf .++ @@ -460,7 +460,7 @@ /datum/component/overlay_lighting/proc/place_directional_light(turf/target) var/final_distance = round(cast_range*2) - //Lower the distance by 1 if we're not looking at a cardinal direction, and we're not a short cast + //Lower the distance by 1 if we're not looking at a GLOB.cardinal direction, and we're not a short cast if(final_distance > SHORT_CAST && !(ALL_CARDINALS & get_dir(GET_PARENT, target))) final_distance -= 1 var/turf/scanning = get_turf(GET_PARENT) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 27117a5b3f..d39004284a 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -1,6 +1,6 @@ /hook/startup/proc/createDatacore() - data_core = new /datum/datacore() + GLOB.data_core = new /datum/datacore() return 1 /datum/datacore @@ -44,7 +44,7 @@ "} var/even = 0 // sort mobs - for(var/datum/data/record/t in data_core.general) + for(var/datum/data/record/t in GLOB.data_core.general) var/name = t.fields["name"] var/rank = t.fields["rank"] var/real_rank = make_list_rank(t.fields["real_rank"]) @@ -206,7 +206,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) var/list/civ = list() var/list/bot = list() var/list/misc = list() - for(var/datum/data/record/t in data_core.general) + for(var/datum/data/record/t in GLOB.data_core.general) var/name = sanitize(t.fields["name"]) var/rank = sanitize(t.fields["rank"]) var/real_rank = make_list_rank(t.fields["real_rank"]) @@ -306,7 +306,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) var/datum/data/record/foundrecord var/real_title = assignment - for(var/datum/data/record/t in data_core.general) + for(var/datum/data/record/t in GLOB.data_core.general) if (t) if(t.fields["name"] == name) foundrecord = t @@ -538,13 +538,13 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) GLOB.PDA_Manifest.Cut() /proc/find_general_record(field, value) - return find_record(field, value, data_core.general) + return find_record(field, value, GLOB.data_core.general) /proc/find_medical_record(field, value) - return find_record(field, value, data_core.medical) + return find_record(field, value, GLOB.data_core.medical) /proc/find_security_record(field, value) - return find_record(field, value, data_core.security) + return find_record(field, value, GLOB.data_core.security) /proc/find_record(field, value, list/L) for(var/datum/data/record/R in L) diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 4827f2a5be..e40326a870 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -39,7 +39,7 @@ DD.start_cure_timer() viruses += DD DD.affected_mob = src - active_diseases += DD + GLOB.active_diseases += DD var/list/skipped = list("affected_mob", "holder", "carrier", "stage", "type", "parent_type", "vars", "transformed") if(respect_carrier) diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 8e99e5c21d..43993056b5 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -46,7 +46,7 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease)) /datum/disease/Destroy() affected_mob = null - active_diseases.Remove(src) + GLOB.active_diseases.Remove(src) if(processing) End() return ..() diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index de54d6fcdb..56c2135a6e 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -376,7 +376,7 @@ GLOBAL_LIST_INIT(advance_cures, list( D.AssignName(new_name) D.Refresh() - for(var/datum/disease/advance/AD in active_diseases) + for(var/datum/disease/advance/AD in GLOB.active_diseases) AD.Refresh() H = tgui_input_list(usr, "Choose infectee", "Infectees", human_mob_list) diff --git a/code/datums/game_masters/default.dm b/code/datums/game_masters/default.dm index 46d39ab44e..d33c40f204 100644 --- a/code/datums/game_masters/default.dm +++ b/code/datums/game_masters/default.dm @@ -10,7 +10,7 @@ /datum/game_master/default/choose_event() log_game_master("Now starting event decision.") - var/list/most_active_departments = metric.assess_all_departments(3, list(last_department_used)) + var/list/most_active_departments = GLOB.metric.assess_all_departments(3, list(last_department_used)) var/list/best_events = decide_best_events(most_active_departments) if(LAZYLEN(best_events)) diff --git a/code/datums/mixed.dm b/code/datums/mixed.dm index 0b429156da..f6ca9aa671 100644 --- a/code/datums/mixed.dm +++ b/code/datums/mixed.dm @@ -26,21 +26,16 @@ // Mostly used for data_core records, but unfortuantely used some other places too. But mostly here, so lets make a good effort. // TODO - Some machines/computers might be holding references to us. Lets look into that, but at least for now lets make sure that the manifest is cleaned up. /datum/data/record/Destroy(var/force) - if(data_core.locked.Find(src)) + if(GLOB.data_core.locked.Find(src)) if(!force) - stack_trace("Someone tried to qdel a record that was in data_core.locked [log_info_line(src)]") + stack_trace("Someone tried to qdel a record that was in GLOB.data_core.locked [log_info_line(src)]") return QDEL_HINT_LETMELIVE - data_core.locked -= src - data_core.medical -= src - data_core.general -= src - data_core.security -= src + GLOB.data_core.locked -= src + GLOB.data_core.medical -= src + GLOB.data_core.general -= src + GLOB.data_core.security -= src . = ..() /datum/data/text name = "text" var/data = null - - - -/datum/debug - var/list/debuglist diff --git a/code/datums/modules.dm b/code/datums/modules.dm index 3397e416ae..a8458c5c5a 100644 --- a/code/datums/modules.dm +++ b/code/datums/modules.dm @@ -21,13 +21,13 @@ var/list/modules = list( // global associative list var/type = O.type // the type of the creating object - var/mneed = mods.inmodlist(type) // find if this type has modules defined + var/mneed = GLOB.mods.inmodlist(type) // find if this type has modules defined if(!mneed) // not found in module list? qdel(src) return - var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object + var/needed = GLOB.mods.getbitmask(type) // get a bitmask for the number of modules in this object status = needed installed = needed diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm index e225247862..c17fb99ab2 100644 --- a/code/datums/uplink/announcements.dm +++ b/code/datums/uplink/announcements.dm @@ -41,11 +41,11 @@ var/obj/item/card/id/I = user.GetIdCard() var/datum/data/record/random_general_record var/datum/data/record/random_medical_record - if(data_core.general.len) - random_general_record = pick(data_core.general) + if(GLOB.data_core.general.len) + random_general_record = pick(GLOB.data_core.general) random_medical_record = find_medical_record("id", random_general_record.fields["id"]) - var/datum/data/record/general = data_core.CreateGeneralRecord(user) + var/datum/data/record/general = GLOB.data_core.CreateGeneralRecord(user) if(I) general.fields["age"] = I.age general.fields["rank"] = I.assignment @@ -66,8 +66,8 @@ general.fields["sex"] = capitalize(user.gender) general.fields["species"] = user.get_species() - var/datum/data/record/medical = data_core.CreateMedicalRecord(general.fields["name"], general.fields["id"]) - data_core.CreateSecurityRecord(general.fields["name"], general.fields["id"]) + var/datum/data/record/medical = GLOB.data_core.CreateMedicalRecord(general.fields["name"], general.fields["id"]) + GLOB.data_core.CreateSecurityRecord(general.fields["name"], general.fields["id"]) if(!random_general_record) general.fields["citizenship"] = random_general_record.fields["citizenship"] diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 360ea5c751..c753eed0e4 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -10,7 +10,7 @@ /obj/structure/signpost/attack_hand(mob/user as mob) if(tgui_alert(user, "Travel back to ss13?","Return?",list("Yes","No")) == "Yes") if(user.z != src.z) return - user.forceMove(get_turf(pick(latejoin))) + user.forceMove(get_turf(pick(GLOB.latejoin))) /obj/structure/signpost_fake icon = 'icons/obj/stationobjs.dmi' diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 72d79a0662..7e781e749d 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -86,13 +86,13 @@ to_chat(M, command) /datum/announcement/priority/Message(var/message as text, var/message_title as text, var/list/zlevels) - global_announcer.autosay(span_alert("[message_title]:") + " [message]", announcer ? announcer : ANNOUNCER_NAME, channel = "Common", zlevels = zlevels) + GLOB.global_announcer.autosay(span_alert("[message_title]:") + " [message]", announcer ? announcer : ANNOUNCER_NAME, channel = "Common", zlevels = zlevels) /datum/announcement/priority/command/Message(var/message as text, var/message_title as text, var/list/zlevels) - global_announcer.autosay(span_alert("[command_name()] - [message_title]:") + " [message]", ANNOUNCER_NAME, channel = "Common", zlevels = zlevels) + GLOB.global_announcer.autosay(span_alert("[command_name()] - [message_title]:") + " [message]", ANNOUNCER_NAME, channel = "Common", zlevels = zlevels) /datum/announcement/priority/security/Message(var/message as text, var/message_title as text, var/list/zlevels) - global_announcer.autosay(span_alert("[message_title]:") + " [message]", ANNOUNCER_NAME, channel = "Common", zlevels = zlevels) + GLOB.global_announcer.autosay(span_alert("[message_title]:") + " [message]", ANNOUNCER_NAME, channel = "Common", zlevels = zlevels) /datum/announcement/proc/NewsCast(var/message as text, var/message_title as text) if(!newscast) @@ -149,4 +149,4 @@ AnnounceArrivalSimple(character.real_name, rank, join_message, channel, zlevels) /proc/AnnounceArrivalSimple(var/name, var/rank = "visitor", var/join_message = "will arrive at the station shortly", var/channel = "Common", var/list/zlevels) - global_announcer.autosay("[name], [rank], [join_message].", "Arrivals Announcement Computer", channel, zlevels) + GLOB.global_announcer.autosay("[name], [rank], [join_message].", "Arrivals Announcement Computer", channel, zlevels) diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index 159ee014de..cb689847e6 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -67,7 +67,7 @@ var/datum/antagonist/borer/borers /datum/antagonist/borer/proc/get_vents() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels)) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/game/antagonist/alien/xenomorph.dm b/code/game/antagonist/alien/xenomorph.dm index cac15e03c5..c0ea499aad 100644 --- a/code/game/antagonist/alien/xenomorph.dm +++ b/code/game/antagonist/alien/xenomorph.dm @@ -31,7 +31,7 @@ var/datum/antagonist/xenos/xenomorphs /datum/antagonist/xenos/proc/get_vents() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels)) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm index 38ea7f9629..febff8fce8 100644 --- a/code/game/antagonist/antagonist.dm +++ b/code/game/antagonist/antagonist.dm @@ -94,10 +94,10 @@ if(CONFIG_GET(flag/protect_roles_from_antagonist)) restricted_jobs |= protected_jobs if(antaghud_indicator) - if(!hud_icon_reference) - hud_icon_reference = list() - if(role_text) hud_icon_reference[role_text] = antaghud_indicator - if(faction_role_text) hud_icon_reference[faction_role_text] = antaghud_indicator + if(!GLOB.hud_icon_reference) + GLOB.hud_icon_reference = list() + if(role_text) GLOB.hud_icon_reference[role_text] = antaghud_indicator + if(faction_role_text) GLOB.hud_icon_reference[faction_role_text] = antaghud_indicator /datum/antagonist/proc/tick() return 1 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 702004d2ba..a270488016 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -508,12 +508,12 @@ R.reagents.splash(src, 1) /atom/proc/get_global_map_pos() - if(!islist(global_map) || isemptylist(global_map)) return + if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map)) return var/cur_x = null var/cur_y = null var/list/y_arr = null - for(cur_x=1,cur_x<=global_map.len,cur_x++) - y_arr = global_map[cur_x] + for(cur_x = 1, cur_x <= GLOB.global_map.len, cur_x++) + y_arr = GLOB.global_map[cur_x] cur_y = y_arr.Find(src.z) if(cur_y) break diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index abe7fd0ef5..2f9946c9e7 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -107,7 +107,7 @@ if(loc != newloc) if(!direct) direct = get_dir(oldloc, newloc) - if (IS_CARDINAL(direct)) //Cardinal move + if (IS_CARDINAL(direct)) //GLOB.cardinal move // Track our failure if any in this value . = TRUE @@ -167,7 +167,7 @@ else if(. && newloc) . = doMove(newloc) - //Diagonal move, split it into cardinal moves + //Diagonal move, split it into GLOB.cardinal moves else moving_diagonally = FIRST_DIAG_STEP var/first_step_dir diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 90f3e590ba..edb1785fdb 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -521,7 +521,6 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) ResetSE() unique_enzymes = md5(character.real_name) - reg_dna[unique_enzymes] = character.real_name #undef DNA_OFF_LOWERBOUND #undef DNA_OFF_UPPERBOUND diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 6b16c06f7f..ae42ab6e4f 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -227,7 +227,7 @@ WC.forceMove(get_turf(src)) occupant = null // Disconnect from our terminal - for(var/dirfind in cardinal) + for(var/dirfind in GLOB.cardinal) var/obj/machinery/computer/scan_consolenew/console = locate(/obj/machinery/computer/scan_consolenew, get_step(src, dirfind)) if(console && console.connected == src) console.connected = null @@ -368,7 +368,7 @@ R.mydna.dna.ResetSE() buffers[i+1]=R // Traitgenes don't alter direction of computer as this scans for neighbour - for(var/dirfind in cardinal) + for(var/dirfind in GLOB.cardinal) connected = locate(/obj/machinery/dna_scannernew, get_step(src, dirfind)) if(connected) break diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 26d95a341e..edc1de4149 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -34,7 +34,7 @@ to_chat(user, span_critical("The blade hisses, forcing itself from your manipulators. \The [src] will only allow mortals to wield it against foes, not kin.")) user.drop_from_inventory(src, src.loc) - throw_at(get_edge_target_turf(src, pick(alldirs)), rand(1,3), throw_speed) + throw_at(get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1,3), throw_speed) var/spooky = pick('sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg', 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/wail.ogg') playsound(src, spooky, 50, 1) diff --git a/code/game/gamemodes/cult/hell_universe.dm b/code/game/gamemodes/cult/hell_universe.dm index 36f9c2f4bb..d8b2f4ce7a 100644 --- a/code/game/gamemodes/cult/hell_universe.dm +++ b/code/game/gamemodes/cult/hell_universe.dm @@ -73,7 +73,7 @@ In short: if(!T.holy && prob(1)) new /obj/effect/gateway/active/cult(T) - for (var/obj/machinery/firealarm/alm in machines) + for (var/obj/machinery/firealarm/alm in GLOB.machines) if (!(alm.stat & BROKEN)) alm.ex_act(2) diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index 1ac049d0d2..335705560d 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -101,7 +101,7 @@ var/global/list/narsie_list = list() if(!move_self) return 0 - var/movement_dir = pick(alldirs - last_failed_movement) + var/movement_dir = pick(GLOB.alldirs - last_failed_movement) if(force_move) movement_dir = force_move @@ -119,7 +119,7 @@ var/global/list/narsie_list = list() if(!move_self) return 0 - var/movement_dir = pick(alldirs - last_failed_movement) + var/movement_dir = pick(GLOB.alldirs - last_failed_movement) if(force_move) movement_dir = force_move diff --git a/code/game/gamemodes/endgame/endgame.dm b/code/game/gamemodes/endgame/endgame.dm index 59ea24ad93..bc7e61d5c3 100644 --- a/code/game/gamemodes/endgame/endgame.dm +++ b/code/game/gamemodes/endgame/endgame.dm @@ -65,7 +65,7 @@ /proc/SetUniversalState(var/newstate,var/on_exit=1, var/on_enter=1) if(on_exit) - universe.OnExit() - universe = new newstate + GLOB.universe.OnExit() + GLOB.universe = new newstate if(on_enter) - universe.OnEnter() + GLOB.universe.OnEnter() diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 0fa5600776..ea2def67f1 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) "} priority_announcement.Announce(txt,"SUPERMATTER CASCADE DETECTED") - for(var/obj/machinery/computer/shuttle_control/C in machines) + 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)) C.req_access = list() C.req_one_access = list() @@ -103,7 +103,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) OnTurfChange(T) */ /datum/universal_state/supermatter_cascade/proc/MiscSet() - for (var/obj/machinery/firealarm/alm in machines) + for (var/obj/machinery/firealarm/alm in GLOB.machines) if (!(alm.stat & BROKEN)) alm.ex_act(2) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 3dacb20b6a..094edcf914 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -110,7 +110,7 @@ GLOBAL_VAR_INIT(hadevent, 0) //command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") //world << sound('sound/AI/aliens.ogg') var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels)) if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent @@ -136,7 +136,7 @@ GLOBAL_VAR_INIT(hadevent, 0) /proc/high_radiation_event() /* // Haha, this is way too laggy. I'll keep the prison break though. - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(isNotStationLevel(L.z)) continue L.flicker(50) @@ -348,7 +348,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is M.add_ion_law("THE STATION IS [who2pref] [who2]") /* //VOREStation Edit if(botEmagChance) - for(var/mob/living/bot/bot in machines) + for(var/mob/living/bot/bot in GLOB.machines) if(prob(botEmagChance)) bot.emag_act(1) */ //VOREStation Edit @@ -377,7 +377,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is to_world("Finished processing SMES. Processed: [smesnum]") spawn(0) to_world("Started processing AIRLOCKS") - for (var/obj/machinery/door/airlock/D in machines) + for (var/obj/machinery/door/airlock/D in GLOB.machines) if(D.z in station_levels) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ @@ -386,7 +386,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is to_world("Finished processing AIRLOCKS. Processed: [airlocknum]") spawn(0) to_world("Started processing FIREDOORS") - for (var/obj/machinery/door/firedoor/D in machines) + for (var/obj/machinery/door/firedoor/D in GLOB.machines) if(D.z in station_levels) firedoornum++; spawn(0) diff --git a/code/game/gamemodes/events/black_hole.dm b/code/game/gamemodes/events/black_hole.dm index 3d1d077651..2ec56169aa 100644 --- a/code/game/gamemodes/events/black_hole.dm +++ b/code/game/gamemodes/events/black_hole.dm @@ -74,7 +74,7 @@ //MOVEMENT if(prob(50)) anchored = FALSE - step(src, pick(alldirs)) + step(src, pick(GLOB.alldirs)) anchored = TRUE controller() diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index 5aa3372e32..b55250f523 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -50,7 +50,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 var/starty = 0 var/endy = 0 var/endx = 0 - var/startside = pick(cardinal) + var/startside = pick(GLOB.cardinal) switch(startside) if(NORTH) diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm index 22a7043e18..11613c33f7 100644 --- a/code/game/gamemodes/events/dust.dm +++ b/code/game/gamemodes/events/dust.dm @@ -24,7 +24,7 @@ The "dust" will damage the hull of the station causin minor hull breaches. numbers = rand(15,25) dust_type = /obj/effect/space_dust/super - var/startside = pick(cardinal) + var/startside = pick(GLOB.cardinal) for(var/i = 0 to numbers) var/startx = 0 var/starty = 0 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 94b4c7945c..3b1e34ed99 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -134,7 +134,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) antag_summary += "[antag.role_text_plural]" i++ antag_summary += "." - if(antag_templates.len > 1 && master_mode != "secret") + if(antag_templates.len > 1 && GLOB.master_mode != "secret") to_world(span_filter_system("[antag_summary]")) else message_admins("[antag_summary]") @@ -147,7 +147,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) if((player.client)&&(player.ready)) playerC++ - if(master_mode=="secret") + if(GLOB.master_mode=="secret") if(playerC < CONFIG_GET(keyed_list/player_requirements_secret)[config_tag]) return 0 else @@ -553,7 +553,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) to_chat(usr, span_warning("Something is terribly wrong; there is no gametype.")) return - if(master_mode != "secret") + if(GLOB.master_mode != "secret") to_chat(usr, span_boldnotice("The roundtype is [capitalize(ticker.mode.name)]")) if(ticker.mode.round_description) to_chat(usr, span_notice(span_italics("[ticker.mode.round_description]"))) diff --git a/code/game/gamemodes/malfunction/malf_hardware.dm b/code/game/gamemodes/malfunction/malf_hardware.dm index a0aa1ec7b6..d9a659d96b 100644 --- a/code/game/gamemodes/malfunction/malf_hardware.dm +++ b/code/game/gamemodes/malfunction/malf_hardware.dm @@ -60,7 +60,7 @@ /datum/malf_hardware/strong_turrets/install() ..() - for(var/obj/machinery/porta_turret/T in machines) + for(var/obj/machinery/porta_turret/T in GLOB.machines) T.maxhealth = round(initial(T.maxhealth) * 1.4) T.shot_delay = round(initial(T.shot_delay) / 2) T.auto_repair = 1 diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index fcf0716078..dacc74b08e 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -129,7 +129,7 @@ user.hacking = 0 -/datum/game_mode/malfunction/verb/machine_overload(obj/machinery/M in machines) +/datum/game_mode/malfunction/verb/machine_overload(obj/machinery/M in GLOB.machines) set name = "Machine Overload" set desc = "400 CPU - Causes cyclic short-circuit in machine, resulting in weak explosion after some time." set category = "Software" diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 99df9683a4..ee8c07ef9e 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -44,7 +44,7 @@ GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths o /proc/spawn_meteor(var/list/meteortypes, var/startSide, var/startLevel) if(isnull(startSide)) - startSide = pick(cardinal) + startSide = pick(GLOB.cardinal) if(isnull(startLevel)) startLevel = pick(using_map.station_levels - using_map.sealed_levels) diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 47324dbaa8..23e5534124 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -55,7 +55,7 @@ /obj/item/pinpointer/examine(mob/user) . = ..() - for(var/obj/machinery/nuclearbomb/bomb in machines) + for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) if(bomb.timing) . += "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]" @@ -287,7 +287,7 @@ return PROCESS_KILL if(!our_shuttle) - for(var/obj/machinery/computer/shuttle_control/S in machines) + for(var/obj/machinery/computer/shuttle_control/S in GLOB.machines) if(S.shuttle_tag == shuttle_comp_id) // Shuttle tags are used so that it will work if the computer path changes, as it does on the southern cross map. our_shuttle = S break diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 5434bf6c4e..29e3518a42 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -852,7 +852,7 @@ GLOBAL_LIST_EMPTY(all_objectives) explanation_text = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it. The convert rune is join blood self." /datum/objective/cult/eldergod/check_completion() - return (locate(/obj/singularity/narsie/large) in machines) + return (locate(/obj/singularity/narsie/large) in GLOB.machines) /datum/objective/cult/sacrifice explanation_text = "Conduct a ritual sacrifice for the glory of Nar-Sie." diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 50b0e887f9..3093bf621f 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -19,7 +19,7 @@ mob var/datum/hSB/sandbox = null proc CanBuild() - if(master_mode == "sandbox") + if(GLOB.master_mode == "sandbox") sandbox = new/datum/hSB sandbox.owner = src.ckey if(src.client.holder) diff --git a/code/game/gamemodes/technomancer/spells/condensation.dm b/code/game/gamemodes/technomancer/spells/condensation.dm index 39b52923ec..bf4ea54da9 100644 --- a/code/game/gamemodes/technomancer/spells/condensation.dm +++ b/code/game/gamemodes/technomancer/spells/condensation.dm @@ -21,7 +21,7 @@ if(istype(hit_atom, /turf/simulated) && within_range(hit_atom)) var/turf/simulated/T = hit_atom - for(var/direction in alldirs + null) // null is for the center tile. + for(var/direction in GLOB.alldirs + null) // null is for the center tile. spawn(1) var/turf/desired_turf = get_step(T,direction) if(desired_turf) // This shouldn't fail but... diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index d3d0112474..3a186b666b 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -125,7 +125,7 @@ B.deity_name = H.mind.my_religion.deity I.assignment = H.mind.my_religion.title I.name = text("[I.registered_name]'s ID Card ([I.assignment])") - data_core.manifest_modify(I.registered_name, I.assignment, I.rank) + GLOB.data_core.manifest_modify(I.registered_name, I.assignment, I.rank) /datum/religion var/religion = "Unitarianism" diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 185c644dfd..1b3fecf79b 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -29,7 +29,7 @@ var/global/datum/controller/occupations/job_master /datum/controller/occupations/proc/Debug(var/text) - if(!Debug2) return 0 + if(!GLOB.Debug2) return 0 job_debug.Add(text) return 1 @@ -968,11 +968,11 @@ var/global/datum/controller/occupations/job_master to_chat(C, span_warning("Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Please correct your spawn point choice.")) return to_chat(C, span_filter_warning("Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead.")) - var/spawning = pick(latejoin) + var/spawning = pick(GLOB.latejoin) .["turf"] = get_turf(spawning) .["msg"] = "will arrive at the station shortly" else if(!fail_deadly) - var/spawning = pick(latejoin) + var/spawning = pick(GLOB.latejoin) .["turf"] = get_turf(spawning) .["msg"] = "has arrived on the station" diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index a2b2e61e75..c275ee7b18 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -99,7 +99,7 @@ GLOBAL_LIST_EMPTY(alien_whitelist) return 0 //Module is not even whitelisted - if(!(module in whitelisted_module_types)) + if(!(module in GLOB.whitelisted_module_types)) return 1 //If we have a loaded file, search it diff --git a/code/game/json.dm b/code/game/json.dm index 1510a00cd5..6c57e8dd5d 100644 --- a/code/game/json.dm +++ b/code/game/json.dm @@ -24,7 +24,7 @@ var/makejson = 1 //temp else if(ticker.hide_mode) mode = "SECRET" else - mode = master_mode + mode = GLOB.master_mode var/playerscount = 0 var/players = "" var/admins = "no" diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 83fabeed51..425a94528d 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -75,7 +75,7 @@ if(O.anchored) return 0 //mob is anchored??? if(get_dist(user, src) > 1 || get_dist(user, O) > 1) - return 0 //doesn't use adjacent() to allow for non-cardinal (fuck my life) + return 0 //doesn't use adjacent() to allow for non-GLOB.cardinal (fuck my life) if(!ishuman(user) && !isrobot(user)) return 0 //not a borg or human if(panel_open) diff --git a/code/game/machinery/atm_ret_field.dm b/code/game/machinery/atm_ret_field.dm index 08c0deca62..59eab0278e 100644 --- a/code/game/machinery/atm_ret_field.dm +++ b/code/game/machinery/atm_ret_field.dm @@ -173,7 +173,7 @@ LAZYADD(A.all_arfgs, src) areas_added = list(A) - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) A = get_area(get_step(src,direction)) if(istype(A) && !(A in areas_added)) LAZYADD(A.all_arfgs, src) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 0bb006e23e..dd126c96b1 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -87,8 +87,8 @@ /obj/machinery/computer/card/tgui_static_data(mob/user) var/list/data = ..() - if(data_core) - data_core.get_manifest_list() + if(GLOB.data_core) + GLOB.data_core.get_manifest_list() data["manifest"] = GLOB.PDA_Manifest return data @@ -156,7 +156,7 @@ switch(action) if("modify") if(modify) - data_core.manifest_modify(modify.registered_name, modify.assignment, modify.rank) + GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment, modify.rank) modify.name = "[modify.registered_name]'s ID Card ([modify.assignment])" if(ishuman(ui.user)) modify.forceMove(get_turf(src)) @@ -258,7 +258,7 @@ P.name = text("crew manifest ([])", stationtime2text()) P.info = {"

Crew Manifest


- [data_core ? data_core.get_manifest(0) : ""] + [GLOB.data_core ? GLOB.data_core.get_manifest(0) : ""] "} else if(modify) P.name = "access report" diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 1302289566..0b24e9276e 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -125,15 +125,15 @@ if(authenticated) switch(screen) if(MED_DATA_R_LIST) - if(!isnull(data_core.general)) + if(!isnull(GLOB.data_core.general)) var/list/records = list() data["records"] = records - for(var/datum/data/record/R in sortRecord(data_core.general)) + for(var/datum/data/record/R in sortRecord(GLOB.data_core.general)) records[++records.len] = list("ref" = "\ref[R]", "id" = R.fields["id"], "name" = R.fields["name"]) if(MED_DATA_RECORD) var/list/general = list() data["general"] = general - if(istype(active1, /datum/data/record) && data_core.general.Find(active1)) + if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) var/list/fields = list() general["fields"] = fields fields[++fields.len] = FIELD("Name", active1.fields["name"], null) @@ -155,7 +155,7 @@ var/list/medical = list() data["medical"] = medical - if(istype(active2, /datum/data/record) && data_core.medical.Find(active2)) + if(istype(active2, /datum/data/record) && GLOB.data_core.medical.Find(active2)) var/list/fields = list() medical["fields"] = fields fields[++fields.len] = MED_FIELD("Gender identity", active2.fields["id_gender"], "id_gender", TRUE) @@ -172,10 +172,10 @@ medical["empty"] = 1 if(MED_DATA_V_DATA) data["virus"] = list() - for(var/datum/disease/D in active_diseases) + for(var/datum/disease/D in GLOB.active_diseases) if(!D.discovered) continue - var/datum/data/record/v = active_diseases[D] + var/datum/data/record/v = GLOB.active_diseases[D] data["virus"] += list(list("name" = v.fields["name"], "D" = "\ref[v]")) if(MED_DATA_MEDBOT) data["medbots"] = list() @@ -206,9 +206,9 @@ if(..()) return TRUE - if(!data_core.general.Find(active1)) + if(!GLOB.data_core.general.Find(active1)) active1 = null - if(!data_core.medical.Find(active2)) + if(!GLOB.data_core.medical.Find(active2)) active2 = null . = TRUE @@ -276,7 +276,7 @@ return FALSE tgui_modal_message(src, "virus", "", null, v.fields["tgui_description"]) if("del_all") - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) qdel(R) set_temp("All medical records deleted.") if("del_r") @@ -285,12 +285,12 @@ qdel(active2) if("d_rec") var/datum/data/record/general_record = locate(params["d_rec"] || "") - if(!data_core.general.Find(general_record)) + if(!GLOB.data_core.general.Find(general_record)) set_temp("Record not found.", "danger") return var/datum/data/record/medical_record - for(var/datum/data/record/M in data_core.medical) + for(var/datum/data/record/M in GLOB.data_core.medical) if(M.fields["name"] == general_record.fields["name"] && M.fields["id"] == general_record.fields["id"]) medical_record = M break @@ -326,7 +326,7 @@ R.fields["cdi"] = "None" R.fields["cdi_d"] = "No diseases have been diagnosed at the moment." R.fields["notes"] = "No notes." - data_core.medical += R + GLOB.data_core.medical += R active2 = R screen = MED_DATA_RECORD set_temp("Medical record created.", "success") @@ -346,14 +346,14 @@ if(!length(t1)) return - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if(t1 == lowertext(R.fields["name"]) || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])) active2 = R break if(!active2) set_temp("Medical record not found. You must enter the person's exact name, ID or DNA.", "danger") return - for(var/datum/data/record/E in data_core.general) + for(var/datum/data/record/E in GLOB.data_core.general) if(E.fields["name"] == active2.fields["name"] && E.fields["id"] == active2.fields["id"]) active1 = E break @@ -432,7 +432,7 @@ /obj/machinery/computer/med_data/proc/print_finish() var/obj/item/paper/P = new(loc) P.info = "
" + span_bold("Medical Record") + "

" - if(istype(active1, /datum/data/record) && data_core.general.Find(active1)) + if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) P.info += {"Name: [active1.fields["name"]] ID: [active1.fields["id"]]
\nSex: [active1.fields["sex"]]
\nSpecies: [active1.fields["species"]] @@ -442,7 +442,7 @@
\nMental Status: [active1.fields["m_stat"]]
"} else P.info += span_bold("General Record Lost!") + "
" - if(istype(active2, /datum/data/record) && data_core.medical.Find(active2)) + if(istype(active2, /datum/data/record) && GLOB.data_core.medical.Find(active2)) P.info += {"
\n
Medical Data

\nGender Identity: [active2.fields["id_gender"]]
\nBlood Type: [active2.fields["b_type"]] @@ -486,7 +486,7 @@ ..(severity) return - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if(prob(10/severity)) switch(rand(1,6)) if(1) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 06a82d6cc7..994c6bd0ea 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -17,7 +17,7 @@ return INITIALIZE_HINT_LATELOAD /obj/machinery/computer/pod/LateInitialize() - for(var/obj/machinery/mass_driver/M in machines) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.id == id) connected = M break @@ -30,19 +30,19 @@ to_chat(viewers(null, null),"Cannot locate mass driver connector. Cancelling firing sequence!") return - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) M.open() sleep(20) - for(var/obj/machinery/mass_driver/M in machines) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.id == id) M.power = connected.power M.drive() sleep(50) - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) M.close() return @@ -168,7 +168,7 @@ if(href_list["alarm"]) alarm() if(href_list["drive"]) - for(var/obj/machinery/mass_driver/M in machines) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.id == id) M.power = connected.power M.drive() @@ -180,7 +180,7 @@ time += tp time = min(max(round(time), 0), 120) if(href_list["door"]) - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) if(M.density) M.open() diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 4399559d74..3331820076 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -113,13 +113,13 @@ if(authenticated) switch(screen) if(SEC_DATA_R_LIST) - if(!isnull(data_core.general)) + if(!isnull(GLOB.data_core.general)) var/list/records = list() data["records"] = records - for(var/datum/data/record/R in sortRecord(data_core.general)) + for(var/datum/data/record/R in sortRecord(GLOB.data_core.general)) var/color = null var/criminal = "None" - for(var/datum/data/record/M in data_core.security) + for(var/datum/data/record/M in GLOB.data_core.security) if(M.fields["name"] == R.fields["name"] && M.fields["id"] == R.fields["id"]) switch(M.fields["criminal"]) if("*Arrest*") @@ -142,7 +142,7 @@ if(SEC_DATA_RECORD) var/list/general = list() data["general"] = general - if(istype(active1, /datum/data/record) && data_core.general.Find(active1)) + if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) var/list/fields = list() general["fields"] = fields fields[++fields.len] = FIELD("Name", active1.fields["name"], "name") @@ -166,7 +166,7 @@ var/list/security = list() data["security"] = security - if(istype(active2, /datum/data/record) && data_core.security.Find(active2)) + if(istype(active2, /datum/data/record) && GLOB.data_core.security.Find(active2)) var/list/fields = list() security["fields"] = fields fields[++fields.len] = FIELD("Criminal Status", active2.fields["criminal"], "criminal") @@ -189,9 +189,9 @@ if(..()) return TRUE - if(!data_core.general.Find(active1)) + if(!GLOB.data_core.general.Find(active1)) active1 = null - if(!data_core.security.Find(active2)) + if(!GLOB.data_core.security.Find(active2)) active2 = null . = TRUE @@ -254,7 +254,7 @@ active1 = null active2 = null if("del_all") - for(var/datum/data/record/R in data_core.security) + for(var/datum/data/record/R in GLOB.data_core.security) qdel(R) set_temp("All security records deleted.") if("del_r") @@ -264,7 +264,7 @@ if("del_r_2") set_temp("All records for [active1.fields["name"]] deleted.") if(active1) - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) qdel(R) qdel(active1) @@ -282,12 +282,12 @@ active2.fields["notes"] = new_notes if("d_rec") var/datum/data/record/general_record = locate(params["d_rec"] || "") - if(!data_core.general.Find(general_record)) + if(!GLOB.data_core.general.Find(general_record)) set_temp("Record not found.", "danger") return var/datum/data/record/security_record - for(var/datum/data/record/M in data_core.security) + for(var/datum/data/record/M in GLOB.data_core.security) if(M.fields["name"] == general_record.fields["name"] && M.fields["id"] == general_record.fields["id"]) security_record = M break @@ -309,7 +309,7 @@ R.fields["ma_crim_d"] = "No major crime convictions." R.fields["notes"] = "No notes." R.fields["notes"] = "No notes." - data_core.security += R + GLOB.data_core.security += R active2 = R screen = SEC_DATA_RECORD set_temp("Security record created.", "success") @@ -329,14 +329,14 @@ if(!length(t1)) return - for(var/datum/data/record/R in data_core.general) + for(var/datum/data/record/R in GLOB.data_core.general) if(t1 == lowertext(R.fields["name"]) || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["fingerprint"])) active1 = R break if(!active1) set_temp("Security record not found. You must enter the person's exact name, ID, or fingerprint.", "danger") return - for(var/datum/data/record/E in data_core.security) + for(var/datum/data/record/E in GLOB.data_core.security) if(E.fields["name"] == active1.fields["name"] && E.fields["id"] == active1.fields["id"]) active2 = E break @@ -433,7 +433,7 @@ /obj/machinery/computer/secure_data/proc/print_finish() var/obj/item/paper/P = new(loc) P.info = "
" + span_bold("Security Record") + "

" - if(istype(active1, /datum/data/record) && data_core.general.Find(active1)) + if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) P.info += {"Name: [active1.fields["name"]] ID: [active1.fields["id"]]
\nSex: [active1.fields["sex"]]
\nSpecies: [active1.fields["species"]] @@ -443,7 +443,7 @@
\nMental Status: [active1.fields["m_stat"]]
"} else P.info += span_bold("General Record Lost!") + "
" - if(istype(active2, /datum/data/record) && data_core.security.Find(active2)) + if(istype(active2, /datum/data/record) && GLOB.data_core.security.Find(active2)) P.info += {"
\n
Security Data

\nCriminal Status: [active2.fields["criminal"]]
\n
\nMinor Crimes: [active2.fields["mi_crim"]] @@ -494,7 +494,7 @@ ..(severity) return - for(var/datum/data/record/R in data_core.security) + for(var/datum/data/record/R in GLOB.data_core.security) if(prob(10/severity)) switch(rand(1,6)) if(1) diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index bfab1cb8b8..2cade92a9a 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -98,10 +98,10 @@ if(authenticated) switch(screen) if(GENERAL_RECORD_LIST) - if(!isnull(data_core.general)) + if(!isnull(GLOB.data_core.general)) var/list/records = list() data["records"] = records - for(var/datum/data/record/R in sortRecord(data_core.general)) + for(var/datum/data/record/R in sortRecord(GLOB.data_core.general)) records[++records.len] = list( "ref" = "\ref[R]", "id" = R.fields["id"], @@ -110,7 +110,7 @@ if(GENERAL_RECORD_DATA) var/list/general = list() data["general"] = general - if(istype(active1, /datum/data/record) && data_core.general.Find(active1)) + if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) var/list/fields = list() general["fields"] = fields fields[++fields.len] = FIELD("Name", active1.fields["name"], "name") @@ -149,7 +149,7 @@ add_fingerprint(ui.user) - if(!data_core.general.Find(active1)) + if(!GLOB.data_core.general.Find(active1)) active1 = null . = TRUE @@ -211,7 +211,7 @@ if("del_all") if(GLOB.PDA_Manifest) GLOB.PDA_Manifest.Cut() - for(var/datum/data/record/R in data_core.general) + for(var/datum/data/record/R in GLOB.data_core.general) qdel(R) set_temp("All employment records deleted.") if("sync_r") @@ -228,14 +228,14 @@ if(GLOB.PDA_Manifest) GLOB.PDA_Manifest.Cut() if(active1) - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) qdel(R) set_temp("Employment record deleted.") QDEL_NULL(active1) if("d_rec") var/datum/data/record/general_record = locate(params["d_rec"] || "") - if(!data_core.general.Find(general_record)) + if(!GLOB.data_core.general.Find(general_record)) set_temp("Record not found.", "danger") return @@ -244,7 +244,7 @@ if("new") if(GLOB.PDA_Manifest) GLOB.PDA_Manifest.Cut() - active1 = data_core.CreateGeneralRecord() + active1 = GLOB.data_core.CreateGeneralRecord() screen = GENERAL_RECORD_DATA set_temp("Employment record created.", "success") if("del_c") @@ -328,7 +328,7 @@ /obj/machinery/computer/skills/proc/print_finish() var/obj/item/paper/P = new(loc) P.info = "
" + span_bold("Medical Record") + "

" - if(istype(active1, /datum/data/record) && data_core.general.Find(active1)) + if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) P.info += {"Name: [active1.fields["name"]] ID: [active1.fields["id"]]
\nSex: [active1.fields["sex"]]
\nSpecies: [active1.fields["species"]] @@ -371,7 +371,7 @@ ..(severity) return - for(var/datum/data/record/R in data_core.security) + for(var/datum/data/record/R in GLOB.data_core.security) if(prob(10/severity)) switch(rand(1,6)) if(1) diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index a2132b7d9b..8840b5db1a 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -92,7 +92,7 @@ var/specops_shuttle_timeleft = 0 specops_shuttle_at_station = 0 - for(var/obj/machinery/computer/specops_shuttle/S in machines) + for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY qdel(announcer) @@ -233,7 +233,7 @@ var/specops_shuttle_timeleft = 0 var/mob/M = locate(/mob) in T to_chat(M, span_notice("You have arrived to [station_name()]. Commence operation!")) - for(var/obj/machinery/computer/specops_shuttle/S in machines) + for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY qdel(announcer) @@ -241,7 +241,7 @@ var/specops_shuttle_timeleft = 0 /proc/specops_can_move() if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0 - for(var/obj/machinery/computer/specops_shuttle/S in machines) + for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines) if(world.timeofday <= S.specops_shuttle_timereset) return 0 return 1 diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index d0cfb480eb..ca390d5bd3 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -157,14 +157,14 @@ /obj/machinery/computer/timeclock/proc/isOpenOnDutyJob(var/mob/user, var/department, var/datum/job/job) return job \ - && job.is_position_available() \ - && !job.whitelist_only \ - && !jobban_isbanned(user,job.title) \ - && job.player_old_enough(user.client) \ - && job.player_has_enough_playtime(user.client) \ - && job.pto_type == department \ - && !job.disallow_jobhop \ - && job.timeoff_factor > 0 + && job.is_position_available() \ + && !job.whitelist_only \ + && !jobban_isbanned(user,job.title) \ + && job.player_old_enough(user.client) \ + && job.player_has_enough_playtime(user.client) \ + && job.pto_type == department \ + && !job.disallow_jobhop \ + && job.timeoff_factor > 0 /obj/machinery/computer/timeclock/proc/makeOnDuty(var/newrank, var/newassignment, var/mob/user) var/datum/job/oldjob = job_master.GetJob(card.rank) @@ -178,7 +178,7 @@ card.rank = newjob.title card.assignment = newassignment card.name = text("[card.registered_name]'s ID Card ([card.assignment])") - data_core.manifest_modify(card.registered_name, card.assignment, card.rank) + GLOB.data_core.manifest_modify(card.registered_name, card.assignment, card.rank) card.last_job_switch = world.time callHook("reassign_employee", list(card)) newjob.current_positions++ @@ -204,7 +204,7 @@ card.rank = ptojob.title card.assignment = ptojob.title card.name = text("[card.registered_name]'s ID Card ([card.assignment])") - data_core.manifest_modify(card.registered_name, card.assignment, card.rank) + GLOB.data_core.manifest_modify(card.registered_name, card.assignment, card.rank) card.last_job_switch = world.time callHook("reassign_employee", list(card)) var/mob/living/carbon/human/H = user diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm index a3c6d9c827..37a8e637ce 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -180,7 +180,7 @@ // assume linked_db since called by interact() var/crew = "" var/list/L = list() - for (var/datum/data/record/t in data_core.general) + for (var/datum/data/record/t in GLOB.data_core.general) var/R = t.fields["name"] + " - " + t.fields["rank"] L += R for(var/R in sortList(L)) @@ -278,7 +278,7 @@ var/obj/item/paper/P = new /obj/item/paper( computer.loc ) P.info = span_bold("Crew Manifest:") + "
" var/list/L = list() - for (var/datum/data/record/t in data_core.general) + for (var/datum/data/record/t in GLOB.data_core.general) var/R = t.fields["name"] + " - " + t.fields["rank"] L += R for(var/R in sortList(L)) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 327d445439..5bd314c23b 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -441,7 +441,7 @@ preserve = 1 if(istype(W,/obj/item/implant/health)) - for(var/obj/machinery/computer/cloning/com in machines) + for(var/obj/machinery/computer/cloning/com in GLOB.machines) for(var/datum/dna2/record/R in com.records) if(locate(R.implant) == W) qdel(R) @@ -497,26 +497,26 @@ if(GLOB.PDA_Manifest.len) GLOB.PDA_Manifest.Cut() - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if((R.fields["name"] == to_despawn.real_name)) qdel(R) - for(var/datum/data/record/T in data_core.security) + for(var/datum/data/record/T in GLOB.data_core.security) if((T.fields["name"] == to_despawn.real_name)) qdel(T) - for(var/datum/data/record/G in data_core.general) + for(var/datum/data/record/G in GLOB.data_core.general) if((G.fields["name"] == to_despawn.real_name)) qdel(G) // Also check the hidden version of each datacore, if they're an offmap role. var/datum/job/J = SSjob.get_job(job) if(J?.offmap_spawn) - for(var/datum/data/record/R in data_core.hidden_general) + for(var/datum/data/record/R in GLOB.data_core.hidden_general) if((R.fields["name"] == to_despawn.real_name)) qdel(R) - for(var/datum/data/record/T in data_core.hidden_security) + for(var/datum/data/record/T in GLOB.data_core.hidden_security) if((T.fields["name"] == to_despawn.real_name)) qdel(T) - for(var/datum/data/record/G in data_core.hidden_medical) + for(var/datum/data/record/G in GLOB.data_core.hidden_medical) if((G.fields["name"] == to_despawn.real_name)) qdel(G) diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 0c29400e73..b3ec79582b 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -93,7 +93,7 @@ */ /obj/machinery/button/remote/airlock/trigger() - for(var/obj/machinery/door/airlock/D in machines) + for(var/obj/machinery/door/airlock/D in GLOB.machines) if(D.id_tag == id) if(specialfunctions & OPEN) if(D.density) @@ -138,7 +138,7 @@ desc = "It controls blast doors, remotely." /obj/machinery/button/remote/blast_door/trigger() - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) if(M.density) spawn(0) @@ -157,7 +157,7 @@ desc = "It controls emitters, remotely." /obj/machinery/button/remote/emitter/trigger(mob/user as mob) - for(var/obj/machinery/power/emitter/E in machines) + for(var/obj/machinery/power/emitter/E in GLOB.machines) if(E.id == id) spawn(0) E.activate(user) @@ -176,7 +176,7 @@ active = 1 update_icon() - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) spawn(0) M.open() @@ -184,13 +184,13 @@ sleep(20) - for(var/obj/machinery/mass_driver/M in machines) + for(var/obj/machinery/mass_driver/M in GLOB.machines) if(M.id == id) M.drive() sleep(50) - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) spawn(0) M.close() @@ -216,7 +216,7 @@ icon = 'icons/obj/stationobjs_vr.dmi' // VOREStation Edit /obj/machinery/button/remote/shields/trigger(var/mob/user) - for(var/obj/machinery/shield_gen/SG in machines) + for(var/obj/machinery/shield_gen/SG in GLOB.machines) if(SG.id == id) spawn(0) if(SG?.anchored) @@ -232,7 +232,7 @@ active_power_usage = 0 /obj/machinery/button/remote/airlock/release/trigger() - for(var/obj/machinery/door/airlock/D in machines) + for(var/obj/machinery/door/airlock/D in GLOB.machines) if(D.id_tag == id) if(D.locked) D.unlock(1) diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm index 25fdb71de4..95cd1c3a3f 100644 --- a/code/game/machinery/doorbell_vr.dm +++ b/code/game/machinery/doorbell_vr.dm @@ -120,7 +120,7 @@ use_power(5) flick("doorbell-active", src) - for(var/obj/machinery/doorbell_chime/M in machines) + for(var/obj/machinery/doorbell_chime/M in GLOB.machines) if(M.id_tag == id) M.chime() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index dcff34c462..d40fab23a8 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1552,7 +1552,7 @@ About the new airlock wires panel: . = ..() if(src.closeOtherId != null) - for (var/obj/machinery/door/airlock/A in machines) + for (var/obj/machinery/door/airlock/A in GLOB.machines) if(A.closeOtherId == src.closeOtherId && A != src) src.closeOther = A break diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 732bcf8749..f4e2d5fe22 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -43,11 +43,11 @@ /obj/machinery/door_timer/LateInitialize() . = ..() - for(var/obj/machinery/door/window/brigdoor/M in machines) + for(var/obj/machinery/door/window/brigdoor/M in GLOB.machines) if(M.id == id) LAZYADD(targets,M) - for(var/obj/machinery/flasher/F in machines) + for(var/obj/machinery/flasher/F in GLOB.machines) if(F.id == id) LAZYADD(targets,F) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 135ccde485..597e138491 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -421,7 +421,7 @@ /obj/machinery/door/proc/next_close_wait() var/lowest_temp = T20C var/highest_temp = T0C - for(var/D in cardinal) + for(var/D in GLOB.cardinal) var/turf/target = get_step(loc, D) if(!target.density) var/datum/gas_mixture/airmix = target.return_air() diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 4c9a3a6eb9..875f5269e5 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -63,7 +63,7 @@ LAZYADD(A.all_doors, src) areas_added = list(A) - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) A = get_area(get_step(src,direction)) if(istype(A) && !(A in areas_added)) LAZYADD(A.all_doors, src) @@ -464,7 +464,7 @@ add_overlay("palert") if(dir_alerts) for(var/d=1;d<=4;d++) - var/cdir = cardinal[d] + var/cdir = GLOB.cardinal[d] for(var/i=1;i<=ALERT_STATES.len;i++) if(dir_alerts[d] & (1<<(i-1))) add_overlay(new/icon(icon,"alert_[ALERT_STATES[i]]", dir=cdir)) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 139e8df842..c80addd1b5 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -85,7 +85,7 @@ /obj/machinery/door/window/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSGLASS)) return TRUE - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index ccd793cb38..c184db5dcb 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -166,7 +166,7 @@ // Parameters: None // Description: Helper proc to get a reference to an Exonet node. /proc/get_exonet_node() - for(var/obj/machinery/exonet_node/E in machines) + for(var/obj/machinery/exonet_node/E in GLOB.machines) if(E.on) return E diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 8e197f5a78..31a2c961f1 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -143,7 +143,7 @@ active = 1 icon_state = "launcheract" - for(var/obj/machinery/flasher/M in machines) + for(var/obj/machinery/flasher/M in GLOB.machines) if(M.id == id) spawn() M.flash() diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 1e497a7d0e..5513e29b02 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -74,7 +74,7 @@ active = !active icon_state = "light[active]" - for(var/obj/machinery/holosign/M in machines) + for(var/obj/machinery/holosign/M in GLOB.machines) if(M.id == id) spawn(0) M.toggle() diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 2e7a4e7aa4..e0fa2fb3e5 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -128,12 +128,12 @@ active = 1 icon_state = "launcheract" - for(var/obj/machinery/sparker/M in machines) + for(var/obj/machinery/sparker/M in GLOB.machines) if(M.id == id) spawn(0) M.ignite() - for(var/obj/machinery/igniter/M in machines) + for(var/obj/machinery/igniter/M in GLOB.machines) if(M.id == id) use_power(50) M.on = !(M.on) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 27871c6800..3bd453d882 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -172,7 +172,7 @@ Class Procs: pulse2.icon_state = "empdisable" pulse2.name = "emp sparks" pulse2.anchored = TRUE - pulse2.set_dir(pick(cardinal)) + pulse2.set_dir(pick(GLOB.cardinal)) spawn(10) qdel(pulse2) @@ -550,7 +550,7 @@ Class Procs: A.forceMove(droploc) if(scatter && isturf(droploc)) var/turf/T = droploc - A.Move(get_step(T, pick(alldirs))) + A.Move(get_step(T, pick(GLOB.alldirs))) playsound(src, 'sound/machines/machine_die_short.ogg') spark_system.start() diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 8b5bb2d497..75e7f88a2b 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -215,7 +215,7 @@ . = ..() if(autolink) - for(var/obj/machinery/magnetic_module/M in machines) + for(var/obj/machinery/magnetic_module/M in GLOB.machines) if(M.freq == frequency && M.code == code) magnets.Add(M) @@ -230,7 +230,7 @@ /obj/machinery/magnetic_controller/process() if(magnets.len == 0 && autolink) - for(var/obj/machinery/magnetic_module/M in machines) + for(var/obj/machinery/magnetic_module/M in GLOB.machines) if(M.freq == frequency && M.code == code) magnets.Add(M) diff --git a/code/game/machinery/neonsign.dm b/code/game/machinery/neonsign.dm index bf823bed18..c4fa1b39b4 100644 --- a/code/game/machinery/neonsign.dm +++ b/code/game/machinery/neonsign.dm @@ -65,7 +65,7 @@ active = !active icon_state = "light[active]" - for(var/obj/machinery/neonsign/M in machines) + for(var/obj/machinery/neonsign/M in GLOB.machines) if(M.id == id) spawn(0) M.toggle() diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 0697c5ba1e..b16ae0a156 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -417,8 +417,8 @@ GLOBAL_VAR(bomb_set) GLOB.nuke_disks += src /obj/item/disk/nuclear/Destroy() - if(!GLOB.nuke_disks.len && blobstart.len > 0) - var/obj/D = new /obj/item/disk/nuclear(pick(blobstart)) + if(!GLOB.nuke_disks.len && GLOB.blobstart.len > 0) + var/obj/D = new /obj/item/disk/nuclear(pick(GLOB.blobstart)) message_admins("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") log_game("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") . = ..() diff --git a/code/game/machinery/pandemic.dm b/code/game/machinery/pandemic.dm index 55db46704a..dd245e0796 100644 --- a/code/game/machinery/pandemic.dm +++ b/code/game/machinery/pandemic.dm @@ -207,7 +207,7 @@ if(!new_name) return A.AssignName(new_name) - for(var/datum/disease/advance/AD in active_diseases) + for(var/datum/disease/advance/AD in GLOB.active_diseases) AD.Refresh() update_tgui_static_data(ui.user) if("switch_strain") diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 8631ac873b..39a9574ab6 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -163,7 +163,7 @@ Buildable meters set_dir(EAST) /obj/item/pipe/trinary/flippable/fixdir() - if(dir in cornerdirs) + if(dir in GLOB.cornerdirs) set_dir(turn(dir, 45)) /obj/item/pipe/attack_self(mob/user) diff --git a/code/game/machinery/records_scanner.dm b/code/game/machinery/records_scanner.dm index 314714e67f..bf63e8819a 100644 --- a/code/game/machinery/records_scanner.dm +++ b/code/game/machinery/records_scanner.dm @@ -78,7 +78,7 @@ print.info = text print.stamped = 1 - for(var/datum/data/record/test in data_core.general) + for(var/datum/data/record/test in GLOB.data_core.general) if(test.fields["name"] == mname) return @@ -134,7 +134,7 @@ L.fields["image"] = getFlatIcon(user,0)//What the person looks like. Naked, in this case. //End locked reporting - data_core.general += G + GLOB.data_core.general += G data_core.medical += M data_core.security += S data_core.locked += L diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 3b98470a56..fadd7a0540 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -184,7 +184,7 @@ GLOBAL_LIST_EMPTY_TYPED(allConsoles, /obj/machinery/requests_console) var/log_msg = message var/pass = 0 screen = RCS_SENTFAIL - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message(ckey(params["department"]), department, log_msg, msgStamped, msgVerified, priority) diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm index 988e3458a0..2b5383740f 100644 --- a/code/game/machinery/status_display_ai.dm +++ b/code/game/machinery/status_display_ai.dm @@ -44,7 +44,7 @@ var/list/ai_status_emotions = list( var/emote = tgui_input_list(user, "Please, select a status:", "AI Status", ai_emotions) if(!emote) return - for (var/obj/machinery/M in machines) //change status + for (var/obj/machinery/M in GLOB.machines) //change status if(istype(M, /obj/machinery/ai_status_display)) var/obj/machinery/ai_status_display/AISD = M AISD.emotion = emote diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 1a85bffaff..b766be31f6 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -23,10 +23,10 @@ var/obj/machinery/teleport/hub/hub = null // Search surrounding turfs for the station, and then search the station's surrounding turfs for the hub. - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) station = locate(/obj/machinery/teleport/station, get_step(src, direction)) if(station) - for(direction in cardinal) + for(direction in GLOB.cardinal) hub = locate(/obj/machinery/teleport/hub, get_step(station, direction)) if(hub) break diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index 6c48fa0245..8a88ee9293 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -41,7 +41,7 @@ var/ndir ndir = user.dir - if(!(ndir in cardinal)) + if(!(ndir in GLOB.cardinal)) return var/obj/machinery/M = new build_machine_type(get_turf(src.loc), ndir, 1, frame_type) @@ -64,7 +64,7 @@ else ndir = get_dir(on_wall, user) - if(!(ndir in cardinal)) + if(!(ndir in GLOB.cardinal)) return var/turf/loc = get_turf(user) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index ff2f9dd997..1ab2e4cdc5 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -2345,7 +2345,7 @@ /obj/mecha/proc/get_log_html() var/output = "[src.name] Log" for(var/list/entry in log) - output += {"
[time2text(entry["time"],"DDD MMM DD hh:mm:ss")] [game_year]
+ output += {"
[time2text(entry["time"],"DDD MMM DD hh:mm:ss")] [GLOB.game_year]
[entry["message"]]
"} output += "" @@ -2356,7 +2356,7 @@ for(var/list/entry in log) data.Add(list(list( "time" = time2text(entry["time"], "DDD MMM DD hh:mm:ss"), - "year" = game_year, + "year" = GLOB.game_year, "message" = entry["message"], ))) return data diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm index 4677d1ea2e..b2245b8f6d 100644 --- a/code/game/objects/effects/alien/aliens.dm +++ b/code/game/objects/effects/alien/aliens.dm @@ -145,7 +145,7 @@ if(get_dist(linked_node, src) > linked_node.node_range) return - for(var/dirn in cardinal) + for(var/dirn in GLOB.cardinal) var/turf/T1 = get_turf(src) var/turf/T2 = get_step(src, dirn) diff --git a/code/game/objects/effects/chem/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm index ff8c096172..37df00c062 100644 --- a/code/game/objects/effects/chem/chemsmoke.dm +++ b/code/game/objects/effects/chem/chemsmoke.dm @@ -175,7 +175,7 @@ chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents smoke.icon = I smoke.plane = ABOVE_PLANE - smoke.set_dir(pick(cardinal)) + smoke.set_dir(pick(GLOB.cardinal)) smoke.pixel_x = -32 + rand(-8, 8) smoke.pixel_y = -32 + rand(-8, 8) walk_to(smoke, T) @@ -208,7 +208,7 @@ while(pending.len) for(var/turf/current in pending) - for(var/D in cardinal) + for(var/D in GLOB.cardinal) var/turf/target = get_step(current, D) if(wallList) if(istype(target, /turf/simulated/wall)) diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index 489f40ad6d..ab80979552 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -53,7 +53,7 @@ if(--amount < 0) return - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) if(!T) continue diff --git a/code/game/objects/effects/confetti_vr.dm b/code/game/objects/effects/confetti_vr.dm index 854d3c7c28..ae6d54014b 100644 --- a/code/game/objects/effects/confetti_vr.dm +++ b/code/game/objects/effects/confetti_vr.dm @@ -32,9 +32,9 @@ src.total_sparks++ var/direction if(src.cardinals) - direction = pick(cardinal) + direction = pick(GLOB.cardinal) else - direction = pick(alldirs) + direction = pick(GLOB.alldirs) for(i=0, i1) return var/ndir = get_dir(user, on_wall) - if (!(ndir in cardinal)) + if (!(ndir in GLOB.cardinal)) return var/turf/loc = get_turf(user) var/area/A = loc.loc diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 684d69ba07..2bb3fea907 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -246,7 +246,7 @@ return ROOM_ERR_TOOLARGE var/turf/T = pending[1] //why byond havent list::pop()? pending -= T - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/turf/NT = get_step(T,dir) if (!isturf(NT) || (NT in found) || (NT in pending)) continue diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm index b1b78fbccd..570a694e26 100644 --- a/code/game/objects/items/blueprints_vr.dm +++ b/code/game/objects/items/blueprints_vr.dm @@ -535,7 +535,7 @@ var/list/zLevels = using_map.station_levels.Copy() for(var/datum/planet/P in SSplanets.planets) zLevels -= P.expected_z_levels - for(var/obj/machinery/gravity_generator/main/GG in machines) + for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines) if(GG.z in zLevels) GG.update_areas() return TRUE @@ -678,7 +678,7 @@ return ROOM_ERR_TOOLARGE var/turf/T = pending[1] //why byond havent list::pop()? pending -= T - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/turf/NT = get_step(T,dir) if (!isturf(NT) || (NT in found) || (NT in pending)) continue @@ -835,7 +835,7 @@ return 1 //TOOLARGE var/turf/T = pending[1] pending -= T - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/turf/NT = get_step(T,dir) if (!isturf(NT) || (NT in found) || (NT in pending)) continue @@ -936,7 +936,7 @@ var/list/zLevels = using_map.station_levels.Copy() for(var/datum/planet/P in SSplanets.planets) zLevels -= P.expected_z_levels - for(var/obj/machinery/gravity_generator/main/GG in machines) + for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines) if(GG.z in zLevels) GG.update_areas() return diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index 986b549f7b..e6230bfd96 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -305,8 +305,8 @@ /obj/item/communicator/tgui_static_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() // Update manifest' - if(data_core) - data_core.get_manifest_list() + if(GLOB.data_core) + GLOB.data_core.get_manifest_list() data["manifest"] = GLOB.PDA_Manifest data["mapRef"] = map_name return data diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index 19d50a1cee..4e05cf04e2 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -26,15 +26,15 @@ /obj/item/holowarrant/attack_self(mob/living/user as mob) active = null var/list/warrants = list() - if(!isnull(data_core.general)) - for(var/datum/data/record/warrant/W in data_core.warrants) + if(!isnull(GLOB.data_core.general)) + for(var/datum/data/record/warrant/W in GLOB.data_core.warrants) warrants += W.fields["namewarrant"] if(warrants.len == 0) to_chat(user,span_notice("There are no warrants available")) return var/temp temp = tgui_input_list(user, "Which warrant would you like to load?", "Warrant Selection", warrants) - for(var/datum/data/record/warrant/W in data_core.warrants) + for(var/datum/data/record/warrant/W in GLOB.data_core.warrants) if(W.fields["namewarrant"] == temp) active = W update_icon() diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index d617d06068..3d6e979dfc 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -48,7 +48,7 @@ A.holder = src A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb). - bombers += "[key_name(user)] attached a [item] to a transfer valve." + GLOB.bombers += "[key_name(user)] attached a [item] to a transfer valve." message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. [ADMIN_JMP(location)]") log_game("[key_name_admin(user)] attached a [item] to a transfer valve.") attacher = user @@ -208,7 +208,7 @@ last_touch_info = ADMIN_QUE(mob) log_str += " Last touched by: [src.fingerprintslast][last_touch_info]" - bombers += log_str + GLOB.bombers += log_str message_admins(log_str, 0, 1) log_game(log_str) merge_gases() diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index eb998f72f2..48228b7abc 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -130,7 +130,7 @@ data["locked_records"] = null if(exploit_id) - for(var/datum/data/record/L in data_core.locked) + for(var/datum/data/record/L in GLOB.data_core.locked) if(L.fields["id"] == exploit_id) data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value. // We trade off being able to automatically add shit for more control over what gets passed to json @@ -155,7 +155,7 @@ break else var/list/permanentData = list() - for(var/datum/data/record/L in sortRecord(data_core.locked)) + for(var/datum/data/record/L in sortRecord(GLOB.data_core.locked)) permanentData.Add(list(list( "name" = L.fields["name"], "id" = L.fields["id"] diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm index 9a28678ed6..816130a011 100644 --- a/code/game/objects/items/toys/toys_vr.dm +++ b/code/game/objects/items/toys/toys_vr.dm @@ -849,15 +849,15 @@ to_chat(user, span_warning("A snake popped out of [src]!")) if(real == 0) var/obj/item/toy/C = new /obj/item/toy/plushie/snakeplushie(get_turf(loc)) - C.throw_at(get_step(src, pick(alldirs)), 9, 1, src) + C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src) if(real == 1) var/mob/living/simple_mob/C = new /mob/living/simple_mob/animal/passive/snake(get_turf(loc)) - C.throw_at(get_step(src, pick(alldirs)), 9, 1, src) + C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src) if(real == 2) var/mob/living/simple_mob/C = new /mob/living/simple_mob/vore/aggressive/giant_snake(get_turf(loc)) - C.throw_at(get_step(src, pick(alldirs)), 9, 1, src) + C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src) playsound(src, 'sound/items/confetti.ogg', 50, 0) icon_state = "tastybread_popped" @@ -882,15 +882,15 @@ to_chat(user, span_warning("A snake popped out of [src]!")) if(real == 0) var/obj/item/toy/C = new /obj/item/toy/plushie/snakeplushie(get_turf(loc)) - C.throw_at(get_step(src, pick(alldirs)), 9, 1, src) + C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src) if(real == 1) var/mob/living/simple_mob/C = new /mob/living/simple_mob/animal/passive/snake(get_turf(loc)) - C.throw_at(get_step(src, pick(alldirs)), 9, 1, src) + C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src) if(real == 2) var/mob/living/simple_mob/C = new /mob/living/simple_mob/vore/aggressive/giant_snake(get_turf(loc)) - C.throw_at(get_step(src, pick(alldirs)), 9, 1, src) + C.throw_at(get_step(src, pick(GLOB.alldirs)), 9, 1, src) playsound(src, 'sound/items/confetti.ogg', 50, 0) icon_state = "tastybread_popped" diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index c3afa07f13..558e84579b 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -128,7 +128,7 @@ AI MODULES /obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender) var/time = time2text(world.realtime,"hh:mm:ss") - lawchanges.Add("[time] : [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])") + GLOB.lawchanges.Add("[time] : [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])") log_and_message_admins("used [src.name] on [target.name]([target.key])") /obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) @@ -159,7 +159,7 @@ AI MODULES /obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = text("Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.", targetName, targetName) target.add_supplied_law(9, law) - lawchanges.Add("The law specified [targetName]") + GLOB.lawchanges.Add("The law specified [targetName]") /******************** OneMember ********************/ @@ -266,7 +266,7 @@ AI MODULES if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER) lawpos = MIN_SUPPLIED_LAW_NUMBER target.add_supplied_law(lawpos, law) - lawchanges.Add("The law was '[newFreeFormLaw]'") + GLOB.lawchanges.Add("The law was '[newFreeFormLaw]'") /obj/item/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) @@ -382,7 +382,7 @@ AI MODULES /obj/item/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "[newFreeFormLaw]" target.add_inherent_law(law) - lawchanges.Add("The law is '[newFreeFormLaw]'") + GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'") /obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) @@ -407,7 +407,7 @@ AI MODULES // ..() //We don't want this module reporting to the AI who dun it. --NEO log_law_changes(target, sender) - lawchanges.Add("The law is '[newFreeFormLaw]'") + GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'") to_chat(target, span_danger("BZZZZT")) var/law = "[newFreeFormLaw]" target.add_ion_law(law) diff --git a/code/game/objects/items/weapons/picnic_blankets.dm b/code/game/objects/items/weapons/picnic_blankets.dm index c6e63fdc72..e9133c299e 100644 --- a/code/game/objects/items/weapons/picnic_blankets.dm +++ b/code/game/objects/items/weapons/picnic_blankets.dm @@ -49,7 +49,7 @@ qdel(src) /obj/structure/picnic_blanket_deployed/proc/unfold() - var/dirs = alldirs + var/dirs = GLOB.alldirs var/isTableTop //Controls whether to spawn things across tables, or on ground var/doWeHaveTable //Helper var set to true if ANY obj is a table var/anti_spam = FALSE //Helper var to avoid spamming people if they are mired in trash. diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm index a45d44b1cc..d4766052fc 100644 --- a/code/game/objects/items/weapons/policetape.dm +++ b/code/game/objects/items/weapons/policetape.dm @@ -155,13 +155,13 @@ var/list/tape_roll_applications = list() // spread tape in all directions, provided there is a wall/window var/turf/T var/possible_dirs = 0 - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) T = get_step(start, dir) if(T && T.density) possible_dirs |= dir else for(var/obj/structure/window/W in T) - if(W.is_fulltile() || W.dir == reverse_dir[dir]) + if(W.is_fulltile() || W.dir == GLOB.reverse_dir[dir]) possible_dirs |= dir for(var/obj/structure/window/window in start) if(istype(window) && !window.is_fulltile()) @@ -215,12 +215,12 @@ var/list/tape_roll_applications = list() else continue else if(cur == end) - if(window.dir == reverse_dir[orientation]) + if(window.dir == GLOB.reverse_dir[orientation]) can_place = 0 break else continue - else if (window.dir == reverse_dir[orientation] || window.dir == orientation) + else if (window.dir == GLOB.reverse_dir[orientation] || window.dir == orientation) can_place = 0 break else @@ -244,21 +244,21 @@ var/list/tape_roll_applications = list() tapetest = 0 tape_dir = dir if(cur == start) - var/turf/T = get_step(start, reverse_dir[orientation]) + var/turf/T = get_step(start, GLOB.reverse_dir[orientation]) if(T && !T.density) tape_dir = orientation for(var/obj/structure/window/W in T) if(W.is_fulltile() || W.dir == orientation) tape_dir = dir for(var/obj/structure/window/window in cur) - if(istype(window) && !window.is_fulltile() && window.dir == reverse_dir[orientation]) + if(istype(window) && !window.is_fulltile() && window.dir == GLOB.reverse_dir[orientation]) tape_dir = dir else if(cur == end) var/turf/T = get_step(end, orientation) if(T && !T.density) - tape_dir = reverse_dir[orientation] + tape_dir = GLOB.reverse_dir[orientation] for(var/obj/structure/window/W in T) - if(W.is_fulltile() || W.dir == reverse_dir[orientation]) + if(W.is_fulltile() || W.dir == GLOB.reverse_dir[orientation]) tape_dir = dir for(var/obj/structure/window/window in cur) if(istype(window) && !window.is_fulltile() && window.dir == orientation) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 9c9f3496a3..d4f3e38538 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -210,7 +210,7 @@ if(ishuman(target)) var/mob/living/carbon/human/H = target - H.forcesay(hit_appends) + H.forcesay(GLOB.hit_appends) powercheck() /obj/item/melee/baton/emp_act(severity) diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index f8023ae8e3..0221ac5e18 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -57,7 +57,7 @@ /obj/item/syndie/c4explosive/proc/do_detonate() SHOULD_NOT_OVERRIDE(TRUE) PRIVATE_PROC(TRUE) - for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors. + for(var/dirn in GLOB.cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors. var/turf/simulated/wall/T = get_step(src,dirn) if(locate(/obj/machinery/door/airlock) in T) var/obj/machinery/door/airlock/D = locate() in T diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 3df6f5f4b2..edb893116f 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -176,7 +176,7 @@ var/list/global/tank_gauge_cache = list() to_chat(user, span_notice("You begin attaching the assembly to \the [src].")) if(do_after(user, 50, src)) to_chat(user, span_notice("You finish attaching the assembly to \the [src].")) - bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]" + GLOB.bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]" message_admins("[key_name_admin(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]") assemble_bomb(W,user) else @@ -195,7 +195,7 @@ var/list/global/tank_gauge_cache = list() src.valve_welded = 1 src.leaking = 0 else - bombers += "[key_name(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]" + GLOB.bombers += "[key_name(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]" message_admins("[key_name_admin(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]") if(WT.welding) to_chat(user, span_danger("You accidentally rake \the [W] across \the [src]!")) diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 9b32e590fc..1799332a2c 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -171,8 +171,8 @@ var/dir_offset = 0 if(target_turf != source_turf) dir_offset = get_dir(source_turf, target_turf) - if(!(dir_offset in cardinal)) - to_chat(user, "You cannot reach that from here.") // can only place stuck papers in cardinal directions, to + if(!(dir_offset in GLOB.cardinal)) + to_chat(user, "You cannot reach that from here.") // can only place stuck papers in GLOB.cardinal directions, to return // reduce papers around corners issue. user.drop_from_inventory(src) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 1aaf549c77..fa03a626e2 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -138,13 +138,13 @@ Frequency: to_chat(user, span_notice("\The [src] is malfunctioning.")) return var/list/L = list( ) - for(var/obj/machinery/teleport/hub/R in machines) + for(var/obj/machinery/teleport/hub/R in GLOB.machines) var/obj/machinery/computer/teleporter/com var/obj/machinery/teleport/station/station - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) station = locate(/obj/machinery/teleport/station, get_step(R, direction)) if(station) - for(direction in cardinal) + for(direction in GLOB.cardinal) com = locate(/obj/machinery/computer/teleporter, get_step(station, direction)) if(com) break diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 7ae5c11e5d..3001cabecf 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -218,7 +218,7 @@ other_connections = list("0", "0", "0", "0") return FALSE - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) var/success = 0 for(var/b_type in blend_objects) diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm index 6fdf137653..64216fd0a0 100644 --- a/code/game/objects/structures/catwalk.dm +++ b/code/game/objects/structures/catwalk.dm @@ -46,7 +46,7 @@ O.update() //Will cause anything on the open turf to fall if it should /obj/structure/catwalk/proc/redraw_nearby_catwalks() - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) var/obj/structure/catwalk/L = locate() in get_step(src, direction) if(L) L.update_connections() diff --git a/code/game/objects/structures/cliff.dm b/code/game/objects/structures/cliff.dm index 807ec81eb0..6e13b840bc 100644 --- a/code/game/objects/structures/cliff.dm +++ b/code/game/objects/structures/cliff.dm @@ -178,14 +178,14 @@ two tiles on initialization, and which way a cliff is facing may change during m return FALSE var/turf/T = get_turf(L) - if(T && get_dir(T, loc) & reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it. + if(T && get_dir(T, loc) & GLOB.reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it. return TRUE return FALSE /obj/structure/cliff/proc/fall_off_cliff(mob/living/L) if(!istype(L)) return FALSE - var/turf/T = get_step(src, reverse_dir[dir]) + var/turf/T = get_step(src, GLOB.reverse_dir[dir]) var/displaced = FALSE if(dir in list(EAST, WEST)) // Apply an offset if flying sideways, to help maintain the illusion of depth. diff --git a/code/game/objects/structures/fitness_vr.dm b/code/game/objects/structures/fitness_vr.dm index f3d6aa082b..48635f47fc 100644 --- a/code/game/objects/structures/fitness_vr.dm +++ b/code/game/objects/structures/fitness_vr.dm @@ -13,7 +13,7 @@ /obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSTABLE)) return TRUE - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index e376467ae9..33bb065660 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -38,7 +38,7 @@ /obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSTABLE)) return TRUE - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index a19f7cfb41..9db92d8065 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -117,7 +117,7 @@ if(loc == user.loc) dir_to_set = user.dir else - if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions. + if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for GLOB.cardinal directions. if( x == user.x ) if( y > user.y ) dir_to_set = 2 @@ -130,7 +130,7 @@ dir_to_set = 4 else to_chat(user, span_notice("You can't reach.")) - return //Only works for cardinal direcitons, diagonals aren't supposed to work like this. + return //Only works for GLOB.cardinal direcitons, diagonals aren't supposed to work like this. for(var/obj/structure/window/WINDOW in loc) if(WINDOW.dir == dir_to_set) to_chat(user, span_notice("There is already a window facing this way there.")) diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 5898416d64..5d183f4a90 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -21,14 +21,14 @@ icon = 'icons/obj/smoothlattice.dmi' icon_state = "latticeblank" updateOverlays() - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/obj/structure/lattice/L if(locate(/obj/structure/lattice, get_step(src, dir))) L = locate(/obj/structure/lattice, get_step(src, dir)) L.updateOverlays() /obj/structure/lattice/Destroy() - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/obj/structure/lattice/L if(locate(/obj/structure/lattice, get_step(src, dir))) L = locate(/obj/structure/lattice, get_step(src, dir)) @@ -80,7 +80,7 @@ var/dir_sum = 0 - for (var/direction in cardinal) + for (var/direction in GLOB.cardinal) if(locate(/obj/structure/lattice, get_step(src, direction))) dir_sum += direction else diff --git a/code/game/objects/structures/ledges.dm b/code/game/objects/structures/ledges.dm index 6da40df1c1..e56ebaee40 100644 --- a/code/game/objects/structures/ledges.dm +++ b/code/game/objects/structures/ledges.dm @@ -39,7 +39,7 @@ /obj/structure/ledge/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSTABLE)) return TRUE - if(solidledge && get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(solidledge && get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 87a470c6c8..97fc49c33c 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -49,7 +49,7 @@ else src.icon_state = "morgue3" if(broadcast) - global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical") + GLOB.global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical") else src.icon_state = "morgue1" return diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 2ee3f1fa65..e52d1f3d06 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -44,7 +44,7 @@ /obj/structure/railing/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSTABLE)) return TRUE - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 46374f0deb..29f79df793 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -1543,7 +1543,7 @@ return var/placement_dir = get_dir(user, A) - if (!(placement_dir in cardinal)) + if (!(placement_dir in GLOB.cardinal)) to_chat(user, span_warning("You must stand directly in front of the location you wish to place that on.")) return diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm index f2e4811eb0..4ab8414f64 100644 --- a/code/game/objects/structures/transit_tubes.dm +++ b/code/game/objects/structures/transit_tubes.dm @@ -13,9 +13,9 @@ var/exit_delay = 2 var/enter_delay = 1 - // alldirs in global.dm is the same list of directions, but since + // GLOB.alldirs in global.dm is the same list of directions, but since // the specific order matters to get a usable icon_state, it is - // copied here so that, in the unlikely case that alldirs is changed, + // copied here so that, in the unlikely case that GLOB.alldirs is changed, // this continues to work. var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm index 9247682925..ec97ba74fa 100644 --- a/code/game/objects/structures/trash_pile_vr.dm +++ b/code/game/objects/structures/trash_pile_vr.dm @@ -102,10 +102,10 @@ return var/timedifference = world.time - user.client.time_died_as_mouse - if(user.client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) + if(user.client.time_died_as_mouse && timedifference <= CONFIG_GET(number/mouse_respawn_time) MINUTES) var/timedifference_text - timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") - to_chat(user, span_warning("You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.")) + timedifference_text = time2text(CONFIG_GET(number/mouse_respawn_time) MINUTES - timedifference,"mm:ss") + to_chat(user, span_warning("You may only spawn again as a mouse more than [CONFIG_GET(number/mouse_respawn_time)] minutes after your death. You have [timedifference_text] left.")) return var/response = tgui_alert(user, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!")) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 03999f92ff..fe108386e5 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -410,7 +410,7 @@ /obj/item/bikehorn/rubberducky/grey/attack_self(mob/user as mob) if(spam_flag == 0) - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != user.z || get_dist(user,L) > 10) continue else diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 74e70ff83e..3d89f6836b 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -57,7 +57,7 @@ /obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSGLASS)) return TRUE - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 110361f707..2ea8431d3f 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -138,7 +138,7 @@ return TRUE if(is_fulltile()) return FALSE //full tile window, you can't move into it! - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density else return TRUE diff --git a/code/game/objects/structures/window_spawner.dm b/code/game/objects/structures/window_spawner.dm index 75d5d6aabf..98b239f54a 100644 --- a/code/game/objects/structures/window_spawner.dm +++ b/code/game/objects/structures/window_spawner.dm @@ -38,7 +38,7 @@ var/obj/structure/grille/G = new /obj/structure/grille(src.loc) handle_grille_spawn(G) var/list/neighbours = list() - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/turf/T = get_step(src, dir) var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T if(!other) diff --git a/code/game/turfs/simulated/dungeon/wall.dm b/code/game/turfs/simulated/dungeon/wall.dm index fe26bf41a7..ccdb59697f 100644 --- a/code/game/turfs/simulated/dungeon/wall.dm +++ b/code/game/turfs/simulated/dungeon/wall.dm @@ -71,13 +71,13 @@ for(var/i = 1 to 4) I = image('icons/turf/wall_masks.dmi', "rock[wall_connections[i]]", dir = 1<<(i-1)) add_overlay(I) - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src,direction) if(istype(T) && !T.density) add_overlay(get_cached_border(rock_side,direction,icon,rock_side)) else if(update_neighbors) - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) if(istype(get_step(src, direction), /turf/simulated/wall/solidrock)) var/turf/simulated/wall/solidrock/M = get_step(src, direction) M.update_icon() @@ -107,13 +107,13 @@ for(var/i = 1 to 4) I = image('icons/turf/wall_masks.dmi', "mossyrock[wall_connections[i]]", dir = 1<<(i-1)) add_overlay(I) - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src,direction) if(istype(T) && !T.density) add_overlay(get_cached_border(mossyrock_side,direction,icon,mossyrock_side)) else if(update_neighbors) - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) if(istype(get_step(src, direction), /turf/simulated/wall/solidrock/mossyrockpoi)) var/turf/simulated/wall/solidrock/mossyrockpoi/M = get_step(src, direction) M.update_icon() diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm index b0ef621161..f561843e1d 100644 --- a/code/game/turfs/simulated/floor_attackby.dm +++ b/code/game/turfs/simulated/floor_attackby.dm @@ -29,7 +29,7 @@ if(isopenturf(T)) // Must be build adjacent to an existing floor/wall, no floating floors var/list/cardinalTurfs = list() // Up a Z level - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) var/turf/B = get_step(T, dir) if(B) cardinalTurfs += B @@ -53,7 +53,7 @@ // Create a ceiling to shield from the weather if(src.is_outdoors()) - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) var/turf/A = get_step(src, dir) if(A && !A.is_outdoors()) if(expended_tile || R.use(1)) diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index 57576d027e..78e79cde6a 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -33,7 +33,7 @@ var/image/no_ceiling_image = null // Apply edges, corners, and inner corners. var/has_border = 0 if(flooring.flags & TURF_HAS_EDGES) - for(var/step_dir in cardinal) + for(var/step_dir in GLOB.cardinal) var/turf/simulated/floor/T = get_step(src, step_dir) if(!flooring.test_link(src, T)) has_border |= step_dir @@ -103,7 +103,7 @@ var/image/no_ceiling_image = null // This updates an edge from an adjacent turf onto us, not our own 'internal' edges. // For e.g. we might be outdoor metal plating, and we want to find sand next to us to have it 'spill onto' our turf with an overlay. /turf/simulated/proc/update_icon_edge() - for(var/checkdir in cardinal) // Check every direction + for(var/checkdir in GLOB.cardinal) // Check every direction var/turf/simulated/T = get_step(src, checkdir) // Get the turf in that direction // Our conditions: // Has to be a /turf/simulated diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index aaae23d89b..5d6a7ed22f 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -91,7 +91,7 @@ . = ..() if(!antilight_cache) antilight_cache = list() - for(var/diag in cornerdirs) + for(var/diag in GLOB.cornerdirs) var/image/I = image(LIGHTING_ICON, null, icon_state = "diagonals", layer = 10, dir = diag) I.plane = PLANE_LIGHTING antilight_cache["[diag]"] = I @@ -103,7 +103,7 @@ // For joined corners touching static lighting turfs, add an overlay to cancel out that part of our lighting overlay. /turf/simulated/shuttle/proc/update_breaklights() cut_overlay(antilight_cache["[join_flags]"], TRUE) - if(!(join_flags in cornerdirs)) //We're not joined at an angle + if(!(join_flags in GLOB.cornerdirs)) //We're not joined at an angle return //Dynamic lighting dissolver var/turf/T = get_step(src, turn(join_flags,180)) diff --git a/code/game/turfs/simulated/wall_icon.dm b/code/game/turfs/simulated/wall_icon.dm index 65fe15a5e6..2f805fbf72 100644 --- a/code/game/turfs/simulated/wall_icon.dm +++ b/code/game/turfs/simulated/wall_icon.dm @@ -126,13 +126,13 @@ /turf/simulated/wall/proc/special_wall_connections(list/dirs, list/inrange) if(material.icon_base == "hull") // Could be improved... var/additional_dirs = 0 - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) var/turf/T = get_step(src,direction) if(T && (locate(/obj/structure/hull_corner) in T)) dirs += direction additional_dirs |= direction if(additional_dirs) - for(var/diag_dir in cornerdirs) + for(var/diag_dir in GLOB.cornerdirs) if ((additional_dirs & diag_dir) == diag_dir) dirs += diag_dir diff --git a/code/game/turfs/simulated/wall_types.dm b/code/game/turfs/simulated/wall_types.dm index 82dd039a76..299980cc52 100644 --- a/code/game/turfs/simulated/wall_types.dm +++ b/code/game/turfs/simulated/wall_types.dm @@ -360,7 +360,7 @@ /turf/simulated/wall/eris/special_wall_connections(list/dirs, list/inrange) ..() - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) var/decided_to_blend = FALSE blend_obj_loop: @@ -408,7 +408,7 @@ /turf/simulated/wall/bay/special_wall_connections(list/dirs, list/inrange) ..() - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) var/decided_to_blend = FALSE blend_obj_loop: @@ -474,7 +474,7 @@ if(!material) return var/dirs = 0 - var/list_to_use = diagonal_blending ? alldirs : cardinal + var/list_to_use = diagonal_blending ? GLOB.alldirs : GLOB.cardinal main_direction_loop: for(var/direction in list_to_use) var/turf/simulated/wall/tgmc/W = get_step(src, direction) diff --git a/code/game/turfs/simulated/wall_types_vr.dm b/code/game/turfs/simulated/wall_types_vr.dm index 3a73740246..802a70c2ad 100644 --- a/code/game/turfs/simulated/wall_types_vr.dm +++ b/code/game/turfs/simulated/wall_types_vr.dm @@ -47,7 +47,7 @@ var/list/flesh_overlay_cache = list() if(density) icon = 'icons/turf/stomach_vr.dmi' icon_state = "flesh" - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src,direction) if(istype(T) && !T.density) var/place_dir = turn(direction, 180) @@ -56,7 +56,7 @@ var/list/flesh_overlay_cache = list() add_overlay(flesh_overlay_cache["flesh_side_[place_dir]"]) if(update_neighbors) - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) if(istype(get_step(src, direction), /turf/simulated/flesh)) var/turf/simulated/flesh/F = get_step(src, direction) F.update_icon() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 385c7b2ba4..14e6ec4b55 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -238,7 +238,7 @@ if(locate(/obj/effect/overlay/wallrot) in src) return FALSE - // Wall-rot can't go onto walls that are surrounded in all four cardinal directions. + // Wall-rot can't go onto walls that are surrounded in all four GLOB.cardinal directions. // Because of spores, or something. It's actually to avoid the pain that is removing wallrot surrounded by // four r-walls. var/at_least_one_open_turf = FALSE diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index e5d749c3f6..2ee9ced633 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -168,8 +168,8 @@ if(!cur_pos) return cur_x = cur_pos["x"] cur_y = cur_pos["y"] - next_x = (--cur_x||global_map.len) - y_arr = global_map[next_x] + next_x = (--cur_x||GLOB.global_map.len) + y_arr = GLOB.global_map[next_x] target_z = y_arr[cur_y] /* //debug @@ -193,8 +193,8 @@ if(!cur_pos) return cur_x = cur_pos["x"] cur_y = cur_pos["y"] - next_x = (++cur_x > global_map.len ? 1 : cur_x) - y_arr = global_map[next_x] + next_x = (++cur_x > GLOB.global_map.len ? 1 : cur_x) + y_arr = GLOB.global_map[next_x] target_z = y_arr[cur_y] /* //debug @@ -217,7 +217,7 @@ if(!cur_pos) return cur_x = cur_pos["x"] cur_y = cur_pos["y"] - y_arr = global_map[cur_x] + y_arr = GLOB.global_map[cur_x] next_y = (--cur_y||y_arr.len) target_z = y_arr[next_y] /* @@ -242,7 +242,7 @@ if(!cur_pos) return cur_x = cur_pos["x"] cur_y = cur_pos["y"] - y_arr = global_map[cur_x] + y_arr = GLOB.global_map[cur_x] next_y = (++cur_y > y_arr.len ? 1 : cur_y) target_z = y_arr[next_y] /* diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index b60c420097..d2b7ad5112 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -8,7 +8,7 @@ /turf/space/transit/Initialize(mapload) . = ..() - toggle_transit(reverse_dir[pushdirection]) + toggle_transit(GLOB.reverse_dir[pushdirection]) //------------------------ diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 262ac48fee..454ac52c69 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -95,7 +95,7 @@ old_fire.RemoveFire() if(tell_universe) - universe.OnTurfChange(W) + GLOB.universe.OnTurfChange(W) if(SSair) SSair.mark_for_update(W) @@ -184,7 +184,7 @@ //Also need to send signals diagonally too now. var/radius = ONE_OVER_SQRT_2 * SUNLIGHT_RADIUS + 1 - for(var/dir in cornerdirs) + for(var/dir in GLOB.cornerdirs) var/steps = 1 var/turf/cur_turf = get_step(src,dir) diff --git a/code/game/world.dm b/code/game/world.dm index 52b5a40bcc..ddd0e0b40f 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -5,13 +5,13 @@ to_world_log("Map Loading Complete") //logs //VOREStation Edit Start - log_path += time2text(world.realtime, "YYYY/MM-Month/DD-Day/round-hh-mm-ss") - diary = start_log("[log_path].log") - href_logfile = start_log("[log_path]-hrefs.htm") - error_log = start_log("[log_path]-error.log") - sql_error_log = start_log("[log_path]-sql-error.log") - query_debug_log = start_log("[log_path]-query-debug.log") - debug_log = start_log("[log_path]-debug.log") + GLOB.log_directory += time2text(world.realtime, "YYYY/MM-Month/DD-Day/round-hh-mm-ss") + GLOB.diary = start_log("[GLOB.log_directory].log") + GLOB.href_logfile = start_log("[GLOB.log_directory]-hrefs.htm") + GLOB.error_log = start_log("[GLOB.log_directory]-error.log") + GLOB.sql_error_log = start_log("[GLOB.log_directory]-sql-error.log") + GLOB.query_debug_log = start_log("[GLOB.log_directory]-query-debug.log") + GLOB.debug_log = start_log("[GLOB.log_directory]-debug.log") //VOREStation Edit End var/latest_changelog = file("[global.config.directory]/../html/changelogs/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml") @@ -133,7 +133,7 @@ var/world_topic_spam_protect_time = world.timeofday var/input[] = params2list(T) var/list/s = list() s["version"] = GLOB.game_version - s["mode"] = master_mode + s["mode"] = GLOB.master_mode s["respawn"] = CONFIG_GET(flag/abandon_allowed) s["persistance"] = CONFIG_GET(flag/persistence_disabled) s["enter"] = CONFIG_GET(flag/enter_allowed) @@ -200,7 +200,7 @@ var/world_topic_spam_protect_time = world.timeofday "bot" = SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC) ) - for(var/datum/data/record/t in data_core.general) + for(var/datum/data/record/t in GLOB.data_core.general) var/name = t.fields["name"] var/rank = t.fields["rank"] var/real_rank = make_list_rank(t.fields["real_rank"]) @@ -217,7 +217,7 @@ var/world_topic_spam_protect_time = world.timeofday positions["misc"] = list() positions["misc"][name] = rank - for(var/datum/data/record/t in data_core.hidden_general) + for(var/datum/data/record/t in GLOB.data_core.hidden_general) var/name = t.fields["name"] var/rank = t.fields["rank"] var/real_rank = make_list_rank(t.fields["real_rank"]) @@ -467,8 +467,8 @@ var/world_topic_spam_protect_time = world.timeofday var/list/Lines = file2list("data/mode.txt") if(Lines.len) if(Lines[1]) - master_mode = Lines[1] - log_misc("Saved mode is '[master_mode]'") + GLOB.master_mode = Lines[1] + log_misc("Saved mode is '[GLOB.master_mode]'") /world/proc/save_mode(var/the_mode) var/F = file("data/mode.txt") @@ -481,7 +481,7 @@ var/world_topic_spam_protect_time = world.timeofday return 1 /world/proc/load_motd() - join_motd = file2text("config/motd.txt") + GLOB.join_motd = file2text("config/motd.txt") /* Replaced with configuration controller /proc/load_configuration() @@ -569,8 +569,8 @@ var/world_topic_spam_protect_time = world.timeofday var/list/features = list() if(ticker) - if(master_mode) - features += master_mode + if(GLOB.master_mode) + features += GLOB.master_mode else features += span_bold("STARTING") diff --git a/code/global.dm b/code/global.dm deleted file mode 100644 index 89d0b0c85b..0000000000 --- a/code/global.dm +++ /dev/null @@ -1,184 +0,0 @@ -// Items that ask to be called every cycle. -var/global/datum/datacore/data_core = null -var/global/list/machines = SSmachines.all_machines //I would upgrade all instances of global.machines to SSmachines.all_machines but it's used in so many places and a search returns so many matches for 'machines' that isn't a use of the global... - -var/global/list/active_diseases = list() -var/global/list/hud_icon_reference = list() - - -var/global/list/global_mutations = list() // List of hidden mutation things. - -var/global/datum/universal_state/universe = new - -var/global/list/global_map = null - -// Noises made when hit while typing. -var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF") -var/log_path = "data/logs/" //See world.dm for the full calculated path -var/diary = null -var/error_log = null -var/sql_error_log = null -var/query_debug_log = null -var/debug_log = null -var/href_logfile = null -// var/station_name = "Northern Star" -// var/const/station_orig = "Northern Star" //station_name can't be const due to event prefix/suffix -// var/const/station_short = "Northern Star" -// var/const/dock_name = "Vir Interstellar Spaceport" -// var/const/boss_name = "Central Command" -// var/const/boss_short = "CentCom" -// var/const/company_name = "NanoTrasen" -// var/const/company_short = "NT" -// var/const/star_name = "Vir" -// var/const/starsys_name = "Vir" -var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 300) //VOREStation Edit -var/round_progressing = 1 - -var/master_mode = "extended" // "extended" -var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode. - -var/host = null //only here until check @ code\modules\ghosttrap\trap.dm:112 is fixed - -var/list/jobMax = list() -var/list/bombers = list() -var/list/admin_log = list() -var/list/lastsignalers = list() // Keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]" -var/list/lawchanges = list() // Stores who uploaded laws to which silicon-based lifeform, and what the law was. -var/list/reg_dna = list() - -var/mouse_respawn_time = 2.5 // Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes. Vorestation Edit - Changed to 2.5 minutes, half of 5, in accordance with mouse nerfs and realignment. - -var/list/monkeystart = list() -var/list/wizardstart = list() -var/list/newplayer_start = list() - -//Spawnpoints. -var/list/latejoin = list() -var/list/latejoin_gateway = list() -var/list/latejoin_elevator = list() -var/list/latejoin_cryo = list() -var/list/latejoin_cyborg = list() - -var/list/prisonwarp = list() // Prisoners go to these -var/list/holdingfacility = list() // Captured people go here -var/list/xeno_spawn = list() // Aliens spawn at at these. -var/list/tdome1 = list() -var/list/tdome2 = list() -var/list/tdomeobserve = list() -var/list/tdomeadmin = list() -var/list/prisonsecuritywarp = list() // Prison security goes to these. -var/list/prisonwarped = list() // List of players already warped. -var/list/blobstart = list() -var/list/ninjastart = list() - -var/list/cardinal = list(NORTH, SOUTH, EAST, WEST) -var/list/cardinalz = list(NORTH, SOUTH, EAST, WEST, UP, DOWN) -var/list/cornerdirs = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) -var/list/cornerdirsz = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST, NORTH|UP, EAST|UP, WEST|UP, SOUTH|UP, NORTH|DOWN, EAST|DOWN, WEST|DOWN, SOUTH|DOWN) -var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) -var/list/reverse_dir = list( // reverse_dir[dir] = reverse of dir - 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, - 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, - 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63 -) -var/global/const/SQRT_TWO = 1.41421356237 - -var/list/combatlog = list() -var/list/IClog = list() -var/list/OOClog = list() -var/list/adminlog = list() - -var/Debug2 = 0 -var/datum/debug/debugobj - -var/datum/moduletypes/mods = new() - -var/gravity_is_on = 1 - -var/join_motd = null - -var/datum/metric/metric = new() // Metric datum, used to keep track of the round. - -var/list/awaydestinations = list() // Away missions. A list of landmarks that the warpgate can take you to. - -// Forum MySQL configuration. (for use with forum account/key authentication) -// These are all default values that will load should the forumdbconfig.txt file fail to read for whatever reason. -var/forumsqladdress = "localhost" -var/forumsqlport = "3306" -var/forumsqldb = "tgstation" -var/forumsqllogin = "root" -var/forumsqlpass = "" -var/forum_activated_group = "2" -var/forum_authenticated_group = "10" - -// For FTP requests. (i.e. downloading runtime logs.) -// However it'd be ok to use for accessing attack logs and such too, which are even laggier. -var/fileaccess_timer = 0 -var/custom_event_msg = null - -// Added for Xenoarchaeology, might be useful for other stuff. -var/global/list/alphabet_uppercase = list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z") - - -// Used by robots and robot preferences for regular modules. -var/list/robot_module_types = list( - "Standard", "Engineering", /*"Surgeon",*/ "Crisis", "Miner", - "Janitor", "Service", "Clown", "Clerical", "Security", - "Research", "Command" //"Exploration" -) -// List of modules added during code red -var/list/emergency_module_types = list( - "Combat" -) -// List of modules available to AI shells -var/list/shell_module_types = list( - "Standard", "Engineering", "Surgeon", "Crisis", "Miner", - "Janitor", "Service", "Clown", "Clerical", "Security", - "Research", "Command" //"Exploration" -) -// List of whitelisted modules -var/list/whitelisted_module_types = list( - "Lost" -) - -// Some scary sounds. -var/static/list/scarySounds = list( - 'sound/weapons/thudswoosh.ogg', - 'sound/weapons/Taser.ogg', - 'sound/weapons/armbomb.ogg', - 'sound/voice/hiss1.ogg', - 'sound/voice/hiss2.ogg', - 'sound/voice/hiss3.ogg', - 'sound/voice/hiss4.ogg', - 'sound/voice/hiss5.ogg', - 'sound/voice/hiss6.ogg', - 'sound/effects/Glassbr1.ogg', - 'sound/effects/Glassbr2.ogg', - 'sound/effects/Glassbr3.ogg', - 'sound/items/Welder.ogg', - 'sound/items/Welder2.ogg', - 'sound/machines/door/old_airlock.ogg', - 'sound/effects/clownstep1.ogg', - 'sound/effects/clownstep2.ogg', - 'sound/voice/teppi/roar.ogg', - 'sound/voice/moth/scream_moth.ogg', - 'sound/voice/nya.ogg', - 'sound/voice/succlet_shriek.ogg' -) - -// Bomb cap! -var/max_explosion_range = 14 - -// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. -var/global/obj/item/radio/intercom/omni/global_announcer = new /obj/item/radio/intercom/omni(null) - -var/list/station_departments = list("Command", "Medical", "Engineering", "Research", "Security", "Cargo", "Exploration", "Civilian") //VOREStation Edit - -//Icons for in-game HUD glasses. Why don't we just share these a little bit? -var/static/icon/ingame_hud = icon('icons/mob/hud.dmi') -var/static/icon/ingame_hud_med = icon('icons/mob/hud_med.dmi') -var/static/icon/buildmode_hud = icon('icons/misc/buildmode.dmi') - -//Keyed list for caching icons so you don't need to make them for records, IDs, etc all separately. -//Could be useful for AI impersonation or something at some point? -var/static/list/cached_character_icons = list() diff --git a/code/global_init.dm b/code/global_init.dm index 3d4f9d3e00..1cb0610f81 100644 --- a/code/global_init.dm +++ b/code/global_init.dm @@ -16,12 +16,12 @@ var/global/datum/global_init/init = new () /datum/global_init/New() /* VOREStation Removal - Ours is even earlier, in world/New() //logs - log_path += time2text(world.realtime, "YYYY/MM-Month/DD-Day/round-hh-mm-ss") - diary = file("[log_path].log") - href_logfile = file("[log_path]-hrefs.htm") - error_log = file("[log_path]-error.log") - debug_log = file("[log_path]-debug.log") - debug_log << "[log_end]\n[log_end]\nStarting up. [time_stamp()][log_end]\n---------------------[log_end]" + GLOB.log_directory += time2text(world.realtime, "YYYY/MM-Month/DD-Day/round-hh-mm-ss") + diary = file("[GLOB.log_directory].log") + GLOB.href_logfile = file("[GLOB.log_directory]-hrefs.htm") + GLOB.error_log = file("[GLOB.log_directory]-error.log") + GLOB.debug_log = file("[GLOB.log_directory]-debug.log") + GLOB.debug_log << "[log_end]\n[log_end]\nStarting up. [time_stamp()][log_end]\n---------------------[log_end]" */ //VOREStation Removal End decls_repository = new() diff --git a/code/global_vr.dm b/code/global_vr.dm deleted file mode 100644 index 78ed7e756e..0000000000 --- a/code/global_vr.dm +++ /dev/null @@ -1,21 +0,0 @@ -var/list/vinestart = list() -var/list/verminstart = list() - -var/list/awayabductors = list() // List of scatter landmarks for Abductors in Gateways -var/list/eventdestinations = list() // List of scatter landmarks for VOREStation event portals -var/list/eventabductors = list() // List of scatter landmarks for VOREStation abductor portals - -// Some "scary" sounds. -var/static/list/scawwySownds = list( - 'sound/voice/ScawwySownds/a scawey sownd.ogg', - 'sound/voice/ScawwySownds/is that you.ogg', - 'sound/voice/ScawwySownds/lookit this darkness wow.ogg', - 'sound/voice/ScawwySownds/maint preds.ogg', - 'sound/voice/ScawwySownds/spooky sounds.ogg', - 'sound/voice/ScawwySownds/sus.ogg', - 'sound/voice/ScawwySownds/this is scaewy.ogg', - 'sound/voice/ScawwySownds/what is that behind you.ogg', - 'sound/voice/ScawwySownds/what you doin over dere.ogg', - 'sound/voice/ScawwySownds/whats up with all the trash.ogg', - 'sound/voice/ScawwySownds/youre afraid of the dark arent you.ogg' - ) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index df87b32d40..57e0d4ccfb 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -571,7 +571,7 @@ GLOBAL_VAR_INIT(floorIsLava, 0)
"} + span_bold("Game Panel") + {"

\n Change Game Mode
"} - if(master_mode == "secret") + if(GLOB.master_mode == "secret") dat += "(Force Secret Mode)
" dat += {" @@ -682,7 +682,7 @@ var/datum/announcement/minor/admin_min_announcer = new msgverb = sanitize(msgverb, 50, extra = 0) else msgverb = "states" - global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. + GLOB.global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. //VOREStation Edit End log_admin("Intercom: [key_name(usr)] : [sender]:[message]") @@ -772,7 +772,7 @@ var/datum/announcement/minor/admin_min_announcer = new var/this_sender = decomposed[i] var/this_message = decomposed[++i] var/this_wait = decomposed[++i] - global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. //VOREStation Edit + GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. //VOREStation Edit sleep(this_wait SECONDS) /datum/admins/proc/toggleooc() @@ -977,8 +977,8 @@ var/datum/announcement/minor/admin_min_announcer = new log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].") message_admins(span_blue("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"]."), 1) return - round_progressing = !round_progressing - if (!round_progressing) + GLOB.round_progressing = !GLOB.round_progressing + if (!GLOB.round_progressing) to_world(span_world("The game start has been delayed.")) log_admin("[key_name(usr)] delayed the game.") else @@ -1033,7 +1033,7 @@ var/datum/announcement/minor/admin_min_announcer = new set name = "Unprison" if (M.z == 2) if (CONFIG_GET(flag/allow_admin_jump)) - M.loc = get_turf(pick(latejoin)) + M.loc = get_turf(pick(GLOB.latejoin)) message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1) log_admin("[key_name(usr)] has unprisoned [key_name(M)]") else diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 542fd98c31..a1dd87e65d 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -40,8 +40,8 @@ if("hrefs") //persistant logs and stuff if(config && CONFIG_GET(flag/log_hrefs)) - if(href_logfile) - src << browse("[href_logfile]","window=investigate[subject];size=800x300") + if(GLOB.href_logfile) + src << browse("[GLOB.href_logfile]","window=investigate[subject];size=800x300") else to_chat(src, span_filter_adminlog(span_warning("Error: admin_investigate: No href logfile found."))) return diff --git a/code/modules/admin/admin_verb_lists.dm b/code/modules/admin/admin_verb_lists.dm index 8912190461..e839498111 100644 --- a/code/modules/admin/admin_verb_lists.dm +++ b/code/modules/admin/admin_verb_lists.dm @@ -32,7 +32,7 @@ var/list/admin_verbs_admin = list( /client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc, /client/proc/admin_ghost, //allows us to ghost/reenter body at will, /client/proc/toggle_view_range, //changes how far we can see, - /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, + /datum/admins/proc/view_txt_log, //shows the server log (GLOB.diary) for today, /datum/admins/proc/view_atk_log, //shows the server combat-log, doesn't do anything presently, /client/proc/cmd_admin_pm_context, //right-click adminPM interface, /client/proc/cmd_admin_pm_panel, //admin-pm list, @@ -43,7 +43,7 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_check_dialogue_logs, //checks a player's dialogue logs, /datum/admins/proc/access_news_network, //allows access of newscasters, /client/proc/giveruntimelog, //allows us to give access to runtime logs to somebody, - /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /client/proc/getserverlog, //allows us to fetch server logs (GLOB.diary) for other days, /client/proc/jumptocoord, //we ghost and jump to a coordinate, /client/proc/Getmob, //teleports a mob to our location, /client/proc/Getkey, //teleports a mob with a certain ckey to our location, @@ -368,9 +368,9 @@ var/list/admin_verbs_mod = list( /client/proc/cmd_admin_direct_narrate, /client/proc/allow_character_respawn, // Allows a ghost to respawn , /datum/admins/proc/sendFax, - /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /client/proc/getserverlog, //allows us to fetch server logs (GLOB.diary) for other days, /datum/admins/proc/view_persistent_data, - /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, + /datum/admins/proc/view_txt_log, //shows the server log (GLOB.diary) for today, /datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently, ) diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index 51a93b1248..f37ad04bdf 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -413,7 +413,7 @@ var/list/admin_verbs_mod = list( /client/proc/cmd_admin_z_narrate, //VOREStation Add, /client/proc/allow_character_respawn, // Allows a ghost to respawn , /datum/admins/proc/sendFax, - /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /client/proc/getserverlog, //allows us to fetch server logs (GLOB.diary) for other days, /datum/admins/proc/view_persistent_data, /client/proc/start_vote ) diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index db66c7dd7b..38199c4c5a 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -94,7 +94,7 @@ var/turf/Ts //Turf for shadekin //Try to find nondense turf - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(target,direction) if(T && !T.density) Ts = T //Found shadekin spawn turf diff --git a/code/modules/admin/secrets/admin_secrets/admin_logs.dm b/code/modules/admin/secrets/admin_secrets/admin_logs.dm index d6bf54a03b..bcd06df96f 100644 --- a/code/modules/admin/secrets/admin_secrets/admin_logs.dm +++ b/code/modules/admin/secrets/admin_secrets/admin_logs.dm @@ -6,9 +6,9 @@ if(!.) return var/dat = span_bold("Admin Log
") - for(var/l in admin_log) + for(var/l in GLOB.admin_log) dat += "
  • [l]
  • " - if(!admin_log.len) + if(!GLOB.admin_log.len) dat += "No-one has done anything this round!" var/datum/browser/popup = new(user, "adminlogs", "[src]", 550, 650, src) diff --git a/code/modules/admin/secrets/admin_secrets/bombing_list.dm b/code/modules/admin/secrets/admin_secrets/bombing_list.dm index 5923b9002c..1fb1fac677 100644 --- a/code/modules/admin/secrets/admin_secrets/bombing_list.dm +++ b/code/modules/admin/secrets/admin_secrets/bombing_list.dm @@ -7,6 +7,6 @@ return var/dat = span_bold("Bombing List") - for(var/l in bombers) + for(var/l in GLOB.bombers) dat += text("[l]
    ") user << browse("[dat]", "window=bombers") diff --git a/code/modules/admin/secrets/admin_secrets/prison_warp.dm b/code/modules/admin/secrets/admin_secrets/prison_warp.dm index a4cd00c9b2..233f852e93 100644 --- a/code/modules/admin/secrets/admin_secrets/prison_warp.dm +++ b/code/modules/admin/secrets/admin_secrets/prison_warp.dm @@ -12,7 +12,7 @@ for(var/mob/living/carbon/human/H in mob_list) var/turf/T = get_turf(H) var/security = 0 - if((T in using_map.admin_levels) || prisonwarped.Find(H)) + if((T in using_map.admin_levels) || GLOB.prisonwarped.Find(H)) //don't warp them if they aren't ready or are already there continue H.Paralyse(5) @@ -29,10 +29,10 @@ //don't strip organs H.drop_from_inventory(W) //teleport person to cell - H.loc = pick(prisonwarp) + H.loc = pick(GLOB.prisonwarp) H.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes) else //teleport security person - H.loc = pick(prisonsecuritywarp) - prisonwarped += H + H.loc = pick(GLOB.prisonsecuritywarp) + GLOB.prisonwarped += H diff --git a/code/modules/admin/secrets/admin_secrets/show_crew_manifest.dm b/code/modules/admin/secrets/admin_secrets/show_crew_manifest.dm index 494fee588b..9e35bc40e3 100644 --- a/code/modules/admin/secrets/admin_secrets/show_crew_manifest.dm +++ b/code/modules/admin/secrets/admin_secrets/show_crew_manifest.dm @@ -7,6 +7,6 @@ return var/dat dat += "

    Crew Manifest

    " - dat += data_core.get_manifest() + dat += GLOB.data_core.get_manifest() user << browse("[dat]", "window=manifest;size=370x420;can_close=1") diff --git a/code/modules/admin/secrets/admin_secrets/show_law_changes.dm b/code/modules/admin/secrets/admin_secrets/show_law_changes.dm index 699ff3fda7..27c6330f07 100644 --- a/code/modules/admin/secrets/admin_secrets/show_law_changes.dm +++ b/code/modules/admin/secrets/admin_secrets/show_law_changes.dm @@ -2,14 +2,14 @@ name = "Show law changes" /datum/admin_secret_item/admin_secret/show_law_changes/name() - return "Show Last [length(lawchanges)] Law change\s" + return "Show Last [length(GLOB.lawchanges)] Law change\s" /datum/admin_secret_item/admin_secret/show_law_changes/execute(var/mob/user) . = ..() if(!.) return - var/dat = span_bold("Showing last [length(lawchanges)] law changes.") + "
    " - for(var/sig in lawchanges) + var/dat = span_bold("Showing last [length(GLOB.lawchanges)] law changes.") + "
    " + for(var/sig in GLOB.lawchanges) dat += "[sig]
    " - user << browse("[dat]", "window=lawchanges;size=800x500") + user << browse("[dat]", "window=GLOB.lawchanges;size=800x500") diff --git a/code/modules/admin/secrets/admin_secrets/show_signalers.dm b/code/modules/admin/secrets/admin_secrets/show_signalers.dm index 8456c0ed13..b96200996a 100644 --- a/code/modules/admin/secrets/admin_secrets/show_signalers.dm +++ b/code/modules/admin/secrets/admin_secrets/show_signalers.dm @@ -2,14 +2,14 @@ name = "Show Last Signalers" /datum/admin_secret_item/admin_secret/show_signalers/name() - return "Show Last [length(lastsignalers)] Signaler\s" + return "Show Last [length(GLOB.lastsignalers)] Signaler\s" /datum/admin_secret_item/admin_secret/show_signalers/execute(var/mob/user) . = ..() if(!.) return - var/dat = span_bold("Showing last [length(lastsignalers)] signalers.") + "
    " - for(var/sig in lastsignalers) + var/dat = span_bold("Showing last [length(GLOB.lastsignalers)] signalers.") + "
    " + for(var/sig in GLOB.lastsignalers) dat += "[sig]
    " user << browse("[dat]", "window=lastsignalers;size=800x500") diff --git a/code/modules/admin/secrets/fun_secrets/fix_all_lights.dm b/code/modules/admin/secrets/fun_secrets/fix_all_lights.dm index e0525a72b3..67fe250d27 100644 --- a/code/modules/admin/secrets/fun_secrets/fix_all_lights.dm +++ b/code/modules/admin/secrets/fun_secrets/fix_all_lights.dm @@ -6,5 +6,5 @@ if(!.) return - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) L.fix() diff --git a/code/modules/admin/secrets/fun_secrets/toggle_bomb_cap.dm b/code/modules/admin/secrets/fun_secrets/toggle_bomb_cap.dm index 37c08199d7..3511669707 100644 --- a/code/modules/admin/secrets/fun_secrets/toggle_bomb_cap.dm +++ b/code/modules/admin/secrets/fun_secrets/toggle_bomb_cap.dm @@ -7,15 +7,15 @@ if(!.) return - switch(max_explosion_range) - if(14) max_explosion_range = 16 - if(16) max_explosion_range = 20 - if(20) max_explosion_range = 28 - if(28) max_explosion_range = 56 - if(56) max_explosion_range = 128 - if(128) max_explosion_range = 14 - var/range_dev = max_explosion_range *0.25 - var/range_high = max_explosion_range *0.5 - var/range_low = max_explosion_range + switch(GLOB.max_explosion_range) + if(14) GLOB.max_explosion_range = 16 + if(16) GLOB.max_explosion_range = 20 + if(20) GLOB.max_explosion_range = 28 + if(28) GLOB.max_explosion_range = 56 + if(56) GLOB.max_explosion_range = 128 + if(128) GLOB.max_explosion_range = 14 + var/range_dev = GLOB.max_explosion_range *0.25 + var/range_high = GLOB.max_explosion_range *0.5 + var/range_low = GLOB.max_explosion_range message_admins(span_danger("[key_name_admin(user)] changed the bomb cap to [range_dev], [range_high], [range_low]"), 1) - log_admin("[key_name_admin(user)] changed the bomb cap to [max_explosion_range]") + log_admin("[key_name_admin(user)] changed the bomb cap to [GLOB.max_explosion_range]") diff --git a/code/modules/admin/secrets/random_events/gravity.dm b/code/modules/admin/secrets/random_events/gravity.dm index 4af765fd10..428402ca96 100644 --- a/code/modules/admin/secrets/random_events/gravity.dm +++ b/code/modules/admin/secrets/random_events/gravity.dm @@ -15,13 +15,13 @@ if(!.) return - gravity_is_on = !gravity_is_on + GLOB.gravity_is_on = !GLOB.gravity_is_on for(var/area/A in world) - A.gravitychange(gravity_is_on) + A.gravitychange(GLOB.gravity_is_on) feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","Grav") - if(gravity_is_on) + if(GLOB.gravity_is_on) log_admin("[key_name(user)] toggled gravity on.", 1) message_admins(span_notice("[key_name_admin(user)] toggled gravity on."), 1) command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") diff --git a/code/modules/admin/secrets/random_events/gravity_vr.dm b/code/modules/admin/secrets/random_events/gravity_vr.dm index c8f0dafb6b..de6e6172bc 100644 --- a/code/modules/admin/secrets/random_events/gravity_vr.dm +++ b/code/modules/admin/secrets/random_events/gravity_vr.dm @@ -15,16 +15,16 @@ if(!.) return - gravity_is_on = !gravity_is_on - for(var/obj/machinery/gravity_generator/main/GG in machines) + GLOB.gravity_is_on = !GLOB.gravity_is_on + for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines) if(GG.z in using_map.station_levels) - GG.breaker = gravity_is_on + GG.breaker = GLOB.gravity_is_on GG.set_power() - GG.charge_count = gravity_is_on ? 90 : 10 + GG.charge_count = GLOB.gravity_is_on ? 90 : 10 feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","Grav") - if(gravity_is_on) + if(GLOB.gravity_is_on) log_admin("[key_name(user)] toggled gravity on.", 1) message_admins(span_notice("[key_name_admin(user)] toggled gravity on."), 1) command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a5416c2d4c..4b33f90d99 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -924,7 +924,7 @@ dat += {"[config.mode_names[mode]]
    "} dat += {"Secret
    "} dat += {"Random
    "} - dat += {"Now: [master_mode]"} + dat += {"Now: [GLOB.master_mode]"} usr << browse("[dat]", "window=c_mode") else if(href_list["f_secret"]) @@ -932,13 +932,13 @@ if(ticker && ticker.mode) return tgui_alert_async(usr, "The game has already started.") - if(master_mode != "secret") + if(GLOB.master_mode != "secret") return tgui_alert_async(usr, "The game mode has to be secret!") var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
    "} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
    "} dat += {"Random (default)
    "} - dat += {"Now: [secret_force_mode]"} + dat += {"Now: [GLOB.secret_force_mode]"} usr << browse("[dat]", "window=f_secret") else if(href_list["c_mode2"]) @@ -946,12 +946,12 @@ if (ticker && ticker.mode) return tgui_alert_async(usr, "The game has already started.") - master_mode = href_list["c_mode2"] - log_admin("[key_name(usr)] set the mode as [config.mode_names[master_mode]].") - message_admins(span_blue("[key_name_admin(usr)] set the mode as [config.mode_names[master_mode]]."), 1) - to_world(span_world(span_blue("The mode is now: [config.mode_names[master_mode]]"))) + GLOB.master_mode = href_list["c_mode2"] + log_admin("[key_name(usr)] set the mode as [config.mode_names[GLOB.master_mode]].") + message_admins(span_blue("[key_name_admin(usr)] set the mode as [config.mode_names[GLOB.master_mode]]."), 1) + to_world(span_world(span_blue("The mode is now: [config.mode_names[GLOB.master_mode]]"))) Game() // updates the main game menu - world.save_mode(master_mode) + world.save_mode(GLOB.master_mode) .(href, list("c_mode"=1)) else if(href_list["f_secret2"]) @@ -959,11 +959,11 @@ if(ticker && ticker.mode) return tgui_alert_async(usr, "The game has already started.") - if(master_mode != "secret") + if(GLOB.master_mode != "secret") return tgui_alert_async(usr, "The game mode has to be secret!") - secret_force_mode = href_list["f_secret2"] - log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].") - message_admins(span_blue("[key_name_admin(usr)] set the forced secret mode as [secret_force_mode]."), 1) + GLOB.secret_force_mode = href_list["f_secret2"] + log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].") + message_admins(span_blue("[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode]."), 1) Game() // updates the main game menu .(href, list("f_secret"=1)) @@ -1019,7 +1019,7 @@ to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/living/silicon/ai")) return - var/turf/prison_cell = pick(prisonwarp) + var/turf/prison_cell = pick(GLOB.prisonwarp) if(!prison_cell) return var/obj/structure/closet/secure_closet/brig/locker = new /obj/structure/closet/secure_closet/brig(prison_cell) @@ -1087,7 +1087,7 @@ M.Paralyse(5) sleep(5) - M.loc = pick(tdome1) + M.loc = pick(GLOB.tdome1) spawn(50) to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome."))) log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)") @@ -1112,7 +1112,7 @@ M.Paralyse(5) sleep(5) - M.loc = pick(tdome2) + M.loc = pick(GLOB.tdome2) spawn(50) to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome."))) log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)") @@ -1134,7 +1134,7 @@ M.Paralyse(5) sleep(5) - M.loc = pick(tdomeadmin) + M.loc = pick(GLOB.tdomeadmin) spawn(50) to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome."))) log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)") @@ -1163,7 +1163,7 @@ observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(observer), slot_shoes) M.Paralyse(5) sleep(5) - M.loc = pick(tdomeobserve) + M.loc = pick(GLOB.tdomeobserve) spawn(50) to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome."))) log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)") diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index d00ca4ce3f..e73e6abef9 100644 --- a/code/modules/admin/verbs/atmosdebug.dm +++ b/code/modules/admin/verbs/atmosdebug.dm @@ -12,24 +12,24 @@ to_chat(usr, "Checking for disconnected pipes...") //all plumbing - yes, some things might get stated twice, doesn't matter. - for (var/obj/machinery/atmospherics/plumbing in machines) + for (var/obj/machinery/atmospherics/plumbing in GLOB.machines) if (plumbing.nodealert) to_chat(usr, span_filter_adminlog(span_warning("Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])"))) //Manifolds - for (var/obj/machinery/atmospherics/pipe/manifold/pipe in machines) + for (var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines) if (!pipe.node1 || !pipe.node2 || !pipe.node3) to_chat(usr, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"))) //Pipes - for (var/obj/machinery/atmospherics/pipe/simple/pipe in machines) + for (var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines) if (!pipe.node1 || !pipe.node2) to_chat(usr, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"))) to_chat(usr, "Checking for overlapping pipes...") next_turf: for(var/turf/T in world) - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0) for(var/obj/machinery/atmospherics/pipe in T) if(dir & pipe.initialize_directions) diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 9f7a32b309..fdf9b15739 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -607,7 +607,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) AI.give_target(A) i++ to_chat(user, span_notice("Commanded [i] mob\s to attack \the [A].")) - var/image/orderimage = image(buildmode_hud,A,"ai_targetorder") + var/image/orderimage = image(GLOB.buildmode_hud,A,"ai_targetorder") orderimage.plane = PLANE_BUILDMODE flick_overlay(orderimage, list(user.client), 8, TRUE) return @@ -634,7 +634,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) if(j) message += "[j] mob\s to follow \the [L]." to_chat(user, span_notice(message)) - var/image/orderimage = image(buildmode_hud,L,"ai_targetorder") + var/image/orderimage = image(GLOB.buildmode_hud,L,"ai_targetorder") orderimage.plane = PLANE_BUILDMODE flick_overlay(orderimage, list(user.client), 8, TRUE) return @@ -653,7 +653,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) AI.give_destination(T, 1, pa.Find("shift")) // If shift is held, the mobs will not stop moving to attack a visible enemy. told++ to_chat(user, span_notice("Commanded [told] mob\s to move to \the [T], and manually placed [forced] of them.")) - var/image/orderimage = image(buildmode_hud,T,"ai_turforder") + var/image/orderimage = image(GLOB.buildmode_hud,T,"ai_turforder") orderimage.plane = PLANE_BUILDMODE flick_overlay(orderimage, list(user.client), 8, TRUE) return @@ -830,7 +830,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) while(pending.len) var/turf/T = pending[1] pending -= T - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) var/turf/NT = get_step(T,dir) if (!isturf(NT) || (NT in found) || (NT in pending)) continue diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm index dc699dfa57..fe341f7932 100644 --- a/code/modules/admin/verbs/custom_event.dm +++ b/code/modules/admin/verbs/custom_event.dm @@ -7,9 +7,9 @@ to_chat(src, "Only administrators may use this command.") return - var/input = sanitize(tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE), MAX_PAPER_MESSAGE_LEN, extra = 0) + var/input = sanitize(tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE), MAX_PAPER_MESSAGE_LEN, extra = 0) if(!input || input == "") - custom_event_msg = null + GLOB.custom_event_msg = null log_admin("[usr.key] has cleared the custom event text.") message_admins("[key_name_admin(usr)] has cleared the custom event text.") return @@ -17,17 +17,17 @@ log_admin("[usr.key] has changed the custom event text.") message_admins("[key_name_admin(usr)] has changed the custom event text.") - custom_event_msg = input + GLOB.custom_event_msg = input to_world(span_filter_system("

    [span_alert("Custom Event")]

    ")) to_world(span_filter_system("

    [span_alert("A custom event is starting. OOC Info:")]

    ")) - to_world(span_filter_system(span_alert("[custom_event_msg]"))) + to_world(span_filter_system(span_alert("[GLOB.custom_event_msg]"))) to_world(span_filter_system("
    ")) SSwebhooks.send( WEBHOOK_CUSTOM_EVENT, list( - "text" = custom_event_msg, + "text" = GLOB.custom_event_msg, ) ) @@ -36,11 +36,11 @@ set category = "OOC.Game" set name = "Custom Event Info" - if(!custom_event_msg || custom_event_msg == "") + if(!GLOB.custom_event_msg || GLOB.custom_event_msg == "") to_chat(src, span_filter_notice("There currently is no known custom event taking place.")) to_chat(src, span_filter_notice("Keep in mind: it is possible that an admin has not properly set this.")) return to_chat(src, "

    [span_filter_notice(span_alert("Custom Event"))]

    ") to_chat(src, "

    [span_filter_notice(span_alert("A custom event is taking place. OOC Info:"))]

    ") - to_chat(src, span_filter_notice(span_alert("[custom_event_msg]
    "))) + to_chat(src, span_filter_notice(span_alert("[GLOB.custom_event_msg]
    "))) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 77b933d70d..e609842f45 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -3,12 +3,12 @@ set name = "Debug-Game" if(!check_rights(R_DEBUG)) return - if(Debug2) - Debug2 = 0 + if(GLOB.Debug2) + GLOB.Debug2 = FALSE message_admins("[key_name(src)] toggled debugging off.") log_admin("[key_name(src)] toggled debugging off.") else - Debug2 = 1 + GLOB.Debug2 = TRUE message_admins("[key_name(src)] toggled debugging on.") log_admin("[key_name(src)] toggled debugging on.") @@ -356,32 +356,32 @@ if(A && !(A.type in areas_with_APC)) areas_with_APC.Add(A.type) - for(var/obj/machinery/alarm/alarm in machines) + for(var/obj/machinery/alarm/alarm in GLOB.machines) var/area/A = get_area(alarm) if(A && !(A.type in areas_with_air_alarm)) areas_with_air_alarm.Add(A.type) - for(var/obj/machinery/requests_console/RC in machines) + for(var/obj/machinery/requests_console/RC in GLOB.machines) var/area/A = get_area(RC) if(A && !(A.type in areas_with_RC)) areas_with_RC.Add(A.type) - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) var/area/A = get_area(L) if(A && !(A.type in areas_with_light)) areas_with_light.Add(A.type) - for(var/obj/machinery/light_switch/LS in machines) + for(var/obj/machinery/light_switch/LS in GLOB.machines) var/area/A = get_area(LS) if(A && !(A.type in areas_with_LS)) areas_with_LS.Add(A.type) - for(var/obj/item/radio/intercom/I in machines) + for(var/obj/item/radio/intercom/I in GLOB.machines) var/area/A = get_area(I) if(A && !(A.type in areas_with_intercom)) areas_with_intercom.Add(A.type) - for(var/obj/machinery/camera/C in machines) + for(var/obj/machinery/camera/C in GLOB.machines) var/area/A = get_area(C) if(A && !(A.type in areas_with_camera)) areas_with_camera.Add(A.type) @@ -462,31 +462,31 @@ if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity",list("Yes","No")) != "Yes") return - for(var/obj/machinery/power/emitter/E in machines) + for(var/obj/machinery/power/emitter/E in GLOB.machines) if(istype(get_area(E), /area/space)) E.anchored = TRUE E.state = 2 E.connect_to_network() E.active = TRUE - for(var/obj/machinery/field_generator/F in machines) + for(var/obj/machinery/field_generator/F in GLOB.machines) if(istype(get_area(F), /area/space)) F.Varedit_start = 1 - for(var/obj/machinery/power/grounding_rod/GR in machines) + for(var/obj/machinery/power/grounding_rod/GR in GLOB.machines) GR.anchored = TRUE GR.update_icon() - for(var/obj/machinery/power/tesla_coil/TC in machines) + for(var/obj/machinery/power/tesla_coil/TC in GLOB.machines) TC.anchored = TRUE TC.update_icon() - for(var/obj/structure/particle_accelerator/PA in machines) + for(var/obj/structure/particle_accelerator/PA in GLOB.machines) PA.anchored = TRUE PA.construction_state = 3 PA.update_icon() - for(var/obj/machinery/particle_accelerator/PA in machines) + for(var/obj/machinery/particle_accelerator/PA in GLOB.machines) PA.anchored = TRUE PA.construction_state = 3 PA.update_icon() - for(var/obj/machinery/power/rad_collector/Rad in machines) + for(var/obj/machinery/power/rad_collector/Rad in GLOB.machines) if(Rad.anchored) if(!Rad.P) var/obj/item/tank/phoron/Phoron = new/obj/item/tank/phoron(Rad) @@ -513,7 +513,7 @@ var/found_the_pump = 0 var/obj/machinery/power/supermatter/SM - for(var/obj/machinery/M in machines) + for(var/obj/machinery/M in GLOB.machines) if(!M) continue if(!M.loc) diff --git a/code/modules/admin/verbs/grief_fixers.dm b/code/modules/admin/verbs/grief_fixers.dm index 1aa8f349f1..e737057481 100644 --- a/code/modules/admin/verbs/grief_fixers.dm +++ b/code/modules/admin/verbs/grief_fixers.dm @@ -15,7 +15,7 @@ var/current_time = world.timeofday // Depower the supermatter, as it would quickly blow up once we remove all gases from the pipes. - for(var/obj/machinery/power/supermatter/S in machines) + for(var/obj/machinery/power/supermatter/S in GLOB.machines) S.power = 0 to_chat(usr, "\[1/5\] - Supermatter depowered") diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 747684e39f..f0a4f82493 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -118,7 +118,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging) qdel(M) if(intercom_range_display_status) - for(var/obj/item/radio/intercom/I in machines) + for(var/obj/item/radio/intercom/I in GLOB.machines) for(var/turf/T in orange(7,I)) var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T) if (!(F in view(7,I.loc))) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 04ee179edc..a90d50b504 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -33,7 +33,7 @@ //teleport person to cell M.Paralyse(5) sleep(5) //so they black out before warping - M.loc = pick(prisonwarp) + M.loc = pick(GLOB.prisonwarp) if(ishuman(M)) var/mob/living/carbon/human/prisoner = M prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform) @@ -485,10 +485,10 @@ Traitors and the like can also be revived with the previous role mostly intact. return if("Arrivals") //Spawn them at a latejoin spawnpoint - if(LAZYLEN(latejoin)) - spawnloc = get_turf(pick(latejoin)) - else if(LAZYLEN(latejoin_tram)) - spawnloc = pick(latejoin_tram) + if(LAZYLEN(GLOB.latejoin)) + spawnloc = get_turf(pick(GLOB.latejoin)) + else if(LAZYLEN(GLOB.latejoin_tram)) + spawnloc = pick(GLOB.latejoin_tram) else to_chat(src, "This map has no latejoin spawnpoint.") return @@ -553,7 +553,7 @@ Traitors and the like can also be revived with the previous role mostly intact. //If desired, add records. if(records) - data_core.manifest_inject(new_character) + GLOB.data_core.manifest_inject(new_character) //A redraw for good measure new_character.regenerate_icons() @@ -1063,7 +1063,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/list/human_cryopods = list() var/list/robot_cryopods = list() - for(var/obj/machinery/cryopod/CP in machines) + for(var/obj/machinery/cryopod/CP in GLOB.machines) if(!CP.control_computer) continue //Broken pod w/o computer, move on. @@ -1090,7 +1090,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(isAI(M)) var/mob/living/silicon/ai/ai = M GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(ai.loc) - global_announcer.autosay("[ai] has been moved to intelligence storage.", "Artificial Intelligence Oversight") + GLOB.global_announcer.autosay("[ai] has been moved to intelligence storage.", "Artificial Intelligence Oversight") ai.clear_client() return else diff --git a/code/modules/admin/verbs/smite.dm b/code/modules/admin/verbs/smite.dm index 0685b5e1ea..a53e9ada85 100644 --- a/code/modules/admin/verbs/smite.dm +++ b/code/modules/admin/verbs/smite.dm @@ -52,7 +52,7 @@ var/turf/Ts //Turf for shadekin //Try to find nondense turf - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(target,direction) if(T && !T.density) Ts = T //Found shadekin spawn turf diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm index 43782c1202..f494f103ed 100644 --- a/code/modules/admin/view_variables/mass_edit_variables.dm +++ b/code/modules/admin/view_variables/mass_edit_variables.dm @@ -219,7 +219,7 @@ CHECK_TICK else if (ispath(T, /obj/machinery)) - for(var/obj/machinery/thing in machines) + for(var/obj/machinery/thing in GLOB.machines) if (typecache[thing.type]) . += thing CHECK_TICK diff --git a/code/modules/admin/view_variables/view_variables_global.dm b/code/modules/admin/view_variables/view_variables_global.dm index 73357baee7..c52281a396 100644 --- a/code/modules/admin/view_variables/view_variables_global.dm +++ b/code/modules/admin/view_variables/view_variables_global.dm @@ -36,11 +36,6 @@ /decl/global_vars/VV_hidden() return list( - "forumsqladdress", - "forumsqldb", - "forumsqllogin", - "forumsqlpass", - "forumsqlport", "sqladdress", "sqldb", "sqllogin", @@ -73,11 +68,11 @@ "admin_ranks", "admin_state", "alien_whitelist", - "alldirs", + "GLOB.alldirs", "ahelp_tickets", "adminfaxes", "adminlogs", - "cardinal", + "GLOB.cardinal", "cardinalz", "IClog" ) diff --git a/code/modules/ai/ai_holder_combat.dm b/code/modules/ai/ai_holder_combat.dm index 26c4d8c007..c3a4a8c547 100644 --- a/code/modules/ai/ai_holder_combat.dm +++ b/code/modules/ai/ai_holder_combat.dm @@ -51,7 +51,7 @@ on_engagement(target) if(firing_lanes && !test_projectile_safety(target)) // Nudge them a bit, maybe they can shoot next time. - var/turf/T = get_step(holder, pick(cardinal)) + var/turf/T = get_step(holder, pick(GLOB.cardinal)) if(T) holder.IMove(T) // IMove() will respect movement cooldown. holder.face_atom(target) @@ -269,7 +269,7 @@ /datum/ai_holder/proc/destroy_surroundings(direction, violent = TRUE) ai_log("destroy_surroundings() : Entering.", AI_LOG_TRACE) if(!direction) - direction = pick(cardinal) // FLAIL WILDLY + direction = pick(GLOB.cardinal) // FLAIL WILDLY ai_log("destroy_surroundings() : No direction given, picked [direction] randomly.", AI_LOG_DEBUG) var/turf/problem_turf = get_step(holder, direction) @@ -288,7 +288,7 @@ ai_log("destroy_surroundings() : Going to try to violently clear [problem_turf].", AI_LOG_DEBUG) // First, kill windows in the way. for(var/obj/structure/window/W in problem_turf) - if(W.dir == reverse_dir[holder.dir]) // So that windows get smashed in the right order + if(W.dir == GLOB.reverse_dir[holder.dir]) // So that windows get smashed in the right order ai_log("destroy_surroundings() : Attacking side window.", AI_LOG_INFO) return melee_attack(W) diff --git a/code/modules/ai/ai_holder_disabled.dm b/code/modules/ai/ai_holder_disabled.dm index cffce1e064..010060ae0b 100644 --- a/code/modules/ai/ai_holder_disabled.dm +++ b/code/modules/ai/ai_holder_disabled.dm @@ -51,7 +51,7 @@ var/unsafe = FALSE tile_test: - for(var/dir_tested in cardinal) + for(var/dir_tested in GLOB.cardinal) var/turf/turf_tested = get_step(holder, dir_tested) // Look for unsafe tiles. if(!turf_tested.is_safe_to_enter(holder)) @@ -70,7 +70,7 @@ return // Just stay still. var/moving_to = 0 - moving_to = pick(cardinal) + moving_to = pick(GLOB.cardinal) var/turf/T = get_step(holder, moving_to) var/mob/living/L = locate() in T @@ -85,7 +85,7 @@ ai_log("dangerous_wander() : Exited.", AI_LOG_DEBUG) /* -// Wanders randomly in cardinal directions. +// Wanders randomly in GLOB.cardinal directions. /datum/ai_holder/proc/handle_wander_movement() ai_log("handle_wander_movement() : Entered.", AI_LOG_DEBUG) if(isturf(holder.loc) && can_act()) @@ -96,7 +96,7 @@ return var/moving_to = 0 // Apparently this is required or it always picks 4, according to the previous developer for simplemob AI. - moving_to = pick(cardinal) + moving_to = pick(GLOB.cardinal) holder.set_dir(moving_to) holder.IMove(get_step(holder,moving_to)) wander_delay = base_wander_delay diff --git a/code/modules/ai/ai_holder_movement.dm b/code/modules/ai/ai_holder_movement.dm index f4841f9dfd..4835838b4f 100644 --- a/code/modules/ai/ai_holder_movement.dm +++ b/code/modules/ai/ai_holder_movement.dm @@ -10,7 +10,7 @@ var/max_home_distance = 3 // How far the mob can go away from its home before being told to go_home(). // Note that there is a 'BYOND cap' of 14 due to limitations of get_/step_to(). // Wandering. - var/wander = FALSE // If true, the mob will randomly move in the four cardinal directions when idle. + var/wander = FALSE // If true, the mob will randomly move in the four GLOB.cardinal directions when idle. var/wander_delay = 0 // How many ticks until the mob can move a tile in handle_wander_movement(). var/base_wander_delay = 2 // What the above var gets set to when it wanders. Note that a tick happens every half a second. var/wander_when_pulled = FALSE // If the mob will refrain from wandering if someone is pulling it. @@ -145,7 +145,7 @@ /datum/ai_holder/proc/should_wander() return (stance == STANCE_IDLE) && wander && !leader -// Wanders randomly in cardinal directions. +// Wanders randomly in GLOB.cardinal directions. /datum/ai_holder/proc/handle_wander_movement() if(!holder) return @@ -158,7 +158,7 @@ return var/moving_to = 0 // Apparently this is required or it always picks 4, according to the previous developer for simplemob AI. - moving_to = pick(cardinal) + moving_to = pick(GLOB.cardinal) holder.set_dir(moving_to) holder.IMove(get_step(holder,moving_to)) wander_delay = base_wander_delay diff --git a/code/modules/ai/ai_holder_subtypes/simple_mob_ai.dm b/code/modules/ai/ai_holder_subtypes/simple_mob_ai.dm index b2d4a89658..ce5f17ae98 100644 --- a/code/modules/ai/ai_holder_subtypes/simple_mob_ai.dm +++ b/code/modules/ai/ai_holder_subtypes/simple_mob_ai.dm @@ -140,7 +140,7 @@ /datum/ai_holder/simple_mob/melee/evasive/post_melee_attack(atom/A) if(holder.Adjacent(A)) - holder.IMove(get_step(holder, pick(alldirs))) + holder.IMove(get_step(holder, pick(GLOB.alldirs))) holder.face_atom(A) @@ -206,12 +206,12 @@ // Juke /datum/ai_holder/simple_mob/humanoid/hostile/post_melee_attack(atom/A) - holder.IMove(get_step(holder, pick(alldirs))) + holder.IMove(get_step(holder, pick(GLOB.alldirs))) holder.face_atom(A) /datum/ai_holder/simple_mob/humanoid/hostile/post_ranged_attack(atom/A) //Pick a random turf to step into - var/turf/T = get_step(holder, pick(alldirs)) + var/turf/T = get_step(holder, pick(GLOB.alldirs)) if((A in check_trajectory(A, T))) // Can we even hit them from there? holder.IMove(T) holder.face_atom(A) diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index e005f4f240..6ae86ac3db 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -77,7 +77,7 @@ GLOBAL_LIST_EMPTY(asset_datums) /// Simply takes any generated file and saves it to the round-specific /logs folder. Useful for debugging potential issues with spritesheet generation/display. /// Only called when the SAVE_SPRITESHEETS config option is uncommented. /datum/asset/proc/save_to_logs(file_name, file_location) - var/asset_path = "[log_path]/generated_assets/[file_name]" + var/asset_path = "[GLOB.log_directory]/generated_assets/[file_name]" fdel(asset_path) // just in case, sadly we can't use rust_g stuff here. fcopy(file_location, asset_path) diff --git a/code/modules/asset_cache/assets/spritesheets/pipes.dm b/code/modules/asset_cache/assets/spritesheets/pipes.dm index b0f5935a95..1fe26b1670 100644 --- a/code/modules/asset_cache/assets/spritesheets/pipes.dm +++ b/code/modules/asset_cache/assets/spritesheets/pipes.dm @@ -3,4 +3,4 @@ /datum/asset/spritesheet/pipes/create_spritesheets() for(var/each in list('icons/obj/pipe-item.dmi', 'icons/obj/pipes/disposal.dmi')) - InsertAll("", each, global.alldirs) + InsertAll("", each, global.GLOB.alldirs) diff --git a/code/modules/asset_cache/iconforge/batched_spritesheet.dm b/code/modules/asset_cache/iconforge/batched_spritesheet.dm index 09a6abd2d5..e1d2225b6a 100644 --- a/code/modules/asset_cache/iconforge/batched_spritesheet.dm +++ b/code/modules/asset_cache/iconforge/batched_spritesheet.dm @@ -108,8 +108,8 @@ if (data_out == RUSTG_JOB_ERROR) CRASH("Spritesheet [name] cache JOB PANIC") else if(!findtext(data_out, "{", 1, 2)) - rustg_file_write(cache_data, "[log_path]-spritesheet_cache_debug.[name].json") - rustg_file_write(entries_json, "[log_path]-spritesheet_debug_[name].json") + rustg_file_write(cache_data, "[GLOB.log_directory]-spritesheet_cache_debug.[name].json") + rustg_file_write(entries_json, "[GLOB.log_directory]-spritesheet_debug_[name].json") CRASH("Spritesheet [name] cache check UNKNOWN ERROR: [data_out]") var/result = json_decode(data_out) var/fail = result["fail_reason"] @@ -200,7 +200,7 @@ if (data_out == RUSTG_JOB_ERROR) CRASH("Spritesheet [name] JOB PANIC") else if(!findtext(data_out, "{", 1, 2)) - rustg_file_write(entries_json, "[log_path]-spritesheet_debug_[name].json") + rustg_file_write(entries_json, "[GLOB.log_directory]-spritesheet_debug_[name].json") CRASH("Spritesheet [name] UNKNOWN ERROR: [data_out]") var/data = json_decode(data_out) sizes = data["sizes"] diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 649c46e2ab..fa8c1762d2 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -84,7 +84,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) linked = list() //clear the list var/turf/T = loc - for(var/i in alldirs) + for(var/i in GLOB.alldirs) T = get_step(loc, i) var/obj/machinery/gateway/G = locate(/obj/machinery/gateway) in T if(G) @@ -110,7 +110,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) if(world.time < wait) to_chat(user, span_notice("Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.")) return - if(!awaygate.calibrated && !LAZYLEN(awaydestinations)) //VOREStation Edit + if(!awaygate.calibrated && !LAZYLEN(GLOB.awaydestinations)) //VOREStation Edit to_chat(user, span_notice("Error: Destination gate uncalibrated. Gateway unsafe to use without far-end calibration update.")) return @@ -164,7 +164,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) for(var/rider in L.buckled_mobs) R.force_dismount(rider) //VOREStation Addition End: Prevent abuse - var/obj/effect/landmark/dest = pick(awaydestinations) + var/obj/effect/landmark/dest = pick(GLOB.awaydestinations) if(dest) M.forceMove(dest.loc) M.set_dir(SOUTH) @@ -205,7 +205,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) if(istype(II,/obj/item/implant) || istype(II,/obj/item/nif)) continue MI.drop_from_inventory(II, dest.loc) - var/obj/effect/landmark/finaldest = pick(awayabductors) + var/obj/effect/landmark/finaldest = pick(GLOB.awayabductors) MI.forceMove(finaldest.loc) sleep(1) MI.Paralyse(10) @@ -215,7 +215,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) if(istype(I,/obj/item/implant) || istype(I,/obj/item/nif)) continue L.drop_from_inventory(I, dest.loc) - var/obj/effect/landmark/finaldest = pick(awayabductors) + var/obj/effect/landmark/finaldest = pick(GLOB.awayabductors) L.forceMove(finaldest.loc) sleep(1) L.Paralyse(10) @@ -286,7 +286,7 @@ GLOBAL_DATUM(gateway_away, /obj/machinery/gateway/centeraway) linked = list() //clear the list var/turf/T = loc - for(var/i in alldirs) + for(var/i in GLOB.alldirs) T = get_step(loc, i) var/obj/machinery/gateway/G = locate(/obj/machinery/gateway) in T if(G) diff --git a/code/modules/awaymissions/redgate.dm b/code/modules/awaymissions/redgate.dm index e2c0858580..af3a8c0122 100644 --- a/code/modules/awaymissions/redgate.dm +++ b/code/modules/awaymissions/redgate.dm @@ -1514,7 +1514,7 @@ //TODO - make this not trigger when the flag is returned to its original location /obj/item/laserdome_flag/dropped(mob/user) . = ..() - global_announcer.autosay("[src] dropped!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[src] dropped!","Laserdome Announcer","Entertainment") */ /obj/item/laserdome_flag/attack_hand(mob/user as mob) @@ -1540,13 +1540,13 @@ if(do_after(user,flag_return_delay)) //channel return, rather than instant user.drop_from_inventory(src) src.loc = src.start_pos - global_announcer.autosay("[capitalize(laser_team)] flag returned by [user]!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[capitalize(laser_team)] flag returned by [user]!","Laserdome Announcer","Entertainment") else //if they fail the channel (e.g. because they got tagged!) then drop it user.drop_from_inventory(src) return else user.visible_message(span_warning("[user] has taken \the [src]!")) - global_announcer.autosay("[src] taken by [capitalize(grabbing_team)] team!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[src] taken by [capitalize(grabbing_team)] team!","Laserdome Announcer","Entertainment") /obj/item/laserdome_flag/red name = "Red flag" @@ -1598,18 +1598,18 @@ if(istype(F,/obj/item/laserdome_flag)) var/obj/item/laserdome_flag/flag = F if(flag.laser_team != base_team) - global_announcer.autosay("[user] captured the [capitalize(flag.laser_team)] flag for [capitalize(base_team)] team!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[user] captured the [capitalize(flag.laser_team)] flag for [capitalize(base_team)] team!","Laserdome Announcer","Entertainment") user.drop_from_inventory(flag) flag.loc = flag.start_pos //teleport the captured flag back to its base location score++ //increment our score by 1! if(score < score_limit) //announce the current score and how many more captures are needed - global_announcer.autosay("[num2text(score_limit-score)] captures remain until [capitalize(base_team)] team wins.","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[num2text(score_limit-score)] captures remain until [capitalize(base_team)] team wins.","Laserdome Announcer","Entertainment") else if(score >= score_limit) //now, if score equals or exceeds (somehow) the score limit, announce that our team won and reset the score for all flag bases nearby - global_announcer.autosay("+|[uppertext(base_team)] TEAM HAS WON THE MATCH!|+","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("+|[uppertext(base_team)] TEAM HAS WON THE MATCH!|+","Laserdome Announcer","Entertainment") for(var/obj/structure/flag_base/FB in src.loc.loc.contents) //this feels dirty, but it works FB.score = 0 else if(flag.laser_team == base_team) - global_announcer.autosay("[capitalize(base_team)] flag returned!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[capitalize(base_team)] flag returned!","Laserdome Announcer","Entertainment") user.drop_from_inventory(flag) flag.loc = src.loc //place our flag neatly back on its pedestal @@ -1671,7 +1671,7 @@ last_holder = M last_team = grabbing_team //finally, announcer calls out which team has the ball - global_announcer.autosay("[capitalize(grabbing_team)] team on offense!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[capitalize(grabbing_team)] team on offense!","Laserdome Announcer","Entertainment") update_icon() update_held_icon() @@ -1679,7 +1679,7 @@ //TODO- make this not trigger when the ball is thrown or dunked, only when it's actually dropped /obj/item/laserdome_hyperball/dropped(mob/user) . = ..() - global_announcer.autosay("[capitalize(last_team)] fumble!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[capitalize(last_team)] fumble!","Laserdome Announcer","Entertainment") */ /obj/structure/hyperball_pedestal @@ -1728,12 +1728,12 @@ if(istype(B,/obj/item/laserdome_hyperball)) var/obj/item/laserdome_hyperball/ball = B if(dunking_team != goal_team) - global_announcer.autosay("[user] dunked the HYPERball for [capitalize(dunking_team)] team! [num2text(dunk_points)] points scored!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[user] dunked the HYPERball for [capitalize(dunking_team)] team! [num2text(dunk_points)] points scored!","Laserdome Announcer","Entertainment") score += dunk_points //increment our score! if(score < score_limit) //announce the current score and how many more captures are needed - global_announcer.autosay("[num2text(score_limit-score)] points remain until [capitalize(dunking_team)] team wins.","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[num2text(score_limit-score)] points remain until [capitalize(dunking_team)] team wins.","Laserdome Announcer","Entertainment") else if(score >= score_limit) //now, if score equals or exceeds (somehow) the score limit, announce that our team won and reset the score for all flag bases nearby - global_announcer.autosay("+|[uppertext(dunking_team)] TEAM HAS WON THE MATCH!|+","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("+|[uppertext(dunking_team)] TEAM HAS WON THE MATCH!|+","Laserdome Announcer","Entertainment") for(var/obj/structure/hyperball_goal/HB in src.loc.loc.contents) //this feels dirty, but it works HB.score = 0 else if(dunking_team == goal_team) //discourage people from dunking the ball into their own goal as a quick way to teleport it back to the midfield @@ -1741,11 +1741,11 @@ if("blue") for(var/obj/structure/hyperball_goal/red/HGR in src.loc.loc.contents) HGR.score = max(0,HGR.score-dunk_points) - global_announcer.autosay("[user] dunked the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGR.score].","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[user] dunked the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGR.score].","Laserdome Announcer","Entertainment") if("red") for(var/obj/structure/hyperball_goal/blue/HGB in src.loc.loc.contents) HGB.score = max(0,HGB.score-dunk_points) - global_announcer.autosay("[user] dunked the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGB.score].","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[user] dunked the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGB.score].","Laserdome Announcer","Entertainment") user.drop_from_inventory(ball) ball.loc = ball.start_pos //teleport the ball back to the midfield @@ -1759,12 +1759,12 @@ var/obj/item/laserdome_hyperball/ball = B if(prob(range_dunk_chance)) if(ball.last_team != goal_team) - global_announcer.autosay("[ball.last_holder] threw the HYPERball for [capitalize(ball.last_team)] team! [num2text(range_dunk_points)] points scored!","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[ball.last_holder] threw the HYPERball for [capitalize(ball.last_team)] team! [num2text(range_dunk_points)] points scored!","Laserdome Announcer","Entertainment") score += range_dunk_points //increment our score! if(score < score_limit) //announce the current score and how many more captures are needed - global_announcer.autosay("[num2text(score_limit-score)] points remain until [capitalize(ball.last_team)] team wins.","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[num2text(score_limit-score)] points remain until [capitalize(ball.last_team)] team wins.","Laserdome Announcer","Entertainment") else if(score >= score_limit) //now, if score equals or exceeds the score limit, announce that our team won and reset the score for all flag bases nearby - global_announcer.autosay("+|[uppertext(ball.last_team)] TEAM HAS WON THE MATCH!|+","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("+|[uppertext(ball.last_team)] TEAM HAS WON THE MATCH!|+","Laserdome Announcer","Entertainment") for(var/obj/structure/hyperball_goal/HB in src.loc.loc.contents) //this feels dirty, but it works HB.score = 0 else if(ball.last_team == goal_team) //discourage people from dunking the ball into their own goal as a quick way to teleport it back to the midfield @@ -1772,11 +1772,11 @@ if("blue") for(var/obj/structure/hyperball_goal/red/HGR in src.loc.loc.contents) HGR.score = max(0,HGR.score-range_dunk_points) - global_announcer.autosay("[ball.last_holder] threw the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGR.score].","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[ball.last_holder] threw the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGR.score].","Laserdome Announcer","Entertainment") if("red") for(var/obj/structure/hyperball_goal/blue/HGB in src.loc.loc.contents) HGB.score = max(0,HGB.score-range_dunk_points) - global_announcer.autosay("[ball.last_holder] threw the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGB.score].","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[ball.last_holder] threw the HYPERball and scored an own goal! +Points |de-ducted!|+ [capitalize(goal_team)] team score is now: [HGB.score].","Laserdome Announcer","Entertainment") ball.loc = ball.start_pos //teleport the ball back to the midfield ball.icon_state = "[initial(ball.icon_state)]" @@ -1785,7 +1785,7 @@ else //todo; throw the ball in a random direction src.visible_message("\The [ball] bounces off \the [src]'s rim!") - global_announcer.autosay("[ball.last_holder] threw the HYPERball and +missed!+ |Oooh!|","Laserdome Announcer","Entertainment") + GLOB.global_announcer.autosay("[ball.last_holder] threw the HYPERball and +missed!+ |Oooh!|","Laserdome Announcer","Entertainment") /obj/structure/prop/machine/biosyphon/laserdome name = "Laserdome Orientation Holo" diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index 9fa0f50459..38e959158e 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -2,7 +2,7 @@ #ifdef UNIT_TEST return #endif - if(awaydestinations.len) //crude, but it saves another var! //VOREStation Edit - No loading away missions during CI testing + if(GLOB.awaydestinations.len) //crude, but it saves another var! //VOREStation Edit - No loading away missions during CI testing return var/list/potentialRandomZlevels = list() @@ -64,7 +64,7 @@ name = "uncalibrated gateway destination" /obj/effect/landmark/gateway_scatter/Initialize(mapload) . = ..() - awaydestinations += src + GLOB.awaydestinations += src /obj/effect/landmark/gateway_scatter/abduct name = "uncalibrated gateway abductor" @@ -74,7 +74,7 @@ name = "uncalibrated event destination" /obj/effect/landmark/event_scatter/Initialize(mapload) . = ..() - eventdestinations += src + GLOB.eventdestinations += src /obj/effect/landmark/event_scatter/abduct name = "uncalibrated event abductor" @@ -84,11 +84,11 @@ name = "abductor gateway destination" /obj/effect/landmark/gateway_abduct_dest/Initialize(mapload) . = ..() - awayabductors += src + GLOB.awayabductors += src /obj/effect/landmark/event_abduct_dest name = "abductor event destination" /obj/effect/landmark/event_abduct_dest/Initialize(mapload) . = ..() - eventabductors += src + GLOB.eventabductors += src //VOREStation Add End diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 424e3b9ee3..4a42a78d17 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -26,7 +26,7 @@ GLOBAL_LIST_EMPTY(all_blobs) update_icon() if(!integrity) integrity = max_integrity - set_dir(pick(cardinal)) + set_dir(pick(GLOB.cardinal)) GLOB.all_blobs += src consume_tile() return ..() @@ -142,7 +142,7 @@ GLOBAL_LIST_EMPTY(all_blobs) /obj/structure/blob/proc/expand(turf/T = null, controller = null, expand_reaction = 1) if(!T) - var/list/dirs = cardinal.Copy() + var/list/dirs = GLOB.cardinal.Copy() for(var/i = 1 to 4) var/dirn = pick(dirs) dirs.Remove(dirn) diff --git a/code/modules/blob2/overmind/powers.dm b/code/modules/blob2/overmind/powers.dm index 1093130dc9..39cb7c5273 100644 --- a/code/modules/blob2/overmind/powers.dm +++ b/code/modules/blob2/overmind/powers.dm @@ -189,7 +189,7 @@ /mob/observer/blob/proc/expand_blob(turf/T) var/obj/structure/blob/B = null var/turf/other_T = null - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) other_T = get_step(T, direction) if(other_T) B = locate(/obj/structure/blob) in other_T @@ -238,7 +238,7 @@ if(locate(/obj/structure/blob) in get_turf(L)) return FALSE // Already has a blob over them. - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(L, direction) var/obj/structure/blob/B = locate(/obj/structure/blob) in T if(B && B.overmind == src) diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index d6704d64f7..d2382913b8 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -170,7 +170,7 @@ #ifdef CARDINAL_INPUT_ONLY - /// Movement dir of the most recently pressed movement key. Used in cardinal-only movement mode. + /// Movement dir of the most recently pressed movement key. Used in GLOB.cardinal-only movement mode. var/last_move_dir_pressed = NONE #endif diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 8457fb5b0b..f6525e1ec8 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -162,8 +162,8 @@ stat_panel.reinitialize() //Logs all hrefs - if(config && CONFIG_GET(flag/log_hrefs) && href_logfile) - WRITE_LOG(href_logfile, "[src] (usr:[usr]) || [hsrc ? "[hsrc] " : ""][href]") + if(config && CONFIG_GET(flag/log_hrefs) && GLOB.href_logfile) + WRITE_LOG(GLOB.href_logfile, "[src] (usr:[usr]) || [hsrc ? "[hsrc] " : ""][href]") //byond bug ID:2256651 if (asset_cache_job && (asset_cache_job in completed_asset_jobs)) @@ -307,10 +307,10 @@ connection_realtime = world.realtime connection_timeofday = world.timeofday - if(custom_event_msg && custom_event_msg != "") + if(GLOB.custom_event_msg && GLOB.custom_event_msg != "") to_chat(src, "

    Custom Event

    ") to_chat(src, "

    A custom event is taking place. OOC Info:

    ") - to_chat(src, span_alert("[custom_event_msg]")) + to_chat(src, span_alert("[GLOB.custom_event_msg]")) to_chat(src, "
    ") if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them. diff --git a/code/modules/client/preference_setup/general/06_flavor.dm b/code/modules/client/preference_setup/general/06_flavor.dm index 14f9a6c4e0..ad38334179 100644 --- a/code/modules/client/preference_setup/general/06_flavor.dm +++ b/code/modules/client/preference_setup/general/06_flavor.dm @@ -15,7 +15,7 @@ pref.custom_link = save_data["custom_link"] //Flavour text for robots. pref.flavour_texts_robot["Default"] = save_data["flavour_texts_robot_Default"] - for(var/module in robot_module_types) + for(var/module in GLOB.robot_module_types) pref.flavour_texts_robot[module] = save_data["flavour_texts_robot_[module]"] /datum/category_item/player_setup_item/general/flavor/save_character(list/save_data) @@ -31,7 +31,7 @@ save_data["custom_link"] = pref.custom_link save_data["flavour_texts_robot_Default"] = pref.flavour_texts_robot["Default"] - for(var/module in robot_module_types) + for(var/module in GLOB.robot_module_types) save_data["flavour_texts_robot_[module]"] = pref.flavour_texts_robot[module] /datum/category_item/player_setup_item/general/flavor/sanitize_character() @@ -151,7 +151,7 @@ HTML += "Default: " HTML += TextPreview(pref.flavour_texts_robot["Default"]) HTML += "
    " - for(var/module in robot_module_types) + for(var/module in GLOB.robot_module_types) HTML += "[module]: " HTML += TextPreview(pref.flavour_texts_robot[module]) HTML += "
    " diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index ef693fd79d..cf77959927 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -242,7 +242,7 @@ var/list/preferences_datums = list() BG.icon_state = bgstate BG.screen_loc = preview_screen_locs["BG"] - for(var/D in global.cardinal) + for(var/D in global.GLOB.cardinal) var/obj/screen/setup_preview/O = LAZYACCESS(char_render_holders, "[D]") if(!O) O = new diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm index 94aa3d706d..9b5276ed9c 100644 --- a/code/modules/client/preferences_spawnpoints.dm +++ b/code/modules/client/preferences_spawnpoints.dm @@ -49,7 +49,7 @@ var/list/spawntypes = list() /datum/spawnpoint/arrivals/New() ..() - turfs = latejoin + turfs = GLOB.latejoin /datum/spawnpoint/gateway display_name = "Gateway" @@ -57,7 +57,7 @@ var/list/spawntypes = list() /datum/spawnpoint/gateway/New() ..() - turfs = latejoin_gateway + turfs = GLOB.latejoin_gateway /* VOREStation Edit /datum/spawnpoint/elevator display_name = "Elevator" @@ -74,7 +74,7 @@ var/list/spawntypes = list() /datum/spawnpoint/cryo/New() ..() - turfs = latejoin_cryo + turfs = GLOB.latejoin_cryo /datum/spawnpoint/cyborg display_name = "Cyborg Storage" @@ -83,24 +83,24 @@ var/list/spawntypes = list() /datum/spawnpoint/cyborg/New() ..() - turfs = latejoin_cyborg + turfs = GLOB.latejoin_cyborg /obj/effect/landmark/arrivals name = "JoinLateShuttle" delete_me = 1 /obj/effect/landmark/arrivals/Initialize(mapload) - latejoin += loc + GLOB.latejoin += loc . = ..() -var/global/list/latejoin_tram = list() +GLOBAL_LIST_EMPTY(latejoin_tram) /obj/effect/landmark/tram name = "JoinLateTram" delete_me = 1 /obj/effect/landmark/tram/Initialize(mapload) - latejoin_tram += loc // There's no tram but you know whatever man! + GLOB.latejoin_tram += loc // There's no tram but you know whatever man! . = ..() /datum/spawnpoint/tram @@ -109,7 +109,7 @@ var/global/list/latejoin_tram = list() /datum/spawnpoint/tram/New() ..() - turfs = latejoin_tram + turfs = GLOB.latejoin_tram /datum/spawnpoint/vore display_name = "Vorespawn - Prey" @@ -126,4 +126,4 @@ var/global/list/latejoin_tram = list() /datum/spawnpoint/vore/New() ..() - turfs = latejoin + turfs = GLOB.latejoin diff --git a/code/modules/client/verbs/character_directory.dm b/code/modules/client/verbs/character_directory.dm index ca4f5937ac..0d9cab006c 100644 --- a/code/modules/client/verbs/character_directory.dm +++ b/code/modules/client/verbs/character_directory.dm @@ -70,7 +70,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) if(ishuman(C.mob)) var/mob/living/carbon/human/H = C.mob - //if(data_core && data_core.general) + //if(data_core && GLOB.data_core.general) // if(!find_general_record("name", H.real_name)) // if(!find_record("name", H.real_name, data_core.hidden_general)) // continue diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm b/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm index 1a329054a2..c0b4832efe 100644 --- a/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm +++ b/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm @@ -84,6 +84,6 @@ var/username = FindNameFromID(H) || "Unknown" var/message = "[username] has overridden [A] (airlock) in \the [get_area(A)] at [A.x],[A.y],[A.z] with \the [src]." - global_announcer.autosay(message, "Security Subsystem", "Command") - global_announcer.autosay(message, "Security Subsystem", "Security") + GLOB.global_announcer.autosay(message, "Security Subsystem", "Command") + GLOB.global_announcer.autosay(message, "Security Subsystem", "Security") return 1 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 716d08ad61..d9e40c7b64 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -957,7 +957,7 @@ return 0 if(malfunctioning) - direction = pick(cardinal) + direction = pick(GLOB.cardinal) // Inside an object, tell it we moved. if(isobj(wearer.loc) || ismob(wearer.loc)) diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index b67782c186..89556bccca 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -48,7 +48,7 @@ /obj/machinery/cash_register/attack_hand(mob/user as mob) // Don't be accessible from the wrong side of the machine - if(get_dir(src, user) & reverse_dir[src.dir]) return + if(get_dir(src, user) & GLOB.reverse_dir[src.dir]) return if(cash_open) if(cash_stored) diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index ecc3ce4385..cc507fdfb7 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -41,7 +41,7 @@ GLOBAL_VAR_INIT(economy_init, 0) create_station_account() - for(var/department in station_departments) + for(var/department in GLOB.station_departments) create_department_account(department) create_department_account("Vendor") GLOB.vendor_account = GLOB.department_accounts["Vendor"] @@ -53,7 +53,7 @@ GLOBAL_VAR_INIT(economy_init, 0) if(CR.account_to_connect) CR.linked_account = GLOB.department_accounts[CR.account_to_connect] - GLOB.current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [game_year]" + GLOB.current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [GLOB.game_year]" GLOB.economy_init = 1 return 1 diff --git a/code/modules/eventkit/generic_objects/generic_item.dm b/code/modules/eventkit/generic_objects/generic_item.dm index 943de2bc40..573eacccf9 100644 --- a/code/modules/eventkit/generic_objects/generic_item.dm +++ b/code/modules/eventkit/generic_objects/generic_item.dm @@ -37,7 +37,7 @@ s.set_up(3, 1, src) s.start() if(effect == 2) - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != user.z || get_dist(user,L) > 10) continue else diff --git a/code/modules/eventkit/generic_objects/generic_structure.dm b/code/modules/eventkit/generic_objects/generic_structure.dm index 0878fef63a..fdad6d7726 100644 --- a/code/modules/eventkit/generic_objects/generic_structure.dm +++ b/code/modules/eventkit/generic_objects/generic_structure.dm @@ -42,7 +42,7 @@ s.set_up(3, 1, src) s.start() if(effect == 2) - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != src.z || get_dist(src,L) > 10) continue else diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 26980472c5..eb772f4be2 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -6,7 +6,7 @@ /datum/event/blob/start() - var/turf/T = pick(blobstart) + var/turf/T = pick(GLOB.blobstart) if(!T) kill() return diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index 2e9119aa55..ece862f11a 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -23,7 +23,7 @@ /datum/event/brand_intelligence/start() - for(var/obj/machinery/vending/V in machines) + for(var/obj/machinery/vending/V in GLOB.machines) if(isNotStationLevel(V.z)) continue vendingMachines.Add(V) diff --git a/code/modules/events/canister_leak.dm b/code/modules/events/canister_leak.dm index 932a819671..f54f0fc2c8 100644 --- a/code/modules/events/canister_leak.dm +++ b/code/modules/events/canister_leak.dm @@ -6,7 +6,7 @@ /datum/event/canister_leak/start() // List of all non-destroyed canisters on station levels var/list/all_canisters = list() - for(var/obj/machinery/portable_atmospherics/canister/C in machines) + for(var/obj/machinery/portable_atmospherics/canister/C in GLOB.machines) if(!C.destroyed && (C.z in using_map.station_levels) && C.air_contents.total_moles >= MOLES_CELLSTANDARD) all_canisters += C diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index edfaf1e2e3..fd9de14f5d 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -18,5 +18,5 @@ /datum/event/communications_blackout/start() for(var/obj/machinery/telecomms/T in telecomms_list) T.emp_act(1) - for(var/obj/machinery/exonet_node/N in machines) + for(var/obj/machinery/exonet_node/N in GLOB.machines) N.emp_act(1) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index e753d19c22..ed08c1a036 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -73,7 +73,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases) popleft(A.symptoms) //We have a full symptom list but are still not transmittable. Try removing one of the "payloads" A.AssignProperties(A.GenerateProperties()) - A.name = pick(alphabet_uppercase) + num2text(rand(1,9)) + pick(alphabet_uppercase) + num2text(rand(1,9)) + pick("v", "V", "-" + num2text(game_year), "") + A.name = pick(GLOB.alphabet_upper) + num2text(rand(1,9)) + pick(GLOB.alphabet_upper) + num2text(rand(1,9)) + pick("v", "V", "-" + num2text(GLOB.game_year), "") A.Refresh() return A diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index 50ea49bd3f..e124d51bb2 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -37,7 +37,7 @@ ..() // See if shields can stop it first var/list/shields = list() - for(var/obj/machinery/power/shield_generator/G in global.machines) + for(var/obj/machinery/power/shield_generator/G in GLOB.machines) if((G.z in affecting_z) && G.running && G.check_flag(MODEFLAG_EM)) shields += G if(shields.len) diff --git a/code/modules/events/escaped_slimes.dm b/code/modules/events/escaped_slimes.dm index 6a859e6a13..f1d5d7a407 100644 --- a/code/modules/events/escaped_slimes.dm +++ b/code/modules/events/escaped_slimes.dm @@ -32,7 +32,7 @@ /datum/event/escaped_slimes/start() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) if(temp_vent.network && temp_vent.loc.z in using_map.station_levels && !is_area_occupied(temp_vent.loc.loc)) //borrowed from spiders event, but it works. Distribute the slimes only in rooms with vents vents += temp_vent diff --git a/code/modules/events/gravity.dm b/code/modules/events/gravity.dm index 47565997b1..716e4131ee 100644 --- a/code/modules/events/gravity.dm +++ b/code/modules/events/gravity.dm @@ -9,7 +9,7 @@ for(var/datum/planet/P in SSplanets.planets) zLevels -= P.expected_z_levels - for(var/obj/machinery/gravity_generator/main/GG in machines) + for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines) if((GG.z in zLevels) && GG.on) generators += GG @@ -27,7 +27,7 @@ reinitializes. Please stand by while the gravity system reinitializes.", "Gravity Failure") /datum/event/gravity/start() - gravity_is_on = 0 + GLOB.gravity_is_on = FALSE if(generators.len) for(var/obj/machinery/gravity_generator/main/GG in generators) if((GG.z in zLevels) && GG.on) @@ -37,11 +37,11 @@ else for(var/area/A in world) if(A.z in zLevels) - A.gravitychange(gravity_is_on) + A.gravitychange(GLOB.gravity_is_on) /datum/event/gravity/end() - if(!gravity_is_on) - gravity_is_on = 1 + if(!GLOB.gravity_is_on) + GLOB.gravity_is_on = TRUE var/did_anything = FALSE @@ -55,7 +55,7 @@ else for(var/area/A in world) if(A.z in zLevels) - A.gravitychange(gravity_is_on) + A.gravitychange(GLOB.gravity_is_on) did_anything = TRUE if(did_anything) diff --git a/code/modules/events/gravity_vr.dm b/code/modules/events/gravity_vr.dm index 314a23a3aa..050978c046 100644 --- a/code/modules/events/gravity_vr.dm +++ b/code/modules/events/gravity_vr.dm @@ -14,9 +14,9 @@ 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/event/gravity/start() - gravity_is_on = 0 + GLOB.gravity_is_on = FALSE - for(var/obj/machinery/gravity_generator/main/GG in machines) + for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines) if((GG.z in zLevels) && GG.on) generators += GG GG.breaker = FALSE @@ -24,7 +24,7 @@ GG.charge_count = 10 /datum/event/gravity/end() - gravity_is_on = 1 + GLOB.gravity_is_on = TRUE var/did_anything = FALSE for(var/obj/machinery/gravity_generator/main/GG in generators) diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm index 782cf62e6f..db51a8cd2c 100644 --- a/code/modules/events/grid_check.dm +++ b/code/modules/events/grid_check.dm @@ -3,7 +3,7 @@ /datum/event/grid_check/start() // This sets off a chain of events that lead to the actual grid check (or perhaps worse). // First, the Supermatter engine makes a power spike. - for(var/obj/machinery/power/generator/engine in machines) + for(var/obj/machinery/power/generator/engine in GLOB.machines) engine.power_spike(80) break // Just one engine, please. // After that, the engine checks if a grid checker exists on the same powernet, and if so, it triggers a blackout. diff --git a/code/modules/events/grubinfestation_vr.dm b/code/modules/events/grubinfestation_vr.dm index 3ec85c7b89..7d00bb9d4e 100644 --- a/code/modules/events/grubinfestation_vr.dm +++ b/code/modules/events/grubinfestation_vr.dm @@ -10,7 +10,7 @@ spawncount = rand(2 * severity, 6 * severity) - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) var/area/A = get_area(temp_vent) if(A.flag_check(AREA_FORBID_EVENTS)) continue diff --git a/code/modules/events/ian_storm_vr.dm b/code/modules/events/ian_storm_vr.dm index 179832d8cd..137da9bbe4 100644 --- a/code/modules/events/ian_storm_vr.dm +++ b/code/modules/events/ian_storm_vr.dm @@ -24,7 +24,7 @@ /datum/event/ianstorm/proc/place_ian(var/turf/T) // Try three times to place an Ian for(var/i = 0, i < 3, i++) - var/turf/target = get_step(T, pick(alldirs)) + var/turf/target = get_step(T, pick(GLOB.alldirs)) if(target && istype(target, /turf/simulated/floor)) var/mob/living/simple_mob/animal/passive/dog/corgi/Ian/doge = new(target) doge.name = "Ian " + pick("Alpha", "Beta", "Chi", "Delta", "Epsilon", "Phi", diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index a963e09b6f..a8e1674d75 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -213,7 +213,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is to_world("Finished processing SMES. Processed: [smesnum]") spawn(0) to_world("Started processing AIRLOCKS") - for (var/obj/machinery/door/airlock/D in machines) + for (var/obj/machinery/door/airlock/D in GLOB.machines) if(D.z in station_levels) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ @@ -222,7 +222,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is to_world("Finished processing AIRLOCKS. Processed: [airlocknum]") spawn(0) to_world("Started processing FIREDOORS") - for (var/obj/machinery/door/firedoor/D in machines) + for (var/obj/machinery/door/firedoor/D in GLOB.machines) if(D.z in station_levels) firedoornum++; spawn(0) diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index ff11cb9c33..b6979932a1 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -17,7 +17,7 @@ /datum/event/meteor_wave/setup() waves = (2 + rand(1, severity)) * severity - start_side = pick(cardinal) + start_side = pick(GLOB.cardinal) endWhen = worst_case_end() /datum/event/meteor_wave/start() @@ -35,7 +35,7 @@ /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. if(activeFor >= alarmWhen) - for(var/obj/machinery/shield_diffuser/SD in global.machines) + for(var/obj/machinery/shield_diffuser/SD in GLOB.machines) if(SD.z in affecting_z) SD.meteor_alarm(10) diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index ad3c07d1b6..0cdc2b452d 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -22,7 +22,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) Notifications will be sent as updates occur.
    " var/my_department = "[station_name()] firewall subroutines" - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message(JOB_HEAD_OF_PERSONNEL + "'s Desk", my_department, message, "", "", 2) @@ -64,6 +64,6 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) var/my_department = "[station_name()] firewall subroutines" - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message(JOB_HEAD_OF_PERSONNEL + "'s Desk", my_department, message, "", "", 2) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 04cbf42d7b..72328902ed 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -48,7 +48,7 @@ if(areas && areas.len > 0) var/my_department = "[station_name()] firewall subroutines" var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [stationtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
    " - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2) for(var/mob/living/silicon/ai/A in player_list) to_chat(A, span_danger("Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].")) diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 8ba825464d..d553ba499b 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -16,7 +16,7 @@ /datum/event/spider_infestation/start() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels)) if(temp_vent.network.normal_members.len > 50) var/area/A = get_area(temp_vent) diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index b3f27b2934..1439356fc6 100644 --- a/code/modules/events/supply_demand_vr.dm +++ b/code/modules/events/supply_demand_vr.dm @@ -22,9 +22,9 @@ 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 = metric.departments.Copy() + var/list/notHaveDeptList = GLOB.metric.departments.Copy() notHaveDeptList.Remove(list(DEPARTMENT_ENGINEERING, DEPARTMENT_MEDICAL, DEPARTMENT_RESEARCH, DEPARTMENT_CARGO, DEPARTMENT_CIVILIAN)) - var/deptActivity = metric.assess_all_departments(severity * 2, notHaveDeptList) + var/deptActivity = GLOB.metric.assess_all_departments(severity * 2, notHaveDeptList) for(var/dept in deptActivity) switch(dept) if(DEPARTMENT_ENGINEERING) diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm index 25310f2ab1..253e36ef17 100644 --- a/code/modules/food/kitchen/gibber.dm +++ b/code/modules/food/kitchen/gibber.dm @@ -25,7 +25,7 @@ /obj/machinery/gibber/autogibber/Initialize(mapload) . = ..() - for(var/i in cardinal) + for(var/i in GLOB.cardinal) var/obj/machinery/mineral/input/input_obj = locate( /obj/machinery/mineral/input, get_step(src.loc, i) ) if(input_obj) if(isturf(input_obj.loc)) diff --git a/code/modules/gamemaster/event2/events/cargo/shipping_error.dm b/code/modules/gamemaster/event2/events/cargo/shipping_error.dm index 34d97dcccd..e2fc057997 100644 --- a/code/modules/gamemaster/event2/events/cargo/shipping_error.dm +++ b/code/modules/gamemaster/event2/events/cargo/shipping_error.dm @@ -6,7 +6,7 @@ event_type = /datum/event2/event/shipping_error /datum/event2/meta/shipping_error/get_weight() - return (metric.count_people_with_job(/datum/job/cargo_tech) + metric.count_people_with_job(/datum/job/qm)) * 30 + return (GLOB.metric.count_people_with_job(/datum/job/cargo_tech) + GLOB.metric.count_people_with_job(/datum/job/qm)) * 30 /datum/event2/event/shipping_error/start() var/datum/supply_order/O = new /datum/supply_order() diff --git a/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm b/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm index 9c41235666..d8fbce19b2 100644 --- a/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm +++ b/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm @@ -6,14 +6,14 @@ event_type = /datum/event2/event/manifest_malfunction /datum/event2/meta/manifest_malfunction/get_weight() - var/security = metric.count_people_in_department(DEPARTMENT_SECURITY) + var/security = GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) - if(!security || !data_core) + if(!security || !GLOB.data_core) return 0 - var/command = metric.count_people_with_job(/datum/job/hop) + metric.count_people_with_job(/datum/job/captain) - var/synths = metric.count_people_in_department(DEPARTMENT_SYNTHETIC) - var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE) - (synths + security + command) // So they don't get counted twice. + var/command = GLOB.metric.count_people_with_job(/datum/job/hop) + GLOB.metric.count_people_with_job(/datum/job/captain) + var/synths = GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC) + var/everyone = GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) - (synths + security + command) // So they don't get counted twice. return (security * 10) + (synths * 20) + (command * 20) + (everyone * 5) @@ -51,10 +51,10 @@ switch(record_class_to_delete) if("security") - R = safepick(data_core.security) + R = safepick(GLOB.data_core.security) if("medical") - R = safepick(data_core.medical) + R = safepick(GLOB.data_core.medical) if(R) log_debug("Manifest malfunction event is now deleting [R.fields["name"]]'s [record_class_to_delete] record.") diff --git a/code/modules/gamemaster/event2/events/command/money_hacker.dm b/code/modules/gamemaster/event2/events/command/money_hacker.dm index 0d1e5c1f02..a83f34d056 100644 --- a/code/modules/gamemaster/event2/events/command/money_hacker.dm +++ b/code/modules/gamemaster/event2/events/command/money_hacker.dm @@ -6,7 +6,7 @@ event_type = /datum/event2/event/money_hacker /datum/event2/meta/money_hacker/get_weight() - var/command = metric.count_people_with_job(/datum/job/hop) + metric.count_people_with_job(/datum/job/captain) + var/command = GLOB.metric.count_people_with_job(/datum/job/hop) + GLOB.metric.count_people_with_job(/datum/job/captain) if(!command) return 0 @@ -34,13 +34,13 @@ Notifications will be sent as updates occur." var/my_department = "[location_name()] Firewall Subroutines" - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message(JOB_HEAD_OF_PERSONNEL + "'s Desk", my_department, "[message]
    ", "", "", 2) // Nobody reads the requests consoles so lets use the radio as well. - global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND) + GLOB.global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND) /datum/event2/event/money_hacker/end() var/message = null @@ -55,11 +55,11 @@ var/my_department = "[location_name()] Firewall Subroutines" - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(!MS.active) continue MS.send_rc_message(JOB_HEAD_OF_PERSONNEL + "'s Desk", my_department, message, "", "", 2) - global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND) + GLOB.global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND) /datum/event2/event/money_hacker/proc/hack_account(datum/money_account/A) // Subtract the money. diff --git a/code/modules/gamemaster/event2/events/command/raise_funds.dm b/code/modules/gamemaster/event2/events/command/raise_funds.dm index eb0f0c4b8b..e45b226f6b 100644 --- a/code/modules/gamemaster/event2/events/command/raise_funds.dm +++ b/code/modules/gamemaster/event2/events/command/raise_funds.dm @@ -6,11 +6,11 @@ event_type = /datum/event2/event/raise_funds /datum/event2/meta/raise_funds/get_weight() - var/command = metric.count_people_in_department(DEPARTMENT_COMMAND) + var/command = GLOB.metric.count_people_in_department(DEPARTMENT_COMMAND) if(!command) // Need someone to read the centcom message. return 0 - var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO) + var/cargo = GLOB.metric.count_people_in_department(DEPARTMENT_CARGO) return (command * 20) + (cargo * 20) diff --git a/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm b/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm index a1795cf7bd..e03fa10026 100644 --- a/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm +++ b/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm @@ -23,15 +23,15 @@ /datum/event2/meta/airlock_failure/get_weight() - var/engineering = metric.count_people_in_department(DEPARTMENT_ENGINEERING) + var/engineering = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) // Synths are good both for fixing the doors and getting blamed for the doors zapping people. - var/synths = metric.count_people_in_department(DEPARTMENT_SYNTHETIC) + var/synths = GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC) if(!engineering && !synths) // Nobody's around to fix the door. return 0 // Medical might be needed for some of the more violent airlock failures. - var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL) + var/medical = GLOB.metric.count_people_in_department(DEPARTMENT_MEDICAL) if(!medical && needs_medical) return 0 diff --git a/code/modules/gamemaster/event2/events/engineering/blob.dm b/code/modules/gamemaster/event2/events/engineering/blob.dm index 199204721a..2bfc638cd2 100644 --- a/code/modules/gamemaster/event2/events/engineering/blob.dm +++ b/code/modules/gamemaster/event2/events/engineering/blob.dm @@ -31,17 +31,17 @@ /datum/event2/meta/blob/get_weight() // Count the 'fighters'. - var/list/engineers = metric.get_people_in_department(DEPARTMENT_ENGINEERING) - var/list/security = metric.get_people_in_department(DEPARTMENT_SECURITY) + var/list/engineers = GLOB.metric.get_people_in_department(DEPARTMENT_ENGINEERING) + var/list/security = GLOB.metric.get_people_in_department(DEPARTMENT_SECURITY) if(engineers.len + security.len < required_fighters) return 0 // Now count the 'support'. - var/list/medical = metric.get_people_in_department(DEPARTMENT_MEDICAL) + var/list/medical = GLOB.metric.get_people_in_department(DEPARTMENT_MEDICAL) var/need_medical = FALSE - var/list/robotics = metric.get_people_with_job(/datum/job/roboticist) + var/list/robotics = GLOB.metric.get_people_with_job(/datum/job/roboticist) var/need_robotics = FALSE // Determine what kind of support might be needed. diff --git a/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm b/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm index b7c034d3ca..cfdc32fca5 100644 --- a/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm +++ b/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm @@ -6,7 +6,7 @@ event_type = /datum/event2/event/brand_intelligence /datum/event2/meta/brand_intelligence/get_weight() - return 10 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + return 10 + (GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) @@ -19,7 +19,7 @@ var/last_malware_spread_time = null /datum/event2/event/brand_intelligence/set_up() - for(var/obj/machinery/vending/V in machines) + for(var/obj/machinery/vending/V in GLOB.machines) if(!(V.z in using_map.station_levels)) continue vending_machines += V diff --git a/code/modules/gamemaster/event2/events/engineering/camera_damage.dm b/code/modules/gamemaster/event2/events/engineering/camera_damage.dm index b16bded50d..c8826dbd65 100644 --- a/code/modules/gamemaster/event2/events/engineering/camera_damage.dm +++ b/code/modules/gamemaster/event2/events/engineering/camera_damage.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/camera_damage /datum/event2/meta/camera_damage/get_weight() - return 30 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 40) + return 30 + (GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 40) /datum/event2/event/camera_damage var/camera_range = 7 diff --git a/code/modules/gamemaster/event2/events/engineering/canister_leak.dm b/code/modules/gamemaster/event2/events/engineering/canister_leak.dm index c0160651b0..d25f4d9827 100644 --- a/code/modules/gamemaster/event2/events/engineering/canister_leak.dm +++ b/code/modules/gamemaster/event2/events/engineering/canister_leak.dm @@ -11,12 +11,12 @@ event_type = /datum/event2/event/canister_leak /datum/event2/meta/canister_leak/get_weight() - return metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30 + return GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30 /datum/event2/event/canister_leak/start() // List of all non-destroyed canisters on station levels var/list/all_canisters = list() - for(var/obj/machinery/portable_atmospherics/canister/C in machines) + for(var/obj/machinery/portable_atmospherics/canister/C in GLOB.machines) if(!C.destroyed && (C.z in using_map.station_levels) && C.air_contents.total_moles >= MOLES_CELLSTANDARD) all_canisters += C var/obj/machinery/portable_atmospherics/canister/C = pick(all_canisters) diff --git a/code/modules/gamemaster/event2/events/engineering/dust.dm b/code/modules/gamemaster/event2/events/engineering/dust.dm index 66bb04970d..ecdfd18cde 100644 --- a/code/modules/gamemaster/event2/events/engineering/dust.dm +++ b/code/modules/gamemaster/event2/events/engineering/dust.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/dust /datum/event2/meta/dust/get_weight() - return metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20 + return GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20 diff --git a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm index 1651f9ab2e..0782e07b06 100644 --- a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm +++ b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm @@ -8,8 +8,8 @@ /datum/event2/meta/gas_leak/get_weight() // Synthetics are counted in higher value because they can wirelessly connect to alarms. - var/engineering_factor = metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 - var/synthetic_factor = metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 30 + var/engineering_factor = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 + var/synthetic_factor = GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 30 return (15 + engineering_factor + synthetic_factor) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/engineering/grid_check.dm b/code/modules/gamemaster/event2/events/engineering/grid_check.dm index 8c120fb62b..a28838e730 100644 --- a/code/modules/gamemaster/event2/events/engineering/grid_check.dm +++ b/code/modules/gamemaster/event2/events/engineering/grid_check.dm @@ -22,7 +22,7 @@ return highest_overpower /datum/event2/meta/grid_check/get_weight() - var/population_factor = metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 + var/population_factor = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 var/overpower_factor = 50 * get_overpower() // Will be 0 if not overloaded at all, and 50 if turbines are outputting twice as much as rated. return (20 + population_factor + overpower_factor) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm b/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm index f0b11b7e1e..3cf14160e1 100644 --- a/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm +++ b/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm @@ -10,15 +10,15 @@ /datum/event2/meta/meteor_defense/get_weight() // Engineers count as 20. - var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING) + var/engineers = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) if(engineers < 3) // There -must- be at least three engineers for this to be possible. return 0 . = engineers * 20 // Cargo and AI/borgs count as 10. - var/cargo = metric.count_people_with_job(/datum/job/cargo_tech) + metric.count_people_with_job(/datum/job/qm) - var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC) + var/cargo = GLOB.metric.count_people_with_job(/datum/job/cargo_tech) + GLOB.metric.count_people_with_job(/datum/job/qm) + var/bots = GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC) . += (cargo + bots) * 10 @@ -40,7 +40,7 @@ meteor_types = meteors_threatening.Copy() /datum/event2/event/meteor_defense/set_up() - direction = pick(cardinal) // alldirs doesn't work with current meteor code unfortunately. + direction = pick(GLOB.cardinal) // GLOB.alldirs doesn't work with current meteor code unfortunately. waves = rand(3, 6) switch(direction) if(NORTH) @@ -74,7 +74,7 @@ waves-- message_admins("[waves] more wave\s of meteors remain.") // Dir is reversed because the direction describes where meteors are going, not what side it's gonna hit. - spawn_meteors(rand(wave_upper_bound, wave_lower_bound), meteor_types, reverse_dir[direction]) + spawn_meteors(rand(wave_upper_bound, wave_lower_bound), meteor_types, GLOB.reverse_dir[direction]) /datum/event2/event/meteor_defense/should_end() return waves <= 0 diff --git a/code/modules/gamemaster/event2/events/engineering/spacevine.dm b/code/modules/gamemaster/event2/events/engineering/spacevine.dm index 53fc9fd5bb..f6d9653bd9 100644 --- a/code/modules/gamemaster/event2/events/engineering/spacevine.dm +++ b/code/modules/gamemaster/event2/events/engineering/spacevine.dm @@ -6,7 +6,7 @@ event_type = /datum/event2/event/spacevine /datum/event2/meta/spacevine/get_weight() - return 20 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) + return 20 + (GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) + (GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) diff --git a/code/modules/gamemaster/event2/events/engineering/wallrot.dm b/code/modules/gamemaster/event2/events/engineering/wallrot.dm index 942e9a1d61..79c7eb0afc 100644 --- a/code/modules/gamemaster/event2/events/engineering/wallrot.dm +++ b/code/modules/gamemaster/event2/events/engineering/wallrot.dm @@ -5,7 +5,7 @@ event_type = /datum/event2/event/wallrot /datum/event2/meta/wallrot/get_weight() - return (10 + metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) / (times_ran + 1) + return (10 + GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/engineering/window_break.dm b/code/modules/gamemaster/event2/events/engineering/window_break.dm index e50036f23d..e101b96233 100644 --- a/code/modules/gamemaster/event2/events/engineering/window_break.dm +++ b/code/modules/gamemaster/event2/events/engineering/window_break.dm @@ -11,7 +11,7 @@ event_type = /datum/event2/event/window_break /datum/event2/meta/window_break/get_weight() - return (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) / (times_ran + 1) + return (GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm index 48d71fe4e6..4a43a65f54 100644 --- a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm +++ b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/comms_blackout /datum/event2/meta/comms_blackout/get_weight() - return 50 + metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5 + return 50 + GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5 @@ -39,5 +39,5 @@ T.emp_act(1) // Communicators go down no matter what. - for(var/obj/machinery/exonet_node/N in machines) + for(var/obj/machinery/exonet_node/N in GLOB.machines) N.emp_act(1) diff --git a/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm b/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm index 914d48050a..f60dd6f49f 100644 --- a/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm +++ b/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm @@ -10,7 +10,7 @@ event_type = /datum/event2/event/electrical_fault /datum/event2/meta/electrical_fault/get_weight() - return 10 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) + return 10 + (GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) /datum/event2/event/electrical_fault diff --git a/code/modules/gamemaster/event2/events/everyone/gravity.dm b/code/modules/gamemaster/event2/events/everyone/gravity.dm index 71a7fafa85..bc14976371 100644 --- a/code/modules/gamemaster/event2/events/everyone/gravity.dm +++ b/code/modules/gamemaster/event2/events/everyone/gravity.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/gravity /datum/event2/meta/gravity/get_weight() - return (20 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5)) / (times_ran + 1) + return (20 + (GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5)) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm b/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm index b56b0a0be1..62a92f9642 100644 --- a/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm +++ b/code/modules/gamemaster/event2/events/everyone/gravity_vr.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/gravity /datum/event2/meta/gravity/get_weight() - return (20 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)) / (times_ran + 1) + return (20 + (GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)) / (times_ran + 1) @@ -21,9 +21,9 @@ 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() - gravity_is_on = 0 + GLOB.gravity_is_on = FALSE - for(var/obj/machinery/gravity_generator/main/GG in machines) + for(var/obj/machinery/gravity_generator/main/GG in GLOB.machines) if((GG.z in get_location_z_levels()) && GG.on) generators += GG GG.breaker = FALSE @@ -31,7 +31,7 @@ GG.charge_count = 10 /datum/event2/event/gravity/end() - gravity_is_on = 1 + GLOB.gravity_is_on = TRUE var/did_anything = FALSE for(var/obj/machinery/gravity_generator/main/GG in generators) diff --git a/code/modules/gamemaster/event2/events/everyone/infestation.dm b/code/modules/gamemaster/event2/events/everyone/infestation.dm index a8da58c11b..6b2f906c0c 100644 --- a/code/modules/gamemaster/event2/events/everyone/infestation.dm +++ b/code/modules/gamemaster/event2/events/everyone/infestation.dm @@ -3,7 +3,7 @@ departments = list(DEPARTMENT_EVERYONE) /datum/event2/meta/infestation/get_weight() - return metric.count_people_in_department(DEPARTMENT_EVERYONE) * 10 + return GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 10 /datum/event2/meta/infestation/rodents name = "infestation - rodents" diff --git a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm index 06be920f9f..d59d648815 100644 --- a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm +++ b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm @@ -4,7 +4,7 @@ event_type = /datum/event2/event/pda_spam /datum/event2/meta/pda_spam/get_weight() - return metric.count_people_in_department(DEPARTMENT_EVERYONE) * 2 + return GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 2 /datum/event2/event/pda_spam diff --git a/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm b/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm index d5c4592b3f..0ccf78aa06 100644 --- a/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm @@ -6,8 +6,8 @@ event_type = /datum/event2/event/radiation_storm /datum/event2/meta/radiation_storm/get_weight() - var/medical_factor = metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10 - var/population_factor = metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5 // Note medical people will get counted twice at 25 weight. + var/medical_factor = GLOB.metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10 + var/population_factor = GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5 // Note medical people will get counted twice at 25 weight. return 20 + medical_factor + population_factor diff --git a/code/modules/gamemaster/event2/events/everyone/random_antag.dm b/code/modules/gamemaster/event2/events/everyone/random_antag.dm index b061ffc58d..4bd9f8e2fd 100644 --- a/code/modules/gamemaster/event2/events/everyone/random_antag.dm +++ b/code/modules/gamemaster/event2/events/everyone/random_antag.dm @@ -14,7 +14,7 @@ // This has an abnormally high weight due to antags being very important for the round, // however the weight will decay with more antags, and more attempts to add antags. /datum/event2/meta/random_antagonist/get_weight() - var/antags = metric.count_all_antags() + var/antags = GLOB.metric.count_all_antags() return 200 / (antags + times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm index 809e131911..f75ceea0ec 100644 --- a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm @@ -4,8 +4,8 @@ event_type = /datum/event2/event/solar_storm /datum/event2/meta/solar_storm/get_weight() - var/population_factor = metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 - var/space_factor = metric.count_all_space_mobs() * 50 + var/population_factor = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 + var/space_factor = GLOB.metric.count_all_space_mobs() * 50 return (20 + population_factor + space_factor) / (times_ran + 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 4c767fbb93..34d4ace746 100644 --- a/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm +++ b/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm @@ -6,7 +6,7 @@ /datum/event2/meta/sudden_weather_shift/get_weight() // The proc name is a bit misleading, it only counts players outside, not all mobs. - return (metric.count_all_outdoor_mobs() * 20) / (times_ran + 1) + return (GLOB.metric.count_all_outdoor_mobs() * 20) / (times_ran + 1) /datum/event2/event/sudden_weather_shift start_delay_lower_bound = 30 SECONDS diff --git a/code/modules/gamemaster/event2/events/medical/appendicitis.dm b/code/modules/gamemaster/event2/events/medical/appendicitis.dm index cf626c2cd0..cdb527990f 100644 --- a/code/modules/gamemaster/event2/events/medical/appendicitis.dm +++ b/code/modules/gamemaster/event2/events/medical/appendicitis.dm @@ -6,11 +6,11 @@ event_type = /datum/event2/event/appendicitis /datum/event2/meta/appendicitis/get_weight() - var/list/doctors = metric.get_people_with_job(/datum/job/doctor) + var/list/doctors = GLOB.metric.get_people_with_job(/datum/job/doctor) - doctors -= metric.get_people_with_alt_title(/datum/job/doctor, /datum/alt_title/nurse) - doctors -= metric.get_people_with_alt_title(/datum/job/doctor, /datum/alt_title/virologist) - doctors += metric.get_people_with_job(/datum/job/cmo) + doctors -= GLOB.metric.get_people_with_alt_title(/datum/job/doctor, /datum/alt_title/nurse) + doctors -= GLOB.metric.get_people_with_alt_title(/datum/job/doctor, /datum/alt_title/virologist) + doctors += GLOB.metric.get_people_with_job(/datum/job/cmo) return doctors.len * 10 @@ -27,7 +27,7 @@ continue // Or doctors (otherwise it could be possible for the only surgeon to need surgery). - if(H in metric.get_people_with_job(/datum/job/doctor) ) + if(H in GLOB.metric.get_people_with_job(/datum/job/doctor) ) continue if(H.appendicitis()) diff --git a/code/modules/gamemaster/event2/events/security/carp_migration.dm b/code/modules/gamemaster/event2/events/security/carp_migration.dm index 77e72d044e..6b44023aa7 100644 --- a/code/modules/gamemaster/event2/events/security/carp_migration.dm +++ b/code/modules/gamemaster/event2/events/security/carp_migration.dm @@ -7,7 +7,7 @@ event_type = /datum/event2/event/mob_spawning/carp_migration /datum/event2/meta/carp_migration/get_weight() - return 10 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 20) + (metric.count_all_space_mobs() * 40) + return 10 + (GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) * 20) + (GLOB.metric.count_all_space_mobs() * 40) /datum/event2/event/mob_spawning/carp_migration diff --git a/code/modules/gamemaster/event2/events/security/drill_announcement.dm b/code/modules/gamemaster/event2/events/security/drill_announcement.dm index f44cf134d2..36d667a2c3 100644 --- a/code/modules/gamemaster/event2/events/security/drill_announcement.dm +++ b/code/modules/gamemaster/event2/events/security/drill_announcement.dm @@ -5,8 +5,8 @@ event_type = /datum/event2/event/security_drill /datum/event2/meta/security_drill/get_weight() - var/sec = metric.count_people_in_department(DEPARTMENT_SECURITY) - var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE) + var/sec = GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) + var/everyone = GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) if(!sec) // If there's no security, then there is no drill. return 0 diff --git a/code/modules/gamemaster/event2/events/security/prison_break.dm b/code/modules/gamemaster/event2/events/security/prison_break.dm index 2166f64779..421335d52c 100644 --- a/code/modules/gamemaster/event2/events/security/prison_break.dm +++ b/code/modules/gamemaster/event2/events/security/prison_break.dm @@ -13,7 +13,7 @@ /datum/event2/meta/prison_break/get_weight() // First, don't do this if nobody can fix the doors. - var/door_fixers = metric.count_people_in_department(DEPARTMENT_ENGINEERING) + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) + var/door_fixers = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) + GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC) if(!door_fixers) return 0 var/list/afflicted_departments = departments.Copy() @@ -21,7 +21,7 @@ afflicted_departments -= DEPARTMENT_SYNTHETIC for(var/D in afflicted_departments) - afflicted_crew += metric.count_people_in_department(D) + afflicted_crew += GLOB.metric.count_people_in_department(D) // Don't do it if nobody is around to ""appreciate"" it. if(!afflicted_crew) @@ -59,7 +59,7 @@ for(var/mob/living/L in player_list) if(is_mob_in_relevant_area(L)) // Don't count them if they're in security. - if(!(L in metric.count_people_in_department(DEPARTMENT_SECURITY))) + if(!(L in GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY))) . += 40 @@ -110,7 +110,7 @@ for(var/mob/living/L in player_list) if(is_mob_in_relevant_area(L)) // Don't count them if they're in medical. - if(!(L in metric.count_people_in_department(DEPARTMENT_MEDICAL))) + if(!(L in GLOB.metric.count_people_in_department(DEPARTMENT_MEDICAL))) . += 40 @@ -194,11 +194,11 @@ within approximately three minutes. Direct intervention is required immediately. Disabling the \ main breaker in the APCs will protect the APC's room from being compromised." - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) MS.send_rc_message(DEPARTMENT_ENGINEERING, my_department, "[message]
    ", "", "", 2) // Nobody reads the requests consoles so lets use the radio as well. - global_announcer.autosay(message, my_department, DEPARTMENT_ENGINEERING) + GLOB.global_announcer.autosay(message, my_department, DEPARTMENT_ENGINEERING) for(var/mob/living/silicon/ai/A in player_list) to_chat(A, span_danger("Malicious program detected in the [area_display_name] lighting and airlock control systems by [my_department]. \ @@ -227,7 +227,7 @@ 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") - global_announcer.autosay( + GLOB.global_announcer.autosay( "It is now safe to reactivate the APCs' main breakers inside [area_display_name].", "[location_name()] Firewall Subroutines", DEPARTMENT_ENGINEERING diff --git a/code/modules/gamemaster/event2/events/security/rogue_drones.dm b/code/modules/gamemaster/event2/events/security/rogue_drones.dm index d7402d3822..d3f24b77df 100644 --- a/code/modules/gamemaster/event2/events/security/rogue_drones.dm +++ b/code/modules/gamemaster/event2/events/security/rogue_drones.dm @@ -7,8 +7,8 @@ /datum/event2/meta/rogue_drones/get_weight() . = 10 // Start with a base weight, since this event does provide some value even if no sec is around. - . += metric.count_people_in_department(DEPARTMENT_SECURITY) * 20 - . += metric.count_all_space_mobs() * 40 + . += GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) * 20 + . += GLOB.metric.count_all_space_mobs() * 40 /datum/event2/event/mob_spawning/rogue_drones diff --git a/code/modules/gamemaster/event2/events/security/security_advisement.dm b/code/modules/gamemaster/event2/events/security/security_advisement.dm index df16418e9f..14dd7b0251 100644 --- a/code/modules/gamemaster/event2/events/security/security_advisement.dm +++ b/code/modules/gamemaster/event2/events/security/security_advisement.dm @@ -6,23 +6,23 @@ /datum/event2/meta/security_screening/get_weight() . = 0 - var/sec = metric.count_people_in_department(DEPARTMENT_SECURITY) + var/sec = GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) if(!sec < 2) return 0 // Can't screen with no security. . += sec * 10 - . += metric.count_people_in_department(DEPARTMENT_EVERYONE) * 2 + . += GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 2 // Having ""suspecious"" people present makes this more likely to be picked. var/suspicious_people = 0 - suspicious_people += metric.count_all_of_specific_species(SPECIES_PROMETHEAN) * 20 - suspicious_people += metric.count_all_of_specific_species(SPECIES_UNATHI) * 10 - suspicious_people += metric.count_all_of_specific_species(SPECIES_ZADDAT) * 10 - suspicious_people += metric.count_all_of_specific_species(SPECIES_SKRELL) * 5 // Not sure why skrell are so high. - suspicious_people += metric.count_all_of_specific_species(SPECIES_TAJARAN) * 5 - suspicious_people += metric.count_all_of_specific_species(SPECIES_TESHARI) * 5 - suspicious_people += metric.count_all_of_specific_species(SPECIES_HUMAN_VATBORN) * 5 - suspicious_people += metric.count_all_FBPs_of_kind(FBP_DRONE) * 20 - suspicious_people += metric.count_all_FBPs_of_kind(FBP_POSI) * 10 + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_PROMETHEAN) * 20 + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_UNATHI) * 10 + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_ZADDAT) * 10 + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_SKRELL) * 5 // Not sure why skrell are so high. + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_TAJARAN) * 5 + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_TESHARI) * 5 + suspicious_people += GLOB.metric.count_all_of_specific_species(SPECIES_HUMAN_VATBORN) * 5 + suspicious_people += GLOB.metric.count_all_FBPs_of_kind(FBP_DRONE) * 20 + suspicious_people += GLOB.metric.count_all_FBPs_of_kind(FBP_POSI) * 10 if(!suspicious_people) return 0 . += suspicious_people @@ -52,7 +52,7 @@ // First pass makes popular things more likely to get picked, e.g. 5 prommies vs 1 drone. for(var/species_name in species_weights) var/give_weight = 0 - for(var/datum/data/record/R in data_core.general) + for(var/datum/data/record/R in GLOB.data_core.general) if(R.fields["species"] == species_name) give_weight += species_weights[species_name] @@ -60,7 +60,7 @@ for(var/bot_type in synth_weights) var/give_weight = 0 - for(var/datum/data/record/R in data_core.general) + for(var/datum/data/record/R in GLOB.data_core.general) if(R.fields["brain_type"] == bot_type) give_weight += synth_weights[bot_type] @@ -72,11 +72,11 @@ var/victim_chosen = pickweight(end_weights) if(victim_chosen in synth_weights) - if(metric.count_all_FBPs_of_kind(victim_chosen) > 0) + if(GLOB.metric.count_all_FBPs_of_kind(victim_chosen) > 0) victim = victim_chosen break else - if(metric.count_all_of_specific_species(victim_chosen) > 0) + if(GLOB.metric.count_all_of_specific_species(victim_chosen) > 0) victim = victim_chosen break if(!victim) diff --git a/code/modules/gamemaster/event2/events/security/spider_infestation.dm b/code/modules/gamemaster/event2/events/security/spider_infestation.dm index 811a9d483a..bc2bd45f0d 100644 --- a/code/modules/gamemaster/event2/events/security/spider_infestation.dm +++ b/code/modules/gamemaster/event2/events/security/spider_infestation.dm @@ -14,8 +14,8 @@ /datum/event2/meta/spider_infestation/get_weight() . = 10 - . += metric.count_people_in_department(DEPARTMENT_SECURITY) * 20 - . += metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10 + . += GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) * 20 + . += GLOB.metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10 // This isn't a /mob_spawning subtype since spiderlings aren't actually mobs. @@ -36,7 +36,7 @@ /datum/event2/event/spider_infestation/start() var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in get_location_z_levels())) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/gamemaster/event2/events/security/stowaway.dm b/code/modules/gamemaster/event2/events/security/stowaway.dm index 4953e145d0..cdc7344c0f 100644 --- a/code/modules/gamemaster/event2/events/security/stowaway.dm +++ b/code/modules/gamemaster/event2/events/security/stowaway.dm @@ -26,9 +26,9 @@ if(istype(ticker.mode, /datum/game_mode/extended) && !safe_for_extended) return 0 - var/security = metric.count_people_in_department(DEPARTMENT_SECURITY) - var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE) - security - var/ghost_activity = metric.assess_all_dead_mobs() / 100 + var/security = GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) + var/everyone = GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) - security + var/ghost_activity = GLOB.metric.assess_all_dead_mobs() / 100 return ( (security * 20) + (everyone * 2) ) * ghost_activity diff --git a/code/modules/gamemaster/event2/events/security/surprise_carp.dm b/code/modules/gamemaster/event2/events/security/surprise_carp.dm index 534e91e2ce..3b495bccac 100644 --- a/code/modules/gamemaster/event2/events/security/surprise_carp.dm +++ b/code/modules/gamemaster/event2/events/security/surprise_carp.dm @@ -8,7 +8,7 @@ event_type = /datum/event2/event/surprise_carp /datum/event2/meta/surprise_carp/get_weight() - return metric.count_all_space_mobs() * 50 + return GLOB.metric.count_all_space_mobs() * 50 /datum/event2/event/surprise_carp diff --git a/code/modules/gamemaster/event2/events/security/swarm_boarder.dm b/code/modules/gamemaster/event2/events/security/swarm_boarder.dm index 300751b28c..a1e07e21b7 100644 --- a/code/modules/gamemaster/event2/events/security/swarm_boarder.dm +++ b/code/modules/gamemaster/event2/events/security/swarm_boarder.dm @@ -12,11 +12,11 @@ if(istype(ticker.mode, /datum/game_mode/extended) && !safe_for_extended) return 0 - var/security = metric.count_people_in_department(DEPARTMENT_SECURITY) - var/engineering = metric.count_people_in_department(DEPARTMENT_ENGINEERING) - var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE) - (engineering + security) + var/security = GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY) + var/engineering = GLOB.metric.count_people_in_department(DEPARTMENT_ENGINEERING) + var/everyone = GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) - (engineering + security) - var/ghost_activity = metric.assess_all_dead_mobs() / 100 + var/ghost_activity = GLOB.metric.assess_all_dead_mobs() / 100 return ( (security * 20) + (engineering * 10) + (everyone * 2) ) * ghost_activity diff --git a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm index c2416ae426..6f21cf41ee 100644 --- a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm +++ b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm @@ -6,7 +6,7 @@ event_type = /datum/event2/event/ion_storm /datum/event2/meta/ion_storm/get_weight() - var/list/bots = metric.get_people_in_department(DEPARTMENT_SYNTHETIC) + var/list/bots = GLOB.metric.get_people_in_department(DEPARTMENT_SYNTHETIC) . = 5 // A small chance even if no synths are on, since it can still emag beepsky. for(var/mob/living/silicon/S in bots) if(istype(S, /mob/living/silicon/robot/drone)) // Drones don't get their laws screwed with, so don't count them. diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm index be3af2dac2..c441f50f4b 100644 --- a/code/modules/holomap/station_holomap.dm +++ b/code/modules/holomap/station_holomap.dm @@ -80,7 +80,7 @@ startWatching(AM) /obj/machinery/station_map/Uncross(atom/movable/mover, turf/target) - if(get_dir(mover, target) == reverse_dir[dir]) + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) return FALSE return TRUE /obj/machinery/station_map/proc/startWatching(var/mob/user) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 75b86d4b40..f13880210f 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -244,7 +244,7 @@ closed_turfs |= T valid_turfs |= T - for(var/dir in alldirs) + for(var/dir in GLOB.alldirs) var/turf/neighbor = get_step(T,dir) if(!neighbor || (neighbor in closed_turfs) || (neighbor in open_turfs)) continue diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 831c1775eb..da861c97c3 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -3,8 +3,8 @@ /proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15) spawn() //to stop the secrets panel hanging - if(vinestart.len) //Pick a turf to spawn at if we can - var/turf/simulated/floor/T = pick(vinestart) + if(GLOB.vinestart.len) //Pick a turf to spawn at if we can + var/turf/simulated/floor/T = pick(GLOB.vinestart) var/datum/seed/seed = SSplants.create_random_seed(1) seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines. seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects. @@ -206,7 +206,7 @@ var/direction = 16 - for(var/wallDir in cardinal) + for(var/wallDir in GLOB.cardinal) var/turf/newTurf = get_step(T,wallDir) if(newTurf.density) direction |= wallDir diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index 3fb81b28be..36d5717be7 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -2,7 +2,7 @@ /obj/effect/plant/proc/get_cardinal_neighbors() var/list/cardinal_neighbors = list() - for(var/check_dir in cardinal) + for(var/check_dir in GLOB.cardinal) var/turf/simulated/T = get_step(get_turf(src), check_dir) //VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy. if(istype(T) && !isopenturf(check_dir)) //Let's not have them go on open space where you can't really get to them. diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 687c6a8318..920cbe16cd 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -115,7 +115,7 @@ src.visible_message(span_danger("Tendrils lash out from \the [src] and drag \the [victim] in!")) victim.forceMove(src.loc) buckle_mob(victim) - victim.set_dir(pick(cardinal)) + victim.set_dir(pick(GLOB.cardinal)) to_chat(victim, span_danger("Tendrils [pick("wind", "tangle", "tighten")] around you!")) victim.Weaken(0.5) seed.do_thorns(victim,src) diff --git a/code/modules/integrated_electronics/core/assemblies/generic.dm b/code/modules/integrated_electronics/core/assemblies/generic.dm index 68b24d9052..bb0ae680c4 100644 --- a/code/modules/integrated_electronics/core/assemblies/generic.dm +++ b/code/modules/integrated_electronics/core/assemblies/generic.dm @@ -205,7 +205,7 @@ if(get_dist(on_wall,user) > 1) return var/ndir = get_dir(on_wall, user) - if(!(ndir in cardinal)) + if(!(ndir in GLOB.cardinal)) return var/turf/T = get_turf(user) if(!istype(T, /turf/simulated/floor)) diff --git a/code/modules/integrated_electronics/core/special_pins/char_pin.dm b/code/modules/integrated_electronics/core/special_pins/char_pin.dm index 2964e93e4c..c44fc6f04f 100644 --- a/code/modules/integrated_electronics/core/special_pins/char_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/char_pin.dm @@ -19,7 +19,7 @@ /datum/integrated_io/char/scramble() if(!is_valid()) return - var/list/options = list("!","@","#","$","%","^","&","*") + alphabet_uppercase + var/list/options = list("!","@","#","$","%","^","&","*") + GLOB.alphabet_upper data = pick(options) push_data() diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm index 9ce3699d1d..8e1ad2337d 100644 --- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm @@ -20,7 +20,7 @@ write_data_to_pin(new_data) /datum/integrated_io/dir/write_data_to_pin(var/new_data) - if(isnull(new_data) || (new_data in (alldirs + list(UP, DOWN)))) + if(isnull(new_data) || (new_data in (GLOB.alldirs + list(UP, DOWN)))) data = new_data holder.on_data_written() diff --git a/code/modules/integrated_electronics/core/special_pins/string_pin.dm b/code/modules/integrated_electronics/core/special_pins/string_pin.dm index eeefc7f607..fe68ee691f 100644 --- a/code/modules/integrated_electronics/core/special_pins/string_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/string_pin.dm @@ -21,7 +21,7 @@ if(!is_valid()) return var/string_length = length(data) - var/list/options = list("!","@","#","$","%","^","&","*") + alphabet_uppercase + var/list/options = list("!","@","#","$","%","^","&","*") + GLOB.alphabet_upper var/new_data = "" while(string_length) new_data += pick(options) diff --git a/code/modules/lighting/sunlight_handler.dm b/code/modules/lighting/sunlight_handler.dm index 32641a73f2..bb889ca9e7 100644 --- a/code/modules/lighting/sunlight_handler.dm +++ b/code/modules/lighting/sunlight_handler.dm @@ -62,7 +62,7 @@ GENERATE_MISSING_CORNERS(holder) //Somehow corners are self destructing under specific circumstances. Likely race conditions. This is slightly unoptimal but may be necessary. sunlight_check() //Also not optimal but made necessary by race conditions sunlight_update() - for(var/dir in (cardinal + cornerdirs)) + for(var/dir in (GLOB.cardinal + GLOB.cornerdirs)) var/turf/simulated/T = get_step(holder, dir) if(istype(T) && T.shandler) T.shandler.sunlight_update() @@ -168,7 +168,7 @@ if(try_get_sun() && !holder.is_outdoors() && !holder.density) var/outside_near = FALSE outer_loop: - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) var/steps = 1 var/turf/cur_turf = get_step(holder,dir) while(cur_turf && !cur_turf.density && steps < (SUNLIGHT_RADIUS + 1)) @@ -177,10 +177,10 @@ break outer_loop steps += 1 cur_turf = get_step(cur_turf,dir) - if(!outside_near) //If cardinal directions fail, then check diagonals. + if(!outside_near) //If GLOB.cardinal directions fail, then check diagonals. var/radius = ONE_OVER_SQRT_2 * SUNLIGHT_RADIUS + 1 outer_loop: - for(var/dir in cornerdirs) + for(var/dir in GLOB.cornerdirs) var/steps = 1 var/turf/cur_turf = get_step(holder,dir) var/opp_dir = turn(dir,180) diff --git a/code/modules/materials/materials/glass.dm b/code/modules/materials/materials/glass.dm index 4c01caede3..b7c3ef7359 100644 --- a/code/modules/materials/materials/glass.dm +++ b/code/modules/materials/materials/glass.dm @@ -40,7 +40,7 @@ return 1 // Get data for building windows here. - var/list/possible_directions = cardinal.Copy() + var/list/possible_directions = GLOB.cardinal.Copy() var/window_count = 0 for (var/obj/structure/window/check_window in user.loc) window_count++ diff --git a/code/modules/mining/machinery/machine_processing.dm b/code/modules/mining/machinery/machine_processing.dm index bcf3a9a916..e63f09772c 100644 --- a/code/modules/mining/machinery/machine_processing.dm +++ b/code/modules/mining/machinery/machine_processing.dm @@ -196,10 +196,10 @@ // TODO - Eschew input/output machinery and just use dirs ~Leshana //Locate our output and input machinery. - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(src.input) break - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(src.output) break return diff --git a/code/modules/mining/machinery/machine_stacking.dm b/code/modules/mining/machinery/machine_stacking.dm index 7c145c509a..d388ecb28d 100644 --- a/code/modules/mining/machinery/machine_stacking.dm +++ b/code/modules/mining/machinery/machine_stacking.dm @@ -88,10 +88,10 @@ stack_storage[s_matname] = 0 stack_paths[s_matname] = S - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(src.input) break - for (var/dir in cardinal) + for (var/dir in GLOB.cardinal) src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(src.output) break diff --git a/code/modules/mining/machinery/machine_unloading.dm b/code/modules/mining/machinery/machine_unloading.dm index 0900a3c520..cfb66a0b5f 100644 --- a/code/modules/mining/machinery/machine_unloading.dm +++ b/code/modules/mining/machinery/machine_unloading.dm @@ -13,11 +13,11 @@ /obj/machinery/mineral/unloading_machine/Initialize(mapload) . = ..() - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) input = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(input) break - for(var/dir in cardinal) + for(var/dir in GLOB.cardinal) output = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(output) break diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 2da2f85458..7e0ab8554d 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -207,7 +207,7 @@ var/list/mining_overlay_cache = list() if(density && mineral) . = INITIALIZE_HINT_LATELOAD if(random_icon) - dir = pick(alldirs) + dir = pick(GLOB.alldirs) . = INITIALIZE_HINT_LATELOAD /turf/simulated/mineral/LateInitialize() @@ -229,7 +229,7 @@ var/list/mining_overlay_cache = list() icon_state = rock_icon_state //Apply overlays if we should have borders - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src,direction) if(istype(T) && !T.density) add_overlay(get_cached_border(rock_side_icon_state,direction,icon,rock_side_icon_state)) @@ -250,7 +250,7 @@ var/list/mining_overlay_cache = list() add_overlay("dug_overlay") //Apply overlays if there's space - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(istype(get_step(src, direction), /turf/space) && !istype(get_step(src, direction), /turf/space/cracked_asteroid)) add_overlay(get_cached_border("asteroid_edge",direction,icon,"asteroid_edges", 0)) @@ -264,7 +264,7 @@ var/list/mining_overlay_cache = list() add_overlay(overlay_detail_icon_path,overlay_detail) if(update_neighbors) - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) if(istype(get_step(src, direction), /turf/simulated/mineral)) var/turf/simulated/mineral/M = get_step(src, direction) M.update_icon() @@ -336,7 +336,7 @@ var/list/mining_overlay_cache = list() /turf/simulated/mineral/proc/MineralSpread() if(mineral && mineral.spread) - for(var/trydir in cardinal) + for(var/trydir in GLOB.cardinal) if(prob(mineral.spread_chance)) var/turf/simulated/mineral/target_turf = get_step(src, trydir) if(istype(target_turf) && target_turf.density && !target_turf.mineral) diff --git a/code/modules/mob/dead/observer/free_vr.dm b/code/modules/mob/dead/observer/free_vr.dm index 3c47edd972..64d232b0fa 100644 --- a/code/modules/mob/dead/observer/free_vr.dm +++ b/code/modules/mob/dead/observer/free_vr.dm @@ -47,13 +47,13 @@ GLOBAL_LIST_EMPTY(prevent_respawns) //Cut the PDA manifest (ugh) if(GLOB.PDA_Manifest.len) GLOB.PDA_Manifest.Cut() - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if((R.fields["name"] == src.real_name)) qdel(R) - for(var/datum/data/record/T in data_core.security) + for(var/datum/data/record/T in GLOB.data_core.security) if((T.fields["name"] == src.real_name)) qdel(T) - for(var/datum/data/record/G in data_core.general) + for(var/datum/data/record/G in GLOB.data_core.general) if((G.fields["name"] == src.real_name)) qdel(G) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index abefdead64..d92ecf8cf3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -132,8 +132,8 @@ add_overlay(H.overlays_standing) default_pixel_x = M.default_pixel_x default_pixel_y = M.default_pixel_y - if(!T && length(latejoin)) - T = get_turf(pick(latejoin)) //Safety in case we cannot find the body's position + if(!T && length(GLOB.latejoin)) + T = get_turf(pick(GLOB.latejoin)) //Safety in case we cannot find the body's position if(T) forceMove(T, just_spawned = TRUE) else @@ -714,10 +714,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return var/timedifference = world.time - client.time_died_as_mouse - if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) + if(client.time_died_as_mouse && timedifference <= CONFIG_GET(number/mouse_respawn_time) MINUTES) var/timedifference_text - timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") - to_chat(src, span_warning("You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.")) + timedifference_text = time2text(CONFIG_GET(number/mouse_respawn_time) MINUTES - timedifference,"mm:ss") + to_chat(src, span_warning("You may only spawn again as a mouse more than [CONFIG_GET(number/mouse_respawn_time)] minutes after your death. You have [timedifference_text] left.")) return var/response = tgui_alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!")) @@ -728,7 +728,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/mob/living/simple_mob/animal/passive/mouse/host var/obj/machinery/atmospherics/unary/vent_pump/vent_found var/list/found_vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines) + for(var/obj/machinery/atmospherics/unary/vent_pump/v in GLOB.machines) if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20) found_vents.Add(v) if(found_vents.len) diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index e870b89e11..97d78a1a75 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -409,14 +409,14 @@ // Used for A-star pathfinding -// Returns the surrounding cardinal turfs with open links +// Returns the surrounding GLOB.cardinal turfs with open links // Including through doors openable with the ID /turf/proc/CardinalTurfsWithAccess(var/obj/item/card/id/ID) var/L[] = new() // for(var/turf/simulated/t in oview(src,1)) - for(var/d in cardinal) + for(var/d in GLOB.cardinal) var/turf/T = get_step(src, d) if(istype(T) && !T.density) if(!LinkBlockedWithAccess(src, T, ID)) @@ -424,11 +424,11 @@ return L -// Similar to above but not restricted to just cardinal directions. +// Similar to above but not restricted to just GLOB.cardinal directions. /turf/proc/TurfsWithAccess(var/obj/item/card/id/ID) var/L[] = new() - for(var/d in alldirs) + for(var/d in GLOB.alldirs) var/turf/T = get_step(src, d) if(istype(T) && !T.density) if(!LinkBlockedWithAccess(src, T, ID)) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index d46c69027d..d13cff36eb 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -146,7 +146,7 @@ visible_message(span_warning("[src] is trying to inject [H]!")) if(declare_treatment) var/area/location = get_area(src) - global_announcer.autosay("[src] is treating [H] in [location]", "[src]", "Medical") + GLOB.global_announcer.autosay("[src] is treating [H] in [location]", "[src]", "Medical") busy = 1 update_icons() if(do_mob(src, H, 30)) @@ -404,7 +404,7 @@ if(MEDBOT_PANIC_ENDING) messagevoice = list("Is this the end?" = 'sound/voice/medbot/is_this_the_end.ogg', "Nooo!" = 'sound/voice/medbot/nooo.ogg') if(MEDBOT_PANIC_END) - global_announcer.autosay("PSYCH ALERT: Crewmember [tipper_name] recorded displaying antisocial tendencies torturing bots in [get_area(src)]. Please schedule psych evaluation.", "[src]", "Medical") + GLOB.global_announcer.autosay("PSYCH ALERT: Crewmember [tipper_name] recorded displaying antisocial tendencies torturing bots in [get_area(src)]. Please schedule psych evaluation.", "[src]", "Medical") set_right() // strong independent medbot // if(prob(tipped_status)) // Commented out pending introduction of jitter stuff from /tg/ diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index 53d45385ba..17eca61097 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -50,7 +50,7 @@ var/mob/living/L = pulledby UnarmedAttack(L) say("Do not interfere with active law enforcement routines!") - global_announcer.autosay("[src] was interfered with in [get_area(src)], activating defense routines.", "[src]", "Security") + GLOB.global_announcer.autosay("[src] was interfered with in [get_area(src)], activating defense routines.", "[src]", "Security") //VOREStation Add End /mob/living/bot/secbot/beepsky name = "Officer Beepsky" @@ -201,7 +201,7 @@ if(!target) playsound(src, pick(threat_found_sounds), 50) - global_announcer.autosay("[src] was attacked by a hostile [target_name(attacker)] in [get_area(src)].", "[src]", "Security") + GLOB.global_announcer.autosay("[src] was attacked by a hostile [target_name(attacker)] in [get_area(src)].", "[src]", "Security") target = attacker attacked = TRUE @@ -209,7 +209,7 @@ /mob/living/bot/secbot/proc/demand_surrender(mob/target, var/threat) var/suspect_name = target_name(target) if(declare_arrests) - global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect [suspect_name] in [get_area(src)].", "[src]", "Security") + GLOB.global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect [suspect_name] in [get_area(src)].", "[src]", "Security") say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME*2] seconds to comply.") playsound(src, pick(preparing_arrest_sounds), 50) // Register to be told when the target moves @@ -266,7 +266,7 @@ var/action = arrest_type ? "detaining" : "arresting" if(!ishuman(target)) action = "fighting" - global_announcer.autosay("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] [target_name(target)] in [get_area(src)].", "[src]", "Security") + GLOB.global_announcer.autosay("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] [target_name(target)] in [get_area(src)].", "[src]", "Security") UnarmedAttack(target) /mob/living/bot/secbot/handlePanic() // Speed modification based on alert level. diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index 08d2692a8d..e4a3f35c8f 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -71,6 +71,6 @@ var/list/_nymph_default_emotes = list( if(D.stat != CONSCIOUS) return if(prob(33) && D.canmove && isturf(D.loc) && !D.pulledby) //won't move if being pulled - step(D, pick(cardinal)) + step(D, pick(GLOB.cardinal)) if(prob(1)) D.emote(pick("scratch","jump","chirp","roll")) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index bb4b770859..365c1a5ce0 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -13,7 +13,7 @@ for(var/obj/item/organ/I in internal_organs) I.removed() if(isturf(I?.loc)) // Some organs qdel themselves or other things when removed - I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) + I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),30) for(var/obj/item/organ/external/E in src.organs) E.droplimb(0,DROPLIMB_EDGE,1) @@ -22,7 +22,7 @@ for(var/obj/item/I in src) drop_from_inventory(I) - I.throw_at(get_edge_target_turf(src,pick(alldirs)), rand(1,3), round(30/I.w_class)) + I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)), rand(1,3), round(30/I.w_class)) ..(species.gibbed_anim) // uses the default mob.dmi file for these, so we only need to specify the first argument gibs(loc, dna, null, species.get_flesh_colour(src), species.get_blood_colour(src)) diff --git a/code/modules/mob/living/carbon/human/death_vr.dm b/code/modules/mob/living/carbon/human/death_vr.dm index 6917fe7abc..41d63107c9 100644 --- a/code/modules/mob/living/carbon/human/death_vr.dm +++ b/code/modules/mob/living/carbon/human/death_vr.dm @@ -7,7 +7,7 @@ if(!deadnif.gib_nodrop) deadnif.unimplant(src) deadnif.forceMove(drop_location()) - deadnif.throw_at(get_edge_target_turf(src,pick(alldirs)), rand(1,3), round(30/deadnif.w_class)) + deadnif.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)), rand(1,3), round(30/deadnif.w_class)) deadnif.wear(10) //Presumably it's gone through some shit if they got gibbed? . = ..() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 87fab5e641..b3e8f46840 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -407,7 +407,7 @@ var/obj/item/pda/P = wear_id perpname = P.owner - for (var/datum/data/record/R in data_core.security) + for (var/datum/data/record/R in GLOB.data_core.security) if(R.fields["name"] == perpname) criminal = R.fields["criminal"] @@ -426,7 +426,7 @@ var/obj/item/pda/P = wear_id perpname = P.owner - for (var/datum/data/record/R in data_core.medical) + for (var/datum/data/record/R in GLOB.data_core.medical) if (R.fields["name"] == perpname) medical = R.fields["p_stat"] diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6e84658e4d..4fc44d0b71 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -415,9 +415,9 @@ perpname = name if(perpname) - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) + for (var/datum/data/record/R in GLOB.data_core.security) if (R.fields["id"] == E.fields["id"]) var/setcriminal = tgui_input_list(usr, "Specify a new criminal status for this person.", "Security HUD", list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")) @@ -449,9 +449,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) + for (var/datum/data/record/R in GLOB.data_core.security) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"security")) var/list/security_hud_text = list() @@ -479,9 +479,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) + for (var/datum/data/record/R in GLOB.data_core.security) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"security")) read = 1 @@ -504,9 +504,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) + for (var/datum/data/record/R in GLOB.data_core.security) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"security")) var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Sec. records", null, null, multiline = TRUE, prevent_enter = TRUE)) @@ -517,10 +517,10 @@ counter++ if(ishuman(usr)) var/mob/living/carbon/human/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
    [t1]") + R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
    [t1]") if(istype(usr,/mob/living/silicon/robot)) var/mob/living/silicon/robot/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
    [t1]") + R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
    [t1]") if (href_list["medical"]) if(hasHUD(usr,"medical")) @@ -533,9 +533,9 @@ else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.general) + for (var/datum/data/record/R in GLOB.data_core.general) if (R.fields["id"] == E.fields["id"]) var/setmedical = tgui_input_list(usr, "Specify a new medical status for this person.", "Medical HUD", list("*SSD*", "*Deceased*", "Physically Unfit", "Active", "Disabled", "Cancel")) @@ -568,9 +568,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.medical) + for (var/datum/data/record/R in GLOB.data_core.medical) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"medical")) var/list/medical_hud_text = list() @@ -599,9 +599,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.medical) + for (var/datum/data/record/R in GLOB.data_core.medical) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"medical")) read = 1 @@ -624,9 +624,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.medical) + for (var/datum/data/record/R in GLOB.data_core.medical) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"medical")) var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Med. records", null, null, multiline = TRUE, prevent_enter = TRUE)) @@ -637,10 +637,10 @@ counter++ if(ishuman(usr)) var/mob/living/carbon/human/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
    [t1]") + R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
    [t1]") if(istype(usr,/mob/living/silicon/robot)) var/mob/living/silicon/robot/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
    [t1]") + R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
    [t1]") if (href_list["emprecord"]) if(hasHUD(usr,"best")) @@ -652,9 +652,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.general) + for (var/datum/data/record/R in GLOB.data_core.general) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"best")) var/list/emp_hud_text = list() @@ -685,9 +685,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.general) + for (var/datum/data/record/R in GLOB.data_core.general) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"best")) read = 1 @@ -710,9 +710,9 @@ perpname = I.registered_name else perpname = name - for (var/datum/data/record/E in data_core.general) + for (var/datum/data/record/E in GLOB.data_core.general) if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.general) + for (var/datum/data/record/R in GLOB.data_core.general) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"best")) var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Emp. records", null, null, multiline = TRUE, prevent_enter = TRUE)) @@ -723,10 +723,10 @@ counter++ if(ishuman(usr)) var/mob/living/carbon/human/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
    [t1]") + R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
    [t1]") if(istype(usr,/mob/living/silicon/robot)) var/mob/living/silicon/robot/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
    [t1]") + R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
    [t1]") if (href_list["lookitem"]) var/obj/item/I = locate(href_list["lookitem"]) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index d396bb5686..b9b0f0d6fd 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -352,7 +352,7 @@ attack_message = "[H] attempted to strike [src], but missed!" else attack_message = "[H] attempted to strike [src], but [TT.he] rolled out of the way!" - src.set_dir(pick(cardinal)) + src.set_dir(pick(GLOB.cardinal)) miss_type = 1 if(!miss_type && block) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 7a9cd4b6c1..2478707a65 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -465,7 +465,7 @@ This function restores all organs. */ /mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = FALSE) - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: human/apply_damage() was called on [src], with [damage] damage, an armor value of [blocked], and a soak value of [soaked].") var/obj/item/organ/external/organ = null if(isorgan(def_zone)) @@ -548,7 +548,7 @@ This function restores all organs. if(soaked) damage -= soaked - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: [src] was hit for [damage].") switch(damagetype) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index b462501d35..d1c0bb7873 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -312,7 +312,7 @@ emp_act return 0 if(effective_force > 10 || effective_force >= 5 && prob(33)) - forcesay(hit_appends) //forcesay checks stat already + forcesay(GLOB.hit_appends) //forcesay checks stat already if(prob(25 + (effective_force * 2))) if(!((I.damtype == BRUTE) || (I.damtype == HALLOSS))) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index a6ffa4ba2f..78032ed328 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -146,20 +146,20 @@ return FBP_NONE /mob/living/carbon/human/make_hud_overlays() - hud_list[HEALTH_HUD] = gen_hud_image(ingame_hud_med, src, "100", plane = PLANE_CH_HEALTH) + hud_list[HEALTH_HUD] = gen_hud_image(GLOB.ingame_hud_med, src, "100", plane = PLANE_CH_HEALTH) if(isSynthetic()) - hud_list[STATUS_HUD] = gen_hud_image(ingame_hud, src, "hudrobo", plane = PLANE_CH_STATUS) - hud_list[LIFE_HUD] = gen_hud_image(ingame_hud, src, "hudrobo", plane = PLANE_CH_LIFE) + hud_list[STATUS_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudrobo", plane = PLANE_CH_STATUS) + hud_list[LIFE_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudrobo", plane = PLANE_CH_LIFE) else - hud_list[STATUS_HUD] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS) - hud_list[LIFE_HUD] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_LIFE) + hud_list[STATUS_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS) + hud_list[LIFE_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudhealthy", plane = PLANE_CH_LIFE) hud_list[ID_HUD] = gen_hud_image(using_map.id_hud_icons, src, "hudunknown", plane = PLANE_CH_ID) - hud_list[WANTED_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_WANTED) - hud_list[IMPLOYAL_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPLOYAL) - hud_list[IMPCHEM_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPCHEM) - hud_list[IMPTRACK_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK) - hud_list[SPECIALROLE_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL) - hud_list[STATUS_HUD_OOC] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC) + hud_list[WANTED_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_WANTED) + hud_list[IMPLOYAL_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_IMPLOYAL) + hud_list[IMPCHEM_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_IMPCHEM) + 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) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 8c72bbaa00..7ba3d25c00 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -232,7 +232,7 @@ if(direct & WH.wind_dir) . = max(. - WH.wind_speed, -1) // Wind speedup is capped to prevent supersonic speeds from a storm. // Against it. - else if(direct & reverse_dir[WH.wind_dir]) + else if(direct & GLOB.reverse_dir[WH.wind_dir]) . += WH.wind_speed */ diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 94ac5b92f6..ebf09ec327 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1860,9 +1860,9 @@ if(T.get_lumcount() <= LIGHTING_SOFT_THRESHOLD) if(text2num(time2text(world.timeofday, "MM")) == 4) if(text2num(time2text(world.timeofday, "DD")) == 1) - playsound_local(src,pick(scawwySownds),50, 0) + playsound_local(src,pick(GLOB.scawwySownds),50, 0) return - playsound_local(src,pick(scarySounds),50, 1, -1) + playsound_local(src,pick(GLOB.scarySounds),50, 1, -1) /mob/living/carbon/human/proc/handle_changeling() if(mind && mind.changeling) @@ -2168,9 +2168,9 @@ if(I) perpname = I.registered_name - for(var/datum/data/record/E in data_core.general) + for(var/datum/data/record/E in GLOB.data_core.general) if(E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) + for (var/datum/data/record/R in GLOB.data_core.security) if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) holder.icon_state = "hudwanted" break @@ -2217,8 +2217,8 @@ var/image/holder = grab_hud(SPECIALROLE_HUD) holder.icon_state = "hudblank" if(mind && mind.special_role) - if(hud_icon_reference[mind.special_role]) - holder.icon_state = hud_icon_reference[mind.special_role] + if(GLOB.hud_icon_reference[mind.special_role]) + holder.icon_state = GLOB.hud_icon_reference[mind.special_role] else holder.icon_state = "hudsyndicate" apply_hud(SPECIALROLE_HUD, holder) diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm index 60bdef3a16..86ebfc8a5b 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm @@ -157,7 +157,7 @@ //Affect nearby lights var/destroy_lights = 0 - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != z || get_dist(src,L) > 10) continue diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index 099a9947cb..b7586de241 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -60,7 +60,7 @@ // Traitgenes Monkeys perform emotes based on their traits if(H.canmove && isturf(H.loc) && !H.pulledby) //won't move if being pulled if(prob(33)) - step(H, pick(cardinal)) + step(H, pick(GLOB.cardinal)) if(prob(5)) // Handle generic gene expression emotes if(!H.species || !H.species.traits || H.species.traits.len == 0) diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 1e3b7b8dbe..099b7314f5 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -74,7 +74,7 @@ var/global/list/sparring_attack_cache = list() else target.visible_message(span_danger("[target] slams into [T]!")) if(prob(50)) - target.set_dir(reverse_dir[target.dir]) + target.set_dir(GLOB.reverse_dir[target.dir]) target.apply_effect(attack_damage * 0.4, WEAKEN, armour) if(BP_GROIN) target.visible_message(span_warning("[target] looks like [TT.he] [TT.is] in pain!"), span_warning("[(target.gender=="female") ? "Oh god that hurt!" : "Oh no, not your[pick("testicles", "crown jewels", "clockweights", "family jewels", "marbles", "bean bags", "teabags", "sweetmeats", "goolies")]!"]")) // I see no easy way to fix this for non-organic or neuter characters. diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index e91f8105e0..1922f97392 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -9,7 +9,7 @@ standard 0 if fail */ /mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = 0) - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: apply_damage() was called on [src], with [damage] damage, and an armor value of [blocked].") if(!damage || (blocked >= 100)) return 0 @@ -140,7 +140,7 @@ /mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/check_protection = 1) - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: apply_effect() was called. The type of effect is [effecttype]. Blocked by [blocked].") if(!effect || (blocked >= 100)) return 0 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0bd7041750..08e3b8ac67 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -16,7 +16,7 @@ dsma.blend_mode = BLEND_ADD dsoverlay.appearance = dsma - selected_image = image(icon = buildmode_hud, loc = src, icon_state = "ai_sel") + selected_image = image(icon = GLOB.buildmode_hud, loc = src, icon_state = "ai_sel") /mob/living/Destroy() SSradiation.listeners -= src diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 5ec9d1d61d..97e12bb821 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -12,7 +12,7 @@ A number between 0 and 100, with higher numbers resulting in less damage taken. */ /mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/armour_pen = 0, var/absorb_text = null, var/soften_text = null) - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: getarmor() was called.") if(armour_pen >= 100) @@ -22,7 +22,7 @@ if(armor) var/armor_variance_range = round(armor * 0.25) //Armor's effectiveness has a +25%/-25% variance. var/armor_variance = rand(-armor_variance_range, armor_variance_range) //Get a random number between -25% and +25% of the armor's base value - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: The range of armor variance is [armor_variance_range]. The variance picked by RNG is [armor_variance].") armor = min(armor + armor_variance, 100) //Now we calcuate damage using the new armor percentage. @@ -38,7 +38,7 @@ to_chat(src, span_danger("[soften_text]")) else to_chat(src, span_danger("Your armor softens the blow!")) - if(Debug2) + if(GLOB.Debug2) to_world_log("## DEBUG: Armor when [src] was attacked was [armor].") return armor diff --git a/code/modules/mob/living/organs.dm b/code/modules/mob/living/organs.dm index 2e03e66fb9..ba3fc510fa 100644 --- a/code/modules/mob/living/organs.dm +++ b/code/modules/mob/living/organs.dm @@ -29,7 +29,7 @@ for(var/obj/item/organ/I in internal_organs) I.removed() if(isturf(I?.loc)) // Some organs qdel themselves or other things when removed - I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) + I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),30) for(var/obj/item/organ/external/E in src.organs) if(!ispath(E)) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 2c6d16907a..f03c4ce732 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -12,7 +12,7 @@ remove_ai_verbs(src) - for(var/obj/machinery/ai_status_display/O in machines) + for(var/obj/machinery/ai_status_display/O in GLOB.machines) spawn( 0 ) O.mode = 2 if (istype(loc, /obj/item/aicard)) diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index bcb9f54423..72d1b9756d 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -25,7 +25,7 @@ GLOBAL_LIST_EMPTY(empty_playable_ai_cores) // We warned you. GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc) - global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight") + GLOB.global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight") //Handle job slot/tater cleanup. set_respawn_timer() diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm index ab87a5e588..bf72f84736 100644 --- a/code/modules/mob/living/silicon/ai/login.dm +++ b/code/modules/mob/living/silicon/ai/login.dm @@ -3,7 +3,7 @@ for(var/obj/effect/rune/rune in rune_list) client.images += rune.blood_image if(stat != DEAD) - for(var/obj/machinery/ai_status_display/O in machines) //change status + for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status O.mode = 1 O.emotion = "Neutral" if(multicam_on) diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm index 2ca83c1506..4cb5c1ebda 100644 --- a/code/modules/mob/living/silicon/ai/logout.dm +++ b/code/modules/mob/living/silicon/ai/logout.dm @@ -1,6 +1,6 @@ /mob/living/silicon/ai/Logout() ..() - for(var/obj/machinery/ai_status_display/O in machines) //change status + for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status O.mode = 0 if(!isturf(loc)) if (client) diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 4283d9ca10..c022581acd 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -32,7 +32,7 @@ base.plane = PLATING_PLANE base.appearance_flags = PIXEL_SCALE - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/mutable_appearance/dir = new /mutable_appearance(base) dir.dir = direction dir.icon_state = "background_highlight_[direction]" diff --git a/code/modules/mob/living/silicon/decoy/death.dm b/code/modules/mob/living/silicon/decoy/death.dm index c90a4623e9..f9690c464f 100644 --- a/code/modules/mob/living/silicon/decoy/death.dm +++ b/code/modules/mob/living/silicon/decoy/death.dm @@ -3,6 +3,6 @@ icon_state = "ai-crash" spawn(10) explosion(loc, 3, 6, 12, 15) - for(var/obj/machinery/ai_status_display/O in machines) //change status + for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status O.mode = 2 return ..(gibbed) diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 70991957ae..195e14983e 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -298,7 +298,7 @@ pai_nom(A) // Allow card inhabited machines to be interacted with -// This has to override ClickOn because of storage depth nonsense with how pAIs are in cards in machines +// This has to override ClickOn because of storage depth nonsense with how pAIs are in cards in GLOB.machines /mob/living/silicon/pai/ClickOn(var/atom/A, var/params) if(istype(A, /obj/machinery)) var/obj/machinery/M = A diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 0eeafb9390..afe6d01382 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -111,8 +111,8 @@ /datum/pai_software/crew_manifest/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() - if(data_core) - data_core.get_manifest_list() + if(GLOB.data_core) + GLOB.data_core.get_manifest_list() data["manifest"] = GLOB.PDA_Manifest return data @@ -142,7 +142,7 @@ var/list/data = ..() var/list/records = list() - for(var/datum/data/record/general in sortRecord(data_core.general)) + for(var/datum/data/record/general in sortRecord(GLOB.data_core.general)) var/list/record = list() record["name"] = general.fields["name"] record["ref"] = "\ref[general]" @@ -169,11 +169,11 @@ if(record) var/datum/data/record/R = record var/datum/data/record/M = null - if (!( data_core.general.Find(R) )) + if (!( GLOB.data_core.general.Find(R) )) P.medical_cannotfind = 1 else P.medical_cannotfind = 0 - for(var/datum/data/record/E in data_core.medical) + for(var/datum/data/record/E in GLOB.data_core.medical) if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) M = E P.medicalActive1 = R @@ -198,7 +198,7 @@ var/list/data = ..() var/list/records = list() - for(var/datum/data/record/general in sortRecord(data_core.general)) + for(var/datum/data/record/general in sortRecord(GLOB.data_core.general)) var/list/record = list() record["name"] = general.fields["name"] record["ref"] = "\ref[general]" @@ -225,13 +225,13 @@ if(record) var/datum/data/record/R = record var/datum/data/record/S = null - if (!( data_core.general.Find(R) )) + if (!( GLOB.data_core.general.Find(R) )) P.securityActive1 = null P.securityActive2 = null P.security_cannotfind = 1 else P.security_cannotfind = 0 - for(var/datum/data/record/E in data_core.security) + for(var/datum/data/record/E in GLOB.data_core.security) if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) S = E P.securityActive1 = R diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm index 2e46709dff..a4bb527feb 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm @@ -432,7 +432,7 @@ if(href_list["sync"]) synced = TRUE var/success = 0 - for(var/obj/machinery/r_n_d/server/S in machines) + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) for(var/datum/tech/T in files.known_tech) //Uploading S.files.AddTech2Known(T) for(var/datum/tech/T in S.files.known_tech) //Downloading diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index b7c91775e6..a77af34812 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -280,7 +280,7 @@ var/list/mob_hat_cache = list() log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.") var/time = time2text(world.realtime,"hh:mm:ss") - lawchanges.Add("[time] " + span_bold(":") + " [user.name]([user.key]) emagged [name]([key])") + GLOB.lawchanges.Add("[time] " + span_bold(":") + " [user.name]([user.key]) emagged [name]([key])") emagged = 1 lawupdate = 0 diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index da7e3c196a..b6b227a310 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -141,7 +141,7 @@ return var/list/all_fabricators = list() - for(var/obj/machinery/drone_fabricator/DF in machines) + for(var/obj/machinery/drone_fabricator/DF in GLOB.machines) if(DF.stat & NOPOWER || !DF.produce_drones) continue if(DF.drone_progress >= 100) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3f012f490e..5f78b50729 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1302,7 +1302,7 @@ clear_inherent_laws() laws = new /datum/ai_laws/syndicate_override var/time = time2text(world.realtime,"hh:mm:ss") - lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") + GLOB.lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.") . = 1 diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index cd04086258..89febc3b2f 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -61,7 +61,7 @@ to_chat(user, span_filter_notice("The [src] is empty. Put something inside it first.")) if(response == "Sync") var/success = 0 - for(var/obj/machinery/r_n_d/server/S in machines) + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) for(var/datum/tech/T in files.known_tech) //Uploading S.files.AddTech2Known(T) for(var/datum/tech/T in S.files.known_tech) //Downloading diff --git a/code/modules/mob/living/silicon/robot/robot_ui_module.dm b/code/modules/mob/living/silicon/robot/robot_ui_module.dm index f76cebdec1..ae01402039 100644 --- a/code/modules/mob/living/silicon/robot/robot_ui_module.dm +++ b/code/modules/mob/living/silicon/robot/robot_ui_module.dm @@ -39,13 +39,13 @@ if(LAZYLEN(R.restrict_modules_to) > 0) modules.Add(R.restrict_modules_to) else if(R.shell) - modules.Add(shell_module_types) + modules.Add(GLOB.shell_module_types) else - modules.Add(robot_module_types) + modules.Add(GLOB.robot_module_types) if(R.crisis || GLOB.security_level >= SEC_LEVEL_RED || R.crisis_override) to_chat(R, span_red("Crisis mode active. Combat module available.")) - modules |= emergency_module_types - for(var/module_name in whitelisted_module_types) + modules |= GLOB.emergency_module_types + for(var/module_name in GLOB.whitelisted_module_types) if(is_borg_whitelisted(R, module_name)) modules |= module_name data["possible_modules"] = modules diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm index 2270a002bc..3fc02abeb4 100644 --- a/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/code/modules/mob/living/simple_mob/simple_mob.dm @@ -347,8 +347,8 @@ return span_italics("[tt_desc]") /mob/living/simple_mob/make_hud_overlays() - hud_list[STATUS_HUD] = gen_hud_image(buildmode_hud, src, "ai_0", plane = PLANE_BUILDMODE) - hud_list[LIFE_HUD] = gen_hud_image(buildmode_hud, src, "ais_1", plane = PLANE_BUILDMODE) + hud_list[STATUS_HUD] = gen_hud_image(GLOB.buildmode_hud, src, "ai_0", plane = PLANE_BUILDMODE) + hud_list[LIFE_HUD] = gen_hud_image(GLOB.buildmode_hud, src, "ais_1", plane = PLANE_BUILDMODE) add_overlay(hud_list) //Makes it so that simplemobs can understand galcomm without being able to speak it. diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm index dba72108eb..b337ace184 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm @@ -1077,7 +1077,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? tepholder.lay_down() return var/moving_to = 0 // Apparently this is required or it always picks 4, according to the previous developer for simplemob AI. - moving_to = pick(cardinal) + moving_to = pick(GLOB.cardinal) holder.set_dir(moving_to) T = get_step(holder,moving_to) // Finally do move if we actually found somewhere we'd like to go diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm index 440a8260c7..803bfd688b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm @@ -172,7 +172,7 @@ else to_world("Going to move away randomly") var/turf/move_to = get_turf(L) - move_to = get_step(move_to, pick(cardinal)) + move_to = get_step(move_to, pick(GLOB.cardinal)) for(var/i = 1 to vision_range) // Move them this many steps away from where they were before. move_to = get_step_away(move_to, L, 7) if(move_to) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm index 32df5fc739..8a70544e3f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm @@ -215,7 +215,7 @@ I.attack_hand(holder) lose_target() if(isliving(A) && holder.Adjacent(A)) // Not the dumbest tool in the shed. If we're fighting, we're gonna dance around them. - holder.IMove(get_step(holder, pick(alldirs))) + holder.IMove(get_step(holder, pick(GLOB.alldirs))) holder.face_atom(A) request_help() // And we're going to call friends, too. diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/siffet.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/siffet.dm index da75d3c9b2..b49d86947f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/siffet.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/siffet.dm @@ -52,7 +52,7 @@ /datum/ai_holder/simple_mob/siffet/post_melee_attack(atom/A) //Evasive if(holder.Adjacent(A)) - holder.IMove(get_step(holder, pick(alldirs))) + holder.IMove(get_step(holder, pick(GLOB.alldirs))) holder.face_atom(A) /mob/living/simple_mob/animal/sif/siffet/IIsAlly(mob/living/L) diff --git a/code/modules/mob/living/simple_mob/subtypes/glamour/blaidd.dm b/code/modules/mob/living/simple_mob/subtypes/glamour/blaidd.dm index e3e7d20eb2..2947f4dac5 100644 --- a/code/modules/mob/living/simple_mob/subtypes/glamour/blaidd.dm +++ b/code/modules/mob/living/simple_mob/subtypes/glamour/blaidd.dm @@ -309,7 +309,7 @@ on_engagement(target) if(firing_lanes && !test_projectile_safety(target)) // Nudge them a bit, maybe they can shoot next time. - var/turf/T = get_step(holder, pick(cardinal)) + var/turf/T = get_step(holder, pick(GLOB.cardinal)) if(T) holder.IMove(T) // IMove() will respect movement cooldown. holder.face_atom(target) diff --git a/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm b/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm index a28c22fdab..bd4f433d74 100644 --- a/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm +++ b/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm @@ -370,7 +370,7 @@ on_engagement(target) if(firing_lanes && !test_projectile_safety(target)) // Nudge them a bit, maybe they can shoot next time. - var/turf/T = get_step(holder, pick(cardinal)) + var/turf/T = get_step(holder, pick(GLOB.cardinal)) if(T) holder.IMove(T) // IMove() will respect movement cooldown. holder.face_atom(target) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm index 3e1f1e4016..71131c7d9a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm @@ -68,7 +68,7 @@ //Affect nearby lights var/destroy_lights = 0 - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != z || get_dist(src,L) > 10) continue diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/devil.dm b/code/modules/mob/living/simple_mob/subtypes/vore/devil.dm index 95fb1362df..8e9f9d01f0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/devil.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/devil.dm @@ -254,7 +254,7 @@ on_engagement(target) if(firing_lanes && !test_projectile_safety(target)) // Nudge them a bit, maybe they can shoot next time. - var/turf/T = get_step(holder, pick(cardinal)) + var/turf/T = get_step(holder, pick(GLOB.cardinal)) if(T) holder.IMove(T) // IMove() will respect movement cooldown. holder.face_atom(target) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm b/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm index 63531849a6..0ec7313dfc 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm @@ -200,7 +200,7 @@ return var/moving_to = 0 // Apparently this is required or it always picks 4, according to the previous developer for simplemob AI. - moving_to = pick(cardinal) + moving_to = pick(GLOB.cardinal) holder.set_dir(moving_to) holder.IMove(get_step(holder,moving_to)) wander_delay = base_wander_delay diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/meowl.dm b/code/modules/mob/living/simple_mob/subtypes/vore/meowl.dm index 80a252104d..bd05f8d6c6 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/meowl.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/meowl.dm @@ -210,7 +210,7 @@ on_engagement(target) if(firing_lanes && !test_projectile_safety(target)) // Nudge them a bit, maybe they can shoot next time. - var/turf/T = get_step(holder, pick(cardinal)) + var/turf/T = get_step(holder, pick(GLOB.cardinal)) if(T) holder.IMove(T) // IMove() will respect movement cooldown. holder.face_atom(target) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm b/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm index dffdfdc88f..e02e8b9a5f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm @@ -46,7 +46,7 @@ //Affect nearby lights - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != z || get_dist(src,L) > 10) continue diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm b/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm index e02408e979..91ad0f6bbb 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm @@ -253,7 +253,7 @@ if(ishuman(prey)) vore_selected.digest_mode = DM_HOLD if(check_threat(prey) >= 4) - global_announcer.autosay("[src] is detaining suspect [target_name(prey)] in [get_area(src)].", "SmartCollar oversight", "Security") + GLOB.global_announcer.autosay("[src] is detaining suspect [target_name(prey)] in [get_area(src)].", "SmartCollar oversight", "Security") if(istype(prey,/mob/living/simple_mob/animal/passive/mouse)) vore_selected.digest_mode = DM_DIGEST . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm index af91a6de69..0d00285272 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm @@ -83,7 +83,7 @@ if(eye_state == PURPLE_EYES) destroy_lights = 25 - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != z || get_dist(src,L) > 10) continue diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm index 725b4a29ab..022da7b345 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm @@ -408,7 +408,7 @@ //Random walk if(!moving_to) - moving_to = pick(cardinal) + moving_to = pick(GLOB.cardinal) dir = moving_to var/turf/T = get_step(src,moving_to) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/stalker.dm b/code/modules/mob/living/simple_mob/subtypes/vore/stalker.dm index cbc412f281..8d22dcca3e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/stalker.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/stalker.dm @@ -264,7 +264,7 @@ on_engagement(target) if(firing_lanes && !test_projectile_safety(target)) // Nudge them a bit, maybe they can shoot next time. - var/turf/T = get_step(holder, pick(cardinal)) + var/turf/T = get_step(holder, pick(GLOB.cardinal)) if(T) holder.IMove(T) // IMove() will respect movement cooldown. holder.face_atom(target) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 94672c6878..97304d659a 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -411,13 +411,13 @@ //Cut the PDA manifest (ugh) if(GLOB.PDA_Manifest.len) GLOB.PDA_Manifest.Cut() - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if((R.fields["name"] == real_name)) qdel(R) - for(var/datum/data/record/T in data_core.security) + for(var/datum/data/record/T in GLOB.data_core.security) if((T.fields["name"] == real_name)) qdel(T) - for(var/datum/data/record/G in data_core.general) + for(var/datum/data/record/G in GLOB.data_core.general) if((G.fields["name"] == real_name)) qdel(G) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 028d48135a..3ceb299d8c 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -326,7 +326,7 @@ var/rand_set = list("#","@","*","&","%","$","/", "<", ">", ";","*","*","*","*","*","*","*") if(p >= 80) - rand_set += alphabet_uppercase + rand_set += GLOB.alphabet_upper for(var/j = 1, j <= rand(0, 2), j++) letter += pick(rand_set) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index c17e90f98e..9d9c3cdebc 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -340,7 +340,7 @@ // Update all the grabs! for (var/obj/item/grab/G in my_mob) if (G.state == GRAB_NECK) - mob.set_dir(reverse_dir[direct]) + mob.set_dir(GLOB.reverse_dir[direct]) G.adjust_position() for (var/obj/item/grab/G in my_mob.grabbed_by) G.adjust_position() diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index a578ba97ca..36a6b9cc01 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -28,9 +28,9 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image /mob/new_player/Login() update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying - if(join_motd) - join_motd = GLOB.is_valid_url.Replace(join_motd,span_linkify("$1")) - to_chat(src, examine_block("
    [join_motd]
    ")) + if(GLOB.join_motd) + GLOB.join_motd = GLOB.is_valid_url.Replace(GLOB.join_motd, span_linkify("$1")) + to_chat(src, examine_block("
    [GLOB.join_motd]
    ")) if(has_respawned) to_chat(src, CONFIG_GET(string/respawn_message)) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 32ba3163d2..e44813c728 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -129,7 +129,7 @@ . = ..() . += "" - . += "Game Mode: [SSticker.hide_mode ? "Secret" : "[config.mode_names[master_mode]]"]" + . += "Game Mode: [SSticker.hide_mode ? "Secret" : "[config.mode_names[GLOB.master_mode]]"]" // if(SSvote.mode) // . += "Vote: [capitalize(SSvote.mode)] Time Left: [SSvote.time_remaining] s" @@ -138,7 +138,7 @@ . += "Time To Start: Server Initializing" else if(SSticker.current_state == GAME_STATE_PREGAME) - . += "Time To Start: [round(SSticker.pregame_timeleft,1)][round_progressing ? "" : " (DELAYED)"]" + . += "Time To Start: [round(SSticker.pregame_timeleft,1)][GLOB.round_progressing ? "" : " (DELAYED)"]" . += "Players: [totalPlayers]" . += "Players Ready: [totalPlayersReady]" totalPlayers = 0 @@ -517,7 +517,7 @@ AnnounceCyborg(character, rank, join_message, announce_channel, character.z) else AnnounceArrival(character, rank, join_message, announce_channel, character.z) - data_core.manifest_inject(character) + GLOB.data_core.manifest_inject(character) ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn if(ishuman(character)) if(character.client.prefs.auto_backup_implant) @@ -570,7 +570,7 @@ if(character.mind.role_alt_title) rank = character.mind.role_alt_title // can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc. - global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer", channel, zlevels) + GLOB.global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer", channel, zlevels) /mob/new_player/proc/LateChoices() if(!late_choices_dialog) diff --git a/code/modules/modular_computers/NTNet/NTNet.dm b/code/modules/modular_computers/NTNet/NTNet.dm index 88825af1fe..9c698a382b 100644 --- a/code/modules/modular_computers/NTNet/NTNet.dm +++ b/code/modules/modular_computers/NTNet/NTNet.dm @@ -41,7 +41,7 @@ var/global/datum/ntnet/ntnet_global = new() if(ntnet_global && (ntnet_global != src)) ntnet_global = src // There can be only one. if (SSatoms && SSatoms.initialized > INITIALIZATION_INSSATOMS) - for(var/obj/machinery/ntnet_relay/R in machines) + for(var/obj/machinery/ntnet_relay/R in GLOB.machines) relays.Add(R) R.NTNet = src build_software_lists() 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 85f8ceb087..7d5a71e287 100644 --- a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm +++ b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm @@ -41,7 +41,7 @@ var/warrant_uid = 0 data["type"] = activewarrant.fields["arrestsearch"] var/list/allwarrants = list() - for(var/datum/data/record/warrant/W in data_core.warrants) + for(var/datum/data/record/warrant/W in GLOB.data_core.warrants) allwarrants.Add(list(list( "warrantname" = W.fields["namewarrant"], "charges" = "[copytext(W.fields["charges"],1,min(length(W.fields["charges"]) + 1, 50))]...", @@ -64,7 +64,7 @@ var/warrant_uid = 0 if("editwarrant") . = TRUE - for(var/datum/data/record/warrant/W in data_core.warrants) + for(var/datum/data/record/warrant/W in GLOB.data_core.warrants) if(W.warrant_id == text2num(params["id"])) activewarrant = W break @@ -99,18 +99,18 @@ var/warrant_uid = 0 if("savewarrant") . = TRUE - data_core.warrants |= activewarrant + GLOB.data_core.warrants |= activewarrant activewarrant = null if("deletewarrant") . = TRUE - data_core.warrants -= activewarrant + GLOB.data_core.warrants -= activewarrant activewarrant = null if("editwarrantname") . = TRUE var/namelist = list() - for(var/datum/data/record/t in data_core.general) + for(var/datum/data/record/t in GLOB.data_core.general) namelist += t.fields["name"] var/new_name = sanitize(tgui_input_list(ui.user, "Please input name:", "Name Choice", namelist)) if(tgui_status(ui.user, state) == STATUS_INTERACTIVE) diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm index 94e5f96558..0b4ccd80dc 100644 --- a/code/modules/multiz/pipes.dm +++ b/code/modules/multiz/pipes.dm @@ -131,7 +131,7 @@ normalize_dir() var/node1_dir - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction @@ -168,7 +168,7 @@ normalize_dir() var/node1_dir - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction diff --git a/code/modules/multiz/portals_vr.dm b/code/modules/multiz/portals_vr.dm index 2206a1af3d..0422b50d70 100644 --- a/code/modules/multiz/portals_vr.dm +++ b/code/modules/multiz/portals_vr.dm @@ -179,7 +179,7 @@ /obj/structure/portal_gateway/Bumped(mob/M as mob|obj) if(ismob(M) && !(isliving(M))) return //do not send ghosts, zshadows, ai eyes, etc - var/obj/effect/landmark/dest = pick(eventdestinations) + var/obj/effect/landmark/dest = pick(GLOB.eventdestinations) if(dest) M << 'sound/effects/phasein.ogg' playsound(src, 'sound/effects/phasein.ogg', 100, 1) @@ -211,7 +211,7 @@ if(istype(II,/obj/item/implant) || istype(II,/obj/item/nif)) continue MI.drop_from_inventory(II, dest.loc) - var/obj/effect/landmark/finaldest = pick(awayabductors) + var/obj/effect/landmark/finaldest = pick(GLOB.awayabductors) MI.forceMove(finaldest.loc) sleep(1) MI.Paralyse(10) @@ -221,7 +221,7 @@ if(istype(I,/obj/item/implant) || istype(I,/obj/item/nif)) continue L.drop_from_inventory(I, dest.loc) - var/obj/effect/landmark/finaldest = pick(awayabductors) + var/obj/effect/landmark/finaldest = pick(GLOB.awayabductors) L.forceMove(finaldest.loc) sleep(1) L.Paralyse(10) diff --git a/code/modules/multiz/stairs.dm b/code/modules/multiz/stairs.dm index 08b55ad004..8ef370ceae 100644 --- a/code/modules/multiz/stairs.dm +++ b/code/modules/multiz/stairs.dm @@ -120,7 +120,7 @@ return TRUE // Else, we have to look in other directions - for(var/dir in cardinal - src.dir) + for(var/dir in GLOB.cardinal - src.dir) B2 = get_step(src, dir) T2 = GetAbove(B2) if(!istype(B2) || !istype(T2)) @@ -293,7 +293,7 @@ return TRUE // Else, we have to look in other directions - for(var/dir in cardinal - src.dir) + for(var/dir in GLOB.cardinal - src.dir) B1 = get_step(src, turn(dir, 180)) O = GetAbove(B1) if(!istype(B1) || !istype(O)) @@ -377,7 +377,7 @@ return // Else, we have to look in other directions - for(var/dir in cardinal - src.dir) + for(var/dir in GLOB.cardinal - src.dir) O = get_step(src, turn(dir, 180)) B1 = GetBelow(O) if(!istype(B1) || !istype(O)) diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index 9c671bfe69..bcc59375e0 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -190,7 +190,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr /turf/simulated/floor/glass/proc/blend_icons() var/new_junction = NONE - for(var/direction in cardinal) //Cardinal case first. + for(var/direction in GLOB.cardinal) //GLOB.cardinal case first. var/turf/T = get_step(src, direction) if(istype(T, type)) new_junction |= direction diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c288b9d6f9..cd80e4158d 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -1003,7 +1003,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(!clean) // Throw limb around. if(src && istype(loc,/turf)) - throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5) + throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) dir = 2 if(DROPLIMB_BURN) new /obj/effect/decal/cleanable/ash(droploc) @@ -1021,19 +1021,19 @@ Note that amputating the affected organ does in fact remove the infection from t gore.basecolor = use_blood_colour gore.update_icon() - gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5) + gore.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) for(var/obj/item/organ/I in internal_organs) I.removed() if(istype(loc,/turf)) - I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5) + I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) for(var/obj/item/I in src) if(I.w_class <= ITEMSIZE_SMALL) qdel(I) continue I.forceMove(droploc) - I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5) + I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) qdel(src) diff --git a/code/modules/overmap/disperser/disperser_console.dm b/code/modules/overmap/disperser/disperser_console.dm index 1feea6d5fa..81d34c32c1 100644 --- a/code/modules/overmap/disperser/disperser_console.dm +++ b/code/modules/overmap/disperser/disperser_console.dm @@ -38,7 +38,7 @@ if(is_valid_setup()) return TRUE - for(var/obj/machinery/disperser/front/F in global.machines) + for(var/obj/machinery/disperser/front/F in GLOB.machines) if(get_dist(src, F) >= link_range) continue var/backwards = turn(F.dir, 180) diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm index abceccddd3..27a517e763 100644 --- a/code/modules/overmap/sectors.dm +++ b/code/modules/overmap/sectors.dm @@ -79,7 +79,7 @@ if(known) plane = PLANE_LIGHTING_ABOVE - for(var/obj/machinery/computer/ship/helm/H in global.machines) + for(var/obj/machinery/computer/ship/helm/H in GLOB.machines) H.get_known_sectors() else real_appearance = image(icon, src, icon_state) diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index 718a78e034..457fa1bca5 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -22,7 +22,7 @@ /obj/machinery/computer/ship/sensors/proc/find_sensors() if(!linked) return - for(var/obj/machinery/shipsensors/S in global.machines) + for(var/obj/machinery/shipsensors/S in GLOB.machines) if(linked.check_ownership(S)) sensors = S break diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index ba3eabbfb1..be5d123c18 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -284,7 +284,7 @@ /obj/effect/overmap/visitable/ship/populate_sector_objects() ..() - for(var/obj/machinery/computer/ship/S in global.machines) + for(var/obj/machinery/computer/ship/S in GLOB.machines) S.attempt_hook_up(src) for(var/datum/ship_engine/E in ship_engines) if(check_ownership(E.holder)) diff --git a/code/modules/overmap/turfs.dm b/code/modules/overmap/turfs.dm index c4f4955f57..b935842fcd 100644 --- a/code/modules/overmap/turfs.dm +++ b/code/modules/overmap/turfs.dm @@ -27,7 +27,7 @@ GLOBAL_LIST_EMPTY(map_sectors) /turf/unsimulated/map/edge/LateInitialize() //This could be done by using the using_map.overmap_size much faster, HOWEVER, doing it programatically to 'find' // the edges this way allows for 'sub overmaps' elsewhere and whatnot. - for(var/side in alldirs) //The order of this list is relevant: It should definitely break on finding a cardinal FIRST. + for(var/side in GLOB.alldirs) //The order of this list is relevant: It should definitely break on finding a GLOB.cardinal FIRST. var/turf/T = get_step(src, side) if(T?.type == /turf/unsimulated/map) //Not a wall, not something else, EXACTLY a flat map turf. map_is_to_my = side diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 4e75ee0c92..e3a8856e21 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -126,9 +126,9 @@ /obj/structure/filingcabinet/security/proc/populate() if(virgin) - for(var/datum/data/record/G in data_core.general) + for(var/datum/data/record/G in GLOB.data_core.general) var/datum/data/record/S - for(var/datum/data/record/R in data_core.security) + for(var/datum/data/record/R in GLOB.data_core.security) if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"])) S = R break @@ -161,9 +161,9 @@ /obj/structure/filingcabinet/medical/proc/populate() if(virgin) - for(var/datum/data/record/G in data_core.general) + for(var/datum/data/record/G in GLOB.data_core.general) var/datum/data/record/M - for(var/datum/data/record/R in data_core.medical) + for(var/datum/data/record/R in GLOB.data_core.medical) if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"])) M = R break diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index b628c73b31..23b44c0edb 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -67,7 +67,7 @@ for(var/i=(paperamount-max_paper);i>0;i--) var/obj/item/shreddedp/SP = get_shredded_paper() SP.loc = get_turf(src) - SP.throw_at(get_edge_target_turf(src,pick(alldirs)),1,5) + SP.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),1,5) paperamount = max_paper update_icon() return diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 9449bd970e..08d9ebff49 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -274,7 +274,7 @@ /* // Limit signatures to official crew members var/personnel_list[] = list() - for(var/datum/data/record/t in data_core.locked) //Look in data core locked. + for(var/datum/data/record/t in GLOB.data_core.locked) //Look in data core locked. personnel_list.Add(t.fields["name"]) personnel_list.Add("Anonymous") diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index 5fe97ac69c..1ef64e8209 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -131,12 +131,12 @@ /datum/data/pda/app/crew_records/update_ui(mob/user as mob, list/data) var/list/records[0] - if(general_records && (general_records in data_core.general)) + if(general_records && (general_records in GLOB.data_core.general)) data["records"] = records records["general"] = general_records.fields return records else - for(var/datum/data/record/R as anything in sortRecord(data_core.general)) + for(var/datum/data/record/R as anything in sortRecord(GLOB.data_core.general)) if(R) records += list(list(name = R.fields["name"], "ref" = "\ref[R]")) data["recordsList"] = records @@ -149,7 +149,7 @@ switch(action) if("Records") var/datum/data/record/R = locate(params["target"]) - if(R && (R in data_core.general)) + if(R && (R in GLOB.data_core.general)) load_records(R) return TRUE if("Back") @@ -174,14 +174,14 @@ if(!records) return - if(medical_records && (medical_records in data_core.medical)) + if(medical_records && (medical_records in GLOB.data_core.medical)) records["medical"] = medical_records.fields return records /datum/data/pda/app/crew_records/medical/load_records(datum/data/record/R) ..(R) - for(var/datum/data/record/E as anything in data_core.medical) + for(var/datum/data/record/E as anything in GLOB.data_core.medical) if(E && (E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) medical_records = E break @@ -199,14 +199,14 @@ if(!records) return - if(security_records && (security_records in data_core.security)) + if(security_records && (security_records in GLOB.data_core.security)) records["security"] = security_records.fields return records /datum/data/pda/app/crew_records/security/load_records(datum/data/record/R) ..(R) - for(var/datum/data/record/E as anything in data_core.security) + for(var/datum/data/record/E as anything in GLOB.data_core.security) if(E && (E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) security_records = E break diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm index 633d665736..7cd663b43f 100644 --- a/code/modules/pda/core_apps.dm +++ b/code/modules/pda/core_apps.dm @@ -65,7 +65,7 @@ /datum/data/pda/app/notekeeper/update_ui(mob/user as mob, list/data) data["note"] = note // current pda notes - data["notename"] = "Note [alphabet_uppercase[currentnote]] : [notetitle]" + data["notename"] = "Note [GLOB.alphabet_upper[currentnote]] : [notetitle]" /datum/data/pda/app/notekeeper/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) @@ -175,7 +175,7 @@ if(istype(I,/obj/item/paper)) var/obj/item/paper/P = I if(isnull(P.info) || P.info == "" ) - var/titlenote = "Note [alphabet_uppercase[currentnote]]" + var/titlenote = "Note [GLOB.alphabet_upper[currentnote]]" if(!isnull(notetitle) && notetitle != "") titlenote = notetitle to_chat(user, span_notice("Successfully printed [titlenote]!")) @@ -207,8 +207,8 @@ template = "pda_manifest" /datum/data/pda/app/manifest/update_ui(mob/user as mob, list/data) - if(data_core) - data_core.get_manifest_list() + if(GLOB.data_core) + GLOB.data_core.get_manifest_list() data["manifest"] = GLOB.PDA_Manifest /datum/data/pda/app/manifest/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) diff --git a/code/modules/pda/radio.dm b/code/modules/pda/radio.dm index 6f4a65ac79..fab19f180b 100644 --- a/code/modules/pda/radio.dm +++ b/code/modules/pda/radio.dm @@ -125,7 +125,7 @@ var/time = time2text(world.realtime,"hh:mm:ss") var/turf/T = get_turf(src) - lastsignalers.Add("[time] : [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) : [format_frequency(frequency)]/[code]") + GLOB.lastsignalers.Add("[time] : [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) : [format_frequency(frequency)]/[code]") var/datum/signal/signal = new signal.source = src diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm index 7eccdd8439..64a0ca4c82 100644 --- a/code/modules/pda/utilities.dm +++ b/code/modules/pda/utilities.dm @@ -187,7 +187,7 @@ var/scannedtitle = "Paper" if(!isnull(notes.notetitle) && notes.notetitle != "") scannedtitle = "'[notes.notetitle]'" - to_chat(user, span_notice("[scannedtitle] scanned to Notekeeper in note [alphabet_uppercase[notes.currentnote]]."))//concept of scanning paper copyright brainoblivion 2009 + to_chat(user, span_notice("[scannedtitle] scanned to Notekeeper in note [GLOB.alphabet_upper[notes.currentnote]]."))//concept of scanning paper copyright brainoblivion 2009 else to_chat(user, span_warning("Error scanning [A].")) diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index 3874e01e89..f38555231b 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -229,7 +229,7 @@ var/datum/planet/sif/planet_sif = null ..() for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) - for(var/dir_checked in cardinal) + for(var/dir_checked in GLOB.cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) @@ -264,7 +264,7 @@ var/datum/planet/sif/planet_sif = null ..() for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) - for(var/dir_checked in cardinal) + for(var/dir_checked in GLOB.cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) diff --git a/code/modules/planet/sun.dm b/code/modules/planet/sun.dm index 77f3840bd7..1f25b32603 100644 --- a/code/modules/planet/sun.dm +++ b/code/modules/planet/sun.dm @@ -115,7 +115,7 @@ var/list/localspreads // Test for corners - for(var/direction in cornerdirs) + for(var/direction in GLOB.cornerdirs) var/turf/dirturf = get_step(T, direction) if(dirturf && !dirturf.is_outdoors()) var/turf/TL = get_step(T, turn(direction, -45)) @@ -138,7 +138,7 @@ LAZYADD(localspreads[dirturf], OL) // Take all orthagonals - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/dirturf = get_step(T, direction) if(dirturf && !dirturf.is_outdoors()) var/turf/TL = get_step(T, turn(direction, -45)) @@ -166,7 +166,7 @@ for(var/turf/old as anything in applied) old.vis_contents -= applied[old] var/old_lit = FALSE - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) var/turf/CT = get_step(old, direction) if(CT && CT.is_outdoors()) old_lit = TRUE diff --git a/code/modules/planet/virgo3b_vr.dm b/code/modules/planet/virgo3b_vr.dm index 292afea2f5..daed13b0c9 100644 --- a/code/modules/planet/virgo3b_vr.dm +++ b/code/modules/planet/virgo3b_vr.dm @@ -218,7 +218,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null ..() for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) - for(var/dir_checked in cardinal) + for(var/dir_checked in GLOB.cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) @@ -255,7 +255,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null ..() for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) - for(var/dir_checked in cardinal) + for(var/dir_checked in GLOB.cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) diff --git a/code/modules/planet/virgo4_vr.dm b/code/modules/planet/virgo4_vr.dm index bb249aa61c..1023df4e01 100644 --- a/code/modules/planet/virgo4_vr.dm +++ b/code/modules/planet/virgo4_vr.dm @@ -202,7 +202,7 @@ var/datum/planet/virgo4/planet_virgo4 = null ..() for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) - for(var/dir_checked in cardinal) + for(var/dir_checked in GLOB.cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(33)) @@ -236,7 +236,7 @@ var/datum/planet/virgo4/planet_virgo4 = null ..() for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either if(S.z in holder.our_planet.expected_z_levels) - for(var/dir_checked in cardinal) + for(var/dir_checked in GLOB.cardinal) var/turf/simulated/floor/T = get_step(S, dir_checked) if(istype(T)) if(istype(T, /turf/simulated/floor/outdoors) && prob(50)) diff --git a/code/modules/planet/weather.dm b/code/modules/planet/weather.dm index 275ca72eaa..df69d7a185 100644 --- a/code/modules/planet/weather.dm +++ b/code/modules/planet/weather.dm @@ -149,7 +149,7 @@ wind_dir = 0 return wind_speed = new_wind_speed - wind_dir = pick(alldirs) + wind_dir = pick(GLOB.alldirs) var/message = "You feel the wind blowing [wind_speed > 2 ? "strongly ": ""]towards the [dir2text(wind_dir)]." message_all_outdoor_players(span_warning(message)) diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index e40795338a..08d361286e 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -1,7 +1,7 @@ //like orange but only checks north/south/east/west for one step /proc/cardinalrange(var/center) var/list/things = list() - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(center, direction) if(!T) continue things += T.contents @@ -112,7 +112,7 @@ /obj/machinery/am_shielding/update_icon() cut_overlays() - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) var/machine = locate(/obj/machinery, get_step(loc, direction)) if((istype(machine, /obj/machinery/am_shielding) && machine:control_unit == control_unit)||(istype(machine, /obj/machinery/power/am_control_unit) && machine == control_unit)) add_overlay("shield_[direction]") @@ -144,7 +144,7 @@ //Scans cards for shields or the control unit and if all there it /obj/machinery/am_shielding/proc/core_check() - for(var/direction in alldirs) + for(var/direction in GLOB.alldirs) var/machine = locate(/obj/machinery, get_step(loc, direction)) if(!machine) return 0//Need all for a core if(!istype(machine, /obj/machinery/am_shielding) && !istype(machine, /obj/machinery/power/am_control_unit)) return 0 diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 396b334234..fcb3b15082 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -326,7 +326,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( // merge with the powernets of power objects in the given direction /obj/structure/cable/proc/mergeConnectedNetworks(var/direction) - var/fdir = direction ? reverse_dir[direction] : 0 //flip the direction, to match with the source position on its turf + var/fdir = direction ? GLOB.reverse_dir[direction] : 0 //flip the direction, to match with the source position on its turf if(!(d1 == direction || d2 == direction)) //if the cable is not pointed in this direction, do nothing return @@ -406,13 +406,13 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( for(var/cable_dir in list(d1, d2)) if(cable_dir == 0) continue - var/reverse = reverse_dir[cable_dir] + var/reverse = GLOB.reverse_dir[cable_dir] T = get_zstep(src, cable_dir) if(T) for(var/obj/structure/cable/C in T) if(C.d1 == reverse || C.d2 == reverse) . += C - if(cable_dir & (cable_dir - 1)) // Diagonal, check for /\/\/\ style cables along cardinal directions + if(cable_dir & (cable_dir - 1)) // Diagonal, check for /\/\/\ style cables along GLOB.cardinal directions for(var/pair in list(NORTH|SOUTH, EAST|WEST)) T = get_step(src, cable_dir & pair) if(T) diff --git a/code/modules/power/fusion/_setup.dm b/code/modules/power/fusion/_setup.dm index e0ac485357..0ec1737aaf 100644 --- a/code/modules/power/fusion/_setup.dm +++ b/code/modules/power/fusion/_setup.dm @@ -17,7 +17,7 @@ to_chat(usr, "Error: you are not an admin!") return - if(!(locate(/obj/machinery/power/fusion_core/mapped) in machines)) + if(!(locate(/obj/machinery/power/fusion_core/mapped) in GLOB.machines)) to_chat(usr, "This map is not appropriate for this verb.") return @@ -31,16 +31,16 @@ log_and_message_admins("## FUSION CORE SETUP - Setup initiated by [usr].") - for(var/obj/machinery/fusion_fuel_injector/mapped/injector in machines) + for(var/obj/machinery/fusion_fuel_injector/mapped/injector in GLOB.machines) injector.cur_assembly = new /obj/item/fuel_assembly/deuterium(injector) injector.BeginInjecting() - var/obj/machinery/power/fusion_core/mapped/core = locate() in machines + var/obj/machinery/power/fusion_core/mapped/core = locate() in GLOB.machines if(core.jumpstart(15000)) var/list/delayed_objects = list() // SETUP PHASE - for(var/obj/effect/engine_setup/S in machines) + for(var/obj/effect/engine_setup/S in GLOB.machines) var/result = S.activate(0) switch(result) if(SETUP_OK) diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm index 324a3ce749..746152f331 100644 --- a/code/modules/power/fusion/core/_core.dm +++ b/code/modules/power/fusion/core/_core.dm @@ -46,7 +46,7 @@ GLOBAL_LIST_EMPTY(fusion_cores) connect_to_network() /obj/machinery/power/fusion_core/Destroy() - for(var/obj/machinery/computer/fusion_core_control/FCC in machines) + for(var/obj/machinery/computer/fusion_core_control/FCC in GLOB.machines) FCC.connected_devices -= src if(FCC.cur_viewed_device == src) FCC.cur_viewed_device = null diff --git a/code/modules/power/fusion/core/core_field.dm b/code/modules/power/fusion/core/core_field.dm index f19acbc9d3..3eba62d988 100644 --- a/code/modules/power/fusion/core/core_field.dm +++ b/code/modules/power/fusion/core/core_field.dm @@ -530,10 +530,10 @@ var/stablemessage = "Containment field returning to stable conditions." if(percent_unstable >= warnpoint) //we're unstable, start warning engineering - global_announcer.autosay(warnmessage, "Field Stability Monitor", "Engineering") + GLOB.global_announcer.autosay(warnmessage, "Field Stability Monitor", "Engineering") stable = FALSE //we know we're not stable, so let's not state the safe message. else if(percent_unstable < warnpoint && stable == 0) //The field is stable again. Let's set our safe variable and state the safe message. - global_announcer.autosay(stablemessage, "Field Stability Monitor", "Engineering") + GLOB.global_announcer.autosay(stablemessage, "Field Stability Monitor", "Engineering") stable = TRUE return @@ -592,7 +592,7 @@ visible_message(span_danger("\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!")) set_light(15, 15, "#CCCCFF") empulse(get_turf(src), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1)) - global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor") + GLOB.global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor") RadiateAll() var/list/things_in_range = range(10, owned_core) var/list/turfs_in_range = list() @@ -617,7 +617,7 @@ /obj/effect/fusion_em_field/proc/MRC() //spews electromagnetic pulses in an area around the core. visible_message(span_danger("\The [src] glows an extremely bright pink and flares out of existance!")) - global_announcer.autosay("Warning! Magnetic Resonance Cascade detected! Brace for electronic system distruption.", "Field Stability Monitor") + GLOB.global_announcer.autosay("Warning! Magnetic Resonance Cascade detected! Brace for electronic system distruption.", "Field Stability Monitor") set_light(15, 15, "#ff00d8") var/list/things_in_range = range(15, owned_core) var/list/turfs_in_range = list() @@ -630,7 +630,7 @@ return /obj/effect/fusion_em_field/proc/QuantumFluxCascade() //spews hot phoron and oxygen in a radius around the RUST. Will probably set fire to things - global_announcer.autosay("Warning! Quantum fluxuation detected! Flammable gas release expected.", "Field Stability Monitor") + GLOB.global_announcer.autosay("Warning! Quantum fluxuation detected! Flammable gas release expected.", "Field Stability Monitor") var/list/things_in_range = range(15, owned_core) var/list/turfs_in_range = list() for (var/turf/T in things_in_range) @@ -650,7 +650,7 @@ return /obj/effect/fusion_em_field/proc/MagneticQuench() //standard hard shutdown. dumps hot oxygen/phoron into the core's area and releases an EMP in the area around the core. - global_announcer.autosay("Warning! Magnetic Quench event detected, engaging hard shutdown.", "Field Stability Monitor") + GLOB.global_announcer.autosay("Warning! Magnetic Quench event detected, engaging hard shutdown.", "Field Stability Monitor") empulse(owned_core, 10, 15) var/turf/TT = get_turf(owned_core) if(istype(TT)) @@ -670,7 +670,7 @@ visible_message(span_danger("\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!")) set_light(15, 15, "#CCCCFF") empulse(get_turf(src), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1)) - global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor") + GLOB.global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor") RadiateAll() var/list/things_in_range = range(10, owned_core) var/list/turfs_in_range = list() diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index b147e2aab8..eaba3d8395 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(all_turbines) GLOB.all_turbines -= src return ..() -//generators connect in dir and reverse_dir(dir) directions +//generators connect in dir and GLOB.reverse_dir(dir) directions //mnemonic to determine circulator/generator directions: the cirulators orbit clockwise around the generator //so a circulator to the NORTH of the generator connects first to the EAST, then to the WEST //and a circulator to the WEST of the generator connects first to the NORTH, then to the SOUTH diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 3b31907345..aef05b5bd4 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -113,7 +113,7 @@ for(var/area/A in gravity_generator:localareas) var/obj/machinery/gravity_generator/G - for(G in machines) + for(G in GLOB.machines) if((A in G.localareas) && (G.on)) break if(!G) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 8f99e57399..a84a94b766 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -138,7 +138,7 @@ var/cdir var/turf/T - for(var/card in cardinal) + for(var/card in GLOB.cardinal) T = get_step(loc,card) cdir = get_dir(T,loc) @@ -157,7 +157,7 @@ var/cdir var/turf/T - for(var/card in cardinal) + for(var/card in GLOB.cardinal) T = get_step(loc,card) cdir = get_dir(T,loc) @@ -186,7 +186,7 @@ /proc/power_list(var/turf/T, var/source, var/d, var/unmarked=0, var/cable_only = 0) . = list() - var/reverse = d ? reverse_dir[d] : 0 + var/reverse = d ? GLOB.reverse_dir[d] : 0 for(var/AM in T) if(AM == source) continue //we don't want to return source diff --git a/code/modules/power/sensors/powernet_sensor.dm b/code/modules/power/sensors/powernet_sensor.dm index 39c62d48e1..a469b248c2 100644 --- a/code/modules/power/sensors/powernet_sensor.dm +++ b/code/modules/power/sensors/powernet_sensor.dm @@ -43,7 +43,7 @@ /obj/machinery/power/sensor/Destroy() . = ..() // TODO - Switch power_monitor to register deletion events instead of this. - for(var/obj/machinery/computer/power_monitor/PM in machines) + for(var/obj/machinery/computer/power_monitor/PM in GLOB.machines) if(PM.power_monitor) PM.power_monitor.refresh_sensors() history.Cut() diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index c75ab55c8c..80ad208397 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -347,7 +347,7 @@ //I want to avoid using global variables. spawn(1) var/temp = 1 //stops spam - for(var/obj/singularity/O in machines) + for(var/obj/singularity/O in GLOB.machines) if(O.last_warning && temp) if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 7e3ea8302a..607290203c 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -37,7 +37,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) . = ..() energy = starting_energy START_PROCESSING(SSobj, src) - for(var/obj/machinery/power/singularity_beacon/singubeacon in machines) + for(var/obj/machinery/power/singularity_beacon/singubeacon in GLOB.machines) if(singubeacon.active) target = singubeacon break @@ -282,7 +282,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) if(!move_self) return 0 - var/movement_dir = pick(alldirs - last_failed_movement) + var/movement_dir = pick(GLOB.alldirs - last_failed_movement) if(force_move) movement_dir = force_move diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 238204dc81..e721f78f7a 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -203,7 +203,7 @@ A.energy_fail(round(DETONATION_SHUTDOWN_APC * random_change)) // Effect 3: Break solar arrays - for(var/obj/machinery/power/solar/S in machines) + for(var/obj/machinery/power/solar/S in GLOB.machines) if(!(S.z in affected_z)) continue if(prob(DETONATION_SOLAR_BREAK_CHANCE)) @@ -256,11 +256,11 @@ else alert_msg = null if(alert_msg) - global_announcer.autosay(alert_msg, "Supermatter Monitor", "Engineering") + GLOB.global_announcer.autosay(alert_msg, "Supermatter Monitor", "Engineering") log_game("SUPERMATTER([x],[y],[z]) Emergency engineering announcement. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]") //Public alerts if((damage > emergency_point) && !public_alert) - global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor") + GLOB.global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor") for(var/mob/M in player_list) // Rykka adds SM Delam alarm if(!isnewplayer(M) && !isdeaf(M)) // Rykka adds SM Delam alarm M << message_sound // Rykka adds SM Delam alarm @@ -268,7 +268,7 @@ public_alert = TRUE log_game("SUPERMATTER([x],[y],[z]) Emergency PUBLIC announcement. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]") else if(safe_warned && public_alert) - global_announcer.autosay(alert_msg, "Supermatter Monitor") + GLOB.global_announcer.autosay(alert_msg, "Supermatter Monitor") public_alert = FALSE /obj/machinery/power/supermatter/process() diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 05aa68655a..0c838039ce 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -75,7 +75,7 @@ //we face the last thing we zapped, so this lets us favor that direction a bit var/move_bias = dir for(var/i in 0 to move_amount) - var/move_dir = pick(global.alldirs + move_bias) //ensures large-ball teslas don't just sit around + var/move_dir = pick(global.GLOB.alldirs + move_bias) //ensures large-ball teslas don't just sit around if(target && prob(10)) move_dir = get_dir(src,target) var/turf/T = get_step(src, move_dir) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 75ca48e2e0..b0db37f684 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -328,11 +328,11 @@ /obj/machinery/computer/turbine_computer/proc/locate_machinery() if(!id) return - for(var/obj/machinery/compressor/C in machines) + for(var/obj/machinery/compressor/C in GLOB.machines) if(C.comp_id == id) compressor = C LAZYINITLIST(doors) - for(var/obj/machinery/door/blast/P in machines) + for(var/obj/machinery/door/blast/P in GLOB.machines) if(P.id == id) doors += P diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index e2194a4d47..bc8927a212 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -27,7 +27,7 @@ /obj/item/ammo_casing/proc/expend() . = BB BB = null - set_dir(pick(cardinal)) //spin spent casings + set_dir(pick(GLOB.cardinal)) //spin spent casings update_icon() /obj/item/ammo_casing/attackby(obj/item/I as obj, mob/user as mob) @@ -181,7 +181,7 @@ playsound(src, "casing_sound", 50, 1) for(var/obj/item/ammo_casing/C in stored_ammo) C.loc = user.loc - C.set_dir(pick(cardinal)) + C.set_dir(pick(GLOB.cardinal)) stored_ammo.Cut() update_icon() else diff --git a/code/modules/projectiles/guns/energy/cyborg.dm b/code/modules/projectiles/guns/energy/cyborg.dm index 8e9206e0ec..beae210ae3 100644 --- a/code/modules/projectiles/guns/energy/cyborg.dm +++ b/code/modules/projectiles/guns/energy/cyborg.dm @@ -255,7 +255,7 @@ msg_admin_attack("[key_name(user)] stunned [key_name(target)] with the [src].") if(ishuman(target)) var/mob/living/carbon/human/H = target - H.forcesay(hit_appends) + H.forcesay(GLOB.hit_appends) /obj/item/melee/robotic/blade //For downstreams that use blade name = "Robotic Blade" @@ -421,7 +421,7 @@ msg_admin_attack("[key_name(user)] stunned [key_name(target)] with the [src].") if(ishuman(target)) var/mob/living/carbon/human/H = target - H.forcesay(hit_appends) + H.forcesay(GLOB.hit_appends) /obj/item/melee/robotic/baton/arm name = "electrified arm" diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 956c17c243..ba8878c3cf 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -338,7 +338,7 @@ var/armor_special = 0 if(target_armor >= 60) - var/turf/T = get_step(H, pick(alldirs - src.dir)) + var/turf/T = get_step(H, pick(GLOB.alldirs - src.dir)) H.throw_at(T, 1, 1, src) H.apply_damage(20, BURN, def_zone) if(target_limb) diff --git a/code/modules/reagents/reagents/dispenser.dm b/code/modules/reagents/reagents/dispenser.dm index e519ba5043..cd458004e8 100644 --- a/code/modules/reagents/reagents/dispenser.dm +++ b/code/modules/reagents/reagents/dispenser.dm @@ -255,7 +255,7 @@ /datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) + step(M, pick(GLOB.cardinal)) if(prob(5)) M.emote(pick("twitch", "drool", "moan")) @@ -270,7 +270,7 @@ /datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) + step(M, pick(GLOB.cardinal)) if(prob(5)) M.emote(pick("twitch", "drool", "moan")) M.adjustBrainLoss(0.5 * removed) diff --git a/code/modules/reagents/reagents/drugs.dm b/code/modules/reagents/reagents/drugs.dm index 74afe1ea66..229dc83bc6 100644 --- a/code/modules/reagents/reagents/drugs.dm +++ b/code/modules/reagents/reagents/drugs.dm @@ -66,7 +66,7 @@ M.druggy = max(M.druggy, drug_strength) if(prob_proc == TRUE && prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) - step(M, pick(cardinal)) + step(M, pick(GLOB.cardinal)) prob_proc = FALSE if(prob_proc == TRUE && prob(7)) M.emote(pick("twitch", "drool", "moan", "giggle")) @@ -196,7 +196,7 @@ M.druggy = max(M.druggy, drug_strength) if(prob(10) && prob_proc == TRUE && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) - step(M, pick(cardinal)) + step(M, pick(GLOB.cardinal)) prob_proc = FALSE if(prob(7) && prob_proc == TRUE) M.emote(pick("twitch", "drool", "moan", "giggle")) diff --git a/code/modules/reagents/reagents/food_drinks.dm b/code/modules/reagents/reagents/food_drinks.dm index 8bdeffa5c7..74e872d527 100644 --- a/code/modules/reagents/reagents/food_drinks.dm +++ b/code/modules/reagents/reagents/food_drinks.dm @@ -4258,7 +4258,7 @@ M.druggy = max(M.druggy, drug_strength) if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) - step(M, pick(cardinal)) + step(M, pick(GLOB.cardinal)) /datum/reagent/ethanol/sakebomb name = REAGENT_SAKEBOMB diff --git a/code/modules/reagents/reagents/toxins.dm b/code/modules/reagents/reagents/toxins.dm index 4807c7408b..7b16eca7b8 100644 --- a/code/modules/reagents/reagents/toxins.dm +++ b/code/modules/reagents/reagents/toxins.dm @@ -81,7 +81,7 @@ ..() if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) + step(M, pick(GLOB.cardinal)) if(prob(5)) M.emote(pick("twitch", "drool", "moan")) if(prob(20)) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index b93ddf25ca..14fd45b968 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -68,7 +68,7 @@ update_dir() /obj/machinery/conveyor/proc/update_dir() - if(!(dir in cardinal)) // Diagonal. Forwards is *away* from dir, curving to the right. + if(!(dir in GLOB.cardinal)) // Diagonal. Forwards is *away* from dir, curving to the right. forwards = turn(dir, 45) backwards = turn(dir, 135) else @@ -137,7 +137,7 @@ to_chat(user, "No input found. Please hang up and try your call again.") return id = input - for(var/obj/machinery/conveyor_switch/C in machines) + for(var/obj/machinery/conveyor_switch/C in GLOB.machines) if(C.id == id) C.conveyors |= src return @@ -230,7 +230,7 @@ /obj/machinery/conveyor_switch/LateInitialize() conveyors = list() - for(var/obj/machinery/conveyor/C in machines) + for(var/obj/machinery/conveyor/C in GLOB.machines) if(C.id == id) conveyors += C @@ -286,7 +286,7 @@ update() // find any switches with same id as this one, and set their positions to match us - for(var/obj/machinery/conveyor_switch/S in machines) + for(var/obj/machinery/conveyor_switch/S in GLOB.machines) if(S.id == src.id) S.position = position S.update() @@ -318,7 +318,7 @@ return id = input conveyors = list() // Clear list so they aren't double added. - for(var/obj/machinery/conveyor/C in machines) + for(var/obj/machinery/conveyor/C in GLOB.machines) if(C.id == id) conveyors += C return diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 4a83ff6291..94a1fae83d 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -23,7 +23,7 @@ ptype = newtype dir = newdir // Disposals handle "bent"/"corner" strangely, handle this specially. - if(ptype == DISPOSAL_PIPE_STRAIGHT && (dir in cornerdirs)) + if(ptype == DISPOSAL_PIPE_STRAIGHT && (dir in GLOB.cornerdirs)) ptype = DISPOSAL_PIPE_CORNER switch(dir) if(NORTHWEST) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 6ee44a1548..75cf8b37b3 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -936,7 +936,7 @@ // remains : set to leave broken pipe pieces in place /obj/structure/disposalpipe/proc/broken(var/remains = 0) if(remains) - for(var/D in cardinal) + for(var/D in GLOB.cardinal) if(D & dpdir) var/obj/structure/disposalpipe/broken/P = new(src.loc) P.set_dir(D) @@ -1641,7 +1641,7 @@ if(direction) dirs = list( direction, turn(direction, -45), turn(direction, 45)) else - dirs = alldirs.Copy() + dirs = GLOB.alldirs.Copy() src.streak(dirs) @@ -1650,7 +1650,7 @@ if(direction) dirs = list( direction, turn(direction, -45), turn(direction, 45)) else - dirs = alldirs.Copy() + dirs = GLOB.alldirs.Copy() src.streak(dirs) diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 20b8ecb0c6..89c7efbe70 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -306,7 +306,7 @@ var/obj/machinery/blackbox_recorder/blackbox var/pda_msg_amt = 0 var/rc_msg_amt = 0 - for(var/obj/machinery/message_server/MS in machines) + for(var/obj/machinery/message_server/MS in GLOB.machines) if(MS.pda_msgs.len > pda_msg_amt) pda_msg_amt = MS.pda_msgs.len if(MS.rc_msgs.len > rc_msg_amt) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index b1b76d0176..6277a7b386 100755 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -97,7 +97,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, return /obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the CentCom server so wild griffins can't fuck up R&D's work - for(var/obj/machinery/r_n_d/server/centcom/C in machines) + for(var/obj/machinery/r_n_d/server/centcom/C in GLOB.machines) for(var/datum/tech/T in files.known_tech) C.files.AddTech2Known(T) for(var/datum/design/D in files.known_designs) @@ -108,7 +108,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, . = ..() files = new /datum/research(src) //Setup the research data holder. if(!id) - for(var/obj/machinery/r_n_d/server/centcom/S in machines) + for(var/obj/machinery/r_n_d/server/centcom/S in GLOB.machines) S.update_connections() break diff --git a/code/modules/research/rdconsole_tgui.dm b/code/modules/research/rdconsole_tgui.dm index e870b3ce1e..ea1f8aae3b 100644 --- a/code/modules/research/rdconsole_tgui.dm +++ b/code/modules/research/rdconsole_tgui.dm @@ -459,7 +459,7 @@ griefProtection() //Putting this here because I dont trust the sync process spawn(3 SECONDS) if(src) - for(var/obj/machinery/r_n_d/server/S in machines) + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) var/server_processed = 0 if((id in S.id_with_upload) || istype(S, /obj/machinery/r_n_d/server/centcom)) for(var/datum/tech/T in files.known_tech) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 1798f3203b..09eccadba9 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -77,7 +77,7 @@ //Backup files to CentCom to help admins recover data after greifer attacks /obj/machinery/r_n_d/server/proc/griefProtection() - for(var/obj/machinery/r_n_d/server/centcom/C in machines) + for(var/obj/machinery/r_n_d/server/centcom/C in GLOB.machines) for(var/datum/tech/T in files.known_tech) C.files.AddTech2Known(T) for(var/datum/design/D in files.known_designs) @@ -122,7 +122,7 @@ /obj/machinery/r_n_d/server/centcom/proc/update_connections() var/list/no_id_servers = list() var/list/server_ids = list() - for(var/obj/machinery/r_n_d/server/S in machines) + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) switch(S.server_id) if(-1) continue @@ -175,7 +175,7 @@ var/list/server_list = list() data["servers"] = server_list - for(var/obj/machinery/r_n_d/server/S in machines) + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) if(istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin) continue var/list/tech = list() @@ -203,7 +203,7 @@ var/list/console_list = list() data["consoles"] = console_list - for(var/obj/machinery/computer/rdconsole/C in machines) + for(var/obj/machinery/computer/rdconsole/C in GLOB.machines) if(!C.sync) continue console_list.Add(list(list( diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index 7cd67c3a13..a3c503b1d6 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -210,7 +210,7 @@ if(db) var/datum/transhuman/mind_record/record = db.backed_up[new_character.mind.name] if((world.time - record.last_notification) < 30 MINUTES) - global_announcer.autosay("[new_character.name] has been resleeved by the automatic resleeving system.", "TransCore Oversight", new_character.isSynthetic() ? "Science" : "Medical") + GLOB.global_announcer.autosay("[new_character.name] has been resleeved by the automatic resleeving system.", "TransCore Oversight", new_character.isSynthetic() ? "Science" : "Medical") spawn(0) //Wait a second for nif to do its thing if there is one if(record.nif_path) var/obj/item/nif/nif diff --git a/code/modules/resleeving/infocore_records.dm b/code/modules/resleeving/infocore_records.dm index 95316357d4..1c3491c6a8 100644 --- a/code/modules/resleeving/infocore_records.dm +++ b/code/modules/resleeving/infocore_records.dm @@ -105,7 +105,7 @@ limb_data.Cut() organ_data.Cut() ..() - return QDEL_HINT_HARDDEL // For now at least there is no easy way to clear references to this in machines etc. + return QDEL_HINT_HARDDEL // For now at least there is no easy way to clear references to this in GLOB.machines etc. /datum/transhuman/body_record/proc/init_from_mob(var/mob/living/carbon/human/M, var/add_to_db = 0, var/ckeylock = 0, var/database_key) ASSERT(!QDELETED(M)) diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index df01177c54..a02a0a92f7 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -545,7 +545,7 @@ if(O.anchored) return 0 //mob is anchored??? if(get_dist(user, src) > 1 || get_dist(user, O) > 1) - return 0 //doesn't use adjacent() to allow for non-cardinal (fuck my life) + return 0 //doesn't use adjacent() to allow for non-GLOB.cardinal (fuck my life) if(!ishuman(user) && !isrobot(user)) return 0 //not a borg or human if(panel_open) diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 6b7ea2ee21..f1502cc6b4 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -133,7 +133,7 @@ /obj/machinery/keycard_auth/proc/broadcast_request(mob/user) icon_state = "auth_on" - for(var/obj/machinery/keycard_auth/KA in machines) + for(var/obj/machinery/keycard_auth/KA in GLOB.machines) if(KA == src) continue KA.reset() spawn() diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm index 5c18b36df5..42d1ab7b94 100644 --- a/code/modules/security levels/security levels.dm +++ b/code/modules/security levels/security levels.dm @@ -69,10 +69,10 @@ GLOBAL_VAR_INIT(security_level, 0) GLOB.security_level = SEC_LEVEL_DELTA var/newlevel = get_security_level() - for(var/obj/machinery/firealarm/FA in machines) + for(var/obj/machinery/firealarm/FA in GLOB.machines) if(FA.z in using_map.contact_levels) FA.set_security_level(newlevel) - for(var/obj/machinery/status_display/FA in machines) + for(var/obj/machinery/status_display/FA in GLOB.machines) if(FA.z in using_map.contact_levels) FA.on_alert_changed(newlevel) //VOREStation Add diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm index 5149957adb..2961a783f2 100644 --- a/code/modules/shieldgen/energy_field.dm +++ b/code/modules/shieldgen/energy_field.dm @@ -41,7 +41,7 @@ my_gen = null var/turf/current_loc = get_turf(src) . = ..() - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(current_loc, direction) if(T) for(var/obj/effect/energy_field/F in T) @@ -116,7 +116,7 @@ /obj/effect/energy_field/update_icon(var/update_neightbors = 0) cut_overlays() var/list/adjacent_shields_dir = list() - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) if(T) // Incase we somehow stepped off the map. for(var/obj/effect/energy_field/F in T) @@ -146,7 +146,7 @@ i-- if(i) spawn(2) - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) if(T) // Incase we somehow stepped off the map. for(var/obj/effect/energy_field/F in T) diff --git a/code/modules/shieldgen/handheld_defuser.dm b/code/modules/shieldgen/handheld_defuser.dm index d5e118cb08..d2e47e0823 100644 --- a/code/modules/shieldgen/handheld_defuser.dm +++ b/code/modules/shieldgen/handheld_defuser.dm @@ -26,7 +26,7 @@ if(!enabled) return PROCESS_KILL - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/simulated/shielded_tile = get_step(get_turf(src), direction) for(var/obj/effect/shield/S in shielded_tile) // 10kJ per pulse, but gap in the shield lasts for longer than regular diffusers. diff --git a/code/modules/shieldgen/shield_diffuser.dm b/code/modules/shieldgen/shield_diffuser.dm index 78f912b8b9..ce0d5f85ce 100644 --- a/code/modules/shieldgen/shield_diffuser.dm +++ b/code/modules/shieldgen/shield_diffuser.dm @@ -39,7 +39,7 @@ if(!enabled) return - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/simulated/shielded_tile = get_step(get_turf(src), direction) for(var/obj/effect/shield/S in shielded_tile) S.diffuse(5) diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm index da67ce549f..770059aa7d 100644 --- a/code/modules/shieldgen/shield_generator.dm +++ b/code/modules/shieldgen/shield_generator.dm @@ -125,7 +125,7 @@ for(var/obj/effect/shield/SE in field_segments) var/adjacent_fields = 0 - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(SE, direction) var/obj/effect/shield/S = locate() in T if(S) @@ -181,7 +181,7 @@ //Corners for(var/obj/effect/shield/S in corners) var/adjacent = corners[S] - if(adjacent in cornerdirs) + if(adjacent in GLOB.cornerdirs) do_corner_shield(S, adjacent) //Dir is adjacent fields direction else // Okay first a quick hack. If only one nonshield... @@ -203,7 +203,7 @@ else var/list/touchnonshield = list() - for(var/direction in cornerdirs) + for(var/direction in GLOB.cornerdirs) var/turf/T = get_step(S, direction) if(!isspace(T)) touchnonshield += T diff --git a/code/modules/shuttles/web_datums.dm b/code/modules/shuttles/web_datums.dm index d061ebe397..d3a0c42f3c 100644 --- a/code/modules/shuttles/web_datums.dm +++ b/code/modules/shuttles/web_datums.dm @@ -121,7 +121,7 @@ if(!radio_announce) command_announcement.Announce(get_departure_message(),(announcer ? announcer : "[using_map.boss_name]")) else - global_announcer.autosay(get_departure_message(),(announcer ? announcer : "[using_map.boss_name]")) + GLOB.global_announcer.autosay(get_departure_message(),(announcer ? announcer : "[using_map.boss_name]")) /datum/shuttle_destination/proc/get_arrival_message() return null @@ -133,7 +133,7 @@ if(!radio_announce) command_announcement.Announce(get_arrival_message(),(announcer ? announcer : "[using_map.boss_name]")) else - global_announcer.autosay(get_arrival_message(),(announcer ? announcer : "[using_map.boss_name]")) + GLOB.global_announcer.autosay(get_arrival_message(),(announcer ? announcer : "[using_map.boss_name]")) /datum/shuttle_destination/proc/link_destinations(var/datum/shuttle_destination/other_place, var/interim_tag, var/travel_time = 0) // First, check to make sure this doesn't cause a duplicate route. diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 9ee0f0e459..640ea43ef1 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -2,7 +2,7 @@ if(istype(mover,/obj/item/projectile)) return (check_cover(mover,target)) if(flipped == 1) - if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir + if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir return !density return TRUE if(istype(mover) && mover.checkpass(PASSTABLE)) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index ad5c0e6372..67d89c527c 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -425,7 +425,7 @@ var/list/table_icon_cache = list() if(istype(src, /obj/structure/table/rack)) return connections - for(var/direction in cardinal) + for(var/direction in GLOB.cardinal) var/turf/T = get_step(src, direction) if(T) var/obj/structure/table/nextT = locate(/obj/structure/table) in T diff --git a/code/modules/telesci/quantum_pad.dm b/code/modules/telesci/quantum_pad.dm index beef3ef898..3e28071be1 100644 --- a/code/modules/telesci/quantum_pad.dm +++ b/code/modules/telesci/quantum_pad.dm @@ -289,7 +289,7 @@ return TRUE /obj/machinery/power/quantumpad/proc/gateway_scatter(mob/user) - var/obj/effect/landmark/dest = pick(awaydestinations) + var/obj/effect/landmark/dest = pick(GLOB.awaydestinations) if(!dest) to_chat(user, span_warning("Nothing happens... maybe there's no signal to the remote pad?")) return diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index f773de2cb8..02753375e3 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -195,7 +195,7 @@ return if(86 to 90) // Irradiate everyone in telescience! - for(var/obj/machinery/telepad/E in machines) + for(var/obj/machinery/telepad/E in GLOB.machines) var/L = get_turf(E) sparks() for(var/mob/living/carbon/human/M in viewers(L, null)) diff --git a/code/modules/tgui/modules/atmos_control.dm b/code/modules/tgui/modules/atmos_control.dm index c79c9190c6..ad08a9efd2 100644 --- a/code/modules/tgui/modules/atmos_control.dm +++ b/code/modules/tgui/modules/atmos_control.dm @@ -12,7 +12,7 @@ access.req_one_access = req_one_access if(monitored_alarm_ids) - for(var/obj/machinery/alarm/alarm in machines) + for(var/obj/machinery/alarm/alarm in GLOB.machines) if(alarm.alarm_id && (alarm.alarm_id in monitored_alarm_ids)) monitored_alarms += alarm // machines may not yet be ordered at this point @@ -25,7 +25,7 @@ switch(action) if("alarm") if(ui_ref) - var/obj/machinery/alarm/alarm = locate(params["alarm"]) in (monitored_alarms.len ? monitored_alarms : machines) + var/obj/machinery/alarm/alarm = locate(params["alarm"]) in (monitored_alarms.len ? monitored_alarms : GLOB.machines) if(alarm) var/datum/tgui_state/TS = generate_state(alarm) alarm.tgui_interact(ui.user, parent_ui = ui_ref, state = TS) @@ -54,7 +54,7 @@ // TODO: Move these to a cache, similar to cameras var/alarms[0] - for(var/obj/machinery/alarm/alarm in (monitored_alarms.len ? monitored_alarms : machines)) + for(var/obj/machinery/alarm/alarm in (monitored_alarms.len ? monitored_alarms : GLOB.machines)) if(!monitored_alarms.len && alarm.alarms_hidden) continue if(!(alarm.z in map_levels)) diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index dd873c49c6..1d44cb2c12 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -377,14 +377,14 @@ /* Etc global procs */ /proc/enable_prison_shuttle(var/mob/user) - for(var/obj/machinery/computer/prison_shuttle/PS in machines) + for(var/obj/machinery/computer/prison_shuttle/PS in GLOB.machines) PS.allowedtocall = !(PS.allowedtocall) /proc/call_shuttle_proc(var/mob/user) if ((!( ticker ) || !emergency_shuttle.location())) return - if(!universe.OnShuttleCall(user)) + if(!GLOB.universe.OnShuttleCall(user)) to_chat(user, span_notice("Cannot establish a bluespace connection.")) return diff --git a/code/modules/tgui/modules/crew_manifest.dm b/code/modules/tgui/modules/crew_manifest.dm index 5813340358..212de20ee9 100644 --- a/code/modules/tgui/modules/crew_manifest.dm +++ b/code/modules/tgui/modules/crew_manifest.dm @@ -4,8 +4,8 @@ /datum/tgui_module/crew_manifest/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() - if(data_core) - data_core.get_manifest_list() + if(GLOB.data_core) + GLOB.data_core.get_manifest_list() data["manifest"] = GLOB.PDA_Manifest return data diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm index 85422ab9ba..cc42e96299 100644 --- a/code/modules/tgui/modules/ntos-only/cardmod.dm +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -9,8 +9,8 @@ /datum/tgui_module/cardmod/tgui_static_data(mob/user) var/list/data = ..() - if(data_core) - data_core.get_manifest_list() + if(GLOB.data_core) + GLOB.data_core.get_manifest_list() data["manifest"] = GLOB.PDA_Manifest return data @@ -155,7 +155,7 @@ else var/contents = {"

    Crew Manifest


    - [data_core ? data_core.get_manifest(0) : ""] + [GLOB.data_core ? GLOB.data_core.get_manifest(0) : ""] "} if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", stationtime2text()))) to_chat(ui.user, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper.")) @@ -166,7 +166,7 @@ if("modify") if(computer && computer.card_slot) if(id_card) - data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.rank) + GLOB.data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.rank) computer.proc_eject_id(ui.user) . = TRUE if("terminate") diff --git a/code/modules/tgui/modules/overmap.dm b/code/modules/tgui/modules/overmap.dm index f26eef3ab5..3ba0c3bd93 100644 --- a/code/modules/tgui/modules/overmap.dm +++ b/code/modules/tgui/modules/overmap.dm @@ -198,7 +198,7 @@ R.fields["y"] = S.y known_sectors[S.name] = R // SENSORS - for(var/obj/machinery/shipsensors/S in global.machines) + for(var/obj/machinery/shipsensors/S in GLOB.machines) if(linked.check_ownership(S)) sensors = S break diff --git a/code/modules/tgui/modules/power_monitor.dm b/code/modules/tgui/modules/power_monitor.dm index 23d353d1ef..9e6b1eb00e 100644 --- a/code/modules/tgui/modules/power_monitor.dm +++ b/code/modules/tgui/modules/power_monitor.dm @@ -69,7 +69,7 @@ return if(T) levels += using_map.get_map_levels(T.z, FALSE) - for(var/obj/machinery/power/sensor/S in machines) + for(var/obj/machinery/power/sensor/S in GLOB.machines) if(T && (S.loc.z == T.z) || (S.loc.z in levels) || (S.long_range)) // Consoles have range on their Z-Level. Sensors with long_range var will work between Z levels. if(S.name_tag == "#UNKN#") // Default name. Shouldn't happen! warning("Powernet sensor with unset ID Tag! [S.x]X [S.y]Y [S.z]Z") diff --git a/code/modules/tgui/modules/rcon.dm b/code/modules/tgui/modules/rcon.dm index fe1f57349b..21f1b0c46e 100644 --- a/code/modules/tgui/modules/rcon.dm +++ b/code/modules/tgui/modules/rcon.dm @@ -134,7 +134,7 @@ known_SMESs.Add(SMES) known_breakers = new /list() - for(var/obj/machinery/power/breakerbox/breaker in machines) + for(var/obj/machinery/power/breakerbox/breaker in GLOB.machines) if(!(breaker.z in map_levels)) continue if(breaker.RCon_tag != "NO_TAG") diff --git a/code/modules/tgui/modules/supermatter_monitor.dm b/code/modules/tgui/modules/supermatter_monitor.dm index 618f1e99cd..efa1698520 100644 --- a/code/modules/tgui/modules/supermatter_monitor.dm +++ b/code/modules/tgui/modules/supermatter_monitor.dm @@ -21,7 +21,7 @@ if(!z) return var/valid_z_levels = using_map.get_map_levels(z) - for(var/obj/machinery/power/supermatter/S in machines) + for(var/obj/machinery/power/supermatter/S in GLOB.machines) // Delaminating, not within coverage, not on a tile. if(S.grav_pulling || S.exploded || !(S.z in valid_z_levels) || !istype(S.loc, /turf/)) continue diff --git a/code/modules/turbolift/turbolift_door.dm b/code/modules/turbolift/turbolift_door.dm index 87648d6068..535574b464 100644 --- a/code/modules/turbolift/turbolift_door.dm +++ b/code/modules/turbolift/turbolift_door.dm @@ -31,7 +31,7 @@ for(var/mob/living/LM in turf) if(LM.mob_size <= MOB_TINY) var/moved = 0 - for(dir in shuffle(cardinal.Copy())) + for(dir in shuffle(GLOB.cardinal.Copy())) var/dest = get_step(LM,dir) if(!(locate(/obj/machinery/door/airlock/lift) in dest)) if(LM.Move(dest)) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 12a34be6f4..64bf8cca5d 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -173,7 +173,7 @@ pulse2.icon_state = "empdisable" pulse2.name = "emp sparks" pulse2.anchored = TRUE - pulse2.set_dir(pick(cardinal)) + pulse2.set_dir(pick(GLOB.cardinal)) spawn(10) qdel(pulse2) @@ -364,7 +364,7 @@ //if these all result in the same turf as the vehicle or nullspace, pick a new turf with open space if(!dest || dest == get_turf(src)) var/list/options = new() - for(var/test_dir in alldirs) + for(var/test_dir in GLOB.alldirs) var/new_dir = get_step_to(src, get_step(src, test_dir)) if(new_dir && load.Adjacent(new_dir)) options += new_dir diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 35be4c4330..1304092cdc 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -1218,7 +1218,7 @@ //Sketchy fallback for safety, put them somewhere safe. else log_debug("[src] (\ref[src]) doesn't have an owner, and dropped someone at a latespawn point!") - var/fallback = pick(latejoin) + var/fallback = pick(GLOB.latejoin) return get_turf(fallback) //Yes, it's ""safe"" to drop items here diff --git a/code/modules/webhooks/webhook_roundstart.dm b/code/modules/webhooks/webhook_roundstart.dm index 446a788f56..f958666a67 100644 --- a/code/modules/webhooks/webhook_roundstart.dm +++ b/code/modules/webhooks/webhook_roundstart.dm @@ -4,7 +4,7 @@ // Data expects a "url" field pointing to the current hosted server and port to connect on. /decl/webhook/roundstart/get_message(var/list/data) . = ..() - var/desc = "Gamemode: **[global.master_mode]**\n" + var/desc = "Gamemode: **[GLOB.master_mode]**\n" desc += "Players: **[global.player_list.len]**" if(data && data["url"]) desc += "\nAddress: <[data["url"]]>" diff --git a/code/modules/xenoarcheaology/finds/Weapons/archeo_melee.dm b/code/modules/xenoarcheaology/finds/Weapons/archeo_melee.dm index d5529bb0cf..7b80197867 100644 --- a/code/modules/xenoarcheaology/finds/Weapons/archeo_melee.dm +++ b/code/modules/xenoarcheaology/finds/Weapons/archeo_melee.dm @@ -104,7 +104,7 @@ to_chat(user, span_cult("An inexplicable force rips through your arm as it's engulfed in flames, tearing the sword from your grasp!")) user.drop_from_inventory(src, user.loc) user.Weaken(5) - throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,10),5) + throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,10),5) user.apply_damage(rand(force/2, force), BURN, zone, FALSE) return @@ -134,12 +134,12 @@ else if(istype(user, /mob/living/simple_mob/construct)) to_chat(user, span_cult("An inexplicable force rips through you, tearing the sword from your grasp!")) user.drop_from_inventory(src, user.loc) - throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,10),5) + throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,10),5) else to_chat(user, span_cult("The blade hisses, forcing itself from your manipulators. \The [src] will only allow mortals to wield it against foes, not kin.")) user.drop_from_inventory(src, user.loc) - throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,10),5) + throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,10),5) if(prob(10)) //During testing, this was set to 100% of the time to make sure it works... It went from spooky to 'dear god make it stop' var/spooky = pick('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/Heart Beat.ogg', 'sound/effects/screech.ogg',\ diff --git a/maps/common/common_turfs.dm b/maps/common/common_turfs.dm index af336181d2..5e89ac3b36 100644 --- a/maps/common/common_turfs.dm +++ b/maps/common/common_turfs.dm @@ -120,7 +120,7 @@ VIRGO3B_TURF_CREATE(/turf/simulated/floor/reinforced) /turf/simulated/floor/midpoint_glass/proc/do_icons() var/new_junction = NONE - for(var/direction in cardinal) //Cardinal case first. + for(var/direction in GLOB.cardinal) //Cardinal case first. var/turf/T = get_step(src, direction) if(istype(T, type)) new_junction |= direction diff --git a/maps/redgate/facility_items.dm b/maps/redgate/facility_items.dm index ff65cb4fe8..c396c86f9d 100644 --- a/maps/redgate/facility_items.dm +++ b/maps/redgate/facility_items.dm @@ -73,13 +73,13 @@ if(!crystal_found) return - for(var/obj/machinery/light/L in machines) + for(var/obj/machinery/light/L in GLOB.machines) if(L.z != src.z || get_dist(src,L) > 10) continue else L.flicker(10) - for(var/obj/machinery/door/blast/M in machines) + for(var/obj/machinery/door/blast/M in GLOB.machines) if(M.id == id) if(M.density) spawn(0) @@ -96,5 +96,5 @@ desc = "A switch tied to nearby machinery." /obj/machinery/button/remote/experimenter/trigger() - for(var/obj/machinery/crystalexperimenter/E in machines) + for(var/obj/machinery/crystalexperimenter/E in GLOB.machines) E.experiment() diff --git a/maps/redgate/falls/atoll_decals.dm b/maps/redgate/falls/atoll_decals.dm index a56e6efe10..84de934806 100644 --- a/maps/redgate/falls/atoll_decals.dm +++ b/maps/redgate/falls/atoll_decals.dm @@ -23,7 +23,7 @@ icon_state = "stairs" /obj/effect/floor_decal/atoll/stairs/Initialize(mapload) - dir = pick(cardinal) + dir = pick(GLOB.cardinal) . = ..() /obj/effect/floor_decal/atoll/moss @@ -31,7 +31,7 @@ icon_state = "moss" /obj/effect/floor_decal/atoll/moss/random/Initialize(mapload) - dir = pick(alldirs) + dir = pick(GLOB.alldirs) . = ..() /obj/effect/floor_decal/atoll/power diff --git a/maps/redgate/falls/atoll_objs.dm b/maps/redgate/falls/atoll_objs.dm index 4bc820f017..6525512215 100644 --- a/maps/redgate/falls/atoll_objs.dm +++ b/maps/redgate/falls/atoll_objs.dm @@ -81,7 +81,7 @@ /obj/structure/canopy/Initialize(mapload) . = ..() - dir = pick(alldirs) + dir = pick(GLOB.alldirs) /obj/structure/canopy/edge icon_state = "left" @@ -102,7 +102,7 @@ /obj/structure/canopy/edge/south/Initialize(mapload) . = ..() - dir = pick(cardinal) + dir = pick(GLOB.cardinal) //Because I'm terrible at planning /obj/structure/canopy_corner diff --git a/maps/redgate/falls/atoll_turfs.dm b/maps/redgate/falls/atoll_turfs.dm index 3a01324b04..383cc909ef 100644 --- a/maps/redgate/falls/atoll_turfs.dm +++ b/maps/redgate/falls/atoll_turfs.dm @@ -11,7 +11,7 @@ . = ..() icon_state = "[rand(1,5)]" if(prob(5)) - new /obj/effect/floor_decal/atoll/damage(src, pick(alldirs)) + new /obj/effect/floor_decal/atoll/damage(src, pick(GLOB.alldirs)) //holycrapshitcode /turf/simulated/floor/atoll/vertical diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx index 11baa4b183..d73cd69fa2 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx @@ -80,7 +80,7 @@ export const MinMaxBoxTemperature = (props: { {' | '}