diff --git a/archive/maps/gateway_archive_vr/wildwest.dm b/archive/maps/gateway_archive_vr/wildwest.dm index 12576b61372..41fed0335a3 100644 --- a/archive/maps/gateway_archive_vr/wildwest.dm +++ b/archive/maps/gateway_archive_vr/wildwest.dm @@ -90,7 +90,7 @@ if("Peace") to_chat(user, span_infoplain(span_bold("Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence."))) to_chat(user, span_infoplain("You feel as if you just narrowly avoided a terrible fate...")) - for(var/mob/living/simple_mob/faithless/F in living_mob_list) + for(var/mob/living/simple_mob/faithless/F in GLOB.living_mob_list) F.health = -10 F.set_stat(DEAD) F.icon_state = "faithless_dead" @@ -154,8 +154,8 @@ spawn(rand(800,1200)) if(stat == DEAD) - dead_mob_list -= src - living_mob_list += src + GLOB.dead_mob_list -= src + GLOB.living_mob_list += src set_stat(CONSCIOUS) tod = null setToxLoss(0) diff --git a/archive/maps/southern_cross/events/wildlife_encounter.dm b/archive/maps/southern_cross/events/wildlife_encounter.dm index 45f504e5587..04d7c10e017 100644 --- a/archive/maps/southern_cross/events/wildlife_encounter.dm +++ b/archive/maps/southern_cross/events/wildlife_encounter.dm @@ -18,7 +18,7 @@ var/list/potential_victims = list() /datum/event2/event/wildlife_encounter/set_up() - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) //if(!(L.z in get_location_z_levels())) // log_debug("Not on the right z-level") // continue // Not on the right z-level. diff --git a/archive/maps/submaps/depreciated_vr/talon.dm b/archive/maps/submaps/depreciated_vr/talon.dm index 70ec7f59a82..6bd5c93fa6a 100644 --- a/archive/maps/submaps/depreciated_vr/talon.dm +++ b/archive/maps/submaps/depreciated_vr/talon.dm @@ -1,12 +1,12 @@ /////////////////////////// //// Spawning and despawning -var/global/list/latejoin_talon = list() +GLOBAL_LIST_EMPTY(latejoin_talon) /obj/effect/landmark/talon name = "JoinLateTalon" delete_me = 1 /obj/effect/landmark/talon/Initialize(mapload) - latejoin_talon += loc // Register this turf as tram latejoin. + GLOB.latejoin_talon += loc // Register this turf as tram latejoin. . = ..() /datum/spawnpoint/talon @@ -17,7 +17,7 @@ var/global/list/latejoin_talon = list() /datum/spawnpoint/talon/New() ..() - turfs = latejoin_talon + turfs = GLOB.latejoin_talon /obj/machinery/cryopod/talon announce_channel = "Talon" diff --git a/code/ATMOSPHERICS/_atmos_setup.dm b/code/ATMOSPHERICS/_atmos_setup.dm index 217ca3062e8..4b2c4d1d283 100644 --- a/code/ATMOSPHERICS/_atmos_setup.dm +++ b/code/ATMOSPHERICS/_atmos_setup.dm @@ -1,23 +1,23 @@ //-------------------------------------------- // Pipe colors // -// Add them here and to the pipe_colors list +// Add them here and to the GLOB.pipe_colors list // to automatically add them to all relevant // atmospherics devices. //-------------------------------------------- -var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE) +GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE)) /proc/pipe_color_lookup(var/color) - for(var/C in pipe_colors) - if(color == pipe_colors[C]) + for(var/C in GLOB.pipe_colors) + if(color == GLOB.pipe_colors[C]) return "[C]" /proc/pipe_color_check(var/color) if(!color) return 1 - for(var/C in pipe_colors) - if(color == pipe_colors[C]) + for(var/C in GLOB.pipe_colors) + if(color == GLOB.pipe_colors[C]) return 1 return 0 @@ -97,10 +97,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ var/image/I = image('icons/atmos/pipes.dmi', icon_state = state) pipe_icons[cache_name] = I - for(var/pipe_color in pipe_colors) + for(var/pipe_color in GLOB.pipe_colors) I = image('icons/atmos/pipes.dmi', icon_state = state) - I.color = pipe_colors[pipe_color] - pipe_icons[state + "[pipe_colors[pipe_color]]"] = I + I.color = GLOB.pipe_colors[pipe_color] + pipe_icons[state + "[GLOB.pipe_colors[pipe_color]]"] = I pipe = new ('icons/atmos/heat.dmi') for(var/state in pipe.IconStates()) @@ -130,10 +130,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ if(findtext(state, "core") || findtext(state, "4way")) var/image/I = image('icons/atmos/manifold.dmi', icon_state = state) manifold_icons[state] = I - for(var/pipe_color in pipe_colors) + for(var/pipe_color in GLOB.pipe_colors) I = image('icons/atmos/manifold.dmi', icon_state = state) - I.color = pipe_colors[pipe_color] - manifold_icons[state + pipe_colors[pipe_color]] = I + I.color = GLOB.pipe_colors[pipe_color] + manifold_icons[state + GLOB.pipe_colors[pipe_color]] = I /datum/pipe_icon_manager/proc/gen_device_icons() if(!device_icons) @@ -181,10 +181,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ 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) + for(var/pipe_color in GLOB.pipe_colors) I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) - I.color = pipe_colors[pipe_color] - underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I + I.color = GLOB.pipe_colors[pipe_color] + underlays[state + "[D]" + "[GLOB.pipe_colors[pipe_color]]"] = I /* Leaving the old icon manager code commented out for now, as we may want to rewrite the new code to cleanly @@ -243,39 +243,39 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_ pipe_underlays_exposed["[D]"] = I if("pipe_intact-scrubbers") pipe_underlays_intact["[D]"] = I - for(var/pipe_color in pipe_colors) + for(var/pipe_color in GLOB.pipe_colors) I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) - I.color = pipe_colors[pipe_color] + I.color = GLOB.pipe_colors[pipe_color] switch(state) if("intact") - underlays_intact["[D]" + pipe_colors[pipe_color]] = I + underlays_intact["[D]" + GLOB.pipe_colors[pipe_color]] = I if("exposed") - underlays_exposed["[D]" + pipe_colors[pipe_color]] = I + underlays_exposed["[D]" + GLOB.pipe_colors[pipe_color]] = I if("down") - underlays_down["[D]" + pipe_colors[pipe_color]] = I + underlays_down["[D]" + GLOB.pipe_colors[pipe_color]] = I if("pipe_exposed") - pipe_underlays_exposed["[D]" + pipe_colors[pipe_color]] = I + pipe_underlays_exposed["[D]" + GLOB.pipe_colors[pipe_color]] = I if("pipe_intact") - pipe_underlays_intact["[D]" + pipe_colors[pipe_color]] = I + pipe_underlays_intact["[D]" + GLOB.pipe_colors[pipe_color]] = I if("intact-supply") - underlays_intact["[D]" + pipe_colors[pipe_color]] = I + underlays_intact["[D]" + GLOB.pipe_colors[pipe_color]] = I if("exposed-supply") - underlays_exposed["[D]" + pipe_colors[pipe_color]] = I + underlays_exposed["[D]" + GLOB.pipe_colors[pipe_color]] = I if("down-supply") - underlays_down["[D]" + pipe_colors[pipe_color]] = I + underlays_down["[D]" + GLOB.pipe_colors[pipe_color]] = I if("pipe_exposed-supply") - pipe_underlays_exposed["[D]" + pipe_colors[pipe_color]] = I + pipe_underlays_exposed["[D]" + GLOB.pipe_colors[pipe_color]] = I if("pipe_intact-supply") - pipe_underlays_intact["[D]" + pipe_colors[pipe_color]] = I + pipe_underlays_intact["[D]" + GLOB.pipe_colors[pipe_color]] = I if("intact-scrubbers") - underlays_intact["[D]" + pipe_colors[pipe_color]] = I + underlays_intact["[D]" + GLOB.pipe_colors[pipe_color]] = I if("exposed-scrubbers") - underlays_exposed["[D]" + pipe_colors[pipe_color]] = I + underlays_exposed["[D]" + GLOB.pipe_colors[pipe_color]] = I if("down-scrubbers") - underlays_down["[D]" + pipe_colors[pipe_color]] = I + underlays_down["[D]" + GLOB.pipe_colors[pipe_color]] = I if("pipe_exposed-scrubbers") - pipe_underlays_exposed["[D]" + pipe_colors[pipe_color]] = I + pipe_underlays_exposed["[D]" + GLOB.pipe_colors[pipe_color]] = I if("pipe_intact-scrubbers") - pipe_underlays_intact["[D]" + pipe_colors[pipe_color]] = I + pipe_underlays_intact["[D]" + GLOB.pipe_colors[pipe_color]] = I */ diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 2344547d44f..71c55554a3c 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -33,7 +33,6 @@ Pipelines + Other Objects -> Pipe network var/initialize_directions = 0 var/pipe_color - var/global/datum/pipe_icon_manager/icon_manager var/obj/machinery/atmospherics/node1 var/obj/machinery/atmospherics/node2 diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index b770e0bafbe..6e030da3a01 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -94,7 +94,12 @@ #define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME) -var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_GAME, RUNLEVEL_POSTGAME) +GLOBAL_LIST_INIT(runlevel_flags, list( + RUNLEVEL_LOBBY, + RUNLEVEL_SETUP, + RUNLEVEL_GAME, + RUNLEVEL_POSTGAME + )) #define RUNLEVEL_FLAG_TO_INDEX(flag) (log(2, flag) + 1) // Convert from the runlevel bitfield constants to index in runlevel_flags list //! ### SS initialization hints diff --git a/code/_helpers/_lists.dm b/code/_helpers/_lists.dm index 8d10600e090..754f1a065e6 100644 --- a/code/_helpers/_lists.dm +++ b/code/_helpers/_lists.dm @@ -406,13 +406,6 @@ Checks if a list has the same entries and values as an element of big. return (result + L.Copy(Li, 0)) return (result + R.Copy(Ri, 0)) -//Mergesort: divides up the list into halves to begin the sort -/proc/sortAtom(var/list/atom/L, var/order = 1) - if(isnull(L) || L.len < 2) - return L - var/middle = L.len / 2 + 1 - return mergeAtoms(sortAtom(L.Copy(1,middle)), sortAtom(L.Copy(middle)), order) - //Mergsort: does the actual sorting and returns the results back to sortAtom /proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1) var/Li=1 @@ -908,14 +901,14 @@ Checks if a list has the same entries and values as an element of big. return result -var/global/list/json_cache = list() +GLOBAL_LIST_EMPTY(json_cache) /proc/cached_json_decode(var/json_to_decode) if(!json_to_decode || !length(json_to_decode)) return list() try - if(isnull(global.json_cache[json_to_decode])) - global.json_cache[json_to_decode] = json_decode(json_to_decode) - . = global.json_cache[json_to_decode] + if(isnull(GLOB.json_cache[json_to_decode])) + GLOB.json_cache[json_to_decode] = json_decode(json_to_decode) + . = GLOB.json_cache[json_to_decode] catch(var/exception/e) log_error("Exception during JSON decoding ([json_to_decode]): [e]") return list() @@ -1019,3 +1012,8 @@ var/global/list/json_cache = list() for(var/key in input) UNTYPED_LIST_ADD(keys, key) return keys + +//TG sort_list +///uses sort_list() but uses the var's name specifically. This should probably be using mergeAtom() instead +/proc/sort_names(list/list_to_sort, order=1) + return sortTim(list_to_sort.Copy(), order >= 0 ? GLOBAL_PROC_REF(cmp_name_asc) : GLOBAL_PROC_REF(cmp_name_dsc)) diff --git a/code/_helpers/announcements.dm b/code/_helpers/announcements.dm index 5ab52144ff9..50b38ab526e 100644 --- a/code/_helpers/announcements.dm +++ b/code/_helpers/announcements.dm @@ -59,7 +59,7 @@ if(!play_sound) return - for(var/mob/player in player_list) + for(var/mob/player in GLOB.player_list) //if(player.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) if(player.client?.prefs.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping)) SEND_SOUND(player, sound(sound_override)) diff --git a/code/_helpers/events.dm b/code/_helpers/events.dm index 72305379bba..6e7887536a8 100644 --- a/code/_helpers/events.dm +++ b/code/_helpers/events.dm @@ -16,8 +16,8 @@ /** Checks if any living humans are in a given area! */ /proc/is_area_occupied(var/area/myarea) - // Testing suggests looping over human_mob_list is quicker than looping over area contents - for(var/mob/living/carbon/human/H in human_mob_list) + // Testing suggests looping over GLOB.human_mob_list is quicker than looping over area contents + for(var/mob/living/carbon/human/H in GLOB.human_mob_list) if(H.stat >= DEAD) //Conditions for exclusion here, like if disconnected people start blocking it. continue var/area/A = get_area(H) diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index 5dd0abbd779..8a18695a969 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -41,8 +41,8 @@ /** Checks if any living humans are in a given area. */ /proc/area_is_occupied(var/area/myarea) - // Testing suggests looping over human_mob_list is quicker than looping over area contents - for(var/mob/living/carbon/human/H in human_mob_list) + // Testing suggests looping over GLOB.human_mob_list is quicker than looping over area contents + for(var/mob/living/carbon/human/H in GLOB.human_mob_list) if(H.stat >= DEAD) //Conditions for exclusion here, like if disconnected people start blocking it. continue var/area/A = get_area(H) @@ -233,7 +233,7 @@ for (var/mob/M as anything in .) if (!istype(M) || !M.client) . -= M - for (var/mob/observer/O in player_list) + for (var/mob/observer/O in GLOB.player_list) . |= O /mob/proc/can_hear_radio(var/list/hearturfs) @@ -296,9 +296,9 @@ hearturfs |= get_turf(thing) //A list of every mob with a client - for(var/mob in player_list) + for(var/mob in GLOB.player_list) if(!ismob(mob)) - player_list -= mob + GLOB.player_list -= mob continue //VOREStation Edit End - Trying to fix some vorestation bug. if(get_turf(mob) in hearturfs) @@ -316,7 +316,7 @@ mobs |= M //For objects below the top level who still want to hear - for(var/obj in listening_objects) + for(var/obj in GLOB.listening_objects) if(get_turf(obj) in hearturfs) objs |= obj @@ -397,7 +397,7 @@ return get_step(start, EAST) /proc/get_mob_by_key(var/key) - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if(M.ckey == lowertext(key)) return M return null @@ -409,7 +409,7 @@ var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn var/i = 0 while(candidates.len <= 0 && i < 5) - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) candidates += G.key @@ -423,7 +423,7 @@ var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn var/i = 0 while(candidates.len <= 0 && i < 5) - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(G.client.prefs.be_special & BE_ALIEN) if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 53915207574..f2b893ad56b 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -1,27 +1,30 @@ //Since it didn't really belong in any other category, I'm putting this here //This is for procs to replace all the goddamn 'in world's that are chilling around the code -var/global/list/player_list = list() //List of all mobs **with clients attached**. Excludes /mob/new_player -var/global/list/mob_list = list() //List of all mobs, including clientless -var/global/list/human_mob_list = list() //List of all human mobs and sub-types, including clientless -var/global/list/silicon_mob_list = list() //List of all silicon mobs, including clientless -var/global/list/ai_list = list() //List of all AIs, including clientless -var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player -var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player -var/global/list/observer_mob_list = list() //List of all /mob/observer/dead, including clientless. -var/global/list/listening_objects = list() //List of all objects which care about receiving messages (communicators, radios, etc) -var/global/list/cleanbot_reserved_turfs = list() //List of all turfs currently targeted by some cleanbot +GLOBAL_LIST_EMPTY(player_list) //List of all mobs **with clients attached**. Excludes /mob/new_player +GLOBAL_LIST_EMPTY(mob_list) //List of all mobs, including clientless +GLOBAL_LIST_EMPTY(human_mob_list) //List of all human mobs and sub-types, including clientless +GLOBAL_LIST_EMPTY(silicon_mob_list) //List of all silicon mobs, including clientless +GLOBAL_LIST_EMPTY(ai_list) //List of all AIs, including clientless +GLOBAL_LIST_EMPTY(living_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player +GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player +GLOBAL_LIST_EMPTY(observer_mob_list) //List of all /mob/observer/dead, including clientless. +GLOBAL_LIST_EMPTY(listening_objects) //List of all objects which care about receiving messages (communicators, radios, etc) +GLOBAL_LIST_EMPTY(cleanbot_reserved_turfs) //List of all turfs currently targeted by some cleanbot -var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time -var/global/list/landmarks_list = list() //list of all landmarks created -var/global/list/event_triggers = list() //Associative list of creator_ckey:list(landmark references) for event triggers -var/global/list/surgery_steps = list() //list of all surgery steps |BS12 -var/global/list/side_effects = list() //list of all medical sideeffects types by thier names |BS12 -var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking. -var/global/list/joblist = list() //list of all jobstypes, minus borg and AI +GLOBAL_LIST_EMPTY(cable_list) //Index for all cables, so that powernets don't have to look through the entire world all the time +GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created +GLOBAL_LIST_EMPTY(event_triggers) //Associative list of creator_ckey:list(landmark references) for event triggers +GLOBAL_LIST_EMPTY(surgery_steps) //list of all surgery steps |BS12 +GLOBAL_LIST_EMPTY(joblist) //list of all jobstypes, minus borg and AI -#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER,HERM) //VOREStaton Edit -#define all_genders_text_list list("Male","Female","Plural","Neuter","Herm") //VOREStation Edit +GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking. +var/global/list/obj/item/pda/PDAs = list() +var/global/list/obj/item/communicator/all_communicators = list() + + +#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER,HERM) +#define all_genders_text_list list("Male","Female","Plural","Neuter","Herm") #define pronoun_set_to_genders list(\ "He/Him" = MALE,\ "She/Her" = FEMALE,\ @@ -37,30 +40,27 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI HERM = "Shi/Hir"\ ) -var/list/mannequins_ - // Times that players are allowed to respawn ("ckey" = world.time) GLOBAL_LIST_EMPTY(respawn_timers) // Holomaps -var/global/list/holomap_markers = list() -var/global/list/mapping_units = list() -var/global/list/mapping_beacons = list() +GLOBAL_LIST_EMPTY(holomap_markers) +GLOBAL_LIST_EMPTY(mapping_units) +GLOBAL_LIST_EMPTY(mapping_beacons) //Preferences stuff //Hairstyles -var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name -var/global/list/hair_styles_male_list = list() -var/global/list/hair_styles_female_list = list() -var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name -var/global/list/facial_hair_styles_male_list = list() -var/global/list/facial_hair_styles_female_list = list() -var/global/list/skin_styles_female_list = list() //unused -var/global/list/body_marking_styles_list = list() //stores /datum/sprite_accessory/marking indexed by name -var/global/list/body_marking_nopersist_list = list() // Body marking styles, minus non-genetic markings and augments -var/global/list/ear_styles_list = list() // Stores /datum/sprite_accessory/ears indexed by type -var/global/list/tail_styles_list = list() // Stores /datum/sprite_accessory/tail indexed by type -var/global/list/wing_styles_list = list() // Stores /datum/sprite_accessory/wing indexed by type +GLOBAL_LIST_EMPTY(hair_styles_list) //stores /datum/sprite_accessory/hair indexed by name +GLOBAL_LIST_EMPTY(hair_styles_male_list) +GLOBAL_LIST_EMPTY(hair_styles_female_list) +GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name +GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) +GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) +GLOBAL_LIST_EMPTY(body_marking_styles_list) //stores /datum/sprite_accessory/marking indexed by name +GLOBAL_LIST_EMPTY(body_marking_nopersist_list) // Body marking styles, minus non-genetic markings and augments +GLOBAL_LIST_EMPTY(ear_styles_list) // Stores /datum/sprite_accessory/ears indexed by type +GLOBAL_LIST_EMPTY(tail_styles_list) // Stores /datum/sprite_accessory/tail indexed by type +GLOBAL_LIST_EMPTY(wing_styles_list) // Stores /datum/sprite_accessory/wing indexed by type GLOBAL_LIST_INIT(custom_species_bases, new) // Species that can be used for a Custom Species icon base //Underwear @@ -68,9 +68,9 @@ var/datum/category_collection/underwear/global_underwear = new() //Customizables GLOBAL_LIST_INIT(headsetlist, list("Standard","Bowman","Earbud")) -var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt", "Messenger Bag", "Sports Bag", "Strapless Satchel") -var/global/list/pdachoicelist = list("Default", "Slim", "Old", "Rugged", "Holographic", "Wrist-Bound","Slider", "Vintage") -var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg) +GLOBAL_LIST_INIT(backbaglist, list("Nothing", "Backpack", "Satchel", "Satchel Alt", "Messenger Bag", "Sports Bag", "Strapless Satchel")) +GLOBAL_LIST_INIT(pdachoicelist, list("Default", "Slim", "Old", "Rugged", "Holographic", "Wrist-Bound","Slider", "Vintage")) +GLOBAL_LIST_INIT(exclude_jobs, list(/datum/job/ai,/datum/job/cyborg)) // Visual nets var/list/datum/visualnet/visual_nets = list() @@ -78,20 +78,22 @@ var/datum/visualnet/camera/cameranet = new() var/datum/visualnet/cult/cultnet = new() var/datum/visualnet/ghost/ghostnet = new() +var/global/list/obj/machinery/message_server/message_servers = list() +var/global/list/datum/supply_drop_loot/supply_drop // Runes -var/global/list/rune_list = new() -var/global/list/escape_list = list() -var/global/list/endgame_exits = list() -var/global/list/endgame_safespawns = list() +GLOBAL_LIST_EMPTY(rune_list) +GLOBAL_LIST_EMPTY(escape_list) +GLOBAL_LIST_EMPTY(endgame_exits) +GLOBAL_LIST_EMPTY(endgame_safespawns) -var/global/list/syndicate_access = list(access_maint_tunnels, access_syndicate, access_external_airlocks) +GLOBAL_LIST_INIT(syndicate_access, list(access_maint_tunnels, access_syndicate, access_external_airlocks)) // Ores (for mining) GLOBAL_LIST_EMPTY(ore_data) GLOBAL_LIST_EMPTY(alloy_data) // Strings which corraspond to bodypart covering flags, useful for outputting what something covers. -var/global/list/string_part_flags = list( +GLOBAL_LIST_INIT(string_part_flags, list( "head" = HEAD, "face" = FACE, "eyes" = EYES, @@ -101,10 +103,10 @@ var/global/list/string_part_flags = list( "feet" = FEET, "arms" = ARMS, "hands" = HANDS -) +)) // Strings which corraspond to slot flags, useful for outputting what slot something is. -var/global/list/string_slot_flags = list( +GLOBAL_LIST_INIT(string_slot_flags, list( "back" = SLOT_BACK, "face" = SLOT_MASK, "waist" = SLOT_BELT, @@ -118,7 +120,7 @@ var/global/list/string_slot_flags = list( "body" = SLOT_ICLOTHING, "uniform" = SLOT_TIE, "holster" = SLOT_HOLSTER -) +)) GLOBAL_LIST_EMPTY(mannequins) /proc/get_mannequin(var/ckey = "NULL") @@ -142,47 +144,47 @@ GLOBAL_LIST_EMPTY(mannequins) paths = subtypesof(/datum/sprite_accessory/hair) for(var/path in paths) var/datum/sprite_accessory/hair/H = new path() - hair_styles_list[H.name] = H + GLOB.hair_styles_list[H.name] = H switch(H.gender) - if(MALE) hair_styles_male_list += H.name - if(FEMALE) hair_styles_female_list += H.name + if(MALE) GLOB.hair_styles_male_list += H.name + if(FEMALE) GLOB.hair_styles_female_list += H.name else - hair_styles_male_list += H.name - hair_styles_female_list += H.name + GLOB.hair_styles_male_list += H.name + GLOB.hair_styles_female_list += H.name //Facial Hair - Initialise all /datum/sprite_accessory/facial_hair into an list indexed by facialhair-style name paths = subtypesof(/datum/sprite_accessory/facial_hair) for(var/path in paths) var/datum/sprite_accessory/facial_hair/H = new path() - facial_hair_styles_list[H.name] = H + GLOB.facial_hair_styles_list[H.name] = H switch(H.gender) - if(MALE) facial_hair_styles_male_list += H.name - if(FEMALE) facial_hair_styles_female_list += H.name + if(MALE) GLOB.facial_hair_styles_male_list += H.name + if(FEMALE) GLOB.facial_hair_styles_female_list += H.name else - facial_hair_styles_male_list += H.name - facial_hair_styles_female_list += H.name + GLOB.facial_hair_styles_male_list += H.name + GLOB.facial_hair_styles_female_list += H.name //Body markings - Initialise all /datum/sprite_accessory/marking into an list indexed by marking name paths = subtypesof(/datum/sprite_accessory/marking) for(var/path in paths) var/datum/sprite_accessory/marking/M = new path() - body_marking_styles_list[M.name] = M + GLOB.body_marking_styles_list[M.name] = M if(!M.genetic) - body_marking_nopersist_list[M.name] = M + GLOB.body_marking_nopersist_list[M.name] = M //Surgery Steps - Initialize all /datum/surgery_step into a list paths = subtypesof(/datum/surgery_step) for(var/T in paths) var/datum/surgery_step/S = new T - surgery_steps += S + GLOB.surgery_steps += S sort_surgeries() //List of job. I can't believe this was calculated multiple times per tick! paths = subtypesof(/datum/job) - paths -= exclude_jobs + paths -= GLOB.exclude_jobs for(var/T in paths) var/datum/job/J = new T - joblist[J.title] = J + GLOB.joblist[J.title] = J //Languages paths = subtypesof(/datum/language) @@ -266,26 +268,24 @@ GLOBAL_LIST_EMPTY(mannequins) paths = subtypesof(/datum/sprite_accessory/ears) for(var/path in paths) var/obj/item/clothing/head/instance = new path() - ear_styles_list[path] = instance + GLOB.ear_styles_list[path] = instance // Custom Tails paths = subtypesof(/datum/sprite_accessory/tail) - /datum/sprite_accessory/tail/taur for(var/path in paths) var/datum/sprite_accessory/tail/instance = new path() - tail_styles_list[path] = instance + GLOB.tail_styles_list[path] = instance // Custom Wings paths = subtypesof(/datum/sprite_accessory/wing) for(var/path in paths) var/datum/sprite_accessory/wing/instance = new path() - wing_styles_list[path] = instance + GLOB.wing_styles_list[path] = instance - // VOREStation Add - Vore Modes! paths = typesof(/datum/digest_mode) for(var/T in paths) var/datum/digest_mode/DM = new T GLOB.digest_modes[DM.id] = DM - // VOREStation Add End init_crafting_recipes(GLOB.crafting_recipes) /* @@ -344,46 +344,29 @@ GLOBAL_LIST_EMPTY(mannequins) to_world(.) */ //Hexidecimal numbers -var/global/list/hexNums = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F") +GLOBAL_LIST_INIT(hexNums, list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")) // Many global vars aren't GLOB type. This puts them there to be more easily inspected. GLOBAL_LIST_EMPTY(legacy_globals) /proc/populate_legacy_globals() - //Note: these lists cannot be changed to a new list anywhere in code! + //Note: these lists cannot be changed to a new list anywhere in code! //Lies. TG doesn't use any var/global/list so neither will we! //If they are, these will cause the old list to stay around! //Check by searching for " =" in the entire codebase - GLOB.legacy_globals["player_list"] = player_list - GLOB.legacy_globals["mob_list"] = mob_list - GLOB.legacy_globals["human_mob_list"] = human_mob_list - GLOB.legacy_globals["silicon_mob_list"] = silicon_mob_list - GLOB.legacy_globals["ai_list"] = ai_list - GLOB.legacy_globals["living_mob_list"] = living_mob_list - GLOB.legacy_globals["dead_mob_list"] = dead_mob_list - GLOB.legacy_globals["observer_mob_list"] = observer_mob_list - GLOB.legacy_globals["listening_objects"] = listening_objects - GLOB.legacy_globals["cleanbot_reserved_turfs"] = cleanbot_reserved_turfs - GLOB.legacy_globals["cable_list"] = cable_list - GLOB.legacy_globals["landmarks_list"] = landmarks_list - GLOB.legacy_globals["event_triggers"] = event_triggers - GLOB.legacy_globals["side_effects"] = side_effects - GLOB.legacy_globals["mechas_list"] = mechas_list - GLOB.legacy_globals["mannequins_"] = mannequins_ //visual nets GLOB.legacy_globals["visual_nets"] = visual_nets GLOB.legacy_globals["cameranet"] = cameranet GLOB.legacy_globals["cultnet"] = cultnet - GLOB.legacy_globals["existing_solargrubs"] = GLOB.existing_solargrubs -var/global/list/selectable_footstep = list( +GLOBAL_LIST_INIT(selectable_footstep, list( "Default" = FOOTSTEP_MOB_HUMAN, "Claw" = FOOTSTEP_MOB_CLAW, "Light Claw" = FOOTSTEP_MOB_TESHARI, "Slither" = FOOTSTEP_MOB_SLITHER, -) +)) // Put any artifact effects that are duplicates, unique, or otherwise unwated in here! This prevents them from spawning via RNG. -var/global/list/blacklisted_artifact_effects = list( +GLOBAL_LIST_INIT(blacklisted_artifact_effects, list( /datum/artifact_effect/gas/sleeping, /datum/artifact_effect/gas/oxy, /datum/artifact_effect/gas/carbondiox, @@ -391,17 +374,17 @@ var/global/list/blacklisted_artifact_effects = list( /datum/artifact_effect/gas/nitro, /datum/artifact_effect/gas/phoron, /datum/artifact_effect/extreme -) +)) //stuff that only synths can eat -var/global/list/edible_tech = list(/obj/item/cell, +GLOBAL_LIST_INIT(edible_tech, list(/obj/item/cell, /obj/item/circuitboard, /obj/item/integrated_circuit, /obj/item/broken_device, /obj/item/brokenbug, - ) + )) -var/global/list/item_digestion_blacklist = list( +GLOBAL_LIST_INIT(item_digestion_blacklist, list( /obj/item/hand_tele, /obj/item/card/id, /obj/item/gun, @@ -413,7 +396,7 @@ var/global/list/item_digestion_blacklist = list( /obj/item/organ/internal/brain/slime, /obj/item/mmi/digital/posibrain, /obj/item/mmi/digital/robot, - /obj/item/rig/protean) + /obj/item/rig/protean)) ///A list of chemicals that are banned from being obtainable through means that generate chemicals. These chemicals are either lame, annoying, pref-breaking, or OP (This list does NOT include reactions) GLOBAL_LIST_INIT(obtainable_chemical_blacklist, list( @@ -426,10 +409,10 @@ GLOBAL_LIST_INIT(obtainable_chemical_blacklist, list( REAGENT_ID_SUPERMATTER )) -var/global/list/item_tf_spawnpoints = list() // Global variable tracking which items are item tf spawnpoints +GLOBAL_LIST_EMPTY(item_tf_spawnpoints) // Global variable tracking which items are item tf spawnpoints // Options for transforming into a different mob in virtual reality. -var/global/list/vr_mob_tf_options = list( +GLOBAL_LIST_INIT(vr_mob_tf_options, list( "Borg" = /mob/living/silicon/robot, "Cortical borer" = /mob/living/simple_mob/animal/borer/non_antag, //"Hyena" = /mob/living/simple_mob/animal/hyena, //TODO: Port from Downstream @@ -487,9 +470,9 @@ var/global/list/vr_mob_tf_options = list( "Abyss leaper" = /mob/living/simple_mob/vore/vore_hostile/leaper, "Gelatinous cube" = /mob/living/simple_mob/vore/vore_hostile/gelatinous_cube, //"Gryphon" = /mob/living/simple_mob/vore/gryphon //TODO: Port from Downstream - ) + )) -var/global/list/vr_mob_spawner_options = list( +GLOBAL_LIST_INIT(vr_mob_spawner_options, list( "Parrot" = /mob/living/simple_mob/animal/passive/bird/parrot, "Rabbit" = /mob/living/simple_mob/vore/rabbit, "Cat" = /mob/living/simple_mob/animal/passive/cat, @@ -587,4 +570,902 @@ var/global/list/vr_mob_spawner_options = list( "Neaera" = /mob/living/carbon/human/neaera, "Stok" = /mob/living/carbon/human/stok, //"Gryphon" = /mob/living/simple_mob/vore/gryphon // Disabled until tested + )) + +//global lists I found in various files and moved here for housekeeping +GLOBAL_LIST_EMPTY(stool_cache) //haha stool +GLOBAL_LIST_EMPTY(emotes_by_key) +GLOBAL_LIST_EMPTY(random_maps) +GLOBAL_LIST_EMPTY(map_count) +GLOBAL_LIST_EMPTY(narsie_list) +GLOBAL_LIST_EMPTY(id_card_states) +GLOBAL_LIST_EMPTY(allocated_gamma) +GLOBAL_LIST_EMPTY(semirandom_mob_spawner_decisions) + +GLOBAL_LIST_INIT(unique_gamma, list( + /obj/item/perfect_tele, + /obj/item/bluespace_harpoon, + /obj/item/clothing/glasses/thermal/syndi, + /obj/item/gun/energy/netgun, + /obj/item/gun/projectile/dartgun, + /obj/item/clothing/gloves/black/bloodletter, + /obj/item/gun/energy/mouseray/metamorphosis + )) + +GLOBAL_LIST_INIT(newscaster_standard_feeds, list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots)) + +GLOBAL_LIST_INIT(changeling_fabricated_clothing, list( + "w_uniform" = /obj/item/clothing/under/chameleon/changeling, + "head" = /obj/item/clothing/head/chameleon/changeling, + "wear_suit" = /obj/item/clothing/suit/chameleon/changeling, + "shoes" = /obj/item/clothing/shoes/chameleon/changeling, + "gloves" = /obj/item/clothing/gloves/chameleon/changeling, + "wear_mask" = /obj/item/clothing/mask/chameleon/changeling, + "glasses" = /obj/item/clothing/glasses/chameleon/changeling, + "back" = /obj/item/storage/backpack/chameleon/changeling, + "belt" = /obj/item/storage/belt/chameleon/changeling, + "wear_id" = /obj/item/card/id/syndicate/changeling + )) + +// Defines which values mean "on" or "off". +// This is to make some of the more OP superpowers a larger PITA to activate, +// and to tell our new DNA datum which values to set in order to turn something +// on or off. +var/global/list/dna_activity_bounds[DNA_SE_LENGTH] + +// Used to determine what each block means (admin hax and species stuff on /vg/, mostly) +var/global/list/assigned_blocks[DNA_SE_LENGTH] + +GLOBAL_LIST_EMPTY(gear_distributed_to) +GLOBAL_LIST_EMPTY(overlay_cache) //cache recent overlays + +var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/spell) - list( + /obj/item/spell, + /obj/item/spell/gambit, + /obj/item/spell/projectile, + /obj/item/spell/aura, +// /obj/item/spell/insert, + /obj/item/spell/spawner, + /obj/item/spell/summon, + /obj/item/spell/modifier) + +var/global/list/image/splatter_cache=list() +var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective. Clumsy, rewrite sometime. +var/global/list/obj/machinery/telecomms/telecomms_list = list() + +// color-dir-dry +var/global/list/image/fluidtrack_cache=list() + +var/global/list/datum/stack_recipe/sandbag_recipes = list( \ + new/datum/stack_recipe("barricade", /obj/structure/barricade/sandbag, 3, time = 5 SECONDS, one_per_turf = 1, on_floor = 1, pass_stack_color = TRUE)) + +var/global/list/datum/stack_recipe/wax_recipes = list( \ + new/datum/stack_recipe("candle", /obj/item/flame/candle) \ +) +var/global/list/datum/stack_recipe/rods_recipes = list( \ + new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 0), + new/datum/stack_recipe("catwalk", /obj/structure/catwalk, 2, time = 80, one_per_turf = 1, on_floor = 1)) + + +GLOBAL_LIST_INIT(possible_plants, list( + "plant-1", + "plant-10", + "plant-09", + "plant-15", + "plant-13" +)) + +GLOBAL_LIST_INIT(radio_channels_by_freq, list( + num2text(PUB_FREQ) = CHANNEL_COMMON, + num2text(AI_FREQ) = CHANNEL_AI_PRIVATE, + num2text(ENT_FREQ) = CHANNEL_ENTERTAINMENT, + num2text(ERT_FREQ) = CHANNEL_RESPONSE_TEAM, + num2text(COMM_FREQ)= CHANNEL_COMMAND, + num2text(ENG_FREQ) = CHANNEL_ENGINEERING, + num2text(MED_FREQ) = CHANNEL_MEDICAL, + num2text(MED_I_FREQ)=CHANNEL_MEDICAL_1, + num2text(SEC_FREQ) = CHANNEL_SECURITY, + num2text(SEC_I_FREQ)=CHANNEL_SECURITY_1, + num2text(SCI_FREQ) = CHANNEL_SCIENCE, + num2text(SUP_FREQ) = CHANNEL_SUPPLY, + num2text(SRV_FREQ) = CHANNEL_SERVICE, + num2text(EXP_FREQ) = CHANNEL_EXPLORATION + )) + +GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) + +// Access check is of the type requires one. These have been carefully selected to avoid allowing the janitor to see channels he shouldn't +GLOBAL_LIST_INIT(default_internal_channels, list( + num2text(PUB_FREQ) = list(), + num2text(AI_FREQ) = list(access_synth), + num2text(ENT_FREQ) = list(), + num2text(ERT_FREQ) = list(access_cent_specops), + num2text(COMM_FREQ)= list(access_heads), + num2text(ENG_FREQ) = list(access_engine_equip, access_atmospherics), + num2text(MED_FREQ) = list(access_medical_equip), + num2text(MED_I_FREQ)=list(access_medical_equip), + num2text(SEC_FREQ) = list(access_security), + num2text(SEC_I_FREQ)=list(access_security), + num2text(SCI_FREQ) = list(access_tox, access_robotics, access_xenobiology), + num2text(SUP_FREQ) = list(access_cargo, access_mining_station), + num2text(SRV_FREQ) = list(access_janitor, access_library, access_hydroponics, access_bar, access_kitchen), + num2text(EXP_FREQ) = list(access_explorer) +)) + +GLOBAL_LIST_INIT(default_medbay_channels, list( + num2text(PUB_FREQ) = list(), + num2text(MED_FREQ) = list(), + num2text(MED_I_FREQ) = list() +)) + +GLOBAL_LIST_INIT(valid_ringtones, list( + "beep", + "boom", + "slip", + "honk", + "SKREE", + "xeno", + "spark", + "rad", + "servo", + "buh-boop", + "trombone", + "whistle", + "chirp", + "slurp", + "pwing", + "clack", + "bzzt", + "chimes", + "prbt", + "bark", + "bork", + "roark", + "chitter", + "squish" + )) + +GLOBAL_LIST_EMPTY(seen_citizenships) +GLOBAL_LIST_EMPTY(seen_systems) +GLOBAL_LIST_EMPTY(seen_factions) +GLOBAL_LIST_EMPTY(seen_religions) + +GLOBAL_LIST_INIT(citizenship_choices, list( + "Greater Human Diaspora", + "Commonwealth of Sol-Procyon", + "Skrell Consensus", + "Moghes Hegemony", + "Tajaran Diaspora", + "Unitary Alliance of Salthan Fyrds", + "Elysian Colonies", + "Third Ares Confederation", + "Teshari Union", + "Altevian Hegemony", + "Kosaky Fleets" + )) + +GLOBAL_LIST_INIT(home_system_choices, list( + "Virgo-Erigone", + "Sol", + "Earth, Sol", + "Luna, Sol", + "Mars, Sol", + "Venus, Sol", + "Titan, Sol", + "Toledo, New Ohio", + "The Pact, Myria", + "Kishar, Alpha Centauri", + "Anshar, Alpha Centauri", + "Heaven Complex, Alpha Centauri", + "Procyon", + "Altair", + "Kara, Vir", + "Sif, Vir", + "Brinkburn, Nyx", + "Binma, Tau Ceti", + "Qerr'balak, Qerr'valis", + "Epsilon Ursae Minoris", + "Meralar, Rarkajar", + "Tal, Vilous", + "Menhir, Alat-Hahr", + "Altam, Vazzend", + "Uh'Zata, Kelezakata", + "Moghes, Uuoea-Esa", + "Xohok, Uuoea-Esa", + "Varilak, Antares", + "Sanctorum, Sanctum", + "Infernum, Sanctum", + "Abundance in All Things Serene, Beta-Carnelium Ventrum", + "Jorhul, Barkalis", + "Shelf Flotilla", + "Ue-Orsi Flotilla", + "AH-CV Prosperity", + "AH-CV Migrant", + "Altevian Colony Ship" + )) + +GLOBAL_LIST_INIT(faction_choices, list( + "NanoTrasen Incorporated", + "Hephaestus Industries", + "Vey-Medical", + "Zeng-Hu Pharmaceuticals", + "Ward-Takahashi GMC", + "Bishop Cybernetics", + "Morpheus Cyberkinetics", + "Xion Manufacturing Group", + "Free Trade Union", + "Major Bill's Transportation", + "Ironcrest Transport Group", + "Grayson Manufactories Ltd.", + "Aether Atmospherics", + "Focal Point Energistics", + "StarFlight Inc.", + "Oculum Broadcasting Network", + "Periphery Post", + "Free Anur Tribune", + "Centauri Provisions", + "Einstein Engines", + "Wulf Aeronautics", + "Gilthari Exports", + "Coyote Salvage Corp.", + "Chimera Genetics Corp.", + "Independent Pilots Association", + "Local System Defense Force", + "United Solar Defense Force", + "Proxima Centauri Risk Control", + "HIVE Security", + "Stealth Assault Enterprises", + "Teshari Union" + )) + +GLOBAL_LIST_EMPTY(antag_faction_choices) //Should be populated after brainstorming. Leaving as blank in case brainstorming does not occur. + +GLOBAL_LIST_INIT(antag_visiblity_choices, list( + "Hidden", + "Shared", + "Known" + )) + +GLOBAL_LIST_INIT(religion_choices, list( + "Unitarianism", + "Neopaganism", + "Islam", + "Christianity", + "Judaism", + "Hinduism", + "Buddhism", + "Pleromanism", + "Spectralism", + "Phact Shintoism", + "Kishari Faith", + "Hauler Faith", + "Nock", + "Singulitarian Worship", + "Xilar Qall", + "Tajr-kii Rarkajar", + "Agnosticism", + "Deism", + "Neo-Moreauism", + "Orthodox Moreauism" + )) + +GLOBAL_LIST_INIT(xenoChemList, list(REAGENT_ID_MUTATIONTOXIN, + REAGENT_ID_PSILOCYBIN, + REAGENT_ID_MINDBREAKER, + REAGENT_ID_IMPEDREZENE, + REAGENT_ID_CRYPTOBIOLIN, + REAGENT_ID_BLISS, + REAGENT_ID_CHLORALHYDRATE, + REAGENT_ID_STOXIN, + REAGENT_ID_MUTAGEN, + REAGENT_ID_LEXORIN, + REAGENT_ID_PACID, + REAGENT_ID_CYANIDE, + REAGENT_ID_PHORON, + REAGENT_ID_PLASTICIDE, + REAGENT_ID_AMATOXIN, + REAGENT_ID_CARBON, + REAGENT_ID_RADIUM, + REAGENT_ID_SACID, + REAGENT_ID_SUGAR, + REAGENT_ID_KELOTANE, + REAGENT_ID_DERMALINE, + REAGENT_ID_ANTITOXIN, + REAGENT_ID_DEXALIN, + REAGENT_ID_SYNAPTIZINE, + REAGENT_ID_ALKYSINE, + REAGENT_ID_IMIDAZOLINE, + REAGENT_ID_PERIDAXON, + REAGENT_ID_REZADONE)) + +//Chemlist of what was banned in xenobio2. Kept for legacy purposes. +GLOBAL_LIST_INIT(xeno2ChemList, list(REAGENT_ID_INAPROVALINE, + REAGENT_ID_BICARIDINE, + REAGENT_ID_DEXALINP, + REAGENT_ID_TRICORDRAZINE, + REAGENT_ID_CRYOXADONE, + REAGENT_ID_CLONEXADONE, + REAGENT_ID_PARACETAMOL, + REAGENT_ID_TRAMADOL, + REAGENT_ID_OXYCODONE, + REAGENT_ID_RYETALYN, + REAGENT_ID_HYPERZINE, + REAGENT_ID_ETHYLREDOXRAZINE, + REAGENT_ID_HYRONALIN, + REAGENT_ID_ARITHRAZINE, + REAGENT_ID_SPACEACILLIN, + REAGENT_ID_STERILIZINE, + REAGENT_ID_LEPORAZINE, + REAGENT_ID_METHYLPHENIDATE, + REAGENT_ID_CITALOPRAM, + REAGENT_ID_PAROXETINE, + REAGENT_ID_MACROCILLIN, + REAGENT_ID_MICROCILLIN, + REAGENT_ID_NORMALCILLIN, + REAGENT_ID_SIZEOXADONE, + REAGENT_ID_ICKYPAK, + REAGENT_ID_UNSORBITOL, + REAGENT_ID_TOXIN, + REAGENT_ID_CARPOTOXIN, + REAGENT_ID_POTASSIUMCHLORIDE, + REAGENT_ID_POTASSIUMCHLOROPHORIDE, + REAGENT_ID_ZOMBIEPOWDER, + REAGENT_ID_FERTILIZER, + REAGENT_ID_EZNUTRIENT, + REAGENT_ID_LEFT4ZED, + REAGENT_ID_ROBUSTHARVEST, + REAGENT_ID_PLANTBGONE, + REAGENT_ID_SEROTROTIUM, + REAGENT_ID_NICOTINE, + REAGENT_ID_URANIUM, + REAGENT_ID_SILVER, + REAGENT_ID_GOLD, + REAGENT_ID_ADRENALINE, + REAGENT_ID_HOLYWATER, + REAGENT_ID_AMMONIA, + REAGENT_ID_DIETHYLAMINE, + REAGENT_ID_FLUOROSURFACTANT, + REAGENT_ID_FOAMINGAGENT, + REAGENT_ID_THERMITE, + REAGENT_ID_CLEANER, + REAGENT_ID_LUBE, + REAGENT_ID_SILICATE, + REAGENT_ID_GLYCEROL, + REAGENT_ID_COOLANT, + REAGENT_ID_LUMINOL, + REAGENT_ID_NUTRIMENT, + REAGENT_ID_CORNOIL, + REAGENT_ID_LIPOZINE, + REAGENT_ID_SODIUMCHLORIDE, + REAGENT_ID_FROSTOIL, + REAGENT_ID_CAPSAICIN, + REAGENT_ID_CONDENSEDCAPSAICIN, + REAGENT_ID_NEUROTOXIN)) + +//keep synced with the defines BE_* in setup.dm --rastaf +//some autodetection here. +//Change these to 0 if the equivalent mode is disabled for whatever reason! +GLOBAL_LIST_INIT(special_roles, list( + "traitor" = 0, // 0 + "operative" = 0, // 1 + "changeling" = 0, // 2 + "wizard" = 0, // 3 + "malf AI" = 0, // 4 + "revolutionary" = 0, // 5 + "alien candidate" = 0, // 6 + "positronic brain" = 1, // 7 + "cultist" = 0, // 8 + "renegade" = 0, // 9 + "ninja" = 0, // 10 + "raider" = 0, // 11 + "diona" = 0, // 12 + "mutineer" = 0, // 13 + "loyalist" = 0, // 14 + "pAI candidate" = 1, // 15 + "lost drone" = 1, // 16 + "maint pred" = 1, // 17 + "maint lurker" = 1, // 18 + "morph" = 1, // 19 + "corgi" = 1, // 20 + "cursed sword" = 1, // 21 + "Ship Survivor" = 1, // 22 +)) + + +// GLOB.alldirs in global.dm is the same list of directions, but since +// the specific order matters to get a usable icon_state, it is +// copied here so that, in the unlikely case that GLOB.alldirs is changed, transit_tube.dm +// continues to work. +GLOBAL_LIST_INIT(tube_dir_list, list( + NORTH, + SOUTH, + EAST, + WEST, + NORTHEAST, + NORTHWEST, + SOUTHEAST, + SOUTHWEST)) + +GLOBAL_LIST_EMPTY(direction_table) + +GLOBAL_LIST_INIT(valid_bloodreagents, list("default",REAGENT_ID_IRON,REAGENT_ID_COPPER,REAGENT_ID_PHORON,REAGENT_ID_SILVER,REAGENT_ID_GOLD,REAGENT_ID_SLIMEJELLY)) //allowlist-based so people don't make their blood restored by alcohol or something really silly. use reagent IDs! + +GLOBAL_LIST_EMPTY(monitor_states) + +GLOBAL_LIST_EMPTY(random_junk) +GLOBAL_LIST_EMPTY(random_junk_) +GLOBAL_LIST_EMPTY(random_useful_) +GLOBAL_LIST_INIT(valid_bloodtypes, list("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")) + +//Some simple descriptors for breaches. Global because lazy, TODO: work out a better way to do this. + +GLOBAL_LIST_INIT(breach_brute_descriptors, list( + "tiny puncture", + "ragged tear", + "large split", + "huge tear", + "gaping wound" + )) + +GLOBAL_LIST_INIT(breach_burn_descriptors, list( + "small burn", + "melted patch", + "sizable burn", + "large scorched area", + "huge scorched area" + )) + +GLOBAL_LIST_INIT(wide_chassis, list( + "rat", + "panther", + "teppi", + "pai-diredog", + "pai-horse_lune", + "pai-horse_soleil", + "pai-pdragon", + "pai-protodog" + )) + +GLOBAL_LIST_INIT(flying_chassis, list( + "pai-parrot", + "pai-bat", + "pai-butterfly", + "pai-hawk", + "cyberelf" + )) + +//Sure I could spend all day making wacky overlays for all of the different forms +//but quite simply most of these sprites aren't made for that, and I'd rather just make new ones +//the birds especially! Just naw. If someone else wants to mess with 12x4 frames of animation where +//most of the pixels are different kinds of green and tastefully translate that to whitescale +//they can have fun with that! I not doing it! +GLOBAL_LIST_INIT(allows_eye_color, list( + "pai-repairbot", + "pai-typezero", + "pai-bat", + "pai-butterfly", + "pai-mouse", + "pai-monkey", + "pai-raccoon", + "pai-cat", + "rat", + "panther", + "pai-bear", + "pai-fen", + "cyberelf", + "teppi", + "catslug", + "car", + "typeone", + "13", + "pai-raptor", + "pai-diredog", + "pai-horse_lune", + "pai-horse_soleil", + "pai-pdragon", + "pai-protodog" + )) + + +GLOBAL_LIST_EMPTY(entopic_images) +GLOBAL_LIST_EMPTY(entopic_users) + +GLOBAL_LIST_EMPTY(alt_farmanimals) + +GLOBAL_LIST_EMPTY(acceptable_items) // List of the items you can put in +GLOBAL_LIST_EMPTY(available_recipes) // List of the recipes you can use +GLOBAL_LIST_EMPTY(acceptable_reagents) // List of the reagents you can put in + + + +/var/all_ui_styles = list( + "Midnight" = 'icons/mob/screen/midnight.dmi', + "Orange" = 'icons/mob/screen/orange.dmi', + "old" = 'icons/mob/screen/old.dmi', + "White" = 'icons/mob/screen/white.dmi', + "old-noborder" = 'icons/mob/screen/old-noborder.dmi', + "minimalist" = 'icons/mob/screen/minimalist.dmi', + "Hologram" = 'icons/mob/screen/holo.dmi' ) + +/var/all_ui_styles_robot = list( + "Midnight" = 'icons/mob/screen1_robot.dmi', + "Orange" = 'icons/mob/screen1_robot.dmi', + "old" = 'icons/mob/screen1_robot.dmi', + "White" = 'icons/mob/screen1_robot.dmi', + "old-noborder" = 'icons/mob/screen1_robot.dmi', + "minimalist" = 'icons/mob/screen1_robot_minimalist.dmi', + "Hologram" = 'icons/mob/screen1_robot_minimalist.dmi' + ) + +GLOBAL_LIST_INIT(all_tooltip_styles, list( + "Midnight", //Default for everyone is the first one, + "Plasmafire", + "Retro", + "Slimecore", + "Operative", + "Clockwork" + )) + +//Global Datums +var/global/datum/pipe_icon_manager/icon_manager +var/global/datum/emergency_shuttle_controller/emergency_shuttle = new + +// We manually initialize the alarm handlers instead of looping over all existing types +// to make it possible to write: camera_alarm.triggerAlarm() rather than SSalarm.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof. +/var/global/datum/alarm_handler/atmosphere/atmosphere_alarm = new() +/var/global/datum/alarm_handler/camera/camera_alarm = new() +/var/global/datum/alarm_handler/fire/fire_alarm = new() +/var/global/datum/alarm_handler/motion/motion_alarm = new() +/var/global/datum/alarm_handler/power/power_alarm = new() + +GLOBAL_LIST_EMPTY(gun_choices) + +GLOBAL_LIST_INIT(severity_to_string, list( + EVENT_LEVEL_MUNDANE = "Mundane", + EVENT_LEVEL_MODERATE = "Moderate", + EVENT_LEVEL_MAJOR = "Major" + )) + +//Some global icons for the examine tab to use to display some item properties. +GLOBAL_LIST_INIT(description_icons, list( + "melee_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="melee_protection"), + "bullet_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bullet_protection"), + "laser_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="laser_protection"), + "energy_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="energy_protection"), + "bomb_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bomb_protection"), + "radiation_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="radiation_protection"), + "biohazard_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="biohazard_protection"), + + "offhand" = image(icon='icons/mob/screen1_stats.dmi',icon_state="offhand"), + + "welder" = image(icon='icons/obj/tools.dmi',icon_state="welder"), + "wirecutters" = image(icon='icons/obj/tools.dmi',icon_state="cutters"), + "screwdriver" = image(icon='icons/obj/tools.dmi',icon_state="screwdriver"), + "wrench" = image(icon='icons/obj/tools.dmi',icon_state="wrench"), + "crowbar" = image(icon='icons/obj/tools.dmi',icon_state="crowbar"), + "multitool" = image(icon='icons/obj/device.dmi',icon_state="multitool"), + "cable coil" = image(icon='icons/obj/power.dmi',icon_state="coil"), // VOREStation Edit + + "metal sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-metal"), + "plasteel sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-plasteel"), + + "air tank" = image(icon='icons/obj/tank.dmi',icon_state="oxygen"), + "connector" = image(icon='icons/obj/pipes.dmi',icon_state="connector"), + + "stunbaton" = image(icon='icons/obj/weapons.dmi',icon_state="stunbaton_active"), + "slimebaton" = image(icon='icons/obj/weapons.dmi',icon_state="slimebaton_active"), + + "power cell" = image(icon='icons/obj/power.dmi',icon_state="hcell"), + "device cell" = image(icon='icons/obj/power.dmi',icon_state="dcell"), + "weapon cell" = image(icon='icons/obj/power.dmi',icon_state="wcell"), + + "hatchet" = image(icon='icons/obj/weapons.dmi',icon_state="hatchet"), + )) + +// TODO - Optimize this into numerics if this ends up working out +GLOBAL_LIST_INIT(MOVE_KEY_MAPPINGS, list( + "North" = NORTH_KEY, + "South" = SOUTH_KEY, + "East" = EAST_KEY, + "West" = WEST_KEY, + "W" = W_KEY, + "A" = A_KEY, + "S" = S_KEY, + "D" = D_KEY, + "Shift" = SHIFT_KEY, + "Ctrl" = CTRL_KEY, + "Alt" = ALT_KEY, +)) + +GLOBAL_LIST_EMPTY(total_extraction_beacons) + +GLOBAL_LIST_INIT(possible_ghost_sprites, list( + "Clear" = "blank", + "Green Blob" = "otherthing", + "Bland" = "ghost", + "Robed-B" = "ghost1", + "Robed-BAlt" = "ghost2", + "King" = "ghostking", + "Shade" = "shade", + "Hecate" = "ghost-narsie", + "Glowing Statue" = "armour", + "Artificer" = "artificer", + "Behemoth" = "behemoth", + "Harvester" = "harvester", + "Wraith" = "wraith", + "Viscerator" = "viscerator", + "Corgi" = "corgi", + "Tamaskan" = "tamaskan", + "Black Cat" = "blackcat", + "Lizard" = "lizard", + "Goat" = "goat", + "Space Bear" = "bear", + "Bats" = "bat", + "Chicken" = "chicken_white", + "Parrot"= "parrot_fly", + "Goose" = "goose", + "Penguin" = "penguin", + "Brown Crab" = "crab", + "Gray Crab" = "evilcrab", + "Trout" = "trout-swim", + "Salmon" = "salmon-swim", + "Pike" = "pike-swim", + "Koi" = "koi-swim", + "Carp" = "carp", + "Red Robes" = "robe_red", + "Faithless" = "faithless", + "Shadowform" = "forgotten", + "Dark Ethereal" = "bloodguardian", + "Holy Ethereal" = "lightguardian", + "Red Elemental" = "magicRed", + "Blue Elemental" = "magicBlue", + "Pink Elemental" = "magicPink", + "Orange Elemental" = "magicOrange", + "Green Elemental" = "magicGreen", + "Daemon" = "daemon", + "Guard Spider" = "guard", + "Hunter Spider" = "hunter", + "Nurse Spider" = "nurse", + "Rogue Drone" = "drone", + "ED-209" = "ed209", + "Beepsky" = "secbot" + )) + +GLOBAL_LIST_EMPTY(sparring_attack_cache) + +GLOBAL_LIST_EMPTY(protean_abilities) + +//PAI stuff +GLOBAL_LIST_INIT(possible_chassis, list( + "Drone" = "pai-repairbot", + "Cat" = "pai-cat", + "Mouse" = "pai-mouse", + "Monkey" = "pai-monkey", + "Borgi" = "pai-borgi", + "Fox" = "pai-fox", + "Parrot" = "pai-parrot", + "Rabbit" = "pai-rabbit", + "Dire wolf" = "pai-diredog", + "Horse (Lune)" = "pai-horse_lune", + "Horse (Soleil)" = "pai-horse_soleil", + "Dragon" = "pai-pdragon", + "Bear" = "pai-bear", + "Fennec" = "pai-fen", + "Type Zero" = "pai-typezero", + "Raccoon" = "pai-raccoon", + "Raptor" = "pai-raptor", + "Corgi" = "pai-corgi", + "Bat" = "pai-bat", + "Butterfly" = "pai-butterfly", + "Hawk" = "pai-hawk", + "Duffel" = "pai-duffel", + "Rat" = "rat", + "Panther" = "panther", + "Cyber Elf" = "cyberelf", + "Teppi" = "teppi", + "Catslug" = "catslug", + "Car" = "car", + "Type One" = "typeone", + "Type Thirteen" = "13", + "Protogen Dog" = "pai-protodog" + )) + +//PAI stuff +GLOBAL_LIST_INIT(possible_say_verbs, list( + "Robotic" = list("states","declares","queries"), + "Natural" = list("says","yells","asks"), + "Beep" = list("beeps","beeps loudly","boops"), + "Chirp" = list("chirps","chirrups","cheeps"), + "Feline" = list("purrs","yowls","meows"), + "Canine" = list("yaps","barks","woofs"), + "Rodent" = list("squeaks", "SQUEAKS", "sqiks") + )) + +//Borg modules +GLOBAL_LIST_INIT(robot_modules, list( + "Standard" = /obj/item/robot_module/robot/standard, + "Service" = /obj/item/robot_module/robot/clerical/butler, + "Clerical" = /obj/item/robot_module/robot/clerical/general, + "Clown" = /obj/item/robot_module/robot/clerical/honkborg, + "Command" = /obj/item/robot_module/robot/chound, + "Research" = /obj/item/robot_module/robot/research, + "Miner" = /obj/item/robot_module/robot/miner, + "Crisis" = /obj/item/robot_module/robot/medical/crisis, + "Surgeon" = /obj/item/robot_module/robot/medical/surgeon, + "Security" = /obj/item/robot_module/robot/security/general, + "Combat" = /obj/item/robot_module/robot/security/combat, + "Exploration" = /obj/item/robot_module/robot/exploration, + "Engineering" = /obj/item/robot_module/robot/engineering, + "Janitor" = /obj/item/robot_module/robot/janitor, + "Gravekeeper" = /obj/item/robot_module/robot/gravekeeper, + "Lost" = /obj/item/robot_module/robot/lost, + "Protector" = /obj/item/robot_module/robot/syndicate/protector, + "Mechanist" = /obj/item/robot_module/robot/syndicate/mechanist, + "Combat Medic" = /obj/item/robot_module/robot/syndicate/combat_medic + )) + + +//Xenoarch stuff +/// +/// This is a list of what the depth_scanner can show, depending on what get_responsive_reagent returns below. +/// +GLOBAL_LIST_INIT(responsive_carriers, list( + REAGENT_ID_CARBON, + REAGENT_ID_POTASSIUM, + REAGENT_ID_HYDROGEN, + REAGENT_ID_NITROGEN, + REAGENT_BLOOD, + REAGENT_ID_MERCURY, + REAGENT_ID_IRON, + REAGENT_ID_PHORON)) + +/// +/// This is a list of what the depth_scanner shows the user. In order with the above list. +/// +/// +/// If the get_responsive_reagent returns 'REAGENT_ID_CARBON' it will show up to the user as "Trace organic cells" +/// If the get_responsive_reagent returns "REAGENT_ID_CHLORINE" it will show up to the user as "Metamorphic/igneous rock composite" +/// +GLOBAL_LIST_INIT(finds_as_strings, list( + "Trace organic cells", //Carbon + "Long exposure particles", //Potassium + "Trace water particles", //Hydrogen + "Crystalline structures", //Nitrogen + "Abnormal energy signatures", //Occult + "Metallic derivative", //Mercury + "Metallic composite", //Iron + "Anomalous material")) //Phoron + + +//tgui law manager +var/global/list/datum/ai_laws/admin_laws +var/global/list/datum/ai_laws/player_laws + +//shield_gen/external +GLOBAL_LIST_INIT(external_shield_gen_blockedturfs, list( + /turf/space, + /turf/simulated/floor/outdoors, +)) + +//machinery/shieldgen +GLOBAL_LIST_INIT(shieldgen_blockedturfs, list( + /turf/space, + /turf/simulated/floor/outdoors, +)) + +//Reagent Grinders +// Don't need a new list for every grinder in the game +GLOBAL_LIST_INIT(sheet_reagents, list( //have a number of reagents divisible by REAGENTS_PER_SHEET (default 20) unless you like decimals. + /obj/item/stack/material/plastic = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_OXYGEN,REAGENT_ID_CHLORINE,REAGENT_ID_SULFUR), + /obj/item/stack/material/copper = list(REAGENT_ID_COPPER), + /obj/item/stack/material/wood = list(REAGENT_ID_CARBON,REAGENT_ID_WOODPULP,REAGENT_ID_NITROGEN,REAGENT_ID_POTASSIUM,REAGENT_ID_SODIUM), + /obj/item/stack/material/stick = list(REAGENT_ID_CARBON,REAGENT_ID_WOODPULP,REAGENT_ID_NITROGEN,REAGENT_ID_POTASSIUM,REAGENT_ID_SODIUM), + /obj/item/stack/material/log = list(REAGENT_ID_CARBON,REAGENT_ID_WOODPULP,REAGENT_ID_NITROGEN,REAGENT_ID_POTASSIUM,REAGENT_ID_SODIUM), + /obj/item/stack/material/algae = list(REAGENT_ID_CARBON,REAGENT_ID_NITROGEN,REAGENT_ID_NITROGEN,REAGENT_ID_PHOSPHORUS,REAGENT_ID_PHOSPHORUS), + /obj/item/stack/material/graphite = list(REAGENT_ID_CARBON), + /obj/item/stack/material/aluminium = list(REAGENT_ID_ALUMINIUM), // The material is aluminium, but the reagent is aluminum... + /obj/item/stack/material/glass/reinforced = list(REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_IRON,REAGENT_ID_CARBON), + /obj/item/stack/material/leather = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PROTEIN,REAGENT_ID_PROTEIN,REAGENT_ID_TRIGLYCERIDE), + /obj/item/stack/material/cloth = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PROTEIN,REAGENT_ID_SODIUM), + /obj/item/stack/material/fiber = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PROTEIN,REAGENT_ID_SODIUM), + /obj/item/stack/material/fur = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_SULFUR,REAGENT_ID_SODIUM), + /obj/item/stack/material/deuterium = list(REAGENT_ID_HYDROGEN), + /obj/item/stack/material/glass/phoronrglass = list(REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_PHORON,REAGENT_ID_PHORON), + /obj/item/stack/material/diamond = list(REAGENT_ID_CARBON), + /obj/item/stack/material/durasteel = list(REAGENT_ID_IRON,REAGENT_ID_IRON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PLATINUM), + /obj/item/stack/material/wax = list(REAGENT_ID_ETHANOL,REAGENT_ID_TRIGLYCERIDE), + /obj/item/stack/material/iron = list(REAGENT_ID_IRON), + /obj/item/stack/material/uranium = list(REAGENT_ID_URANIUM), + /obj/item/stack/material/phoron = list(REAGENT_ID_PHORON), + /obj/item/stack/material/gold = list(REAGENT_ID_GOLD), + /obj/item/stack/material/silver = list(REAGENT_ID_SILVER), + /obj/item/stack/material/platinum = list(REAGENT_ID_PLATINUM), + /obj/item/stack/material/mhydrogen = list(REAGENT_ID_HYDROGEN), + /obj/item/stack/material/steel = list(REAGENT_ID_IRON, REAGENT_ID_CARBON), + /obj/item/stack/material/plasteel = list(REAGENT_ID_IRON, REAGENT_ID_IRON, REAGENT_ID_CARBON, REAGENT_ID_CARBON, REAGENT_ID_PLATINUM), //8 iron, 8 carbon, 4 platinum, + /obj/item/stack/material/snow = list(REAGENT_ID_WATER), + /obj/item/stack/material/sandstone = list(REAGENT_ID_SILICON, REAGENT_ID_OXYGEN), + /obj/item/stack/material/glass = list(REAGENT_ID_SILICON), + /obj/item/stack/material/glass/phoronglass = list(REAGENT_ID_PLATINUM, REAGENT_ID_SILICON, REAGENT_ID_SILICON, REAGENT_ID_SILICON), //5 platinum, 15 silicon, + /obj/item/stack/material/supermatter = list(REAGENT_ID_SUPERMATTER) + )) + +GLOBAL_LIST_INIT(ore_reagents, list( //have a number of reageents divisible by REAGENTS_PER_ORE (default 20) unless you like decimals. + /obj/item/ore/glass = list(REAGENT_ID_SILICON), + /obj/item/ore/iron = list(REAGENT_ID_IRON), + /obj/item/ore/coal = list(REAGENT_ID_CARBON), + /obj/item/ore/phoron = list(REAGENT_ID_PHORON), + /obj/item/ore/silver = list(REAGENT_ID_SILVER), + /obj/item/ore/gold = list(REAGENT_ID_GOLD), + /obj/item/ore/marble = list(REAGENT_ID_SILICON,REAGENT_ID_ALUMINIUM,REAGENT_ID_ALUMINIUM,REAGENT_ID_SODIUM,REAGENT_ID_CALCIUM), // Some nice variety here + /obj/item/ore/uranium = list(REAGENT_ID_URANIUM), + /obj/item/ore/diamond = list(REAGENT_ID_CARBON), + /obj/item/ore/osmium = list(REAGENT_ID_PLATINUM), // should contain osmium + /obj/item/ore/lead = list(REAGENT_ID_LEAD), + /obj/item/ore/hydrogen = list(REAGENT_ID_HYDROGEN), + /obj/item/ore/verdantium = list(REAGENT_ID_RADIUM,REAGENT_ID_PHORON,REAGENT_ID_NITROGEN,REAGENT_ID_PHOSPHORUS,REAGENT_ID_SODIUM), // Some fun stuff to be useful with + /obj/item/ore/rutile = list(REAGENT_ID_TUNGSTEN,REAGENT_ID_OXYGEN) // Should be titanium +)) + +//List of the ammo types that can be used in game. +GLOBAL_LIST_INIT(global_ammo_types, list( + /obj/item/ammo_casing/a357 = ".357", + /obj/item/ammo_casing/a9mm = "9mm", + /obj/item/ammo_casing/a45 = ".45", + /obj/item/ammo_casing/a10mm = "10mm", + /obj/item/ammo_casing/a12g = "12g", + /obj/item/ammo_casing/a12g = "12g", + /obj/item/ammo_casing/a12g/pellet = "12g", + /obj/item/ammo_casing/a12g/pellet = "12g", + /obj/item/ammo_casing/a12g/pellet = "12g", + /obj/item/ammo_casing/a12g/beanbag = "12g", + /obj/item/ammo_casing/a12g/stunshell = "12g", + /obj/item/ammo_casing/a12g/flash = "12g", + /obj/item/ammo_casing/a762 = "7.62mm", + /obj/item/ammo_casing/a545 = "5.45mm" + )) + +//Rad collectors in the world +GLOBAL_LIST_EMPTY(rad_collectors) + +//NIF +GLOBAL_LIST_INIT(nif_look_messages, list( + "flicks their eyes around", + "looks at something unseen", + "reads some invisible text", + "seems to be daydreaming", + "focuses elsewhere for a moment")) + +GLOBAL_LIST(starting_legal_nifsoft) +GLOBAL_LIST(starting_illegal_nifsoft) + +// By default they can be in any water turf. Subtypes might restrict to deep/shallow etc +GLOBAL_LIST_INIT(suitable_fish_turf_types, list( + /turf/simulated/floor/beach/water, + /turf/simulated/floor/beach/coastline, + /turf/simulated/floor/holofloor/beach/water, + /turf/simulated/floor/holofloor/beach/coastline, + /turf/simulated/floor/water +)) + + +//Chamelion clothing was all stupid so it's done here instead. +//Jumpsuit +GLOBAL_LIST(chamelion_jumpsuit_choices) +//Hat +GLOBAL_LIST(chamelion_head_choices) +//Suit +GLOBAL_LIST(chamelion_suit_choices) +//Shoes +GLOBAL_LIST(chamelion_shoe_choices) +//Backpack +GLOBAL_LIST(chamelion_back_choices) +//Gloves +GLOBAL_LIST(chamelion_glove_choices) +//Mask +GLOBAL_LIST(chamelion_mask_choices) +//Belt +GLOBAL_LIST(chamelion_belt_choices) +//Accessory +GLOBAL_LIST(chamelion_accessory_choices) diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 9b348c5b2c5..a2f135e1a5c 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -39,15 +39,15 @@ var/h_style = "Bald" var/list/valid_hairstyles = list() - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/S = hair_styles_list[hairstyle] + for(var/hairstyle in GLOB.hair_styles_list) + var/datum/sprite_accessory/S = GLOB.hair_styles_list[hairstyle] if(gender == MALE && S.gender == FEMALE) continue if(gender == FEMALE && S.gender == MALE) continue if( !(species in S.species_allowed)) continue - valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] + valid_hairstyles[hairstyle] = GLOB.hair_styles_list[hairstyle] if(valid_hairstyles.len) h_style = pick(valid_hairstyles) @@ -58,8 +58,8 @@ var/f_style = "Shaved" var/list/valid_facialhairstyles = list() - for(var/facialhairstyle in facial_hair_styles_list) - var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] + for(var/facialhairstyle in GLOB.facial_hair_styles_list) + var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facialhairstyle] if(gender == MALE && S.gender == FEMALE) continue if(gender == FEMALE && S.gender == MALE) @@ -67,7 +67,7 @@ if( !(species in S.species_allowed)) continue - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] + valid_facialhairstyles[facialhairstyle] = GLOB.facial_hair_styles_list[facialhairstyle] if(valid_facialhairstyles.len) f_style = pick(valid_facialhairstyles) diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm index 988df646616..ba23ca7ab90 100644 --- a/code/_helpers/names.dm +++ b/code/_helpers/names.dm @@ -54,7 +54,7 @@ GLOBAL_VAR(religion_name) new_station_name = name + " " // Prefix - switch(Holiday) + switch(GLOB.Holiday) //get normal name if(null,"",0) name = pick("", "Stanford", "Dorf", "Alium", "Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World", "Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia", "Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East", "South", "Slant-ways", "Widdershins", "Rimward", "Expensive", "Procreatory", "Imperial", "Unidentified", "Immoral", "Carp", "Ork", "Pete", "Control", "Nettle", "Aspie", "Class", "Crab", "Fist","Corrogated","Skeleton","Race", "Fatguy", "Gentleman", "Capitalist", "Communist", "Bear", "Beard", "Derp", "Space", "Spess", "Star", "Moon", "System", "Mining", "Neckbeard", "Research", "Supply", "Military", "Orbital", "Battle", "Science", "Asteroid", "Home", "Production", "Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional", "Robot", "Hats", "Pizza") @@ -68,8 +68,8 @@ GLOBAL_VAR(religion_name) random = 13 else //get the first word of the Holiday and use that - var/i = findtext(Holiday," ",1,0) - name = copytext(Holiday,1,i) + var/i = findtext(GLOB.Holiday," ",1,0) + name = copytext(GLOB.Holiday,1,i) new_station_name += name + " " // Suffix @@ -199,7 +199,7 @@ GLOBAL_VAR(syndicate_code_response) //Code response for traitors. code_phrase += " " code_phrase += pick(last_names) if(2) - code_phrase += pick(joblist)//Returns a job. + code_phrase += pick(GLOB.joblist)//Returns a job. safety -= 1 if(2) switch(rand(1,2))//Places or things. diff --git a/code/_helpers/sorts/TimSort.dm b/code/_helpers/sorts/TimSort.dm index f3b065f2fd9..baa0cf9f67c 100644 --- a/code/_helpers/sorts/TimSort.dm +++ b/code/_helpers/sorts/TimSort.dm @@ -1,21 +1,26 @@ -//TimSort interface -/proc/sortTim(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex=0) - if(L && L.len >= 2) - fromIndex = fromIndex % L.len - toIndex = toIndex % (L.len+1) - if(fromIndex <= 0) - fromIndex += L.len - if(toIndex <= 0) - toIndex += L.len + 1 +/** + * ## Tim Sort + * Hybrid sorting algorithm derived from merge sort and insertion sort. + * + * **Sorts in place**. + * You might not need to get the return value. + * + * @see + * https://en.wikipedia.org/wiki/Timsort + * + * @param {list} to_sort - The list to sort. + * + * @param {proc} cmp - The comparison proc to use. Default: Numeric ascending. + * + * @param {boolean} associative - Whether the list is associative. Default: FALSE. + * + * @param {int} fromIndex - The index to start sorting from. Default: 1. + * + * @param {int} toIndex - The index to stop sorting at. Default: 0. + */ +/proc/sortTim(list/to_sort, cmp = GLOBAL_PROC_REF(cmp_numeric_asc), associative = FALSE, fromIndex = 1, toIndex = 0) as /list + CREATE_SORT_INSTANCE(to_sort, cmp, associative, fromIndex, toIndex) - var/datum/sort_instance/SI = GLOB.sortInstance - if(!SI) - SI = new + sorter.timSort(fromIndex, toIndex) - SI.L = L - SI.cmp = cmp - SI.associative = associative - - SI.timSort(fromIndex, toIndex) - - return L + return to_sort diff --git a/code/_helpers/sorts/__main.dm b/code/_helpers/sorts/__main.dm index 41b5b7e7490..aa34914dbd2 100644 --- a/code/_helpers/sorts/__main.dm +++ b/code/_helpers/sorts/__main.dm @@ -8,6 +8,27 @@ //When we get into galloping mode, we stay there until both runs win less often than MIN_GALLOP consecutive times. #define MIN_GALLOP 7 +/// Helper for the sorting procs. Prevents some code duplication. Creates /datum/sort_instance/sorter +#define CREATE_SORT_INSTANCE(to_sort, cmp, associative, fromIndex, toIndex) \ + if(length(to_sort) < 2) { \ + return to_sort; \ + } \ + fromIndex = fromIndex % length(to_sort); \ + toIndex = toIndex % (length(to_sort) + 1); \ + if (fromIndex <= 0) { \ + fromIndex += length(to_sort); \ + } \ + if (toIndex <= 0) { \ + toIndex += length(to_sort) + 1; \ + } \ + var/datum/sort_instance/sorter = GLOB.sortInstance; \ + if (isnull(sorter)) { \ + sorter = new; \ + } \ + sorter.L = to_sort; \ + sorter.cmp = cmp; \ + sorter.associative = associative; + //This is a global instance to allow much of this code to be reused. The interfaces are kept separately GLOBAL_DATUM_INIT(sortInstance, /datum/sort_instance, new()) /datum/sort_instance @@ -83,20 +104,20 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sort_instance, new()) return L -/* -Sorts the specified portion of the specified array using a binary -insertion sort. This is the best method for sorting small numbers -of elements. It requires O(n log n) compares, but O(n^2) data -movement (worst case). + /* + Sorts the specified portion of the specified array using a binary + insertion sort. This is the best method for sorting small numbers + of elements. It requires O(n log n) compares, but O(n^2) data + movement (worst case). -If the initial part of the specified range is already sorted, -this method can take advantage of it: the method assumes that the -elements in range [lo,start) are already sorted + If the initial part of the specified range is already sorted, + this method can take advantage of it: the method assumes that the + elements in range [lo,start) are already sorted -lo the index of the first element in the range to be sorted -hi the index after the last element in the range to be sorted -start the index of the first element in the range that is not already known to be sorted -*/ + lo the index of the first element in the range to be sorted + hi the index after the last element in the range to be sorted + start the index of the first element in the range that is not already known to be sorted + */ /datum/sort_instance/proc/binarySort(lo, hi, start) //ASSERT(lo <= start && start <= hi) if(start <= lo) diff --git a/code/_helpers/sorts/comparators.dm b/code/_helpers/sorts/comparators.dm index 01127df1d4f..c2d3ffb5066 100644 --- a/code/_helpers/sorts/comparators.dm +++ b/code/_helpers/sorts/comparators.dm @@ -112,3 +112,10 @@ if(isdatum(b)) b = REF(b) return sorttext("[a]", "[b]") + + +/proc/cmp_name_asc(atom/a, atom/b) + return sorttext(b.name, a.name) + +/proc/cmp_name_dsc(atom/a, atom/b) + return sorttext(a.name, b.name) diff --git a/code/_helpers/type2type.dm b/code/_helpers/type2type.dm index cd107c60927..026c0e8b994 100644 --- a/code/_helpers/type2type.dm +++ b/code/_helpers/type2type.dm @@ -64,11 +64,9 @@ // Returns the hex value of a number given a value assumed to be a base-ten value /proc/num2hex(num, padlength) - var/global/list/hexdigits = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F") - . = "" while(num > 0) - var/hexdigit = hexdigits[(num & 0xF) + 1] + var/hexdigit = GLOB.hexNums[(num & 0xF) + 1] . = "[hexdigit][.]" num >>= 4 //go to the next half-byte diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index b14d113f4db..2d250410d06 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -350,7 +350,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return //took too long newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters. - for(var/mob/living/M in player_list) + for(var/mob/living/M in GLOB.player_list) if(M == src) continue if(!newname || M.real_name == newname) @@ -385,7 +385,7 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/freeborg() var/select = null var/list/borgs = list() - for (var/mob/living/silicon/robot/A in player_list) + for (var/mob/living/silicon/robot/A in GLOB.player_list) if (A.stat == 2 || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone)) continue var/name = "[A.real_name] ([A.modtype] [A.braintype])" @@ -399,7 +399,7 @@ Turf and target are seperate in case you want to teleport some distance from a t //When a borg is activated, it can choose which AI it wants to be slaved to /proc/active_ais() . = list() - for(var/mob/living/silicon/ai/A in living_mob_list) + for(var/mob/living/silicon/ai/A in GLOB.living_mob_list) if(A.stat == DEAD) continue if(A.control_disabled == 1) @@ -426,48 +426,36 @@ Turf and target are seperate in case you want to teleport some distance from a t //Returns a list of all mobs with their name /proc/getmobs() - return observe_list_format(sortmobs()) + return observe_list_format(sort_mobs()) //Orders mobs by type then by name -/proc/sortmobs() +/proc/sort_mobs() var/list/moblist = list() - var/list/sortmob = sortAtom(mob_list) + var/list/sortmob = sort_names(GLOB.mob_list) for(var/mob/observer/eye/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/observer/blob/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/living/silicon/ai/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/living/silicon/pai/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/living/silicon/robot/M in sortmob) - moblist.Add(M) - var/list/delaylist = list() + moblist += M for(var/mob/living/carbon/human/M in sortmob) - if(M.low_sorting_priority && !M.client) - delaylist.Add(M) - else - moblist.Add(M) - moblist.Add(delaylist) + moblist += M for(var/mob/living/carbon/brain/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/living/carbon/alien/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/observer/dead/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/new_player/M in sortmob) - moblist.Add(M) + moblist += M for(var/mob/living/simple_mob/M in sortmob) - moblist.Add(M) - //VOREStation Addition Start + moblist += M for(var/mob/living/dominated_brain/M in sortmob) - moblist.Add(M) - //VOREStation Addition End - -// for(var/mob/living/silicon/hivebot/M in sortmob) -// mob_list.Add(M) -// for(var/mob/living/silicon/hive_mainframe/M in sortmob) -// mob_list.Add(M) + moblist += M return moblist /proc/observe_list_format(input_list) @@ -984,7 +972,7 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/get_mob_with_client_list() var/list/mobs = list() - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if (M.client) mobs += M return mobs @@ -1017,7 +1005,7 @@ Turf and target are seperate in case you want to teleport some distance from a t //Quick type checks for some tools -var/global/list/common_tools = list( +GLOBAL_LIST_INIT(common_tools, list( /obj/item/stack/cable_coil, /obj/item/tool/wrench, /obj/item/weldingtool, @@ -1025,10 +1013,10 @@ var/global/list/common_tools = list( /obj/item/tool/wirecutters, /obj/item/multitool, /obj/item/tool/crowbar, -/obj/item/tool/transforming) +/obj/item/tool/transforming)) /proc/istool(O) - if(O && is_type_in_list(O, common_tools)) + if(O && is_type_in_list(O, GLOB.common_tools)) return 1 return 0 @@ -1236,16 +1224,16 @@ var/mob/dview/dview_mob /mob/dview/Initialize(mapload) . = ..() // We don't want to be in any mob lists; we're a dummy not a mob. - mob_list -= src + GLOB.mob_list -= src if(stat == DEAD) - dead_mob_list -= src + GLOB.dead_mob_list -= src else - living_mob_list -= src + GLOB.living_mob_list -= src /mob/dview/Life() - mob_list -= src - dead_mob_list -= src - living_mob_list -= src + GLOB.mob_list -= src + GLOB.dead_mob_list -= src + GLOB.living_mob_list -= src /mob/dview/Destroy(var/force) stack_trace("Attempt to delete the dview_mob: [log_info_line(src)]") diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index d8dc1c22af8..ca15716dbe3 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -164,7 +164,7 @@ /datum/config_entry/flag/allow_holidays/ValidateAndSet() . = ..() if(.) - Holiday = config_entry_value + GLOB.Holiday = config_entry_value /datum/config_entry/number/minute_topic_limit config_entry_value = 250 diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 0d47361374d..71e087d6a74 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -2,8 +2,6 @@ // Controls the emergency shuttle -var/global/datum/emergency_shuttle_controller/emergency_shuttle = new - /datum/emergency_shuttle_controller var/datum/shuttle/autodock/ferry/emergency/shuttle // Set in shuttle_emergency.dm TODO - is it really? var/list/escape_pods diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 6004039363b..6a562eb3192 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -315,7 +315,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new log_world(message) /datum/controller/master/proc/SetRunLevel(new_runlevel) - var/old_runlevel = isnull(current_runlevel) ? "NULL" : runlevel_flags[current_runlevel] + var/old_runlevel = isnull(current_runlevel) ? "NULL" : GLOB.runlevel_flags[current_runlevel] testing("MC: Runlevel changed from [old_runlevel] to [new_runlevel]") current_runlevel = RUNLEVEL_FLAG_TO_INDEX(new_runlevel) if(current_runlevel < 1) @@ -367,8 +367,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new var/ss_runlevels = SS.runlevels var/added_to_any = FALSE - for(var/I in 1 to global.runlevel_flags.len) - if(ss_runlevels & global.runlevel_flags[I]) + for(var/I in 1 to GLOB.runlevel_flags.len) + if(ss_runlevels & GLOB.runlevel_flags[I]) while(runlevel_sorted_subsystems.len < I) runlevel_sorted_subsystems += list(list()) runlevel_sorted_subsystems[I] += SS diff --git a/code/controllers/subsystems/alarm.dm b/code/controllers/subsystems/alarm.dm index 25a28ca59e5..1fb94ac556c 100644 --- a/code/controllers/subsystems/alarm.dm +++ b/code/controllers/subsystems/alarm.dm @@ -1,12 +1,3 @@ - -// We manually initialize the alarm handlers instead of looping over all existing types -// to make it possible to write: camera_alarm.triggerAlarm() rather than SSalarm.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof. -/var/global/datum/alarm_handler/atmosphere/atmosphere_alarm = new() -/var/global/datum/alarm_handler/camera/camera_alarm = new() -/var/global/datum/alarm_handler/fire/fire_alarm = new() -/var/global/datum/alarm_handler/motion/motion_alarm = new() -/var/global/datum/alarm_handler/power/power_alarm = new() - SUBSYSTEM_DEF(alarm) name = "Alarm" wait = 2 SECONDS diff --git a/code/controllers/subsystems/appreciation_messages.dm b/code/controllers/subsystems/appreciation_messages.dm index 2bb454ca124..28dad50ab22 100644 --- a/code/controllers/subsystems/appreciation_messages.dm +++ b/code/controllers/subsystems/appreciation_messages.dm @@ -41,7 +41,7 @@ SUBSYSTEM_DEF(appreciation) do_appreciate() return - current_player_list = player_list.Copy() + current_player_list = GLOB.player_list.Copy() while(current_player_list.len) var/mob/M = current_player_list[current_player_list.len] diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm index 7ef0dcd1a60..fb1a2e7c355 100644 --- a/code/controllers/subsystems/game_master.dm +++ b/code/controllers/subsystems/game_master.dm @@ -234,7 +234,7 @@ SUBSYSTEM_DEF(game_master) dat += "Players" dat += "" - for(var/mob/M as anything in player_list) + for(var/mob/M as anything in GLOB.player_list) dat += "" dat += "[M] ([M.ckey])" dat += "[GLOB.metric.assess_player_activity(M)]%" diff --git a/code/controllers/subsystems/internal_wiki.dm b/code/controllers/subsystems/internal_wiki.dm index cb9716da6df..34429a27f43 100644 --- a/code/controllers/subsystems/internal_wiki.dm +++ b/code/controllers/subsystems/internal_wiki.dm @@ -331,18 +331,18 @@ SUBSYSTEM_DEF(internal_wiki) var/grind_list = list() var/list/display_reactions = list() - for(var/ore_type in ore_reagents) + for(var/ore_type in GLOB.ore_reagents) var/obj/item/ore/O = ore_type - if(R.id in ore_reagents[ore_type]) + if(R.id in GLOB.ore_reagents[ore_type]) display_reactions.Add(initial(O.name)) grind_list["ore"] = null if(display_reactions.len > 0) grind_list["ore"] = display_reactions display_reactions = list() - for(var/sheet_type in sheet_reagents) + for(var/sheet_type in GLOB.sheet_reagents) var/obj/item/stack/material/M = sheet_type - if(R.id in sheet_reagents[sheet_type]) + if(R.id in GLOB.sheet_reagents[sheet_type]) display_reactions.Add(initial(M.name)) grind_list["material"] = null if(display_reactions.len > 0) @@ -802,8 +802,8 @@ SUBSYSTEM_DEF(internal_wiki) data["pump_reagent"] = REG.name data["grind_reagents"] = null - if(global.ore_reagents[O.ore]) - var/list/output = global.ore_reagents[O.ore] + if(GLOB.ore_reagents[O.ore]) + var/list/output = GLOB.ore_reagents[O.ore] var/list/collect = list() var/total_parts = 0 for(var/Rid in output) @@ -874,8 +874,8 @@ SUBSYSTEM_DEF(internal_wiki) data["ignition_point"] = M.ignition_point data["grind_reagents"] = null - if(global.sheet_reagents[M.stack_type]) - var/list/output = global.sheet_reagents[M.stack_type] + if(GLOB.sheet_reagents[M.stack_type]) + var/list/output = GLOB.sheet_reagents[M.stack_type] if(output && output.len > 0) var/list/collect = list() var/total_parts = 0 diff --git a/code/controllers/subsystems/machines.dm b/code/controllers/subsystems/machines.dm index a8d9f845b2d..a0edb971c9b 100644 --- a/code/controllers/subsystems/machines.dm +++ b/code/controllers/subsystems/machines.dm @@ -53,7 +53,7 @@ SUBSYSTEM_DEF(machines) for(var/datum/powernet/PN as anything in powernets) qdel(PN) powernets.Cut() - setup_powernets_for_cables(cable_list) + setup_powernets_for_cables(GLOB.cable_list) /datum/controller/subsystem/machines/proc/setup_powernets_for_cables(list/cables) for(var/obj/structure/cable/PC as anything in cables) diff --git a/code/controllers/subsystems/mail.dm b/code/controllers/subsystems/mail.dm index 40a9ace721f..46f60d65d70 100644 --- a/code/controllers/subsystems/mail.dm +++ b/code/controllers/subsystems/mail.dm @@ -23,7 +23,7 @@ SUBSYSTEM_DEF(mail) var/obj/structure/closet/crate/mail/mailcrate = new(pick(SSsupply.get_clear_turfs())) // Collect recipients var/list/mail_recipients = list() - for(var/mob/living/carbon/human/player_human in player_list) + for(var/mob/living/carbon/human/player_human in GLOB.player_list) if(player_human.stat != DEAD && player_human.client && player_human.client.inactivity <= 10 MINUTES && player_human.job != JOB_OUTSIDER && player_human.job != JOB_ANOMALY && player_human.job != JOB_VR && !player_is_antag(player_human.mind) && !isbelly(player_human.loc)) // Only alive, active and NT employeers should be getting mail. mail_recipients += player_human diff --git a/code/controllers/subsystems/mobs.dm b/code/controllers/subsystems/mobs.dm index 2d8751df2f7..cf248b9749b 100644 --- a/code/controllers/subsystems/mobs.dm +++ b/code/controllers/subsystems/mobs.dm @@ -22,12 +22,12 @@ SUBSYSTEM_DEF(mobs) var/list/death_list = list() /datum/controller/subsystem/mobs/stat_entry(msg) - msg = "P: [global.mob_list.len] | S: [slept_mobs] | D: [death_list.len]" + msg = "P: [GLOB.mob_list.len] | S: [slept_mobs] | D: [death_list.len]" return ..() /datum/controller/subsystem/mobs/fire(resumed = 0) if (!resumed) - src.currentrun = mob_list.Copy() + src.currentrun = GLOB.mob_list.Copy() process_z.len = GLOB.living_players_by_zlevel.len slept_mobs = 0 for(var/level in 1 to process_z.len) @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(mobs) currentrun.len-- if(!M || QDELETED(M)) - mob_list -= M + GLOB.mob_list -= M continue else if(M.low_priority && !(M.loc && get_z(M) && process_z[get_z(M)])) slept_mobs++ @@ -64,34 +64,34 @@ SUBSYSTEM_DEF(mobs) /datum/controller/subsystem/mobs/proc/log_recent() var/msg = "Debug output from the [name] subsystem:\n" msg += "- This subsystem is processed tail-first -\n" - if(!currentrun || !mob_list) + if(!currentrun || !GLOB.mob_list) msg += "ERROR: A critical list [currentrun ? "mob_list" : "currentrun"] is gone!" log_game(msg) log_world(msg) return - msg += "Lists: currentrun: [currentrun.len], mob_list: [mob_list.len]\n" + msg += "Lists: currentrun: [currentrun.len], mob_list: [GLOB.mob_list.len]\n" if(!currentrun.len) msg += "!!The subsystem just finished the mob_list list, and currentrun is empty (or has never run).\n" msg += "!!The info below is the tail of mob_list instead of currentrun.\n" - var/datum/D = currentrun.len ? currentrun[currentrun.len] : mob_list[mob_list.len] + var/datum/D = currentrun.len ? currentrun[currentrun.len] : GLOB.mob_list[GLOB.mob_list.len] msg += "Tail entry: [describeThis(D)] (this is likely the item AFTER the problem item)\n" - var/position = mob_list.Find(D) + var/position = GLOB.mob_list.Find(D) if(!position) msg += "Unable to find context of tail entry in mob_list list.\n" else - if(position != mob_list.len) - var/additional = mob_list.Find(D, position+1) + if(position != GLOB.mob_list.len) + var/additional = GLOB.mob_list.Find(D, position+1) if(additional) msg += "WARNING: Tail entry found more than once in mob_list list! Context is for the first found.\n" - var/start = clamp(position-2,1,mob_list.len) - var/end = clamp(position+2,1,mob_list.len) + var/start = clamp(position-2,1,GLOB.mob_list.len) + var/end = clamp(position+2,1,GLOB.mob_list.len) msg += "2 previous elements, then tail, then 2 next elements of mob_list list for context:\n" msg += "---\n" for(var/i in start to end) - msg += "[describeThis(mob_list[i])][i == position ? " << TAIL" : ""]\n" + msg += "[describeThis(GLOB.mob_list[i])][i == position ? " << TAIL" : ""]\n" msg += "---\n" log_game(msg) log_world(msg) diff --git a/code/controllers/subsystems/persist_vr.dm b/code/controllers/subsystems/persist_vr.dm index c6eda65ef46..d9df527cbf6 100644 --- a/code/controllers/subsystems/persist_vr.dm +++ b/code/controllers/subsystems/persist_vr.dm @@ -25,8 +25,8 @@ SUBSYSTEM_DEF(persist) src.currentrun.Cut() return if(!resumed) - src.currentrun = human_mob_list.Copy() - src.currentrun += silicon_mob_list.Copy() + src.currentrun = GLOB.human_mob_list.Copy() + src.currentrun += GLOB.silicon_mob_list.Copy() //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm index 624d6f4279c..7a461fe9cda 100644 --- a/code/controllers/subsystems/radiation.dm +++ b/code/controllers/subsystems/radiation.dm @@ -15,7 +15,7 @@ SUBSYSTEM_DEF(radiation) if (!resumed) current_sources = sources.Copy() current_res_cache = resistance_cache.Copy() - listeners = living_mob_list.Copy() + listeners = GLOB.living_mob_list.Copy() while(current_sources.len) var/datum/radiation_source/S = current_sources[current_sources.len] diff --git a/code/controllers/subsystems/server_maint.dm b/code/controllers/subsystems/server_maint.dm index 20cd2760db6..a6ed6e471a0 100644 --- a/code/controllers/subsystems/server_maint.dm +++ b/code/controllers/subsystems/server_maint.dm @@ -26,15 +26,15 @@ SUBSYSTEM_DEF(server_maint) //Keep in mind, because of how delay works adding a list here makes each list take wait * delay more time to clear //Do it for stuff that's properly important, and shouldn't have null checks inside its other uses lists_to_clear = list( - "player_list" = global.player_list, - "mob_list" = global.mob_list, - "living_mob_list" = global.living_mob_list, - "dead_mob_list" = global.dead_mob_list, - "observer_mob_list" = global.observer_mob_list, - "listening_objects" = global.listening_objects, - "human_mob_list" = global.human_mob_list, - "silicon_mob_list" = global.silicon_mob_list, - "ai_list" = global.ai_list, + "player_list" = GLOB.player_list, + "mob_list" = GLOB.mob_list, + "living_mob_list" = GLOB.living_mob_list, + "dead_mob_list" = GLOB.dead_mob_list, + "observer_mob_list" = GLOB.observer_mob_list, + "listening_objects" = GLOB.listening_objects, + "human_mob_list" = GLOB.human_mob_list, + "silicon_mob_list" = GLOB.silicon_mob_list, + "ai_list" = GLOB.ai_list, //"keyloop_list" = global.keyloop_list, //A null here will cause new clients to be unable to move. totally unacceptable ) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 9dbfefa4287..62105c684c5 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -182,7 +182,7 @@ var/global/datum/controller/subsystem/ticker/ticker spawn(0)//Forking here so we dont have to wait for this to finish mode.post_setup() //Cleanup some stuff - for(var/obj/effect/landmark/start/S in landmarks_list) + for(var/obj/effect/landmark/start/S in GLOB.landmarks_list) //Deleting Startpoints but we need the ai point to AI-ize people later if (S.name != "AI") qdel(S) @@ -313,12 +313,12 @@ var/global/datum/controller/subsystem/ticker/ticker var/obj/structure/bed/temp_buckle = new(src) //Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around if(station_missed) - for(var/mob/living/M in living_mob_list) + for(var/mob/living/M in GLOB.living_mob_list) M.buckled = temp_buckle //buckles the mob so it can't do anything if(M.client) M.client.screen += cinematic //show every client the cinematic else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived" - for(var/mob/living/M in living_mob_list) + for(var/mob/living/M in GLOB.living_mob_list) M.buckled = temp_buckle if(M.client) M.client.screen += cinematic @@ -385,7 +385,7 @@ var/global/datum/controller/subsystem/ticker/ticker flick("station_explode_fade_red", cinematic) world << sound('sound/effects/explosionfar.ogg') cinematic.icon_state = "summary_selfdes" - for(var/mob/living/M in living_mob_list) + for(var/mob/living/M in GLOB.living_mob_list) if(M.loc.z in using_map.station_levels) M.death()//No mercy //If its actually the end of the round, wait for it to end. @@ -398,7 +398,7 @@ var/global/datum/controller/subsystem/ticker/ticker /datum/controller/subsystem/ticker/proc/create_characters() - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) if(player && player.ready && player.mind?.assigned_role) var/datum/job/J = SSjob.get_job(player.mind.assigned_role) @@ -428,14 +428,14 @@ var/global/datum/controller/subsystem/ticker/ticker GLOB.data_core.manifest_inject(new_char) /datum/controller/subsystem/ticker/proc/collect_minds() - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(player.mind) minds += player.mind /datum/controller/subsystem/ticker/proc/equip_characters() var/captainless=1 - for(var/mob/living/carbon/human/player in player_list) + for(var/mob/living/carbon/human/player in GLOB.player_list) if(player && player.mind && player.mind.assigned_role) if(player.mind.assigned_role == JOB_SITE_MANAGER) captainless=0 @@ -453,14 +453,14 @@ var/global/datum/controller/subsystem/ticker/ticker imp.post_implant(player) //VOREStation Addition End if(captainless) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(!isnewplayer(M)) to_chat(M, span_notice("Site Management is not forced on anyone.")) /datum/controller/subsystem/ticker/proc/declare_completion() to_world(span_filter_system("


A round of [mode.name] has ended!

")) - for(var/mob/Player in player_list) + for(var/mob/Player in GLOB.player_list) if(Player.mind && !isnewplayer(Player)) if(Player.stat != DEAD) var/turf/playerTurf = get_turf(Player) @@ -484,7 +484,7 @@ var/global/datum/controller/subsystem/ticker/ticker to_chat(Player, span_filter_system(span_red(span_bold("You did not survive the events on [station_name()]...")))) to_world(span_filter_system("
")) - for (var/mob/living/silicon/ai/aiPlayer in mob_list) + for (var/mob/living/silicon/ai/aiPlayer in GLOB.mob_list) if (aiPlayer.stat != 2) to_world(span_filter_system(span_bold("[aiPlayer.name]'s laws at the end of the round were:"))) // VOREStation edit else @@ -499,7 +499,7 @@ var/global/datum/controller/subsystem/ticker/ticker var/dronecount = 0 - for (var/mob/living/silicon/robot/robo in mob_list) + for (var/mob/living/silicon/robot/robo in GLOB.mob_list) if(istype(robo, /mob/living/silicon/robot/platform)) var/mob/living/silicon/robot/platform/tank = robo diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm index 0d89b3684cd..cda3f8767d5 100644 --- a/code/controllers/subsystems/vote.dm +++ b/code/controllers/subsystems/vote.dm @@ -36,7 +36,7 @@ SUBSYSTEM_DEF(vote) // Before doing the vote, see if anyone is playing. // If not, just do the transfer. var/players_are_in_round = FALSE - for(var/mob/living/L as anything in player_list) // Mobs with clients attached. + for(var/mob/living/L as anything in GLOB.player_list) // Mobs with clients attached. if(!istype(L)) // Exclude ghosts and other weird things. continue if(L.stat == DEAD) // Dead mobs aren't playing. diff --git a/code/datums/components/antags/changeling/powers/fabricate_clothing.dm b/code/datums/components/antags/changeling/powers/fabricate_clothing.dm index bf52f673e25..306870c1975 100644 --- a/code/datums/components/antags/changeling/powers/fabricate_clothing.dm +++ b/code/datums/components/antags/changeling/powers/fabricate_clothing.dm @@ -1,17 +1,3 @@ -//Needs a BIG rework. -var/global/list/changeling_fabricated_clothing = list( - "w_uniform" = /obj/item/clothing/under/chameleon/changeling, - "head" = /obj/item/clothing/head/chameleon/changeling, - "wear_suit" = /obj/item/clothing/suit/chameleon/changeling, - "shoes" = /obj/item/clothing/shoes/chameleon/changeling, - "gloves" = /obj/item/clothing/gloves/chameleon/changeling, - "wear_mask" = /obj/item/clothing/mask/chameleon/changeling, - "glasses" = /obj/item/clothing/glasses/chameleon/changeling, - "back" = /obj/item/storage/backpack/chameleon/changeling, - "belt" = /obj/item/storage/belt/chameleon/changeling, - "wear_id" = /obj/item/card/id/syndicate/changeling - ) - /datum/power/changeling/fabricate_clothing name = "Fabricate Clothing" desc = "We reform our flesh to resemble various cloths, leathers, and other materials, allowing us to quickly create a disguise. \ @@ -27,7 +13,7 @@ var/global/list/changeling_fabricated_clothing = list( set category = "Changeling" set name = "Fabricate Clothing (10)" - if(changeling_generic_equip_all_slots(changeling_fabricated_clothing, cost = 10)) + if(changeling_generic_equip_all_slots(GLOB.changeling_fabricated_clothing, cost = 10)) return 1 return 0 diff --git a/code/datums/components/antags/changeling/powers/revive.dm b/code/datums/components/antags/changeling/powers/revive.dm index 2effde42d83..4038ac6d88c 100644 --- a/code/datums/components/antags/changeling/powers/revive.dm +++ b/code/datums/components/antags/changeling/powers/revive.dm @@ -32,8 +32,8 @@ return FALSE if(src.stat == DEAD) - dead_mob_list -= src - living_mob_list += src + GLOB.dead_mob_list -= src + GLOB.living_mob_list += src var/mob/living/carbon/C = src C.tod = null diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 003f5905c94..47c28c6741e 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -52,7 +52,7 @@ if(OOC) var/active = 0 - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.real_name == name && M.client && M.client.inactivity <= 10 MINUTES) active = 1 break @@ -99,7 +99,7 @@ var/real_rank = make_list_rank(t.fields["real_rank"]) var/active = 0 - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.real_name == name && M.client && M.client.inactivity <= 10 MINUTES) active = 1 break @@ -110,10 +110,10 @@ off[name] = rank // Synthetics don't have actual records, so we will pull them from here. - for(var/mob/living/silicon/ai/ai in mob_list) + for(var/mob/living/silicon/ai/ai in GLOB.mob_list) bot[ai.name] = "Artificial Intelligence" - for(var/mob/living/silicon/robot/robot in mob_list) + for(var/mob/living/silicon/robot/robot in GLOB.mob_list) // No combat/syndicate cyborgs, no drones, and no AI shells. if(!robot.scrambledcodes && !robot.shell && !(robot.module && robot.module.hide_on_manifest())) bot[robot.name] = "[robot.modtype] [robot.braintype]" @@ -271,10 +271,10 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) // Synthetics don't have actual records, so we will pull them from here. // Synths don't have records, which is the means by which isactive is retrieved, so I'm hardcoding it to active, don't really have any better means - for(var/mob/living/silicon/ai/ai in mob_list) + for(var/mob/living/silicon/ai/ai in GLOB.mob_list) bot[++bot.len] = list("name" = ai.real_name, "rank" = "Artificial Intelligence", "active" = "Active") - for(var/mob/living/silicon/robot/robot in mob_list) + for(var/mob/living/silicon/robot/robot in GLOB.mob_list) // No combat/syndicate cyborgs, no drones, and no AI shells. if(robot.scrambledcodes || robot.shell || (robot.module && robot.module.hide_on_manifest())) continue @@ -298,7 +298,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) /datum/datacore/proc/manifest() spawn() - for(var/mob/living/carbon/human/H in player_list) + for(var/mob/living/carbon/human/H in GLOB.player_list) manifest_inject(H) return diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 706d048a22d..db387c3d610 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -223,7 +223,7 @@ if(isnull(disease)) return FALSE - var/mob/living/carbon/human/H = tgui_input_list(usr, "Choose infectee", "Characters", human_mob_list) + var/mob/living/carbon/human/H = tgui_input_list(usr, "Choose infectee", "Characters", GLOB.human_mob_list) if(isnull(H)) return FALSE diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 2cf2d6dc256..ce33c82b10d 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -456,7 +456,7 @@ GLOBAL_LIST_INIT(advance_cures, list( for(var/datum/disease/advance/AD in GLOB.active_diseases) AD.Refresh() - H = tgui_input_list(src, "Choose infectee", "Infectees", human_mob_list) + H = tgui_input_list(src, "Choose infectee", "Infectees", GLOB.human_mob_list) if(isnull(H)) return FALSE diff --git a/code/datums/ghost_query.dm b/code/datums/ghost_query.dm index a1cd31c5383..3ca0efaf92f 100644 --- a/code/datums/ghost_query.dm +++ b/code/datums/ghost_query.dm @@ -18,7 +18,7 @@ /// Begin the ghost asking /datum/ghost_query/proc/query() // First, ask all the ghosts who want to be asked. - for(var/mob/observer/dead/D as anything in observer_mob_list) + for(var/mob/observer/dead/D as anything in GLOB.observer_mob_list) if(evaluate_candidate(D)) ask_question(D) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 2a73f3b4b90..3a79e163539 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -188,7 +188,7 @@ if(antag) antag.place_mob(src.current) else if (href_list["role_edit"]) - var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", assigned_role, joblist) + var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", assigned_role, GLOB.joblist) if (!new_role) return assigned_role = new_role @@ -493,7 +493,7 @@ return 0 /datum/mind/proc/get_ghost(even_if_they_cant_reenter) - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(G.mind == src) if(G.can_reenter_corpse || even_if_they_cant_reenter) return G diff --git a/code/datums/repositories/crew.dm b/code/datums/repositories/crew.dm index d6c9ff2fc06..a341008ee5e 100644 --- a/code/datums/repositories/crew.dm +++ b/code/datums/repositories/crew.dm @@ -66,7 +66,7 @@ var/global/datum/repository/crew/crew_repository = new() /datum/repository/crew/proc/scan() var/list/tracked = list() - for(var/mob/living/carbon/human/H in mob_list) + for(var/mob/living/carbon/human/H in GLOB.mob_list) if(istype(H.w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/C = H.w_uniform if (C.has_sensor) diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 7e781e749dc..a6865805571 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -53,7 +53,7 @@ Log(message, message_title) /datum/announcement/proc/Message(message as text, message_title as text, var/list/zlevels) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(!isnewplayer(M) && !isdeaf(M)) to_chat(M, "

[title]

") to_chat(M, span_alert("[message]")) @@ -79,7 +79,7 @@ command += "
[span_alert(message)]
" command += "
" - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(zlevels && !(get_z(M) in zlevels)) continue if(!isnewplayer(M) && !isdeaf(M)) @@ -107,7 +107,7 @@ announce_newscaster_news(news) /datum/announcement/proc/PlaySound(var/message_sound, var/list/zlevels) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(zlevels && !(M.z in zlevels)) continue if(!isnewplayer(M) && !isdeaf(M)) @@ -117,7 +117,7 @@ return spawn(22) // based on length of preamble.ogg + arbitrary delay - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(zlevels && !(M.z in zlevels)) continue if(!isnewplayer(M) && !isdeaf(M)) diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm index c2e48d42be6..bab8355f5ca 100644 --- a/code/defines/procs/statistics.dm +++ b/code/defines/procs/statistics.dm @@ -3,7 +3,7 @@ return var/admincount = GLOB.admins.len var/playercount = 0 - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) playercount += 1 establish_db_connection() diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index cb689847e6c..04edda17e24 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -43,7 +43,7 @@ var/datum/antagonist/borer/borers var/mob/living/simple_mob/animal/borer/borer = mob if(istype(borer)) var/mob/living/carbon/human/host - for(var/mob/living/carbon/human/H in mob_list) + for(var/mob/living/carbon/human/H in GLOB.mob_list) if(H.stat != DEAD && !H.has_brain_worms()) var/obj/item/organ/external/head = H.get_organ(BP_HEAD) if(head && !(head.robotic >= ORGAN_ROBOT)) diff --git a/code/game/antagonist/antagonist_place.dm b/code/game/antagonist/antagonist_place.dm index 11ea718f8cc..33a99a3e558 100644 --- a/code/game/antagonist/antagonist_place.dm +++ b/code/game/antagonist/antagonist_place.dm @@ -1,7 +1,7 @@ /datum/antagonist/proc/get_starting_locations() if(landmark_id) starting_locations = list() - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == landmark_id) starting_locations |= get_turf(L) diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm index d17f5d10809..c8d6493bc87 100644 --- a/code/game/antagonist/antagonist_print.dm +++ b/code/game/antagonist/antagonist_print.dm @@ -73,7 +73,7 @@ var/TC_uses = FALSE var/uplink_true = FALSE var/purchases = "" - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.mind && M.mind.used_TC) TC_uses += M.mind.used_TC uplink_true = TRUE diff --git a/code/game/antagonist/antagonist_update.dm b/code/game/antagonist/antagonist_update.dm index e93e1e4c401..04bf3a92f5e 100644 --- a/code/game/antagonist/antagonist_update.dm +++ b/code/game/antagonist/antagonist_update.dm @@ -85,7 +85,7 @@ if(ticker.mode.antag_scaling_coeff) var/count = 0 - for(var/mob/living/M in player_list) + for(var/mob/living/M in GLOB.player_list) if(M.client) count++ diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm index d7d41930315..c3467567bee 100644 --- a/code/game/antagonist/mutiny/mutineer.dm +++ b/code/game/antagonist/mutiny/mutineer.dm @@ -38,14 +38,14 @@ var/datum/antagonist/mutineer/mutineers // Returns an array in case we want to expand on this later. proc/get_head_loyalist_candidates() var/list/candidates[0] - for(var/mob/loyalist in player_list) + for(var/mob/loyalist in GLOB.player_list) if(loyalist.mind && loyalist.mind.assigned_role == JOB_SITE_MANAGER) candidates.Add(loyalist.mind) return candidates proc/get_head_mutineer_candidates() var/list/candidates[0] - for(var/mob/mutineer in player_list) + for(var/mob/mutineer in GLOB.player_list) if(mutineer.client.prefs.be_special & BE_MUTINEER) for(var/job in command_positions - JOB_SITE_MANAGER) if(mutineer.mind && mutineer.mind.assigned_role == job) diff --git a/code/game/antagonist/station/highlander.dm b/code/game/antagonist/station/highlander.dm index 02e63494222..aa2764839a6 100644 --- a/code/game/antagonist/station/highlander.dm +++ b/code/game/antagonist/station/highlander.dm @@ -77,7 +77,7 @@ var/datum/antagonist/highlander/highlanders message_admins(span_adminnotice("[key_name_admin(usr)] used THERE CAN BE ONLY ONE!")) log_admin("[key_name(usr)] used THERE CAN BE ONLY ONE.") - for(var/mob/living/carbon/human/H in player_list) + for(var/mob/living/carbon/human/H in GLOB.player_list) if(H.stat == 2 || !(H.client)) continue if(is_special_character(H)) continue highlanders.add_antagonist(H.mind) diff --git a/code/game/antagonist/station/loyalist.dm b/code/game/antagonist/station/loyalist.dm index ec275844264..a21e4626d72 100644 --- a/code/game/antagonist/station/loyalist.dm +++ b/code/game/antagonist/station/loyalist.dm @@ -39,7 +39,7 @@ var/datum/antagonist/loyalists/loyalists if(!..()) return global_objectives = list() - for(var/mob/living/carbon/human/player in mob_list) + for(var/mob/living/carbon/human/player in GLOB.mob_list) if(!player.mind || player.stat==2 || !(SSjob.is_job_in_department(player.mind.assigned_role, DEPARTMENT_COMMAND))) continue var/datum/objective/protect/loyal_obj = new diff --git a/code/game/antagonist/station/renegade.dm b/code/game/antagonist/station/renegade.dm index 740952c5a1c..83f13e83ae5 100644 --- a/code/game/antagonist/station/renegade.dm +++ b/code/game/antagonist/station/renegade.dm @@ -100,7 +100,7 @@ var/datum/antagonist/renegade/renegades /proc/rightandwrong() to_chat(usr, span_infoplain(span_bold("You summoned guns!"))) message_admins("[key_name_admin(usr, 1)] summoned guns!") - for(var/mob/living/carbon/human/H in player_list) + for(var/mob/living/carbon/human/H in GLOB.player_list) if(H.stat == 2 || !(H.client)) continue if(is_special_character(H)) continue renegades.add_antagonist(H.mind) diff --git a/code/game/antagonist/station/revolutionary.dm b/code/game/antagonist/station/revolutionary.dm index 6fb563ef214..dd73c5ad2f0 100644 --- a/code/game/antagonist/station/revolutionary.dm +++ b/code/game/antagonist/station/revolutionary.dm @@ -41,7 +41,7 @@ var/datum/antagonist/revolutionary/revs if(!..()) return global_objectives = list() - for(var/mob/living/carbon/human/player in mob_list) + for(var/mob/living/carbon/human/player in GLOB.mob_list) if(!player.mind || player.stat==2 || !(SSjob.is_job_in_department(player.mind.assigned_role, DEPARTMENT_COMMAND))) continue var/datum/objective/rev/rev_obj = new diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 1f2c4059add..dcdc8f075be 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -4,15 +4,6 @@ #define DNA_ON_LOWERBOUND 3 #define DNA_ON_UPPERBOUND 4 -// Defines which values mean "on" or "off". -// This is to make some of the more OP superpowers a larger PITA to activate, -// and to tell our new DNA datum which values to set in order to turn something -// on or off. -var/global/list/dna_activity_bounds[DNA_SE_LENGTH] - -// Used to determine what each block means (admin hax and species stuff on /vg/, mostly) -var/global/list/assigned_blocks[DNA_SE_LENGTH] - // Traitgenes Genes accessible by global VV, and lists for good and bad mutations for quick randomized selection of traitgenes. Removed dna from gene's path GLOBAL_LIST_EMPTY_TYPED(dna_genes, /datum/gene) GLOBAL_LIST_EMPTY(trait_to_dna_genes) // Reverse lookup genes, use get_gene_from_trait(var/trait_path) to read this @@ -94,7 +85,7 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) continue if("body_markings") var/list/body_markings_genetic = body_markings.Copy() - body_markings_genetic -= body_marking_nopersist_list + body_markings_genetic -= GLOB.body_marking_nopersist_list new_dna.vars[A] = body_markings_genetic continue if(islist(vars[A])) @@ -134,12 +125,12 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) // FIXME: Species-specific defaults pls if(!character.h_style) character.h_style = "Skinhead" - var/hair = hair_styles_list.Find(character.h_style) + var/hair = GLOB.hair_styles_list.Find(character.h_style) // Facial Hair if(!character.f_style) character.f_style = "Shaved" - var/beard = facial_hair_styles_list.Find(character.f_style) + var/beard = GLOB.facial_hair_styles_list.Find(character.f_style) // VOREStation Edit Start @@ -147,21 +138,21 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) // Demi Ears var/ear_style = 0 if(character.ear_style) - ear_style = ear_styles_list.Find(character.ear_style.type) + ear_style = GLOB.ear_styles_list.Find(character.ear_style.type) var/ear_secondary_style = 0 if(character.ear_secondary_style) - ear_secondary_style = ear_styles_list.Find(character.ear_secondary_style.type) + ear_secondary_style = GLOB.ear_styles_list.Find(character.ear_secondary_style.type) // Demi Tails var/tail_style = 0 if(character.tail_style) - tail_style = tail_styles_list.Find(character.tail_style.type) + tail_style = GLOB.tail_styles_list.Find(character.tail_style.type) // Demi Wings var/wing_style = 0 if(character.wing_style) - wing_style = wing_styles_list.Find(character.wing_style.type) + wing_style = GLOB.wing_styles_list.Find(character.wing_style.type) // Hairgrad var/grad_style = 0 @@ -199,11 +190,11 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) src.custom_footstep = character.custom_footstep // +1 to account for the none-of-the-above possibility - SetUIValueRange(DNA_UI_EAR_STYLE, ear_style + 1, ear_styles_list.len + 1, 1) - SetUIValueRange(DNA_UI_EAR_SECONDARY_STYLE, ear_secondary_style + 1, ear_styles_list.len + 1, 1) - SetUIValueRange(DNA_UI_TAIL_STYLE, tail_style + 1, tail_styles_list.len + 1, 1) + SetUIValueRange(DNA_UI_EAR_STYLE, ear_style + 1, GLOB.ear_styles_list.len + 1, 1) + SetUIValueRange(DNA_UI_EAR_SECONDARY_STYLE, ear_secondary_style + 1, GLOB.ear_styles_list.len + 1, 1) + SetUIValueRange(DNA_UI_TAIL_STYLE, tail_style + 1, GLOB.tail_styles_list.len + 1, 1) SetUIValueRange(DNA_UI_PLAYERSCALE, size_multiplier, GLOB.player_sizes_list.len, 1) - SetUIValueRange(DNA_UI_WING_STYLE, wing_style + 1, wing_styles_list.len + 1, 1) + SetUIValueRange(DNA_UI_WING_STYLE, wing_style + 1, GLOB.wing_styles_list.len + 1, 1) SetUIValueRange(DNA_UI_GRAD_STYLE, grad_style, GLOB.hair_gradients.len, 1) SetUIValueRange(DNA_UI_TAIL_R, character.r_tail, 255, 1) @@ -280,8 +271,8 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1) - SetUIValueRange(DNA_UI_HAIR_STYLE, hair, hair_styles_list.len, 1) - SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len,1) + SetUIValueRange(DNA_UI_HAIR_STYLE, hair, GLOB.hair_styles_list.len, 1) + SetUIValueRange(DNA_UI_BEARD_STYLE, beard, GLOB.facial_hair_styles_list.len,1) body_markings.Cut() for(var/obj/item/organ/external/E in character.organs) @@ -336,26 +327,26 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) E.markings = marklist.Copy() //Hair style - var/hair = GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len) - if((0 < hair) && (hair <= hair_styles_list.len)) - H.h_style = hair_styles_list[hair] + var/hair = GetUIValueRange(DNA_UI_HAIR_STYLE,GLOB.hair_styles_list.len) + if((0 < hair) && (hair <= GLOB.hair_styles_list.len)) + H.h_style = GLOB.hair_styles_list[hair] //Facial Hair - var/beard = GetUIValueRange(DNA_UI_BEARD_STYLE,facial_hair_styles_list.len) - if((0 < beard) && (beard <= facial_hair_styles_list.len)) - H.f_style = facial_hair_styles_list[beard] + var/beard = GetUIValueRange(DNA_UI_BEARD_STYLE,GLOB.facial_hair_styles_list.len) + if((0 < beard) && (beard <= GLOB.facial_hair_styles_list.len)) + H.f_style = GLOB.facial_hair_styles_list[beard] // Ears - var/ears = GetUIValueRange(DNA_UI_EAR_STYLE, ear_styles_list.len + 1) - 1 + var/ears = GetUIValueRange(DNA_UI_EAR_STYLE, GLOB.ear_styles_list.len + 1) - 1 if(ears < 1) H.ear_style = null - else if((0 < ears) && (ears <= ear_styles_list.len)) - H.ear_style = ear_styles_list[ear_styles_list[ears]] - var/ears_secondary = GetUIValueRange(DNA_UI_EAR_SECONDARY_STYLE, ear_styles_list.len + 1) - 1 + else if((0 < ears) && (ears <= GLOB.ear_styles_list.len)) + H.ear_style = GLOB.ear_styles_list[GLOB.ear_styles_list[ears]] + var/ears_secondary = GetUIValueRange(DNA_UI_EAR_SECONDARY_STYLE, GLOB.ear_styles_list.len + 1) - 1 if(ears_secondary < 1) H.ear_secondary_style = null - else if((0 < ears_secondary) && (ears_secondary <= ear_styles_list.len)) - H.ear_secondary_style = ear_styles_list[ear_styles_list[ears_secondary]] + else if((0 < ears_secondary) && (ears_secondary <= GLOB.ear_styles_list.len)) + H.ear_secondary_style = GLOB.ear_styles_list[GLOB.ear_styles_list[ears_secondary]] // Ear Color H.r_ears = GetUIValueRange(DNA_UI_EARS_R, 255) @@ -381,18 +372,18 @@ GLOBAL_LIST_EMPTY_TYPED(dna_genes_bad, /datum/gene/trait) ) //Tail - var/tail = GetUIValueRange(DNA_UI_TAIL_STYLE, tail_styles_list.len + 1) - 1 + var/tail = GetUIValueRange(DNA_UI_TAIL_STYLE, GLOB.tail_styles_list.len + 1) - 1 if(tail < 1) H.tail_style = null - else if((0 < tail) && (tail <= tail_styles_list.len)) - H.tail_style = tail_styles_list[tail_styles_list[tail]] + else if((0 < tail) && (tail <= GLOB.tail_styles_list.len)) + H.tail_style = GLOB.tail_styles_list[GLOB.tail_styles_list[tail]] //Wing - var/wing = GetUIValueRange(DNA_UI_WING_STYLE, wing_styles_list.len + 1) - 1 + var/wing = GetUIValueRange(DNA_UI_WING_STYLE, GLOB.wing_styles_list.len + 1) - 1 if(wing < 1) H.wing_style = null - else if((0 < wing) && (wing <= wing_styles_list.len)) - H.wing_style = wing_styles_list[wing_styles_list[wing]] + else if((0 < wing) && (wing <= GLOB.wing_styles_list.len)) + H.wing_style = GLOB.wing_styles_list[GLOB.wing_styles_list[wing]] //Wing Color H.r_wing = GetUIValueRange(DNA_UI_WING_R, 255) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index f2bbbab1dc8..0fc89431db1 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -264,7 +264,7 @@ || locate(/obj/machinery/computer/cloning, get_step(src, WEST))) if(!M.client && M.mind) - for(var/mob/observer/dead/ghost in player_list) + for(var/mob/observer/dead/ghost in GLOB.player_list) if(ghost.mind == M.mind) to_chat(ghost, span_interface(span_large(span_bold("Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!") + " (Verbs -> Ghost -> Re-enter corpse)"))) break diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm index eaea934d6ce..c2ebdaee50f 100644 --- a/code/game/gamemodes/cult/construct_spells.dm +++ b/code/game/gamemodes/cult/construct_spells.dm @@ -261,7 +261,7 @@ ..() var/destination = null - for(var/obj/singularity/narsie/large/N in narsie_list) + for(var/obj/singularity/narsie/large/N in GLOB.narsie_list) destination = N.loc break if(destination) diff --git a/code/game/gamemodes/cult/hell_universe.dm b/code/game/gamemodes/cult/hell_universe.dm index d8b2f4ce7a1..810c0ead177 100644 --- a/code/game/gamemodes/cult/hell_universe.dm +++ b/code/game/gamemodes/cult/hell_universe.dm @@ -41,7 +41,7 @@ In short: set background = 1 // garbage_collector.garbage_collect = 0 - escape_list = get_area_turfs(locate(/area/hallway/secondary/exit)) + GLOB.escape_list = get_area_turfs(locate(/area/hallway/secondary/exit)) //Separated into separate procs for profiling AreaSet() diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index 335705560d2..a31f0040ae3 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -1,6 +1,5 @@ var/global/narsie_behaviour = "CultStation13" var/global/narsie_cometh = 0 -var/global/list/narsie_list = list() /obj/singularity/narsie //Moving narsie to its own file for the sake of being clearer name = "Nar-Sie" desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees." @@ -18,10 +17,10 @@ var/global/list/narsie_list = list() /obj/singularity/narsie/Initialize(mapload) . = ..() - narsie_list.Add(src) + GLOB.narsie_list.Add(src) /obj/singularity/narsie/Destroy() - narsie_list.Remove(src) + GLOB.narsie_list.Remove(src) . = ..() /obj/singularity/narsie/large @@ -129,13 +128,13 @@ var/global/list/narsie_list = list() spawn(0) step(src, movement_dir) narsiefloor(get_turf(loc)) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) M.see_narsie(src,movement_dir) spawn(10) step(src, movement_dir) narsiefloor(get_turf(loc)) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) M.see_narsie(src,movement_dir) return 1 @@ -287,7 +286,7 @@ var/global/list/narsie_list = list() acquire(pick(cultists)) return //If there was living cultists, it picks one to follow. - for(var/mob/living/carbon/human/food in living_mob_list) + for(var/mob/living/carbon/human/food in GLOB.living_mob_list) if(food.stat) continue var/turf/pos = get_turf(food) @@ -298,7 +297,7 @@ var/global/list/narsie_list = list() acquire(pick(cultists)) return //no living cultists, pick a living human instead. - for(var/mob/observer/dead/ghost in player_list) + for(var/mob/observer/dead/ghost in GLOB.player_list) if(!ghost.client) continue var/turf/pos = get_turf(ghost) @@ -335,7 +334,7 @@ var/global/list/narsie_list = list() chained = 1 move_self = 0 icon_state ="narsie-chains" - for(var/mob/M in mob_list)//removing the client image of nar-sie while it is chained + for(var/mob/M in GLOB.mob_list)//removing the client image of nar-sie while it is chained if(M.client) M.see_narsie(src) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index af93dd4d202..796e8f8e066 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -69,18 +69,18 @@ GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa"," . = ..() blood_image = image(loc = src) blood_image.override = 1 - for(var/mob/living/silicon/ai/AI in player_list) + for(var/mob/living/silicon/ai/AI in GLOB.player_list) if(AI.client) AI.client.images += blood_image - rune_list.Add(src) + GLOB.rune_list.Add(src) /obj/effect/rune/Destroy() - for(var/mob/living/silicon/ai/AI in player_list) + for(var/mob/living/silicon/ai/AI in GLOB.player_list) if(AI.client) AI.client.images -= blood_image qdel(blood_image) blood_image = null - rune_list.Remove(src) + GLOB.rune_list.Remove(src) . = ..() /obj/effect/rune/examine(mob/user) @@ -322,7 +322,7 @@ GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa"," runerandom() if(iscultist(user)) var/C = 0 - for(var/obj/effect/rune/N in rune_list) + for(var/obj/effect/rune/N in GLOB.rune_list) C++ if (!istype(user.loc,/turf)) to_chat(user, span_warning("You do not have enough space to write a proper rune.")) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index cb72822de13..8586aae1f0b 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -17,7 +17,7 @@ var/list/sacrificed = list() var/allrunesloc[] allrunesloc = new/list() var/index = 0 - for(var/obj/effect/rune/R in rune_list) + for(var/obj/effect/rune/R in GLOB.rune_list) if(R == src) continue if(R.word1 == GLOB.cultwords["travel"] && R.word2 == GLOB.cultwords["self"] && R.word3 == key && isPlayerLevel(R.z)) @@ -51,7 +51,7 @@ var/list/sacrificed = list() var/runecount = 0 var/obj/effect/rune/IP = null var/mob/living/user = usr - for(var/obj/effect/rune/R in rune_list) + for(var/obj/effect/rune/R in GLOB.rune_list) if(R == src) continue if(R.word1 == GLOB.cultwords["travel"] && R.word2 == GLOB.cultwords["other"] && R.word3 == key) @@ -234,7 +234,7 @@ var/list/sacrificed = list() /obj/effect/rune/proc/drain() var/drain = 0 - for(var/obj/effect/rune/R in rune_list) + for(var/obj/effect/rune/R in GLOB.rune_list) if(R.word1==GLOB.cultwords["travel"] && R.word2==GLOB.cultwords["blood"] && R.word3==GLOB.cultwords["self"]) for(var/mob/living/carbon/D in R.loc) if(D.stat!=2) @@ -334,7 +334,7 @@ var/list/sacrificed = list() is_sacrifice_target = 0 find_sacrifice: - for(var/obj/effect/rune/R in rune_list) + for(var/obj/effect/rune/R in GLOB.rune_list) if(R.word1==GLOB.cultwords["blood"] && R.word2==GLOB.cultwords["join"] && R.word3==GLOB.cultwords["hell"]) for(var/mob/living/carbon/human/N in R.loc) if(cult && N.mind && N.mind == cult.sacrifice_target) @@ -355,7 +355,7 @@ var/list/sacrificed = list() to_chat(usr, span_warning("The Geometer of Blood refuses to touch this one.")) return fizzle() else if(!corpse_to_raise.client && corpse_to_raise.mind) //Don't force the dead person to come back if they don't want to. - for(var/mob/observer/dead/ghost in player_list) + for(var/mob/observer/dead/ghost in GLOB.player_list) if(ghost.mind == corpse_to_raise.mind) to_chat(ghost, span_interface(span_large(span_bold("The cultist [usr.real_name] is trying to \ revive you. Return to your body if you want to be resurrected into the service of Nar'Sie!") + "\ @@ -629,7 +629,7 @@ var/list/sacrificed = list() for(var/datum/mind/H in cult.current_antagonists) if (H.current) to_chat(H.current, span_cult("[input]")) - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) to_chat(O, span_cult("[input]")) qdel(src) return 1 @@ -1035,7 +1035,7 @@ var/list/sacrificed = list() if(iscultist(C) && !C.stat) culcount++ if(culcount >= 5) - for(var/obj/effect/rune/R in rune_list) + for(var/obj/effect/rune/R in GLOB.rune_list) if(R.forensic_data?.get_blooddna() == src.forensic_data?.get_blooddna()) for(var/mob/living/M in orange(2,R)) M.take_overall_damage(0,15) diff --git a/code/game/gamemodes/endgame/supermatter_cascade/portal.dm b/code/game/gamemodes/endgame/supermatter_cascade/portal.dm index 5e27d629107..4c0f29093f2 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/portal.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/portal.dm @@ -22,7 +22,7 @@ overlays = 0 /obj/singularity/narsie/large/exit/process() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) M.see_rift(src) eat() @@ -38,13 +38,13 @@ var/mob/living/L = A if(L.buckled && istype(L.buckled,/obj/structure/bed/)) var/turf/O = L.buckled - do_teleport(O, pick(endgame_safespawns), local = FALSE) //VOREStation Edit + do_teleport(O, pick(GLOB.endgame_safespawns), local = FALSE) //VOREStation Edit L.loc = O.loc else - do_teleport(L, pick(endgame_safespawns), local = FALSE) //dead-on precision //VOREStation Edit + do_teleport(L, pick(GLOB.endgame_safespawns), local = FALSE) //dead-on precision //VOREStation Edit else if (istype(A, /obj/mecha/)) - do_teleport(A, pick(endgame_safespawns), local = FALSE) //dead-on precision //VOREStation Edit + do_teleport(A, pick(GLOB.endgame_safespawns), local = FALSE) //dead-on precision //VOREStation Edit else if (isturf(A)) var/turf/T = A diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index ea2def67f1c..8ba15701539 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -41,7 +41,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) world << sound('sound/effects/cascade.ogg') - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) M.flash_eyes() if(emergency_shuttle.can_recall()) @@ -58,7 +58,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) PlayerSet() - new /obj/singularity/narsie/large/exit(pick(endgame_exits)) + new /obj/singularity/narsie/large/exit(pick(GLOB.endgame_exits)) spawn(rand(30,60) SECONDS) var/txt = {" There's been a galaxy-wide electromagnetic pulse. All of our systems are heavily damaged and many personnel are dead or dying. We are seeing increasing indications of the universe itself beginning to unravel. @@ -117,7 +117,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) APC.queue_icon_update() /datum/universal_state/supermatter_cascade/proc/PlayerSet() - for(var/datum/mind/M in player_list) + for(var/datum/mind/M in GLOB.player_list) if(!isliving(M.current)) continue if(M.current.stat!=2) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 094edcf9143..7868fd98021 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -31,7 +31,7 @@ switch(pick(eventNumbersToPickFrom)) if(1) command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert") - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(!isnewplayer(M)) M << sound('sound/AI/meteors.ogg') spawn(100) @@ -43,7 +43,7 @@ if(2) command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert") - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(!isnewplayer(M)) M << sound('sound/AI/granomalies.ogg') var/turf/T = pick(blobstart) @@ -102,7 +102,7 @@ GLOBAL_VAR_INIT(eventchance, 10) // Percent chance per 5 minutes. GLOBAL_VAR_INIT(hadevent, 0) /proc/appendicitis() - for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) + for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list)) if(H.client && H.appendicitis()) break @@ -142,7 +142,7 @@ GLOBAL_VAR_INIT(hadevent, 0) sleep(100) */ - for(var/mob/living/carbon/human/H in living_mob_list) + for(var/mob/living/carbon/human/H in GLOB.living_mob_list) var/turf/T = get_turf(H) if(!T) continue @@ -205,7 +205,7 @@ GLOBAL_VAR_INIT(hadevent, 0) to_world_log("ERROR: Could not initate grey-tide. Unable find prison or brig area.") /proc/carp_migration() // -- Darem - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn") new /mob/living/simple_mob/animal/space/carp(C.loc) //sleep(100) @@ -221,7 +221,7 @@ GLOBAL_VAR_INIT(hadevent, 0) for(var/i=1,i<=lightsoutAmount,i++) var/list/possibleEpicentres = list() - for(var/obj/effect/landmark/newEpicentre in landmarks_list) + for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list) if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList)) possibleEpicentres += newEpicentre if(possibleEpicentres.len) @@ -250,7 +250,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is */ //AI laws - for(var/mob/living/silicon/ai/M in living_mob_list) + for(var/mob/living/silicon/ai/M in GLOB.living_mob_list) if(M.stat != 2 && M.see_in_dark != 0) var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS") var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS") @@ -269,7 +269,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is var/allergysev = pick("deathly", "mildly", "severely", "contagiously") var/crew var/list/pos_crew = list() - for(var/mob/living/carbon/human/pos in player_list) + for(var/mob/living/carbon/human/pos in GLOB.player_list) pos_crew += pos.real_name if(pos_crew.len) crew = pick(pos_crew) diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm index 095e6893d50..0bd47bcedb9 100644 --- a/code/game/gamemodes/events/holidays/Christmas.dm +++ b/code/game/gamemodes/events/holidays/Christmas.dm @@ -4,7 +4,7 @@ for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/i=1,i<=rand(1,5),i++) new /obj/item/a_gift(T) - //for(var/mob/living/simple_mob/corgi/Ian/Ian in mob_list) + //for(var/mob/living/simple_mob/corgi/Ian/Ian in GLOB.mob_list) // Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian)) /proc/ChristmasEvent() diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 9329bb1862e..eddf86ab89f 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -1,5 +1,5 @@ //Uncommenting ALLOW_HOLIDAYS in config.txt will enable Holidays -var/global/list/Holiday = list() //Holidays are lists now, so we can have more than one holiday at the same time (hey, you never know). +GLOBAL_LIST_EMPTY(Holiday) //Holidays are lists now, so we can have more than one holiday at the same time (hey, you never know). //Just thinking ahead! Here's the foundations to a more robust Holiday event system. //It's easy as hell to add stuff. Just set Holiday to something using the switch (or something else) @@ -18,9 +18,9 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t //sets up the Holiday global variable. Shouldbe called on game configuration or something. /proc/Get_Holiday() - if(!Holiday) return // Holiday stuff was not enabled in the config! + if(!GLOB.Holiday) return // Holiday stuff was not enabled in the config! - Holiday = list() // reset our switch now so we can recycle it as our Holiday name + GLOB.Holiday = list() // reset our switch now so we can recycle it as our Holiday name //var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year - unused currently but can be used for floating dates var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month @@ -33,208 +33,206 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t if(1) //Jan switch(DD) if(1) - Holiday["New Years's Day"] = "The day of the new solar year on Sol." + GLOB.Holiday["New Years's Day"] = "The day of the new solar year on Sol." if(12) - Holiday["Vertalliq-Qerr"] = "Vertalliq-Qerr, translated to mean 'Festival of the Royals', is a \ + GLOB.Holiday["Vertalliq-Qerr"] = "Vertalliq-Qerr, translated to mean 'Festival of the Royals', is a \ skrellian holiday that celebrates the Qerr-Katish and all they have provided for the rest of skrellian society, \ it often features colourful displays and skilled performers take this time to show off some of their more \ elaborate displays." if(14) - Holiday["Lohri"] = "A human festival traditionally celebrating the end of winter on the Indian subcontinent. \ + GLOB.Holiday["Lohri"] = "A human festival traditionally celebrating the end of winter on the Indian subcontinent. \ The holiday is now celebrated independently of seasons in many colonies with large populations of Indian \ descent. Traditions include the burning of bonfires, dancing, and door-to-door singing in exchange for treats." if(30) - Holiday["Lunar New Year"] = "Originally the new year on the ancient lunisolar calendar, the Lunar New Year is \ + GLOB.Holiday["Lunar New Year"] = "Originally the new year on the ancient lunisolar calendar, the Lunar New Year is \ celebrated with a wide variety of east Asian traditions with roots in Chinese, Japanese, Korean, Vietnamese, \ Tibetan, Mongolian, and Ryukyu cultures. Elaborate parades, performances, dances and meals are usual staples." if(2) //Feb switch(DD) if(2) - Holiday["Groundhog Day"] = "An unoffical holiday based on medieval folklore that originated on Earth, \ + GLOB.Holiday["Groundhog Day"] = "An unoffical holiday based on medieval folklore that originated on Earth, \ that involves the reverence of a prophetic animal - traditionally a badger, fox or groundhog - that was \ said to be able to predict, or even control the changing of the seasons." if(14) - Holiday["Valentine's Day"] = "A human holiday that revolves around expressions of romance and love. \ + GLOB.Holiday["Valentine's Day"] = "A human holiday that revolves around expressions of romance and love. \ In particular, the exchanging of gifts, letters and cards is traditional." if(15) - Holiday["Lantern Festival"] = "A human holiday with origins in Chinese new year celebrations. Participants \ + GLOB.Holiday["Lantern Festival"] = "A human holiday with origins in Chinese new year celebrations. Participants \ carry or hang elaborate paper lanterns that are thought to bring good luck. Today, electric lights are often used \ in environments where open flames would be hazardous or non-functional." if(17) - Holiday["Random Acts of Kindness Day"] = "An unoffical holiday that challenges everyone to perform \ + GLOB.Holiday["Random Acts of Kindness Day"] = "An unoffical holiday that challenges everyone to perform \ acts of kindness to their friends, co-workers, and strangers, with no strings attached." if(3) //Mar switch(DD) if(3) - Holiday["Qixm-tes"] = "Qixm-tes, or 'Day of mourning', is a skrellian holiday where skrell gather at places \ + GLOB.Holiday["Qixm-tes"] = "Qixm-tes, or 'Day of mourning', is a skrellian holiday where skrell gather at places \ of worship and sing a song of mourning for all those who have died in service to their kingdoms." if(14) - Holiday["Pi Day"] = "An unoffical holiday celebrating the mathematical constant Pi. It is celebrated on \ + GLOB.Holiday["Pi Day"] = "An unoffical holiday celebrating the mathematical constant Pi. It is celebrated on \ March 14th, as the digits form 3 14, the first three significant digits of Pi. Observance of Pi Day generally \ involve eating (or throwing) pie, due to a pun. Pies also tend to be round, and thus relatable to Pi." if(17) - Holiday["St. Patrick's Day"] = "A holiday originating on Earth, celebrating a popular version of Irish culture. \ + GLOB.Holiday["St. Patrick's Day"] = "A holiday originating on Earth, celebrating a popular version of Irish culture. \ Traditions include elaborate parades, wearing of the colour green, and drinking alcohol." if(18) - Holiday["Holi"] = "Also known as the Festival of Colours, a human Hindu festival celebrating divine love and the \ + GLOB.Holiday["Holi"] = "Also known as the Festival of Colours, a human Hindu festival celebrating divine love and the \ triumph of good over evil. Traditionally a bonfire is lit overnight, followed by the free-for-all smearing of \ celebrants with colourful pigments, and the forgiveness of past wrongs." if(27) - Holiday["Easter"] = "A Earth springtime festival variously celebrating rebirth and the beginning of the planting \ + GLOB.Holiday["Easter"] = "A Earth springtime festival variously celebrating rebirth and the beginning of the planting \ season. Traditionally celebrated with the painting and exchange of eggs, sometimes made from chocolate. \ The holiday's date was standardized in the 22nd century." if(4) //Apr switch(DD) if(1) - Holiday["April Fool's Day"] = "A human holiday that endevours one to pull pranks and spread hoaxes on their friends." + GLOB.Holiday["April Fool's Day"] = "A human holiday that endevours one to pull pranks and spread hoaxes on their friends." if(5) - Holiday["First Day of Passover"] = "The first of eight days of a human holiday celebrating the exodus of ancient Jewish people \ + GLOB.Holiday["First Day of Passover"] = "The first of eight days of a human holiday celebrating the exodus of ancient Jewish people \ from slavery, and of the spring harvest. The most well-known tradition is the Sedar meal. The date was standardized in the 22nd century." if(22) - Holiday["Earth Day"] = "A holiday of enviromentalism, that originated on it's namesake, Earth." + GLOB.Holiday["Earth Day"] = "A holiday of enviromentalism, that originated on it's namesake, Earth." if(5) //May switch(DD) if(1) - Holiday["Interstellar Workers' Day"] = "This holiday celebrates the work of laborers and the working class." + GLOB.Holiday["Interstellar Workers' Day"] = "This holiday celebrates the work of laborers and the working class." if(18) - Holiday["Remembrance Day"] = "Remembrance Day (or, as it is more informally known, Armistice Day) is a confederation-wide holiday \ + GLOB.Holiday["Remembrance Day"] = "Remembrance Day (or, as it is more informally known, Armistice Day) is a confederation-wide holiday \ mostly observed by its member states since late 2280. Officially, it is a day of remembering the men and women who died in various armed conflicts \ throughout human history. Unofficially, however, it is commonly treated as a holiday honoring the victims of the Human-Unathi war. \ Observance of this day varies throughout human space, but most common traditions are the act of bringing flowers to graves,\ attending parades, and the wearing of poppies (either paper or real) in one's clothing." if(28) - Holiday["Jiql-tes"] = "A skrellian holiday that translates to 'Day of Celebration', skrell communities \ + GLOB.Holiday["Jiql-tes"] = "A skrellian holiday that translates to 'Day of Celebration', skrell communities \ gather for a grand feast and give gifts to friends and close relatives." if(6) //Jun switch(DD) if(6) - Holiday["Sapient Rights Day"] = "This holiday celebrates the passing of the Declaration of Sapient Rights by SolGov, which guarantees the \ + GLOB.Holiday["Sapient Rights Day"] = "This holiday celebrates the passing of the Declaration of Sapient Rights by SolGov, which guarantees the \ same protections humans are granted to all sapient, living species." if(14) - Holiday["Blood Donor Day"] = "This holiday was created to raise awareness of the need for safe blood and blood products, \ + GLOB.Holiday["Blood Donor Day"] = "This holiday was created to raise awareness of the need for safe blood and blood products, \ and to thank blood donors for their voluntary, life-saving gifts of blood." if(20) - Holiday["Civil Servant's Day"] = "Civil Servant's Day is a holiday observed in SCG member states that honors civil servants everywhere,\ + GLOB.Holiday["Civil Servant's Day"] = "Civil Servant's Day is a holiday observed in SCG member states that honors civil servants everywhere,\ (especially those who are members of the armed forces and the emergency services), or have been or have been civil servants in the past." /* if(25) - Holiday["Merhyat Njarha"] = "A Njarir'Akhan tajaran tradition translating to \"Harmony of the House\", in which Njarjirii citizens pay \ + GLOB.Holiday["Merhyat Njarha"] = "A Njarir'Akhan tajaran tradition translating to \"Harmony of the House\", in which Njarjirii citizens pay \ homage to their ruling house and their ancestors. Traditions include large communal meals and dances hosted by the ruling house, \ and the intensive upkeep of community spaces."*/ if(7) //Jul switch(DD) if(1) - Holiday["Doctors' Day"] = "A holiday that recognizes the services of physicians, commonly celebrated \ + GLOB.Holiday["Doctors' Day"] = "A holiday that recognizes the services of physicians, commonly celebrated \ in healthcare organizations and facilities." if(30) - Holiday["Friendship Day"] = "An unoffical holiday that recognizes the value of friends and companionship. Indeed, not having someone watch \ + GLOB.Holiday["Friendship Day"] = "An unoffical holiday that recognizes the value of friends and companionship. Indeed, not having someone watch \ your back while in space can be dangerous, and the cold, isolating nature of space makes friends all the more important." if(8) //Aug switch(DD) -//VOREStation Add - Of course we need this. if(8) - Holiday["Vore Day"] = "A holiday representing the innate desire in all/most/some/a few of us to devour each other or be devoured. \ + GLOB.Holiday["Vore Day"] = "A holiday representing the innate desire in all/most/some/a few of us to devour each other or be devoured. \ That's probably why you're here, isn't it? Get to it, then!" -//VOREStation Add End. /* if(10) - Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, + GLOB.Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, on Ahdomai. It is named after the Tajaran deity of Light, and huge celebrations are common." if(11) - Holiday["Tajaran Contact Day"] = "The anniversary of first contact between SolGov and the tajaran species, widely observed\ + GLOB.Holiday["Tajaran Contact Day"] = "The anniversary of first contact between SolGov and the tajaran species, widely observed\ throughout tajaran and human space. Marks the date that in 2513, a human exploration team investigating electromagnetic \ emissions from the Meralar system made radio contact with the tajaran scientific outpost that had broadcast them."*/ if(20) - Holiday["Obon"] = "An ancient Earth holiday originating in east Asia, for the honouring of one's ancestral spirits. \ + GLOB.Holiday["Obon"] = "An ancient Earth holiday originating in east Asia, for the honouring of one's ancestral spirits. \ Traditions include the maintenance of grave sites and memorials, and community traditional dance performances." if(27) - Holiday["Forgiveness Day"] = "A time to forgive and be forgiven." + GLOB.Holiday["Forgiveness Day"] = "A time to forgive and be forgiven." if(9) //Sep switch(DD) if(17) - Holiday["Qill-xamr"] = "Translated to 'Night of the dead', it is a skrellian holiday where skrell \ + GLOB.Holiday["Qill-xamr"] = "Translated to 'Night of the dead', it is a skrellian holiday where skrell \ communities hold parties in order to remember loved ones who passed, unlike Qixm-tes, this applies to everyone \ and is a joyful celebration." if(19) - Holiday["Talk-Like-a-Pirate Day"] = "Ahoy, matey! It be the unoffical holiday celebratin' the salty \ + GLOB.Holiday["Talk-Like-a-Pirate Day"] = "Ahoy, matey! It be the unoffical holiday celebratin' the salty \ sea humor of speakin' like the pirates of old." if(20) - Holiday["Rosh Hashanah"] = "An old human holiday that marks the traditional Hebrew new year." + GLOB.Holiday["Rosh Hashanah"] = "An old human holiday that marks the traditional Hebrew new year." if(28) - Holiday["Stupid-Questions Day"] = "Known as Ask A Stupid Question Day, it is an unoffical holiday \ + GLOB.Holiday["Stupid-Questions Day"] = "Known as Ask A Stupid Question Day, it is an unoffical holiday \ created by teachers in Sol, very long ago, to encourage students to ask more questions in the classroom." if(10) //Oct switch(DD) if(9) - Holiday["Lief Eriksson Day"] = "A day commemorating Norse explorer Lief Eriksson, an early Scandinavian cultural figure \ + GLOB.Holiday["Lief Eriksson Day"] = "A day commemorating Norse explorer Lief Eriksson, an early Scandinavian cultural figure \ who is thought to have been the first European to set foot in North America." if(16) - Holiday["Boss' Day"] = "Boss' Day has traditionally been a day for employees to thank their bosses for the difficult work that they do \ + GLOB.Holiday["Boss' Day"] = "Boss' Day has traditionally been a day for employees to thank their bosses for the difficult work that they do \ throughout the year. This day was created for the purpose of strengthening the bond between employer and employee." if(21) - Holiday["First Day of Diwali"] = "An ancient Hindu, Jain and Sikh festival lasting five days, celebrating victory of light over darkness, good over \ + GLOB.Holiday["First Day of Diwali"] = "An ancient Hindu, Jain and Sikh festival lasting five days, celebrating victory of light over darkness, good over \ evil, and knowledge over ignorance. It is celebrated by the wearing of your finest clothes, decorating with oil lamps and rangolis, \ fireworks, and gift-giving. Electric lights are often used in modern times where oil lamps would be hazardous or inoperable." if(31) - Holiday["Halloween"] = "Originating from Earth, Halloween is also known as All Saints' Eve, and \ + GLOB.Holiday["Halloween"] = "Originating from Earth, Halloween is also known as All Saints' Eve, and \ is celebrated by some by attending costume parties, trick-or-treating, carving faces in pumpkins, or visiting \ 'haunted' locations. Some people make it a goal to scare other people." if(11) //Nov switch(DD) if(1) - Holiday["Day of the Dead"] = "An old human holiday celebrating the lives of deceased friends and family members, \ + GLOB.Holiday["Day of the Dead"] = "An old human holiday celebrating the lives of deceased friends and family members, \ by means of good humour and joyful parties. Offerings are often left at altars to the dead, and exchanging gifts \ among the living is not uncommon." if(13) - Holiday["Kindness Day"] = "Kindness Day is an unofficial holiday to highlight good deeds in the \ + GLOB.Holiday["Kindness Day"] = "Kindness Day is an unofficial holiday to highlight good deeds in the \ community, focusing on the positive power and the common thread of kindness which binds humanity and \ friends together." if(28) //Space thanksgiving. - Holiday["Appreciation Day"] = "Originally an old holiday from Earth, Appreciation Day follows many of the \ + GLOB.Holiday["Appreciation Day"] = "Originally an old holiday from Earth, Appreciation Day follows many of the \ traditions that its predecessor did, such as having a large feast (turkey often included), gathering with family, and being thankful \ for what one has in life." if(28 > DD > 20) if(time2text(world.timeofday, "Day") == "Thursday") - Holiday["Thanksgiving"] = "Originally an old holiday from Earth, Thanksgiving follows many of the \ + GLOB.Holiday["Thanksgiving"] = "Originally an old holiday from Earth, Thanksgiving follows many of the \ traditions that its predecessor did, such as having a large feast (turkey often included), gathering with family, and being thankful \ for what one has in life." if(12) //Dec switch(DD) if(10) - Holiday["Human-Rights Day"] = "An old holiday created by an intergovernmental organization known back than as the United Nations, \ + GLOB.Holiday["Human-Rights Day"] = "An old holiday created by an intergovernmental organization known back than as the United Nations, \ human rights were not recognized globally at the time, and the holiday was made in honor of the Universal Declaration of Human Rights. \ These days, SolGov ensures that past efforts were not in vein, and continues to honor this holiday across the galaxy as a historical \ reminder." if(22) - Holiday["Vertalliq-qixim"] = "A skrellian holiday that celebrates the skrell's first landing on one of \ + GLOB.Holiday["Vertalliq-qixim"] = "A skrellian holiday that celebrates the skrell's first landing on one of \ their moons. It's often celebrated with grand festivals." if(24) - Holiday["Christmas Eve"] = "The eve of Christmas, an old holiday from Earth that mainly involves gift \ + GLOB.Holiday["Christmas Eve"] = "The eve of Christmas, an old holiday from Earth that mainly involves gift \ giving, decorating, family reunions, and a fat red human breaking into people's homes to steal milk and cookies." if(25) - Holiday["Christmas"] = "Christmas is a very old holiday that originated in Earth, Sol. It was a \ + GLOB.Holiday["Christmas"] = "Christmas is a very old holiday that originated in Earth, Sol. It was a \ religious holiday for the Christian religion, which would later form Unitarianism. Nowadays, the holiday is celebrated \ generally by giving gifts, symbolic decoration, and reuniting with one's family. It also features a mythical fat \ red human, known as Santa, who broke into people's homes to loot cookies and milk." if(31) - Holiday["New Year's Eve"] = "The eve of the New Year for Sol. It is traditionally celebrated by counting down to midnight, as that is \ + GLOB.Holiday["New Year's Eve"] = "The eve of the New Year for Sol. It is traditionally celebrated by counting down to midnight, as that is \ when the new year begins. Other activities include planning for self-improvement over the new year, attending New Year's parties, or \ watching a timer count to zero, a large object descending, and fireworks exploding in the sky, in person or on broadcast." - if(!Holiday) + if(!GLOB.Holiday) //Friday the 13th if(DD == 13) if(time2text(world.timeofday, "DDD") == "Fri") - Holiday["Friday the 13th"] = "Friday the 13th is a superstitious day, associated with bad luck and misfortune." + GLOB.Holiday["Friday the 13th"] = "Friday the 13th is a superstitious day, associated with bad luck and misfortune." //Allows GA and GM to set the Holiday variable /client/proc/Set_Holiday() @@ -243,37 +241,37 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t set desc = "Force-set the Holiday variable to make the game think it's a certain day." if(!check_rights(R_SERVER)) return - Holiday = list() + GLOB.Holiday = list() var/H = tgui_input_text(src,"What holiday is it today?","Set Holiday") var/B = tgui_input_text(src,"Now explain what the holiday is about","Set Holiday", multiline = TRUE, prevent_enter = TRUE) - Holiday[H] = B + GLOB.Holiday[H] = B //update our hub status world.update_status() Holiday_Game_Start() - message_admins(span_notice("ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"")) - log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"") + message_admins(span_notice("ADMIN: Event: [key_name(src)] force-set Holiday to \"[GLOB.Holiday]\"")) + log_admin("[key_name(src)] force-set Holiday to \"[GLOB.Holiday]\"") //Run at the start of a round /proc/Holiday_Game_Start() - if(Holiday.len != 0) + if(GLOB.Holiday.len != 0) var/list/holidays = list() var/list/holiday_blurbs = list() - for(var/p in Holiday) + for(var/p in GLOB.Holiday) holidays.Add(p) - holiday_blurbs.Add("[Holiday[p]]") + holiday_blurbs.Add("[GLOB.Holiday[p]]") var/holidays_string = english_list(holidays, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) to_world(span_filter_system(span_blue("and..."))) to_world(span_filter_system("

Happy [holidays_string] Everybody!

")) if(holiday_blurbs.len != 0) for(var/blurb in holiday_blurbs) to_world(span_filter_system(span_blue("
[blurb]
"))) - switch(Holiday) //special holidays + switch(GLOB.Holiday) //special holidays //if("Easter") //do easter stuff if("Christmas Eve","Christmas") @@ -283,9 +281,9 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t //Nested in the random events loop. Will be triggered every 2 minutes /proc/Holiday_Random_Event() - if(isemptylist(Holiday)) + if(isemptylist(GLOB.Holiday)) return 0 - switch(Holiday) //special holidays + switch(GLOB.Holiday) //special holidays //if("Easter") //I'll make this into some helper procs at some point /* var/list/turf/simulated/floor/Floorlist = list() for(var/turf/simulated/floor/T) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 91443cfc4a4..df10f340565 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -143,7 +143,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) ///Checks to see if the game can be setup and ran with the current number of players or whatnot. /datum/game_mode/proc/can_start(var/do_not_spawn) var/playerC = 0 - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) if((player.client)&&(player.ready)) playerC++ @@ -308,7 +308,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) var/list/area/escape_locations = list(/area/shuttle/escape, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom) //VOREStation Edit - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) clients++ var/M_area_type = (get_turf(M))?.loc?.type @@ -395,7 +395,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) // If this is being called post-roundstart then it doesn't care about ready status. if(ticker && ticker.current_state == GAME_STATE_PLAYING) - for(var/mob/player in player_list) + for(var/mob/player in GLOB.player_list) if(!player.client) continue if(isnewplayer(player)) @@ -407,7 +407,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) candidates |= player.mind else // Assemble a list of active players without jobbans. - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) if( player.client && player.ready ) players += player @@ -436,7 +436,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) /datum/game_mode/proc/num_players() . = 0 - for(var/mob/new_player/P in player_list) + for(var/mob/new_player/P in GLOB.player_list) if(P.client && P.ready) . ++ @@ -463,7 +463,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) if(antag) antag_templates |= antag - newscaster_announcements = pick(newscaster_standard_feeds) + newscaster_announcements = pick(GLOB.newscaster_standard_feeds) /datum/game_mode/proc/check_victory() return @@ -474,7 +474,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) /proc/display_roundstart_logout_report() var/msg = span_bold("Roundstart logout report") msg += "

" - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) if(L.ckey) var/found = 0 @@ -501,7 +501,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types) continue //Dead continue //Happy connected client - for(var/mob/observer/dead/D in dead_mob_list) + for(var/mob/observer/dead/D in GLOB.dead_mob_list) if(D.mind && (D.mind.original == L || D.mind.current == L)) if(L.stat == DEAD) if(L.suiciding) //Suicider @@ -520,13 +520,13 @@ GLOBAL_LIST_EMPTY(additional_antag_types) msg = span_notice(msg)// close the span from right at the top - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if(M.client && check_rights_for(M.client, R_HOLDER)) to_chat(M,msg) /proc/get_nt_opposed() var/list/dudes = list() - for(var/mob/living/carbon/human/man in player_list) + for(var/mob/living/carbon/human/man in GLOB.player_list) if(man.client) if(man.client.prefs.economic_status == CLASS_LOWER) dudes += man diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 98e42aa6401..6b716ffef5a 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -2,8 +2,6 @@ VOX HEIST ROUNDTYPE */ -var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective. Clumsy, rewrite sometime. - /datum/game_mode/heist name = "Heist" config_tag = "heist" diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index 1be8db04fdd..4b11c18204f 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -182,7 +182,7 @@ return var/list/L = list() - for(var/mob/living/silicon/robot/RB in mob_list) + for(var/mob/living/silicon/robot/RB in GLOB.mob_list) if(istype(RB, /mob/living/silicon/robot/drone)) continue if(RB.connected_ai == A) @@ -200,7 +200,7 @@ return var/list/L = list() - for(var/mob/living/silicon/ai/AT in mob_list) + for(var/mob/living/silicon/ai/AT in GLOB.mob_list) if(L == A) continue L.Add(AT) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm index dbdad4b6c7a..05aceaf4fb5 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm @@ -82,7 +82,7 @@ if(!target) var/list/robots = list() var/list/robot_names = list() - for(var/mob/living/silicon/robot/R in silicon_mob_list) + for(var/mob/living/silicon/robot/R in GLOB.silicon_mob_list) if(istype(R, /mob/living/silicon/robot/drone)) // No drones. continue if(R.connected_ai != user) // No robots linked to other AIs diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 4a1e3b3a695..5932704f4f4 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -22,7 +22,7 @@ /datum/game_mode/meteor/declare_completion() var/text var/survivors = 0 - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(player.stat != DEAD) var/turf/location = get_turf(player.loc) if(!location) continue diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index ee8c07ef9e6..5ebde0347e7 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -224,7 +224,7 @@ GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths o O.throw_at(dest, 5, 10) /obj/effect/meteor/proc/shake_players() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) var/turf/T = get_turf(M) if(!T || T.z != src.z) continue diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 23e55341245..7d27515efac 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -166,7 +166,7 @@ var/DNAstring = tgui_input_text(usr, "Input DNA string to search for." , "Please Enter String." , "") if(!DNAstring) return - for(var/mob/living/carbon/M in mob_list) + for(var/mob/living/carbon/M in GLOB.mob_list) if(!M.dna) continue if(M.dna.unique_enzymes == DNAstring) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index a9dcd91d629..98d8b94d87a 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -229,7 +229,7 @@ GLOBAL_LIST_EMPTY(all_objectives) return 0 var/area/shuttle = locate(/area/shuttle/escape/centcom) var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai) - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(player.type in protected_mobs) continue if (player.mind && (player.mind != owner)) if(player.stat != DEAD) //they're not dead! @@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(all_objectives) return 0 var/area/shuttle = locate(/area/shuttle/escape/centcom) var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(player.type in protected_mobs) continue if (player.mind) if (player.stat != 2) @@ -266,7 +266,7 @@ GLOBAL_LIST_EMPTY(all_objectives) if(!emergency_shuttle.returned()) return 0 - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(player == owner.current) continue if(player.mind) @@ -521,7 +521,7 @@ GLOBAL_LIST_EMPTY(all_objectives) if(isAI(M) && M.stat != 2) //See if any AI's are alive inside that card. return 1 - for(var/mob/living/silicon/ai/ai in mob_list) + for(var/mob/living/silicon/ai/ai in GLOB.mob_list) var/turf/T = get_turf(ai) if(istype(T)) var/area/check_area = get_area(ai) @@ -609,11 +609,11 @@ GLOBAL_LIST_EMPTY(all_objectives) if (ticker) var/n_p = 1 //autowin if (ticker.current_state == GAME_STATE_SETTING_UP) - for(var/mob/new_player/P in player_list) + for(var/mob/new_player/P in GLOB.player_list) if(P.client && P.ready && P.mind!=owner) n_p ++ else if (ticker.current_state == GAME_STATE_PLAYING) - for(var/mob/living/carbon/human/P in player_list) + for(var/mob/living/carbon/human/P in GLOB.player_list) var/datum/component/antag/changeling/comp = P.GetComponent(/datum/component/antag/changeling) if(P.client && !(comp) && P.mind!=owner) n_p ++ @@ -863,7 +863,7 @@ GLOBAL_LIST_EMPTY(all_objectives) /datum/objective/cult/sacrifice/find_target() var/list/possible_targets = list() if(!possible_targets.len) - for(var/mob/living/carbon/human/player in player_list) + for(var/mob/living/carbon/human/player in GLOB.player_list) if(player.mind && !(player.mind in cult)) possible_targets += player.mind if(possible_targets.len > 0) diff --git a/code/game/gamemodes/sandbox/sandbox.dm b/code/game/gamemodes/sandbox/sandbox.dm index 39e9249d240..c261cc8f6d0 100644 --- a/code/game/gamemodes/sandbox/sandbox.dm +++ b/code/game/gamemodes/sandbox/sandbox.dm @@ -7,7 +7,7 @@ extended_round_description = "You can use the sandbox-panel command to access build options." /datum/game_mode/sandbox/pre_setup() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) M.CanBuild() return 1 diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm index dcd74ab4761..0a85ddcbd36 100644 --- a/code/game/gamemodes/technomancer/spells/gambit.dm +++ b/code/game/gamemodes/technomancer/spells/gambit.dm @@ -9,16 +9,6 @@ obj_path = /obj/item/spell/gambit category = UTILITY_SPELLS -/var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/spell) - list( - /obj/item/spell, - /obj/item/spell/gambit, - /obj/item/spell/projectile, - /obj/item/spell/aura, -// /obj/item/spell/insert, - /obj/item/spell/spawner, - /obj/item/spell/summon, - /obj/item/spell/modifier) - /obj/item/spell/gambit name = "gambit" desc = "Do you feel lucky?" diff --git a/code/game/gamemodes/technomancer/spells/resurrect.dm b/code/game/gamemodes/technomancer/spells/resurrect.dm index 26dd8644bcc..933521f72df 100644 --- a/code/game/gamemodes/technomancer/spells/resurrect.dm +++ b/code/game/gamemodes/technomancer/spells/resurrect.dm @@ -33,15 +33,15 @@ var/mob/living/simple_mob/SM = L SM.health = SM.getMaxHealth() / 3 SM.set_stat(CONSCIOUS) - dead_mob_list -= SM - living_mob_list += SM + GLOB.dead_mob_list -= SM + GLOB.living_mob_list += SM SM.update_icon() adjust_instability(15) else if(ishuman(L)) var/mob/living/carbon/human/H = L if(!H.client && H.mind) //Don't force the dead person to come back if they don't want to. - for(var/mob/observer/dead/ghost in player_list) + for(var/mob/observer/dead/ghost in GLOB.player_list) if(ghost.mind == H.mind) ghost.notify_revive("The Technomancer [user.real_name] is trying to revive you. \ Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg', source = user) @@ -53,8 +53,8 @@ sleep(10 SECONDS) if(H.client) L.set_stat(CONSCIOUS) //Note that if whatever killed them in the first place wasn't fixed, they're likely to die again. - dead_mob_list -= H - living_mob_list += H + GLOB.dead_mob_list -= H + GLOB.living_mob_list += H H.timeofdeath = null visible_message(span_danger("\The [H]'s eyes open!")) to_chat(user, span_notice("It's alive!")) diff --git a/code/game/gamemodes/technomancer/spells/track.dm b/code/game/gamemodes/technomancer/spells/track.dm index 39d06119cda..bac6b2d17d5 100644 --- a/code/game/gamemodes/technomancer/spells/track.dm +++ b/code/game/gamemodes/technomancer/spells/track.dm @@ -38,7 +38,7 @@ var/list/technomancer_belongings = list() if(check_for_scepter()) can_track_non_allies = 1 var/list/mob_choices = list() - for(var/mob/living/L in mob_list) + for(var/mob/living/L in GLOB.mob_list) if(!is_ally(L) && !can_track_non_allies) continue if(L == user) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index bde32f4e943..345ddbe774a 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -189,7 +189,7 @@ /proc/get_all_jobs() var/list/all_jobs = list() var/list/all_datums = typesof(/datum/job) - all_datums -= exclude_jobs + all_datums -= GLOB.exclude_jobs var/datum/job/jobdatum for(var/jobtype in all_datums) jobdatum = new jobtype @@ -236,7 +236,7 @@ return C.registered_name /proc/get_all_job_icons() //For all existing HUD icons - return joblist + GLOB.alt_titles_with_icons + list("Prisoner") + return GLOB.joblist + GLOB.alt_titles_with_icons + list("Prisoner") /obj/proc/GetJobName() //Used in secHUD icon generation var/obj/item/card/id/I = GetID() diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 60d3fd86a9b..452b0928056 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -158,7 +158,7 @@ var/global/datum/controller/occupations/job_master break /datum/controller/occupations/proc/ResetOccupations() - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) if((player) && (player.mind)) player.mind.assigned_role = null player.mind.special_role = null @@ -235,7 +235,7 @@ var/global/datum/controller/occupations/job_master break //Get the players who are ready - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) if(player.ready && player.mind && !player.mind.assigned_role) unassigned += player @@ -360,7 +360,7 @@ var/global/datum/controller/occupations/job_master if(!joined_late) var/obj/S = null var/list/possible_spawns = list() - for(var/obj/effect/landmark/start/sloc in landmarks_list) + for(var/obj/effect/landmark/start/sloc in GLOB.landmarks_list) if(sloc.name != rank) continue if(locate(/mob/living) in sloc.loc) continue possible_spawns.Add(sloc) @@ -634,7 +634,7 @@ var/global/datum/controller/occupations/job_master var/level4 = 0 //never var/level5 = 0 //banned var/level6 = 0 //account too young - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) if(!(player.ready && player.mind && !player.mind.assigned_role)) continue //This player is not ready if(jobban_isbanned(player, job.title)) @@ -836,7 +836,7 @@ var/global/datum/controller/occupations/job_master var/list/items = list() var/list/item_names = list() var/list/carriers = list() - for(var/obj/item/I in item_tf_spawnpoints) + for(var/obj/item/I in GLOB.item_tf_spawnpoints) if(LAZYLEN(I.ckeys_allowed_itemspawn)) if(!(C.ckey in I.ckeys_allowed_itemspawn)) continue diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index a212588b9b5..23d3d8d7035 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -210,7 +210,7 @@ if(N) info = N.notehtml to_chat(U, "You hold \a [itemname] up to the camera ...") - for(var/mob/living/silicon/ai/O in living_mob_list) + for(var/mob/living/silicon/ai/O in GLOB.living_mob_list) if(!O.client) continue if(U.name == "Unknown") diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 5cfaa2eacbd..23f129e0809 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -106,7 +106,7 @@ return list() var/datum/trackable/TB = new() - for(var/mob/living/M in mob_list) + for(var/mob/living/M in GLOB.mob_list) if(M == usr) continue if(M.tracking_status() != TRACKING_POSSIBLE) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 68fddae5569..4752f2aa0f5 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -9,7 +9,7 @@ return var/mob/selected = null - for(var/mob/living/M in player_list) + for(var/mob/living/M in GLOB.player_list) //Dead people only thanks! if((M.stat != 2) || (!M.client)) continue @@ -94,7 +94,7 @@ if(ckey(clonemind.key) != BR.ckey) return 0 else - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(G.ckey == BR.ckey) if(G.can_reenter_corpse) break diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 797accc2ea6..816c0d7b3db 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -283,7 +283,7 @@ /datum/surgery_step/brainstem, /datum/surgery_step/generic/ripper, ) - good_surgeries = surgery_steps + good_surgeries = GLOB.surgery_steps for(var/datum/surgery_step/S in good_surgeries) if(S.type in banned_surgery_steps) good_surgeries -= S diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index f5380330237..0af12f61e15 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -1,9 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -var/global/list/priority_air_alarms = list() -var/global/list/minor_air_alarms = list() - - /obj/machinery/computer/atmos_alert name = "atmospheric alert computer" desc = "Used to access the station's atmospheric sensors." diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index ec1fe895737..dd0153c3b73 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -176,7 +176,7 @@ data["virus"] += list(list("name" = v.fields["name"], "D" = "\ref[v]")) if(MED_DATA_MEDBOT) data["medbots"] = list() - for(var/mob/living/bot/medbot/M in mob_list) + for(var/mob/living/bot/medbot/M in GLOB.mob_list) if(M.z != z) continue var/turf/T = get_turf(M) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 082e9626c99..dc706443325 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -127,7 +127,7 @@ data["can_hack"] = can_hack_any(user) data["cyborgs"] = list() data["safety"] = safety - for(var/mob/living/silicon/robot/R in mob_list) + for(var/mob/living/silicon/robot/R in GLOB.mob_list) if(!console_shows(R)) continue var/area/A = get_area(R) @@ -175,7 +175,7 @@ return message_admins(span_notice("[key_name_admin(ui.user)] detonated all cyborgs!")) log_game(span_notice("[key_name(ui.user)] detonated all cyborgs!")) - for(var/mob/living/silicon/robot/R in mob_list) + for(var/mob/living/silicon/robot/R in GLOB.mob_list) if(istype(R, /mob/living/silicon/robot/drone)) continue // Ignore antagonistic cyborgs diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 3331820076d..eb6daa5865a 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -403,11 +403,11 @@ answer = text2num(answer) if(field == "rank") - if(answer in joblist) + if(answer in GLOB.joblist) active1.fields["real_rank"] = answer if(field == "criminal") - for(var/mob/living/carbon/human/H in player_list) + for(var/mob/living/carbon/human/H in GLOB.player_list) BITSET(H.hud_updateflag, WANTED_HUD) if(istype(active2) && (field in active2.fields)) diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index 71f0a3fe6a0..63dd8119f32 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -159,10 +159,10 @@ var/specops_shuttle_timeleft = 0 sleep(10) var/spawn_marauder[] = new() - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == "Marauder Entry") spawn_marauder.Add(L) - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc) P.invisibility = INVISIBILITY_ABSTRACT//So it is not seen by anyone. diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 2fb6f5f4d21..54fe3d3b78b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1305,7 +1305,7 @@ About the new airlock wires panel: visible_message("[hold_open] holds \the [src] open.") //if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator - for(var/mob/M as anything in player_list) + for(var/mob/M as anything in GLOB.player_list) if(!M || !M.client) continue var/old_sounds = M.read_preference(/datum/preference/toggle/old_door_sounds) @@ -1445,7 +1445,7 @@ About the new airlock wires panel: use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people has_beeped = 0 - for(var/mob/M as anything in player_list) + for(var/mob/M as anything in GLOB.player_list) if(!M || !M.client) continue var/old_sounds = M.read_preference(/datum/preference/toggle/old_door_sounds) diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm index a55bea0464d..fbb43c9530b 100644 --- a/code/game/machinery/gear_dispenser.dm +++ b/code/game/machinery/gear_dispenser.dm @@ -151,7 +151,6 @@ GLOBAL_LIST_EMPTY(dispenser_presets) density = TRUE var/list/dispenses = list(/datum/gear_disp/trash) // put your gear datums here! var/datum/gear_disp/one_setting - var/global/list/gear_distributed_to = list() var/dispenser_flags = GD_NOGREED|GD_UNLIMITED var/unique_dispense_list = list() var/needs_power = 0 @@ -163,8 +162,8 @@ GLOBAL_LIST_EMPTY(dispenser_presets) /obj/machinery/gear_dispenser/Initialize(mapload) . = ..() - if(!gear_distributed_to["[type]"] && (dispenser_flags & GD_NOGREED)) - gear_distributed_to["[type]"] = list() + if(!GLOB.gear_distributed_to["[type]"] && (dispenser_flags & GD_NOGREED)) + GLOB.gear_distributed_to["[type]"] = list() var/list/real_gear_list = list() for(var/gear in dispenses) var/datum/gear_disp/S = new gear @@ -198,7 +197,7 @@ GLOBAL_LIST_EMPTY(dispenser_presets) /obj/machinery/gear_dispenser/proc/can_use(var/mob/living/carbon/human/user) - var/list/used_by = gear_distributed_to["[type]"] + var/list/used_by = GLOB.gear_distributed_to["[type]"] if(needs_power && inoperable()) to_chat(user,span_warning("The machine does not respond to your prodding.")) return 0 @@ -252,7 +251,7 @@ GLOBAL_LIST_EMPTY(dispenser_presets) else if(!(dispenser_flags & GD_UNLIMITED)) S.amount-- if((dispenser_flags & GD_NOGREED) && !emagged) - gear_distributed_to["[type]"] |= user.ckey + GLOB.gear_distributed_to["[type]"] |= user.ckey if((dispenser_flags & GD_UNIQUE) && !emagged) unique_dispense_list |= user.ckey @@ -357,7 +356,7 @@ GLOBAL_LIST_EMPTY(dispenser_presets) else if(!(dispenser_flags & GD_UNLIMITED)) S.amount-- if((dispenser_flags & GD_NOGREED) && !emagged) - gear_distributed_to["[type]"] |= user.ckey + GLOB.gear_distributed_to["[type]"] |= user.ckey if((dispenser_flags & GD_UNIQUE) && !emagged) unique_dispense_list |= user.ckey diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 6c328e34f87..8d53e315e63 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -59,7 +59,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED last_request = world.time to_chat(user, span_notice("You request an AI's presence.")) var/area/area = get_area(src) - for(var/mob/living/silicon/ai/AI in living_mob_list) + for(var/mob/living/silicon/ai/AI in GLOB.living_mob_list) if(!AI.client) continue to_chat(AI, span_info("Your presence is requested at \the [area].")) else diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 721520e1a95..48f82961e20 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -13,7 +13,6 @@ Look at radio.dm for the prequel to this code. */ -var/global/list/obj/machinery/telecomms/telecomms_list = list() /obj/machinery/telecomms icon = 'icons/obj/stationobjs_vr.dmi' //VOREStation Add diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index b766be31f62..e6b2a550a88 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -52,7 +52,7 @@ var/obj/L = null - for(var/obj/effect/landmark/sloc in landmarks_list) + for(var/obj/effect/landmark/sloc in GLOB.landmarks_list) if(sloc.name != C.data) continue if(locate(/mob/living) in sloc.loc) continue L = sloc diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm index b190c28f70b..3334c796c44 100644 --- a/code/game/machinery/virtual_reality/vr_console.dm +++ b/code/game/machinery/virtual_reality/vr_console.dm @@ -29,7 +29,6 @@ idle_power_usage = 15 active_power_usage = 200 light_color = "#FF0000" - //var/global/list/vr_mob_tf_options // Global var located in global_lists.dm /obj/machinery/vr_sleeper/perfect perfect_replica = TRUE @@ -266,7 +265,7 @@ // Get the desired spawn location to put the body var/S = null var/list/vr_landmarks = list() - for(var/obj/effect/landmark/virtual_reality/sloc in landmarks_list) + for(var/obj/effect/landmark/virtual_reality/sloc in GLOB.landmarks_list) vr_landmarks += sloc.name S = tgui_input_list(occupant, "Please select a location to spawn your avatar at:", "Spawn location", vr_landmarks) @@ -275,12 +274,12 @@ var/tf = null if(tgui_alert(occupant, "Would you like to play as a different creature?", "Join as a mob?", list("Yes", "No")) == "Yes") - var/k = tgui_input_list(occupant, "Please select a creature:", "Mob list", vr_mob_tf_options) + var/k = tgui_input_list(occupant, "Please select a creature:", "Mob list", GLOB.vr_mob_tf_options) if(!k || !occupant) //Our occupant can walk out. return 0 - tf = vr_mob_tf_options[k] + tf = GLOB.vr_mob_tf_options[k] - for(var/obj/effect/landmark/virtual_reality/i in landmarks_list) + for(var/obj/effect/landmark/virtual_reality/i in GLOB.landmarks_list) if(i.name == S) S = i break diff --git a/code/game/machinery/virtual_reality/vr_procs.dm b/code/game/machinery/virtual_reality/vr_procs.dm index 40f0a2dd687..33c4b53e635 100644 --- a/code/game/machinery/virtual_reality/vr_procs.dm +++ b/code/game/machinery/virtual_reality/vr_procs.dm @@ -27,10 +27,10 @@ set desc = "Become a different creature" var/tf = null - var/k = tgui_input_list(usr, "Please select a creature:", "Mob list", vr_mob_tf_options) + var/k = tgui_input_list(usr, "Please select a creature:", "Mob list", GLOB.vr_mob_tf_options) if(!k) return 0 - tf = vr_mob_tf_options[k] + tf = GLOB.vr_mob_tf_options[k] var/mob/living/new_form = transform_into_mob(tf, TRUE, TRUE) if(isliving(new_form)) // Sanity check @@ -78,7 +78,7 @@ var/S = null var/list/vr_landmarks = list() - for(var/obj/effect/landmark/virtual_reality/sloc in landmarks_list) + for(var/obj/effect/landmark/virtual_reality/sloc in GLOB.landmarks_list) vr_landmarks += sloc.name if(!LAZYLEN(vr_landmarks)) to_chat(src, "There are no available spawn locations in virtual reality.") @@ -86,7 +86,7 @@ S = tgui_input_list(usr, "Please select a location to spawn your avatar at:", "Spawn location", vr_landmarks) if(!S) return 0 - for(var/obj/effect/landmark/virtual_reality/i in landmarks_list) + for(var/obj/effect/landmark/virtual_reality/i in GLOB.landmarks_list) if(i.name == S) S = i break diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 327ff56cd13..37637ebd99a 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -63,7 +63,7 @@ if("Peace") to_chat(user, span_infoplain(span_bold("Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence."))) to_chat(user, span_infoplain("You feel as if you just narrowly avoided a terrible fate...")) - for(var/mob/living/simple_mob/faithless/F in living_mob_list) + for(var/mob/living/simple_mob/faithless/F in GLOB.living_mob_list) F.health = -10 F.set_stat(DEAD) F.icon_state = "faithless_dead" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 97afa75b595..89096cb6692 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -232,7 +232,7 @@ removeVerb(/obj/mecha/verb/disconnect_from_port) log_message("[src.name] created.") loc.Entered(src) - mechas_list += src //global mech list + GLOB.mechas_list += src //global mech list /obj/mecha/drain_power(var/drain_check) @@ -327,7 +327,7 @@ STOP_PROCESSING(SSobj, src) - mechas_list -= src //global mech list + GLOB.mechas_list -= src //global mech list . = ..() // The main process loop to replace the ancient global iterators. diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 83d286937c2..a27a59c54be 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -1,7 +1,5 @@ #define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var) -var/global/list/image/splatter_cache=list() - /obj/effect/decal/cleanable/blood name = "blood" var/dryname = "dried blood" diff --git a/code/game/objects/effects/decals/Cleanable/tracks.dm b/code/game/objects/effects/decals/Cleanable/tracks.dm index 4655a9e4bf2..819f4df3467 100644 --- a/code/game/objects/effects/decals/Cleanable/tracks.dm +++ b/code/game/objects/effects/decals/Cleanable/tracks.dm @@ -3,9 +3,6 @@ // 5 seconds #define TRACKS_CRUSTIFY_TIME 50 -// color-dir-dry -var/global/list/image/fluidtrack_cache=list() - /datum/fluidtrack var/direction=0 var/basecolor="#A10808" diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 30b3f475b08..ee8495c6026 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -60,10 +60,10 @@ GLOB.xeno_spawn += loc delete_me = TRUE if("endgame_exit") - endgame_safespawns += loc + GLOB.endgame_safespawns += loc delete_me = TRUE if("bluespacerift") - endgame_exits += loc + GLOB.endgame_exits += loc delete_me = TRUE //VOREStation Add Start if("vinestart") @@ -74,11 +74,11 @@ if(delete_me) return INITIALIZE_HINT_QDEL else - landmarks_list += src + GLOB.landmarks_list += src /obj/effect/landmark/Destroy(var/force = FALSE) if(force) - landmarks_list -= src + GLOB.landmarks_list -= src return ..() return QDEL_HINT_LETMELIVE diff --git a/code/game/objects/effects/landmarks_events.dm b/code/game/objects/effects/landmarks_events.dm index a8111a018e2..62c93f764dc 100644 --- a/code/game/objects/effects/landmarks_events.dm +++ b/code/game/objects/effects/landmarks_events.dm @@ -26,9 +26,9 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm return name = new_name creator_ckey = M.ckey - if(!event_triggers[creator_ckey]) - event_triggers[creator_ckey] = list() - event_triggers[creator_ckey] |= list(src) + if(!GLOB.event_triggers[creator_ckey]) + GLOB.event_triggers[creator_ckey] = list() + GLOB.event_triggers[creator_ckey] |= list(src) isTeamwork = (tgui_alert(M, "Notify rest of team?", "Teamwork", list("No", "Yes")) == "Yes" ? TRUE : FALSE) if(!isTeamwork) isLoud = (tgui_alert(M, "Should it make a bwoink when triggered for YOU?", "bwoink", list("No", "Yes")) == "Yes" ? TRUE : FALSE) @@ -41,8 +41,8 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm log_admin("[M.ckey] has created a [isNarrate ? "Narrtion" : "Notification"] landmark trigger at [coordinates]") /obj/effect/landmark/event_trigger/Destroy() - if(event_triggers[creator_ckey]) - event_triggers[creator_ckey] -= src + if(GLOB.event_triggers[creator_ckey]) + GLOB.event_triggers[creator_ckey] -= src . = ..() /obj/effect/landmark/event_trigger/Crossed(var/atom/movable/AM) diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm index 99a1a0c937a..05aff895c7b 100644 --- a/code/game/objects/effects/manifest.dm +++ b/code/game/objects/effects/manifest.dm @@ -11,7 +11,7 @@ /obj/effect/manifest/proc/manifest() var/dat = span_bold("Crew Manifest") + ":
" - for(var/mob/living/carbon/human/M in mob_list) + for(var/mob/living/carbon/human/M in GLOB.mob_list) dat += text(" [] - []
", M.name, M.get_assignment()) var/obj/item/paper/P = new /obj/item/paper( src.loc ) P.info = dat diff --git a/code/game/objects/effects/map_effects/map_effects.dm b/code/game/objects/effects/map_effects/map_effects.dm index d4f1d01332a..3b66c1f4f51 100644 --- a/code/game/objects/effects/map_effects/map_effects.dm +++ b/code/game/objects/effects/map_effects/map_effects.dm @@ -58,8 +58,8 @@ if(!proximity_to) return FALSE - for(var/thing in player_list) - var/mob/M = thing // Avoiding typechecks for more speed, player_list will only contain mobs anyways. + for(var/thing in GLOB.player_list) + var/mob/M = thing // Avoiding typechecks for more speed, GLOB.player_list will only contain mobs anyways. if(ignore_ghosts && isobserver(M)) continue if(ignore_afk && M.client && M.client.is_afk(5 MINUTES)) diff --git a/code/game/objects/effects/map_effects/screen_shaker.dm b/code/game/objects/effects/map_effects/screen_shaker.dm index 5369d7f4907..6cf27a4a7c3 100644 --- a/code/game/objects/effects/map_effects/screen_shaker.dm +++ b/code/game/objects/effects/map_effects/screen_shaker.dm @@ -11,7 +11,7 @@ var/shake_strength = 1 // How much it shakes. /obj/effect/map_effect/interval/screen_shaker/trigger() - for(var/mob/M as anything in player_list) + for(var/mob/M as anything in GLOB.player_list) if(M.z == src.z && get_dist(src, M) <= shake_radius) shake_camera(M, shake_duration, shake_strength) ..() diff --git a/code/game/objects/effects/semirandom_mobs_vr.dm b/code/game/objects/effects/semirandom_mobs_vr.dm index 52fa826d4c2..4452f1928b1 100644 --- a/code/game/objects/effects/semirandom_mobs_vr.dm +++ b/code/game/objects/effects/semirandom_mobs_vr.dm @@ -1,5 +1,3 @@ -var/global/list/semirandom_mob_spawner_decisions = list() - /obj/random/mob/semirandom_mob_spawner name = "Semi-Random Spawner" desc = "Spawns groups of mobs that are all of the same theme type/theme." @@ -308,11 +306,11 @@ var/global/list/semirandom_mob_spawner_decisions = list() ) /obj/random/mob/semirandom_mob_spawner/item_to_spawn() - var/list/choice = semirandom_mob_spawner_decisions[type] + var/list/choice = GLOB.semirandom_mob_spawner_decisions[type] if(!choice) choice = pickweight(possible_mob_types) - semirandom_mob_spawner_decisions[type] = choice + GLOB.semirandom_mob_spawner_decisions[type] = choice return pickweight(choice) diff --git a/code/game/objects/effects/temporary_visuials/temproary_visual.dm b/code/game/objects/effects/temporary_visuials/temproary_visual.dm index 8835302dc18..979647e2ad9 100644 --- a/code/game/objects/effects/temporary_visuials/temproary_visual.dm +++ b/code/game/objects/effects/temporary_visuials/temproary_visual.dm @@ -11,7 +11,7 @@ /obj/effect/temp_visual/Initialize(mapload) . = ..() if(randomdir) - set_dir(pick(global.GLOB.cardinal)) + set_dir(pick(GLOB.cardinal)) spawn(duration) qdel(src) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index c512baf1669..f559ef57aa0 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -31,7 +31,7 @@ far_dist += heavy_impact_range * 5 far_dist += devastation_range * 20 var/frequency = get_rand_frequency() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.z == epicenter.z) var/turf/M_turf = get_turf(M) var/dist = get_dist(M_turf, epicenter) @@ -45,7 +45,7 @@ var/close = range(world.view+round(devastation_range,1), epicenter) // to all distanced mobs play a different sound - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.z == epicenter.z) if(!(M in close)) // check if the mob can hear diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1ff61be2408..ad72c91d4df 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -140,7 +140,7 @@ /obj/item/Destroy() if(item_tf_spawn_allowed) - item_tf_spawnpoints -= src + GLOB.item_tf_spawnpoints -= src if(ismob(loc)) var/mob/m = loc m.drop_from_inventory(src) @@ -1122,12 +1122,12 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen /obj/item/proc/item_tf_spawnpoint_set() if(!item_tf_spawn_allowed) item_tf_spawn_allowed = TRUE - item_tf_spawnpoints += src + GLOB.item_tf_spawnpoints += src /obj/item/proc/item_tf_spawnpoint_used() if(item_tf_spawn_allowed) item_tf_spawn_allowed = FALSE - item_tf_spawnpoints -= src + GLOB.item_tf_spawnpoints -= src // Ported from TG, used when dropping items on tables/closets. /obj/item/proc/do_drop_animation(atom/moving_from) diff --git a/code/game/objects/items/devices/ai_detector.dm b/code/game/objects/items/devices/ai_detector.dm index 724abb98df5..c9b94ab2ba9 100644 --- a/code/game/objects/items/devices/ai_detector.dm +++ b/code/game/objects/items/devices/ai_detector.dm @@ -37,7 +37,7 @@ var/mob/living/carrier = isliving(loc) ? loc : null // First, let's check if any AIs are actively tracking them. - for(var/mob/living/silicon/ai/AI in silicon_mob_list) + for(var/mob/living/silicon/ai/AI in GLOB.silicon_mob_list) if(carrier && AI.cameraFollow == carrier) if(!carrier.tracking_status()) // Successful tracking returns a 0, so we need to invert it. return PROXIMITY_TRACKING diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index 3b1019dc1a8..2ff149c243f 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -384,7 +384,7 @@ log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", ui.user) var/obj/item/communicator/comm = exonet.get_atom_from_address(their_address) to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)")) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) if(isnewplayer(M) || M.forbid_seeing_deadchat) continue diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 4a337809315..19e5127f513 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -2,8 +2,6 @@ // // Allows ghosts to roleplay with crewmembers without having to commit to joining the round, and also allows communications between two communicators. -var/global/list/obj/item/communicator/all_communicators = list() //Don't change this to GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator) for now. Sortatoms goes berserk. - // List of core tabs the communicator can switch to #define HOMETAB 1 #define PHONTAB 2 @@ -98,7 +96,7 @@ var/global/list/obj/item/communicator/all_communicators = list() //Don't change /obj/item/communicator/Initialize(mapload) . = ..() all_communicators += src - all_communicators = sortAtom(all_communicators) + all_communicators = sort_names(all_communicators) node = get_exonet_node() START_PROCESSING(SSobj, src) camera = new(src) @@ -191,7 +189,7 @@ var/global/list/obj/item/communicator/all_communicators = list() //Don't change if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves. continue src.known_devices |= comm - for(var/mob/observer/dead/O in dead_mob_list) + for(var/mob/observer/dead/O in GLOB.dead_mob_list) if(!O.client || O.client.prefs.communicator_visibility == 0) continue src.known_devices |= O @@ -316,7 +314,7 @@ var/global/list/obj/item/communicator/all_communicators = list() //Don't change //Clean up references that might point at us all_communicators -= src STOP_PROCESSING(SSobj, src) - listening_objects.Remove(src) + GLOB.listening_objects.Remove(src) QDEL_NULL(camera) QDEL_NULL(exonet) diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm index c964e9f28cf..e21dafe3188 100644 --- a/code/game/objects/items/devices/communicator/messaging.dm +++ b/code/game/objects/items/devices/communicator/messaging.dm @@ -128,7 +128,7 @@ if (usr != src) return //something is terribly wrong - for(var/mob/living/L in mob_list) //Simple check so you don't have dead people calling. + for(var/mob/living/L in GLOB.mob_list) //Simple check so you don't have dead people calling. if(src.client.prefs.real_name == L.real_name) to_chat(src, span_danger("Your identity is already present in the game world. Please load in a different character first.")) return @@ -160,7 +160,7 @@ to_chat(src, span_notice("You have sent '[text_message]' to [chosen_communicator].")) exonet_messages.Add(span_bold("To [chosen_communicator]:") + "
[text_message]") log_pda("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", src) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) if(isnewplayer(M) || M.forbid_seeing_deadchat) continue diff --git a/code/game/objects/items/devices/communicator/phone.dm b/code/game/objects/items/devices/communicator/phone.dm index dc46930913d..3d9c95ce129 100644 --- a/code/game/objects/items/devices/communicator/phone.dm +++ b/code/game/objects/items/devices/communicator/phone.dm @@ -5,7 +5,7 @@ if(!comm || !istype(comm)) return communicating |= comm - listening_objects |= src + GLOB.listening_objects |= src update_icon() // Proc: del_communicating() @@ -73,7 +73,7 @@ new_voice.mind = candidate.mind //Transfer the mind, if any. new_voice.ckey = candidate.ckey //Finally, bring the client over. voice_mobs.Add(new_voice) - listening_objects |= src + GLOB.listening_objects |= src var/obj/screen/blackness = new() //Makes a black screen, so the candidate can't see what's going on before actually 'connecting' to the communicator. blackness.screen_loc = ui_entire_screen @@ -139,7 +139,7 @@ comm.end_video() if(voice_mobs.len == 0 && communicating.len == 0) - listening_objects.Remove(src) + GLOB.listening_objects.Remove(src) // Proc: request() // Parameters: 1 (candidate - the ghost or communicator wanting to call the device) @@ -294,7 +294,7 @@ to_chat(src, span_danger("You have used the antagHUD and cannot respawn or use communicators!")) return - for(var/mob/living/L in mob_list) //Simple check so you don't have dead people calling. + for(var/mob/living/L in GLOB.mob_list) //Simple check so you don't have dead people calling. if(src.client.prefs.real_name == L.real_name) to_chat(src, span_danger("Your identity is already present in the game world. Please load in a different character first.")) return diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index 725a57e54a1..7f846162666 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -488,10 +488,10 @@ add_attack_logs(user,H,"Shocked using [name]") /obj/item/shockpaddles/proc/make_alive(mob/living/carbon/human/M) //This revives the mob - dead_mob_list.Remove(M) - if((M in living_mob_list) || (M in dead_mob_list)) + GLOB.dead_mob_list.Remove(M) + if((M in GLOB.living_mob_list) || (M in GLOB.dead_mob_list)) WARNING("Mob [M] was defibbed but already in the living or dead list still!") - living_mob_list += M + GLOB.living_mob_list += M M.timeofdeath = 0 M.set_stat(UNCONSCIOUS) //Life() can bring them back to consciousness if it needs to. diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 411685d4cf4..32804af071c 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -1,22 +1,3 @@ -var/global/list/radio_channels_by_freq = list( - num2text(PUB_FREQ) = CHANNEL_COMMON, - num2text(AI_FREQ) = CHANNEL_AI_PRIVATE, - num2text(ENT_FREQ) = CHANNEL_ENTERTAINMENT, - num2text(ERT_FREQ) = CHANNEL_RESPONSE_TEAM, - num2text(COMM_FREQ)= CHANNEL_COMMAND, - num2text(ENG_FREQ) = CHANNEL_ENGINEERING, - num2text(MED_FREQ) = CHANNEL_MEDICAL, - num2text(MED_I_FREQ)=CHANNEL_MEDICAL_1, - num2text(SEC_FREQ) = CHANNEL_SECURITY, - num2text(SEC_I_FREQ)=CHANNEL_SECURITY_1, - num2text(SCI_FREQ) = CHANNEL_SCIENCE, - num2text(SUP_FREQ) = CHANNEL_SUPPLY, - num2text(SRV_FREQ) = CHANNEL_SERVICE, - num2text(EXP_FREQ) = CHANNEL_EXPLORATION - ) - -GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) - /obj/item/paicard name = "personal AI device" icon = 'icons/obj/pda.dmi' @@ -73,7 +54,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) to_chat(user,span_warning("You cannot join a pAI card when you are banned from playing as a pAI.")) return - for(var/ourkey in paikeys) + for(var/ourkey in GLOB.paikeys) if(ourkey == user.ckey) to_chat(user, span_warning("You can't just rejoin any old pAI card!!! Your card still exists.")) return @@ -96,14 +77,14 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) var/obj/item/paicard/typeb/card = new(location) var/mob/living/silicon/pai/new_pai = new(card) new_pai.key = user.key - paikeys |= new_pai.ckey + GLOB.paikeys |= new_pai.ckey card.setPersonality(new_pai) new_pai.SetName(actual_pai_name) else var/obj/item/paicard/card = new(location) var/mob/living/silicon/pai/new_pai = new(card) new_pai.key = user.key - paikeys |= new_pai.ckey + GLOB.paikeys |= new_pai.ckey card.setPersonality(new_pai) new_pai.SetName(actual_pai_name) @@ -112,7 +93,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) var/obj/item/paicard/typeb/card = new(location) var/mob/living/silicon/pai/new_pai = new(card) new_pai.key = user.key - paikeys |= new_pai.ckey + GLOB.paikeys |= new_pai.ckey card.setPersonality(new_pai) if(!new_pai.savefile_load(new_pai)) var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name") @@ -123,7 +104,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) var/obj/item/paicard/card = new(location) var/mob/living/silicon/pai/new_pai = new(card) new_pai.key = user.key - paikeys |= new_pai.ckey + GLOB.paikeys |= new_pai.ckey card.setPersonality(new_pai) if(!new_pai.savefile_load(new_pai)) var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name") @@ -517,7 +498,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) channels = list() for(var/internal_chan in internal_channels) - var/ch_name = radio_channels_by_freq[internal_chan] + var/ch_name = GLOB.radio_channels_by_freq[internal_chan] if(has_channel_access(card.pai, internal_chan)) channels += ch_name channels[ch_name] = 1 diff --git a/code/game/objects/items/devices/paicard_vr.dm b/code/game/objects/items/devices/paicard_vr.dm index 5ddcc1abc76..443681b0600 100644 --- a/code/game/objects/items/devices/paicard_vr.dm +++ b/code/game/objects/items/devices/paicard_vr.dm @@ -1,4 +1,4 @@ -var/global/list/paikeys = list() +GLOBAL_LIST_EMPTY(paikeys) /obj/item/paicard var/panel_open = FALSE diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index 33e07f1bac8..65cffc51b22 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -11,7 +11,7 @@ /obj/item/pipe_painter/Initialize(mapload) . = ..() modes = new() - for(var/C in pipe_colors) + for(var/C in GLOB.pipe_colors) modes += "[C]" mode = pick(modes) @@ -23,7 +23,7 @@ return var/obj/machinery/atmospherics/pipe/P = A - P.change_color(pipe_colors[mode]) + P.change_color(GLOB.pipe_colors[mode]) /obj/item/pipe_painter/attack_self(mob/user as mob) var/new_mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe painter", modes) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 1354a8f322b..74f37a9e293 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -87,7 +87,7 @@ /obj/item/radio/intercom/department/medbay/Initialize(mapload) . = ..() - internal_channels = default_medbay_channels.Copy() + internal_channels = GLOB.default_medbay_channels.Copy() /obj/item/radio/intercom/department/security/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm index 60fd1eed5dc..c20b97b1a64 100644 --- a/code/game/objects/items/devices/radio/jammer.dm +++ b/code/game/objects/items/devices/radio/jammer.dm @@ -1,4 +1,4 @@ -var/global/list/active_radio_jammers = list() +GLOBAL_LIST_EMPTY(active_radio_jammers) /proc/is_jammed(var/obj/radio) var/turf/Tr = get_turf(radio) @@ -9,7 +9,7 @@ var/global/list/active_radio_jammers = list() if(our_area.no_comms) return TRUE - for(var/obj/item/radio_jammer/J as anything in active_radio_jammers) + for(var/obj/item/radio_jammer/J as anything in GLOB.active_radio_jammers) var/turf/Tj = get_turf(J) if(J.on && Tj.z == Tr.z) //If we're on the same Z, it's worth checking. @@ -52,7 +52,7 @@ var/global/list/active_radio_jammers = list() if(user) to_chat(user,span_warning("\The [src] deactivates.")) STOP_PROCESSING(SSobj, src) - active_radio_jammers -= src + GLOB.active_radio_jammers -= src on = FALSE update_icon() @@ -60,7 +60,7 @@ var/global/list/active_radio_jammers = list() if(user) to_chat(user,span_notice("\The [src] is now active.")) START_PROCESSING(SSobj, src) - active_radio_jammers += src + GLOB.active_radio_jammers += src on = TRUE update_icon() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ac60abd0f23..20aeb06a967 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -1,27 +1,4 @@ #define CANBROADCAST_INNERBOX 0.7071067811865476 //This is sqrt(2)/2 -// Access check is of the type requires one. These have been carefully selected to avoid allowing the janitor to see channels he shouldn't -var/global/list/default_internal_channels = list( - num2text(PUB_FREQ) = list(), - num2text(AI_FREQ) = list(access_synth), - num2text(ENT_FREQ) = list(), - num2text(ERT_FREQ) = list(access_cent_specops), - num2text(COMM_FREQ)= list(access_heads), - num2text(ENG_FREQ) = list(access_engine_equip, access_atmospherics), - num2text(MED_FREQ) = list(access_medical_equip), - num2text(MED_I_FREQ)=list(access_medical_equip), - num2text(SEC_FREQ) = list(access_security), - num2text(SEC_I_FREQ)=list(access_security), - num2text(SCI_FREQ) = list(access_tox, access_robotics, access_xenobiology), - num2text(SUP_FREQ) = list(access_cargo, access_mining_station), - num2text(SRV_FREQ) = list(access_janitor, access_library, access_hydroponics, access_bar, access_kitchen), - num2text(EXP_FREQ) = list(access_explorer) -) - -var/global/list/default_medbay_channels = list( - num2text(PUB_FREQ) = list(), - num2text(MED_FREQ) = list(), - num2text(MED_I_FREQ) = list() -) /obj/item/radio icon = 'icons/obj/radio_vr.dmi' @@ -83,8 +60,8 @@ var/global/list/default_medbay_channels = list( secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT) wires = new(src) - internal_channels = default_internal_channels.Copy() - listening_objects += src + internal_channels = GLOB.default_internal_channels.Copy() + GLOB.listening_objects += src if(bluespace_radio && (bs_tx_preload_id || bs_rx_preload_id)) return INITIALIZE_HINT_LATELOAD @@ -128,7 +105,7 @@ var/global/list/default_medbay_channels = list( /obj/item/radio/Destroy() qdel(wires) wires = null - listening_objects -= src + GLOB.listening_objects -= src if(radio_controller) radio_controller.remove_object(src, frequency) for (var/ch_name in channels) @@ -766,7 +743,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) /obj/item/radio/phone/medbay/Initialize(mapload) . = ..() - internal_channels = default_medbay_channels.Copy() + internal_channels = GLOB.default_medbay_channels.Copy() /obj/item/radio/proc/can_broadcast_to() var/list/output = list() diff --git a/code/game/objects/items/devices/radio/radio_vr.dm b/code/game/objects/items/devices/radio/radio_vr.dm index 55b54356311..c7143a600cc 100644 --- a/code/game/objects/items/devices/radio/radio_vr.dm +++ b/code/game/objects/items/devices/radio/radio_vr.dm @@ -12,7 +12,7 @@ /obj/item/radio/emergency/Initialize(mapload) . = ..() - internal_channels = default_medbay_channels.Copy() + internal_channels = GLOB.default_medbay_channels.Copy() diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm index 7ab0a2f9537..a68b84eca78 100644 --- a/code/game/objects/items/devices/scanners/sleevemate.dm +++ b/code/game/objects/items/devices/scanners/sleevemate.dm @@ -192,7 +192,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob return var/target_ref = href_list["target"] - var/mob/living/target = locate(target_ref) in mob_list + var/mob/living/target = locate(target_ref) in GLOB.mob_list if(!target) to_chat(usr,span_warning("Unable to operate on that target.")) return diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm index a16f8491c31..6e5ec605707 100644 --- a/code/game/objects/items/devices/t_scanner.dm +++ b/code/game/objects/items/devices/t_scanner.dm @@ -1,4 +1,4 @@ -#define OVERLAY_CACHE_LEN 50 +#define overlay_cache_LEN 50 /obj/item/t_scanner name = "\improper T-ray scanner" @@ -18,8 +18,6 @@ var/client/user_client //since making sure overlays are properly added and removed is pretty important, so we track the current user explicitly var/flicker = 0 - var/global/list/overlay_cache = list() //cache recent overlays - pickup_sound = 'sound/items/pickup/device.ogg' drop_sound = 'sound/items/drop/device.ogg' @@ -82,8 +80,8 @@ /obj/item/t_scanner/proc/get_overlay(obj/scanned) //Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room. //Also means that images are reused if multiple people are using t-rays to look at the same objects. - if(scanned in overlay_cache) - . = overlay_cache[scanned] + if(scanned in GLOB.overlay_cache) + . = GLOB.overlay_cache[scanned] else var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER) @@ -98,9 +96,9 @@ . = I // Add it to cache, cutting old entries if the list is too long - overlay_cache[scanned] = . - if(overlay_cache.len > OVERLAY_CACHE_LEN) - overlay_cache.Cut(1, overlay_cache.len-OVERLAY_CACHE_LEN-1) + GLOB.overlay_cache[scanned] = . + if(GLOB.overlay_cache.len > overlay_cache_LEN) + GLOB.overlay_cache.Cut(1, GLOB.overlay_cache.len-overlay_cache_LEN-1) /obj/item/t_scanner/proc/get_scanned_objects(var/scan_dist) . = list() @@ -152,4 +150,4 @@ scan_range = 7 -#undef OVERLAY_CACHE_LEN +#undef overlay_cache_LEN diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 76177772aed..e6b02f369a0 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -26,13 +26,13 @@ if(ispath(mytape)) mytape = new mytape(src) update_icon() - listening_objects += src + GLOB.listening_objects += src /obj/item/taperecorder/empty mytape = null /obj/item/taperecorder/Destroy() - listening_objects -= src + GLOB.listening_objects -= src if(mytape) qdel(mytape) mytape = null diff --git a/code/game/objects/items/devices/translator.dm b/code/game/objects/items/devices/translator.dm index 590bf3cab7d..ff6e9c24604 100644 --- a/code/game/objects/items/devices/translator.dm +++ b/code/game/objects/items/devices/translator.dm @@ -24,13 +24,13 @@ return else listening = 1 - listening_objects |= src + GLOB.listening_objects |= src if(mult_icons) icon_state = "[initial(icon_state)]1" to_chat(user, span_notice("You enable \the [src], translating into [langset.name].")) else //Turning OFF listening = 0 - listening_objects -= src + GLOB.listening_objects -= src langset = null icon_state = "[initial(icon_state)]" to_chat(user, span_notice("You disable \the [src].")) diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm index ac0cb29a54c..c56b6970f93 100644 --- a/code/game/objects/items/devices/tvcamera.dm +++ b/code/game/objects/items/devices/tvcamera.dm @@ -16,10 +16,10 @@ /obj/item/tvcamera/Initialize(mapload) . = ..() - listening_objects += src + GLOB.listening_objects += src /obj/item/tvcamera/Destroy() - listening_objects -= src + GLOB.listening_objects -= src qdel(camera) qdel(radio) camera = null diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index be65f5abce3..e8a2649880d 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -175,7 +175,7 @@ if(!M.brainmob.key) var/ghost_can_reenter = 0 if(M.brainmob.mind) - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(G.can_reenter_corpse && G.mind == M.brainmob.mind) ghost_can_reenter = 1 //May come in use again at another point. to_chat(user, span_notice("\The [W] is completely unresponsive; though it may be able to auto-resuscitate.")) //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems. diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index ba5f70a8e5a..d6201f51cba 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -86,14 +86,14 @@ return 0 if(!R.key) - for(var/mob/observer/dead/ghost in player_list) + for(var/mob/observer/dead/ghost in GLOB.player_list) if(ghost.mind && ghost.mind.current == R) R.key = ghost.key R.set_stat(CONSCIOUS) R.add_robot_verbs() - dead_mob_list -= R - living_mob_list |= R + GLOB.dead_mob_list -= R + GLOB.living_mob_list |= R R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT) return 1 diff --git a/code/game/objects/items/stacks/sandbags.dm b/code/game/objects/items/stacks/sandbags.dm index 5c310e0602e..37e8c82baca 100644 --- a/code/game/objects/items/stacks/sandbags.dm +++ b/code/game/objects/items/stacks/sandbags.dm @@ -48,9 +48,6 @@ slowdown = round(amount / 10, 0.1) -var/global/list/datum/stack_recipe/sandbag_recipes = list( \ - new/datum/stack_recipe("barricade", /obj/structure/barricade/sandbag, 3, time = 5 SECONDS, one_per_turf = 1, on_floor = 1, pass_stack_color = TRUE)) - /obj/item/stack/sandbags/produce_recipe(datum/stack_recipe/recipe, var/quantity, mob/user) var/required = quantity*recipe.req_amount var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount) diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm index 816130a011c..1d9ea93da25 100644 --- a/code/game/objects/items/toys/toys_vr.dm +++ b/code/game/objects/items/toys/toys_vr.dm @@ -542,7 +542,7 @@ /obj/item/toy/AI/attack_self(mob/user as mob) var/list/players = list() - for(var/mob/living/carbon/human/player in player_list) + for(var/mob/living/carbon/human/player in GLOB.player_list) if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10)) continue players += player.real_name diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 558e84579b1..6312f27465c 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -60,7 +60,7 @@ AI MODULES src.transmitInstructions(comp.current, user) to_chat(comp.current, "These are your laws now:") comp.current.show_laws() - for(var/mob/living/silicon/robot/R in mob_list) + for(var/mob/living/silicon/robot/R in GLOB.mob_list) if(R.lawupdate && (R.connected_ai == comp.current)) to_chat(R, "These are your laws now:") R.show_laws() diff --git a/code/game/objects/items/weapons/RPD_vr.dm b/code/game/objects/items/weapons/RPD_vr.dm index 8dd65f6c22a..a45f58e5ed5 100644 --- a/code/game/objects/items/weapons/RPD_vr.dm +++ b/code/game/objects/items/weapons/RPD_vr.dm @@ -90,7 +90,7 @@ "preview_rows" = recipe.get_preview(p_dir), "categories" = list(), "selected_color" = paint_color, - "paint_colors" = pipe_colors, + "paint_colors" = GLOB.pipe_colors, "mode" = mode ) @@ -189,7 +189,7 @@ if(!istype(A, /obj/machinery/atmospherics/pipe/simple/heat_exchanging) && istype(A, /obj/machinery/atmospherics/pipe)) var/obj/machinery/atmospherics/pipe/P = A playsound(src, 'sound/machines/click.ogg', 50, 1) - P.change_color(pipe_colors[paint_color]) + P.change_color(GLOB.pipe_colors[paint_color]) user.visible_message(span_notice("[user] paints \the [P] [paint_color]."), span_notice("You paint \the [P] [paint_color].")) return @@ -219,7 +219,7 @@ P.update() P.add_fingerprint(user) if(R.paintable) - P.color = pipe_colors[paint_color] + P.color = GLOB.pipe_colors[paint_color] P.setPipingLayer(queued_piping_layer) if(queued_p_flipped) P.do_a_flip() diff --git a/code/game/objects/items/weapons/id cards/syndicate_ids.dm b/code/game/objects/items/weapons/id cards/syndicate_ids.dm index dbb30f99e52..89260717f59 100644 --- a/code/game/objects/items/weapons/id cards/syndicate_ids.dm +++ b/code/game/objects/items/weapons/id cards/syndicate_ids.dm @@ -11,7 +11,7 @@ /obj/item/card/id/syndicate/Initialize(mapload) . = ..() agentcard_module = new(src) - access = syndicate_access.Copy() + access = GLOB.syndicate_access.Copy() /obj/item/card/id/syndicate/station_access/Initialize(mapload) . = ..() // Same as the normal Syndicate id, only already has all station access @@ -64,10 +64,9 @@ registered_user.unregister(OBSERVER_EVENT_DESTROY, src) registered_user = null -/var/global/list/id_card_states /proc/id_card_states() - if(!id_card_states) - id_card_states = list() + if(!GLOB.id_card_states) + GLOB.id_card_states = list() for(var/path in typesof(/obj/item/card/id)) var/obj/item/card/id/ID = new path() var/datum/card_state/CS = new() @@ -75,10 +74,10 @@ CS.item_state = initial(ID.item_state) CS.sprite_stack = ID.initial_sprite_stack CS.name = initial(ID.name) - id_card_states += CS - id_card_states = dd_sortedObjectList(id_card_states) + GLOB.id_card_states += CS + GLOB.id_card_states = dd_sortedObjectList(GLOB.id_card_states) - return id_card_states + return GLOB.id_card_states /datum/card_state var/name diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index f9a07afa499..6be218e04b3 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -38,7 +38,7 @@ else forceMove(source) - listening_objects |= src + GLOB.listening_objects |= src // Takes place after handle_implant, if that returns TRUE /obj/item/implant/proc/post_implant(var/mob/source) @@ -75,7 +75,7 @@ if(part) part.implants.Remove(src) part = null - listening_objects.Remove(src) + GLOB.listening_objects.Remove(src) imp_in = null return ..() diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm index 39ccad94ec3..a7c2ccb6b90 100644 --- a/code/game/objects/items/weapons/material/ashtray.dm +++ b/code/game/objects/items/weapons/material/ashtray.dm @@ -1,4 +1,4 @@ -var/global/list/ashtray_cache = list() +GLOBAL_LIST_EMPTY(ashtray_cache) /obj/item/material/ashtray name = "ashtray" @@ -24,21 +24,21 @@ var/global/list/ashtray_cache = list() color = null cut_overlays() var/cache_key = "base-[material.name]" - if(!ashtray_cache[cache_key]) + if(!GLOB.ashtray_cache[cache_key]) var/image/I = image('icons/obj/objects.dmi',"ashtray") I.color = material.icon_colour - ashtray_cache[cache_key] = I - add_overlay(ashtray_cache[cache_key]) + GLOB.ashtray_cache[cache_key] = I + add_overlay(GLOB.ashtray_cache[cache_key]) if (contents.len == max_butts) - if(!ashtray_cache["full"]) - ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full") - add_overlay(ashtray_cache["full"]) + if(!GLOB.ashtray_cache["full"]) + GLOB.ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full") + add_overlay(GLOB.ashtray_cache["full"]) desc = "It's stuffed full." else if (contents.len > max_butts/2) - if(!ashtray_cache["half"]) - ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half") - add_overlay(ashtray_cache["half"]) + if(!GLOB.ashtray_cache["half"]) + GLOB.ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half") + add_overlay(GLOB.ashtray_cache["half"]) desc = "It's half-filled." else desc = "An ashtray made of [material.display_name]." diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index da8f154c22a..950b6a61ca2 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -95,4 +95,4 @@ new_voice.name = "cursed sword" //Cursed swords shouldn't be known characters. new_voice.real_name = "cursed sword" voice_mobs.Add(new_voice) - listening_objects |= src + GLOB.listening_objects |= src diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 7061757b09d..3685e5d05e4 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -1,8 +1,6 @@ //NEVER USE THIS IT SUX -PETETHEGOAT //THE GOAT WAS RIGHT - RKF -var/global/list/cached_icons = list() - /obj/item/reagent_containers/glass/paint desc = "It's a paint bucket." name = "paint bucket" diff --git a/code/game/objects/items_vr.dm b/code/game/objects/items_vr.dm index d3ad72e21ba..bb2d3dfc149 100644 --- a/code/game/objects/items_vr.dm +++ b/code/game/objects/items_vr.dm @@ -22,7 +22,7 @@ new_voice.name = "[name]" //No name given? Give them the name of the object they're inhabiting. new_voice.real_name = "[new_voice.real_name]" //We still know their real name though! possessed_voice.Add(new_voice) - listening_objects |= src + GLOB.listening_objects |= src remove_verb(new_voice, /mob/living/voice/verb/change_name) //No changing your name! Bad! remove_verb(new_voice, /mob/living/voice/verb/hang_up) //Also you can't hang up. You are the item! src.item_tf_spawnpoint_used() diff --git a/code/game/objects/mail.dm b/code/game/objects/mail.dm index dc5036bc008..5b152f0f6c2 100644 --- a/code/game/objects/mail.dm +++ b/code/game/objects/mail.dm @@ -104,7 +104,7 @@ /obj/item/mail/proc/setRecipient(mob/user) var/list/recipients = list() var/mob/living/recipient_mob - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(!player_is_antag(player.mind) && player.mind.show_in_directory) recipients += player @@ -278,7 +278,7 @@ if(!chosen) return - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) recipients += player var/mob/living/chosen_player = tgui_input_list(usr, "Choose recipient", "Recipients", recipients, recipients) @@ -315,7 +315,7 @@ /obj/structure/closet/crate/mail/full/Initialize(mapload) . = ..() var/list/mail_recipients = list() - for(var/mob/living/carbon/human/alive in player_list) + for(var/mob/living/carbon/human/alive in GLOB.player_list) if(alive.stat != DEAD && alive.client && alive.client.inactivity <= 10 MINUTES) mail_recipients += alive for(var/iterator in 1 to storage_capacity) diff --git a/code/game/objects/mob_spawner_vr.dm b/code/game/objects/mob_spawner_vr.dm index cb35117f8ea..de549655514 100644 --- a/code/game/objects/mob_spawner_vr.dm +++ b/code/game/objects/mob_spawner_vr.dm @@ -96,7 +96,7 @@ var/turf/T = get_turf(src) if(!T) return 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) var/turf/L_T if(L.stat == DEAD) continue diff --git a/code/game/objects/random/_random.dm b/code/game/objects/random/_random.dm index 1af45de204a..5293ce43d6e 100644 --- a/code/game/objects/random/_random.dm +++ b/code/game/objects/random/_random.dm @@ -42,38 +42,36 @@ var/build_path = item_to_spawn() return new build_path(drop_location()) -var/list/random_junk_ -var/list/random_useful_ /proc/get_random_useful_type() - if(!random_useful_) - random_useful_ = subtypesof(/obj/item/pen/crayon) - random_useful_ += /obj/item/pen - random_useful_ += /obj/item/pen/blue - random_useful_ += /obj/item/pen/red - random_useful_ += /obj/item/pen/multi - random_useful_ += /obj/item/storage/box/matches - random_useful_ += /obj/item/stack/material/cardboard - return pick(random_useful_) + if(!LAZYLEN(GLOB.random_useful_)) + GLOB.random_useful_ = subtypesof(/obj/item/pen/crayon) + GLOB.random_useful_ += /obj/item/pen + GLOB.random_useful_ += /obj/item/pen/blue + GLOB.random_useful_ += /obj/item/pen/red + GLOB.random_useful_ += /obj/item/pen/multi + GLOB.random_useful_ += /obj/item/storage/box/matches + GLOB.random_useful_ += /obj/item/stack/material/cardboard + return pick(GLOB.random_useful_) /proc/get_random_junk_type() if(prob(20)) // Misc. clutter return /obj/effect/decal/cleanable/generic if(prob(70)) // Misc. junk - if(!random_junk_) - random_junk_ = subtypesof(/obj/item/trash) - random_junk_ += /obj/effect/decal/cleanable/bug_remains - random_junk_ += /obj/effect/decal/remains/mouse - random_junk_ += /obj/effect/decal/remains/robot - random_junk_ += /obj/item/paper/crumpled - random_junk_ += /obj/item/inflatable/torn - random_junk_ += /obj/effect/decal/cleanable/molten_item - random_junk_ += /obj/item/material/shard + if(!LAZYLEN(GLOB.random_junk_)) + GLOB.random_junk_ = subtypesof(/obj/item/trash) + GLOB.random_junk_ += /obj/effect/decal/cleanable/bug_remains + GLOB.random_junk_ += /obj/effect/decal/remains/mouse + GLOB.random_junk_ += /obj/effect/decal/remains/robot + GLOB.random_junk_ += /obj/item/paper/crumpled + GLOB.random_junk_ += /obj/item/inflatable/torn + GLOB.random_junk_ += /obj/effect/decal/cleanable/molten_item + GLOB.random_junk_ += /obj/item/material/shard - random_junk_ -= /obj/item/trash/plate - random_junk_ -= /obj/item/trash/snack_bowl - random_junk_ -= /obj/item/trash/syndi_cakes - random_junk_ -= /obj/item/trash/tray - return pick(random_junk_) + GLOB.random_junk_ -= /obj/item/trash/plate + GLOB.random_junk_ -= /obj/item/trash/snack_bowl + GLOB.random_junk_ -= /obj/item/trash/syndi_cakes + GLOB.random_junk_ -= /obj/item/trash/tray + return pick(GLOB.random_junk_) // Misc. actually useful stuff return get_random_useful_type() diff --git a/code/game/objects/structures/holoplant.dm b/code/game/objects/structures/holoplant.dm index 66c120135ba..a573d569e28 100644 --- a/code/game/objects/structures/holoplant.dm +++ b/code/game/objects/structures/holoplant.dm @@ -9,13 +9,6 @@ active_power_usage = 5 var/interference = FALSE var/icon/plant = null - var/global/list/possible_plants = list( - "plant-1", - "plant-10", - "plant-09", - "plant-15", - "plant-13" - ) /obj/machinery/holoplant/Initialize(mapload) . = ..() @@ -82,7 +75,7 @@ /obj/machinery/holoplant/proc/prepare_icon(var/state) if(!state) - state = pick(possible_plants) + state = pick(GLOB.possible_plants) var/plant_icon = icon(icon, state) return getHologramIcon(plant_icon, 0) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 29f79df793d..c8e6f48bd4a 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -1493,8 +1493,8 @@ /obj/structure/sign/calendar/examine(mob/user) . = ..() . += "The calendar shows that the date is [stationdate2text()]." - if (Holiday.len) - . += "Today is " + span_bold(span_green("[english_list(Holiday)]")) + "." + if (GLOB.Holiday.len) + . += "Today is " + span_bold(span_green("[english_list(GLOB.Holiday)]")) + "." /obj/structure/sign/explosive name = "\improper HIGH EXPLOSIVES sign" diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 090bc5fcb51..f5b16ac606a 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -46,20 +46,20 @@ cut_overlays() // Base icon. var/cache_key = "[base_icon]-[material.name]" - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, base_icon) if(applies_material_colour) //VOREStation Add - Goes with added var I.color = material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) // Padding overlay. if(padding_material) var/padding_cache_key = "[base_icon]-padding-[padding_material.name]" - if(isnull(stool_cache[padding_cache_key])) + if(isnull(GLOB.stool_cache[padding_cache_key])) var/image/I = image(icon, "[base_icon]_padding") I.color = padding_material.icon_colour - stool_cache[padding_cache_key] = I - add_overlay(stool_cache[padding_cache_key]) + GLOB.stool_cache[padding_cache_key] = I + add_overlay(GLOB.stool_cache[padding_cache_key]) // Strings. desc = initial(desc) if(padding_material) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 6bf4ac9f07b..8ae6b87710d 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -43,14 +43,14 @@ ..() if(has_buckled_mobs()) var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]" - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, "[base_icon]_armrest") I.plane = MOB_PLANE I.layer = ABOVE_MOB_LAYER if(padding_material) I.color = padding_material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) /obj/structure/bed/chair/proc/update_layer() if(src.dir == NORTH) @@ -329,14 +329,14 @@ /obj/structure/bed/chair/sofa/corner/update_icon() ..() var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]-permanent" - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, "[base_icon]_armrest") I.plane = MOB_PLANE I.layer = ABOVE_MOB_LAYER if(padding_material) I.color = padding_material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) // Wooden nonsofa - no corners /obj/structure/bed/chair/sofa/pew diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm index 31db5269cd5..4b0830328a5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm @@ -54,66 +54,66 @@ // Base icon (base material color) var/cache_key = "[base_icon]-[material.name]" - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, base_icon) if(applies_material_colour) I.color = material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) // Padding ('_padding') (padding material color) if(padding_material) var/padding_cache_key = "[base_icon]-padding-[padding_material.name]" - if(isnull(stool_cache[padding_cache_key])) + if(isnull(GLOB.stool_cache[padding_cache_key])) var/image/I = image(icon, "[base_icon]_padding") I.color = padding_material.icon_colour - stool_cache[padding_cache_key] = I - add_overlay(stool_cache[padding_cache_key]) + GLOB.stool_cache[padding_cache_key] = I + add_overlay(GLOB.stool_cache[padding_cache_key]) // Over ('_over') (base material color) cache_key = "[base_icon]-[material.name]-over" - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, "[base_icon]_over") I.plane = MOB_PLANE I.layer = ABOVE_MOB_LAYER if(applies_material_colour) I.color = material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) // Padding Over ('_padding_over') (padding material color) if(padding_material) var/padding_cache_key = "[base_icon]-padding-[padding_material.name]-over" - if(isnull(stool_cache[padding_cache_key])) + if(isnull(GLOB.stool_cache[padding_cache_key])) var/image/I = image(icon, "[base_icon]_padding_over") I.color = padding_material.icon_colour I.plane = MOB_PLANE I.layer = ABOVE_MOB_LAYER - stool_cache[padding_cache_key] = I - add_overlay(stool_cache[padding_cache_key]) + GLOB.stool_cache[padding_cache_key] = I + add_overlay(GLOB.stool_cache[padding_cache_key]) if(has_buckled_mobs()) if(padding_material) cache_key = "[base_icon]-armrest-[padding_material.name]" // Armrest ('_armrest') (base material color) - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, "[base_icon]_armrest") I.plane = MOB_PLANE I.layer = ABOVE_MOB_LAYER if(applies_material_colour) I.color = material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) if(padding_material) cache_key = "[base_icon]-padding-armrest-[padding_material.name]" // Padding Armrest ('_padding_armrest') (padding material color) - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, "[base_icon]_padding_armrest") I.plane = MOB_PLANE I.layer = ABOVE_MOB_LAYER I.color = padding_material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) /obj/structure/bed/chair/bay/chair name = "mounted chair" diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index bcefabcc1dc..1fb68246c8f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -1,5 +1,4 @@ //Todo: add leather and cloth for arbitrary coloured stools. -var/global/list/stool_cache = list() //haha stool /obj/item/stool name = "stool" @@ -40,19 +39,19 @@ var/global/list/stool_cache = list() //haha stool cut_overlays() // Base icon. var/cache_key = "[base_icon]-[material.name]" - if(isnull(stool_cache[cache_key])) + if(isnull(GLOB.stool_cache[cache_key])) var/image/I = image(icon, base_icon) I.color = material.icon_colour - stool_cache[cache_key] = I - add_overlay(stool_cache[cache_key]) + GLOB.stool_cache[cache_key] = I + add_overlay(GLOB.stool_cache[cache_key]) // Padding overlay. if(padding_material) var/padding_cache_key = "[base_icon]-padding-[padding_material.name]" - if(isnull(stool_cache[padding_cache_key])) + if(isnull(GLOB.stool_cache[padding_cache_key])) var/image/I = image(icon, "[base_icon]_padding") //VOREStation Edit I.color = padding_material.icon_colour - stool_cache[padding_cache_key] = I - add_overlay(stool_cache[padding_cache_key]) + GLOB.stool_cache[padding_cache_key] = I + add_overlay(GLOB.stool_cache[padding_cache_key]) // Strings. if(padding_material) name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now. diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm index 4ab8414f649..738bfdb5f59 100644 --- a/code/game/objects/structures/transit_tubes.dm +++ b/code/game/objects/structures/transit_tubes.dm @@ -13,13 +13,6 @@ var/exit_delay = 2 var/enter_delay = 1 - // GLOB.alldirs in global.dm is the same list of directions, but since - // the specific order matters to get a usable icon_state, it is - // copied here so that, in the unlikely case that GLOB.alldirs is changed, - // this continues to work. - var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) - - // A place where tube pods stop, and people can get in or out. // Mappers: use "Generate Instances from Directions" for this // one. @@ -439,7 +432,7 @@ var/list/connected = list() var/list/connected_auto = list() - for(var/direction in tube_dir_list) + for(var/direction in GLOB.tube_dir_list) var/location = get_step(loc, direction) for(var/obj/structure/transit_tube/tube in location) if(tube.directions() == null && tube.icon_state == "auto") @@ -454,7 +447,7 @@ tube_dirs = select_automatic_dirs(connected) - if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2])) + if(length(tube_dirs) == 2 && GLOB.tube_dir_list.Find(tube_dirs[1]) > GLOB.tube_dir_list.Find(tube_dirs[2])) tube_dirs.Swap(1, 2) generate_automatic_corners(tube_dirs) @@ -527,10 +520,9 @@ // but it is probably safer to assume the existence of, and // rely on, a sufficiently smart compiler/optimizer. /obj/structure/transit_tube/proc/parse_dirs(text) - var/global/list/direction_table = list() - if(text in direction_table) - return direction_table[text] + if(text in GLOB.direction_table) + return GLOB.direction_table[text] var/list/split_text = splittext(text, "-") @@ -538,7 +530,7 @@ // a purely decorative tube, and doesn't actually // connect to anything. if(split_text[1] == "D") - direction_table[text] = list() + GLOB.direction_table[text] = list() return null var/list/directions = list() @@ -549,7 +541,7 @@ if(direction > 0) directions += direction - direction_table[text] = directions + GLOB.direction_table[text] = directions return directions diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm index fb2d12c1ce0..9c435318b73 100644 --- a/code/game/objects/structures/trash_pile_vr.dm +++ b/code/game/objects/structures/trash_pile_vr.dm @@ -17,17 +17,6 @@ //These are types that can only spawn once, and then will be removed from this list. //Alpha and beta lists are in their respective procs. - var/global/list/unique_gamma = list( - /obj/item/perfect_tele, - /obj/item/bluespace_harpoon, - /obj/item/clothing/glasses/thermal/syndi, - /obj/item/gun/energy/netgun, - /obj/item/gun/projectile/dartgun, - /obj/item/clothing/gloves/black/bloodletter, - /obj/item/gun/energy/mouseray/metamorphosis - ) - - var/global/list/allocated_gamma = list() /obj/structure/trash_pile/Initialize(mapload) . = ..() @@ -53,12 +42,12 @@ /obj/structure/trash_pile/attackby(obj/item/W as obj, mob/user as mob) var/w_type = W.type - if(w_type in allocated_gamma) + if(w_type in GLOB.allocated_gamma) to_chat(user,span_notice("You feel \the [W] slip from your hand, and disappear into the trash pile.")) user.unEquip(W) W.forceMove(src) - allocated_gamma -= w_type - unique_gamma += w_type + GLOB.allocated_gamma -= w_type + GLOB.unique_gamma += w_type qdel(W) else @@ -332,18 +321,18 @@ return I /obj/structure/trash_pile/proc/produce_gamma_item() - var/path = pick_n_take(unique_gamma) + var/path = pick_n_take(GLOB.unique_gamma) if(!path) //Tapped out, reallocate? - for(var/P in allocated_gamma) - var/obj/item/I = allocated_gamma[P] + for(var/P in GLOB.allocated_gamma) + var/obj/item/I = GLOB.allocated_gamma[P] if(QDELETED(I) || istype(I.loc,/obj/machinery/computer/cryopod)) - allocated_gamma -= P + GLOB.allocated_gamma -= P path = P break if(path) var/obj/item/I = new path() - allocated_gamma[path] = I + GLOB.allocated_gamma[path] = I return I else return produce_beta_item() diff --git a/code/game/periodic_news.dm b/code/game/periodic_news.dm index a5eb2042bec..f14f6b47427 100644 --- a/code/game/periodic_news.dm +++ b/code/game/periodic_news.dm @@ -101,9 +101,6 @@ the riots. More on this at 6."} round_time = 60 * 60 - -var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots) - /proc/process_newscaster() check_for_newscaster_updates(ticker.mode.newscaster_announcements) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index cfdcd54e1b9..e46649b7bb6 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -67,7 +67,7 @@ GLOBAL_VAR_INIT(silent_ert, 0) /proc/percentage_dead() var/total = 0 var/deadcount = 0 - for(var/mob/living/carbon/human/H in mob_list) + for(var/mob/living/carbon/human/H in GLOB.mob_list) if(H.client) // Monkeys and mice don't have a client, amirite? if(H.stat == 2) deadcount++ total++ @@ -79,7 +79,7 @@ GLOBAL_VAR_INIT(silent_ert, 0) /proc/percentage_antagonists() var/total = 0 var/antagonists = 0 - for(var/mob/living/carbon/human/H in mob_list) + for(var/mob/living/carbon/human/H in GLOB.mob_list) if(is_special_character(H) >= 1) antagonists++ total++ diff --git a/code/game/sound.dm b/code/game/sound.dm index 8e970e68aa9..19214b639dd 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -13,7 +13,7 @@ // Looping through the player list has the added bonus of working for mobs inside containers var/sound/S = sound(get_sfx(soundin)) var/maxdistance = (world.view + extrarange) * 2 //VOREStation Edit - 3 to 2 - var/list/listeners = player_list.Copy() + var/list/listeners = GLOB.player_list.Copy() for(var/mob/M as anything in listeners) if(!M || !M.client) continue @@ -119,7 +119,7 @@ /proc/sound_to_playing_players(sound, volume = 100, vary) sound = get_sfx(sound) - for(var/M in player_list) + for(var/M in GLOB.player_list) if(ismob(M) && !isnewplayer(M)) var/mob/MO = M MO.playsound_local(get_turf(MO), sound, volume, vary, pressure_affected = FALSE) diff --git a/code/game/turfs/initialization/maintenance.dm b/code/game/turfs/initialization/maintenance.dm index 9f1ed6dc860..1cbe3dccb9b 100644 --- a/code/game/turfs/initialization/maintenance.dm +++ b/code/game/turfs/initialization/maintenance.dm @@ -22,21 +22,20 @@ if(prob(25)) // Keep in mind that only "corners" get any sort of web attempt_web(T, cardinal_turfs) -var/global/list/random_junk /datum/turf_initializer/maintenance/proc/junk() if(prob(25)) return /obj/effect/decal/cleanable/generic - if(!random_junk) - random_junk = subtypesof(/obj/item/trash) - random_junk += typesof(/obj/item/trash/cigbutt) - random_junk += /obj/effect/decal/cleanable/spiderling_remains - random_junk += /obj/effect/decal/remains/mouse - random_junk += /obj/effect/decal/remains/robot - random_junk -= /obj/item/trash/plate - random_junk -= /obj/item/trash/snack_bowl - random_junk -= /obj/item/trash/syndi_cakes - random_junk -= /obj/item/trash/tray - return pick(random_junk) + if(!LAZYLEN(GLOB.random_junk)) + GLOB.random_junk = subtypesof(/obj/item/trash) + GLOB.random_junk += typesof(/obj/item/trash/cigbutt) + GLOB.random_junk += /obj/effect/decal/cleanable/spiderling_remains + GLOB.random_junk += /obj/effect/decal/remains/mouse + GLOB.random_junk += /obj/effect/decal/remains/robot + GLOB.random_junk -= /obj/item/trash/plate + GLOB.random_junk -= /obj/item/trash/snack_bowl + GLOB.random_junk -= /obj/item/trash/syndi_cakes + GLOB.random_junk -= /obj/item/trash/tray + return pick(GLOB.random_junk) /datum/turf_initializer/maintenance/proc/dirty_neighbors(var/list/cardinal_turfs) var/how_dirty = 0 diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index c8a3ef23a95..a4fdf9e1df4 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -112,7 +112,7 @@ if (!changing_turf) stack_trace("Improper turf qdel. Do not qdel turfs directly.") changing_turf = FALSE - cleanbot_reserved_turfs -= src + GLOB.cleanbot_reserved_turfs -= src if(connections) connections.erase_all() ..() diff --git a/code/game/world.dm b/code/game/world.dm index 2285cea24de..462cc92dfdf 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -8,7 +8,6 @@ GLOBAL_VAR(restart_counter) rollover_safety_date = world.realtime - world.timeofday // 00:00 today (ish, since floating point error with world.realtime) of today to_world_log("Map Loading Complete") //logs - //VOREStation Edit Start 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") @@ -16,7 +15,6 @@ GLOBAL_VAR(restart_counter) 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") GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : "" //for telling if the changelog has changed recently @@ -135,7 +133,7 @@ var/world_topic_spam_protect_time = world.timeofday else if(T == "players") var/n = 0 - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) n++ return n @@ -240,11 +238,11 @@ var/world_topic_spam_protect_time = world.timeofday positions["off"][name] = rank // Synthetics don't have actual records, so we will pull them from here. - for(var/mob/living/silicon/ai/ai in mob_list) + for(var/mob/living/silicon/ai/ai in GLOB.mob_list) if(!positions["bot"]) positions["bot"] = list() positions["bot"][ai.name] = "Artificial Intelligence" - for(var/mob/living/silicon/robot/robot in mob_list) + for(var/mob/living/silicon/robot/robot in GLOB.mob_list) // No combat/syndicate cyborgs, no drones, and no AI shells. if(robot.shell) continue @@ -454,7 +452,7 @@ var/world_topic_spam_protect_time = world.timeofday features += "AI allowed" var/n = 0 - for (var/mob/M in player_list) + for (var/mob/M in GLOB.player_list) if (M.client) n++ diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 4131fb3c704..ec53d535142 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -25,7 +25,7 @@ GLOBAL_VAR_INIT(floorIsLava, 0) confidential = TRUE) /proc/admin_notice(var/message, var/rights) - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) var/C = M.client if(!C) @@ -1035,7 +1035,7 @@ var/datum/announcement/minor/admin_min_announcer = new world.Reboot() -/datum/admins/proc/unprison(var/mob/M in mob_list) +/datum/admins/proc/unprison(var/mob/M in GLOB.mob_list) set category = "Admin.Moderation" set name = "Unprison" if (M.z == 2) @@ -1177,7 +1177,7 @@ var/datum/announcement/minor/admin_min_announcer = new feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/datum/admins/proc/show_traitor_panel(var/mob/M in mob_list) +/datum/admins/proc/show_traitor_panel(var/mob/M in GLOB.mob_list) set category = "Admin.Events" set desc = "Edit mobs's memory and role" set name = "Show Traitor Panel" diff --git a/code/modules/admin/admin_tools.dm b/code/modules/admin/admin_tools.dm index 73d065bcc0c..969d308cdee 100644 --- a/code/modules/admin/admin_tools.dm +++ b/code/modules/admin/admin_tools.dm @@ -1,4 +1,4 @@ -/client/proc/cmd_admin_check_player_logs(mob/living/M as mob in mob_list) +/client/proc/cmd_admin_check_player_logs(mob/living/M as mob in GLOB.mob_list) set category = "Admin.Logs" set name = "Check Player Attack Logs" set desc = "Check a player's attack logs." @@ -29,7 +29,7 @@ feedback_add_details("admin_verb","PL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_check_dialogue_logs(mob/living/M as mob in mob_list) +/client/proc/cmd_admin_check_dialogue_logs(mob/living/M as mob in GLOB.mob_list) set category = "Admin.Logs" set name = "Check Player Dialogue Logs" set desc = "Check a player's dialogue logs." diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index 96e8842dba6..e1e0334f2a2 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -14,12 +14,12 @@ var/list/admin_verbs_admin = list( /datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement, /datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange, /client/proc/admin_ghost, //allows us to ghost/reenter body at will, - /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, //VOREStation Add, - /client/proc/player_panel, //VOREStation Add, - /client/proc/hide_verbs, //hides all our adminverbs, //VOREStation Add, - /client/proc/hide_most_verbs, //hides all our hideable adminverbs, //VOREStation Add, - /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, //VOREStation Add, - /client/proc/cmd_check_new_players, //allows us to see every new player, //VOREStation Add, + /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, + /client/proc/player_panel, + /client/proc/hide_verbs, //hides all our adminverbs, + /client/proc/hide_most_verbs, //hides all our hideable adminverbs, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, + /client/proc/cmd_check_new_players, //allows us to see every new player, /client/proc/toggle_view_range, //changes how far we can see, /client/proc/cmd_admin_pm_context, //right-click adminPM interface, /client/proc/cmd_admin_pm_panel, //admin-pm list, @@ -80,7 +80,7 @@ var/list/admin_verbs_admin = list( /client/proc/view_chemical_reaction_logs, /client/proc/makepAI, /datum/admins/proc/paralyze_mob, - /datum/admins/proc/set_uplink, //VOREStation Add, + /datum/admins/proc/set_uplink, /datum/admins/proc/sendFax, /client/proc/despawn_player, /datum/admins/proc/view_feedback, @@ -114,12 +114,11 @@ var/list/admin_verbs_fun = list( /client/proc/roll_dices, /datum/admins/proc/call_supply_drop, /datum/admins/proc/call_drop_pod, -// /client/proc/smite, //Replaced by player_effects /client/proc/player_effects, /client/proc/admin_lightning_strike, /client/proc/cmd_admin_droppod_deploy, - /client/proc/adminorbit, //VOREStation Add - /client/proc/getPlayerStatus, //VORESTation Add + /client/proc/adminorbit, + /client/proc/getPlayerStatus, /client/proc/manage_event_triggers, /client/proc/fake_pdaconvos @@ -133,14 +132,14 @@ var/list/admin_verbs_spawn = list( /datum/admins/proc/spawn_atom, //allows us to spawn instances, /datum/admins/proc/spawn_mail, /client/proc/cmd_admin_droppod_spawn, - /client/proc/spawn_character_mob, //VOREStation Add, + /client/proc/spawn_character_mob, /client/proc/spawn_chemdisp_cartridge, /client/proc/map_template_load, /client/proc/map_template_upload, /client/proc/map_template_load_on_new_z, /client/proc/eventkit_open_mob_spawner, - /client/proc/generic_structure, //VOREStation Add - /client/proc/generic_item, //VOREStation Add + /client/proc/generic_structure, + /client/proc/generic_item, /client/proc/create_gm_message, /client/proc/remove_gm_message, /client/proc/AdminCreateVirus, @@ -208,15 +207,15 @@ var/list/admin_verbs_debug = list( /client/proc/jumptocoord, /client/proc/dsay, /client/proc/admin_ghost, //allows us to ghost/reenter body at will, - /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, //VOREStation Add, - /client/proc/player_panel, //VOREStation Add, - /client/proc/hide_verbs, //hides all our adminverbs, //VOREStation Add, - /client/proc/hide_most_verbs, //hides all our hideable adminverbs, //VOREStation Add, - /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, //VOREStation Add, - /client/proc/cmd_check_new_players, //allows us to see every new player, //VOREStation Add, + /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, + /client/proc/player_panel, + /client/proc/hide_verbs, //hides all our adminverbs, + /client/proc/hide_most_verbs, //hides all our hideable adminverbs, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, + /client/proc/cmd_check_new_players, //allows us to see every new player, /datum/admins/proc/view_runtimes, - // /client/proc/show_gm_status, // VOREStation Edit - We don't use SSgame_master yet. - /datum/admins/proc/set_uplink, //VOREStation Add, + // /client/proc/show_gm_status, //We don't use SSgame_master yet. + /datum/admins/proc/set_uplink, /datum/admins/proc/change_weather, /datum/admins/proc/change_time, /client/proc/cmd_regenerate_asset_cache, @@ -293,7 +292,7 @@ var/list/admin_verbs_hideable = list( /client/proc/air_report, /client/proc/enable_debug_verbs, /client/proc/roll_dices, - /datum/admins/proc/set_uplink, //VOREStation Add, + /datum/admins/proc/set_uplink, /datum/admins/proc/set_tcrystals, /client/proc/stop_sounds ) @@ -303,12 +302,12 @@ var/list/admin_verbs_mod = list( /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game., /datum/admins/proc/PlayerNotes, /client/proc/admin_ghost, //allows us to ghost/reenter body at will, - /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, //VOREStation Add, - /client/proc/player_panel, //VOREStation Add, - /client/proc/hide_verbs, //hides all our adminverbs, //VOREStation Add, - /client/proc/hide_most_verbs, //hides all our hideable adminverbs, //VOREStation Add, - /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, //VOREStation Add, - /client/proc/cmd_check_new_players, //allows us to see every new player, //VOREStation Add, + /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, + /client/proc/player_panel, + /client/proc/hide_verbs, //hides all our adminverbs, + /client/proc/hide_most_verbs, //hides all our hideable adminverbs, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, + /client/proc/cmd_check_new_players, //allows us to see every new player, /datum/admins/proc/show_player_info, /datum/admins/proc/show_traitor_panel, /client/proc/player_panel_new, @@ -329,12 +328,12 @@ var/list/admin_verbs_event_manager = list( /client/proc/cmd_admin_pm_context, /client/proc/cmd_admin_pm_panel, /client/proc/admin_ghost, - /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, //VOREStation Add, - /client/proc/player_panel, //VOREStation Add, - /client/proc/hide_verbs, //hides all our adminverbs, //VOREStation Add, - /client/proc/hide_most_verbs, //hides all our hideable adminverbs, //VOREStation Add, - /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, //VOREStation Add, - /client/proc/cmd_check_new_players, //allows us to see every new player, //VOREStation Add, + /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, + /client/proc/player_panel, + /client/proc/hide_verbs, //hides all our adminverbs, + /client/proc/hide_most_verbs, //hides all our hideable adminverbs, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, + /client/proc/cmd_check_new_players, //allows us to see every new player, /datum/admins/proc/show_player_info, /client/proc/dsay, /client/proc/cmd_admin_subtle_message, diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b1185097d18..05afd08a8a4 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -396,7 +396,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return - var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Rename Silicon.", silicon_mob_list) + var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Rename Silicon.", GLOB.silicon_mob_list) if(!S) return var/new_name = sanitizeSafe(tgui_input_text(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name)) @@ -411,7 +411,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY if(!check_rights(R_ADMIN|R_EVENT)) return - var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Manage Silicon Laws", silicon_mob_list) + var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Manage Silicon Laws", GLOB.silicon_mob_list) if(!S) return var/datum/tgui_module/law_manager/admin/L = new(S) @@ -494,7 +494,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY CONFIG_SET(flag/allow_drone_spawn, !CONFIG_GET(flag/allow_drone_spawn)) message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/allow_drone_spawn) ? "en" : "dis"]abled maintenance drones.", 1) -/client/proc/man_up(mob/T as mob in mob_list) +/client/proc/man_up(mob/T as mob in GLOB.mob_list) set category = "Fun.Do Not" set name = "Man Up" set desc = "Tells mob to man up and deal with it." @@ -515,7 +515,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY if(tgui_alert(usr, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No")) != "Deal with it") return - for (var/mob/T as mob in mob_list) + for (var/mob/T as mob in GLOB.mob_list) to_chat(T, "
" + span_filter_system(span_notice(span_bold(span_huge("Man up.
Deal with it.")) + "
Move along.")) + "

") T << 'sound/voice/manup1.ogg' diff --git a/code/modules/admin/ckey_vr.dm b/code/modules/admin/ckey_vr.dm index f0801e8b78e..09641d85084 100644 --- a/code/modules/admin/ckey_vr.dm +++ b/code/modules/admin/ckey_vr.dm @@ -1,5 +1,5 @@ // Command to set the ckey of a mob without requiring VV permission -/client/proc/SetCKey(var/mob/M in mob_list) +/client/proc/SetCKey(var/mob/M in GLOB.mob_list) set category = "Admin.Game" set name = "Set CKey" set desc = "Mob to teleport" @@ -8,7 +8,7 @@ return var/list/keys = list() - for(var/mob/playerMob in player_list) + for(var/mob/playerMob in GLOB.player_list) keys += playerMob.client var/client/selection = tgui_input_list(usr, "Please, select a player!", "Set CKey", sortKey(keys)) if(!selection || !istype(selection)) diff --git a/code/modules/admin/modify_robot.dm b/code/modules/admin/modify_robot.dm index 2e974ebaa89..b4caaac20af 100644 --- a/code/modules/admin/modify_robot.dm +++ b/code/modules/admin/modify_robot.dm @@ -1,4 +1,4 @@ -/client/proc/modify_robot(var/mob/living/silicon/robot/target in silicon_mob_list) +/client/proc/modify_robot(var/mob/living/silicon/robot/target in GLOB.silicon_mob_list) set name = "Modify Robot" set desc = "Allows to add or remove modules to/from robots." set category = "Admin.Silicon" @@ -63,7 +63,7 @@ .["target"]["crisis_override"] = target.crisis_override .["target"]["active_restrictions"] = target.restrict_modules_to var/list/possible_restrictions = list() - for(var/entry in robot_modules) + for(var/entry in GLOB.robot_modules) if(!target.restrict_modules_to.Find(entry)) possible_restrictions += entry .["target"]["possible_restrictions"] = possible_restrictions @@ -74,7 +74,7 @@ .["target"]["sprite_size"] = spritesheet.icon_size_id(.["target"]["sprite"] + "S") .["target"]["modules"] = get_target_items(user) var/list/module_options = list() - for(var/module in robot_modules) + for(var/module in GLOB.robot_modules) module_options += module .["model_options"] = module_options // Data for the upgrade options @@ -122,7 +122,7 @@ if(source) .["source"] += get_module_source(user, spritesheet) var/list/all_robots = list() - for(var/mob/living/silicon/robot/R in silicon_mob_list) + for(var/mob/living/silicon/robot/R in GLOB.silicon_mob_list) if(!R.loc) continue all_robots += list(list("displayText" = "[R]", "value" = "\ref[R]")) @@ -190,7 +190,7 @@ if("select_source") if(source) qdel(source) - var/module_type = robot_modules[params["new_source"]] + var/module_type = GLOB.robot_modules[params["new_source"]] if(ispath(module_type, /obj/item/robot_module/robot/syndicate)) source = new /mob/living/silicon/robot/syndicate(null) else @@ -282,7 +282,7 @@ return FALSE var/mod_type = source.modtype qdel(source.module) - var/module_type = robot_modules[target.modtype] + var/module_type = GLOB.robot_modules[target.modtype] source.modtype = target.modtype new module_type(source) source.sprite_datum = target.sprite_datum @@ -293,7 +293,7 @@ target.hud_used?.update_robot_modules_display(TRUE) qdel(target.module) target.modtype = mod_type - module_type = robot_modules[mod_type] + module_type = GLOB.robot_modules[mod_type] target.transform_with_anim() new module_type(target) target.hands.icon_state = target.get_hud_module_icon() diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index ea882bb755f..2646180176c 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -1,4 +1,4 @@ -/client/proc/player_effects(var/mob/target in mob_list) +/client/proc/player_effects(var/mob/target in GLOB.mob_list) set name = "Player Effects" set desc = "Modify a player character with various 'special treatments' from a list." set category = "Fun.Event Kit" @@ -690,7 +690,7 @@ if(where == "To Me") user.client.Getmob(target) if(where == "To Mob") - var/mob/selection = tgui_input_list(ui.user, "Select a mob to jump [target] to:", "Jump to mob", mob_list) + var/mob/selection = tgui_input_list(ui.user, "Select a mob to jump [target] to:", "Jump to mob", GLOB.mob_list) target.on_mob_jump() target.forceMove(get_turf(selection)) log_admin("[key_name(user)] jumped [target] to [selection]") diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 6fd7cc9716f..b10ea3ada60 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -216,7 +216,7 @@ "} - var/list/mobs = sortmobs() + var/list/mobs = sort_mobs() var/i = 1 for(var/mob/M in mobs) if(M.ckey) @@ -331,7 +331,7 @@ dat += "
" + span_bold("") //add to this if wanting to add back in IP checking //add if you want to know their ip to the lists below - var/list/mobs = sortmobs() + var/list/mobs = sort_mobs() for(var/mob/M in mobs) if(!M.ckey) continue diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index acf8f87cc44..370e24a4c58 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -105,7 +105,7 @@ var/mob/playermob - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.ckey == banckey) playermob = M break @@ -198,7 +198,7 @@ href_list["secretsadmin"] = "check_antagonist" else if(href_list["delay_round_end"]) - if(!check_rights(R_SERVER)) return //VOREStation Edit + if(!check_rights(R_SERVER)) return ticker.delay_end = !ticker.delay_end log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].") @@ -460,7 +460,6 @@ jobs += "
NameReal NameAssigned JobKeyOptionsPMTraitor?
IP:(IP: [M.lastKnownIP])
" - //VOREStation Edit Start //Exploration (Purple) counter = 0 jobs += "" @@ -505,7 +504,6 @@ jobs += "
" - //VOREstation Edit End //Civilian (Grey) counter = 0 jobs += "" @@ -660,7 +658,6 @@ var/datum/job/temp = job_master.GetJob(jobPos) if(!temp) continue joblist += temp.title - //VOREStation Edit Start if("explorationdept") for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_PLANET)) if(!jobPos) continue @@ -674,7 +671,6 @@ var/datum/job/temp = job_master.GetJob(jobPos) if(!temp) continue joblist += temp.title - //VOREStation Edit End if("civiliandept") for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN)) if(!jobPos) continue @@ -805,7 +801,7 @@ log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.") message_admins(span_blue("[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'."), 1) //M.client = null - admin_action_message(usr.key, M.key, "kicked", reason, 0) //VOREStation Add + admin_action_message(usr.key, M.key, "kicked", reason, 0) qdel(M.client) else if(href_list["removejobban"]) @@ -1251,7 +1247,7 @@ SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/show_player_panel, M) else if(href_list["adminplayerobservejump"]) - if(!check_rights(R_MOD|R_ADMIN|R_SERVER)) return //VOREStation Edit + if(!check_rights(R_MOD|R_ADMIN|R_SERVER)) return var/mob/M = locate(href_list["adminplayerobservejump"]) @@ -1261,7 +1257,7 @@ C.do_jumptomob(M) else if(href_list["adminplayerobservefollow"]) - if(!check_rights(R_MOD|R_ADMIN|R_SERVER)) //VOREStation Edit + if(!check_rights(R_MOD|R_ADMIN|R_SERVER)) return var/mob/M = locate(href_list["adminplayerobservefollow"]) @@ -1284,7 +1280,6 @@ if(check_rights_for(X, (R_ADMIN|R_MOD|R_SERVER))) to_chat(X, take_msg) to_chat(M, span_filter_pm(span_boldnotice("Your adminhelp is being attended to by [usr.client]. Thanks for your patience!"))) - // VoreStation Edit Start if (CONFIG_GET(string/chat_webhook_url)) spawn(0) var/query_string = "type=admintake" @@ -1292,12 +1287,11 @@ query_string += "&admin=[url_encode(key_name(usr.client))]" query_string += "&user=[url_encode(key_name(M))]" world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") - // VoreStation Edit End else to_chat(usr, span_warning("Unable to locate mob.")) else if(href_list["adminplayerobservecoodjump"]) - if(!check_rights(R_ADMIN|R_SERVER|R_MOD)) return //VOREStation Edit + if(!check_rights(R_ADMIN|R_SERVER|R_MOD)) return var/x = text2num(href_list["X"]) var/y = text2num(href_list["Y"]) @@ -1942,7 +1936,7 @@ vsc.SetDefault(usr) else if(href_list["toglang"]) - if(check_rights(R_SPAWN)) //VOREStation Edit + if(check_rights(R_SPAWN)) var/mob/M = locate(href_list["toglang"]) if(!istype(M)) to_chat(usr, span_filter_adminlog("[M] is illegal type, must be /mob!")) @@ -1962,7 +1956,7 @@ else if(href_list["cryoplayer"]) if(!check_rights(R_ADMIN|R_EVENT)) return - var/mob/living/carbon/M = locate(href_list["cryoplayer"]) //VOREStation edit from just an all mob check to mob/living/carbon + var/mob/living/carbon/M = locate(href_list["cryoplayer"]) if(!istype(M)) to_chat(usr, span_warning("Mob doesn't exist!")) return diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index b41d6c1cc06..afc18451cb7 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -118,8 +118,8 @@ The 4 queries you can do are: "IN" (or "FROM", that works too but it's kinda weird to read), is the list of objects to work on. This defaults to world if not provided. -But doing something like "IN living_mob_list" is quite handy and can optimize your query. -All names inside the IN block are global scope, so you can do living_mob_list (a global var) easily. +But doing something like "IN GLOB.living_mob_list" is quite handy and can optimize your query. +All names inside the IN block are global scope, so you can do GLOB.living_mob_list (a global var) easily. You can also run it on a single object. Because SDQL is that convenient even for single operations. filters out objects of, well, that type easily. "*" is a wildcard and just takes everything in @@ -129,7 +129,7 @@ And then there's the MAP/WHERE chain. These operate on each individual object being ran through the query. They're both expressions like IN, but unlike it the expression is scoped *on the object*. So if you do "WHERE z == 4", this does "src.z", effectively. -If you want to access global variables, you can do `global.living_mob_list`. +If you want to access global variables, you can do `GLOB.living_mob_list`. Same goes for procs. MAP "changes" the object into the result of the expression. diff --git a/code/modules/admin/verbs/adminfun.dm b/code/modules/admin/verbs/adminfun.dm index a4853fac53b..70235fb6293 100644 --- a/code/modules/admin/verbs/adminfun.dm +++ b/code/modules/admin/verbs/adminfun.dm @@ -42,7 +42,7 @@ ADMIN_VERB(admin_emp, R_ADMIN|R_FUN, "EM Pulse", ADMIN_VERB_NO_DESCRIPTION, ADMI message_admins("[key_name_admin(user)] created an EM PUlse ([heavy],[med],[light],[long]) at ([orignator.x],[orignator.y],[orignator.z])", 1) feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -ADMIN_VERB_AND_CONTEXT_MENU(gib_them, (R_ADMIN|R_FUN), "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/victim in mob_list) +ADMIN_VERB_AND_CONTEXT_MENU(gib_them, (R_ADMIN|R_FUN), "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/victim in GLOB.mob_list) var/confirm = tgui_alert(user, "You sure?", "Confirm", list("Yes", "No")) if(confirm != "Yes") return diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 576619441ad..b6dfcb61875 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -47,10 +47,10 @@ return /// Verb wrapper around do_jumptomob() -/client/proc/jumptomob(mob as null|anything in mob_list) +/client/proc/jumptomob(mob as null|anything in GLOB.mob_list) set category = "Admin.Game" set name = "Jump to Mob" - set popup_menu = FALSE //VOREStation Edit - Declutter. + set popup_menu = FALSE if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) return @@ -64,7 +64,7 @@ return if(!M) - M = tgui_input_list(usr, "Pick a mob:", "Jump to Mob", mob_list) + M = tgui_input_list(usr, "Pick a mob:", "Jump to Mob", GLOB.mob_list) if(!M) return @@ -110,7 +110,7 @@ if(CONFIG_GET(flag/allow_admin_jump)) var/list/keys = list() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) keys += M.client var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys)) if(!selection) @@ -124,17 +124,17 @@ else tgui_alert_async(usr, "Admin jumping disabled") -/client/proc/Getmob(mob/living/M as null|anything in mob_list) //VOREStation Edit +/client/proc/Getmob(mob/living/M as null|anything in GLOB.mob_list) set category = "Admin.Game" set name = "Get Mob" set desc = "Mob to teleport" - set popup_menu = TRUE //VOREStation Edit + set popup_menu = TRUE if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) return if(CONFIG_GET(flag/allow_admin_jump)) - if(!M) //VOREStation Edit - M = tgui_input_list(usr, "Pick a mob:", "Get Mob", mob_list) //VOREStation Edit + if(!M) + M = tgui_input_list(usr, "Pick a mob:", "Get Mob", GLOB.mob_list) if(!M) return log_admin("[key_name(usr)] jumped [key_name(M)] to them") @@ -157,7 +157,7 @@ if(CONFIG_GET(flag/allow_admin_jump)) var/list/keys = list() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) keys += M.client var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys)) if(!selection) @@ -187,7 +187,7 @@ var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas()) if(!A) return - var/mob/M = tgui_input_list(usr, "Pick a mob:", "Send Mob", mob_list) + var/mob/M = tgui_input_list(usr, "Pick a mob:", "Send Mob", GLOB.mob_list) if(!M) return M.on_mob_jump() diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 9045936d8b3..bd628f16592 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -2,7 +2,7 @@ //allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm -/client/proc/cmd_admin_pm_context(mob/M in mob_list) +/client/proc/cmd_admin_pm_context(mob/M in GLOB.mob_list) set category = null set name = "Admin PM Mob" if(!check_rights(R_ADMIN)) diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm index 792bbb650b3..89cb037d174 100644 --- a/code/modules/admin/verbs/antag-ooc.dm +++ b/code/modules/admin/verbs/antag-ooc.dm @@ -29,7 +29,7 @@ // Name shown to other players. Admins whom are not also antags have their rank displayed. var/player_display = (is_admin && !is_antag) ? "[display_name]([usr.client.holder.rank_names()])" : display_name - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if(check_rights_for(M.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details. to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] [get_options_bar(src, 0, 1, 1)]([admin_jump_link(usr, check_rights_for(M.client, R_HOLDER))]): " + span_message("[msg]")))) else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC. diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index bd570b5a585..07e10468a78 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -13,7 +13,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) -/proc/togglebuildmode(mob/M as mob in player_list) +/proc/togglebuildmode(mob/M as mob in GLOB.player_list) set name = "Toggle Build Mode" set category = "Special Verbs" if(M.client) @@ -292,7 +292,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) if("number") master.buildmode.valueholder = tgui_input_number(usr,"Enter variable value:" ,"Value", 123) if("mob-reference") - master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", mob_list) + master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", GLOB.mob_list) if("obj-reference") master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world) if("turf-reference") @@ -706,7 +706,7 @@ GLOBAL_LIST_EMPTY(active_buildmode_holders) var/z = c1.z //Eh var/i = 0 - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) if(L.z != z || L.client) continue if(L.x >= low_x && L.x <= hi_x && L.y >= low_y && L.y <= hi_y) diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm index 2e191cc1a39..4569cf74792 100644 --- a/code/modules/admin/verbs/change_appearance.dm +++ b/code/modules/admin/verbs/change_appearance.dm @@ -5,7 +5,7 @@ if(!check_rights(R_FUN)) return - var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Admin", human_mob_list) + var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Admin", GLOB.human_mob_list) if(!H) return log_and_message_admins("is altering the appearance of [H].") @@ -19,7 +19,7 @@ if(!check_rights(R_FUN)) return - var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", human_mob_list) + var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", GLOB.human_mob_list) if(!H) return if(!H.client) @@ -41,7 +41,7 @@ if(!check_rights(R_FUN)) return - var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", human_mob_list) + var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", GLOB.human_mob_list) if(!ishuman(M)) to_chat(usr, span_warning("You can only do this to humans!")) @@ -80,12 +80,12 @@ M.s_tone = -M.s_tone + 35 // hair - var/new_hstyle = tgui_input_list(usr, "Select a hair style", "Grooming", hair_styles_list) + var/new_hstyle = tgui_input_list(usr, "Select a hair style", "Grooming", GLOB.hair_styles_list) if(new_hstyle) M.h_style = new_hstyle // facial hair - var/new_fstyle = tgui_input_list(usr, "Select a facial hair style", "Grooming", facial_hair_styles_list) + var/new_fstyle = tgui_input_list(usr, "Select a facial hair style", "Grooming", GLOB.facial_hair_styles_list) if(new_fstyle) M.f_style = new_fstyle diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index c67c40b6c6c..9e8f4b211a1 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -93,7 +93,7 @@ usr.show_message(t, 1) feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_robotize(var/mob/M in mob_list) +/client/proc/cmd_admin_robotize(var/mob/M in GLOB.mob_list) set category = "Fun.Event Kit" set name = "Make Robot" @@ -108,7 +108,7 @@ else tgui_alert_async(usr, "Invalid mob") -/client/proc/cmd_admin_animalize(var/mob/M in mob_list) +/client/proc/cmd_admin_animalize(var/mob/M in GLOB.mob_list) set category = "Fun.Event Kit" set name = "Make Simple Animal" @@ -138,7 +138,7 @@ var/turf/T = get_turf(mob) var/list/available = list() - for(var/mob/C in mob_list) + for(var/mob/C in GLOB.mob_list) if(C.key && isobserver(C)) available.Add(C) var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", available) @@ -160,7 +160,7 @@ log_admin("made a pAI with key=[pai.key] at ([T.x],[T.y],[T.z])") feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_alienize(var/mob/M in mob_list) +/client/proc/cmd_admin_alienize(var/mob/M in GLOB.mob_list) set category = "Fun.Event Kit" set name = "Make Alien" @@ -273,7 +273,7 @@ else . = lines.Join("\n") -/client/proc/cmd_admin_grantfullaccess(var/mob/M in mob_list) +/client/proc/cmd_admin_grantfullaccess(var/mob/M in GLOB.mob_list) set category = "Admin.Events" set name = "Grant Full Access" @@ -587,15 +587,15 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct switch(tgui_input_list(usr, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))) if("Players") - to_chat(usr, span_filter_debuglogs(jointext(player_list,","))) + to_chat(usr, span_filter_debuglogs(jointext(GLOB.player_list,","))) if("Admins") to_chat(usr, span_filter_debuglogs(jointext(GLOB.admins,","))) if("Mobs") - to_chat(usr, span_filter_debuglogs(jointext(mob_list,","))) + to_chat(usr, span_filter_debuglogs(jointext(GLOB.mob_list,","))) if("Living Mobs") - to_chat(usr, span_filter_debuglogs(jointext(living_mob_list,","))) + to_chat(usr, span_filter_debuglogs(jointext(GLOB.living_mob_list,","))) if("Dead Mobs") - to_chat(usr, span_filter_debuglogs(jointext(dead_mob_list,","))) + to_chat(usr, span_filter_debuglogs(jointext(GLOB.dead_mob_list,","))) if("Clients") to_chat(usr, span_filter_debuglogs(jointext(GLOB.clients,","))) @@ -739,7 +739,7 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct ADMIN_VERB(quick_nif, R_ADMIN, "Quick NIF", "Spawns a NIF into someone in quick-implant mode.", "Fun.Add Nif") var/input_NIF - var/mob/living/carbon/human/H = tgui_input_list(user, "Pick a mob with a player","Quick NIF", player_list) + var/mob/living/carbon/human/H = tgui_input_list(user, "Pick a mob with a player","Quick NIF", GLOB.player_list) if(!H) return diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index f8be0fb79aa..44f369422d4 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -50,7 +50,7 @@ var/largest_click_time = 0 var/mob/largest_move_mob = null var/mob/largest_click_mob = null - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if(!M.client) continue if(M.next_move >= largest_move_time) diff --git a/code/modules/admin/verbs/event_triggers.dm b/code/modules/admin/verbs/event_triggers.dm index 402d5dc0e9d..6aad83c53c3 100644 --- a/code/modules/admin/verbs/event_triggers.dm +++ b/code/modules/admin/verbs/event_triggers.dm @@ -33,7 +33,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga AN.set_vars(src) if("Manage Personal Triggers") - var/personal_list = event_triggers[src.ckey] + var/personal_list = GLOB.event_triggers[src.ckey] if(!LAZYLEN(personal_list)) to_chat(src, span_notice("You don't have any landmarks to manage!")) return @@ -68,7 +68,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga qdel(ET) if("Manage Other's Triggers") var/other_ckey = sanitize(tgui_input_text(src, "input trigger owner's ckey", "CKEY", "")) - var/others_list = event_triggers[other_ckey] + var/others_list = GLOB.event_triggers[other_ckey] if(!LAZYLEN(others_list)) to_chat(src, span_notice("[other_ckey] doesn't have any landmarks to manage!")) return diff --git a/code/modules/admin/verbs/get_player_status.dm b/code/modules/admin/verbs/get_player_status.dm index 76d9a414fdd..337e5445572 100644 --- a/code/modules/admin/verbs/get_player_status.dm +++ b/code/modules/admin/verbs/get_player_status.dm @@ -10,7 +10,7 @@ if(!check_rights(R_FUN)) return - var/player_list_local = player_list //Copying player list so we don't touch a global var all the time + var/player_list_local = GLOB.player_list //Copying player list so we don't touch a global var all the time var/list/area_list = list() //An associative list, where key is area name, value is a list of mob references var/inactives = 0 var/players = 0 diff --git a/code/modules/admin/verbs/lightning_strike.dm b/code/modules/admin/verbs/lightning_strike.dm index 037052a1499..29982144f4f 100644 --- a/code/modules/admin/verbs/lightning_strike.dm +++ b/code/modules/admin/verbs/lightning_strike.dm @@ -63,7 +63,7 @@ // And for those far away. If the strike happens on a planet, everyone on the planet will hear it. // Otherwise only those on the current z-level will hear it. var/sound = get_sfx("thunder") - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if( (P && (M.z in P.expected_z_levels)) || M.z == T.z) if(M.check_sound_preference(/datum/preference/toggle/weather_sounds)) M.playsound_local(get_turf(M), soundin = sound, vol = 70, vary = FALSE, is_global = TRUE) diff --git a/code/modules/admin/verbs/list_exposer.dm b/code/modules/admin/verbs/list_exposer.dm index 81376d16eb2..44f7e8d1072 100644 --- a/code/modules/admin/verbs/list_exposer.dm +++ b/code/modules/admin/verbs/list_exposer.dm @@ -33,7 +33,7 @@ /datum/admins/proc/list_dna() var/data = "Showing DNA from blood.
" data += "
" - for(var/entry in mob_list) + for(var/entry in GLOB.mob_list) var/mob/living/carbon/human/subject = entry if(subject.ckey) data += "" @@ -46,7 +46,7 @@ /datum/admins/proc/list_fingerprints() //kid named fingerprints var/data = "Showing Fingerprints.
" data += "
NameDNABlood Type
[subject][subject.dna?.unique_enzymes][subject.dna ? subject.dna.b_type : DEFAULT_BLOOD_TYPE]
" - for(var/entry in mob_list) + for(var/entry in GLOB.mob_list) var/mob/living/carbon/human/subject = entry if(subject.ckey) data += "" @@ -71,7 +71,7 @@ /datum/admins/proc/output_ai_laws() var/ai_number = 0 - for(var/mob/living/silicon/S in mob_list) + for(var/mob/living/silicon/S in GLOB.mob_list) ai_number++ if(isAI(S)) to_chat(usr, span_bold("AI [key_name(S, usr)]'s laws:")) diff --git a/code/modules/admin/verbs/modify_robot.dm b/code/modules/admin/verbs/modify_robot.dm index d24770697dc..46d221675c8 100644 --- a/code/modules/admin/verbs/modify_robot.dm +++ b/code/modules/admin/verbs/modify_robot.dm @@ -1,5 +1,5 @@ //Allows to add and remove modules from borgs -/client/proc/modify_robot(var/mob/living/silicon/robot/target in silicon_mob_list) +/client/proc/modify_robot(var/mob/living/silicon/robot/target in GLOB.silicon_mob_list) set name = "Modify Robot Module" set desc = "Allows to add or remove modules to/from robots." set category = "Admin.Silicon" diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 36b940d255a..7dcd38bb86f 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -41,7 +41,7 @@ var/list/sounds_cache = list() log_admin("[key_name(src)] played sound [S]") message_admins("[key_name_admin(src)] played sound [S]", 1) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.read_preference(/datum/preference/toggle/play_admin_midis)) admin_sound.volume = vol * M.client.admin_music_volume SEND_SOUND(M, admin_sound) @@ -67,7 +67,7 @@ var/list/sounds_cache = list() return if(!M) - M = tgui_input_list(usr, "Choose a mob to play the sound to. Only they will hear it.", "Play Mob Sound", sortNames(player_list)) + M = tgui_input_list(usr, "Choose a mob to play the sound to. Only they will hear it.", "Play Mob Sound", sortNames(GLOB.player_list)) if(!M || QDELETED(M)) return log_admin("[key_name(src)] played a direct mob sound [S] to [M].") @@ -90,7 +90,7 @@ var/list/sounds_cache = list() log_admin("[key_name(src)] played sound [S] on Z[target_z]") message_admins("[key_name_admin(src)] played sound [S] on Z[target_z]", 1) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.read_preference(/datum/preference/toggle/play_admin_midis) && M.z == target_z) M << uploaded_sound @@ -201,7 +201,7 @@ var/list/sounds_cache = list() return if(web_sound_url || stop_web_sounds) - for(var/m in player_list) + for(var/m in GLOB.player_list) var/mob/M = m var/client/C = M.client if(C.prefs?.read_preference(/datum/preference/toggle/play_admin_midis)) @@ -250,7 +250,7 @@ var/list/sounds_cache = list() log_admin("[key_name(src)] stopped all currently playing sounds.") message_admins("[key_name_admin(src)] stopped all currently playing sounds.") - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) SEND_SOUND(M, sound(null)) var/client/C = M.client C?.tgui_panel?.stop_music() @@ -269,12 +269,12 @@ var/list/sounds_cache = list() set name = "Cuban Pete Time" message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) if(M.client.midis) M << 'cubanpetetime.ogg' - for(var/mob/living/carbon/human/CP in human_mob_list) + for(var/mob/living/carbon/human/CP in GLOB.human_mob_list) if(CP.real_name=="Cuban Pete" && CP.key!="Rosham") to_chat(CP, "Your body can't contain the rhumba beat") CP.gib() @@ -285,7 +285,7 @@ var/list/sounds_cache = list() set name = "Banana Phone" message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) if(M.client.midis) M << 'bananaphone.ogg' @@ -296,7 +296,7 @@ var/list/sounds_cache = list() set name = "Space Asshole" message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) if(M.client.midis) M << 'sound/music/space_asshole.ogg' @@ -307,7 +307,7 @@ var/list/sounds_cache = list() set name = "Honk" message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client) if(M.client.midis) M << 'honk_theme.ogg'*/ diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 5a62fb7dcb5..c5667223bc9 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1,6 +1,6 @@ GLOBAL_VAR_INIT(global_vantag_hud, 0) -ADMIN_VERB_AND_CONTEXT_MENU(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/living/dropee in mob_list) +ADMIN_VERB_AND_CONTEXT_MENU(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/living/dropee in GLOB.mob_list) var/confirm = tgui_alert(src, "Make [dropee] drop everything?", "Message", list("Yes", "No")) if(confirm != "Yes") return @@ -17,7 +17,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(drop_everything, R_ADMIN, "Drop Everything", ADMIN_V message_admins(msg) feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_prison(mob/M as mob in mob_list) +/client/proc/cmd_admin_prison(mob/M as mob in GLOB.mob_list) set category = "Admin.Game" set name = "Prison" if(!check_rights_for(src, R_HOLDER)) @@ -81,7 +81,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(drop_everything, R_ADMIN, "Drop Everything", ADMIN_V else to_chat(src, "No matches for that age range found.") -/client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list) +/client/proc/cmd_admin_subtle_message(mob/M as mob in GLOB.mob_list) set category = "Admin" set name = "Subtle Message" @@ -156,7 +156,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(drop_everything, R_ADMIN, "Drop Everything", ADMIN_V admin_ticket_log(M, msg) feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_godmode(mob/M as mob in mob_list) +/client/proc/cmd_admin_godmode(mob/M as mob in GLOB.mob_list) set category = "Admin.Game" set name = "Godmode" @@ -258,17 +258,13 @@ Ccomp's first proc. var/list/mobs = list() var/list/ghosts = list() - var/list/sortmob = sortAtom(mob_list) // get the mob list. - var/any=0 - for(var/mob/observer/dead/M in sortmob) - mobs.Add(M) //filter it where it's only ghosts - any = 1 //if no ghosts show up, any will just be 0 - if(!any) + if(!LAZYLEN(GLOB.observer_mob_list)) if(notify) to_chat(src, "There doesn't appear to be any ghosts for you to select.") return + var/list/sortmob = sort_names(GLOB.observer_mob_list) // get the mob list. - for(var/mob/M in mobs) + for(var/mob/M in sortmob) var/name = M.name ghosts[name] = M //get the name of the mob for the popup list if(what==1) @@ -440,7 +436,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp //Well you're not reloading their job or they never had one. if(!charjob) - var/pickjob = tgui_input_list(src,"Pick a job to assign them (or none).","Job Select", joblist + "-No Job-", "-No Job-") + var/pickjob = tgui_input_list(src,"Pick a job to assign them (or none).","Job Select", GLOB.joblist + "-No Job-", "-No Job-") if(!pickjob) return if(pickjob != "-No Job-") @@ -619,14 +615,14 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp var/input = sanitize(tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "")) if(!input) return - for(var/mob/living/silicon/ai/M in mob_list) + for(var/mob/living/silicon/ai/M in GLOB.mob_list) if (M.stat == 2) to_chat(usr, "Upload failed. No signal is being detected from the AI.") else if (M.see_in_dark == 0) to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.") else M.add_ion_law(input) - for(var/mob/living/silicon/ai/O in mob_list) + for(var/mob/living/silicon/ai/O in GLOB.mob_list) to_chat(O,input + span_red("... LAWS UPDATED!")) O.show_laws() @@ -638,7 +634,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list) +/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in GLOB.mob_list) set category = "Admin.Game" set name = "Rejuvenate" @@ -723,7 +719,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp switch(tgui_alert(usr, "How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel")) if("Key List") var/list/keys = list() - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) keys += M.client var/selection = tgui_input_list(usr, "Please, select a player!", "Admin Jumping", keys) if(!selection) @@ -774,7 +770,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp // I will both remove their SVN access and permanently ban them from my servers. return -/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list) +/client/proc/cmd_admin_check_contents(mob/living/M as mob in GLOB.mob_list) set category = "Admin.Investigate" set name = "Check Contents" set popup_menu = FALSE @@ -902,7 +898,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.") message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.") -/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list) +/client/proc/cmd_admin_attack_log(mob/M as mob in GLOB.mob_list) set category = "Admin.Logs" set name = "Attack Log" @@ -963,7 +959,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1) feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/despawn_player(var/mob/M in living_mob_list) +/client/proc/despawn_player(var/mob/M in GLOB.living_mob_list) set name = "Cryo Player" set category = "Admin.Game" set desc = "Removes a player from the round as if they'd cryo'd." @@ -1075,7 +1071,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp if(!check_rights(R_SPAWN)) return - var/mob/living/L = tgui_input_list(usr, "Select the mob to drop:", "Mob Picker", living_mob_list) + var/mob/living/L = tgui_input_list(usr, "Select the mob to drop:", "Mob Picker", GLOB.living_mob_list) if(!L) return @@ -1102,7 +1098,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp GLOB.global_vantag_hud = !GLOB.global_vantag_hud if(GLOB.global_vantag_hud) - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) if(L.ckey) L.vantag_hud = TRUE L.recalculate_vis() diff --git a/code/modules/admin/verbs/randomverbs_vr.dm b/code/modules/admin/verbs/randomverbs_vr.dm index 62dfe63d6ee..682b44e74d2 100644 --- a/code/modules/admin/verbs/randomverbs_vr.dm +++ b/code/modules/admin/verbs/randomverbs_vr.dm @@ -100,7 +100,7 @@ ADMIN_VERB(cmd_admin_z_narrate, (R_ADMIN|R_MOD|R_EVENT), "Z Narrate", "Narrates var/pos_z = get_z(user.mob) if (!pos_z) return - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.z == pos_z) to_chat(M, msg) log_admin("ZNarrate: [key_name(user)] : [msg]") diff --git a/code/modules/admin/verbs/resize.dm b/code/modules/admin/verbs/resize.dm index 0de6721f8d9..06f66faafd6 100644 --- a/code/modules/admin/verbs/resize.dm +++ b/code/modules/admin/verbs/resize.dm @@ -1,9 +1,9 @@ -ADMIN_VERB_AND_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", "Resizes any living mob without any restrictions on size.", "Fun.Event Kit", mob/living/L in mob_list) +ADMIN_VERB_AND_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", "Resizes any living mob without any restrictions on size.", "Fun.Event Kit", mob/living/L in GLOB.mob_list) var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1, round_value=FALSE) if(!size_multiplier) return //cancelled - size_multiplier = clamp(size_multiplier, -50, 50) //VOREStation Edit - being able to make people upside down is fun. Also 1000 is way, WAY too big. Honestly 50 is too big but at least you can see 50 and it doesn't break the rendering. + size_multiplier = clamp(size_multiplier, -50, 50) //being able to make people upside down is fun. Also 1000 is way, WAY too big. Honestly 50 is too big but at least you can see 50 and it doesn't break the rendering. var/can_be_big = L.has_large_resize_bounds() var/very_big = is_extreme_size(size_multiplier) diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 4aa89f0b13f..329c89f1bfb 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -108,7 +108,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before holder.holder.list_fingerprints() if("prison_warp") - for(var/mob/living/carbon/human/H in mob_list) + for(var/mob/living/carbon/human/H in GLOB.mob_list) var/turf/T = get_turf(H) var/security = 0 if((T in using_map.admin_levels) || GLOB.prisonwarped.Find(H)) @@ -244,7 +244,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before if("ghost_mode") var/list/affected_mobs = list() var/list/affected_areas = list() - for(var/mob/M in living_mob_list) + for(var/mob/M in GLOB.living_mob_list) if(M.stat == CONSCIOUS && !(M in affected_mobs)) affected_mobs |= M switch(rand(1,4)) @@ -409,7 +409,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before //buttons that are fun for exactly you and nobody else. if("corgie") - for(var/mob/living/carbon/human/H in mob_list) + for(var/mob/living/carbon/human/H in GLOB.mob_list) spawn(0) H.corgize() @@ -419,7 +419,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before //SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Monkeyize All Humans")) message_admins("[key_name_admin(holder)] made everyone into monkeys.") log_admin("[key_name_admin(holder)] made everyone into monkeys.") - for(var/i in mob_list) + for(var/i in GLOB.mob_list) var/mob/living/carbon/human/H = i INVOKE_ASYNC(H, TYPE_PROC_REF(/mob/living/carbon/human, monkeyize)) diff --git a/code/modules/admin/verbs/smite.dm b/code/modules/admin/verbs/smite.dm index ff81e000712..8fb9913069e 100644 --- a/code/modules/admin/verbs/smite.dm +++ b/code/modules/admin/verbs/smite.dm @@ -1,4 +1,4 @@ -/client/proc/smite(var/mob/living/carbon/human/target in player_list) +/client/proc/smite(var/mob/living/carbon/human/target in GLOB.player_list) set name = "Smite" set desc = "Abuse a player with various 'special treatments' from a list." set category = "Fun.Do Not" diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index 5b59187a564..efb51cc7048 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -19,7 +19,7 @@ //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). if(href_list["rename"]) - var/mob/M = locate(href_list["rename"]) in mob_list + var/mob/M = locate(href_list["rename"]) in GLOB.mob_list if(!istype(M)) to_chat(usr, "This can only be used on instances of type /mob", confidential = TRUE) return @@ -56,7 +56,7 @@ else if(href_list["adjustDamage"] && href_list["mobToDamage"]) - var/mob/living/L = locate(href_list["mobToDamage"]) in mob_list + var/mob/living/L = locate(href_list["mobToDamage"]) in GLOB.mob_list if(!istype(L)) return diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index 4af1fe23a47..b182be332c7 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -177,7 +177,7 @@ types += text2path(typestring) typestring += "/" - var/list/searching = living_mob_list // Started/seeded with this + var/list/searching = GLOB.living_mob_list // Started/seeded with this var/list/choices = list() for(var/typechoice in types) var/list/found = list() diff --git a/code/modules/ai/ai_holder_cooperation.dm b/code/modules/ai/ai_holder_cooperation.dm index 5cc7c98172c..2d64506b5ac 100644 --- a/code/modules/ai/ai_holder_cooperation.dm +++ b/code/modules/ai/ai_holder_cooperation.dm @@ -33,7 +33,7 @@ // Find another AI-controlled mob in the same faction if possible. var/mob/living/first_friend - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) if(L.faction == holder.faction && L.ai_holder) first_friend = L break diff --git a/code/modules/asset_cache/assets/spritesheets/pipes.dm b/code/modules/asset_cache/assets/spritesheets/pipes.dm index 1fe26b1670d..051e44ce3fa 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.GLOB.alldirs) + InsertAll("", each, GLOB.alldirs) diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index 38e959158e6..1dc4bf6e8dc 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -48,7 +48,7 @@ template.load_new_z() to_world_log("away mission loaded: [map]") /* VOREStation Removal - We do this in the special landmark init instead. - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if (L.name != "awaystart") continue awaydestinations.Add(L) diff --git a/code/modules/blob2/overmind/types/explosive_lattice.dm b/code/modules/blob2/overmind/types/explosive_lattice.dm index 3b572add0ab..ec8d425c9fc 100644 --- a/code/modules/blob2/overmind/types/explosive_lattice.dm +++ b/code/modules/blob2/overmind/types/explosive_lattice.dm @@ -43,7 +43,7 @@ // Now for sounds. playsound(T, "explosion", 75, 1) // Local sound. - for(var/mob/M in player_list) // For everyone else. + for(var/mob/M in GLOB.player_list) // For everyone else. if(M.z == T.z && get_dist(M, T) > world.view && !M.ear_deaf && !istype(M.loc,/turf/space)) M << 'sound/effects/explosionfar.ogg' diff --git a/code/modules/catalogue/cataloguer.dm b/code/modules/catalogue/cataloguer.dm index 818760bd469..9ac0397b976 100644 --- a/code/modules/catalogue/cataloguer.dm +++ b/code/modules/catalogue/cataloguer.dm @@ -150,7 +150,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers) // Figure out who may have helped out. var/list/contributers = list() var/list/contributer_names = list() - for(var/mob/living/L as anything in player_list) + for(var/mob/living/L as anything in GLOB.player_list) if(L == user) continue if(!istype(L)) diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 6be053ea024..064565f17d2 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -1,4 +1,3 @@ -var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-") // Not actually used; just forces this into the RSC for TGUI. var/const/preview_icons = 'icons/mob/human_races/preview.dmi' @@ -30,26 +29,26 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' // Grandfather in anyone loading paths from a save. if(ispath(ear_style, /datum/sprite_accessory)) - var/datum/sprite_accessory/instance = global.ear_styles_list[ear_style] + var/datum/sprite_accessory/instance = GLOB.ear_styles_list[ear_style] if(istype(instance)) ear_style = instance.name if(ispath(wing_style, /datum/sprite_accessory)) - var/datum/sprite_accessory/instance = global.wing_styles_list[wing_style] + var/datum/sprite_accessory/instance = GLOB.wing_styles_list[wing_style] if(istype(instance)) wing_style = instance.name if(ispath(tail_style, /datum/sprite_accessory)) - var/datum/sprite_accessory/instance = global.tail_styles_list[tail_style] + var/datum/sprite_accessory/instance = GLOB.tail_styles_list[tail_style] if(istype(instance)) tail_style = instance.name // Sanitize for non-existent keys. - if(ear_style && !(ear_style in get_available_styles(global.ear_styles_list))) + if(ear_style && !(ear_style in get_available_styles(GLOB.ear_styles_list))) ear_style = null - if(ear_secondary_style && !(ear_secondary_style in get_available_styles(global.ear_styles_list))) + if(ear_secondary_style && !(ear_secondary_style in get_available_styles(GLOB.ear_styles_list))) ear_secondary_style = null - if(wing_style && !(wing_style in get_available_styles(global.wing_styles_list))) + if(wing_style && !(wing_style in get_available_styles(GLOB.wing_styles_list))) wing_style = null - if(tail_style && !(tail_style in get_available_styles(global.tail_styles_list))) + if(tail_style && !(tail_style in get_available_styles(GLOB.tail_styles_list))) tail_style = null /datum/preferences/proc/get_available_styles(var/style_list) @@ -67,7 +66,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' .[instance.name] = instance /datum/preferences/proc/mass_edit_marking_list(var/marking, var/change_on = TRUE, var/change_color = TRUE, var/marking_value = null, var/on = TRUE, var/color = "#000000") - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[marking] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[marking] var/list/new_marking = marking_value||mark_datum.body_parts for (var/NM in new_marking) if (marking_value && !islist(new_marking[NM])) continue @@ -133,15 +132,15 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' if(!pref.species || !(pref.species in GLOB.playable_species)) pref.species = SPECIES_HUMAN pref.s_tone = sanitize_integer(pref.s_tone, -185, 34, initial(pref.s_tone)) - pref.h_style = sanitize_inlist(pref.h_style, hair_styles_list, initial(pref.h_style)) - pref.f_style = sanitize_inlist(pref.f_style, facial_hair_styles_list, initial(pref.f_style)) + pref.h_style = sanitize_inlist(pref.h_style, GLOB.hair_styles_list, initial(pref.h_style)) + pref.f_style = sanitize_inlist(pref.f_style, GLOB.facial_hair_styles_list, initial(pref.f_style)) pref.grad_style = sanitize_inlist(pref.grad_style, GLOB.hair_gradients, initial(pref.grad_style)) pref.b_type = sanitize_text(pref.b_type, initial(pref.b_type)) if(!pref.organ_data) pref.organ_data = list() if(!pref.rlimb_data || !islist(pref.rlimb_data)) pref.rlimb_data = list() if(!pref.body_markings) pref.body_markings = list() - else pref.body_markings &= body_marking_styles_list + else pref.body_markings &= GLOB.body_marking_styles_list for (var/M in pref.body_markings) if (!islist(pref.body_markings[M])) var/col = istext(pref.body_markings[M]) ? pref.body_markings[M] : "#000000" @@ -185,17 +184,17 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' character.digitigrade = 0 pref.digitigrade = 0 - var/list/ear_styles = pref.get_available_styles(global.ear_styles_list) + var/list/ear_styles = pref.get_available_styles(GLOB.ear_styles_list) character.ear_style = ear_styles[pref.ear_style] // apply secondary ears; sanitize again to prevent runtimes in rendering character.ear_secondary_style = ear_styles[pref.ear_secondary_style] character.ear_secondary_colors = SANITIZE_LIST(pref.ear_secondary_colors) - var/list/tail_styles = pref.get_available_styles(global.tail_styles_list) + var/list/tail_styles = pref.get_available_styles(GLOB.tail_styles_list) character.tail_style = tail_styles[pref.tail_style] - var/list/wing_styles = pref.get_available_styles(global.wing_styles_list) + var/list/wing_styles = pref.get_available_styles(GLOB.wing_styles_list) character.wing_style = wing_styles[pref.wing_style] character.set_gender(pref.biological_gender) @@ -246,7 +245,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' var/priority = 0 for(var/M in pref.body_markings) priority += 1 - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[M] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[M] for(var/BP in mark_datum.body_parts) var/obj/item/organ/external/O = character.organs_by_name[BP] @@ -350,28 +349,28 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["can_play"] = can_play_list var/list/available_hair_styles = list() - for(var/path in pref.get_available_styles(hair_styles_list)) + for(var/path in pref.get_available_styles(GLOB.hair_styles_list)) UNTYPED_LIST_ADD(available_hair_styles, path) data["available_hair_styles"] = available_hair_styles var/list/available_facial_styles = list() - for(var/path in pref.get_available_styles(facial_hair_styles_list)) + for(var/path in pref.get_available_styles(GLOB.facial_hair_styles_list)) UNTYPED_LIST_ADD(available_facial_styles, path) data["available_facial_styles"] = available_facial_styles // WARNING: Depends on adding "None" var/list/available_ear_styles = list("None") - for(var/path in pref.get_available_styles(ear_styles_list)) + for(var/path in pref.get_available_styles(GLOB.ear_styles_list)) UNTYPED_LIST_ADD(available_ear_styles, path) data["available_ear_styles"] = available_ear_styles var/list/available_tail_styles = list() - for(var/path in pref.get_available_styles(tail_styles_list)) + for(var/path in pref.get_available_styles(GLOB.tail_styles_list)) UNTYPED_LIST_ADD(available_tail_styles, path) data["available_tail_styles"] = available_tail_styles var/list/available_wing_styles = list() - for(var/path in pref.get_available_styles(wing_styles_list)) + for(var/path in pref.get_available_styles(GLOB.wing_styles_list)) UNTYPED_LIST_ADD(available_wing_styles, path) data["available_wing_styles"] = available_wing_styles @@ -398,8 +397,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["species"] = species_list var/list/hair_styles = list() - for(var/path in hair_styles_list) - var/datum/sprite_accessory/hair/S = hair_styles_list[path] + for(var/path in GLOB.hair_styles_list) + var/datum/sprite_accessory/hair/S = GLOB.hair_styles_list[path] hair_styles[path] = list( "name" = S.name, "icon" = REF(S.icon), @@ -409,8 +408,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["hair_styles"] = hair_styles var/list/facial_styles = list() - for(var/path in facial_hair_styles_list) - var/datum/sprite_accessory/facial_hair/S = facial_hair_styles_list[path] + for(var/path in GLOB.facial_hair_styles_list) + var/datum/sprite_accessory/facial_hair/S = GLOB.facial_hair_styles_list[path] facial_styles[path] = list( "name" = S.name, "icon" = REF(S.icon), @@ -430,8 +429,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["grad_styles"] = grad_styles var/list/ear_styles = list() - for(var/path in ear_styles_list) - var/datum/sprite_accessory/ears/S = ear_styles_list[path] + for(var/path in GLOB.ear_styles_list) + var/datum/sprite_accessory/ears/S = GLOB.ear_styles_list[path] ear_styles[S.name] = list( "name" = S.name, "type" = S.type, @@ -444,8 +443,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["ear_styles"] = ear_styles var/list/body_markings = list() - for(var/path in body_marking_styles_list) - var/datum/sprite_accessory/marking/S = body_marking_styles_list[path] + for(var/path in GLOB.body_marking_styles_list) + var/datum/sprite_accessory/marking/S = GLOB.body_marking_styles_list[path] var/icon_state = S.icon_state if(LAZYLEN(S.body_parts)) @@ -461,8 +460,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["body_markings"] = body_markings var/list/tail_styles = list() - for(var/path in tail_styles_list) - var/datum/sprite_accessory/tail/S = tail_styles_list[path] + for(var/path in GLOB.tail_styles_list) + var/datum/sprite_accessory/tail/S = GLOB.tail_styles_list[path] tail_styles[S.name] = list( "name" = name, "icon" = REF(S.icon), @@ -474,8 +473,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' data["tail_styles"] = tail_styles var/list/wing_styles = list() - for(var/path in wing_styles_list) - var/datum/sprite_accessory/wing/S = wing_styles_list[path] + for(var/path in GLOB.wing_styles_list) + var/datum/sprite_accessory/wing/S = GLOB.wing_styles_list[path] wing_styles[S.name] = list( "name" = S.name, "icon" = REF(S.icon), @@ -500,7 +499,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' /* Hair */ if("set_hair_style") var/new_h_style = params["hair_style"] - if(new_h_style in pref.get_available_styles(hair_styles_list)) + if(new_h_style in pref.get_available_styles(GLOB.hair_styles_list)) pref.h_style = new_h_style return TOPIC_REFRESH_UPDATE_PREVIEW if("set_hair_color") @@ -514,7 +513,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' /* Facial Hair */ if("set_facial_hair_style") var/new_f_style = params["facial_hair_style"] - if(new_f_style in pref.get_available_styles(facial_hair_styles_list)) + if(new_f_style in pref.get_available_styles(GLOB.facial_hair_styles_list)) pref.f_style = new_f_style return TOPIC_REFRESH_UPDATE_PREVIEW if("set_facial_hair_color") @@ -542,7 +541,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' /* Markings */ if("add_marking") - var/list/usable_markings = pref.body_markings.Copy() ^ body_marking_styles_list.Copy() + var/list/usable_markings = pref.body_markings.Copy() ^ GLOB.body_marking_styles_list.Copy() var/new_marking = params["new_marking"] if(new_marking && (new_marking in usable_markings)) pref.body_markings[new_marking] = pref.mass_edit_marking_list(new_marking) //New markings start black @@ -616,7 +615,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' if(new_ear_style == "None") pref.ear_style = null return TOPIC_REFRESH_UPDATE_PREVIEW - if(new_ear_style in pref.get_available_styles(global.ear_styles_list)) + if(new_ear_style in pref.get_available_styles(GLOB.ear_styles_list)) pref.ear_style = new_ear_style return TOPIC_REFRESH_UPDATE_PREVIEW if("set_ear_color") @@ -642,7 +641,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' if(new_ear_style == "None") pref.ear_secondary_style = null return TOPIC_REFRESH_UPDATE_PREVIEW - if(new_ear_style in pref.get_available_styles(ear_styles_list)) + if(new_ear_style in pref.get_available_styles(GLOB.ear_styles_list)) pref.ear_secondary_style = new_ear_style return TOPIC_REFRESH_UPDATE_PREVIEW if("set_ear_secondary_color") @@ -680,7 +679,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' /* Wings */ if("set_wing_style") var/new_style = params["style"] - if(new_style in pref.get_available_styles(global.wing_styles_list)) + if(new_style in pref.get_available_styles(GLOB.wing_styles_list)) pref.wing_style = new_style return TOPIC_REFRESH_UPDATE_PREVIEW if("set_wing_color") @@ -711,7 +710,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' /* Tail */ if("set_tail_style") var/new_tail_style = params["style"] - if(new_tail_style in pref.get_available_styles(global.tail_styles_list)) + if(new_tail_style in pref.get_available_styles(GLOB.tail_styles_list)) pref.tail_style = new_tail_style return TOPIC_REFRESH_UPDATE_PREVIEW if("set_tail_color") @@ -765,7 +764,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' pref.h_style = pick(valid_hairstyles) else //this shouldn't happen - pref.h_style = hair_styles_list["Bald"] + pref.h_style = GLOB.hair_styles_list["Bald"] //grab one of the valid facial hair styles for the newly chosen species var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles() @@ -775,7 +774,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' pref.f_style = pick(valid_facialhairstyles) else //this shouldn't happen - pref.f_style = facial_hair_styles_list["Shaved"] + pref.f_style = GLOB.facial_hair_styles_list["Shaved"] //reset hair colour and skin colour pref.update_preference_by_type(/datum/preference/color/human/hair_color, "#000000") @@ -988,7 +987,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi' return TOPIC_REFRESH_UPDATE_PREVIEW if("blood_type") - var/new_b_type = tgui_input_list(user, "Choose your character's blood-type:", "Character Preference", valid_bloodtypes, pref.b_type) + var/new_b_type = tgui_input_list(user, "Choose your character's blood-type:", "Character Preference", GLOB.valid_bloodtypes, pref.b_type) if(new_b_type) pref.b_type = new_b_type return TOPIC_REFRESH diff --git a/code/modules/client/preference_setup/general/05_background.dm b/code/modules/client/preference_setup/general/05_background.dm index 6458f148079..f2f0e43413d 100644 --- a/code/modules/client/preference_setup/general/05_background.dm +++ b/code/modules/client/preference_setup/general/05_background.dm @@ -79,7 +79,7 @@ return TOPIC_REFRESH if("home_system") - var/choice = tgui_input_list(user, "Please choose your home planet and/or system. This should be your current primary residence. Select \"Other\" to specify manually.", "Character Preference", home_system_choices + list("Unset","Other"), pref.home_system) + var/choice = tgui_input_list(user, "Please choose your home planet and/or system. This should be your current primary residence. Select \"Other\" to specify manually.", "Character Preference", GLOB.home_system_choices + list("Unset","Other"), pref.home_system) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") @@ -91,7 +91,7 @@ return TOPIC_REFRESH if("birthplace") - var/choice = tgui_input_list(user, "Please choose the planet and/or system or other appropriate location that you were born/created. Select \"Other\" to specify manually.", "Character Preference", home_system_choices + list("Unset","Other"), pref.birthplace) + var/choice = tgui_input_list(user, "Please choose the planet and/or system or other appropriate location that you were born/created. Select \"Other\" to specify manually.", "Character Preference", GLOB.home_system_choices + list("Unset","Other"), pref.birthplace) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") @@ -103,7 +103,7 @@ return TOPIC_REFRESH if("citizenship") - var/choice = tgui_input_list(user, "Please select the faction or political entity with which you currently hold citizenship. Select \"Other\" to specify manually.", "Character Preference", citizenship_choices + list("None","Other"), pref.citizenship) + var/choice = tgui_input_list(user, "Please select the faction or political entity with which you currently hold citizenship. Select \"Other\" to specify manually.", "Character Preference", GLOB.citizenship_choices + list("None","Other"), pref.citizenship) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") @@ -115,7 +115,7 @@ return TOPIC_REFRESH if("faction") - var/choice = tgui_input_list(user, "Please choose the faction you primarily work for, if you are not under the direct employ of NanoTrasen. Select \"Other\" to specify manually.", "Character Preference", faction_choices + list("None","Other"), pref.faction) + var/choice = tgui_input_list(user, "Please choose the faction you primarily work for, if you are not under the direct employ of NanoTrasen. Select \"Other\" to specify manually.", "Character Preference", GLOB.faction_choices + list("None","Other"), pref.faction) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") @@ -127,7 +127,7 @@ return TOPIC_REFRESH if("religion") - var/choice = tgui_input_list(user, "Please choose a religion. Select \"Other\" to specify manually.", "Character Preference", religion_choices + list("None","Other"), pref.religion) + var/choice = tgui_input_list(user, "Please choose a religion. Select \"Other\" to specify manually.", "Character Preference", GLOB.religion_choices + list("None","Other"), pref.religion) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") diff --git a/code/modules/client/preference_setup/general/07_antagonism.dm b/code/modules/client/preference_setup/general/07_antagonism.dm index 7f34eaaba33..e684c90acf8 100644 --- a/code/modules/client/preference_setup/general/07_antagonism.dm +++ b/code/modules/client/preference_setup/general/07_antagonism.dm @@ -92,7 +92,7 @@ return TOPIC_REFRESH if("antagfaction") - var/choice = tgui_input_list(user, "Please choose an antagonistic faction to work for.", "Character Preference", antag_faction_choices + list("None","Other"), pref.antag_faction) + var/choice = tgui_input_list(user, "Please choose an antagonistic faction to work for.", "Character Preference", GLOB.antag_faction_choices + list("None","Other"), pref.antag_faction) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") @@ -104,7 +104,7 @@ return TOPIC_REFRESH if("antagvis") - var/choice = tgui_input_list(user, "Please choose an antagonistic visibility level.", "Character Preference", antag_visiblity_choices, pref.antag_vis) + var/choice = tgui_input_list(user, "Please choose an antagonistic visibility level.", "Character Preference", GLOB.antag_visiblity_choices, pref.antag_vis) if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION else diff --git a/code/modules/client/preference_setup/general/08_candidacy.dm b/code/modules/client/preference_setup/general/08_candidacy.dm index cd569c8ab72..db459633d41 100644 --- a/code/modules/client/preference_setup/general/08_candidacy.dm +++ b/code/modules/client/preference_setup/general/08_candidacy.dm @@ -1,33 +1,3 @@ -var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf -//some autodetection here. -// Change these to 0 if the equivalent mode is disabled for whatever reason! - "traitor" = 0, // 0 - "operative" = 0, // 1 - "changeling" = 0, // 2 - "wizard" = 0, // 3 - "malf AI" = 0, // 4 - "revolutionary" = 0, // 5 - "alien candidate" = 0, // 6 - "positronic brain" = 1, // 7 - "cultist" = 0, // 8 - "renegade" = 0, // 9 - "ninja" = 0, // 10 - "raider" = 0, // 11 - "diona" = 0, // 12 - "mutineer" = 0, // 13 - "loyalist" = 0, // 14 - "pAI candidate" = 1, // 15 - //VOREStation Add - "lost drone" = 1, // 16 - "maint pred" = 1, // 17 - "maint lurker" = 1, // 18 - "morph" = 1, // 19 - "corgi" = 1, // 20 - "cursed sword" = 1, // 21 - "Ship Survivor" = 1, // 22 - //VOREStation Add End -) - /datum/category_item/player_setup_item/general/candidacy name = "Candidacy" sort_order = 8 @@ -63,8 +33,8 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set var/list/special_data = list() var/n = 0 - for(var/i in special_roles) - if(special_roles[i]) + for(var/i in GLOB.special_roles) + if(GLOB.special_roles[i]) var/banned = FALSE if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, JOB_AI) && jobban_isbanned(user, JOB_CYBORG)) || (i == "pAI candidate" && jobban_isbanned(user, JOB_PAI))) banned = TRUE diff --git a/code/modules/client/preference_setup/general/09_size.dm b/code/modules/client/preference_setup/general/09_size.dm index a9b7a0b748b..9c29c0b640d 100644 --- a/code/modules/client/preference_setup/general/09_size.dm +++ b/code/modules/client/preference_setup/general/09_size.dm @@ -191,7 +191,7 @@ return TOPIC_REFRESH if("customize_footsteps") - var/list/footstep_choice = selectable_footstep + var/list/footstep_choice = GLOB.selectable_footstep var/choice = tgui_input_list(user, "What footstep sounds would your character make?", "Custom Foostep Sounds", footstep_choice) if(choice) pref.custom_footstep = footstep_choice[choice] diff --git a/code/modules/client/preference_setup/general/12_traits.dm b/code/modules/client/preference_setup/general/12_traits.dm index f8d418636c4..e52e4f5a2bd 100644 --- a/code/modules/client/preference_setup/general/12_traits.dm +++ b/code/modules/client/preference_setup/general/12_traits.dm @@ -2,8 +2,6 @@ #define NEUTRAL_MODE 2 #define NEGATIVE_MODE 3 -var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_COPPER,REAGENT_ID_PHORON,REAGENT_ID_SILVER,REAGENT_ID_GOLD,REAGENT_ID_SLIMEJELLY) //allowlist-based so people don't make their blood restored by alcohol or something really silly. use reagent IDs! - /datum/preferences var/custom_base // What to base the custom species on var/blood_color = "#A10808" @@ -253,7 +251,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ pref.blood_color = new_blood return TOPIC_REFRESH if("blood_reagents") - var/new_blood_reagents = tgui_input_list(user, "Choose your character's blood restoration reagent:", "Character Preference", valid_bloodreagents) + var/new_blood_reagents = tgui_input_list(user, "Choose your character's blood restoration reagent:", "Character Preference", GLOB.valid_bloodreagents) if(new_blood_reagents && CanUseTopic(user)) pref.blood_reagents = new_blood_reagents return TOPIC_REFRESH diff --git a/code/modules/client/preference_setup/loadout/01_equipment.dm b/code/modules/client/preference_setup/loadout/01_equipment.dm index abc85619aab..a2134b0b78a 100644 --- a/code/modules/client/preference_setup/loadout/01_equipment.dm +++ b/code/modules/client/preference_setup/loadout/01_equipment.dm @@ -33,33 +33,6 @@ save_data["shoe_hater"] = pref.shoe_hater save_data["no_jacket"] = pref.no_jacket -var/global/list/valid_ringtones = list( - "beep", - "boom", - "slip", - "honk", - "SKREE", - "xeno", - "spark", - "rad", - "servo", - "buh-boop", - "trombone", - "whistle", - "chirp", - "slurp", - "pwing", - "clack", - "bzzt", - "chimes", - "prbt", - "bark", - "bork", - "roark", - "chitter", - "squish" - ) - // Moved from /datum/preferences/proc/copy_to() /datum/category_item/player_setup_item/loadout/equipment/copy_to_mob(var/mob/living/carbon/human/character) character.all_underwear.Cut() @@ -80,7 +53,7 @@ var/global/list/valid_ringtones = list( pref.headset = 1 //Same as above character.headset = pref.headset - if(pref.backbag > backbaglist.len || pref.backbag < 1) + if(pref.backbag > GLOB.backbaglist.len || pref.backbag < 1) pref.backbag = 2 //Same as above character.backbag = pref.backbag @@ -114,8 +87,8 @@ var/global/list/valid_ringtones = list( if(!(underwear_metadata in pref.all_underwear)) pref.all_underwear_metadata -= underwear_metadata pref.headset = sanitize_integer(pref.headset, 1, GLOB.headsetlist.len, initial(pref.headset)) - pref.backbag = sanitize_integer(pref.backbag, 1, backbaglist.len, initial(pref.backbag)) - pref.pdachoice = sanitize_integer(pref.pdachoice, 1, pdachoicelist.len, initial(pref.pdachoice)) + pref.backbag = sanitize_integer(pref.backbag, 1, GLOB.backbaglist.len, initial(pref.backbag)) + pref.pdachoice = sanitize_integer(pref.pdachoice, 1, GLOB.pdachoicelist.len, initial(pref.pdachoice)) pref.ringtone = sanitize(pref.ringtone, 20) /datum/category_item/player_setup_item/loadout/equipment/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) @@ -142,8 +115,8 @@ var/global/list/valid_ringtones = list( data["underwear"] = underwear_data data["headset_type"] = GLOB.headsetlist[pref.headset] - data["backpack_type"] = backbaglist[pref.backbag] - data["pda_type"] = pdachoicelist[pref.pdachoice] + data["backpack_type"] = GLOB.backbaglist[pref.backbag] + data["pda_type"] = GLOB.pdachoicelist[pref.pdachoice] data["communicator_visibility"] = pref.communicator_visibility // boolean data["ringtone"] = pref.ringtone data["shoes"] = !pref.shoe_hater @@ -159,8 +132,8 @@ var/global/list/valid_ringtones = list( var/list/data = ..() data["headsetlist"] = GLOB.headsetlist - data["backbaglist"] = backbaglist - data["pdachoicelist"] = pdachoicelist + data["GLOB.backbaglist"] = GLOB.backbaglist + data["GLOB.pdachoicelist"] = GLOB.pdachoicelist return data @@ -198,14 +171,14 @@ var/global/list/valid_ringtones = list( if("change_backpack") // Takes the JS index var/new_backbag = text2num(params["backbag"]) + 1 - if(LAZYACCESS(backbaglist, new_backbag)) + if(LAZYACCESS(GLOB.backbaglist, new_backbag)) pref.backbag = new_backbag return TOPIC_REFRESH_UPDATE_PREVIEW if("change_pda") // Takes the JS index var/new_pdachoice = text2num(params["pda"]) + 1 - if(LAZYACCESS(backbaglist, new_pdachoice)) + if(LAZYACCESS(GLOB.backbaglist, new_pdachoice)) pref.pdachoice = new_pdachoice return TOPIC_REFRESH_UPDATE_PREVIEW @@ -235,7 +208,7 @@ var/global/list/valid_ringtones = list( return TOPIC_REFRESH if("set_ringtone") - var/choice = tgui_input_list(user, "Please select a ringtone. All of these choices come with an associated preset sound. Alternately, select \"Other\" to specify manually.", "Character Preference", valid_ringtones + "Other", pref.ringtone) + var/choice = tgui_input_list(user, "Please select a ringtone. All of these choices come with an associated preset sound. Alternately, select \"Other\" to specify manually.", "Character Preference", GLOB.valid_ringtones + "Other", pref.ringtone) if(!choice) return TOPIC_NOACTION if(choice == "Other") diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 21b3b24ace1..700da1d5107 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -213,7 +213,7 @@ var/list/preferences_datums = list() BG.icon_state = bgstate BG.screen_loc = preview_screen_locs["BG"] - for(var/D in global.GLOB.cardinal) + for(var/D in GLOB.cardinal) var/obj/screen/setup_preview/O = LAZYACCESS(char_render_holders, "[D]") if(!O) O = new @@ -461,7 +461,7 @@ var/list/preferences_datums = list() character.synth_markings = synth_markings - var/list/ear_styles = get_available_styles(global.ear_styles_list) + var/list/ear_styles = get_available_styles(GLOB.ear_styles_list) character.ear_style = ear_styles[ear_style] var/datum/preference/color/ears_color1 = GLOB.preference_entries[/datum/preference/color/human/ears_color1] @@ -476,7 +476,7 @@ var/list/preferences_datums = list() character.ear_secondary_style = ear_styles[ear_secondary_style] character.ear_secondary_colors = SANITIZE_LIST(ear_secondary_colors) - var/list/tail_styles = get_available_styles(global.tail_styles_list) + var/list/tail_styles = get_available_styles(GLOB.tail_styles_list) character.tail_style = tail_styles[tail_style] var/datum/preference/color/tail_color1 = GLOB.preference_entries[/datum/preference/color/human/tail_color1] @@ -488,7 +488,7 @@ var/list/preferences_datums = list() var/datum/preference/color/tail_color3 = GLOB.preference_entries[/datum/preference/color/human/tail_color3] tail_color3.apply_pref_to(character, read_preference(/datum/preference/color/human/tail_color3)) - var/list/wing_styles = get_available_styles(global.wing_styles_list) + var/list/wing_styles = get_available_styles(GLOB.wing_styles_list) character.wing_style = wing_styles[wing_style] var/datum/preference/color/wing_color1 = GLOB.preference_entries[/datum/preference/color/human/wing_color1] @@ -547,7 +547,7 @@ var/list/preferences_datums = list() var/priority = 0 for(var/M in body_markings) priority += 1 - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[M] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[M] for(var/BP in mark_datum.body_parts) var/obj/item/organ/external/O = character.organs_by_name[BP] diff --git a/code/modules/client/preferences/types/game/tooltip.dm b/code/modules/client/preferences/types/game/tooltip.dm index 4e4b7659c5c..6fd15f09334 100644 --- a/code/modules/client/preferences/types/game/tooltip.dm +++ b/code/modules/client/preferences/types/game/tooltip.dm @@ -16,7 +16,7 @@ savefile_identifier = PREFERENCE_PLAYER /datum/preference/choiced/tooltip_style/init_possible_values() - return all_tooltip_styles + return GLOB.all_tooltip_styles /datum/preference/choiced/tooltip_style/create_default_value() - return all_tooltip_styles[1] + return GLOB.all_tooltip_styles[1] diff --git a/code/modules/client/preferences_factions.dm b/code/modules/client/preferences_factions.dm index aad28f1f8d0..d2eff356f0e 100644 --- a/code/modules/client/preferences_factions.dm +++ b/code/modules/client/preferences_factions.dm @@ -1,135 +1,8 @@ -var/global/list/seen_citizenships = list() -var/global/list/seen_systems = list() -var/global/list/seen_factions = list() -var/global/list/seen_antag_factions = list() -var/global/list/seen_religions = list() - //Commenting this out for now until I work the lists it into the event generator/journalist/chaplain. /proc/UpdateFactionList(mob/living/carbon/human/M) /*if(M && M.client && M.client.prefs) - seen_citizenships |= M.client.prefs.citizenship - seen_systems |= M.client.prefs.home_system - seen_factions |= M.client.prefs.faction - seen_religions |= M.client.prefs.religion*/ + GLOB.seen_citizenships |= M.client.prefs.citizenship + GLOB.seen_systems |= M.client.prefs.home_system + GLOB.seen_factions |= M.client.prefs.faction + GLOB.seen_religions |= M.client.prefs.religion*/ return - -// VOREStation Edits Start -var/global/list/citizenship_choices = list( - "Greater Human Diaspora", - "Commonwealth of Sol-Procyon", - "Skrell Consensus", - "Moghes Hegemony", - "Tajaran Diaspora", - "Unitary Alliance of Salthan Fyrds", - "Elysian Colonies", - "Third Ares Confederation", - "Teshari Union", - "Altevian Hegemony", - "Kosaky Fleets" - ) - -var/global/list/home_system_choices = list( - "Virgo-Erigone", - "Sol", - "Earth, Sol", - "Luna, Sol", - "Mars, Sol", - "Venus, Sol", - "Titan, Sol", - "Toledo, New Ohio", - "The Pact, Myria", - "Kishar, Alpha Centauri", - "Anshar, Alpha Centauri", - "Heaven Complex, Alpha Centauri", - "Procyon", - "Altair", - "Kara, Vir", - "Sif, Vir", - "Brinkburn, Nyx", - "Binma, Tau Ceti", - "Qerr'balak, Qerr'valis", - "Epsilon Ursae Minoris", - "Meralar, Rarkajar", - "Tal, Vilous", - "Menhir, Alat-Hahr", - "Altam, Vazzend", - "Uh'Zata, Kelezakata", - "Moghes, Uuoea-Esa", - "Xohok, Uuoea-Esa", - "Varilak, Antares", - "Sanctorum, Sanctum", - "Infernum, Sanctum", - "Abundance in All Things Serene, Beta-Carnelium Ventrum", - "Jorhul, Barkalis", - "Shelf Flotilla", - "Ue-Orsi Flotilla", - "AH-CV Prosperity", - "AH-CV Migrant", - "Altevian Colony Ship" - ) - -var/global/list/faction_choices = list( - "NanoTrasen Incorporated", - "Hephaestus Industries", - "Vey-Medical", - "Zeng-Hu Pharmaceuticals", - "Ward-Takahashi GMC", - "Bishop Cybernetics", - "Morpheus Cyberkinetics", - "Xion Manufacturing Group", - "Free Trade Union", - "Major Bill's Transportation", - "Ironcrest Transport Group", - "Grayson Manufactories Ltd.", - "Aether Atmospherics", - "Focal Point Energistics", - "StarFlight Inc.", - "Oculum Broadcasting Network", - "Periphery Post", - "Free Anur Tribune", - "Centauri Provisions", - "Einstein Engines", - "Wulf Aeronautics", - "Gilthari Exports", - "Coyote Salvage Corp.", - "Chimera Genetics Corp.", - "Independent Pilots Association", - "Local System Defense Force", - "United Solar Defense Force", - "Proxima Centauri Risk Control", - "HIVE Security", - "Stealth Assault Enterprises", - "Teshari Union" - ) -// VOREStation Edits Stop - -var/global/list/antag_faction_choices = list() //Should be populated after brainstorming. Leaving as blank in case brainstorming does not occur. - -var/global/list/antag_visiblity_choices = list( - "Hidden", - "Shared", - "Known" - ) - -var/global/list/religion_choices = list( - "Unitarianism", - "Neopaganism", - "Islam", - "Christianity", - "Judaism", - "Hinduism", - "Buddhism", - "Pleromanism", - "Spectralism", - "Phact Shintoism", - "Kishari Faith", - "Hauler Faith", - "Nock", - "Singulitarian Worship", - "Xilar Qall", - "Tajr-kii Rarkajar", - "Agnosticism", - "Deism", - "Neo-Moreauism", - "Orthodox Moreauism" - ) diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index b8ef6f69e36..9401f2b0150 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -1,34 +1,3 @@ - - -/var/all_ui_styles = list( - "Midnight" = 'icons/mob/screen/midnight.dmi', - "Orange" = 'icons/mob/screen/orange.dmi', - "old" = 'icons/mob/screen/old.dmi', - "White" = 'icons/mob/screen/white.dmi', - "old-noborder" = 'icons/mob/screen/old-noborder.dmi', - "minimalist" = 'icons/mob/screen/minimalist.dmi', - "Hologram" = 'icons/mob/screen/holo.dmi' - ) - -/var/all_ui_styles_robot = list( - "Midnight" = 'icons/mob/screen1_robot.dmi', - "Orange" = 'icons/mob/screen1_robot.dmi', - "old" = 'icons/mob/screen1_robot.dmi', - "White" = 'icons/mob/screen1_robot.dmi', - "old-noborder" = 'icons/mob/screen1_robot.dmi', - "minimalist" = 'icons/mob/screen1_robot_minimalist.dmi', - "Hologram" = 'icons/mob/screen1_robot_minimalist.dmi' - ) - -var/global/list/all_tooltip_styles = list( - "Midnight", //Default for everyone is the first one, - "Plasmafire", - "Retro", - "Slimecore", - "Operative", - "Clockwork" - ) - /proc/ui_style2icon(ui_style) if(ui_style in all_ui_styles) return all_ui_styles[ui_style] diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 45347317eb9..13689e047ba 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -40,13 +40,13 @@ worn_state = "black" desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices + /obj/item/clothing/under/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) + if(!GLOB.chamelion_jumpsuit_choices) var/blocked = list(src.type, /obj/item/clothing/under/gimmick)//Prevent infinite loops and bad jumpsuits. - clothing_choices = generate_chameleon_choices(/obj/item/clothing/under, blocked) + GLOB.chamelion_jumpsuit_choices = generate_chameleon_choices(/obj/item/clothing/under, blocked) /obj/item/clothing/under/chameleon/emp_act(severity) name = "psychedelic" @@ -56,15 +56,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/under/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/under/chameleon/verb/change(picked in GLOB.chamelion_jumpsuit_choices) set name = "Change Jumpsuit Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_jumpsuit_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_jumpsuit_choices[picked]) update_clothing_icon() //so our overlays update. //***************** @@ -77,13 +77,12 @@ desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside." origin_tech = list(TECH_ILLEGAL = 3) body_parts_covered = 0 - var/global/list/clothing_choices /obj/item/clothing/head/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) + if(!GLOB.chamelion_head_choices) var/blocked = list(src.type)//Prevent infinite loops and bad hats. - clothing_choices = generate_chameleon_choices(/obj/item/clothing/head, blocked) + GLOB.chamelion_head_choices = generate_chameleon_choices(/obj/item/clothing/head, blocked) /obj/item/clothing/head/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "grey cap" @@ -92,15 +91,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/head/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/head/chameleon/verb/change(picked in GLOB.chamelion_head_choices) set name = "Change Hat/Helmet Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_head_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_head_choices[picked]) update_clothing_icon() //so our overlays update. //****************** @@ -112,13 +111,12 @@ icon_state = "armor" desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside." origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/clothing/suit/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) + if(!GLOB.chamelion_suit_choices) var/blocked = list(src.type, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice, /obj/item/clothing/suit/greatcoat) - clothing_choices = generate_chameleon_choices(/obj/item/clothing/suit, blocked) + GLOB.chamelion_suit_choices = generate_chameleon_choices(/obj/item/clothing/suit, blocked) /obj/item/clothing/suit/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "armor" @@ -127,15 +125,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/suit/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/suit/chameleon/verb/change(picked in GLOB.chamelion_suit_choices) set name = "Change Oversuit Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_suit_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_suit_choices[picked]) update_clothing_icon() //so our overlays update. //******************* @@ -146,13 +144,12 @@ icon_state = "black" desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe." origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/clothing/shoes/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) + if(!GLOB.chamelion_shoe_choices) var/blocked = list(src.type, /obj/item/clothing/shoes/syndigaloshes, /obj/item/clothing/shoes/cyborg)//prevent infinite loops and bad shoes. - clothing_choices = generate_chameleon_choices(/obj/item/clothing/shoes, blocked) + GLOB.chamelion_shoe_choices = generate_chameleon_choices(/obj/item/clothing/shoes, blocked) /obj/item/clothing/shoes/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "black shoes" @@ -161,15 +158,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/shoes/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/shoes/chameleon/verb/change(picked in GLOB.chamelion_shoe_choices) set name = "Change Footwear Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_shoe_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_shoe_choices[picked]) update_clothing_icon() //so our overlays update. //********************** @@ -180,13 +177,12 @@ icon_state = "backpack" desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage." origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/storage/backpack/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) + if(!GLOB.chamelion_back_choices) var/blocked = list(src.type, /obj/item/storage/backpack/satchel/withwallet) - clothing_choices = generate_chameleon_choices(/obj/item/storage/backpack, blocked) + GLOB.chamelion_back_choices = generate_chameleon_choices(/obj/item/storage/backpack, blocked) /obj/item/storage/backpack/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "backpack" @@ -197,15 +193,15 @@ var/mob/M = src.loc M.update_inv_back() -/obj/item/storage/backpack/chameleon/verb/change(picked in clothing_choices) +/obj/item/storage/backpack/chameleon/verb/change(picked in GLOB.chamelion_back_choices) set name = "Change Backpack Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_back_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_back_choices[picked]) //so our overlays update. if (ismob(src.loc)) @@ -233,12 +229,11 @@ icon_state = "black" desc = "It looks like a pair of gloves, but it seems to have a small dial inside." origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/clothing/gloves/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) - clothing_choices = generate_chameleon_choices(/obj/item/clothing/gloves, list(src.type)) + if(!GLOB.chamelion_glove_choices) + GLOB.chamelion_glove_choices = generate_chameleon_choices(/obj/item/clothing/gloves, list(src.type)) /obj/item/clothing/gloves/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "black gloves" @@ -247,15 +242,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/gloves/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/gloves/chameleon/verb/change(picked in GLOB.chamelion_glove_choices) set name = "Change Gloves Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_glove_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_glove_choices[picked]) update_clothing_icon() //so our overlays update. //****************** @@ -267,12 +262,11 @@ icon_state = "gas_old" desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside." origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/clothing/mask/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) - clothing_choices = generate_chameleon_choices(/obj/item/clothing/mask, list(src.type)) + if(!GLOB.chamelion_mask_choices) + GLOB.chamelion_mask_choices = generate_chameleon_choices(/obj/item/clothing/mask, list(src.type)) /obj/item/clothing/mask/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "gas mask" @@ -281,15 +275,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/mask/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/mask/chameleon/verb/change(picked in GLOB.chamelion_mask_choices) set name = "Change Mask Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_mask_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_mask_choices[picked]) update_clothing_icon() //so our overlays update. //********************* @@ -336,12 +330,11 @@ desc = "Can hold various things. It also has a small dial inside one of the pouches." icon_state = "utilitybelt" origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/storage/belt/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) - clothing_choices = generate_chameleon_choices(/obj/item/storage/belt, list(src.type)) + if(!GLOB.chamelion_belt_choices) + GLOB.chamelion_belt_choices = generate_chameleon_choices(/obj/item/storage/belt, list(src.type)) /obj/item/storage/belt/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "belt" @@ -352,15 +345,15 @@ var/mob/M = src.loc M.update_inv_belt() -/obj/item/storage/belt/chameleon/verb/change(picked in clothing_choices) +/obj/item/storage/belt/chameleon/verb/change(picked in GLOB.chamelion_belt_choices) set name = "Change Belt Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_belt_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_belt_choices[picked]) if(ismob(src.loc)) var/mob/M = src.loc @@ -376,13 +369,12 @@ icon = 'icons/inventory/accessory/item.dmi' icon_state = "blacktie" origin_tech = list(TECH_ILLEGAL = 3) - var/global/list/clothing_choices /obj/item/clothing/accessory/chameleon/Initialize(mapload) . = ..() - if(!clothing_choices) + if(!GLOB.chamelion_accessory_choices) var/blocked = list(src.type, /obj/item/clothing/accessory/storage) - clothing_choices = generate_chameleon_choices(/obj/item/clothing/accessory, blocked) + GLOB.chamelion_accessory_choices = generate_chameleon_choices(/obj/item/clothing/accessory, blocked) /obj/item/clothing/accessory/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. name = "black tie" @@ -391,15 +383,15 @@ update_icon() update_clothing_icon() -/obj/item/clothing/accessory/chameleon/verb/change(picked in clothing_choices) +/obj/item/clothing/accessory/chameleon/verb/change(picked in GLOB.chamelion_accessory_choices) set name = "Change Accessory Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(clothing_choices[picked])) + if(!ispath(GLOB.chamelion_accessory_choices[picked])) return - disguise(clothing_choices[picked]) + disguise(GLOB.chamelion_accessory_choices[picked]) update_icon() //***************** @@ -420,16 +412,14 @@ battery_lock = 1 var/obj/item/projectile/copy_projectile - var/global/list/gun_choices /obj/item/gun/energy/chameleon/Initialize(mapload) . = ..() - if(!gun_choices) - gun_choices = list() + if(!LAZYLEN(GLOB.gun_choices)) for(var/gun_type in typesof(/obj/item/gun/) - src.type) var/obj/item/gun/G = gun_type - src.gun_choices[initial(G.name)] = gun_type + GLOB.gun_choices[initial(G.name)] = gun_type /obj/item/gun/energy/chameleon/consume_next_projectile() var/obj/item/projectile/P = ..() @@ -474,15 +464,15 @@ copy_projectile = null //charge_meter = 0 -/obj/item/gun/energy/chameleon/verb/change(picked in gun_choices) +/obj/item/gun/energy/chameleon/verb/change(picked in GLOB.gun_choices) set name = "Change Gun Appearance" set category = "Chameleon Items" set src in usr - if(!ispath(gun_choices[picked])) + if(!ispath(GLOB.gun_choices[picked])) return - disguise(gun_choices[picked]) + disguise(GLOB.gun_choices[picked]) //so our overlays update. if (ismob(src.loc)) diff --git a/code/modules/clothing/masks/monitor.dm b/code/modules/clothing/masks/monitor.dm index 0b8148ffe6c..ef1656e34a4 100644 --- a/code/modules/clothing/masks/monitor.dm +++ b/code/modules/clothing/masks/monitor.dm @@ -11,7 +11,7 @@ icon_state = "monitor" var/monitor_state_index = "blank" - var/global/list/monitor_states = list() + /obj/item/clothing/mask/monitor/set_dir() dir = SOUTH @@ -25,8 +25,8 @@ var/datum/robolimb/robohead = all_robolimbs[E.model] canremove = FALSE if(robohead.monitor_styles) - monitor_states = params2list(robohead.monitor_styles) - icon_state = monitor_states[monitor_state_index] + GLOB.monitor_states = params2list(robohead.monitor_styles) + icon_state = GLOB.monitor_states[monitor_state_index] to_chat(H, span_notice("\The [src] connects to your display output.")) /obj/item/clothing/mask/monitor/dropped(mob/user) @@ -56,14 +56,14 @@ if(H.wear_mask != src) to_chat(H, span_warning("You have not installed \the [src] yet.")) return - var/choice = tgui_input_list(H, "Select a screen icon:", "Head Monitor Choice", monitor_states) + var/choice = tgui_input_list(H, "Select a screen icon:", "Head Monitor Choice", GLOB.monitor_states) if(choice) monitor_state_index = choice update_icon() /obj/item/clothing/mask/monitor/update_icon() - if(!(monitor_state_index in monitor_states)) + if(!(monitor_state_index in GLOB.monitor_states)) monitor_state_index = initial(monitor_state_index) - icon_state = monitor_states[monitor_state_index] + icon_state = GLOB.monitor_states[monitor_state_index] var/mob/living/carbon/human/H = loc if(istype(H)) H.update_inv_wear_mask() diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index bf998b2cb8c..0aff5ee8142 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -23,33 +23,15 @@ . = ..() base_name = "[name]" -//Some simple descriptors for breaches. Global because lazy, TODO: work out a better way to do this. - -var/global/list/breach_brute_descriptors = list( - "tiny puncture", - "ragged tear", - "large split", - "huge tear", - "gaping wound" - ) - -var/global/list/breach_burn_descriptors = list( - "small burn", - "melted patch", - "sizable burn", - "large scorched area", - "huge scorched area" - ) - /datum/breach/proc/update_descriptor() //Sanity... class = between(1, round(class), 5) //Apply the correct descriptor. if(damtype == BURN) - descriptor = breach_burn_descriptors[class] + descriptor = GLOB.breach_burn_descriptors[class] else if(damtype == BRUTE) - descriptor = breach_brute_descriptors[class] + descriptor = GLOB.breach_brute_descriptors[class] //Repair a certain amount of brute or burn damage to the suit. /obj/item/clothing/suit/space/proc/repair_breaches(var/damtype, var/amount, var/mob/user) diff --git a/code/modules/emotes/emote_define.dm b/code/modules/emotes/emote_define.dm index c09bc9625df..27dc7f46538 100644 --- a/code/modules/emotes/emote_define.dm +++ b/code/modules/emotes/emote_define.dm @@ -4,12 +4,10 @@ // gender-appropriate version of the same. // - Impaired messages do not do any substitutions. -var/global/list/emotes_by_key - /proc/get_emote_by_key(var/key) - if(!global.emotes_by_key) - decls_repository.get_decls_of_type(/decl/emote) // emotes_by_key will be updated in emote Initialize() - return global.emotes_by_key[key] + if(!GLOB.emotes_by_key) + decls_repository.get_decls_of_type(/decl/emote) // GLOB.emotes_by_key will be updated in emote Initialize() + return GLOB.emotes_by_key[key] /decl/emote var/key // Command to use emote ie. '*[key]' @@ -49,7 +47,7 @@ var/global/list/emotes_by_key /decl/emote/Initialize(mapload) . = ..() if(key) - LAZYSET(global.emotes_by_key, key, src) + LAZYSET(GLOB.emotes_by_key, key, src) /decl/emote/proc/get_emote_message_1p(var/atom/user, var/atom/target, var/extra_params) if(target) diff --git a/code/modules/entopics_vr/entopics.dm b/code/modules/entopics_vr/entopics.dm index 18941311a1a..f9b64a9315c 100644 --- a/code/modules/entopics_vr/entopics.dm +++ b/code/modules/entopics_vr/entopics.dm @@ -1,9 +1,4 @@ //Augmented reality objects and their associated systems for attaching to things -var/global/list/entopic_images = list() -var/global/list/entopic_users = list() - -var/global/list/alt_farmanimals = list() - /datum/entopic var/name var/suffix @@ -76,8 +71,8 @@ var/global/list/alt_farmanimals = list() return registered = TRUE - entopic_images += my_image - for(var/mob/M as anything in entopic_users) + GLOB.entopic_images += my_image + for(var/mob/M as anything in GLOB.entopic_users) if(M.client) M.client.images += my_image @@ -86,8 +81,8 @@ var/global/list/alt_farmanimals = list() return registered = FALSE - entopic_images -= my_image - for(var/mob/M as anything in entopic_users) + GLOB.entopic_images -= my_image + for(var/mob/M as anything in GLOB.entopic_users) if(M.client) M.client.images -= my_image diff --git a/code/modules/events/apc_damage.dm b/code/modules/events/apc_damage.dm index af9eb6d503b..49a9a27e82c 100644 --- a/code/modules/events/apc_damage.dm +++ b/code/modules/events/apc_damage.dm @@ -23,7 +23,7 @@ var/list/possibleEpicentres = list() var/list/apcs = list() - for(var/obj/effect/landmark/newEpicentre in landmarks_list) + for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list) if(newEpicentre.name == "lightsout") possibleEpicentres += newEpicentre diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 7eb4a9d94fa..224443fe368 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -14,7 +14,7 @@ /datum/event/aurora_caelus/start() affecting_z -= global.using_map.sealed_levels // Space levels only please! - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.z in affecting_z) M.playsound_local(null, 'sound/ambience/space/aurora_caelus.ogg', 100, FALSE, pressure_affected = FALSE) ..() diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 71bb10d1da6..11cb296944f 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -34,7 +34,7 @@ // Check if any landmarks exist! var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn" && (C.z in affecting_z)) spawn_locations.Add(C.loc) if(spawn_locations.len) // Okay we've got landmarks, lets use those! diff --git a/code/modules/events/comms_blackout.dm b/code/modules/events/comms_blackout.dm index b6c12745af1..8111afe5080 100644 --- a/code/modules/events/comms_blackout.dm +++ b/code/modules/events/comms_blackout.dm @@ -4,7 +4,7 @@ if(!silent) command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms - for(var/mob/living/silicon/ai/A in player_list) + for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, span_boldwarning("
")) to_chat(A, span_boldwarning("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")) to_chat(A, span_boldwarning("
")) diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index fd9de14f5da..a13fb5b002f 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -6,7 +6,7 @@ "Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \ "#4nd%;f4y6,>£%-BZZZZZZZT") - for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts. + for(var/mob/living/silicon/ai/A in GLOB.player_list) //AIs are always aware of communication blackouts. to_chat(A, span_boldwarning("
")) to_chat(A, span_boldwarning("[alert]")) to_chat(A, span_boldwarning("
")) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index d4960ed9465..515e35eb0e6 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -33,7 +33,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases) GLOB.current_pending_diseases += chosen_disease var/list/candidates = list() - for(var/mob/living/carbon/human/G in human_mob_list) + for(var/mob/living/carbon/human/G in GLOB.human_mob_list) if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind)) var/area/A = get_area(G) if(!A) diff --git a/code/modules/events/drone_pod_vr.dm b/code/modules/events/drone_pod_vr.dm index 7ede463acfb..0aa8bc153ab 100644 --- a/code/modules/events/drone_pod_vr.dm +++ b/code/modules/events/drone_pod_vr.dm @@ -8,7 +8,7 @@ var/land_spot_list = list() var/target_spot - for(var/obj/effect/landmark/land_spot in landmarks_list) + for(var/obj/effect/landmark/land_spot in GLOB.landmarks_list) if(land_spot.name == "droppod_landing" && !(land_spot in land_spot_list)) land_spot_list += land_spot @@ -18,7 +18,7 @@ if(!land_target) kill() else - landmarks_list -= target_spot + GLOB.landmarks_list -= target_spot qdel(target_spot) /datum/event/drone_pod_drop/announce() diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index cd0eb72fb83..7397d6467cd 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -1,6 +1,3 @@ - -var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT_LEVEL_MODERATE = "Moderate", EVENT_LEVEL_MAJOR = "Major") - /datum/event_container var/severity = -1 var/delayed = 0 @@ -39,7 +36,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new next_event.event_type(next_event) // Events are added and removed from the processing queue in their New/kill procs - log_debug("Starting event '[next_event.name]' of severity [severity_to_string[severity]].") + log_debug("Starting event '[next_event.name]' of severity [GLOB.severity_to_string[severity]].") next_event = null // When set to null, a random event will be selected next time else // If not, wait for one minute, instead of one tick, before checking again. @@ -101,7 +98,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT // Otherwise, follow the standard setup process else var/playercount_modifier = 1 - switch(player_list.len) + switch(GLOB.player_list.len) if(0 to 10) playercount_modifier = 1.2 if(11 to 15) @@ -117,7 +114,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT var/event_delay = rand(CONFIG_GET(number_list/event_delay_lower)[severity] MINUTES, CONFIG_GET(number_list/event_delay_upper)[severity] MINUTES) * playercount_modifier next_event_time = world.time + event_delay - log_debug("Next event of severity [severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.") + log_debug("Next event of severity [GLOB.severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.") /datum/event_container/proc/SelectEvent() var/datum/event_meta/EM = tgui_input_list(usr, "Select an event to queue up.", "Event Selection", available_events) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 5aa58aaa59d..d92ada2f7ce 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -50,10 +50,10 @@ GLOBAL_LIST_EMPTY(event_last_fired) //possibleEvents[/datum/event/mundane_news] = 300 possibleEvents[/datum/event/lore_news] = 300 // up this if the above ones get removed as they damn well should - //possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200) - possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50) + //possibleEvents[/datum/event/pda_spam] = max(min(25, GLOB.player_list.len) * 4, 200) + possibleEvents[/datum/event/money_lotto] = max(min(5, GLOB.player_list.len), 50) if(GLOB.account_hack_attempted) - possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200) + possibleEvents[/datum/event/money_hacker] = max(min(25, GLOB.player_list.len) * 4, 200) possibleEvents[/datum/event/carp_migration] = 20 + 10 * active_with_role[DEPARTMENT_ENGINEERING] @@ -114,7 +114,7 @@ GLOBAL_LIST_EMPTY(event_last_fired) //moved this to proc/check_event() /*var/chance = possibleEvents[picked_event] var/base_chance = 0.4 - switch(player_list.len) + switch(GLOB.player_list.len) if(5 to 10) base_chance = 0.6 if(11 to 15) @@ -135,7 +135,7 @@ GLOBAL_LIST_EMPTY(event_last_fired) /*switch(picked_event) if("Meteor") command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert") - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(!isnewplayer(M)) M << sound('sound/AI/meteors.ogg') spawn(100) @@ -188,7 +188,7 @@ GLOBAL_LIST_EMPTY(event_last_fired) active_with_role[JOB_JANITOR] = 0 active_with_role[JOB_BOTANIST] = 0 - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(!M.mind || !M.client || M.client.is_afk(10 MINUTES)) // longer than 10 minutes AFK counts them as inactive continue diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index e321978043d..22751a6208b 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -26,7 +26,7 @@ html += "Back
" html += "Time till start: [round(event_time / 600, 0.1)]
" html += "
" - html += "

Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)

" + html += "

Available [GLOB.severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)

" html += "" html += "
Name " var/list/active_with_role = number_active_with_role() @@ -68,7 +68,7 @@ var/datum/event_container/EC = event_containers[severity] var/next_event_at = max(0, EC.next_event_time - world.time) html += "" - html += "" + html += "" html += "" html += "" html += "" - html += "" + html += "" html += "" html += "" html += "" @@ -115,7 +115,7 @@ var/ends_at = E.startedAt + (E.lastProcessAt() * 20) // A best estimate, based on how often the alarm manager processes var/ends_in = max(0, round((ends_at - world.time) / 600, 0.1)) html += "" - html += "" + html += "" html += "" html += "" html += "" @@ -137,21 +137,21 @@ var/datum/event_container/EC = locate(href_list["event"]) var/decrease = 60 * (10 ** text2num(href_list["dec_timer"])) EC.next_event_time -= decrease - log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).") + log_and_message_admins("decreased timer for [GLOB.severity_to_string[EC.severity]] events by [decrease/600] minute(s).") else if(href_list["inc_timer"]) var/datum/event_container/EC = locate(href_list["event"]) var/increase = 60 * (10 ** text2num(href_list["inc_timer"])) EC.next_event_time += increase - log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).") + log_and_message_admins("increased timer for [GLOB.severity_to_string[EC.severity]] events by [increase/600] minute(s).") else if(href_list["select_event"]) var/datum/event_container/EC = locate(href_list["select_event"]) var/datum/event_meta/EM = EC.SelectEvent() if(EM) - log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.") + log_and_message_admins("has queued the [GLOB.severity_to_string[EC.severity]] event '[EM.name]'.") else if(href_list["pause"]) var/datum/event_container/EC = locate(href_list["pause"]) EC.delayed = !EC.delayed - log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.") + log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [GLOB.severity_to_string[EC.severity]] events.") else if(href_list["pause_all"]) CONFIG_SET(flag/allow_random_events, text2num(href_list["pause_all"])) log_and_message_admins("has [CONFIG_GET(flag/allow_random_events) ? "resumed" : "paused"] countdown for all events.") @@ -160,13 +160,13 @@ if(delay && delay > 0) var/datum/event_container/EC = locate(href_list["interval"]) EC.delay_modifier = delay - log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].") + log_and_message_admins("has set the interval modifier for [GLOB.severity_to_string[EC.severity]] events to [EC.delay_modifier].") else if(href_list["stop"]) if(tgui_alert(usr, "Stopping an event may have unintended side-effects. Continue?","Stopping Event!",list("Yes","No")) != "Yes") return var/datum/event/E = locate(href_list["stop"]) var/datum/event_meta/EM = E.event_meta - log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.") + log_and_message_admins("has stopped the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.") E.kill() else if(href_list["view_events"]) selected_event_container = locate(href_list["view_events"]) @@ -188,23 +188,23 @@ var/datum/event_meta/EM = locate(href_list["set_weight"]) EM.weight = weight if(EM != new_event) - log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].") + log_and_message_admins("has changed the weight of the [GLOB.severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].") else if(href_list["toggle_oneshot"]) var/datum/event_meta/EM = locate(href_list["toggle_oneshot"]) EM.one_shot = !EM.one_shot if(EM != new_event) - log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.") + log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.") else if(href_list["toggle_enabled"]) var/datum/event_meta/EM = locate(href_list["toggle_enabled"]) EM.enabled = !EM.enabled - log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.") + log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.") else if(href_list["remove"]) if(tgui_alert(usr, "This will remove the event from rotation. Continue?","Removing Event!",list("Yes","No")) != "Yes") return var/datum/event_meta/EM = locate(href_list["remove"]) var/datum/event_container/EC = locate(href_list["EC"]) EC.available_events -= EM - log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.") + log_and_message_admins("has removed the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.") else if(href_list["add"]) if(!new_event.name || !new_event.event_type) return @@ -212,12 +212,12 @@ return new_event.severity = selected_event_container.severity selected_event_container.available_events += new_event - log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].") + log_and_message_admins("has added \a [GLOB.severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].") new_event = new else if(href_list["clear"]) var/datum/event_container/EC = locate(href_list["clear"]) if(EC.next_event) - log_and_message_admins("has dequeued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.") + log_and_message_admins("has dequeued the [GLOB.severity_to_string[EC.severity]] event '[EC.next_event.name]'.") EC.next_event = null Interact(usr) diff --git a/code/modules/events/gnat_migration.dm b/code/modules/events/gnat_migration.dm index fb2aadf8925..13d531424f9 100644 --- a/code/modules/events/gnat_migration.dm +++ b/code/modules/events/gnat_migration.dm @@ -34,7 +34,7 @@ // Check if any landmarks exist! var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "gnatspawn" && (C.z in affecting_z)) spawn_locations.Add(C.loc) if(spawn_locations.len) // Okay we've got landmarks, lets use those! diff --git a/code/modules/events/ian_storm_vr.dm b/code/modules/events/ian_storm_vr.dm index 137da9bbe44..619d9390704 100644 --- a/code/modules/events/ian_storm_vr.dm +++ b/code/modules/events/ian_storm_vr.dm @@ -10,7 +10,7 @@ /datum/event/ianstorm/start() spawn() - for(var/mob/living/carbon/human/C in living_mob_list) + for(var/mob/living/carbon/human/C in GLOB.living_mob_list) var/turf/T = get_turf(C) if(!T) continue diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index eafdf2ecefc..dabb99d0e4f 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -29,7 +29,7 @@ prep_size_max = 3 vermstring = "lizards" // Check if any landmarks exist! - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "verminstart") spawn_locations.Add(C.loc) diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index a8e1674d75b..8b43c21fb4a 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -25,13 +25,13 @@ command_announcement.Announce("It has come to our attention that \the [location_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") /datum/event/ionstorm/start() - for (var/mob/living/carbon/human/player in player_list) + for (var/mob/living/carbon/human/player in GLOB.player_list) if( !player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10)) continue players += player.real_name // Flomph synthetics - for(var/mob/living/carbon/S in living_mob_list) + for(var/mob/living/carbon/S in GLOB.living_mob_list) if (!S.isSynthetic()) continue if(!(S.z in affecting_z)) @@ -45,7 +45,7 @@ S.eye_blurry += (ionbug - 1) // Ionize silicon mobs - for (var/mob/living/silicon/ai/target in silicon_mob_list) + for (var/mob/living/silicon/ai/target in GLOB.silicon_mob_list) if(!(target.z in affecting_z)) continue var/law = target.generate_ion_law() @@ -65,7 +65,7 @@ */ /datum/event/ionstorm/tick() if(botEmagChance) - for(var/mob/living/bot/bot in mob_list) + for(var/mob/living/bot/bot in GLOB.mob_list) if(!(bot.z in affecting_z)) continue if(prob(botEmagChance)) @@ -85,7 +85,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is */ //AI laws - for(var/mob/living/silicon/ai/M in living_mob_list) + for(var/mob/living/silicon/ai/M in GLOB.living_mob_list) if(M.stat != 2 && M.see_in_dark != 0) var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "MERCENARIES", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS") var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS") @@ -104,7 +104,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is var/allergysev = pick("deathly", "mildly", "severely", "contagiously") var/crew var/list/pos_crew = list() - for(var/mob/living/carbon/human/pos in player_list) + for(var/mob/living/carbon/human/pos in GLOB.player_list) pos_crew += pos.real_name if(pos_crew.len) crew = pick(pos_crew) @@ -183,7 +183,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]") if(botEmagChance) - for(var/obj/machinery/bot/bot in mob_list) + for(var/obj/machinery/bot/bot in GLOB.mob_list) if(prob(botEmagChance)) bot.Emag() */ diff --git a/code/modules/events/jellyfish_migration.dm b/code/modules/events/jellyfish_migration.dm index ff9e574bdec..55f252de097 100644 --- a/code/modules/events/jellyfish_migration.dm +++ b/code/modules/events/jellyfish_migration.dm @@ -34,7 +34,7 @@ // Check if any landmarks exist! These will use the carp spawn since they already would spawn in these similar spots. var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn" && (C.z in affecting_z)) spawn_locations.Add(C.loc) if(spawn_locations.len) // Okay we've got landmarks, lets use those! diff --git a/code/modules/events/maint_lurker.dm b/code/modules/events/maint_lurker.dm index e82950fefbc..e3be9994679 100644 --- a/code/modules/events/maint_lurker.dm +++ b/code/modules/events/maint_lurker.dm @@ -6,7 +6,7 @@ var/obj/effect/landmark/spawnspot = null var/list/possibleSpawnspots = list() - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == "maint_pred") possibleSpawnspots += L if(possibleSpawnspots.len) diff --git a/code/modules/events/maintenance_predator_vr.dm b/code/modules/events/maintenance_predator_vr.dm index b9b370f7e0d..8a475485036 100644 --- a/code/modules/events/maintenance_predator_vr.dm +++ b/code/modules/events/maintenance_predator_vr.dm @@ -6,7 +6,7 @@ var/obj/effect/landmark/spawnspot = null var/list/possibleSpawnspots = list() - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == "maint_pred") possibleSpawnspots += L if(possibleSpawnspots.len) diff --git a/code/modules/events/meteor_strike_vr.dm b/code/modules/events/meteor_strike_vr.dm index 4dfa9009741..8c45b8259bb 100644 --- a/code/modules/events/meteor_strike_vr.dm +++ b/code/modules/events/meteor_strike_vr.dm @@ -55,7 +55,7 @@ impacted = P break if(impacted) - for(var/mob/living/L in mob_list) + for(var/mob/living/L in GLOB.mob_list) if(!istype(L)) continue var/turf/mob_turf = get_turf(L) diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm index b03301477c6..c499a805474 100644 --- a/code/modules/events/money_spam.dm +++ b/code/modules/events/money_spam.dm @@ -35,7 +35,7 @@ // /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "") var/obj/item/pda/P var/list/viables = list() - for(var/obj/item/pda/check_pda in sortAtom(PDAs)) + for(var/obj/item/pda/check_pda in sort_names(PDAs)) if (!check_pda.owner || check_pda == src || check_pda.hidden) continue @@ -107,7 +107,7 @@ /* //VOREStation Removal: no need to spam the AI tenfold if (prob(50)) //Give the AI an increased chance to intercept the message - for(var/mob/living/silicon/ai/ai in mob_list) + for(var/mob/living/silicon/ai/ai in GLOB.mob_list) // Allows other AIs to intercept the message but the AI won't intercept their own message. if(ai.aiPDA != P && ai.aiPDA != src) ai.show_message(span_italics("Intercepted message from [sender] (Unknown / spam?) to [P:owner]: [message]")) diff --git a/code/modules/events/morph_spawn_vr.dm b/code/modules/events/morph_spawn_vr.dm index 9a0fc906705..f044c237608 100644 --- a/code/modules/events/morph_spawn_vr.dm +++ b/code/modules/events/morph_spawn_vr.dm @@ -6,7 +6,7 @@ var/obj/effect/landmark/spawnspot = null var/list/possibleSpawnspots = list() - for(var/obj/effect/landmark/newSpawnspot in landmarks_list) + for(var/obj/effect/landmark/newSpawnspot in GLOB.landmarks_list) if(newSpawnspot.name == "morphspawn") possibleSpawnspots += newSpawnspot if(possibleSpawnspots.len) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 72328902ed4..b34571d9c56 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -50,7 +50,7 @@ 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 GLOB.machines) MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2) - for(var/mob/living/silicon/ai/A in player_list) + for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, span_danger("Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].")) else diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 65c9642b8a1..7de8de81624 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -33,7 +33,7 @@ for(var/z in using_map.station_levels) SSradiation.z_radiate(locate(1, 1, z), radiation_level, 1) - for(var/mob/living/carbon/C in living_mob_list) + for(var/mob/living/carbon/C in GLOB.living_mob_list) if(!(C.z in using_map.station_levels) || C.isSynthetic() || isbelly(C.loc)) continue var/area/A = get_area(C) diff --git a/code/modules/events/ray_migration.dm b/code/modules/events/ray_migration.dm index 2bbc6c480dd..cdb3985ccd5 100644 --- a/code/modules/events/ray_migration.dm +++ b/code/modules/events/ray_migration.dm @@ -34,7 +34,7 @@ // Check if any landmarks exist! var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn" && (C.z in affecting_z)) spawn_locations.Add(C.loc) if(spawn_locations.len) // Okay we've got landmarks, lets use those! diff --git a/code/modules/events/roaming_wildlife.dm b/code/modules/events/roaming_wildlife.dm index 2bb50590d94..fbb7deb7703 100644 --- a/code/modules/events/roaming_wildlife.dm +++ b/code/modules/events/roaming_wildlife.dm @@ -7,7 +7,7 @@ /datum/event/roaming_wildlife/start() var/list/possible_spawns = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(istype(C, /obj/effect/landmark/wildlife)) var/obj/effect/landmark/wildlife/WLLM = C if(GLOB.world_time_season == "winter" && WLLM.wildlife_type == 1) //fish forbidden in winter because ice now aparently diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index b7e9f37552a..221ada8760d 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -5,7 +5,7 @@ /datum/event/rogue_drone/start() //spawn them at the same place as carp var/list/possible_spawns = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn") possible_spawns.Add(C) diff --git a/code/modules/events/shark_migration.dm b/code/modules/events/shark_migration.dm index 34965771bd4..be8661d5376 100644 --- a/code/modules/events/shark_migration.dm +++ b/code/modules/events/shark_migration.dm @@ -34,7 +34,7 @@ // Check if any landmarks exist! var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn" && (C.z in affecting_z)) spawn_locations.Add(C.loc) if(spawn_locations.len) // Okay we've got landmarks, lets use those! diff --git a/code/modules/events/solar_storm.dm b/code/modules/events/solar_storm.dm index 33c2c477edf..53367a67728 100644 --- a/code/modules/events/solar_storm.dm +++ b/code/modules/events/solar_storm.dm @@ -28,7 +28,7 @@ /datum/event/solar_storm/proc/radiate() // Note: Too complicated to be worth trying to use the radiation system for this. Its only in space anyway, so we make an exception in this case. - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) var/turf/T = get_turf(L) if(!T) continue diff --git a/code/modules/events/spacefish_migration.dm b/code/modules/events/spacefish_migration.dm index 11f7049dfbf..f1a490f9faf 100644 --- a/code/modules/events/spacefish_migration.dm +++ b/code/modules/events/spacefish_migration.dm @@ -49,7 +49,7 @@ // Check if any landmarks exist! var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == "carpspawn" && (C.z in affecting_z)) spawn_locations.Add(C.loc) if(spawn_locations.len) // Okay we've got landmarks, lets use those! diff --git a/code/modules/events/spontaneous_appendicitis.dm b/code/modules/events/spontaneous_appendicitis.dm index 7052a2a9b5d..5314632b143 100644 --- a/code/modules/events/spontaneous_appendicitis.dm +++ b/code/modules/events/spontaneous_appendicitis.dm @@ -1,5 +1,5 @@ /datum/event/spontaneous_appendicitis/start() - for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) + for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list)) var/area/A = get_area(H) if(!A) continue diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm index ddb4cbde529..45dacb0d070 100644 --- a/code/modules/events/viral_infection.dm +++ b/code/modules/events/viral_infection.dm @@ -1,4 +1,4 @@ -//var/global/list/event_viruses = list() // so that event viruses are kept around for admin logs, rather than being GCed +//GLOBAL_LIST_EMPTY(event_viruses) // so that event viruses are kept around for admin logs, rather than being GCed /datum/event/viral_infection var/list/viruses = list() @@ -34,7 +34,7 @@ if(!viruses.len) return var/list/candidates = list() //list of candidate keys - for(var/mob/living/carbon/human/G in player_list) + for(var/mob/living/carbon/human/G in GLOB.player_list) if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind)) var/turf/T = get_turf(G) if(T.z in using_map.station_levels) @@ -54,7 +54,7 @@ actual_severity-- used_viruses |= D - event_viruses |= used_viruses + GLOB.event_viruses |= used_viruses var/list/used_viruses_links = list() var/list/used_viruses_text = list() for(var/datum/disease2/disease/D in used_viruses) diff --git a/code/modules/events/viral_outbreak.dm b/code/modules/events/viral_outbreak.dm index 453d1017734..a6a05864179 100644 --- a/code/modules/events/viral_outbreak.dm +++ b/code/modules/events/viral_outbreak.dm @@ -13,7 +13,7 @@ /datum/event/viral_outbreak/start() var/list/candidates = list() //list of candidate keys - for(var/mob/living/carbon/human/G in player_list) + for(var/mob/living/carbon/human/G in GLOB.player_list) if(G.client && G.stat != DEAD) candidates += G if(!candidates.len) return diff --git a/code/modules/examine/descriptions/armor.dm b/code/modules/examine/descriptions/armor.dm index e83c739473d..ba27a49136c 100644 --- a/code/modules/examine/descriptions/armor.dm +++ b/code/modules/examine/descriptions/armor.dm @@ -85,12 +85,12 @@ var/list/covers = list() var/list/slots = list() - for(var/name in string_part_flags) - if(body_parts_covered & string_part_flags[name]) + for(var/name in GLOB.string_part_flags) + if(body_parts_covered & GLOB.string_part_flags[name]) covers += name - for(var/name in string_slot_flags) - if(slot_flags & string_slot_flags[name]) + for(var/name in GLOB.string_slot_flags) + if(slot_flags & GLOB.string_slot_flags[name]) slots += name if(covers.len) diff --git a/code/modules/examine/descriptions/weapons.dm b/code/modules/examine/descriptions/weapons.dm index 485eed954e2..e1c2ebf0eff 100644 --- a/code/modules/examine/descriptions/weapons.dm +++ b/code/modules/examine/descriptions/weapons.dm @@ -59,9 +59,9 @@ the appropriate verb in the chameleon items tab. Any beams or projectiles fired from this gun are actually holograms and useless for actual combat. \ Projecting these holograms over distance uses a little bit of charge." -/obj/item/gun/energy/chameleon/change(picked in gun_choices) //Making the gun change its help text to match the weapon's help text. +/obj/item/gun/energy/chameleon/change(picked in GLOB.gun_choices) //Making the gun change its help text to match the weapon's help text. ..(picked) - var/obj/O = gun_choices[picked] + var/obj/O = GLOB.gun_choices[picked] description_info = initial(O.description_info) /obj/item/gun/projectile/shotgun/pump diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index db429592335..d9fc06a94e3 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -33,7 +33,7 @@ // Quickly adds the boilerplate code to add an image and padding for the image. /proc/desc_panel_image(var/icon_state) - return "[icon2html(description_icons[icon_state], usr)] " + return "[icon2html(GLOB.description_icons[icon_state], usr)] " /mob/living/get_description_fluff() if(flavor_text) //Get flavor text for the green text. diff --git a/code/modules/examine/stat_icons.dm b/code/modules/examine/stat_icons.dm deleted file mode 100644 index c2c566383ab..00000000000 --- a/code/modules/examine/stat_icons.dm +++ /dev/null @@ -1,35 +0,0 @@ -//Some global icons for the examine tab to use to display some item properties. -var/global/list/description_icons = list( - "melee_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="melee_protection"), - "bullet_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bullet_protection"), - "laser_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="laser_protection"), - "energy_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="energy_protection"), - "bomb_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bomb_protection"), - "radiation_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="radiation_protection"), - "biohazard_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="biohazard_protection"), - - "offhand" = image(icon='icons/mob/screen1_stats.dmi',icon_state="offhand"), - - "welder" = image(icon='icons/obj/tools.dmi',icon_state="welder"), - "wirecutters" = image(icon='icons/obj/tools.dmi',icon_state="cutters"), - "screwdriver" = image(icon='icons/obj/tools.dmi',icon_state="screwdriver"), - "wrench" = image(icon='icons/obj/tools.dmi',icon_state="wrench"), - "crowbar" = image(icon='icons/obj/tools.dmi',icon_state="crowbar"), - "multitool" = image(icon='icons/obj/device.dmi',icon_state="multitool"), - "cable coil" = image(icon='icons/obj/power.dmi',icon_state="coil"), // VOREStation Edit - - "metal sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-metal"), - "plasteel sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-plasteel"), - - "air tank" = image(icon='icons/obj/tank.dmi',icon_state="oxygen"), - "connector" = image(icon='icons/obj/pipes.dmi',icon_state="connector"), - - "stunbaton" = image(icon='icons/obj/weapons.dmi',icon_state="stunbaton_active"), - "slimebaton" = image(icon='icons/obj/weapons.dmi',icon_state="slimebaton_active"), - - "power cell" = image(icon='icons/obj/power.dmi',icon_state="hcell"), - "device cell" = image(icon='icons/obj/power.dmi',icon_state="dcell"), - "weapon cell" = image(icon='icons/obj/power.dmi',icon_state="wcell"), - - "hatchet" = image(icon='icons/obj/weapons.dmi',icon_state="hatchet"), - ) diff --git a/code/modules/flufftext/fake_attacker.dm b/code/modules/flufftext/fake_attacker.dm index d3bce92f669..7305b27006d 100644 --- a/code/modules/flufftext/fake_attacker.dm +++ b/code/modules/flufftext/fake_attacker.dm @@ -112,7 +112,7 @@ if(!clone) // Get a randomized clone from the living mob's list, must be standing var/list/possible_clones = new/list() - for(var/mob/living/carbon/human/H in living_mob_list) + for(var/mob/living/carbon/human/H in GLOB.living_mob_list) if(H.stat || H.lying) continue possible_clones += H diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index 244d8fc17ed..a6b90fdbc57 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -36,12 +36,12 @@ // If the machine has multiple output modes, define them here. var/selected_option var/list/output_options = list() - var/list/datum/recipe/available_recipes + var/list/datum/recipe/appliance_available_recipes = list() var/container_type = null var/combine_first = FALSE // If TRUE, this appliance will do combination cooking before checking recipes - var/food_safety = FALSE //RS ADD - If true, the appliance automatically ejects food instead of burning it + var/food_safety = FALSE // If true, the appliance automatically ejects food instead of burning it var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject") var/static/radial_power = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_power") @@ -56,12 +56,10 @@ if(output_options.len) verbs += /obj/machinery/appliance/proc/choose_output - if (!available_recipes) - available_recipes = new - - for(var/datum/recipe/test as anything in subtypesof(/datum/recipe)) - if((appliancetype & initial(test.appliance))) - available_recipes += new test + if(!LAZYLEN(appliance_available_recipes)) + for(var/datum/recipe/test as anything in subtypesof(/datum/recipe)) + if((appliancetype & initial(test.appliance))) + appliance_available_recipes += new test /obj/machinery/appliance/Destroy() for(var/datum/cooking_item/CI as anything in cooking_objs) @@ -441,7 +439,7 @@ C = CI.container else C = src - recipe = select_recipe(available_recipes, C) + recipe = select_recipe(appliance_available_recipes, C) var/list/results = list() if(recipe) @@ -496,7 +494,7 @@ C = CI.container else C = src - recipe = select_recipe(available_recipes,C) + recipe = select_recipe(appliance_available_recipes,C) if (recipe) CI.result_type = 4//Recipe type, a specific recipe will transform the ingredients into a new food @@ -508,7 +506,7 @@ AM.forceMove(temp) //making multiple copies of a recipe from one container. For example, tons of fries - while (select_recipe(available_recipes,C) == recipe) + while (select_recipe(appliance_available_recipes,C) == recipe) var/list/TR = list() TR += recipe.make_food(C) for (var/atom/movable/AM in TR) //Move results to buffer diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index dfe89c10791..a863cc9ea62 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -19,9 +19,6 @@ var/broken = 0 // ={0,1,2} How broken is it??? var/circuit_item_capacity = 1 //how many items does the circuit add to max number of items var/item_level = 0 // items microwave can handle, 0 foodstuff, 1 materials - var/global/list/acceptable_items // List of the items you can put in - var/global/list/available_recipes // List of the recipes you can use - var/global/list/acceptable_reagents // List of the reagents you can put in var/global/max_n_of_items = 20 var/appliancetype = MICROWAVE @@ -42,26 +39,23 @@ default_apply_parts() - if(!available_recipes) - available_recipes = new + if(!LAZYLEN(GLOB.available_recipes)) for(var/datum/recipe/typepath as anything in subtypesof(/datum/recipe)) if((initial(typepath.appliance) & appliancetype)) - available_recipes += new typepath + GLOB.available_recipes += new typepath - acceptable_items = new - acceptable_reagents = new - for (var/datum/recipe/recipe in available_recipes) + for (var/datum/recipe/recipe in GLOB.available_recipes) for (var/item in recipe.items) - acceptable_items |= item + GLOB.acceptable_items |= item for (var/reagent in recipe.reagents) - acceptable_reagents |= reagent + GLOB.acceptable_reagents |= reagent // This will do until I can think of a fun recipe to use dionaea in - // will also allow anything using the holder item to be microwaved into // impure carbon. ~Z - acceptable_items |= /obj/item/holder - acceptable_items |= /obj/item/reagent_containers/food/snacks/grown - acceptable_items |= /obj/item/soulstone - acceptable_items |= /obj/item/fuel_assembly/supermatter + GLOB.acceptable_items |= /obj/item/holder + GLOB.acceptable_items |= /obj/item/reagent_containers/food/snacks/grown + GLOB.acceptable_items |= /obj/item/soulstone + GLOB.acceptable_items |= /obj/item/fuel_assembly/supermatter soundloop = new(list(src), FALSE) @@ -126,7 +120,7 @@ else //Otherwise bad luck!! to_chat(user, span_warning("It's dirty!")) return 1 - else if(is_type_in_list(O,acceptable_items)) + else if(is_type_in_list(O,GLOB.acceptable_items)) var/list/workingList = cookingContents() if(workingList.len>=(max_n_of_items + circuit_item_capacity)) //Adds component_parts to the maximum number of items. changed 1 to actually just be the circuit item capacity var. to_chat(user, span_warning("This [src] is full of ingredients, you cannot put more.")) @@ -184,7 +178,7 @@ if (!O.reagents) return 1 for (var/datum/reagent/R in O.reagents.reagent_list) - if (!(R.id in acceptable_reagents)) + if (!(R.id in GLOB.acceptable_reagents)) to_chat(user, span_warning("Your [O] contains components unsuitable for cookery.")) return 1 // gotta let afterattack resolve @@ -260,7 +254,7 @@ /obj/machinery/microwave/tgui_static_data(mob/user) var/list/data = ..() - var/datum/recipe/recipe = select_recipe(available_recipes,src) + var/datum/recipe/recipe = select_recipe(GLOB.available_recipes,src) data["recipe"] = recipe ? sanitize_css_class_name("[recipe.type]") : null data["recipe_name"] = recipe ? initial(recipe.result:name) : null @@ -371,7 +365,7 @@ abort() return - var/datum/recipe/recipe = select_recipe(available_recipes,src) + var/datum/recipe/recipe = select_recipe(GLOB.available_recipes,src) var/obj/cooked if(!recipe) dirty += 1 @@ -427,7 +421,7 @@ valid = 0 recipe.after_cook(src) - recipe = select_recipe(available_recipes,src) + recipe = select_recipe(GLOB.available_recipes,src) if(recipe && recipe.result == result) valid = 1 sleep(2) diff --git a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm index 4a43a65f54b..8f3899b77d3 100644 --- a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm +++ b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm @@ -21,7 +21,7 @@ if(prob(33)) command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg') // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms - for(var/mob/living/silicon/ai/A in player_list) + for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, span_boldwarning("
")) to_chat(A, span_boldwarning("[alert]")) to_chat(A, span_boldwarning("
")) diff --git a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm index d59d6488158..b3df2bde621 100644 --- a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm +++ b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm @@ -34,7 +34,7 @@ var/obj/item/pda/P = null var/list/viables = list() - for(var/obj/item/pda/check_pda in sortAtom(PDAs)) + for(var/obj/item/pda/check_pda in sort_names(PDAs)) if (!check_pda.owner || check_pda == src || check_pda.hidden) continue diff --git a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm index f75ceea0eca..86fc6dc7b9d 100644 --- a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm @@ -40,7 +40,7 @@ /datum/event2/event/solar_storm/proc/radiate() // Note: Too complicated to be worth trying to use the radiation system for this. Its only in space anyway, so we make an exception in this case. - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) var/turf/T = get_turf(L) if(!T) continue diff --git a/code/modules/gamemaster/event2/events/medical/appendicitis.dm b/code/modules/gamemaster/event2/events/medical/appendicitis.dm index cdb527990ff..0d900cf5a3a 100644 --- a/code/modules/gamemaster/event2/events/medical/appendicitis.dm +++ b/code/modules/gamemaster/event2/events/medical/appendicitis.dm @@ -17,7 +17,7 @@ /datum/event2/event/appendicitis/start() - for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) + for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list)) // Don't do it to SSD people. if(!H.client) continue diff --git a/code/modules/gamemaster/event2/events/mob_spawning.dm b/code/modules/gamemaster/event2/events/mob_spawning.dm index faa9656112a..1bd14a99247 100644 --- a/code/modules/gamemaster/event2/events/mob_spawning.dm +++ b/code/modules/gamemaster/event2/events/mob_spawning.dm @@ -16,7 +16,7 @@ // Check if any landmarks exist! var/list/spawn_locations = list() - for(var/obj/effect/landmark/C in landmarks_list) + for(var/obj/effect/landmark/C in GLOB.landmarks_list) if(C.name == landmark_name && (C.z in valid_z_levels)) spawn_locations.Add(C.loc) diff --git a/code/modules/gamemaster/event2/events/security/prison_break.dm b/code/modules/gamemaster/event2/events/security/prison_break.dm index 421335d52c4..dc4e1ee3571 100644 --- a/code/modules/gamemaster/event2/events/security/prison_break.dm +++ b/code/modules/gamemaster/event2/events/security/prison_break.dm @@ -56,7 +56,7 @@ /datum/event2/meta/prison_break/brig/get_odds_from_trapped_mobs() . = 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) if(is_mob_in_relevant_area(L)) // Don't count them if they're in security. if(!(L in GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY))) @@ -91,7 +91,7 @@ /datum/event2/meta/prison_break/xenobio/get_odds_from_trapped_mobs() . = 0 - for(var/mob/living/simple_mob/slime/xenobio/X in living_mob_list) + for(var/mob/living/simple_mob/slime/xenobio/X in GLOB.living_mob_list) if(is_mob_in_relevant_area(X)) . += 5 @@ -107,7 +107,7 @@ /datum/event2/meta/prison_break/virology/get_odds_from_trapped_mobs() . = 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) if(is_mob_in_relevant_area(L)) // Don't count them if they're in medical. if(!(L in GLOB.metric.count_people_in_department(DEPARTMENT_MEDICAL))) @@ -200,7 +200,7 @@ // Nobody reads the requests consoles so lets use the radio as well. GLOB.global_announcer.autosay(message, my_department, DEPARTMENT_ENGINEERING) - for(var/mob/living/silicon/ai/A in player_list) + for(var/mob/living/silicon/ai/A in GLOB.player_list) to_chat(A, span_danger("Malicious program detected in the [area_display_name] lighting and airlock control systems by [my_department]. \ Disabling the main breaker in the APCs will protect the APC's room from being compromised.")) diff --git a/code/modules/gamemaster/event2/events/security/surprise_carp.dm b/code/modules/gamemaster/event2/events/security/surprise_carp.dm index 3b495bccacb..9a2d0a7e2ed 100644 --- a/code/modules/gamemaster/event2/events/security/surprise_carp.dm +++ b/code/modules/gamemaster/event2/events/security/surprise_carp.dm @@ -16,7 +16,7 @@ /datum/event2/event/surprise_carp/set_up() var/list/potential_victims = list() - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) if(!(L.z in get_location_z_levels())) continue // Not on the right z-level. if(L.stat) diff --git a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm index 6f21cf41ee2..9c53eb48249 100644 --- a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm +++ b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm @@ -22,7 +22,7 @@ /datum/event2/event/ion_storm/start() // Ion laws. - for(var/mob/living/silicon/target in silicon_mob_list) + for(var/mob/living/silicon/target in GLOB.silicon_mob_list) if(target.z in get_location_z_levels()) // Don't ion law drons. if(istype(target, /mob/living/silicon/robot/drone)) @@ -42,7 +42,7 @@ target.show_laws() // Emag bots. - for(var/mob/living/bot/B in mob_list) + for(var/mob/living/bot/B in GLOB.mob_list) if(B.z in get_location_z_levels()) if(prob(bot_emag_chance)) B.emag_act(1) diff --git a/code/modules/ghosttrap/trap.dm b/code/modules/ghosttrap/trap.dm index 8ac5698566c..38a0427abce 100644 --- a/code/modules/ghosttrap/trap.dm +++ b/code/modules/ghosttrap/trap.dm @@ -39,7 +39,7 @@ GLOBAL_LIST(ghost_traps) /datum/ghosttrap/proc/request_player(var/mob/target, var/request_string) if(!target) return - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) if(!O.MayRespawn()) continue if(islist(ban_checks)) diff --git a/code/modules/holomap/mapper.dm b/code/modules/holomap/mapper.dm index b22715b9857..9bb8df4fbdd 100644 --- a/code/modules/holomap/mapper.dm +++ b/code/modules/holomap/mapper.dm @@ -106,11 +106,11 @@ if(uses_power && cell_type) cell = new cell_type(src) - debug_mappers_list = mapping_units - debug_beacons_list = mapping_beacons + debug_mappers_list = GLOB.mapping_units + debug_beacons_list = GLOB.mapping_beacons /obj/item/mapping_unit/Destroy() - mapping_units -= src + GLOB.mapping_units -= src last_run() @@ -175,7 +175,7 @@ hud_datum.apply_to_hud(user.hud_used) /obj/item/mapping_unit/proc/start_updates() - mapping_units += src + GLOB.mapping_units += src updating = TRUE START_PROCESSING(SSobj, src) process() @@ -183,7 +183,7 @@ /obj/item/mapping_unit/proc/stop_updates() - mapping_units -= src + GLOB.mapping_units -= src STOP_PROCESSING(SSobj, src) updating = FALSE if(hud_item) @@ -261,8 +261,8 @@ map_app.icon = icon(SSholomaps.holoMiniMaps[T.z]) // Apply markers - for(var/marker in holomap_markers) - var/datum/holomap_marker/holomarker = holomap_markers[marker] + for(var/marker in GLOB.holomap_markers) + var/datum/holomap_marker/holomarker = GLOB.holomap_markers[marker] if(holomarker.z == T_z && holomarker.filter & mapper_filter) var/image/markerImage = image(holomarker.icon,holomarker.id) markerImage.plane = FLOAT_PLANE @@ -285,7 +285,7 @@ extras_holder.pixel_y = bgmap.pixel_y = -1*T_y + offset_y // Populate other mapper icons - for(var/obj/item/mapping_unit/HC as anything in mapping_units) + for(var/obj/item/mapping_unit/HC as anything in GLOB.mapping_units) if(HC.mapper_filter != mapper_filter) continue var/mob_indicator = HOLOMAP_ERROR @@ -344,7 +344,7 @@ extras += mark // Marker beacon items - for(var/obj/item/holomap_beacon/HB as anything in mapping_beacons) + for(var/obj/item/holomap_beacon/HB as anything in GLOB.mapping_beacons) if(HB.mapper_filter != mapper_filter) continue @@ -410,22 +410,22 @@ . = ..() if(in_list) // mapped in turned on in_list = TRUE - mapping_beacons += src + GLOB.mapping_beacons += src icon_state = initial(icon_state) + in_list ? "_on" : "" /obj/item/holomap_beacon/attack_self(mob/user) if(!in_list) in_list = TRUE - mapping_beacons += src + GLOB.mapping_beacons += src else in_list = FALSE - mapping_beacons -= src + GLOB.mapping_beacons -= src icon_state = "[initial(icon_state)][in_list ? "_on" : ""]" to_chat(user,span_notice("The [src] is now [in_list ? "broadcasting" : "disabled"].")) /obj/item/holomap_beacon/Destroy() if(in_list) - mapping_beacons -= src + GLOB.mapping_beacons -= src return ..() /obj/item/holomap_beacon/deathsquad diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm index 8de27696f55..8d65eb69a9b 100644 --- a/code/modules/holomap/station_holomap.dm +++ b/code/modules/holomap/station_holomap.dm @@ -260,4 +260,4 @@ holomarker.x = src.x holomarker.y = src.y holomarker.z = src.z - holomap_markers["[id]_\ref[src]"] = holomarker + GLOB.holomap_markers["[id]_\ref[src]"] = holomarker diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 7e65fdf1087..7a505338569 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -274,9 +274,7 @@ weight = 1 pass_stack_colors = TRUE -var/global/list/datum/stack_recipe/wax_recipes = list( \ - new/datum/stack_recipe("candle", /obj/item/flame/candle) \ -) + /obj/item/bee_pack name = "bee pack" diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 26afcfedd61..f16fb1db039 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -1,4 +1,4 @@ -var/global/list/plant_seed_sprites = list() +GLOBAL_LIST_EMPTY(plant_seed_sprites) GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds) @@ -34,22 +34,22 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds) var/is_seeds = ((seed.seed_noun in list("seeds","pits","nodes")) ? 1 : 0) var/image/seed_mask var/seed_base_key = "base-[is_seeds ? seed.get_trait(TRAIT_PLANT_COLOUR) : "spores"]" - if(plant_seed_sprites[seed_base_key]) - seed_mask = plant_seed_sprites[seed_base_key] + if(GLOB.plant_seed_sprites[seed_base_key]) + seed_mask = GLOB.plant_seed_sprites[seed_base_key] else seed_mask = image('icons/obj/seeds.dmi',"[is_seeds ? "seed" : "spore"]-mask") if(is_seeds) // Spore glass bits aren't coloured. seed_mask.color = seed.get_trait(TRAIT_PLANT_COLOUR) - plant_seed_sprites[seed_base_key] = seed_mask + GLOB.plant_seed_sprites[seed_base_key] = seed_mask var/image/seed_overlay var/seed_overlay_key = "[seed.get_trait(TRAIT_PRODUCT_ICON)]-[seed.get_trait(TRAIT_PRODUCT_COLOUR)]" - if(plant_seed_sprites[seed_overlay_key]) - seed_overlay = plant_seed_sprites[seed_overlay_key] + if(GLOB.plant_seed_sprites[seed_overlay_key]) + seed_overlay = GLOB.plant_seed_sprites[seed_overlay_key] else seed_overlay = image('icons/obj/seeds.dmi',"[seed.get_trait(TRAIT_PRODUCT_ICON)]") seed_overlay.color = seed.get_trait(TRAIT_PRODUCT_COLOUR) - plant_seed_sprites[seed_overlay_key] = seed_overlay + GLOB.plant_seed_sprites[seed_overlay_key] = seed_overlay add_overlay(seed_mask) add_overlay(seed_overlay) diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index d1cbcb7dde3..4bab227ed4d 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -542,10 +542,10 @@ /obj/item/integrated_circuit/input/microphone/Initialize(mapload) . = ..() - listening_objects += src + GLOB.listening_objects += src /obj/item/integrated_circuit/input/microphone/Destroy() - listening_objects -= src + GLOB.listening_objects -= src return ..() /obj/item/integrated_circuit/input/microphone/hear_talk(mob/M, list/message_pieces, verb) diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm index 15de3c5680a..e9cf75ab343 100644 --- a/code/modules/integrated_electronics/subtypes/output.dm +++ b/code/modules/integrated_electronics/subtypes/output.dm @@ -152,7 +152,7 @@ /obj/item/integrated_circuit/output/text_to_speech/advanced/Initialize(mapload) . = ..() my_voice = new (src) - mob_list -= my_voice // no life() ticks + GLOB.mob_list -= my_voice // no life() ticks my_voice.name = "TTS Circuit" /obj/item/integrated_circuit/output/text_to_speech/advanced/do_work() diff --git a/code/modules/keybindings/bindings_movekeys.dm b/code/modules/keybindings/bindings_movekeys.dm index bd15f100964..8888cdfc4f0 100644 --- a/code/modules/keybindings/bindings_movekeys.dm +++ b/code/modules/keybindings/bindings_movekeys.dm @@ -1,18 +1,3 @@ -// TODO - Optimize this into numerics if this ends up working out -var/global/list/MOVE_KEY_MAPPINGS = list( - "North" = NORTH_KEY, - "South" = SOUTH_KEY, - "East" = EAST_KEY, - "West" = WEST_KEY, - "W" = W_KEY, - "A" = A_KEY, - "S" = S_KEY, - "D" = D_KEY, - "Shift" = SHIFT_KEY, - "Ctrl" = CTRL_KEY, - "Alt" = ALT_KEY, -) - // These verbs are called for all movemen key press and release events /client/verb/moveKeyDown(movekeyName as text) set instant = TRUE @@ -21,7 +6,7 @@ var/global/list/MOVE_KEY_MAPPINGS = list( set name = "KeyDown" // Map text sent by skin.dmf to our numeric codes. (This can be optimized away once we update skin.dmf) - var/movekey = MOVE_KEY_MAPPINGS[movekeyName] + var/movekey = GLOB.MOVE_KEY_MAPPINGS[movekeyName] // Validate input. Must be one (and only one) of the key codes) if(isnull(movekey) || (movekey & ~0xFFF) || (movekey & (movekey - 1))) @@ -53,7 +38,7 @@ var/global/list/MOVE_KEY_MAPPINGS = list( set name = "KeyUp" // Map text sent by skin.dmf to our numeric codes. (This can be optimized away once we update skin.dmf) - var/movekey = MOVE_KEY_MAPPINGS[movekeyName] + var/movekey = GLOB.MOVE_KEY_MAPPINGS[movekeyName] // Validate input. Must be one (and only one) of the key codes) if(isnull(movekey) || (movekey & ~0xFFF) || (movekey & (movekey - 1))) diff --git a/code/modules/materials/sheets/metals/rods.dm b/code/modules/materials/sheets/metals/rods.dm index 10131b2374a..892bb3da019 100644 --- a/code/modules/materials/sheets/metals/rods.dm +++ b/code/modules/materials/sheets/metals/rods.dm @@ -38,10 +38,6 @@ else icon_state = "rods" -var/global/list/datum/stack_recipe/rods_recipes = list( \ - new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 0), - new/datum/stack_recipe("catwalk", /obj/structure/catwalk, 2, time = 80, one_per_turf = 1, on_floor = 1)) - /obj/item/stack/rods/attackby(obj/item/W, mob/user) if(W.has_tool_quality(TOOL_WELDER)) var/obj/item/weldingtool/WT = W.get_welder() diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm index 58e9e815299..0b1279aa28a 100644 --- a/code/modules/media/mediamanager.dm +++ b/code/modules/media/mediamanager.dm @@ -27,7 +27,7 @@ /hook/roundend/proc/stop_all_media() log_debug("Stopping all playing media...") // Stop all music. - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if(M && M.client) M.stop_all_music() // SHITTY HACK TO AVOID RACE CONDITION WITH SERVER REBOOT. diff --git a/code/modules/metric/activity.dm b/code/modules/metric/activity.dm index dd93b901793..21772f18625 100644 --- a/code/modules/metric/activity.dm +++ b/code/modules/metric/activity.dm @@ -27,7 +27,7 @@ return var/departmental_activity = 0 var/departmental_size = 0 - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(guess_department(M) != department) // Ignore people outside the department we're assessing. continue departmental_activity += assess_player_activity(M) @@ -66,7 +66,7 @@ /datum/metric/proc/assess_all_living_mobs() // Living refers to the type, not the stat variable. . = 0 var/num = 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) . += assess_player_activity(L) num++ if(num) @@ -75,7 +75,7 @@ /datum/metric/proc/assess_all_dead_mobs() // Ditto. . = 0 var/num = 0 - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) . += assess_player_activity(O) num++ if(num) @@ -84,7 +84,7 @@ /datum/metric/proc/assess_all_outdoor_mobs() . = 0 var/num = 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) var/turf/T = get_turf(L) if(istype(T) && !istype(T, /turf/space) && T.is_outdoors()) . += assess_player_activity(L) diff --git a/code/modules/metric/count.dm b/code/modules/metric/count.dm index ba05bc76e22..47db6bae609 100644 --- a/code/modules/metric/count.dm +++ b/code/modules/metric/count.dm @@ -4,7 +4,7 @@ /datum/metric/proc/count_all_outdoor_mobs(var/cutoff = 75) var/num = 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) var/turf/T = get_turf(L) if(istype(T) && !istype(T, /turf/space) && T.is_outdoors()) if(assess_player_activity(L) >= cutoff) @@ -13,7 +13,7 @@ /datum/metric/proc/count_all_space_mobs(var/cutoff = 75, var/respect_z = TRUE) var/num = 0 - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) var/turf/T = get_turf(L) if(istype(T, /turf/space) && istype(T.loc, /area/space)) if(respect_z && !(L.z in using_map.station_levels)) @@ -26,7 +26,7 @@ // Note that `ignore_synths` makes this proc ignore posibrains and drones, but NOT cyborgs, as they are still the same species in-universe. /datum/metric/proc/count_all_of_specific_species(species_name, ignore_synths = TRUE, cutoff = 75, respect_z = TRUE) var/num = 0 - for(var/mob/living/carbon/human/H in player_list) + for(var/mob/living/carbon/human/H in GLOB.player_list) if(respect_z && !(H.z in using_map.station_levels)) continue if(ignore_synths && H.isSynthetic() && H.get_FBP_type() != FBP_CYBORG) @@ -39,7 +39,7 @@ // Gives a count of how many FBPs of a specific type there are on the station. /datum/metric/proc/count_all_FBPs_of_kind(desired_FBP_class, cutoff = 75, respect_z = TRUE) var/num = 0 - for(var/mob/living/carbon/human/H in player_list) + for(var/mob/living/carbon/human/H in GLOB.player_list) if(respect_z && !(H.z in using_map.station_levels)) continue if(H.get_FBP_type() != desired_FBP_class) @@ -58,7 +58,7 @@ /datum/metric/proc/get_all_antags(cutoff = 75) . = list() - for(var/mob/living/L in player_list) + for(var/mob/living/L in GLOB.player_list) if(L.mind && player_is_antag(L.mind) && assess_player_activity(L) >= cutoff) . += L diff --git a/code/modules/metric/department.dm b/code/modules/metric/department.dm index 0858e392ee0..2f49c7e75c0 100644 --- a/code/modules/metric/department.dm +++ b/code/modules/metric/department.dm @@ -69,7 +69,7 @@ . = list() if(!department) return - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) // Do not count AI's shells if(isrobot(M)) var/mob/living/silicon/robot/R = M @@ -89,7 +89,7 @@ return // Now find people with the job name. - for(var/M in player_list) + for(var/M in GLOB.player_list) var/datum/job/their_job = guess_job(M) if(!istype(their_job)) // No job was guessed. continue diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index c997512dae3..fb3966fff68 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -1,5 +1,3 @@ -var/global/list/total_extraction_beacons = list() - /obj/item/extraction_pack name = "fulton extraction pack" desc = "A balloon that can be used to extract equipment or personnel to a Fulton Recovery Beacon. Anything not bolted down can be moved. Link the pack to a beacon by using the pack in hand." @@ -18,7 +16,7 @@ var/global/list/total_extraction_beacons = list() /obj/item/extraction_pack/attack_self(mob/user) var/list/possible_beacons = list() - for(var/obj/structure/extraction_point/EP as anything in global.total_extraction_beacons) + for(var/obj/structure/extraction_point/EP as anything in GLOB.total_extraction_beacons) if(EP.beacon_network in beacon_networks) possible_beacons += EP @@ -162,10 +160,10 @@ var/global/list/total_extraction_beacons = list() /obj/structure/extraction_point/Initialize(mapload) . = ..() name += " ([rand(100,999)]) ([get_area_name(src, TRUE)])" - global.total_extraction_beacons += src + GLOB.total_extraction_beacons += src /obj/structure/extraction_point/Destroy() - global.total_extraction_beacons -= src + GLOB.total_extraction_beacons -= src . = ..() /obj/effect/extraction_holder diff --git a/code/modules/mob/dead/corpse.dm b/code/modules/mob/dead/corpse.dm index 8391c6a656f..2440b43af7a 100644 --- a/code/modules/mob/dead/corpse.dm +++ b/code/modules/mob/dead/corpse.dm @@ -53,8 +53,8 @@ else M.set_species(species) if(tail_type && tail_type.len) - if(tail_type[1] in tail_styles_list) - M.tail_style = tail_styles_list[tail_type[1]] + if(tail_type[1] in GLOB.tail_styles_list) + M.tail_style = GLOB.tail_styles_list[tail_type[1]] if(tail_type.len > 1) var/list/color_rgb_list = hex2rgb(tail_type[2]) M.r_tail = color_rgb_list[1] @@ -72,8 +72,8 @@ M.b_tail3 = color_rgb_list[3] M.update_tail_showing() if(ear_type && ear_type.len) - if(ear_type[1] in ear_styles_list) - M.ear_style = ear_styles_list[ear_type[1]] + if(ear_type[1] in GLOB.ear_styles_list) + M.ear_style = GLOB.ear_styles_list[ear_type[1]] if(ear_type.len > 1) var/list/color_rgb_list = hex2rgb(ear_type[2]) M.r_ears = color_rgb_list[1] @@ -91,14 +91,14 @@ M.b_ears3 = color_rgb_list[3] M.update_hair() // handle secondary ears - if(length(ear_secondary_type) && (ear_secondary_type[1] in global.ear_styles_list)) - M.ear_secondary_style = global.ear_styles_list[ear_secondary_type[1]] + if(length(ear_secondary_type) && (ear_secondary_type[1] in GLOB.ear_styles_list)) + M.ear_secondary_style = GLOB.ear_styles_list[ear_secondary_type[1]] if(length(ear_secondary_type) > 1) M.ear_secondary_colors = ear_secondary_type.Copy(2, min(length(GLOB.fancy_sprite_accessory_color_channel_names), length(ear_secondary_type)) + 1) if(wing_type && wing_type.len) - if(wing_type[1] in wing_styles_list) - M.wing_style = wing_styles_list[wing_type[1]] + if(wing_type[1] in GLOB.wing_styles_list) + M.wing_style = GLOB.wing_styles_list[wing_type[1]] if(wing_type.len > 1) var/list/color_rgb_list = hex2rgb(wing_type[2]) M.r_wing = color_rgb_list[1] diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d79e412bd67..b07875505ec 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -39,57 +39,6 @@ var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil. var/toggled_invisible = 0 var/ghost_sprite = null - var/global/list/possible_ghost_sprites = list( - "Clear" = "blank", - "Green Blob" = "otherthing", - "Bland" = "ghost", - "Robed-B" = "ghost1", - "Robed-BAlt" = "ghost2", - "King" = "ghostking", - "Shade" = "shade", - "Hecate" = "ghost-narsie", - "Glowing Statue" = "armour", - "Artificer" = "artificer", - "Behemoth" = "behemoth", - "Harvester" = "harvester", - "Wraith" = "wraith", - "Viscerator" = "viscerator", - "Corgi" = "corgi", - "Tamaskan" = "tamaskan", - "Black Cat" = "blackcat", - "Lizard" = "lizard", - "Goat" = "goat", - "Space Bear" = "bear", - "Bats" = "bat", - "Chicken" = "chicken_white", - "Parrot"= "parrot_fly", - "Goose" = "goose", - "Penguin" = "penguin", - "Brown Crab" = "crab", - "Gray Crab" = "evilcrab", - "Trout" = "trout-swim", - "Salmon" = "salmon-swim", - "Pike" = "pike-swim", - "Koi" = "koi-swim", - "Carp" = "carp", - "Red Robes" = "robe_red", - "Faithless" = "faithless", - "Shadowform" = "forgotten", - "Dark Ethereal" = "bloodguardian", - "Holy Ethereal" = "lightguardian", - "Red Elemental" = "magicRed", - "Blue Elemental" = "magicBlue", - "Pink Elemental" = "magicPink", - "Orange Elemental" = "magicOrange", - "Green Elemental" = "magicGreen", - "Daemon" = "daemon", - "Guard Spider" = "guard", - "Hunter Spider" = "hunter", - "Nurse Spider" = "nurse", - "Rogue Drone" = "drone", - "ED-209" = "ed209", - "Beepsky" = "secbot" - ) var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners. var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns @@ -150,7 +99,7 @@ real_name = name animate(src, pixel_y = 2, time = 10, loop = -1) animate(pixel_y = default_pixel_y, time = 10, loop = -1) - observer_mob_list += src + GLOB.observer_mob_list += src . = ..() visualnet = ghostnet @@ -166,7 +115,7 @@ /mob/observer/dead/Topic(href, href_list) if (href_list["track"]) - var/mob/target = locate(href_list["track"]) in mob_list + var/mob/target = locate(href_list["track"]) in GLOB.mob_list if(target) ManualFollow(target) if(href_list["reenter"]) @@ -599,7 +548,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/mob/M = following M.following_mobs -= src stop_following() - observer_mob_list -= src + GLOB.observer_mob_list -= src for(var/datum/chunk/ghost/ghost_chunks in visibleChunks) ghost_chunks.remove(src) return ..() @@ -1022,7 +971,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/finalized = "No" while(finalized == "No" && src.client) - choice = tgui_input_list(src, "What would you like to use for your ghost sprite?", "Ghost Sprite", possible_ghost_sprites) + choice = tgui_input_list(src, "What would you like to use for your ghost sprite?", "Ghost Sprite", GLOB.possible_ghost_sprites) if(!choice) return @@ -1033,10 +982,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(icon_state && icon) previous_state = icon_state - icon_state = possible_ghost_sprites[choice] + icon_state = GLOB.possible_ghost_sprites[choice] finalized = tgui_alert(src, "Look at your sprite. Is this what you wish to use?","Ghost Sprite",list("No","Yes")) - ghost_sprite = possible_ghost_sprites[choice] + ghost_sprite = GLOB.possible_ghost_sprites[choice] if(!finalized || finalized == "No") icon_state = previous_state diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index 3313316b624..6cc93192045 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -3,7 +3,7 @@ set name = "Join Into Soulcatcher" set desc = "Select a player with a working NIF + Soulcatcher NIFSoft to join into it." - var/picked = tgui_input_list(src, "Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player", player_list) + var/picked = tgui_input_list(src, "Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player", GLOB.player_list) //Didn't pick anyone or picked a null if(!picked) diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 1096deb288e..448ff6ccad6 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -8,7 +8,7 @@ icon = null invisibility = INVISIBILITY_ABSTRACT update_canmove() - dead_mob_list -= src + GLOB.dead_mob_list -= src var/atom/movable/overlay/animation = null animation = new(loc) @@ -42,7 +42,7 @@ flick(anim, animation) new remains(loc) - dead_mob_list -= src + GLOB.dead_mob_list -= src spawn(15) if(animation) qdel(animation) if(src) qdel(src) @@ -62,7 +62,7 @@ flick(anim, animation) - dead_mob_list -= src + GLOB.dead_mob_list -= src spawn(15) if(animation) qdel(animation) if(src) qdel(src) @@ -111,8 +111,8 @@ timeofdeath = world.time if(mind) mind.store_memory("Time of death: [stationtime2text()]", 0) - living_mob_list -= src - dead_mob_list |= src + GLOB.living_mob_list -= src + GLOB.dead_mob_list |= src set_respawn_timer() update_icon() diff --git a/code/modules/mob/freelook/ai/chunk.dm b/code/modules/mob/freelook/ai/chunk.dm index 8f5a9317eca..cb8104513a0 100644 --- a/code/modules/mob/freelook/ai/chunk.dm +++ b/code/modules/mob/freelook/ai/chunk.dm @@ -23,7 +23,7 @@ for(var/turf/t in c.can_see()) visible[t] = t - for(var/mob/living/silicon/ai/AI in living_mob_list) + for(var/mob/living/silicon/ai/AI in GLOB.living_mob_list) for(var/turf/t in AI.seen_camera_turfs()) visible[t] = t diff --git a/code/modules/mob/freelook/mask/chunk.dm b/code/modules/mob/freelook/mask/chunk.dm index 5042c126b9f..3e533f1d6b7 100644 --- a/code/modules/mob/freelook/mask/chunk.dm +++ b/code/modules/mob/freelook/mask/chunk.dm @@ -10,7 +10,7 @@ obfuscation = new /datum/obfuscation/cult() /datum/chunk/cult/acquireVisibleTurfs(var/list/visible) - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) for(var/turf/t in L.seen_cult_turfs()) visible[t] = t diff --git a/code/modules/mob/language/language.dm b/code/modules/mob/language/language.dm index 4f13554f7ac..afbb6380f70 100644 --- a/code/modules/mob/language/language.dm +++ b/code/modules/mob/language/language.dm @@ -137,18 +137,18 @@ //VOREStation Edit Start if(speaker.hive_lang_range == -1) var/turf/t = get_turf(speaker) - for(var/mob/player in player_list) + for(var/mob/player in GLOB.player_list) var/turf/b = get_turf(player) if (t.z == b.z) player.hear_broadcast(src, speaker, speaker_mask, message) else if(speaker.hive_lang_range) var/turf/t = get_turf(speaker) - for(var/mob/player in player_list) + for(var/mob/player in GLOB.player_list) var/turf/b = get_turf(player) if(get_dist(t,b) <= speaker.hive_lang_range) player.hear_broadcast(src, speaker, speaker_mask, message) else - for(var/mob/player in player_list) + for(var/mob/player in GLOB.player_list) player.hear_broadcast(src, speaker, speaker_mask, message) //VOREStation Edit End diff --git a/code/modules/mob/language/synthetic.dm b/code/modules/mob/language/synthetic.dm index 1eb140d7b8f..9dfde1098df 100644 --- a/code/modules/mob/language/synthetic.dm +++ b/code/modules/mob/language/synthetic.dm @@ -23,14 +23,14 @@ var/message_start = "[name], " + span_name("[speaker.name]") var/message_body = span_message("[speaker.say_quote(message)], \"[message]\"") - for (var/mob/M in dead_mob_list) + for (var/mob/M in GLOB.dead_mob_list) if(!isnewplayer(M) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping var/message_to_send = span_binarysay("[message_start] ([ghost_follow_link(speaker, M)]) [message_body]") if(M.check_mentioned(message) && M.client?.prefs?.read_preference(/datum/preference/toggle/check_mention)) message_to_send = span_large(span_bold("[message_to_send]")) M.show_message(message_to_send, 2) - for (var/mob/living/S in living_mob_list) + for (var/mob/living/S in GLOB.living_mob_list) if(drone_only && !istype(S,/mob/living/silicon/robot/drone)) continue else if(isAI(S)) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index e50ecee3416..85b7c1c2eb7 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -24,7 +24,7 @@ /mob/living/bot/cleanbot/Destroy() if(target) - cleanbot_reserved_turfs -= target + GLOB.cleanbot_reserved_turfs -= target return ..() /mob/living/bot/cleanbot/handleIdle() @@ -79,17 +79,17 @@ continue // already checked this one else if(confirmTarget(D)) target = D - cleanbot_reserved_turfs += D + GLOB.cleanbot_reserved_turfs += D return /mob/living/bot/resetTarget() - cleanbot_reserved_turfs -= target + GLOB.cleanbot_reserved_turfs -= target ..() /mob/living/bot/cleanbot/confirmTarget(var/obj/effect/decal/cleanable/D) if(!..()) return FALSE - if(D.loc in cleanbot_reserved_turfs) + if(D.loc in GLOB.cleanbot_reserved_turfs) return FALSE for(var/T in target_types) if(istype(D, T)) @@ -127,7 +127,7 @@ return qdel(D) if(D == target) - cleanbot_reserved_turfs -= target + GLOB.cleanbot_reserved_turfs -= target target = null else if(D == src) for(var/obj/effect/O in loc) diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index c576a114878..df89b0c024e 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -69,8 +69,8 @@ brainmob.container = src brainmob.set_stat(CONSCIOUS) brainmob.blinded = 0 //VOREedit Fixes MMIs vision - dead_mob_list -= brainmob//Update dem lists - living_mob_list += brainmob + GLOB.dead_mob_list -= brainmob//Update dem lists + GLOB.living_mob_list += brainmob user.drop_item() brainobj = O @@ -115,7 +115,7 @@ brain.preserved = FALSE brainmob.container = null//Reset brainmob mmi var. brainmob.loc = brain//Throw mob into brain. - living_mob_list -= brainmob//Get outta here + GLOB.living_mob_list -= brainmob//Get outta here brain.brainmob = brainmob//Set the brain to use the brainmob brainmob = null//Set mmi brainmob var to null @@ -196,7 +196,7 @@ src.brainmob.container = src src.brainmob.set_stat(CONSCIOUS) src.brainmob.silent = 0 - dead_mob_list -= src.brainmob + GLOB.dead_mob_list -= src.brainmob /obj/item/mmi/digital/attackby(var/obj/item/O as obj, var/mob/user as mob) return //Doesn't do anything right now because none of the things that can be done to a regular MMI make any sense for these diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 3e4b32e4150..5fedacac011 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -23,7 +23,7 @@ addtimer(CALLBACK(src, PROC_REF(reset_search)), 60 SECONDS, TIMER_DELETE_ME) /obj/item/mmi/digital/posibrain/proc/request_player() - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) if(!O.MayRespawn()) continue if(jobban_isbanned(O, JOB_AI) && jobban_isbanned(O, JOB_CYBORG)) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 7290601a618..0821f0af958 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -46,7 +46,7 @@ if(h_style == hair_style) return - if(!(hair_style in hair_styles_list)) + if(!(hair_style in GLOB.hair_styles_list)) return h_style = hair_style @@ -76,7 +76,7 @@ if(f_style == facial_hair_style) return - if(!(facial_hair_style in facial_hair_styles_list)) + if(!(facial_hair_style in GLOB.facial_hair_styles_list)) return f_style = facial_hair_style @@ -200,8 +200,8 @@ if(H) use_species = H.data.get_species_bodytype(src) var/list/valid_hairstyles = new() - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/S = hair_styles_list[hairstyle] + for(var/hairstyle in GLOB.hair_styles_list) + var/datum/sprite_accessory/S = GLOB.hair_styles_list[hairstyle] if(check_gender && gender != NEUTER) if(gender == MALE && S.gender == FEMALE) @@ -226,8 +226,8 @@ if(H) use_species = H.data.get_species_bodytype(src) var/list/valid_facial_hairstyles = new() - for(var/facialhairstyle in facial_hair_styles_list) - var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] + for(var/facialhairstyle in GLOB.facial_hair_styles_list) + var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facialhairstyle] if(gender != NEUTER) if(gender == MALE && S.gender == FEMALE) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index ec8de3c6156..80d92ba5988 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -90,7 +90,7 @@ var/area/A = get_area(src) if(!(A?.flag_check(AREA_BLOCK_SUIT_SENSORS)) && isbelly(loc)) // SSgame_master.adjust_danger(gibbed ? 40 : 20) // We don't use SSgame_master yet. - for(var/mob/observer/dead/O in mob_list) + for(var/mob/observer/dead/O in GLOB.mob_list) if(O.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) to_chat(O, span_deadsay(span_bold("[src]") + " has died in " + span_bold("[get_area(src)]") + ". [ghost_follow_link(src, O)] ")) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8f6d5a4ebbd..d5565ec657d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -52,7 +52,7 @@ nutrition = rand(200,400) - human_mob_list |= src + GLOB.human_mob_list |= src . = ..() @@ -75,14 +75,14 @@ var/animal = pick("cow","chicken_brown", "chicken_black", "chicken_white", "chick", "mouse_brown", "mouse_gray", "mouse_white", "lizard", "cat2", "goose", "penguin") var/image/img = image('icons/mob/animal.dmi', src, animal) img.override = TRUE - add_alt_appearance("animals", img, displayTo = alt_farmanimals) + add_alt_appearance("animals", img, displayTo = GLOB.alt_farmanimals) /mob/living/carbon/human/Destroy() - human_mob_list -= src + GLOB.human_mob_list -= src QDEL_NULL_LIST(organs) if(nif) QDEL_NULL(nif) - alt_farmanimals -= src + GLOB.alt_farmanimals -= src worn_clothing.Cut() if(stored_blob) @@ -965,7 +965,7 @@ remove_verb(src, /mob/living/carbon/human/proc/remotesay) return var/list/creatures = list() - for(var/mob/living/carbon/h in mob_list) + for(var/mob/living/carbon/h in GLOB.mob_list) if(h == src) // Don't target self continue creatures += h @@ -980,7 +980,7 @@ target.show_message(span_filter_say("[span_blue("You hear a voice that seems to echo around the room: [say]")]")) src.show_message(span_filter_say("[span_blue("You project your mind into [target.real_name]: [say]")]")) log_say("(TPATH to [key_name(target)]) [say]",src) - for(var/mob/observer/dead/G in mob_list) + for(var/mob/observer/dead/G in GLOB.mob_list) G.show_message(span_filter_say(span_italics("Telepathic message from " + span_bold("[src]") + " to " + span_bold("[target]") + ": [say]"))) /mob/living/carbon/human/proc/remoteobserve() @@ -1003,7 +1003,7 @@ var/list/mob/creatures = list() var/turf/current = get_turf(src) // Needs to be on station or same z to perform telepathy - for(var/mob/living/carbon/h in mob_list) + for(var/mob/living/carbon/h in GLOB.mob_list) var/turf/temp_turf = get_turf(h) if(!istype(temp_turf,/turf/)) // Nullcheck fix continue diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index f98b62eed68..35fbac84712 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -603,10 +603,10 @@ visible_message(span_warning("\The [src]'s body convulses a bit.")) // REVIVE TIME, basically stolen from defib.dm - dead_mob_list.Remove(src) - if((src in living_mob_list) || (src in dead_mob_list)) + GLOB.dead_mob_list.Remove(src) + if((src in GLOB.living_mob_list) || (src in GLOB.dead_mob_list)) WARNING("Mob [src] was cpr revived by [reviver], but already in the living or dead list still!") - living_mob_list += src + GLOB.living_mob_list += src timeofdeath = 0 set_stat(UNCONSCIOUS) //Life() can bring them back to consciousness if it needs to. diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index c48454119fc..eb694ac6963 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -11,15 +11,15 @@ return if(h_style) - var/datum/sprite_accessory/hair/hair_style = hair_styles_list[h_style] + var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_list[h_style] var/selected_string if(!(hair_style.flags & HAIR_TIEABLE)) to_chat(src, span_warning("Your hair isn't long enough to tie.")) return else var/list/datum/sprite_accessory/hair/valid_hairstyles = list() - for(var/hair_string in hair_styles_list) - var/datum/sprite_accessory/hair/test = hair_styles_list[hair_string] + for(var/hair_string in GLOB.hair_styles_list) + var/datum/sprite_accessory/hair/test = GLOB.hair_styles_list[hair_string] if(test.flags & HAIR_TIEABLE) valid_hairstyles.Add(hair_string) selected_string = tgui_input_list(src, "Select a new hairstyle", "Your hairstyle", valid_hairstyles) diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index c685c85fbf4..b09d7b1a46d 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -7,16 +7,16 @@ /mob/living/carbon/human/dummy/Initialize(mapload) . = ..() - mob_list -= src - living_mob_list -= src - dead_mob_list -= src - human_mob_list -= src + GLOB.mob_list -= src + GLOB.living_mob_list -= src + GLOB.dead_mob_list -= src + GLOB.human_mob_list -= src /mob/living/carbon/human/dummy/Life() - mob_list -= src - living_mob_list -= src - dead_mob_list -= src - human_mob_list -= src + GLOB.mob_list -= src + GLOB.living_mob_list -= src + GLOB.dead_mob_list -= src + GLOB.human_mob_list -= src return /mob/living/carbon/human/dummy/mannequin/Initialize(mapload) diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm index 911dc2b2fa2..355fa095f68 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm @@ -264,7 +264,7 @@ return var/list/targets = list() - for(var/mob/living/carbon/human/M in mob_list) + for(var/mob/living/carbon/human/M in GLOB.mob_list) if(M.z != src.z || get_dist(src,M) > 1) continue if(src == M) diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm index 2fd7fb8dca4..7d8a4d467bb 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm @@ -128,7 +128,7 @@ /obj/item/glamour_face/attack_self(var/mob/user) if(!homunculus) var/list/targets = list() - for(var/mob/living/carbon/human/M in mob_list) + for(var/mob/living/carbon/human/M in GLOB.mob_list) if(M.z != user.z || get_dist(user,M) > 10) continue if(!M.allow_mimicry) diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index 128131fcc98..b4bd4743df9 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -84,8 +84,8 @@ var/list/wrapped_species_by_ref = list() var/list/valid_hairstyles = list() var/list/valid_facialhairstyles = list() var/list/valid_gradstyles = GLOB.hair_gradients - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/S = hair_styles_list[hairstyle] + for(var/hairstyle in GLOB.hair_styles_list) + var/datum/sprite_accessory/S = GLOB.hair_styles_list[hairstyle] if(gender == MALE && S.gender == FEMALE) continue if(gender == FEMALE && S.gender == MALE) @@ -93,8 +93,8 @@ var/list/wrapped_species_by_ref = list() if(!(species.get_bodytype(src) in S.species_allowed)) continue valid_hairstyles += hairstyle - for(var/facialhairstyle in facial_hair_styles_list) - var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] + for(var/facialhairstyle in GLOB.facial_hair_styles_list) + var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facialhairstyle] if(gender == MALE && S.gender == FEMALE) continue if(gender == FEMALE && S.gender == MALE) @@ -335,8 +335,8 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 10 // Construct the list of names allowed for this user. var/list/pretty_ear_styles = list("Normal" = null) - for(var/path in ear_styles_list) - var/datum/sprite_accessory/ears/instance = ear_styles_list[path] + for(var/path in GLOB.ear_styles_list) + var/datum/sprite_accessory/ears/instance = GLOB.ear_styles_list[path] if((!instance.ckeys_allowed) || (ckey in instance.ckeys_allowed)) pretty_ear_styles[instance.name] = path @@ -346,7 +346,7 @@ var/list/wrapped_species_by_ref = list() return //Set new style - ear_style = ear_styles_list[pretty_ear_styles[new_ear_style]] + ear_style = GLOB.ear_styles_list[pretty_ear_styles[new_ear_style]] //Allow color picks var/current_pri_color = rgb(r_ears,g_ears,b_ears) @@ -393,8 +393,8 @@ var/list/wrapped_species_by_ref = list() // Construct the list of names allowed for this user. var/list/pretty_ear_styles = list("Normal" = null) - for(var/path in ear_styles_list) - var/datum/sprite_accessory/ears/instance = ear_styles_list[path] + for(var/path in GLOB.ear_styles_list) + var/datum/sprite_accessory/ears/instance = GLOB.ear_styles_list[path] if((!instance.ckeys_allowed) || (ckey in instance.ckeys_allowed)) pretty_ear_styles[instance.name] = path @@ -402,7 +402,7 @@ var/list/wrapped_species_by_ref = list() var/new_ear_style = tgui_input_list(src, "Pick some ears!", "Character Preference", pretty_ear_styles) if(!new_ear_style) return - ear_secondary_style = ear_styles_list[pretty_ear_styles[new_ear_style]] + ear_secondary_style = GLOB.ear_styles_list[pretty_ear_styles[new_ear_style]] // Handle color picks if(ear_secondary_style) @@ -429,8 +429,8 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 10 // Construct the list of names allowed for this user. var/list/pretty_tail_styles = list("Normal" = null) - for(var/path in tail_styles_list) - var/datum/sprite_accessory/tail/instance = tail_styles_list[path] + for(var/path in GLOB.tail_styles_list) + var/datum/sprite_accessory/tail/instance = GLOB.tail_styles_list[path] if((!instance.ckeys_allowed) || (ckey in instance.ckeys_allowed)) pretty_tail_styles[instance.name] = path @@ -440,7 +440,7 @@ var/list/wrapped_species_by_ref = list() return //Set new style - tail_style = tail_styles_list[pretty_tail_styles[new_tail_style]] + tail_style = GLOB.tail_styles_list[pretty_tail_styles[new_tail_style]] //Allow color picks var/current_pri_color = rgb(r_tail,g_tail,b_tail) @@ -487,8 +487,8 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 10 // Construct the list of names allowed for this user. var/list/pretty_wing_styles = list("None" = null) - for(var/path in wing_styles_list) - var/datum/sprite_accessory/wing/instance = wing_styles_list[path] + for(var/path in GLOB.wing_styles_list) + var/datum/sprite_accessory/wing/instance = GLOB.wing_styles_list[path] if((!instance.ckeys_allowed) || (ckey in instance.ckeys_allowed)) pretty_wing_styles[instance.name] = path @@ -498,7 +498,7 @@ var/list/wrapped_species_by_ref = list() return //Set new style - wing_style = wing_styles_list[pretty_wing_styles[new_wing_style]] + wing_style = GLOB.wing_styles_list[pretty_wing_styles[new_wing_style]] //Allow color picks var/current_color = rgb(r_wing,g_wing,b_wing) diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm index 938b19ad33a..4f777656d82 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm @@ -402,8 +402,8 @@ O = new organ_type(H,1) H.internal_organs_by_name[organ_tag] = O if(!partial) - dead_mob_list.Remove(H) - living_mob_list += H + GLOB.dead_mob_list.Remove(H) + GLOB.living_mob_list += H H.tod = null H.timeofdeath = 0 H.set_stat(CONSCIOUS) diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm index 203a8ed45c2..f954c61228e 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm @@ -115,8 +115,6 @@ /mob/living/proc/start_wings_hovering, ) //removed fetish verbs, since non-customs can pick neutral traits now. Also added flight, cause shapeshifter can grow wings. - var/global/list/abilities = list() - var/blob_appearance = "puddle1" var/blob_color_1 = "#363636" var/blob_color_2 = "#ba3636" @@ -142,10 +140,10 @@ /datum/species/protean/New() ..() - if(!LAZYLEN(abilities)) + if(!LAZYLEN(GLOB.protean_abilities)) var/list/powertypes = subtypesof(/obj/effect/protean_ability) for(var/path in powertypes) - abilities += new path() + GLOB.protean_abilities += new path() /datum/species/protean/create_organs(var/mob/living/carbon/human/H) var/obj/item/nif/saved_nif = H.nif @@ -306,7 +304,7 @@ L[++L.len] = list("- -- --- REFACTORY ERROR! --- -- -", null, null, null, null) L[++L.len] = list("- -- --- Abilities (Shift+LMB Examines) --- -- -", null, null, null, null) - for(var/obj/effect/protean_ability/A as anything in abilities) + for(var/obj/effect/protean_ability/A as anything in GLOB.protean_abilities) var/client/C = H.client var/img if(C && istype(C)) //sanity checks diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index 2bd7749a4a4..fd481d99119 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -1,5 +1,5 @@ /proc/alien_queen_exists(var/ignore_self,var/mob/living/carbon/human/self) - for(var/mob/living/carbon/human/Q in living_mob_list) + for(var/mob/living/carbon/human/Q in GLOB.living_mob_list) if(self && ignore_self && self == Q) continue if(Q.species.name != SPECIES_XENO_QUEEN) diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 099b7314f5d..d05e2f247b7 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -1,5 +1,3 @@ -var/global/list/sparring_attack_cache = list() - //Species unarmed attacks /datum/unarmed_attack var/attack_name = "fist" @@ -21,9 +19,9 @@ var/global/list/sparring_attack_cache = list() /datum/unarmed_attack/proc/get_sparring_variant() if(sparring_variant_type) - if(!sparring_attack_cache[sparring_variant_type]) - sparring_attack_cache[sparring_variant_type] = new sparring_variant_type() - return sparring_attack_cache[sparring_variant_type] + if(!GLOB.sparring_attack_cache[sparring_variant_type]) + GLOB.sparring_attack_cache[sparring_variant_type] = new sparring_variant_type() + return GLOB.sparring_attack_cache[sparring_variant_type] /datum/unarmed_attack/proc/is_usable(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone) if(user.restrained()) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index e9802d12875..6e4aae1ded3 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -454,7 +454,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon() var/icon/face_standing = icon(icon = 'icons/mob/human_face.dmi', icon_state = "bald_s") if(f_style) - var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] + var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hair_styles_list[f_style] if(facial_hair_style && facial_hair_style.species_allowed && (src.species.get_bodytype(src) in facial_hair_style.species_allowed)) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") if(facial_hair_style.do_colouration) @@ -463,10 +463,10 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon() face_standing.Blend(facial_s, ICON_OVERLAY) if(h_style) - var/datum/sprite_accessory/hair/hair_style = hair_styles_list[h_style] + var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_list[h_style] if(head && (head.flags_inv & BLOCKHEADHAIR)) if(!(hair_style.flags & HAIR_VERY_SHORT)) - hair_style = hair_styles_list["Short Hair"] + hair_style = GLOB.hair_styles_list["Short Hair"] if(hair_style && (src.species.get_bodytype(src) in hair_style.species_allowed)) var/icon/grad_s = null diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm index 5d1df59e49b..bde9abb4dd7 100644 --- a/code/modules/mob/living/carbon/metroid/items.dm +++ b/code/modules/mob/living/carbon/metroid/items.dm @@ -298,7 +298,7 @@ proc/announce_to_ghosts() - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(G.client) var/area/A = get_area(src) if(A) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index bc81b896dbc..5cc26706058 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -759,8 +759,8 @@ // remove the character from the list of the dead if(stat == DEAD) - dead_mob_list -= src - living_mob_list += src + GLOB.dead_mob_list -= src + GLOB.living_mob_list += src tod = null timeofdeath = 0 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index f58df1380d9..97ecd71b8d1 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -33,7 +33,7 @@ var/list/ai_verbs_default = list( /proc/AutoUpdateAI(obj/subject) var/is_in_use = 0 if (subject!=null) - for(var/mob/living/silicon/ai/M as anything in ai_list) + for(var/mob/living/silicon/ai/M as anything in GLOB.ai_list) if ((M.client && M.machine == subject)) is_in_use = 1 subject.attack_ai(M) @@ -118,7 +118,7 @@ var/list/ai_verbs_default = list( var/pickedName = null while(!pickedName) pickedName = pick(ai_names) - for (var/mob/living/silicon/ai/A in mob_list) + for (var/mob/living/silicon/ai/A in GLOB.mob_list) if (A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop possibleNames -= pickedName pickedName = null @@ -183,7 +183,7 @@ var/list/ai_verbs_default = list( on_mob_init() - ai_list += src + GLOB.ai_list += src . = ..() new /obj/machinery/ai_powersupply(src) @@ -231,7 +231,7 @@ var/list/ai_verbs_default = list( setup_icon() /mob/living/silicon/ai/Destroy() - ai_list -= src + GLOB.ai_list -= src QDEL_NULL(announcement) QDEL_NULL(eyeobj) @@ -485,7 +485,7 @@ var/list/ai_verbs_default = list( to_chat(src, span_notice("Unable to locate the holopad.")) if (href_list["track"]) - var/mob/target = locate(href_list["track"]) in mob_list + var/mob/target = locate(href_list["track"]) in GLOB.mob_list if(target && (!ishuman(target) || html_decode(href_list["trackname"]) == target:get_face_name())) ai_actual_track(target) @@ -494,7 +494,7 @@ var/list/ai_verbs_default = list( return if(href_list["trackbot"]) - var/mob/living/bot/target = locate(href_list["trackbot"]) in mob_list + var/mob/living/bot/target = locate(href_list["trackbot"]) in GLOB.mob_list if(target) ai_actual_track(target) else @@ -502,7 +502,7 @@ var/list/ai_verbs_default = list( return if(href_list["open"]) - var/mob/target = locate(href_list["open"]) in mob_list + var/mob/target = locate(href_list["open"]) in GLOB.mob_list if(target) open_nearest_door(target) @@ -952,7 +952,7 @@ var/list/ai_verbs_default = list( var/mob/living/carbon/human/I = impersonated[speaker_name] if(!I) - for(var/mob/living/carbon/human/M in mob_list) + for(var/mob/living/carbon/human/M in GLOB.mob_list) if(M.real_name == speaker_name) I = M impersonated[speaker_name] = I @@ -1019,19 +1019,19 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/announcer/Initialize(mapload) . = ..() - mob_list -= src - living_mob_list -= src - dead_mob_list -= src - ai_list -= src - silicon_mob_list -= src + GLOB.mob_list -= src + GLOB.living_mob_list -= src + GLOB.dead_mob_list -= src + GLOB.ai_list -= src + GLOB.silicon_mob_list -= src QDEL_NULL(eyeobj) /mob/living/silicon/ai/announcer/Life() - mob_list -= src - living_mob_list -= src - dead_mob_list -= src - ai_list -= src - silicon_mob_list -= src + GLOB.mob_list -= src + GLOB.living_mob_list -= src + GLOB.dead_mob_list -= src + GLOB.ai_list -= src + GLOB.silicon_mob_list -= src QDEL_NULL(eyeobj) #undef AI_CHECK_WIRELESS diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index 72d1b9756db..4524a58e4e8 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -1,7 +1,7 @@ GLOBAL_LIST_EMPTY(empty_playable_ai_cores) /hook/roundstart/proc/spawn_empty_ai() - for(var/obj/effect/landmark/start/S in landmarks_list) + for(var/obj/effect/landmark/start/S in GLOB.landmarks_list) if(S.name != JOB_AI) continue if(locate(/mob/living) in S.loc) diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index 82874155ba6..c6fb2f874cd 100755 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -17,7 +17,7 @@ /mob/living/silicon/ai/add_ion_law(var/law) ..() - for(var/mob/living/silicon/robot/R in mob_list) + for(var/mob/living/silicon/robot/R in GLOB.mob_list) if(R.lawupdate && (R.connected_ai == src)) R.show_laws() diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm index bf72f847361..3b6d5da4d89 100644 --- a/code/modules/mob/living/silicon/ai/login.dm +++ b/code/modules/mob/living/silicon/ai/login.dm @@ -1,6 +1,6 @@ /mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up °_° ~Carn ..() - for(var/obj/effect/rune/rune in rune_list) + for(var/obj/effect/rune/rune in GLOB.rune_list) client.images += rune.blood_image if(stat != DEAD) for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm index bc23e1ea3af..fd91e5a1dc5 100644 --- a/code/modules/mob/living/silicon/laws.dm +++ b/code/modules/mob/living/silicon/laws.dm @@ -136,7 +136,7 @@ /mob/living/silicon/proc/generate_ion_law(var/exclude_crew_names = FALSE) var/list/players = list() - for(var/mob/living/carbon/human/player in player_list) + for(var/mob/living/carbon/human/player in GLOB.player_list) if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10)) continue players += player.real_name diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 8e4bf2c3193..0770000e779 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -26,51 +26,6 @@ var/obj/item/communicator/integrated/communicator // Our integrated communicator. var/chassis = "pai-repairbot" // A record of your chosen chassis. - var/global/list/possible_chassis = list( - "Drone" = "pai-repairbot", - "Cat" = "pai-cat", - "Mouse" = "pai-mouse", - "Monkey" = "pai-monkey", - "Borgi" = "pai-borgi", - "Fox" = "pai-fox", - "Parrot" = "pai-parrot", - "Rabbit" = "pai-rabbit", - //VOREStation Addition Start - "Dire wolf" = "pai-diredog", - "Horse (Lune)" = "pai-horse_lune", - "Horse (Soleil)" = "pai-horse_soleil", - "Dragon" = "pai-pdragon", - "Bear" = "pai-bear", - "Fennec" = "pai-fen", - "Type Zero" = "pai-typezero", - "Raccoon" = "pai-raccoon", - "Raptor" = "pai-raptor", - "Corgi" = "pai-corgi", - "Bat" = "pai-bat", - "Butterfly" = "pai-butterfly", - "Hawk" = "pai-hawk", - "Duffel" = "pai-duffel", - "Rat" = "rat", - "Panther" = "panther", - "Cyber Elf" = "cyberelf", - "Teppi" = "teppi", - "Catslug" = "catslug", - "Car" = "car", - "Type One" = "typeone", - "Type Thirteen" = "13", - "Protogen Dog" = "pai-protodog" - //VOREStation Addition End - ) - - var/global/list/possible_say_verbs = list( - "Robotic" = list("states","declares","queries"), - "Natural" = list("says","yells","asks"), - "Beep" = list("beeps","beeps loudly","boops"), - "Chirp" = list("chirps","chirrups","cheeps"), - "Feline" = list("purrs","yowls","meows"), - "Canine" = list("yaps","barks","woofs"), - "Rodent" = list("squeaks", "SQUEAKS", "sqiks") //VOREStation Edit - ) var/obj/item/pai_cable/cable // The cable we produce and use when door or camera jacking @@ -330,34 +285,14 @@ close_up() -/* //VOREStation Removal Start -/mob/living/silicon/pai/proc/choose_chassis() - set category = "Abilities.pAI Commands" - set name = "Choose Chassis" - - var/choice - var/finalized = "No" - while(finalized == "No" && src.client) - - choice = tgui_input_list(src,"What would you like to use for your mobile chassis icon?","Chassis Choice", possible_chassis) - if(!choice) return - - icon_state = possible_chassis[choice] - finalized = tgui_alert(src, "Look at your sprite. Is this what you wish to use?","Choose Chassis",list("No","Yes")) - - chassis = possible_chassis[choice] - add_verb(src, /mob/living/proc/hide) -//VOREStation Removal End -*/ - /mob/living/silicon/pai/proc/choose_verbs() set category = "Abilities.pAI Commands" set name = "Choose Speech Verbs" - var/choice = tgui_input_list(src,"What theme would you like to use for your speech verbs?","Theme Choice", possible_say_verbs) + var/choice = tgui_input_list(src,"What theme would you like to use for your speech verbs?","Theme Choice", GLOB.possible_say_verbs) if(!choice) return - var/list/sayverbs = possible_say_verbs[choice] + var/list/sayverbs = GLOB.possible_say_verbs[choice] speak_statement = sayverbs[1] speak_exclamation = sayverbs[(sayverbs.len>1 ? 2 : sayverbs.len)] speak_query = sayverbs[(sayverbs.len>2 ? 3 : sayverbs.len)] diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 231d16d3305..ef1c35919f5 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -9,55 +9,6 @@ var/icon/holo_icon_north var/holo_icon_dimension_X = 32 var/holo_icon_dimension_Y = 32 - var/global/list/wide_chassis = list( - "rat", - "panther", - "teppi", - "pai-diredog", - "pai-horse_lune", - "pai-horse_soleil", - "pai-pdragon", - "pai-protodog" - ) - var/global/list/flying_chassis = list( - "pai-parrot", - "pai-bat", - "pai-butterfly", - "pai-hawk", - "cyberelf" - ) - - //Sure I could spend all day making wacky overlays for all of the different forms - //but quite simply most of these sprites aren't made for that, and I'd rather just make new ones - //the birds especially! Just naw. If someone else wants to mess with 12x4 frames of animation where - //most of the pixels are different kinds of green and tastefully translate that to whitescale - //they can have fun with that! I not doing it! - var/global/list/allows_eye_color = list( - "pai-repairbot", - "pai-typezero", - "pai-bat", - "pai-butterfly", - "pai-mouse", - "pai-monkey", - "pai-raccoon", - "pai-cat", - "rat", - "panther", - "pai-bear", - "pai-fen", - "cyberelf", - "teppi", - "catslug", - "car", - "typeone", - "13", - "pai-raptor", - "pai-diredog", - "pai-horse_lune", - "pai-horse_soleil", - "pai-pdragon", - "pai-protodog" - ) //These vars keep track of whether you have the related software, used for easily updating the UI var/soft_ut = FALSE //universal translator var/soft_mr = FALSE //medical records @@ -140,7 +91,7 @@ icon_state = "[chassis]_rest_full[fullness_extension]" else icon_state = "[chassis]_rest" - if(chassis in wide_chassis) + if(chassis in GLOB.wide_chassis) pixel_x = -16 default_pixel_x = -16 else @@ -167,7 +118,7 @@ icon_state = "[chassis]_full[fullness_extension]" else if(vore_fullness && resting) icon_state = "[chassis]_rest_full[fullness_extension]" - if(chassis in wide_chassis) + if(chassis in GLOB.wide_chassis) pixel_x = -16 default_pixel_x = -16 else @@ -181,11 +132,11 @@ set name = "Choose Chassis" var/choice - choice = tgui_input_list(src, "What would you like to use for your mobile chassis icon?", "Chassis Choice", possible_chassis) + choice = tgui_input_list(src, "What would you like to use for your mobile chassis icon?", "Chassis Choice", GLOB.possible_chassis) if(!choice) return var/oursize = size_multiplier resize(1, FALSE, TRUE, TRUE, FALSE) //We resize ourselves to normal here for a moment to let the vis_height get reset - chassis = possible_chassis[choice] + chassis = GLOB.possible_chassis[choice] vore_capacity = 1 vore_capacity_ex = list("stomach" = 1) @@ -196,7 +147,7 @@ return icon_state = null icon = holo_icon - else if(chassis in wide_chassis) + else if(chassis in GLOB.wide_chassis) icon = 'icons/mob/pai_vr64x64.dmi' vis_height = 64 else @@ -204,7 +155,7 @@ vis_height = 32 resize(oursize, FALSE, TRUE, TRUE, FALSE) //And then back again now that we're sure the vis_height is correct. - if(chassis in flying_chassis) + if(chassis in GLOB.flying_chassis) hovering = TRUE else hovering = FALSE @@ -217,7 +168,7 @@ set category = "Abilities.pAI Commands" set name = "Toggle Eye Glow" - if(chassis in allows_eye_color) + if(chassis in GLOB.allows_eye_color) if(eye_glow && !hide_glow) eye_glow = FALSE else @@ -232,7 +183,7 @@ /mob/living/silicon/pai/verb/pick_eye_color() set category = "Abilities.pAI Commands" set name = "Pick Eye Color" - if(!(chassis in allows_eye_color)) + if(!(chassis in GLOB.allows_eye_color)) to_chat(src, span_warning("Your selected chassis eye color can not be modified. The color you pick will only apply to supporting chassis and your card screen.")) var/new_eye_color = tgui_color_picker(src, "Choose your character's eye color:", "Eye Color") @@ -245,12 +196,12 @@ /mob/living/silicon/pai/Destroy() release_vore_contents() if(ckey) - paikeys -= ckey + GLOB.paikeys -= ckey return ..() /mob/living/silicon/pai/clear_client() if(ckey) - paikeys -= ckey + GLOB.paikeys -= ckey return ..() /mob/living/silicon/pai/proc/add_eyes() @@ -270,7 +221,7 @@ eye_layer = image('icons/mob/pai_vr64x32.dmi', "type13-eyes") else if(holo_icon_dimension_X == 64 && holo_icon_dimension_Y == 64) eye_layer = image('icons/mob/pai_vr64x64.dmi', "type13-eyes") - else if(chassis in allows_eye_color) + else if(chassis in GLOB.allows_eye_color) eye_layer = image(icon, "[icon_state]-eyes") else return eye_layer.appearance_flags = appearance_flags @@ -533,7 +484,7 @@ else return else return to_chat(src, span_notice("Your message was relayed.")) - for (var/mob/G in player_list) + for (var/mob/G in GLOB.player_list) if (isnewplayer(G)) continue else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) @@ -556,8 +507,8 @@ S.tgui_interact(src) refresh_software_status() return - for(var/thing in pai_software_by_key) - var/datum/pai_software/our_soft = pai_software_by_key[thing] + for(var/thing in GLOB.pai_software_by_key) + var/datum/pai_software/our_soft = GLOB.pai_software_by_key[thing] if(our_soft.name == soft_name) if(!(ram >= our_soft.ram_cost)) to_chat(src, span_warning("Insufficient RAM for download. (Cost [our_soft.ram_cost] : [ram] Remaining)")) diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 9046b61add3..efdaa94a9ae 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -37,7 +37,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate)) var/mob/living/silicon/pai/pai = new(card) pai.key = candidate.key - paikeys |= pai.ckey + GLOB.paikeys |= pai.ckey card.setPersonality(pai) if(!candidate.name) pai.SetName(pick(ninja_names)) @@ -248,7 +248,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates for(var/datum/paiCandidate/c in paiController.pai_candidates) if(c.ready) var/found = 0 - for(var/mob/observer/dead/o in player_list) + for(var/mob/observer/dead/o in GLOB.player_list) if(o.key == c.key && o.MayRespawn()) found = 1 if(found) @@ -361,7 +361,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates /datum/paiController/proc/requestRecruits(var/mob/user) inquirer = user - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) if(!O.MayRespawn()) continue if(jobban_isbanned(O, "pAI")) @@ -386,7 +386,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates var/time_till_respawn = ourmob.time_till_respawn() if(time_till_respawn == -1 || time_till_respawn) return - for(var/ourkey in paikeys) + for(var/ourkey in GLOB.paikeys) if(ourkey == ourmob.ckey) return diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 2dc9158ef6a..027ba4bd67a 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -18,25 +18,25 @@ var/list/pai_emotions = list( ) -var/global/list/pai_software_by_key = list() -var/global/list/default_pai_software = list() +GLOBAL_LIST_EMPTY(pai_software_by_key) +GLOBAL_LIST_EMPTY(default_pai_software) /hook/startup/proc/populate_pai_software_list() var/r = 1 // I would use ., but it'd sacrifice runtime detection for(var/type in subtypesof(/datum/pai_software)) var/datum/pai_software/P = new type() - if(pai_software_by_key[P.id]) - var/datum/pai_software/O = pai_software_by_key[P.id] + if(GLOB.pai_software_by_key[P.id]) + var/datum/pai_software/O = GLOB.pai_software_by_key[P.id] to_world(span_warning("pAI software module [P.name] has the same key as [O.name]!")) r = 0 continue - pai_software_by_key[P.id] = P + GLOB.pai_software_by_key[P.id] = P if(P.default) - default_pai_software[P.id] = P + GLOB.default_pai_software[P.id] = P return r /mob/living/silicon/pai/Initialize(mapload) . = ..() - software = default_pai_software.Copy() + software = GLOB.default_pai_software.Copy() /mob/living/silicon/pai/verb/paiInterface() set category = "Abilities.pAI Commands" @@ -61,8 +61,8 @@ var/global/list/default_pai_software = list() // Software we have not bought var/list/not_bought_software = list() - for(var/key in pai_software_by_key) - var/datum/pai_software/S = pai_software_by_key[key] + for(var/key in GLOB.pai_software_by_key) + var/datum/pai_software/S = GLOB.pai_software_by_key[key] var/software_data[0] software_data["name"] = S.name software_data["id"] = S.id @@ -106,7 +106,7 @@ var/global/list/default_pai_software = list() if("purchase") var/soft = params["purchase"] - var/datum/pai_software/S = pai_software_by_key[soft] + var/datum/pai_software/S = GLOB.pai_software_by_key[soft] if(S && (ram >= S.ram_cost)) ram -= S.ram_cost software[S.id] = S diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index afe6d01382c..9903944583e 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -291,7 +291,7 @@ /mob/living/silicon/pai/proc/hackloop() var/turf/T = get_turf(src) - for(var/mob/living/silicon/ai/AI in player_list) + for(var/mob/living/silicon/ai/AI in GLOB.player_list) if(T.loc) to_chat(AI, span_bolddanger("Network Alert: Brute-force encryption crack in progress in [T.loc].")) else diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 3305894dcd8..49017b4665e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -243,7 +243,7 @@ var/list/mob_hat_cache = list() user.visible_message(span_danger("\The [user] swipes [TU.his] ID card through \the [src], attempting to reboot it."), span_danger(">You swipe your ID card through \the [src], attempting to reboot it.")) var/drones = 0 - for(var/mob/living/silicon/robot/drone/D in player_list) + for(var/mob/living/silicon/robot/drone/D in GLOB.player_list) drones++ if(drones < CONFIG_GET(number/max_maint_drones)) request_player() @@ -329,7 +329,7 @@ var/list/mob_hat_cache = list() //Reboot procs. /mob/living/silicon/robot/drone/proc/request_player() - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) if(jobban_isbanned(O, JOB_CYBORG)) continue if(O.client) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index a67f571e1f4..3ab6def6490 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -35,7 +35,7 @@ var/list/data = list() var/list/drones = list() - for(var/mob/living/silicon/robot/drone/D in mob_list) + for(var/mob/living/silicon/robot/drone/D in GLOB.mob_list) //VOREStation Edit - multiz lol if(!(D.z in using_map.get_map_levels(z, TRUE, 0))) continue @@ -79,7 +79,7 @@ if("ping") to_chat(ui.user, span_notice("You issue a maintenance request for all active drones, highlighting [drone_call_area].")) - for(var/mob/living/silicon/robot/drone/D in player_list) + for(var/mob/living/silicon/robot/drone/D in GLOB.player_list) if(D.stat == 0) to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].") 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 b6b227a310a..ac6ebe096e1 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -1,6 +1,6 @@ /proc/count_drones() var/drones = 0 - for(var/mob/living/silicon/robot/drone/D in player_list) + for(var/mob/living/silicon/robot/drone/D in GLOB.player_list) drones++ return drones diff --git a/code/modules/mob/living/silicon/robot/drone/drone_say.dm b/code/modules/mob/living/silicon/robot/drone/drone_say.dm index 286124b3550..76bda1e2375 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_say.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_say.dm @@ -29,7 +29,7 @@ if(D.client && D.local_transmit) to_chat(D, span_say(span_bold("[src]") + "transmits, \"[message]\"")) - for (var/mob/M in player_list) + for (var/mob/M in GLOB.player_list) if (isnewplayer(M)) continue else if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index 87d5f0ca1e4..064f43f7510 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -1,25 +1,3 @@ -var/global/list/robot_modules = list( - "Standard" = /obj/item/robot_module/robot/standard, - "Service" = /obj/item/robot_module/robot/clerical/butler, - "Clerical" = /obj/item/robot_module/robot/clerical/general, - "Clown" = /obj/item/robot_module/robot/clerical/honkborg, - "Command" = /obj/item/robot_module/robot/chound, - "Research" = /obj/item/robot_module/robot/research, - "Miner" = /obj/item/robot_module/robot/miner, - "Crisis" = /obj/item/robot_module/robot/medical/crisis, - "Surgeon" = /obj/item/robot_module/robot/medical/surgeon, - "Security" = /obj/item/robot_module/robot/security/general, - "Combat" = /obj/item/robot_module/robot/security/combat, - "Exploration" = /obj/item/robot_module/robot/exploration, - "Engineering" = /obj/item/robot_module/robot/engineering, - "Janitor" = /obj/item/robot_module/robot/janitor, - "Gravekeeper" = /obj/item/robot_module/robot/gravekeeper, - "Lost" = /obj/item/robot_module/robot/lost, - "Protector" = /obj/item/robot_module/robot/syndicate/protector, - "Mechanist" = /obj/item/robot_module/robot/syndicate/mechanist, - "Combat Medic" = /obj/item/robot_module/robot/syndicate/combat_medic - ) - /obj/item/robot_module name = "robot module" icon = 'icons/obj/module.dmi' 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 ae01402039f..6fe87161c57 100644 --- a/code/modules/mob/living/silicon/robot/robot_ui_module.dm +++ b/code/modules/mob/living/silicon/robot/robot_ui_module.dm @@ -109,7 +109,7 @@ if(R.module) return var/new_module = params["value"] - if(!(new_module in robot_modules)) + if(!(new_module in GLOB.robot_modules)) return if(!is_borg_whitelisted(R, new_module)) return @@ -155,7 +155,7 @@ /mob/living/silicon/robot/proc/apply_module(var/datum/robot_sprite/new_datum, var/new_module) icon_selected = TRUE - var/module_type = robot_modules[new_module] + var/module_type = GLOB.robot_modules[new_module] if(modtype != new_module || !module) if(module) qdel(module) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 9d9cba77b3e..a874af809e4 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -31,7 +31,7 @@ /mob/living/silicon/Initialize(mapload, is_decoy = FALSE) . = ..() - silicon_mob_list += src + GLOB.silicon_mob_list += src if(!is_decoy) add_language(LANGUAGE_GALCOM) apply_default_language(GLOB.all_languages[LANGUAGE_GALCOM]) @@ -41,7 +41,7 @@ AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 1, -6) /mob/living/silicon/Destroy() - silicon_mob_list -= src + GLOB.silicon_mob_list -= src for(var/datum/alarm_handler/AH in SSalarm.all_handlers) AH.unregister_alarm(src) return ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm index 33a288fd510..8485bdad764 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm @@ -77,7 +77,7 @@ return ..() var/list/possible_targets = list() - for(var/mob/living/player in player_list) + for(var/mob/living/player in GLOB.player_list) if(!(player.z in child_om_marker.map_z)) continue if(!(isliving(player) && istype(player.loc,/turf/simulated/floor/outdoors/fur) && player.client)) @@ -314,7 +314,7 @@ if(!our_maps.len) to_chat(src, span_warning("There is nowhere nearby to go to! You need to get closer to somewhere you can transition to before you can transition.")) return - for(var/obj/effect/landmark/l in landmarks_list) + for(var/obj/effect/landmark/l in GLOB.landmarks_list) if(l.z in our_maps) if(istype(l,/obj/effect/landmark/stardog)) destinations |= l diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm index eadf0b03186..0b1d6eb639f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm @@ -265,7 +265,7 @@ to_chat(src, "You drop words into [host]'s mind: \"[message]\"") to_chat(host, "Your own thoughts speak: \"[message]\"") - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(isnewplayer(M)) continue else if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm index f4c0ddfaf88..8304af17423 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm @@ -25,7 +25,7 @@ to_chat(src, "You whisper silently, \"[message]\"") to_chat(B.host, "The captive mind of [src] whispers, \"[message]\"") - for (var/mob/M in player_list) + for (var/mob/M in GLOB.player_list) if (isnewplayer(M)) continue else if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm index 8c2e5317532..1d4e28d0ecb 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm @@ -25,15 +25,6 @@ meat_type = /obj/item/reagent_containers/food/snacks/carpmeat/fish meat_amount = 3 - // By default they can be in any water turf. Subtypes might restrict to deep/shallow etc - var/global/list/suitable_turf_types = list( - /turf/simulated/floor/beach/water, - /turf/simulated/floor/beach/coastline, - /turf/simulated/floor/holofloor/beach/water, - /turf/simulated/floor/holofloor/beach/coastline, - /turf/simulated/floor/water - ) - var/randomize_location = TRUE /mob/living/simple_mob/animal/passive/fish/Initialize(mapload) @@ -47,7 +38,7 @@ // Makes the AI unable to willingly go on land. /mob/living/simple_mob/animal/passive/fish/IMove(turf/newloc, safety = TRUE) - if(is_type_in_list(newloc, suitable_turf_types)) + if(is_type_in_list(newloc, GLOB.suitable_fish_turf_types)) return ..() // Procede as normal. return MOVEMENT_FAILED // Don't leave the water! @@ -59,7 +50,7 @@ return var/turf/T = get_turf(src) - if(T && !is_type_in_list(T, suitable_turf_types)) + if(T && !is_type_in_list(T, GLOB.suitable_fish_turf_types)) if(prob(50)) say(pick("Blub", "Glub", "Burble")) adjustBruteLoss(unsuitable_atoms_damage) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm index 14657cfa7d0..abe76ca0192 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm @@ -29,7 +29,7 @@ return for(var/i = 1 to 3) var/turf/T = get_step_away(src, M) - if(T && is_type_in_list(T, suitable_turf_types)) + if(T && is_type_in_list(T, GLOB.suitable_fish_turf_types)) Move(T) else break @@ -47,7 +47,7 @@ return for(var/i = 1 to 3) var/turf/T = get_step_away(src, M) - if(T && is_type_in_list(T, suitable_turf_types)) + if(T && is_type_in_list(T, GLOB.suitable_fish_turf_types)) Move(T) else break diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index 3adc4726d08..5a47738adc5 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -89,7 +89,7 @@ GLOBAL_LIST_EMPTY(grub_machine_overlays) if(istype(loc, /obj/machinery)) if(machine_effect && SSair.current_cycle%30) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) M << machine_effect if(prob(10)) sparks.start() @@ -126,7 +126,7 @@ GLOBAL_LIST_EMPTY(grub_machine_overlays) if(!(M.type in GLOB.grub_machine_overlays)) generate_machine_effect(M) machine_effect = image(GLOB.grub_machine_overlays[M.type], M) //Can't do this the reasonable way with an overlay, - for(var/mob/L in player_list) //because nearly every machine updates its icon by removing all overlays first + for(var/mob/L in GLOB.player_list) //because nearly every machine updates its icon by removing all overlays first L << machine_effect /mob/living/simple_mob/animal/solargrub_larva/proc/generate_machine_effect(var/obj/machinery/M) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 70131546e0b..6b780279ada 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -5,7 +5,7 @@ computer_id = client.computer_id log_access_in(client) if(CONFIG_GET(flag/log_access)) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M == src) continue if( M.key && (M.key != key) ) var/matches @@ -27,7 +27,7 @@ /mob/Login() persistent_ckey = client.ckey - player_list |= src + GLOB.player_list |= src update_Login_details() world.update_status() diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 2be1501a892..5b801c50567 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -1,7 +1,7 @@ /mob/Logout() SEND_SIGNAL(src, COMSIG_MOB_LOGOUT) SStgui.on_logout(src) // Cleanup any TGUIs the user has open - player_list -= src + GLOB.player_list -= src disconnect_time = world.realtime //VOREStation Addition: logging when we disappear. update_client_z(null) log_access_out(src) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a5a7e601f5f..c1a2b1243f3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1,9 +1,9 @@ /mob/Destroy()//This makes sure that mobs withGLOB.clients/keys are not just deleted from the game. SSmobs.currentrun -= src - mob_list -= src - dead_mob_list -= src - living_mob_list -= src - player_list -= src + GLOB.mob_list -= src + GLOB.dead_mob_list -= src + GLOB.living_mob_list -= src + GLOB.player_list -= src unset_machine() clear_fullscreen() if(client) @@ -69,11 +69,11 @@ zone_sel = null /mob/Initialize(mapload) - mob_list += src + GLOB.mob_list += src if(stat == DEAD) - dead_mob_list += src + GLOB.dead_mob_list += src else - living_mob_list += src + GLOB.living_mob_list += src lastarea = get_area(src) set_focus(src) // VOREStation Add - Key Handling update_transform() // Some mobs may start bigger or smaller than normal. @@ -176,7 +176,7 @@ M.create_chat_message(src, "[runemessage || message]", FALSE, list("emote"), audible = FALSE) /mob/proc/findname(msg) - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if (M.real_name == text("[]", msg)) return M return 0 @@ -486,7 +486,7 @@ targets += observe_list_format(GLOB.nuke_disks) targets += observe_list_format(GLOB.all_singularities) targets += getmobs() - targets += observe_list_format(sortAtom(mechas_list)) + targets += observe_list_format(sort_names(GLOB.mechas_list)) targets += observe_list_format(SSshuttles.ships) client.perspective = EYE_PERSPECTIVE diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 24be3d22c5e..5c600302b57 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -381,7 +381,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp animate(pixel_x = oldx, pixel_y = oldy, time = 1) /proc/findname(msg) - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) if (M.real_name == text("[msg]")) return 1 return 0 @@ -445,7 +445,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) /proc/mobs_in_area(var/area/A) var/list/mobs = list() - for(var/M in mob_list) + for(var/M in GLOB.mob_list) if(get_area(M) == A) mobs += M return mobs @@ -474,7 +474,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) if(subject && subject.forbid_seeing_deadchat && !check_rights_for(subject.client, R_HOLDER)) return // Can't talk in deadchat if you can't see it. - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) var/follow var/lname @@ -504,7 +504,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) to_chat(M, span_deadsay("" + create_text_tag("dead", "DEAD:", M.client) + " [lname][follow][message]")) /proc/say_dead_object(var/message, var/obj/subject = null) - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) var/follow var/lname = "Game Master" diff --git a/code/modules/mob/mob_planes_vr.dm b/code/modules/mob/mob_planes_vr.dm index 291d6a2c132..85d17e2d05e 100644 --- a/code/modules/mob/mob_planes_vr.dm +++ b/code/modules/mob/mob_planes_vr.dm @@ -22,7 +22,7 @@ my_mob = M /obj/screen/plane_master/augmented/Destroy() - entopic_users -= my_mob + GLOB.entopic_users -= my_mob my_mob = null . = ..() @@ -36,14 +36,14 @@ return if(state) - entopic_users |= my_mob + GLOB.entopic_users |= my_mob if(my_mob.client) - my_mob.client.images |= entopic_images + my_mob.client.images |= GLOB.entopic_images else - entopic_users -= my_mob + GLOB.entopic_users -= my_mob if(my_mob.client) - my_mob.client.images -= entopic_images + my_mob.client.images -= GLOB.entopic_images /mob/Destroy() . = ..() - entopic_users -= src + GLOB.entopic_users -= src diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index af19f5ccb4c..66b1956b8d4 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -17,7 +17,7 @@ loc = null sight |= SEE_TURFS - player_list |= src + GLOB.player_list |= src GLOB.new_player_list += src created_for = ckey diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 8376f81af83..df64e99b91f 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -52,7 +52,7 @@ totalPlayers = 0 totalPlayersReady = 0 var/datum/job/refJob = null - for(var/mob/new_player/player in player_list) + for(var/mob/new_player/player in GLOB.player_list) refJob = player.client?.prefs.get_highest_job() var/obfuscate_key = player.read_preference(/datum/preference/toggle/obfuscate_key) var/obfuscate_job = player.read_preference(/datum/preference/toggle/obfuscate_job) diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 4263ea3351b..4527a6f3851 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -193,7 +193,7 @@ // Determine what job is marked as 'High' priority, and dress them up as such. if(job_civilian_low & ASSISTANT) previewJob = job_master.GetJob(JOB_ALT_VISITOR) - else if(client && ispAI(client.mob)) //VOREStation Edit! - pAIs shouldn't wear job gear~! + else if(client && ispAI(client.mob)) pass() //Don't do anything! else for(var/datum/job/job in job_master.occupations) @@ -247,7 +247,7 @@ mannequin.dna = new /datum/dna(null) mannequin.delete_inventory(TRUE) dress_preview_mob(mannequin) - mannequin.update_transform() //VOREStation Edit to update size/shape stuff. + mannequin.update_transform() mannequin.toggle_tail(setting = animations_toggle) mannequin.toggle_wing(setting = animations_toggle) @@ -276,28 +276,27 @@ /datum/preferences/proc/get_valid_hairstyles(mob/user) var/list/valid_hairstyles = list() - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed))) //VOREStation Edit - Custom species base species allowance + for(var/hairstyle in GLOB.hair_styles_list) + var/datum/sprite_accessory/S = GLOB.hair_styles_list[hairstyle] + if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed))) continue - if((!S.ckeys_allowed) || (user.ckey in S.ckeys_allowed)) //VOREStation Edit, allows ckey locked hairstyles. - valid_hairstyles[S.name] = hairstyle //VOREStation Edit, allows ckey locked hairstyles. + if((!S.ckeys_allowed) || (user.ckey in S.ckeys_allowed)) + valid_hairstyles[S.name] = hairstyle - //valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] //VOREStation Edit. Replaced by above. return valid_hairstyles /datum/preferences/proc/get_valid_facialhairstyles() var/list/valid_facialhairstyles = list() - for(var/facialhairstyle in facial_hair_styles_list) - var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] + for(var/facialhairstyle in GLOB.facial_hair_styles_list) + var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facialhairstyle] if(biological_gender == MALE && S.gender == FEMALE) continue if(biological_gender == FEMALE && S.gender == MALE) continue - if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed))) //VOREStation Edit - Custom species base species allowance + if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed))) continue - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] + valid_facialhairstyles[facialhairstyle] = GLOB.facial_hair_styles_list[facialhairstyle] return valid_facialhairstyles diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index c56a3a8bc08..277afd3effd 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -337,7 +337,7 @@ to_chat(M, span_psay(span_bold("You think \"[message]\""))) //To us if we are the pred if(M.read_preference(/datum/preference/toggle/subtle_sounds)) M << sound('sound/talksounds/subtle_sound.ogg', volume = 50) - for (var/mob/G in player_list) + for (var/mob/G in GLOB.player_list) if (isnewplayer(G)) continue else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \ @@ -434,7 +434,7 @@ to_chat(M, span_pemote(span_bold("\The [M] [message]"))) //To us if we are the pred if(M.read_preference(/datum/preference/toggle/subtle_sounds)) M << sound('sound/talksounds/subtle_sound.ogg', volume = 50) - for (var/mob/G in player_list) + for (var/mob/G in GLOB.player_list) if (isnewplayer(G)) continue else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \ diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 2c1c0b6da9d..628d4159b7a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -74,21 +74,21 @@ var/newloc = loc if(move) var/obj/loc_landmark - for(var/obj/effect/landmark/start/sloc in landmarks_list) + for(var/obj/effect/landmark/start/sloc in GLOB.landmarks_list) if (sloc.name != JOB_AI) continue if ((locate(/mob/living) in sloc.loc) || (locate(/obj/structure/AIcore) in sloc.loc)) continue loc_landmark = sloc if (!loc_landmark) - for(var/obj/effect/landmark/tripai in landmarks_list) + for(var/obj/effect/landmark/tripai in GLOB.landmarks_list) if (tripai.name == "tripai") if((locate(/mob/living) in tripai.loc) || (locate(/obj/structure/AIcore) in tripai.loc)) continue loc_landmark = tripai if (!loc_landmark) to_chat(src, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.") - for(var/obj/effect/landmark/start/sloc in landmarks_list) + for(var/obj/effect/landmark/start/sloc in GLOB.landmarks_list) if (sloc.name == JOB_AI) loc_landmark = sloc diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm index a4c35df3b49..300390839df 100644 --- a/code/modules/nifsoft/nif.dm +++ b/code/modules/nifsoft/nif.dm @@ -61,12 +61,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable var/global/click_sound = 'sound/items/nif_click.ogg' var/global/bad_sound = 'sound/items/nif_tone_bad.ogg' var/global/good_sound = 'sound/items/nif_tone_good.ogg' - var/global/list/look_messages = list( - "flicks their eyes around", - "looks at something unseen", - "reads some invisible text", - "seems to be daydreaming", - "focuses elsewhere for a moment") + var/list/save_data @@ -398,7 +393,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable last_notification = message // TGUI Hook to_chat(human,span_filter_nif(span_bold("\[[icon2html(src.big_icon, human.client)]NIF\]") + " displays, " + (alert ? span_danger(message) : span_notice(message)))) - if(prob(1)) human.visible_message(span_notice("\The [human] [pick(look_messages)].")) + if(prob(1)) human.visible_message(span_notice("\The [human] [pick(GLOB.nif_look_messages)].")) if(alert) human << bad_sound else @@ -498,7 +493,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable if(stat != NIF_WORKING) return FALSE if(human) - if(prob(5)) human.visible_message(span_notice("\The [human] [pick(look_messages)].")) + if(prob(5)) human.visible_message(span_notice("\The [human] [pick(GLOB.nif_look_messages)].")) var/applies_to = soft.applies_to var/synth = human.isSynthetic() if(synth && !(applies_to & NIF_SYNTHETIC)) @@ -525,7 +520,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable //Deactivate a nifsoft /obj/item/nif/proc/deactivate(var/datum/nifsoft/soft) if(human) - if(prob(5)) human.visible_message(span_notice("\The [human] [pick(look_messages)].")) + if(prob(5)) human.visible_message(span_notice("\The [human] [pick(GLOB.nif_look_messages)].")) human << click_sound if(soft.tick_flags == NIF_ACTIVETICK) diff --git a/code/modules/nifsoft/nif_softshop.dm b/code/modules/nifsoft/nif_softshop.dm index f596bf1fb42..8e215104ed4 100644 --- a/code/modules/nifsoft/nif_softshop.dm +++ b/code/modules/nifsoft/nif_softshop.dm @@ -10,8 +10,6 @@ products = list() contraband = list() premium = list() - var/global/list/starting_legal_nifsoft - var/global/list/starting_illegal_nifsoft density = FALSE opacity = 0 @@ -57,19 +55,19 @@ // Special Treatment! /obj/machinery/vending/nifsoft_shop/build_inventory() //Firsties - if(!starting_legal_nifsoft) - starting_legal_nifsoft = list() - starting_illegal_nifsoft = list() + if(!GLOB.starting_legal_nifsoft) + GLOB.starting_legal_nifsoft = list() + GLOB.starting_illegal_nifsoft = list() for(var/datum/nifsoft/NS as anything in (subtypesof(/datum/nifsoft) - typesof(/datum/nifsoft/package))) if(initial(NS.vended)) switch(initial(NS.illegal)) if(TRUE) - starting_illegal_nifsoft += NS + GLOB.starting_illegal_nifsoft += NS if(FALSE) - starting_legal_nifsoft += NS + GLOB.starting_legal_nifsoft += NS - products = starting_legal_nifsoft.Copy() - contraband = starting_illegal_nifsoft.Copy() + products = GLOB.starting_legal_nifsoft.Copy() + contraband = GLOB.starting_illegal_nifsoft.Copy() var/list/all_products = list( list(products, CAT_NORMAL), diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 64bd0dc5c75..a2f683baa63 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -237,7 +237,7 @@ brainmob.container = src brainmob.stat = 0 brainmob.silent = FALSE - dead_mob_list -= brainmob + GLOB.dead_mob_list -= brainmob brainmob.add_language(LANGUAGE_GALCOM) brainmobs |= brainmob diff --git a/code/modules/nifsoft/software/15_misc.dm b/code/modules/nifsoft/software/15_misc.dm index 5ff1d7da092..5814500458f 100644 --- a/code/modules/nifsoft/software/15_misc.dm +++ b/code/modules/nifsoft/software/15_misc.dm @@ -157,22 +157,22 @@ /datum/nifsoft/worldbend/activate() if((. = ..())) var/list/justme = list(nif.human) - for(var/human in human_mob_list) + for(var/human in GLOB.human_mob_list) if(human == nif.human) continue var/mob/living/carbon/human/H = human H.display_alt_appearance("animals", justme) - alt_farmanimals += nif.human + GLOB.alt_farmanimals += nif.human /datum/nifsoft/worldbend/deactivate(var/force = FALSE) if((. = ..())) var/list/justme = list(nif.human) - for(var/human in human_mob_list) + for(var/human in GLOB.human_mob_list) if(human == nif.human) continue var/mob/living/carbon/human/H = human H.hide_alt_appearance("animals", justme) - alt_farmanimals -= nif.human + GLOB.alt_farmanimals -= nif.human /datum/nifsoft/malware name = "Cool Kidz Toolbar" diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index e33cd37eae2..a1d2180b8ff 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -243,7 +243,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) if(ckey(clonemind.key) != R.ckey) return 0 else - for(var/mob/observer/dead/G in player_list) + for(var/mob/observer/dead/G in GLOB.player_list) if(G.ckey == R.ckey) if(G.can_reenter_corpse) break diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 760883ac23c..a2919650b82 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) var/image/res = image('icons/mob/human_face.dmi',"bald_s") //Facial hair if(owner.f_style) - var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style] + var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hair_styles_list[owner.f_style] if(facial_hair_style && facial_hair_style.species_allowed && (data.get_species_bodytype(owner) in facial_hair_style.species_allowed)) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") if(facial_hair_style.do_colouration) @@ -65,10 +65,10 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) //Head hair if(owner.h_style) var/style = owner.h_style - var/datum/sprite_accessory/hair/hair_style = hair_styles_list[style] + var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_list[style] if(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR)) if(!(hair_style.flags & HAIR_VERY_SHORT)) - hair_style = hair_styles_list["Short Hair"] + hair_style = GLOB.hair_styles_list["Short Hair"] if(hair_style && (data.get_species_bodytype(owner) in hair_style.species_allowed)) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") var/icon/hair_s_add = new/icon("icon" = hair_style.icon_add, "icon_state" = "[hair_style.icon_state]_s") diff --git a/code/modules/organs/subtypes/machine.dm b/code/modules/organs/subtypes/machine.dm index 12d7991c72c..12e48f7a72c 100644 --- a/code/modules/organs/subtypes/machine.dm +++ b/code/modules/organs/subtypes/machine.dm @@ -91,8 +91,8 @@ if(owner && owner.stat == DEAD) owner.set_stat(CONSCIOUS) - dead_mob_list -= owner - living_mob_list |= owner + GLOB.dead_mob_list -= owner + GLOB.living_mob_list |= owner owner.visible_message(span_danger("\The [owner] twitches visibly!")) /obj/item/organ/internal/mmi_holder/removed(var/mob/living/user) diff --git a/code/modules/overmap/OM_sound.dm b/code/modules/overmap/OM_sound.dm index c1fc58cfe26..4c2350f6dee 100644 --- a/code/modules/overmap/OM_sound.dm +++ b/code/modules/overmap/OM_sound.dm @@ -1,6 +1,6 @@ /obj/effect/overmap/visitable/sector/Crossed(var/obj/effect/overmap/visitable/ship/enterer) . = ..() if(istype(enterer)) - for(var/mob/potential_mob as anything in player_list) + for(var/mob/potential_mob as anything in GLOB.player_list) if(potential_mob.z in enterer.map_z) SEND_SOUND(potential_mob, 'sound/ambience/approaching_planet.ogg') diff --git a/code/modules/overmap/disperser/disperser_fire.dm b/code/modules/overmap/disperser/disperser_fire.dm index eced84037a4..9a2f9afc258 100644 --- a/code/modules/overmap/disperser/disperser_fire.dm +++ b/code/modules/overmap/disperser/disperser_fire.dm @@ -31,7 +31,7 @@ A.ex_act(1) var/list/relevant_z = GetConnectedZlevels(start.z) - for(var/mob/M in global.player_list) + for(var/mob/M in GLOB.player_list) var/turf/T = get_turf(M) if(!T || !(T.z in relevant_z)) continue diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index f155f4a2d02..4c1630c0169 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -79,7 +79,7 @@ var/life = 0 - for(var/mob/living/L in living_mob_list) + for(var/mob/living/L in GLOB.living_mob_list) if(L.z in map_z) //Things inside things we'll consider shielded, otherwise we'd want to use get_z(L) life++ @@ -138,7 +138,7 @@ return //VOREStation Add Start last_sound = world.time - for(var/mob/potential_mob as anything in player_list) + for(var/mob/potential_mob as anything in GLOB.player_list) if(potential_mob.z in map_z) SEND_SOUND(potential_mob, 'sound/ambience/shutdown.ogg') //VOREStation Add End @@ -153,7 +153,7 @@ return //VOREStation Add Start last_sound = world.time - for(var/mob/potential_mob as anything in player_list) + for(var/mob/potential_mob as anything in GLOB.player_list) if(potential_mob.z in map_z) SEND_SOUND(potential_mob, 'sound/ambience/startup.ogg') //VOREStation Add End diff --git a/code/modules/overmap/ships/ship_vr.dm b/code/modules/overmap/ships/ship_vr.dm index c458f9e9eec..0d41c4aec4a 100644 --- a/code/modules/overmap/ships/ship_vr.dm +++ b/code/modules/overmap/ships/ship_vr.dm @@ -1,9 +1,9 @@ /obj/effect/overmap/visitable/ship/Initialize(mapload) . = ..() - listening_objects += src + GLOB.listening_objects += src /obj/effect/overmap/visitable/ship/Destroy() - listening_objects -= src + GLOB.listening_objects -= src return ..() /obj/effect/overmap/visitable/ship/MouseDrop(atom/over) diff --git a/code/modules/overmap/spacetravel.dm b/code/modules/overmap/spacetravel.dm index faa8cc7e800..1118b020677 100644 --- a/code/modules/overmap/spacetravel.dm +++ b/code/modules/overmap/spacetravel.dm @@ -33,7 +33,7 @@ log_and_message_admins("CANARY: [src] tried to check is_empty, but map_z is `[map_z || "null"]`") return TRUE testing("Checking if sector at [map_z[1]] has no players.") - for(var/mob/M in global.player_list) + for(var/mob/M in GLOB.player_list) if(M != observer && (M.z in map_z)) testing("There are people on it.") return FALSE diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 7262d3f0e4b..5136ef126b6 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -187,7 +187,7 @@ icon_state = "scrap" return user.examinate(src) - if(rigged && (Holiday == "April Fool's Day")) + if(rigged && (GLOB.Holiday == "April Fool's Day")) if(spam_flag == 0) spam_flag = 1 playsound(src, 'sound/items/bikehorn.ogg', 50, 1) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 60077b8a972..d4daf88f6e2 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -65,7 +65,7 @@ else if(response == "Regular") P = new /obj/item/paper - if(Holiday == "April Fool's Day") + if(GLOB.Holiday == "April Fool's Day") if(prob(30)) P.info = span_red(span_bold("HONK HONK HONK HONK HONK HONK HONK
HOOOOOOOOOOOOOOOOOOOOOONK
APRIL FOOLS
")) P.rigged = 1 diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index 5e70bbf8ac4..946fa7e6716 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -282,7 +282,7 @@ BucketData[++BucketData.len] = list ("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "volume" = B.reagents.total_volume, "max_volume" = B.reagents.maximum_volume) var/CbotData[0] - for(var/mob/living/bot/cleanbot/B in mob_list) + for(var/mob/living/bot/cleanbot/B in GLOB.mob_list) var/turf/bl = get_turf(B) if(bl) if(bl.z != cl.z) diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm index 8af2ce72eb1..81bb1c48a08 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -1,8 +1,6 @@ //The advanced pea-green monochrome lcd of tomorrow. -var/global/list/obj/item/pda/PDAs = list() - /obj/item/pda name = "\improper PDA" desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge." @@ -129,7 +127,7 @@ var/global/list/obj/item/pda/PDAs = list() /obj/item/pda/Initialize(mapload) . = ..() PDAs += src - PDAs = sortAtom(PDAs) + PDAs = sort_names(PDAs) update_programs() if(default_cartridge) cartridge = new default_cartridge(src) diff --git a/code/modules/planet/weather.dm b/code/modules/planet/weather.dm index c4b63e5c7f6..b8a7f132bc1 100644 --- a/code/modules/planet/weather.dm +++ b/code/modules/planet/weather.dm @@ -154,7 +154,7 @@ message_all_outdoor_players(span_warning(message)) /datum/weather_holder/proc/message_all_outdoor_players(message) - for(var/mob/M in player_list) // Don't need to care about clientless mobs. + for(var/mob/M in GLOB.player_list) // Don't need to care about clientless mobs. if(M.z in our_planet.expected_z_levels) var/turf/T = get_turf(M) if(!T.is_outdoors()) @@ -221,22 +221,22 @@ show_message = TRUE // Tell the rest of the process that we need to make a message if(effect_flags & HAS_PLANET_EFFECT) if(effect_flags & EFFECT_ALL_MOBS) - for(var/mob/M as anything in mob_list) + for(var/mob/M as anything in GLOB.mob_list) if(M.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS)) continue planet_effect(M) if(effect_flags & EFFECT_ONLY_LIVING) - for(var/mob/living/L as anything in living_mob_list) + for(var/mob/living/L as anything in GLOB.living_mob_list) if(L.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS)) continue planet_effect(L) if(effect_flags & EFFECT_ONLY_HUMANS) - for(var/mob/living/carbon/H as anything in human_mob_list) + for(var/mob/living/carbon/H as anything in GLOB.human_mob_list) if(H.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS)) continue planet_effect(H) if(effect_flags & EFFECT_ONLY_ROBOTS) - for(var/mob/living/silicon/R as anything in silicon_mob_list) + for(var/mob/living/silicon/R as anything in GLOB.silicon_mob_list) if(R.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS)) continue planet_effect(R) diff --git a/code/modules/player_tips_vr/player_tips_controller_vr.dm b/code/modules/player_tips_vr/player_tips_controller_vr.dm index e0e856765c2..cb702728d43 100644 --- a/code/modules/player_tips_vr/player_tips_controller_vr.dm +++ b/code/modules/player_tips_vr/player_tips_controller_vr.dm @@ -26,7 +26,7 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player if(stopWhile >= 10) break last_tip = tip - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.client?.prefs?.read_preference(/datum/preference/toggle/player_tips)) if(!M.key && !(M.key in HasReceived)) to_chat(M, span_warning("You have periodic player tips enabled. You may turn them off at any time with the Toggle Receiving Player Tips verb in Preferences, or in character set up under the OOC tab!\n Player tips appear every 45-75 minutes.")) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index ca2d9a41133..cc386e48460 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -145,7 +145,6 @@ GLOBAL_LIST_EMPTY(apcs) var/failure_timer = 0 var/force_update = 0 var/updating_icon = 0 - var/global/list/status_overlays_environ var/alarms_hidden = FALSE //If power alarms from this APC are visible on consoles var/nightshift_lights = FALSE diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 4c2fdf19be6..23215decedb 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -102,13 +102,13 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( var/turf/T = src.loc // hide if turf is not intact if(level==1) hide(!T.is_plating()) - cable_list += src //add it to the global cable list + GLOB.cable_list += src //add it to the global cable list /obj/structure/cable/Destroy() // called when a cable is deleted if(powernet) cut_cable_from_powernet() // update the powernets - cable_list -= src //remove it from global cable list + GLOB.cable_list -= src //remove it from global cable list return ..() // then go ahead and delete the cable /obj/structure/cable/examine(mob/user) diff --git a/code/modules/power/cable_ender.dm b/code/modules/power/cable_ender.dm index 906da2a42ad..27bad8accc8 100644 --- a/code/modules/power/cable_ender.dm +++ b/code/modules/power/cable_ender.dm @@ -17,7 +17,7 @@ /obj/structure/cable/ender/get_connections(var/powernetless_only = 0) . = ..() // Do the normal stuff if(id) - for(var/obj/structure/cable/ender/target in cable_list) + for(var/obj/structure/cable/ender/target in GLOB.cable_list) if(target.id == id) if (!powernetless_only || !target.powernet) . |= target diff --git a/code/modules/power/fusion/fusion_reactions.dm b/code/modules/power/fusion/fusion_reactions.dm index 12bc788d684..bb5f3eac3d1 100644 --- a/code/modules/power/fusion/fusion_reactions.dm +++ b/code/modules/power/fusion/fusion_reactions.dm @@ -122,7 +122,7 @@ GLOBAL_LIST(fusion_reactions) // Copied from the SM for proof of concept. //Not any more --Cirra //Use the whole z proc --Leshana SSradiation.z_radiate(locate(1, 1, holder.z), radiation_level, 1) - for(var/mob/living/mob in living_mob_list) + for(var/mob/living/mob in GLOB.living_mob_list) var/turf/T = get_turf(mob) if(T && (holder.z == T.z)) if(ishuman(mob)) diff --git a/code/modules/power/gravitygenerator_vr.dm b/code/modules/power/gravitygenerator_vr.dm index ba7f1606ffa..eaa9b96a523 100644 --- a/code/modules/power/gravitygenerator_vr.dm +++ b/code/modules/power/gravitygenerator_vr.dm @@ -389,7 +389,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // Shake everyone on the z level to let them know that gravity was enagaged/disenagaged. /obj/machinery/gravity_generator/main/proc/shake_everyone() var/sound/alert_sound = sound('sound/effects/alert.ogg') - for(var/mob/M as anything in player_list) + for(var/mob/M as anything in GLOB.player_list) if(!(M.z in levels)) continue M.update_gravity(M.mob_get_gravity()) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index d5707adb0df..5ace69dbd27 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -8,12 +8,12 @@ #define LIGHTING_POWER_FACTOR 2 //2W per luminosity * range #define LIGHT_EMERGENCY_POWER_USE 0.2 //How much power emergency lights will consume per tick -var/global/list/light_type_cache = list() +GLOBAL_LIST_EMPTY(light_type_cache) /proc/get_light_type_instance(var/light_type) - . = light_type_cache[light_type] + . = GLOB.light_type_cache[light_type] if(!.) . = new light_type - light_type_cache[light_type] = . + GLOB.light_type_cache[light_type] = . /obj/machinery/light_construct name = "light fixture frame" diff --git a/code/modules/power/profiling.dm b/code/modules/power/profiling.dm index 17bc2317229..d643c22a431 100644 --- a/code/modules/power/profiling.dm +++ b/code/modules/power/profiling.dm @@ -4,23 +4,23 @@ var/global/enable_power_update_profiling = 0 var/global/power_profiled_time = 0 var/global/power_last_profile_time = 0 -var/global/list/power_update_requests_by_machine = list() -var/global/list/power_update_requests_by_area = list() +GLOBAL_LIST_EMPTY(power_update_requests_by_machine) +GLOBAL_LIST_EMPTY(power_update_requests_by_area) /proc/log_power_update_request(area/A, obj/machinery/M) if (!enable_power_update_profiling) return var/machine_type = "[M.type]" - if (machine_type in power_update_requests_by_machine) - power_update_requests_by_machine[machine_type] += 1 + if (machine_type in GLOB.power_update_requests_by_machine) + GLOB.power_update_requests_by_machine[machine_type] += 1 else - power_update_requests_by_machine[machine_type] = 1 + GLOB.power_update_requests_by_machine[machine_type] = 1 - if (A.name in power_update_requests_by_area) - power_update_requests_by_area[A.name] += 1 + if (A.name in GLOB.power_update_requests_by_area) + GLOB.power_update_requests_by_area[A.name] += 1 else - power_update_requests_by_area[A.name] = 1 + GLOB.power_update_requests_by_area[A.name] = 1 power_profiled_time += (world.time - power_last_profile_time) power_last_profile_time = world.time @@ -55,8 +55,8 @@ var/global/list/power_update_requests_by_area = list() if(!check_rights(R_DEBUG)) return to_chat(usr, "Total profiling time: [power_profiled_time] ticks") - for (var/M in power_update_requests_by_machine) - to_chat(usr, "[M] = [power_update_requests_by_machine[M]]") + for (var/M in GLOB.power_update_requests_by_machine) + to_chat(usr, "[M] = [GLOB.power_update_requests_by_machine[M]]") /client/proc/view_power_update_stats_area() set name = "View Area Power Update Statistics By Area" @@ -67,5 +67,5 @@ var/global/list/power_update_requests_by_area = list() to_chat(usr, "Total profiling time: [power_profiled_time] ticks") to_chat(usr, "Total profiling time: [power_profiled_time] ticks") - for (var/A in power_update_requests_by_area) - to_chat(usr, "[A] = [power_update_requests_by_area[A]]") + for (var/A in GLOB.power_update_requests_by_area) + to_chat(usr, "[A] = [GLOB.power_update_requests_by_area[A]]") diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index be11971b0e4..060860240a2 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -1,6 +1,4 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 -var/global/list/rad_collectors = list() - /obj/machinery/power/rad_collector name = "Radiation Collector Array" desc = "A device which uses Hawking Radiation and phoron to produce power." @@ -19,11 +17,11 @@ var/global/list/rad_collectors = list() /obj/machinery/power/rad_collector/Initialize(mapload) . = ..() - rad_collectors += src + GLOB.rad_collectors += src AddElement(/datum/element/climbable) /obj/machinery/power/rad_collector/Destroy() - rad_collectors -= src + GLOB.rad_collectors -= src return ..() /obj/machinery/power/rad_collector/process() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 607290203c2..4c7f5ddd129 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -454,7 +454,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) return /obj/singularity/proc/pulse() - for(var/obj/machinery/power/rad_collector/R in rad_collectors) + for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors) if (get_dist(R, src) <= 15) //Better than using orange() every process. R.receive_pulse(energy) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index e721f78f7ac..9ecf83589c9 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -177,7 +177,7 @@ for(var/z in affected_z) SSradiation.z_radiate(locate(1, 1, z), DETONATION_RADS, 1) - for(var/mob/living/mob in living_mob_list) + for(var/mob/living/mob in GLOB.living_mob_list) var/turf/TM = get_turf(mob) if(!TM) continue @@ -261,7 +261,7 @@ //Public alerts if((damage > emergency_point) && !public_alert) GLOB.global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor") - for(var/mob/M in player_list) // Rykka adds SM Delam alarm + for(var/mob/M in GLOB.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 admin_chat_message(message = "SUPERMATTER DELAMINATING!", color = "#FF2222") //VOREStation Add diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index b71d9e75e93..98b6b8587da 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.GLOB.alldirs + move_bias) //ensures large-ball teslas don't just sit around + var/move_dir = pick(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/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index bc8927a2127..e2a40000d5f 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -217,16 +217,16 @@ . += "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!" //magazine icon state caching -/var/global/list/magazine_icondata_keys = list() -/var/global/list/magazine_icondata_states = list() +GLOBAL_LIST_EMPTY(magazine_icondata_keys) +GLOBAL_LIST_EMPTY(magazine_icondata_states) /proc/initialize_magazine_icondata(var/obj/item/ammo_magazine/M) var/typestr = M.type - if(!(typestr in magazine_icondata_keys) || !(typestr in magazine_icondata_states)) + if(!(typestr in GLOB.magazine_icondata_keys) || !(typestr in GLOB.magazine_icondata_states)) magazine_icondata_cache_add(M) - M.icon_keys = magazine_icondata_keys[typestr] - M.ammo_states = magazine_icondata_states[typestr] + M.icon_keys = GLOB.magazine_icondata_keys[typestr] + M.ammo_states = GLOB.magazine_icondata_states[typestr] /proc/magazine_icondata_cache_add(var/obj/item/ammo_magazine/M) var/list/icon_keys = list() @@ -238,8 +238,8 @@ icon_keys += i ammo_states += ammo_state - magazine_icondata_keys[M.type] = icon_keys - magazine_icondata_states[M.type] = ammo_states + GLOB.magazine_icondata_keys[M.type] = icon_keys + GLOB.magazine_icondata_states[M.type] = ammo_states /* * Ammo Boxes diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index fcf21769a79..fc2b1ecc28d 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -334,26 +334,9 @@ load_method = SINGLE_CASING max_shells = 1 //literally just a barrel - var/global/list/ammo_types = list( - /obj/item/ammo_casing/a357 = ".357", - /obj/item/ammo_casing/a9mm = "9mm", - /obj/item/ammo_casing/a45 = ".45", - /obj/item/ammo_casing/a10mm = "10mm", - /obj/item/ammo_casing/a12g = "12g", - /obj/item/ammo_casing/a12g = "12g", - /obj/item/ammo_casing/a12g/pellet = "12g", - /obj/item/ammo_casing/a12g/pellet = "12g", - /obj/item/ammo_casing/a12g/pellet = "12g", - /obj/item/ammo_casing/a12g/beanbag = "12g", - /obj/item/ammo_casing/a12g/stunshell = "12g", - /obj/item/ammo_casing/a12g/flash = "12g", - /obj/item/ammo_casing/a762 = "7.62mm", - /obj/item/ammo_casing/a545 = "5.45mm" - ) - /obj/item/gun/projectile/pirate/Initialize(mapload) - ammo_type = pick(ammo_types) - desc += " Uses [ammo_types[ammo_type]] rounds." + ammo_type = pick(GLOB.global_ammo_types) + desc += " Uses [GLOB.global_ammo_types[ammo_type]] rounds." var/obj/item/ammo_casing/ammo = ammo_type caliber = initial(ammo.caliber) diff --git a/code/modules/random_map/drop/drop_types.dm b/code/modules/random_map/drop/drop_types.dm index dba93b9be33..34227180b05 100644 --- a/code/modules/random_map/drop/drop_types.dm +++ b/code/modules/random_map/drop/drop_types.dm @@ -1,5 +1,3 @@ -var/global/list/datum/supply_drop_loot/supply_drop - /proc/supply_drop_random_loot_types() if(!supply_drop) supply_drop = init_subtypes(/datum/supply_drop_loot) diff --git a/code/modules/random_map/random_map.dm b/code/modules/random_map/random_map.dm index d7e26d90d83..57c924bf95a 100644 --- a/code/modules/random_map/random_map.dm +++ b/code/modules/random_map/random_map.dm @@ -1,7 +1,4 @@ // Generates cave systems for the asteroid, and places ore tiles. -var/global/list/random_maps = list() -var/global/list/map_count = list() - /datum/random_map // Strings. @@ -43,12 +40,12 @@ var/global/list/map_count = list() return // Store this for debugging. - if(!map_count[descriptor]) - map_count[descriptor] = 1 + if(!GLOB.map_count[descriptor]) + GLOB.map_count[descriptor] = 1 else - map_count[descriptor]++ - name = "[descriptor] #[map_count[descriptor]]" - if(preserve_map) random_maps[name] = src + GLOB.map_count[descriptor]++ + name = "[descriptor] #[GLOB.map_count[descriptor]]" + if(preserve_map) GLOB.random_maps[name] = src // Get origins for applying the map later. set_origins(tx, ty, tz) diff --git a/code/modules/random_map/random_map_verbs.dm b/code/modules/random_map/random_map_verbs.dm index bcaac9ab439..96fea0cf1cf 100644 --- a/code/modules/random_map/random_map_verbs.dm +++ b/code/modules/random_map/random_map_verbs.dm @@ -5,10 +5,10 @@ if(!check_rights_for(src, R_HOLDER)) return - var/choice = tgui_input_list(usr, "Choose a map to display.", "Map Choice", random_maps) + var/choice = tgui_input_list(usr, "Choose a map to display.", "Map Choice", GLOB.random_maps) if(!choice) return - var/datum/random_map/M = random_maps[choice] + var/datum/random_map/M = GLOB.random_maps[choice] if(istype(M)) M.display_map(usr) @@ -19,11 +19,11 @@ if(!check_rights_for(src, R_HOLDER)) return - var/choice = tgui_input_list(usr, "Choose a map to delete.", "Map Choice", random_maps) + var/choice = tgui_input_list(usr, "Choose a map to delete.", "Map Choice", GLOB.random_maps) if(!choice) return - var/datum/random_map/M = random_maps[choice] - random_maps[choice] = null + var/datum/random_map/M = GLOB.random_maps[choice] + GLOB.random_maps[choice] = null if(istype(M)) message_admins("[key_name_admin(usr)] has deleted [M.name].") log_admin("[key_name(usr)] has deleted [M.name].") @@ -60,10 +60,10 @@ if(!check_rights_for(src, R_HOLDER)) return - var/choice = tgui_input_list(usr, "Choose a map to apply.", "Map Choice", random_maps) + var/choice = tgui_input_list(usr, "Choose a map to apply.", "Map Choice", GLOB.random_maps) if(!choice) return - var/datum/random_map/M = random_maps[choice] + var/datum/random_map/M = GLOB.random_maps[choice] if(istype(M)) var/tx = tgui_input_number(usr, "X? (default to current turf)") var/ty = tgui_input_number(usr, "Y? (default to current turf)") @@ -85,17 +85,17 @@ if(!check_rights_for(src, R_HOLDER)) return - var/choice = tgui_input_list(usr, "Choose a map as base.", "Map Choice", random_maps) + var/choice = tgui_input_list(usr, "Choose a map as base.", "Map Choice", GLOB.random_maps) if(!choice) return - var/datum/random_map/base_map = random_maps[choice] + var/datum/random_map/base_map = GLOB.random_maps[choice] choice = null - choice = tgui_input_list(usr, "Choose a map to overlay.", "Map Choice", random_maps) + choice = tgui_input_list(usr, "Choose a map to overlay.", "Map Choice", GLOB.random_maps) if(!choice) return - var/datum/random_map/overlay_map = random_maps[choice] + var/datum/random_map/overlay_map = GLOB.random_maps[choice] if(istype(base_map) && istype(overlay_map)) var/tx = tgui_input_number(usr, "X? (default to 1)") diff --git a/code/modules/reagents/machinery/grinder.dm b/code/modules/reagents/machinery/grinder.dm index 59eb8e5794c..6ca29c31225 100644 --- a/code/modules/reagents/machinery/grinder.dm +++ b/code/modules/reagents/machinery/grinder.dm @@ -1,55 +1,3 @@ -// Don't need a new list for every grinder in the game -var/global/list/sheet_reagents = list( //have a number of reagents divisible by REAGENTS_PER_SHEET (default 20) unless you like decimals. - /obj/item/stack/material/plastic = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_OXYGEN,REAGENT_ID_CHLORINE,REAGENT_ID_SULFUR), - /obj/item/stack/material/copper = list(REAGENT_ID_COPPER), - /obj/item/stack/material/wood = list(REAGENT_ID_CARBON,REAGENT_ID_WOODPULP,REAGENT_ID_NITROGEN,REAGENT_ID_POTASSIUM,REAGENT_ID_SODIUM), - /obj/item/stack/material/stick = list(REAGENT_ID_CARBON,REAGENT_ID_WOODPULP,REAGENT_ID_NITROGEN,REAGENT_ID_POTASSIUM,REAGENT_ID_SODIUM), - /obj/item/stack/material/log = list(REAGENT_ID_CARBON,REAGENT_ID_WOODPULP,REAGENT_ID_NITROGEN,REAGENT_ID_POTASSIUM,REAGENT_ID_SODIUM), - /obj/item/stack/material/algae = list(REAGENT_ID_CARBON,REAGENT_ID_NITROGEN,REAGENT_ID_NITROGEN,REAGENT_ID_PHOSPHORUS,REAGENT_ID_PHOSPHORUS), - /obj/item/stack/material/graphite = list(REAGENT_ID_CARBON), - /obj/item/stack/material/aluminium = list(REAGENT_ID_ALUMINIUM), // The material is aluminium, but the reagent is aluminum... - /obj/item/stack/material/glass/reinforced = list(REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_IRON,REAGENT_ID_CARBON), - /obj/item/stack/material/leather = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PROTEIN,REAGENT_ID_PROTEIN,REAGENT_ID_TRIGLYCERIDE), - /obj/item/stack/material/cloth = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PROTEIN,REAGENT_ID_SODIUM), - /obj/item/stack/material/fiber = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PROTEIN,REAGENT_ID_SODIUM), - /obj/item/stack/material/fur = list(REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_SULFUR,REAGENT_ID_SODIUM), - /obj/item/stack/material/deuterium = list(REAGENT_ID_HYDROGEN), - /obj/item/stack/material/glass/phoronrglass = list(REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_PHORON,REAGENT_ID_PHORON), - /obj/item/stack/material/diamond = list(REAGENT_ID_CARBON), - /obj/item/stack/material/durasteel = list(REAGENT_ID_IRON,REAGENT_ID_IRON,REAGENT_ID_CARBON,REAGENT_ID_CARBON,REAGENT_ID_PLATINUM), - /obj/item/stack/material/wax = list(REAGENT_ID_ETHANOL,REAGENT_ID_TRIGLYCERIDE), - /obj/item/stack/material/iron = list(REAGENT_ID_IRON), - /obj/item/stack/material/uranium = list(REAGENT_ID_URANIUM), - /obj/item/stack/material/phoron = list(REAGENT_ID_PHORON), - /obj/item/stack/material/gold = list(REAGENT_ID_GOLD), - /obj/item/stack/material/silver = list(REAGENT_ID_SILVER), - /obj/item/stack/material/platinum = list(REAGENT_ID_PLATINUM), - /obj/item/stack/material/mhydrogen = list(REAGENT_ID_HYDROGEN), - /obj/item/stack/material/steel = list(REAGENT_ID_IRON, REAGENT_ID_CARBON), - /obj/item/stack/material/plasteel = list(REAGENT_ID_IRON, REAGENT_ID_IRON, REAGENT_ID_CARBON, REAGENT_ID_CARBON, REAGENT_ID_PLATINUM), //8 iron, 8 carbon, 4 platinum, - /obj/item/stack/material/snow = list(REAGENT_ID_WATER), - /obj/item/stack/material/sandstone = list(REAGENT_ID_SILICON, REAGENT_ID_OXYGEN), - /obj/item/stack/material/glass = list(REAGENT_ID_SILICON), - /obj/item/stack/material/glass/phoronglass = list(REAGENT_ID_PLATINUM, REAGENT_ID_SILICON, REAGENT_ID_SILICON, REAGENT_ID_SILICON), //5 platinum, 15 silicon, - /obj/item/stack/material/supermatter = list(REAGENT_ID_SUPERMATTER) - ) -var/global/list/ore_reagents = list( //have a number of reageents divisible by REAGENTS_PER_ORE (default 20) unless you like decimals. - /obj/item/ore/glass = list(REAGENT_ID_SILICON), - /obj/item/ore/iron = list(REAGENT_ID_IRON), - /obj/item/ore/coal = list(REAGENT_ID_CARBON), - /obj/item/ore/phoron = list(REAGENT_ID_PHORON), - /obj/item/ore/silver = list(REAGENT_ID_SILVER), - /obj/item/ore/gold = list(REAGENT_ID_GOLD), - /obj/item/ore/marble = list(REAGENT_ID_SILICON,REAGENT_ID_ALUMINIUM,REAGENT_ID_ALUMINIUM,REAGENT_ID_SODIUM,REAGENT_ID_CALCIUM), // Some nice variety here - /obj/item/ore/uranium = list(REAGENT_ID_URANIUM), - /obj/item/ore/diamond = list(REAGENT_ID_CARBON), - /obj/item/ore/osmium = list(REAGENT_ID_PLATINUM), // should contain osmium - /obj/item/ore/lead = list(REAGENT_ID_LEAD), - /obj/item/ore/hydrogen = list(REAGENT_ID_HYDROGEN), - /obj/item/ore/verdantium = list(REAGENT_ID_RADIUM,REAGENT_ID_PHORON,REAGENT_ID_NITROGEN,REAGENT_ID_PHOSPHORUS,REAGENT_ID_SODIUM), // Some fun stuff to be useful with - /obj/item/ore/rutile = list(REAGENT_ID_TUNGSTEN,REAGENT_ID_OXYGEN) // Should be titanium -) - /obj/machinery/reagentgrinder name = "All-In-One Grinder" @@ -173,7 +121,7 @@ var/global/list/ore_reagents = list( //have a number of reageents divisible by R return 0 - if(!global.sheet_reagents[O.type] && !global.ore_reagents[O.type] && (!O.reagents || !O.reagents.total_volume)) + if(!GLOB.sheet_reagents[O.type] && !GLOB.ore_reagents[O.type] && (!O.reagents || !O.reagents.total_volume)) to_chat(user, "\The [O] is not suitable for blending.") return 1 @@ -257,10 +205,10 @@ var/global/list/ore_reagents = list( //have a number of reageents divisible by R if(remaining_volume <= 0) break - if(global.sheet_reagents[O.type]) + if(GLOB.sheet_reagents[O.type]) var/obj/item/stack/stack = O if(istype(stack)) - var/list/sheet_components = global.sheet_reagents[stack.type] + var/list/sheet_components = GLOB.sheet_reagents[stack.type] var/amount_to_take = max(0,min(stack.get_amount(),round(remaining_volume/REAGENTS_PER_SHEET))) if(amount_to_take) stack.use(amount_to_take) @@ -274,10 +222,10 @@ var/global/list/ore_reagents = list( //have a number of reageents divisible by R beaker.reagents.add_reagent(sheet_components, (amount_to_take*REAGENTS_PER_SHEET)) continue - if(global.ore_reagents[O.type]) + if(GLOB.ore_reagents[O.type]) var/obj/item/ore/R = O if(istype(R)) - var/list/ore_components = global.ore_reagents[R.type] + var/list/ore_components = GLOB.ore_reagents[R.type] if(remaining_volume >= REAGENTS_PER_ORE) holdingitems -= R qdel(R) diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 89c7efbe702..3ca60d17874 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -1,8 +1,6 @@ #define MESSAGE_SERVER_SPAM_REJECT 1 #define MESSAGE_SERVER_DEFAULT_SPAM_LIMIT 10 -var/global/list/obj/machinery/message_server/message_servers = list() - /datum/data_pda_msg var/recipient = "Unspecified" //name of the person var/sender = "Unspecified" //name of the sender diff --git a/code/modules/resleeving/sleevecard.dm b/code/modules/resleeving/sleevecard.dm index a3be102f501..93d97051dd2 100644 --- a/code/modules/resleeving/sleevecard.dm +++ b/code/modules/resleeving/sleevecard.dm @@ -100,8 +100,8 @@ // Software we have not bought var/list/not_bought_software = list() - for(var/key in pai_software_by_key) - var/datum/pai_software/S = pai_software_by_key[key] + for(var/key in GLOB.pai_software_by_key) + var/datum/pai_software/S = GLOB.pai_software_by_key[key] var/software_data[0] if(istype(S, /datum/pai_software/directives) && !emagged) continue diff --git a/code/modules/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm index d240684a1af..0c1a3fc774a 100644 --- a/code/modules/rogueminer_vr/zonemaster.dm +++ b/code/modules/rogueminer_vr/zonemaster.dm @@ -45,7 +45,7 @@ /datum/rogue/zonemaster/proc/is_occupied() var/humans = 0 - for(var/mob/living/carbon/human/H in human_mob_list) + for(var/mob/living/carbon/human/H in GLOB.human_mob_list) if(H.stat >= DEAD) //Conditions for exclusion here, like if disconnected people start blocking it. continue var/area/A = get_area(H) diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index cff5de51cc6..0a36d3f4e58 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -136,10 +136,6 @@ var/check_delay = 60 //periodically recheck if we need to rebuild a shield use_power = USE_POWER_OFF idle_power_usage = 0 - var/global/list/blockedturfs = list( - /turf/space, - /turf/simulated/floor/outdoors, - ) /obj/machinery/shieldgen/Initialize(mapload) . = ..() @@ -175,7 +171,7 @@ /obj/machinery/shieldgen/proc/create_shields() for(var/turf/target_tile in range(2, src)) - if (is_type_in_list(target_tile,blockedturfs) && !(locate(/obj/machinery/shield) in target_tile)) + if (is_type_in_list(target_tile,GLOB.shieldgen_blockedturfs) && !(locate(/obj/machinery/shield) in target_tile)) if (malfunction && prob(33) || !malfunction) var/obj/machinery/shield/S = new/obj/machinery/shield(target_tile) deployed_shields += S diff --git a/code/modules/shieldgen/shield_gen_external.dm b/code/modules/shieldgen/shield_gen_external.dm index 5adea33b926..140fbb3b49c 100644 --- a/code/modules/shieldgen/shield_gen_external.dm +++ b/code/modules/shieldgen/shield_gen_external.dm @@ -3,10 +3,6 @@ /obj/machinery/shield_gen/external name = "hull shield generator" - var/global/list/blockedturfs = list( - /turf/space, - /turf/simulated/floor/outdoors, - ) /obj/machinery/shield_gen/external/advanced name = "advanced hull shield generator" @@ -24,10 +20,10 @@ for (var/x_offset = -field_radius; x_offset <= field_radius; x_offset++) for (var/y_offset = -field_radius; y_offset <= field_radius; y_offset++) T = locate(gen_turf.x + x_offset, gen_turf.y + y_offset, gen_turf.z) - if (is_type_in_list(T,blockedturfs)) + if (is_type_in_list(T,GLOB.external_shield_gen_blockedturfs)) //check neighbors of T for(var/i in orange(1, T)) - if(istype(i, /turf/simulated) && !is_type_in_list(i,blockedturfs)) + if(istype(i, /turf/simulated) && !is_type_in_list(i,GLOB.external_shield_gen_blockedturfs)) out += T break return out diff --git a/code/modules/shuttles/shuttle_specops.dm b/code/modules/shuttles/shuttle_specops.dm index 6966ddabd09..9dae0934d9c 100644 --- a/code/modules/shuttles/shuttle_specops.dm +++ b/code/modules/shuttles/shuttle_specops.dm @@ -153,10 +153,10 @@ sleep(10) var/spawn_marauder[] = new() - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == "Marauder Entry") spawn_marauder.Add(L) - for(var/obj/effect/landmark/L in landmarks_list) + for(var/obj/effect/landmark/L in GLOB.landmarks_list) if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc) P.invisibility = INVISIBILITY_ABSTRACT //So it is not seen by anyone. diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 8012009f62d..bf33ea26b00 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -333,7 +333,7 @@ /obj/item/spellbook/oneuse/mindswap/recoil(mob/user as mob) ..() - if(stored_swap in dead_mob_list) + if(stored_swap in GLOB.dead_mob_list) stored_swap = null if(!stored_swap) stored_swap = user diff --git a/code/modules/spells/targeted/harvest.dm b/code/modules/spells/targeted/harvest.dm index bcb70c194d5..f69f6844e7b 100644 --- a/code/modules/spells/targeted/harvest.dm +++ b/code/modules/spells/targeted/harvest.dm @@ -28,7 +28,7 @@ ..() var/destination = null - for(var/obj/singularity/narsie/large/N in narsie_list) + for(var/obj/singularity/narsie/large/N in GLOB.narsie_list) destination = N.loc break if(destination) diff --git a/code/modules/spells/targeted/targeted.dm b/code/modules/spells/targeted/targeted.dm index b86a5116730..02e4205d0b4 100644 --- a/code/modules/spells/targeted/targeted.dm +++ b/code/modules/spells/targeted/targeted.dm @@ -34,7 +34,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp if(max_targets == 0) //unlimited if(range == -2) - targets = living_mob_list + targets = GLOB.living_mob_list else for(var/mob/living/target in view_or_range(range, holder, selection_type)) targets += target @@ -46,7 +46,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp var/list/possible_targets = list() var/list/starting_targets if(range == -2) - starting_targets = living_mob_list + starting_targets = GLOB.living_mob_list else starting_targets = view_or_range(range, holder, selection_type) @@ -74,7 +74,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp var/list/starting_targets if(range == -2) - starting_targets = living_mob_list + starting_targets = GLOB.living_mob_list else starting_targets = view_or_range(range, holder, selection_type) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 50e12783fab..5872dc0d87c 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -150,7 +150,7 @@ return 0 // This is meant to prevent the 'glass shard mouth 60 damage click' exploit. Also saves CPU by doing it here! var/list/datum/surgery_step/available_surgeries = list() - for(var/datum/surgery_step/S in surgery_steps) + for(var/datum/surgery_step/S in GLOB.surgery_steps) //check if tool is right or close enough and if this step is possible if(S.tool_quality(src)) var/step_is_valid = S.can_use(user, M, zone, src) @@ -233,7 +233,7 @@ return 1 //don't want to do weapony things after surgery /proc/sort_surgeries() - var/gap = surgery_steps.len + var/gap = GLOB.surgery_steps.len var/swapped = 1 while (gap > 1 || swapped) swapped = 0 @@ -241,11 +241,11 @@ gap = round(gap / 1.247330950103979) if(gap < 1) gap = 1 - for(var/i = 1; gap + i <= surgery_steps.len; i++) - var/datum/surgery_step/l = surgery_steps[i] //Fucking hate - var/datum/surgery_step/r = surgery_steps[gap+i] //how lists work here + for(var/i = 1; gap + i <= GLOB.surgery_steps.len; i++) + var/datum/surgery_step/l = GLOB.surgery_steps[i] //Fucking hate + var/datum/surgery_step/r = GLOB.surgery_steps[gap+i] //how lists work here if(l.priority < r.priority) - surgery_steps.Swap(i, gap + i) + GLOB.surgery_steps.Swap(i, gap + i) swapped = 1 /datum/surgery_status/ diff --git a/code/modules/tgs_commands/vorestation.dm b/code/modules/tgs_commands/vorestation.dm index 89bedf04895..644731da8f9 100644 --- a/code/modules/tgs_commands/vorestation.dm +++ b/code/modules/tgs_commands/vorestation.dm @@ -352,7 +352,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations) var/player_name = message_as_list.Join(" ") var/mob/living/real_target - for(var/mob/living/target in player_list) + for(var/mob/living/target in GLOB.player_list) if(target.real_name == player_name) real_target = target break diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm index 80db43a4ef7..2416e400f98 100644 --- a/code/modules/tgui/modules/agentcard.dm +++ b/code/modules/tgui/modules/agentcard.dm @@ -129,7 +129,7 @@ if("factoryreset") if(tgui_alert(ui.user, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", list("No", "Yes")) == "Yes" && tgui_status(ui.user, state) == STATUS_INTERACTIVE) S.age = initial(S.age) - S.access = syndicate_access.Copy() + S.access = GLOB.syndicate_access.Copy() S.assignment = initial(S.assignment) S.blood_type = initial(S.blood_type) S.dna_hash = initial(S.dna_hash) diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 934e89e7dd3..29a0f026378 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -423,29 +423,29 @@ switch (todo) if (0) //delete if (name_marking) - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[name_marking] if (owner.remove_marking(mark_datum)) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return TRUE if (1) //add if(name_marking && can_still_topic(ui.user, state)) - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[name_marking] if (owner.add_marking(mark_datum)) changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return TRUE if (2) //move up - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[name_marking] if (owner.change_priority_of_marking(mark_datum, FALSE)) return TRUE if (3) //move down - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[name_marking] if (owner.change_priority_of_marking(mark_datum, TRUE)) return TRUE if (4) //color var/current = markings[name_marking] ? markings[name_marking]["color"] : "#000000" var/marking_color = tgui_color_picker(ui.user, "Please select marking color", "Marking color", current) if(marking_color && can_still_topic(ui.user, state)) - var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking] + var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[name_marking] if (owner.change_marking_color(mark_datum, marking_color)) return TRUE if("rotate_view") @@ -493,7 +493,7 @@ return TRUE if("blood_reagent") //you know, this feels REALLY odd to be able to change at will but WHATEVER, WE BALL. if(can_change(owner, APPEARANCE_MISC)) - var/new_blood_reagents = tgui_input_list(ui.user, "Please select blood restoration reagent:", "Character Preference", valid_bloodreagents) + var/new_blood_reagents = tgui_input_list(ui.user, "Please select blood restoration reagent:", "Character Preference", GLOB.valid_bloodreagents) if(new_blood_reagents) owner.dna.blood_reagents = new_blood_reagents changed_hook(APPEARANCECHANGER_CHANGED_RACE) @@ -700,7 +700,7 @@ if(can_change(owner, APPEARANCE_HAIR)) var/hair_styles[0] for(var/hair_style in valid_hairstyles) - var/datum/sprite_accessory/hair/S = hair_styles_list[hair_style] + var/datum/sprite_accessory/hair/S = GLOB.hair_styles_list[hair_style] hair_styles[++hair_styles.len] = list("name" = hair_style, "icon" = S.icon, "icon_state" = "[S.icon_state]_s") data["hair_styles"] = hair_styles data["ear_styles"] = valid_earstyles @@ -708,12 +708,12 @@ data["wing_styles"] = valid_wingstyles markings = owner.get_prioritised_markings() - var/list/usable_markings = markings.Copy() ^ body_marking_styles_list.Copy() + var/list/usable_markings = markings.Copy() ^ GLOB.body_marking_styles_list.Copy() var/marking_styles[0] for(var/marking_style in usable_markings) if(marking_style == DEVELOPER_WARNING_NAME) continue - var/datum/sprite_accessory/marking/S = body_marking_styles_list[marking_style] + var/datum/sprite_accessory/marking/S = GLOB.body_marking_styles_list[marking_style] var/our_iconstate = S.icon_state if(LAZYLEN(S.body_parts)) our_iconstate += "-[S.body_parts[1]]" @@ -723,7 +723,7 @@ if(can_change(owner, APPEARANCE_FACIAL_HAIR)) var/facial_hair_styles[0] for(var/facial_hair_style in valid_facial_hairstyles) - var/datum/sprite_accessory/facial_hair/S = facial_hair_styles_list[facial_hair_style] + var/datum/sprite_accessory/facial_hair/S = GLOB.facial_hair_styles_list[facial_hair_style] facial_hair_styles[++facial_hair_styles.len] = list("name" = facial_hair_style, "icon" = S.icon, "icon_state" = "[S.icon_state]_s") data["facial_hair_styles"] = facial_hair_styles @@ -931,8 +931,8 @@ valid_facial_hairstyles = target.generate_valid_facial_hairstyles() if(!LAZYLEN(valid_earstyles)) - for(var/path in ear_styles_list) - var/datum/sprite_accessory/ears/instance = ear_styles_list[path] + for(var/path in GLOB.ear_styles_list) + var/datum/sprite_accessory/ears/instance = GLOB.ear_styles_list[path] if(can_use_sprite(instance, target, user)) valid_earstyles.Add(list(list( "name" = instance.name, @@ -944,8 +944,8 @@ ))) if(!LAZYLEN(valid_tailstyles)) - for(var/path in tail_styles_list) - var/datum/sprite_accessory/tail/instance = tail_styles_list[path] + for(var/path in GLOB.tail_styles_list) + var/datum/sprite_accessory/tail/instance = GLOB.tail_styles_list[path] if(can_use_sprite(instance, target, user)) valid_tailstyles.Add(list(list( "name" = instance.name, @@ -957,8 +957,8 @@ ))) if(!LAZYLEN(valid_wingstyles)) - for(var/path in wing_styles_list) - var/datum/sprite_accessory/wing/instance = wing_styles_list[path] + for(var/path in GLOB.wing_styles_list) + var/datum/sprite_accessory/wing/instance = GLOB.wing_styles_list[path] if(can_use_sprite(instance, target, user)) valid_wingstyles.Add(list(list( "name" = instance.name, diff --git a/code/modules/tgui/modules/crew_monitor.dm b/code/modules/tgui/modules/crew_monitor.dm index 317ab60c31f..b6fae49581d 100644 --- a/code/modules/tgui/modules/crew_monitor.dm +++ b/code/modules/tgui/modules/crew_monitor.dm @@ -23,7 +23,7 @@ if("track") if(isAI(ui.user)) var/mob/living/silicon/ai/AI = ui.user - var/mob/living/carbon/human/H = locate(params["track"]) in mob_list + var/mob/living/carbon/human/H = locate(params["track"]) in GLOB.mob_list if(hassensorlevel(H, SUIT_SENSOR_TRACKING)) AI.ai_actual_track(H) return TRUE diff --git a/code/modules/tgui/modules/late_choices.dm b/code/modules/tgui/modules/late_choices.dm index e3cae7d717d..15d9b6ba801 100644 --- a/code/modules/tgui/modules/late_choices.dm +++ b/code/modules/tgui/modules/late_choices.dm @@ -82,7 +82,7 @@ var/active = 0 // Only players with the job assigned and AFK for less than 10 minutes count as active - for(var/mob/M in player_list) + for(var/mob/M in GLOB.player_list) if(M.mind?.assigned_role == job.title && M.client?.inactivity <= 10 MINUTES) active++ diff --git a/code/modules/tgui/modules/law_manager.dm b/code/modules/tgui/modules/law_manager.dm index 973cbdd69f8..78f0031ffb2 100644 --- a/code/modules/tgui/modules/law_manager.dm +++ b/code/modules/tgui/modules/law_manager.dm @@ -6,9 +6,6 @@ var/inherent_law = "InherentLaw" var/supplied_law = "SuppliedLaw" var/supplied_law_position = MIN_SUPPLIED_LAW_NUMBER - - var/global/list/datum/ai_laws/admin_laws - var/global/list/datum/ai_laws/player_laws var/mob/living/silicon/owner = null /datum/tgui_module/law_manager/New(mob/living/silicon/S) diff --git a/code/modules/tickets/tickets.dm b/code/modules/tickets/tickets.dm index 9d1d1d75a8d..3e44ca419af 100644 --- a/code/modules/tickets/tickets.dm +++ b/code/modules/tickets/tickets.dm @@ -818,7 +818,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick/ticket) var/list/forenames = list() var/list/ckeys = list() var/founds = "" - for(var/mob/M in mob_list) + for(var/mob/M in GLOB.mob_list) var/list/indexing = list(M.real_name, M.name) if(M.mind) indexing += M.mind.name diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm index ad4ad0d1799..53bafa76614 100644 --- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm +++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm @@ -5,7 +5,7 @@ M.remove_ventcrawl() M.forceMove(get_turf(src)) if(pipe_image) - for(var/mob/living/M in player_list) + for(var/mob/living/M in GLOB.player_list) if(M.client) M.client.images -= pipe_image M.pipes_shown -= pipe_image diff --git a/code/modules/vore/eating/belly_import.dm b/code/modules/vore/eating/belly_import.dm index d7d1b874fa8..7d4ec769748 100644 --- a/code/modules/vore/eating/belly_import.dm +++ b/code/modules/vore/eating/belly_import.dm @@ -768,7 +768,7 @@ if(istext(belly_data["tail_to_change_to"])) var/new_tail_to_change_to = sanitize(belly_data["tail_to_change_to"],MAX_MESSAGE_LEN,0,0,0) if(new_tail_to_change_to) - if (new_tail_to_change_to in tail_styles_list) + if (new_tail_to_change_to in GLOB.tail_styles_list) new_belly.tail_to_change_to = new_tail_to_change_to if(istext(belly_data["tail_colouration"])) diff --git a/code/modules/vore/eating/belly_obj_liquids.dm b/code/modules/vore/eating/belly_obj_liquids.dm index c6302883705..8e09d3ac09c 100644 --- a/code/modules/vore/eating/belly_obj_liquids.dm +++ b/code/modules/vore/eating/belly_obj_liquids.dm @@ -35,7 +35,7 @@ if(is_beneficial && reagents.total_volume) reagents.trans_to(L, affecting_amt, 1, FALSE) for(var/obj/item/I in touchable_atoms) - if(is_type_in_list(I, item_digestion_blacklist)) + if(is_type_in_list(I, GLOB.item_digestion_blacklist)) continue if(reagents.total_volume) reagents.trans_to(I, affecting_amt, 1, FALSE) diff --git a/code/modules/vore/eating/inbelly_spawn.dm b/code/modules/vore/eating/inbelly_spawn.dm index 2d92d44d703..f04dd24d8e8 100644 --- a/code/modules/vore/eating/inbelly_spawn.dm +++ b/code/modules/vore/eating/inbelly_spawn.dm @@ -18,7 +18,7 @@ Please do not abuse this ability. var/list/eligible_targets = list() - for(var/mob/living/pred in living_mob_list) + for(var/mob/living/pred in GLOB.living_mob_list) if(!istype(pred) || !pred.client) // Ignore preds that aren't living mobs or player controlled continue if(pred.no_vore) // No vore, no bellies, no inbelly spawning diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index a1fc86437ab..b98c8396668 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -906,7 +906,7 @@ to_chat(src, span_notice("You are not holding anything.")) return - if(is_type_in_list(I, GLOB.edible_trash) || adminbus_trash || is_type_in_list(I,edible_tech) && isSynthetic()) // adds edible tech for synth + if(is_type_in_list(I, GLOB.edible_trash) || adminbus_trash || is_type_in_list(I,GLOB.edible_tech) && isSynthetic()) // adds edible tech for synth if(!I.on_trash_eaten(src)) // shows object's rejection message itself return drop_item() diff --git a/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm b/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm index 5222ddba211..6c72dd464dd 100644 --- a/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm +++ b/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm @@ -986,7 +986,7 @@ . = TRUE if("b_tail_to_change_to") var/tail_choice = params["val"] - if(!(tail_choice in global.tail_styles_list)) + if(!(tail_choice in GLOB.tail_styles_list)) return FALSE host.vore_selected.tail_to_change_to = tail_choice . = TRUE diff --git a/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm b/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm index c0a931517d4..5d886ff8fa7 100644 --- a/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm +++ b/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm @@ -264,7 +264,7 @@ "undergarment_color" = selected.undergarment_color, "tail_option_shown" = ishuman(owner), "tail_to_change_to" = selected.tail_to_change_to, - "tail_sprite_options" = global.tail_styles_list, + "tail_sprite_options" = GLOB.tail_styles_list, "mob_belly_controls" = silicon_control ) selected_list["belly_visual_data"] = belly_visual_data diff --git a/code/modules/vore/eating/soulcatcher.dm b/code/modules/vore/eating/soulcatcher.dm index 72ea61c3348..6c9751dbd71 100644 --- a/code/modules/vore/eating/soulcatcher.dm +++ b/code/modules/vore/eating/soulcatcher.dm @@ -140,7 +140,7 @@ brainmob.container = src brainmob.stat = 0 brainmob.silent = FALSE - dead_mob_list -= brainmob + GLOB.dead_mob_list -= brainmob brainmob.ext_deaf = !flag_check(NIF_SC_ALLOW_EARS) brainmob.ext_blind = !flag_check(NIF_SC_ALLOW_EYES) brainmob.add_language(LANGUAGE_GALCOM) diff --git a/code/modules/vore/eating/soulcatcher_observer.dm b/code/modules/vore/eating/soulcatcher_observer.dm index 6b0580ab40a..ccd53c52388 100644 --- a/code/modules/vore/eating/soulcatcher_observer.dm +++ b/code/modules/vore/eating/soulcatcher_observer.dm @@ -4,7 +4,7 @@ set desc = "Select a player with enabled Soulcatcher to join." var/list/valid_players = list() - for(var/mob/player in player_list) + for(var/mob/player in GLOB.player_list) if(player.soulgem?.flag_check(SOULGEM_ACTIVE | SOULGEM_CATCHING_GHOSTS, TRUE)) valid_players += player diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 8fbbd619f8b..705365061bb 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -1118,10 +1118,10 @@ should_proceed_with_revive = FALSE break if(should_proceed_with_revive) - dead_mob_list.Remove(H) - if((H in living_mob_list) || (H in dead_mob_list)) + GLOB.dead_mob_list.Remove(H) + if((H in GLOB.living_mob_list) || (H in GLOB.dead_mob_list)) WARNING("Mob [H] was reformed but already in the living or dead list still!") - living_mob_list += H + GLOB.living_mob_list += H H.timeofdeath = 0 H.set_stat(UNCONSCIOUS) //Life() can bring them back to consciousness if it needs to. @@ -1208,10 +1208,10 @@ should_proceed_with_revive = FALSE break if(should_proceed_with_revive) - dead_mob_list.Remove(H) - if((H in living_mob_list) || (H in dead_mob_list)) + GLOB.dead_mob_list.Remove(H) + if((H in GLOB.living_mob_list) || (H in GLOB.dead_mob_list)) WARNING("Mob [H] was defibbed but already in the living or dead list still!") - living_mob_list += H + GLOB.living_mob_list += H H.timeofdeath = 0 H.set_stat(UNCONSCIOUS) //Life() can bring them back to consciousness if it needs to. diff --git a/code/modules/vore/persist/persist_vr.dm b/code/modules/vore/persist/persist_vr.dm index 89adfd6fe67..5304a212465 100644 --- a/code/modules/vore/persist/persist_vr.dm +++ b/code/modules/vore/persist/persist_vr.dm @@ -15,7 +15,7 @@ // Handle people leaving due to round ending. /hook/roundend/proc/persist_locations() - for(var/mob/living/carbon/human/Player in human_mob_list) + for(var/mob/living/carbon/human/Player in GLOB.human_mob_list) if(!Player.mind || isnewplayer(Player)) continue // No mind we can do nothing, new players we care not for else if(Player.stat == DEAD) diff --git a/code/modules/webhooks/webhook_roundstart.dm b/code/modules/webhooks/webhook_roundstart.dm index f958666a67a..b3b4263b439 100644 --- a/code/modules/webhooks/webhook_roundstart.dm +++ b/code/modules/webhooks/webhook_roundstart.dm @@ -5,7 +5,7 @@ /decl/webhook/roundstart/get_message(var/list/data) . = ..() var/desc = "Gamemode: **[GLOB.master_mode]**\n" - desc += "Players: **[global.player_list.len]**" + desc += "Players: **[GLOB.player_list.len]**" if(data && data["url"]) desc += "\nAddress: <[data["url"]]>" diff --git a/code/modules/xenoarcheaology/effect_master.dm b/code/modules/xenoarcheaology/effect_master.dm index 70d8ac74747..6554264dac5 100644 --- a/code/modules/xenoarcheaology/effect_master.dm +++ b/code/modules/xenoarcheaology/effect_master.dm @@ -189,7 +189,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) /datum/component/artifact_master/proc/generate_effects() while(effect_generation_chance > 0) - var/chosen_path = pick(subtypesof(/datum/artifact_effect) - blacklisted_artifact_effects) + var/chosen_path = pick(subtypesof(/datum/artifact_effect) - GLOB.blacklisted_artifact_effects) if(effect_generation_chance >= 100) // If we're above 100 percent, just cut a flat amount and add an effect. var/datum/artifact_effect/AE = new chosen_path(src) if(istype(holder, AE.req_type)) diff --git a/code/modules/xenoarcheaology/effects/resurrect.dm b/code/modules/xenoarcheaology/effects/resurrect.dm index 5cb5b7c8dad..7123d11196a 100644 --- a/code/modules/xenoarcheaology/effects/resurrect.dm +++ b/code/modules/xenoarcheaology/effects/resurrect.dm @@ -65,8 +65,8 @@ SM.adjustFireLoss(-40) SM.health = SM.getMaxHealth() / 3 SM.stat = CONSCIOUS - dead_mob_list -= SM - living_mob_list += SM + GLOB.dead_mob_list -= SM + GLOB.living_mob_list += SM SM.update_icon() SM.revive() holder.visible_message(span_alien("\The [SM]'s eyes open in a flash of light!")) @@ -74,7 +74,7 @@ var/mob/living/carbon/human/H = L if(!H.client && H.mind) - for(var/mob/observer/dead/ghost in player_list) + for(var/mob/observer/dead/ghost in GLOB.player_list) if(ghost.mind == H.mind) to_chat(ghost, span_large(span_interface(span_bold("An artifact is trying to \ revive you. Return to your body if you want to be resurrected!") + "\ @@ -88,8 +88,8 @@ sleep(10 SECONDS) if(H.client) L.stat = CONSCIOUS - dead_mob_list -= H - living_mob_list += H + GLOB.dead_mob_list -= H + GLOB.living_mob_list += H H.timeofdeath = null holder.visible_message(span_alien("\The [H]'s eyes open in a flash of light!")) diff --git a/code/modules/xenoarcheaology/finds/finds_defines.dm b/code/modules/xenoarcheaology/finds/finds_defines.dm index 59c0d223082..f79f276b1b8 100644 --- a/code/modules/xenoarcheaology/finds/finds_defines.dm +++ b/code/modules/xenoarcheaology/finds/finds_defines.dm @@ -1,35 +1,5 @@ /// This is the big file of various xenoarch spawns (what each digsite spawns), digsite spawn rates, and -/// -/// This is a list of what the depth_scanner can show, depending on what get_responsive_reagent returns below. -/// -var/global/list/responsive_carriers = list( - REAGENT_ID_CARBON, - REAGENT_ID_POTASSIUM, - REAGENT_ID_HYDROGEN, - REAGENT_ID_NITROGEN, - REAGENT_BLOOD, - REAGENT_ID_MERCURY, - REAGENT_ID_IRON, - REAGENT_ID_PHORON) - -/// -/// This is a list of what the depth_scanner shows the user. In order with the above list. -/// -/// -/// If the get_responsive_reagent returns 'REAGENT_ID_CARBON' it will show up to the user as "Trace organic cells" -/// If the get_responsive_reagent returns "REAGENT_ID_CHLORINE" it will show up to the user as "Metamorphic/igneous rock composite" -/// -var/global/list/finds_as_strings = list( - "Trace organic cells", //Carbon - "Long exposure particles", //Potassium - "Trace water particles", //Hydrogen - "Crystalline structures", //Nitrogen - "Abnormal energy signatures", //Occult - "Metallic derivative", //Mercury - "Metallic composite", //Iron - "Anomalous material") //Phoron - /// /// This is called when using the depth_scanner on an artifact tile. It tells you what artifact group type is contained inside. /// Previously, we only used MERCURY, IRON, NITROGEN, POTASSIUM, CARBON, PHORON. Now, we expanded! diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm index 168618228ad..80cd3de08a4 100644 --- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -261,7 +261,7 @@ var/anom_found = 0 if(G) - data = " - Spectometric analysis on mineral sample has determined type [finds_as_strings[responsive_carriers.Find(G.source_mineral)]]
" + data = " - Spectometric analysis on mineral sample has determined type [GLOB.finds_as_strings[GLOB.responsive_carriers.Find(G.source_mineral)]]
" if(G.age_billion > 0) data += " - Radiometric dating shows age of [G.age_billion].[G.age_million] billion years
" else if(G.age_million > 0) @@ -271,9 +271,9 @@ data += " - Chromatographic analysis shows the following materials present:
" for(var/carrier in G.find_presence) if(G.find_presence[carrier]) - var/index = responsive_carriers.Find(carrier) - if(index > 0 && index <= finds_as_strings.len) - data += " > [100 * G.find_presence[carrier]]% [finds_as_strings[index]]
" + var/index = GLOB.responsive_carriers.Find(carrier) + if(index > 0 && index <= LAZYLEN(GLOB.finds_as_strings)) + data += " > [100 * G.find_presence[carrier]]% [GLOB.finds_as_strings[index]]
" if(G.artifact_id && G.artifact_distance >= 0) anom_found = 1 diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index f8b82730f2f..c61fe29f545 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -178,9 +178,9 @@ "index" = current.record_index, ) data["current"]["material"] = "Unknown" - var/index = responsive_carriers.Find(current.material) - if(index > 0 && index <= LAZYLEN(finds_as_strings)) - data["current"]["material"] = finds_as_strings[index] + var/index = GLOB.responsive_carriers.Find(current.material) + if(index > 0 && index <= LAZYLEN(GLOB.finds_as_strings)) + data["current"]["material"] = GLOB.finds_as_strings[index] var/list/plocs = list() data["positive_locations"] = plocs diff --git a/code/modules/xenobio/items/slime_objects.dm b/code/modules/xenobio/items/slime_objects.dm index 04e1ea32f55..973c93d7d01 100644 --- a/code/modules/xenobio/items/slime_objects.dm +++ b/code/modules/xenobio/items/slime_objects.dm @@ -18,7 +18,7 @@ // Sometime down the road it would be great to make all of these 'ask ghosts if they want to be X' procs into a generic datum. /obj/item/slime_cube/proc/request_player() - for(var/mob/observer/dead/O in player_list) + for(var/mob/observer/dead/O in GLOB.player_list) if(!O.MayRespawn()) continue if(O.client) diff --git a/code/modules/xenobio2/_xeno_setup.dm b/code/modules/xenobio2/_xeno_setup.dm index a5dc08c9a78..64f6b5ca689 100644 --- a/code/modules/xenobio2/_xeno_setup.dm +++ b/code/modules/xenobio2/_xeno_setup.dm @@ -48,37 +48,6 @@ #define MINOR_MALEABLE 1 #define MIN_MALEABLE 0 -var/global/list/xenoChemList = list(REAGENT_ID_MUTATIONTOXIN, - REAGENT_ID_PSILOCYBIN, - REAGENT_ID_MINDBREAKER, - REAGENT_ID_IMPEDREZENE, - REAGENT_ID_CRYPTOBIOLIN, - REAGENT_ID_BLISS, - REAGENT_ID_CHLORALHYDRATE, - REAGENT_ID_STOXIN, - REAGENT_ID_MUTAGEN, - REAGENT_ID_LEXORIN, - REAGENT_ID_PACID, - REAGENT_ID_CYANIDE, - REAGENT_ID_PHORON, - REAGENT_ID_PLASTICIDE, - REAGENT_ID_AMATOXIN, - REAGENT_ID_CARBON, - REAGENT_ID_RADIUM, - REAGENT_ID_SACID, - REAGENT_ID_SUGAR, - REAGENT_ID_KELOTANE, - REAGENT_ID_DERMALINE, - REAGENT_ID_ANTITOXIN, - REAGENT_ID_DEXALIN, - REAGENT_ID_SYNAPTIZINE, - REAGENT_ID_ALKYSINE, - REAGENT_ID_IMIDAZOLINE, - REAGENT_ID_PERIDAXON, - REAGENT_ID_REZADONE, - REAGENT_ID_MUTATIONTOXIN, - REAGENT_ID_MUTATIONTOXIN) - /datum/xeno/traits var/list/traits = list() var/list/chemlist = list() diff --git a/code/modules/xenobio2/_xeno_setup_vr.dm b/code/modules/xenobio2/_xeno_setup_vr.dm deleted file mode 100644 index b7d0e67f90e..00000000000 --- a/code/modules/xenobio2/_xeno_setup_vr.dm +++ /dev/null @@ -1,65 +0,0 @@ -/hook/startup/proc/xenochems_vr() //A chemical whitelist. Adds on to the other chemical whitelist. This is required, as you don't want users getting certain chemicals (See: Adminordizine) and also don't want them to just get pure stock chemicals, as that'd be boring for the player. - xenoChemList += REAGENT_ID_INAPROVALINE - xenoChemList += REAGENT_ID_BICARIDINE - xenoChemList += REAGENT_ID_ANTITOXIN - xenoChemList += REAGENT_ID_DEXALINP - xenoChemList += REAGENT_ID_TRICORDRAZINE - xenoChemList += REAGENT_ID_CRYOXADONE - xenoChemList += REAGENT_ID_CLONEXADONE - xenoChemList += REAGENT_ID_PARACETAMOL - xenoChemList += REAGENT_ID_TRAMADOL - xenoChemList += REAGENT_ID_OXYCODONE - xenoChemList += REAGENT_ID_RYETALYN - xenoChemList += REAGENT_ID_HYPERZINE - xenoChemList += REAGENT_ID_ETHYLREDOXRAZINE - xenoChemList += REAGENT_ID_HYRONALIN - xenoChemList += REAGENT_ID_ARITHRAZINE - xenoChemList += REAGENT_ID_SPACEACILLIN - xenoChemList += REAGENT_ID_STERILIZINE - xenoChemList += REAGENT_ID_LEPORAZINE - xenoChemList += REAGENT_ID_METHYLPHENIDATE - xenoChemList += REAGENT_ID_CITALOPRAM - xenoChemList += REAGENT_ID_PAROXETINE - xenoChemList += REAGENT_ID_MACROCILLIN - xenoChemList += REAGENT_ID_MICROCILLIN - xenoChemList += REAGENT_ID_NORMALCILLIN - xenoChemList += REAGENT_ID_SIZEOXADONE - xenoChemList += REAGENT_ID_ICKYPAK - xenoChemList += REAGENT_ID_UNSORBITOL - xenoChemList += REAGENT_ID_TOXIN - xenoChemList += REAGENT_ID_CARPOTOXIN - xenoChemList += REAGENT_ID_POTASSIUMCHLORIDE - xenoChemList += REAGENT_ID_POTASSIUMCHLOROPHORIDE - xenoChemList += REAGENT_ID_ZOMBIEPOWDER - xenoChemList += REAGENT_ID_FERTILIZER - xenoChemList += REAGENT_ID_EZNUTRIENT - xenoChemList += REAGENT_ID_LEFT4ZED - xenoChemList += REAGENT_ID_ROBUSTHARVEST - xenoChemList += REAGENT_ID_PLANTBGONE - xenoChemList += REAGENT_ID_SEROTROTIUM - xenoChemList += REAGENT_ID_NICOTINE - xenoChemList += REAGENT_ID_URANIUM - xenoChemList += REAGENT_ID_SILVER - xenoChemList += REAGENT_ID_GOLD - xenoChemList += REAGENT_ID_ADRENALINE - xenoChemList += REAGENT_ID_HOLYWATER - xenoChemList += REAGENT_ID_AMMONIA - xenoChemList += REAGENT_ID_DIETHYLAMINE - xenoChemList += REAGENT_ID_FLUOROSURFACTANT - xenoChemList += REAGENT_ID_FOAMINGAGENT - xenoChemList += REAGENT_ID_THERMITE - xenoChemList += REAGENT_ID_CLEANER - xenoChemList += REAGENT_ID_LUBE - xenoChemList += REAGENT_ID_SILICATE - xenoChemList += REAGENT_ID_GLYCEROL - xenoChemList += REAGENT_ID_COOLANT - xenoChemList += REAGENT_ID_LUMINOL - xenoChemList += REAGENT_ID_NUTRIMENT - xenoChemList += REAGENT_ID_CORNOIL - xenoChemList += REAGENT_ID_LIPOZINE - xenoChemList += REAGENT_ID_SODIUMCHLORIDE - xenoChemList += REAGENT_ID_FROSTOIL - xenoChemList += REAGENT_ID_CAPSAICIN - xenoChemList += REAGENT_ID_CONDENSEDCAPSAICIN - xenoChemList += REAGENT_ID_NEUROTOXIN - return 1 diff --git a/code/modules/xenobio2/mob/slime/slime procs.dm b/code/modules/xenobio2/mob/slime/slime procs.dm index 91fc793e512..9c22181b7a0 100644 --- a/code/modules/xenobio2/mob/slime/slime procs.dm +++ b/code/modules/xenobio2/mob/slime/slime procs.dm @@ -33,7 +33,7 @@ Slime specific procs go here. hasMutToxin = 1 var/chemamount if(hasMutToxin) - var/list/chemchoices = (xenoChemList - traitdat.chems) + var/list/chemchoices = (GLOB.xenoChemList - traitdat.chems) var/chemtype = pick(chemchoices) chemamount = rand(1,5) diff --git a/code/modules/xenobio2/mob/xeno procs.dm b/code/modules/xenobio2/mob/xeno procs.dm index e01b18ade67..0b83a8b869b 100644 --- a/code/modules/xenobio2/mob/xeno procs.dm +++ b/code/modules/xenobio2/mob/xeno procs.dm @@ -97,10 +97,10 @@ Divergence proc, used in mutation to make unique datums. if((COLORMUT & mutable)) traitdat.traits[TRAIT_XENO_COLOR] = "#" for(var/i=0, i<6, i++) - traitdat.traits[TRAIT_XENO_COLOR] += pick(hexNums) + traitdat.traits[TRAIT_XENO_COLOR] += pick(GLOB.hexNums) traitdat.traits[TRAIT_XENO_BIO_COLOR] = "#" for(var/i=0, i<6, i++) - traitdat.traits[TRAIT_XENO_BIO_COLOR] += pick(hexNums) + traitdat.traits[TRAIT_XENO_BIO_COLOR] += pick(GLOB.hexNums) RandomChemicals() //if(SPECIESMUT & mutable) @@ -153,7 +153,7 @@ Divergence proc, used in mutation to make unique datums. traitdat.chems.Cut() //Clear the amount first. var/num_chems = round(rand(1,4)) - var/list/chemchoices = xenoChemList + var/list/chemchoices = GLOB.xenoChemList for(var/i = 1 to num_chems) var/chemtype = pick(chemchoices) diff --git a/code/unit_tests/reagent_tests.dm b/code/unit_tests/reagent_tests.dm index cebd399d377..dd0f72789f9 100644 --- a/code/unit_tests/reagent_tests.dm +++ b/code/unit_tests/reagent_tests.dm @@ -291,10 +291,10 @@ /datum/unit_test/chemical_grinding_must_produce_valid_results/start_test() var/failed = FALSE - for(var/grind in global.sheet_reagents + global.ore_reagents) - var/list/results = global.sheet_reagents[grind] + for(var/grind in GLOB.sheet_reagents + GLOB.ore_reagents) + var/list/results = GLOB.sheet_reagents[grind] if(!results) - results = global.ore_reagents[grind] + results = GLOB.ore_reagents[grind] if(!results || !islist(results)) log_unit_test("[grind]: Reagents - Grinding result had invalid list.") failed = TRUE diff --git a/maps/expedition_vr/alienship/_alienship.dm b/maps/expedition_vr/alienship/_alienship.dm index f9843d6c16b..c73a99028b9 100644 --- a/maps/expedition_vr/alienship/_alienship.dm +++ b/maps/expedition_vr/alienship/_alienship.dm @@ -130,7 +130,7 @@ R.update_power() //Teleport time! - for(var/mob in player_list) //This is extreme, but it's very hard to find people hiding in things, and this is pretty cheap. + for(var/mob in GLOB.player_list) //This is extreme, but it's very hard to find people hiding in things, and this is pretty cheap. try if(isliving(mob) && get_area(mob) == src) abduct(mob) diff --git a/maps/gateway_vr/wildwest.dm b/maps/gateway_vr/wildwest.dm index 1cacd2ecd67..e503f43dd84 100644 --- a/maps/gateway_vr/wildwest.dm +++ b/maps/gateway_vr/wildwest.dm @@ -94,7 +94,7 @@ if("Peace") to_chat(user, span_infoplain(span_bold("Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence."))) to_chat(user, span_infoplain("You feel as if you just narrowly avoided a terrible fate...")) - for(var/mob/living/simple_mob/faithless/F in living_mob_list) + for(var/mob/living/simple_mob/faithless/F in GLOB.living_mob_list) F.health = -10 F.set_stat(DEAD) F.icon_state = "faithless_dead" @@ -157,8 +157,8 @@ spawn(rand(800,1200)) if(stat == DEAD) - dead_mob_list -= src - living_mob_list += src + GLOB.dead_mob_list -= src + GLOB.living_mob_list += src set_stat(CONSCIOUS) tod = null setToxLoss(0) diff --git a/maps/offmap_vr/talon/talon_v2.dm b/maps/offmap_vr/talon/talon_v2.dm index cdbd7e4f248..75983bad97f 100644 --- a/maps/offmap_vr/talon/talon_v2.dm +++ b/maps/offmap_vr/talon/talon_v2.dm @@ -1,12 +1,12 @@ /////////////////////////// //// Spawning and despawning -var/global/list/latejoin_talon = list() +GLOBAL_LIST_EMPTY(latejoin_talon) /obj/effect/landmark/talon name = "JoinLateTalon" delete_me = 1 /obj/effect/landmark/talon/Initialize(mapload) - latejoin_talon += loc // Register this turf as tram latejoin. + GLOB.latejoin_talon += loc // Register this turf as tram latejoin. . = ..() /datum/spawnpoint/talon @@ -17,7 +17,7 @@ var/global/list/latejoin_talon = list() /datum/spawnpoint/talon/New() ..() - turfs = latejoin_talon + turfs = GLOB.latejoin_talon /obj/machinery/cryopod/talon announce_channel = "Talon" diff --git a/maps/redgate/fantasy_items.dm b/maps/redgate/fantasy_items.dm index a347ebb952a..99caf7a2df3 100644 --- a/maps/redgate/fantasy_items.dm +++ b/maps/redgate/fantasy_items.dm @@ -265,7 +265,7 @@ else //Otherwise bad luck!! to_chat(user, span_warning("It's dirty!")) return 1 - else if(is_type_in_list(O,acceptable_items)) + else if(is_type_in_list(O,GLOB.acceptable_items)) var/list/workingList = cookingContents() if(workingList.len>=(max_n_of_items + circuit_item_capacity)) //Adds component_parts to the maximum number of items. changed 1 to actually just be the circuit item capacity var. to_chat(user, span_warning("This [src] is full of ingredients, you cannot put more.")) @@ -321,7 +321,7 @@ if (!O.reagents) return 1 for (var/datum/reagent/R in O.reagents.reagent_list) - if (!(R.id in acceptable_reagents)) + if (!(R.id in GLOB.acceptable_reagents)) to_chat(user, span_warning("Your [O] contains components unsuitable for cookery.")) return 1 return diff --git a/maps/submaps/admin_use_vr/fun.dm b/maps/submaps/admin_use_vr/fun.dm index c461265d70d..eb684721fd5 100644 --- a/maps/submaps/admin_use_vr/fun.dm +++ b/maps/submaps/admin_use_vr/fun.dm @@ -294,7 +294,7 @@ /obj/effect/overmap/visitable/ship/admin_use/space_dog/Crossed(var/obj/effect/overmap/visitable/ship/enterer) . = ..() if(istype(enterer)) - for(var/mob/potential_mob as anything in player_list) + for(var/mob/potential_mob as anything in GLOB.player_list) if(potential_mob.z in enterer.map_z) SEND_SOUND(potential_mob, 'sound/ambience/boy.ogg') diff --git a/vorestation.dme b/vorestation.dme index 62ff5308e32..393b92fd319 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2568,7 +2568,6 @@ #include "code\modules\events\supply_demand_vr.dm" #include "code\modules\events\wallrot.dm" #include "code\modules\examine\examine.dm" -#include "code\modules\examine\stat_icons.dm" #include "code\modules\examine\descriptions\armor.dm" #include "code\modules\examine\descriptions\atmospherics.dm" #include "code\modules\examine\descriptions\containers.dm"
NameFingerprints
[subject][md5(subject.dna?.uni_identity)]
Weight MinWeight MaxWeight OneShot Enabled " + span_alert("CurrWeight") + " Remove
[severity_to_string[severity]][GLOB.severity_to_string[severity]][worldtime2stationtime(max(EC.next_event_time, world.time))][round(next_event_at / 600, 0.1)]" @@ -95,7 +95,7 @@ var/datum/event_container/EC = event_containers[severity] var/datum/event_meta/EM = EC.next_event html += "
[severity_to_string[severity]][GLOB.severity_to_string[severity]][EM ? EM.name : "Random"]ViewClear
[severity_to_string[EM.severity]][GLOB.severity_to_string[EM.severity]][EM.name][worldtime2stationtime(ends_at)][ends_in]