diff --git a/archive/maps/RandomZLevels/stationCollision.dm b/archive/maps/RandomZLevels/stationCollision.dm index c6091db788..2c144318e5 100644 --- a/archive/maps/RandomZLevels/stationCollision.dm +++ b/archive/maps/RandomZLevels/stationCollision.dm @@ -102,57 +102,6 @@ obj/item/gun/energy/laser/retro/sc_retro desc = "A once potent weapon, years of dust have collected in the chamber and lens of this weapon, weakening the beam significantly." clumsy_check = 0 -/* - * Safe code hints - */ - -//These vars hold the code itself, they'll be generated at round-start -var/sc_safecode1 = "[rand(0,9)]" -var/sc_safecode2 = "[rand(0,9)]" -var/sc_safecode3 = "[rand(0,9)]" -var/sc_safecode4 = "[rand(0,9)]" -var/sc_safecode5 = "[rand(0,9)]" - -//Pieces of paper actually containing the hints -/obj/item/paper/sc_safehint_paper_prison - name = "smudged paper" - -/obj/item/paper/sc_safehint_paper_prison/Initialize(mapload, text, title) - . = ..() - info = span_italics("The ink is smudged, you can only make out a couple numbers:") + " '[sc_safecode1]**[sc_safecode4]*'" - -/obj/item/paper/sc_safehint_paper_hydro - name = "shredded paper" -/obj/item/paper/sc_safehint_paper_hydro/Initialize(mapload, text, title) - . = ..() - info = span_italics("Although the paper is shredded, you can clearly see the number:") + " '[sc_safecode2]'" - -/obj/item/paper/sc_safehint_paper_caf - name = "blood-soaked paper" - //This does not have to be in New() because it is a constant. There are no variables in it i.e. [sc_safcode] - info = span_red(span_italics("This paper is soaked in blood, it is impossible to read any text.")) - -/obj/item/paper/sc_safehint_paper_bible - name = "hidden paper" - -/obj/item/paper/sc_safehint_paper_bible/Initialize(mapload, text, title) - . = ..() - info = span_italics("It would appear that the pen hidden with the paper had leaked ink over the paper. \ - However you can make out the last three digits:") + "' [sc_safecode3][sc_safecode4][sc_safecode5]'" - -/obj/item/paper/sc_safehint_paper_shuttle - info = span_bold("Target:") + " Research-station Epsilon
" + span_bold("Objective:")\ + - {" Prototype weaponry. The captain likely keeps them locked in her safe.
-
- Our on-board spy has learned the code and has hidden away a few copies of the code around the station. Unfortunatly he has been captured by security - Your objective is to split up, locate any of the papers containing the captain's safe code, open the safe and - secure anything found inside. If possible, recover the imprisioned syndicate operative and recieve the code from him.
-
- As always, eliminate anyone who gets in the way.
-
- Your assigned ship is designed specifically for penetrating the hull of another station or ship with minimal damage to operatives. - It is completely fly-by-wire meaning you have just have to enjoy the ride and when the red light comes on... find something to hold onto! - "} /* * Captain's safe */ diff --git a/archive/maps/gateway_archive_vr/stationCollision.dm b/archive/maps/gateway_archive_vr/stationCollision.dm index a33bba0a05..3693a41f5c 100644 --- a/archive/maps/gateway_archive_vr/stationCollision.dm +++ b/archive/maps/gateway_archive_vr/stationCollision.dm @@ -107,11 +107,7 @@ obj/item/gun/energy/laser/retro/sc_retro */ //These vars hold the code itself, they'll be generated at round-start -var/sc_safecode1 = "[rand(0,9)]" -var/sc_safecode2 = "[rand(0,9)]" -var/sc_safecode3 = "[rand(0,9)]" -var/sc_safecode4 = "[rand(0,9)]" -var/sc_safecode5 = "[rand(0,9)]" +GLOBAL_LIST_INIT(sc_safecode, list("[rand(0,9)]", "[rand(0,9)]", "[rand(0,9)]", "[rand(0,9)]", "[rand(0,9)]")) //Pieces of paper actually containing the hints /obj/item/paper/sc_safehint_paper_prison @@ -119,13 +115,13 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/item/paper/sc_safehint_paper_prison/Initialize(mapload) . = ..() - info = span_italics("The ink is smudged, you can only make out a couple numbers:") + " '[sc_safecode1]**[sc_safecode4]*'" + info = span_italics("The ink is smudged, you can only make out a couple numbers:") + " '[GLOB.sc_safecode[1]]**[GLOB.sc_safecode[4]]*'" /obj/item/paper/sc_safehint_paper_hydro name = "shredded paper" /obj/item/paper/sc_safehint_paper_hydro/Initialize(mapload) . = ..() - info = span_italics("Although the paper is shredded, you can clearly see the number:") + " '[sc_safecode2]'" + info = span_italics("Although the paper is shredded, you can clearly see the number:") + " '[GLOB.sc_safecode[2]]'" /obj/item/paper/sc_safehint_paper_caf name = "blood-soaked paper" @@ -137,7 +133,7 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/item/paper/sc_safehint_paper_bible/Initialize(mapload) . = ..() info = span_italics("It would appear that the pen hidden with the paper had leaked ink over the paper.\ - However you can make out the last three digits:") + " '[sc_safecode3][sc_safecode4][sc_safecode5]'" + However you can make out the last three digits:") + " '[GLOB.sc_safecode[3]][GLOB.sc_safecode[4]][GLOB.sc_safecode[5]]'" /obj/item/paper/sc_safehint_paper_shuttle info = span_bold("Target:") + " Research-station Epsilon
" + span_bold("Objective:") + " " + {" @@ -160,7 +156,7 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/item/storage/secure/safe/sc_ssafe/Initialize(mapload) . = ..() - l_code = "[sc_safecode1][sc_safecode2][sc_safecode3][sc_safecode4][sc_safecode5]" + l_code = "[GLOB.sc_safecode[1]][GLOB.sc_safecode[2]][GLOB.sc_safecode[3]][GLOB.sc_safecode[4]][GLOB.sc_safecode[5]]" l_set = 1 new /obj/item/gun/energy/mindflayer(src) new /obj/item/soulstone(src) diff --git a/archive/maps/gateway_archive_vr/wildwest.dmm b/archive/maps/gateway_archive_vr/wildwest.dmm index 384355bd87..2d5a37cf36 100644 --- a/archive/maps/gateway_archive_vr/wildwest.dmm +++ b/archive/maps/gateway_archive_vr/wildwest.dmm @@ -734,11 +734,6 @@ }, /turf/space, /area) -"cu" = ( -/obj/structure/lattice, -/obj/structure/lattice, -/turf/space, -/area) "cv" = ( /obj/effect/decal/cleanable/blood/splatter, /turf/simulated/floor/carpet, @@ -5671,7 +5666,7 @@ br br br br -cu +br br aa aa @@ -14934,7 +14929,7 @@ br br br br -cu +br br aa aa @@ -15177,7 +15172,7 @@ aa aa aa br -cu +br br br br @@ -16220,7 +16215,7 @@ aG aG aG br -cu +br br aa aa @@ -16716,7 +16711,7 @@ aa aa aa aa -cu +br br aa aa diff --git a/archive/maps/southern_cross/southern_cross_presets.dm b/archive/maps/southern_cross/southern_cross_presets.dm index 76ab1479b9..f46d0b3bc1 100644 --- a/archive/maps/southern_cross/southern_cross_presets.dm +++ b/archive/maps/southern_cross/southern_cross_presets.dm @@ -1,9 +1,3 @@ -var/const/NETWORK_THIRD_DECK = "Third Deck" -var/const/NETWORK_SECOND_DECK = "Second Deck" -var/const/NETWORK_FIRST_DECK = "First Deck" -var/const/NETWORK_SUPPLY = "Supply" -var/const/NETWORK_MAIN_OUTPOST = "Main Outpost" - // // Cameras // diff --git a/code/__defines/admin_verb.dm b/code/__defines/admin_verb.dm index 4dea840fc0..5ef574a7b3 100644 --- a/code/__defines/admin_verb.dm +++ b/code/__defines/admin_verb.dm @@ -112,8 +112,3 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor // Visibility flags #define ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG "Map-Debug" - -// Tgui input list options -#define TGUI_VIEW_ATTACK_LOGS "Check Player Attack Logs" -#define TGUI_VIEW_DIALOG_LOGS "Check Player Dialogue Logs" -#define TGUI_RESIZE "Resize player" diff --git a/code/__defines/machinery.dm b/code/__defines/machinery.dm index e2abdb7899..c63bf01d7a 100644 --- a/code/__defines/machinery.dm +++ b/code/__defines/machinery.dm @@ -44,6 +44,7 @@ #define NETWORK_CRESCENT "Spaceport" // #define NETWORK_CAFE_DOCK "Cafe Dock" #define NETWORK_CARGO "Cargo" +#define NETWORK_SUPPLY "Supply" #define NETWORK_CIRCUITS "Circuits" #define NETWORK_CIVILIAN "Civilian" // #define NETWORK_CIVILIAN_EAST "Civilian East" @@ -80,6 +81,14 @@ #define NETWORK_OUTSIDE "Outside" #define NETWORK_HALLS "Halls" +// SC Networks +#define NETWORK_FIRST_DECK "First Deck" +#define NETWORK_SECOND_DECK "Second Deck" +#define NETWORK_THIRD_DECK "Third Deck" +#define NETWORK_MAIN_OUTPOST "Main Outpost" +#define NETWORK_CARRIER "Exploration Carrier" +#define NETWORK_MAINT_DECK "Maintenance Deck" + #define TRANSMISSION_WIRE 0 //Is this ever used? I don't think it is. #define TRANSMISSION_RADIO 1 //Radio transmissions (like airlock controller to pump) #define TRANSMISSION_SUBSPACE 2 //Like headsets diff --git a/code/_global_vars/__unsorted.dm b/code/_global_vars/__unsorted.dm index 651a74fe1f..22c08dbb20 100644 --- a/code/_global_vars/__unsorted.dm +++ b/code/_global_vars/__unsorted.dm @@ -75,6 +75,3 @@ GLOBAL_DATUM_INIT(buildmode_hud, /icon, icon('icons/misc/buildmode.dmi')) GLOBAL_LIST_EMPTY(cached_character_icons) GLOBAL_VAR_INIT(triai, FALSE) - -// Pipe colors, needs to be inited before our pipe icon_manager -GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE)) diff --git a/code/_helpers/_global_objects.dm b/code/_helpers/_global_objects.dm index 6672b2c9e0..05233b3163 100644 --- a/code/_helpers/_global_objects.dm +++ b/code/_helpers/_global_objects.dm @@ -1,3 +1,4 @@ +//Global Datums GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new) GLOBAL_DATUM_INIT(gear_tweak_implant_location, /datum/gear_tweak/implant_location, new) GLOBAL_DATUM_INIT(gear_tweak_collar_tag, /datum/gear_tweak/collar_tag, new) @@ -5,10 +6,16 @@ GLOBAL_DATUM_INIT(gear_tweak_collar_tag, /datum/gear_tweak/collar_tag, new) //Underwear GLOBAL_DATUM_INIT(global_underwear, /datum/category_collection/underwear, new) -//Global Datums +// Pipe colors, needs to be inited before our pipe icon_manager +GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE)) GLOBAL_DATUM_INIT(icon_manager, /datum/pipe_icon_manager, new) GLOBAL_DATUM_INIT(emergency_shuttle, /datum/emergency_shuttle_controller, new) +GLOBAL_LIST_EMPTY(comm_message_listeners) //We first have to initialize list then we can use it. +GLOBAL_DATUM_INIT(global_message_listener, /datum/comm_message_listener, new) //May be used by admins +GLOBAL_DATUM_INIT(ntnet_global, /datum/ntnet, new) +GLOBAL_VAR_INIT(last_message_id, 0) + // We manually initialize the alarm handlers instead of looping over all existing types // to make it possible to write: camera_alarm.triggerAlarm() rather than SSalarm.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof. GLOBAL_DATUM_INIT(atmosphere_alarm, /datum/alarm_handler/atmosphere, new) @@ -18,3 +25,15 @@ GLOBAL_DATUM_INIT(motion_alarm, /datum/alarm_handler/motion, new) GLOBAL_DATUM_INIT(power_alarm, /datum/alarm_handler/power, new) GLOBAL_DATUM_INIT(decls_repository, /datum/repository/decls, new) + +// Visual nets +GLOBAL_LIST_EMPTY_TYPED(visual_nets, /datum/visualnet) +GLOBAL_DATUM_INIT(cameranet, /datum/visualnet/camera, new) +GLOBAL_DATUM_INIT(cultnet, /datum/visualnet/cult, new) +GLOBAL_DATUM_INIT(ghostnet, /datum/visualnet/ghost, new) + +GLOBAL_DATUM_INIT(all_locations, /datum/locations/milky_way, new) + +GLOBAL_DATUM_INIT(news_network, /datum/feed_network, new) //The global news-network, which is coincidentally a global list. + +GLOBAL_DATUM_INIT(loremaster, /datum/lore/loremaster, new) diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index b275cb0b17..902c554c11 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -72,14 +72,8 @@ GLOBAL_LIST_INIT(backbaglist, list("Nothing", "Backpack", "Satchel", "Satchel Al 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() -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 +GLOBAL_LIST_EMPTY_TYPED(message_servers, /obj/machinery/message_server) +GLOBAL_LIST_INIT_TYPED(supply_drop, /datum/supply_drop_loot, dd_sortedObjectList(init_subtypes(/datum/supply_drop_loot))) // Runes GLOBAL_LIST_EMPTY(rune_list) GLOBAL_LIST_EMPTY(escape_list) @@ -326,6 +320,8 @@ GLOBAL_LIST_EMPTY(mannequins) // Create robolimbs for chargen. populate_robolimb_list() + cache_no_ceiling_image() + /// Inits the crafting recipe list, sorting crafting recipe requirements in the process. /proc/init_crafting_recipes(list/crafting_recipes) for(var/path in subtypesof(/datum/crafting_recipe)) @@ -347,18 +343,6 @@ GLOBAL_LIST_EMPTY(mannequins) //Hexidecimal numbers 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! //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 - //visual nets - GLOB.legacy_globals["visual_nets"] = visual_nets - GLOB.legacy_globals["cameranet"] = cameranet - GLOB.legacy_globals["cultnet"] = cultnet - GLOBAL_LIST_INIT(selectable_footstep, list( "Default" = FOOTSTEP_MOB_HUMAN, "Claw" = FOOTSTEP_MOB_CLAW, @@ -646,8 +630,6 @@ GLOBAL_LIST_INIT(all_technomancer_gambit_spells, typesof(/obj/item/spell) - list /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 diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index dbe74fb839..e9de1c0510 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -186,4 +186,4 @@ // /mob/living/silicon/ai/TurfAdjacent(var/turf/T) - return (cameranet && cameranet.checkTurfVis(T)) + return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T)) diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index 9adf394aa3..a44c3b7eeb 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -81,7 +81,7 @@ ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various per options["LEGACY: job_master"] = GLOB.job_master options["LEGACY: emergency_shuttle"] = GLOB.emergency_shuttle options["LEGACY: paiController"] = paiController - options["LEGACY: cameranet"] = cameranet + options["LEGACY: cameranet"] = GLOB.cameranet options["LEGACY: transfer_controller"] = GLOB.transfer_controller var/pick = tgui_input_list(user, "Choose a controller to debug/view variables of.", "VV controller:", options) diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm index 5ed37cff85..5293f86b1e 100644 --- a/code/controllers/globals.dm +++ b/code/controllers/globals.dm @@ -66,6 +66,3 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) var/end_tick = world.time if(end_tick - start_tick) WARNING("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!") - - // Someone make it so this call isn't necessary - populate_legacy_globals() diff --git a/code/controllers/subsystems/air_traffic.dm b/code/controllers/subsystems/air_traffic.dm index 7a553550bf..642a163264 100644 --- a/code/controllers/subsystems/air_traffic.dm +++ b/code/controllers/subsystems/air_traffic.dm @@ -56,10 +56,10 @@ SUBSYSTEM_DEF(atc) /datum/controller/subsystem/atc/proc/random_convo() // Pick from the organizations in the LOREMASTER, so we can find out what these ships are doing - var/one = pick(loremaster.organizations) //These will pick an index, not an instance - var/two = pick(loremaster.organizations) - var/datum/lore/organization/source = loremaster.organizations[one] //Resolve to the instances - var/datum/lore/organization/secondary = loremaster.organizations[two] //repurposed for new fun stuff + var/one = pick(GLOB.loremaster.organizations) //These will pick an index, not an instance + var/two = pick(GLOB.loremaster.organizations) + var/datum/lore/organization/source = GLOB.loremaster.organizations[one] //Resolve to the instances + var/datum/lore/organization/secondary = GLOB.loremaster.organizations[two] //repurposed for new fun stuff //Random chance things for variety var/path = chatter_datum.chatter_box(source.org_type,secondary.org_type) diff --git a/code/controllers/subsystems/appreciation_messages.dm b/code/controllers/subsystems/appreciation_messages.dm index 7fa380e5a4..ed4098eadb 100644 --- a/code/controllers/subsystems/appreciation_messages.dm +++ b/code/controllers/subsystems/appreciation_messages.dm @@ -67,21 +67,21 @@ SUBSYSTEM_DEF(appreciation) /datum/controller/subsystem/appreciation/proc/build_appreciation() if(length(human_list) < required_humans) - appreciated = pick(loremaster.appreciation_targets) + appreciated = pick(GLOB.loremaster.appreciation_targets) return if(prob(50)) - appreciated = pick(loremaster.appreciation_targets) + appreciated = pick(GLOB.loremaster.appreciation_targets) return var/mob/living/carbon/human/H = pick(human_list) if(!istype(H)) - appreciated = pick(loremaster.appreciation_targets) + appreciated = pick(GLOB.loremaster.appreciation_targets) return if(H.absorbed) - appreciated = pick(loremaster.appreciation_targets) + appreciated = pick(GLOB.loremaster.appreciation_targets) return if(H.custom_species) @@ -92,8 +92,8 @@ SUBSYSTEM_DEF(appreciation) /datum/controller/subsystem/appreciation/proc/do_appreciate() - var/appreciation_message = pick(loremaster.appreciation_messages) - var/terrible_factoid = pick(loremaster.terrible_factoids) + var/appreciation_message = pick(GLOB.loremaster.appreciation_messages) + var/terrible_factoid = pick(GLOB.loremaster.terrible_factoids) msg("Today is [appreciated] appreciation day! [terrible_factoid] [appreciation_message]") /datum/controller/subsystem/appreciation/proc/msg(var/message,var/sender) diff --git a/code/controllers/subsystems/statpanel.dm b/code/controllers/subsystems/statpanel.dm index 80e2b8e7ba..86e4659e25 100644 --- a/code/controllers/subsystems/statpanel.dm +++ b/code/controllers/subsystems/statpanel.dm @@ -240,7 +240,7 @@ SUBSYSTEM_DEF(statpanels) #endif for(var/datum/controller/subsystem/sub_system as anything in Master.subsystems) mc_data[++mc_data.len] = list("\[[sub_system.state_letter()]][sub_system.name]", sub_system.stat_entry(), "\ref[sub_system]") - mc_data[++mc_data.len] = list("Camera Net", "Cameras: [length(global.cameranet.cameras)] | Chunks: [length(global.cameranet.chunks)]", "\ref[global.cameranet]") + mc_data[++mc_data.len] = list("Camera Net", "Cameras: [length(GLOB.cameranet.cameras)] | Chunks: [length(GLOB.cameranet.chunks)]", "\ref[GLOB.cameranet]") ///immediately update the active statpanel tab of the target client /datum/controller/subsystem/statpanels/proc/immediate_send_stat_data(client/target) diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index 38d99905dc..7d149a9904 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -51,8 +51,8 @@ var/company = "*ERROR*" // First, get a list of TSCs in our lore. var/list/candidates = list() - for(var/path in loremaster.organizations) - var/datum/lore/organization/O = loremaster.organizations[path] + for(var/path in GLOB.loremaster.organizations) + var/datum/lore/organization/O = GLOB.loremaster.organizations[path] if(!istype(O, /datum/lore/organization/tsc)) continue if(O.short_name == using_map.company_name || O.name == using_map.company_name) diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm index 3b44341056..e8c658107e 100644 --- a/code/datums/chat_message.dm +++ b/code/datums/chat_message.dm @@ -25,15 +25,15 @@ */ // Cached runechat icon -var/list/runechat_image_cache = list() +GLOBAL_LIST_EMPTY(runechat_image_cache) /hook/startup/proc/runechat_images() var/image/radio_image = image('icons/UI_Icons/chat/chat_icons.dmi', icon_state = "radio") - runechat_image_cache["radio"] = radio_image + GLOB.runechat_image_cache["radio"] = radio_image var/image/emote_image = image('icons/UI_Icons/chat/chat_icons.dmi', icon_state = "emote") - runechat_image_cache["emote"] = emote_image + GLOB.runechat_image_cache["emote"] = emote_image return TRUE @@ -165,14 +165,14 @@ var/list/runechat_image_cache = list() // Append prefixes if(extra_classes.Find("virtual-speaker")) - LAZYADD(prefixes, "[icon2html(runechat_image_cache["radio"],owner.client)]") + LAZYADD(prefixes, "[icon2html(GLOB.runechat_image_cache["radio"],owner.client)]") if(extra_classes.Find("emote")) // Icon on both ends? - //var/image/I = runechat_image_cache["emote"] + //var/image/I = GLOB.runechat_image_cache["emote"] //text = "icon2html(I)[text]icon2html(I)" // Icon on one end? - //LAZYADD(prefixes, "icon2html(runechat_image_cache["emote")]") + //LAZYADD(prefixes, "icon2html(GLOB.runechat_image_cache["emote")]") // Asterisks instead? text = "* [text] *" diff --git a/code/datums/locations/locations.dm b/code/datums/locations/locations.dm index a9cf9294fb..11dd35292d 100644 --- a/code/datums/locations/locations.dm +++ b/code/datums/locations/locations.dm @@ -8,8 +8,6 @@ if(creator) parent = creator -var/global/datum/locations/milky_way/all_locations = new() - //Galaxy /datum/locations/milky_way @@ -28,9 +26,9 @@ var/global/datum/locations/milky_way/all_locations = new() ) /proc/choose_location_datum(client/user) - var/datum/locations/choice = all_locations + var/datum/locations/choice = GLOB.all_locations while(length(choice.contents) > 0) //For some reason it wouldn't let me do contents.len even when I defined it as a list. - var/specific = tgui_alert(user, "The location currently selected is [choice.name]. More specific options exist, would you like to pick a more specific location?", "Choose location", list("Yes", "No")) + var/specific = tgui_alert(user, "The location currently selected is [choice.name]. More specific options exist, would you like to pick a more specific location?", "Choose location", list("Yes", "No")) if(specific == "Yes" && length(choice.contents) > 0) choice = tgui_input_list(user, "Please choose a location.", "Locations", choice.contents) else diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 251a505f65..93f67ca6cf 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -246,7 +246,7 @@ return var/list/cameras = new/list() - for (var/obj/machinery/camera/C in cameranet.cameras) + for (var/obj/machinery/camera/C in GLOB.cameranet.cameras) if (C.bugged && C.status) cameras.Add(C) if (length(cameras) == 0) diff --git a/code/defines/procs/radio.dm b/code/defines/procs/radio.dm index 577c51fa9b..f598f14302 100644 --- a/code/defines/procs/radio.dm +++ b/code/defines/procs/radio.dm @@ -42,8 +42,8 @@ var/list/receiver_reception = list() /proc/get_message_server() - if(message_servers) - for (var/obj/machinery/message_server/MS in message_servers) + if(GLOB.message_servers) + for (var/obj/machinery/message_server/MS in GLOB.message_servers) if(MS.active) return MS return null diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index dacc74b08e..d67c022059 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -54,7 +54,7 @@ AP.set_broken() -/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target in cameranet.cameras) +/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target in GLOB.cameranet.cameras) set name = "Hack Camera" set desc = "100 CPU - Hacks existing camera, allowing you to add upgrade of your choice to it. Alternatively it lets you reactivate broken camera." set category = "Software" diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 801a1f9e19..8e592ca8e1 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -1,8 +1,6 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -var/hsboxspawn = 1 -var/list - hrefs = list( +GLOBAL_VAR_INIT(hsboxspawn, TRUE) +GLOBAL_LIST_INIT(hrefs, list( "hsbsuit" = "Suit Up (Space Travel Gear)", "hsbmetal" = "Spawn 50 Metal", "hsbglass" = "Spawn 50 Glass", @@ -13,142 +11,145 @@ var/list "hsbfueltank" = "Spawn Welding Fuel Tank", "hsbwater tank" = "Spawn Water Tank", "hsbtoolbox" = "Spawn Toolbox", - "hsbmedkit" = "Spawn Medical Kit") + "hsbmedkit" = "Spawn Medical Kit" + )) -mob +/mob var/datum/hSB/sandbox = null - proc - CanBuild() - if(GLOB.master_mode == "sandbox") - sandbox = new/datum/hSB - sandbox.owner = src.ckey - if(check_rights_for(src.client, R_HOLDER)) - sandbox.admin = 1 - add_verb(src, /mob/proc/sandbox_panel) - sandbox_panel() - if(sandbox) - sandbox.update() + +/mob/proc/CanBuild() + if(GLOB.master_mode == "sandbox") + sandbox = new/datum/hSB + sandbox.owner = src.ckey + if(check_rights_for(src.client, R_HOLDER)) + sandbox.admin = 1 + add_verb(src, /mob/proc/sandbox_panel) + +/mob/proc/sandbox_panel() + if(sandbox) + sandbox.update() /datum/hSB var/owner = null var/admin = 0 - proc - update() - var/hsbpanel = "
h_Sandbox Panel

" - if(admin) - hsbpanel += span_bold("Administration Tools:") + "
" - hsbpanel += "- Toggle Object Spawning

" - hsbpanel += span_bold("Regular Tools:") + "
" - for(var/T in hrefs) - hsbpanel += "- [hrefs[T]]
" - if(hsboxspawn) - hsbpanel += "- Spawn Object

" - var/datum/browser/popup = new(usr, "hsbpanel", "HSB Panel") - popup.set_content(hsbpanel) - popup.open() - Topic(href, href_list) - if(!(src.owner == usr.ckey)) return - if(!usr) return //I guess this is possible if they log out or die with the panel open? It happened. - if(href_list["hsb"]) - switch(href_list["hsb"]) - if("hsbtobj") - if(!admin) return - if(hsboxspawn) - to_world(span_world("Sandbox: [usr.key] has disabled object spawning!")) - hsboxspawn = 0 - return - if(!hsboxspawn) - to_world(span_world("Sandbox: [usr.key] has enabled object spawning!")) - hsboxspawn = 1 - return - if("hsbsuit") - var/mob/living/carbon/human/P = usr - if(P.wear_suit) - P.wear_suit.loc = P.loc - P.wear_suit.reset_plane_and_layer() - P.wear_suit = null - P.wear_suit = new/obj/item/clothing/suit/space(P) - P.wear_suit.hud_layerise() - if(P.head) - P.head.loc = P.loc - P.head.reset_plane_and_layer() - P.head = null - P.head = new/obj/item/clothing/head/helmet/space(P) - P.head.hud_layerise() - if(P.wear_mask) - P.wear_mask.loc = P.loc - P.wear_mask.reset_plane_and_layer() - P.wear_mask = null - P.wear_mask = new/obj/item/clothing/mask/gas(P) - P.wear_mask.hud_layerise() - if(P.back) - P.back.loc = P.loc - P.back.reset_plane_and_layer() - P.back = null - P.back = new/obj/item/tank/jetpack(P) - P.back.hud_layerise() - P.internal = P.back - if("hsbmetal") - var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal - hsb.amount = 50 - hsb.loc = usr.loc - if("hsbglass") - var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/glass - hsb.amount = 50 - hsb.loc = usr.loc - if("hsbairlock") - var/obj/machinery/door/hsb = new/obj/machinery/door/airlock +/datum/hSB/proc/update() + var/hsbpanel = "
h_Sandbox Panel

" + if(admin) + hsbpanel += span_bold("Administration Tools:") + "
" + hsbpanel += "- Toggle Object Spawning

" + hsbpanel += span_bold("Regular Tools:") + "
" + for(var/T in hrefs) + hsbpanel += "- [hrefs[T]]
" + if(hsboxspawn) + hsbpanel += "- Spawn Object

" - //TODO: DEFERRED make this better, with an HTML window or something instead of 15 popups - hsb.req_access = list() - var/accesses = get_all_accesses() - for(var/A in accesses) - if(tgui_alert(usr, "Will this airlock require [get_access_desc(A)] access?", "Sandbox:", list("Yes", "No")) == "Yes") - LAZYADD(hsb.req_access, A) + var/datum/browser/popup = new(usr, "hsbpanel", "HSB Panel") + popup.set_content(hsbpanel) + popup.open() - hsb.loc = usr.loc - to_chat(usr, span_bold("Sandbox: Created an airlock.")) - if("hsbcanister") - var/list/hsbcanisters = subtypesof(/obj/machinery/portable_atmospherics/canister) - var/hsbcanister = tgui_input_list(usr, "Choose a canister to spawn:", "Sandbox", hsbcanisters) - if(hsbcanister) - new hsbcanister(usr.loc) - if("hsbfueltank") - //var/obj/hsb = new/obj/weldfueltank - //hsb.loc = usr.loc - if("hsbwatertank") - //var/obj/hsb = new/obj/watertank - //hsb.loc = usr.loc - if("hsbtoolbox") - var/obj/item/storage/hsb = new/obj/item/storage/toolbox/mechanical - for(var/obj/item/radio/T in hsb) - qdel(T) - new/obj/item/tool/crowbar (hsb) - hsb.loc = usr.loc - if("hsbmedkit") - var/obj/item/storage/firstaid/hsb = new/obj/item/storage/firstaid/regular - hsb.loc = usr.loc - if("hsbobj") - if(!hsboxspawn) return +/datum/hSB/Topic(href, href_list) + if(!(src.owner == usr.ckey)) return + if(!usr) return //I guess this is possible if they log out or die with the panel open? It happened. + if(href_list["hsb"]) + switch(href_list["hsb"]) + if("hsbtobj") + if(!admin) return + if(hsboxspawn) + to_world(span_world("Sandbox: [usr.key] has disabled object spawning!")) + hsboxspawn = 0 + return + if(!hsboxspawn) + to_world(span_world("Sandbox: [usr.key] has enabled object spawning!")) + hsboxspawn = 1 + return + if("hsbsuit") + var/mob/living/carbon/human/P = usr + if(P.wear_suit) + P.wear_suit.loc = P.loc + P.wear_suit.reset_plane_and_layer() + P.wear_suit = null + P.wear_suit = new/obj/item/clothing/suit/space(P) + P.wear_suit.hud_layerise() + if(P.head) + P.head.loc = P.loc + P.head.reset_plane_and_layer() + P.head = null + P.head = new/obj/item/clothing/head/helmet/space(P) + P.head.hud_layerise() + if(P.wear_mask) + P.wear_mask.loc = P.loc + P.wear_mask.reset_plane_and_layer() + P.wear_mask = null + P.wear_mask = new/obj/item/clothing/mask/gas(P) + P.wear_mask.hud_layerise() + if(P.back) + P.back.loc = P.loc + P.back.reset_plane_and_layer() + P.back = null + P.back = new/obj/item/tank/jetpack(P) + P.back.hud_layerise() + P.internal = P.back + if("hsbmetal") + var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal + hsb.amount = 50 + hsb.loc = usr.loc + if("hsbglass") + var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/glass + hsb.amount = 50 + hsb.loc = usr.loc + if("hsbairlock") + var/obj/machinery/door/hsb = new/obj/machinery/door/airlock - var/list/selectable = list() - for(var/O in typesof(/obj/item/)) - //Note, these istypes don't work - if(istype(O, /obj/item/gun)) - continue - if(istype(O, /obj/item/assembly)) - continue - if(istype(O, /obj/item/camera)) - continue - if(istype(O, /obj/item/dummy)) - continue - if(istype(O, /obj/item/melee/energy/sword)) - continue - if(istype(O, /obj/structure)) - continue - selectable += O + //TODO: DEFERRED make this better, with an HTML window or something instead of 15 popups + hsb.req_access = list() + var/accesses = get_all_accesses() + for(var/A in accesses) + if(tgui_alert(usr, "Will this airlock require [get_access_desc(A)] access?", "Sandbox:", list("Yes", "No")) == "Yes") + LAZYADD(hsb.req_access, A) - var/hsbitem = tgui_input_list(usr, "Choose an object to spawn:", "Sandbox", selectable) - if(hsbitem) - new hsbitem(usr.loc) + hsb.loc = usr.loc + to_chat(usr, span_bold("Sandbox: Created an airlock.")) + if("hsbcanister") + var/list/hsbcanisters = subtypesof(/obj/machinery/portable_atmospherics/canister) + var/hsbcanister = tgui_input_list(usr, "Choose a canister to spawn:", "Sandbox", hsbcanisters) + if(hsbcanister) + new hsbcanister(usr.loc) + if("hsbfueltank") + //var/obj/hsb = new/obj/weldfueltank + //hsb.loc = usr.loc + if("hsbwatertank") + //var/obj/hsb = new/obj/watertank + //hsb.loc = usr.loc + if("hsbtoolbox") + var/obj/item/storage/hsb = new/obj/item/storage/toolbox/mechanical + for(var/obj/item/radio/T in hsb) + qdel(T) + new/obj/item/tool/crowbar (hsb) + hsb.loc = usr.loc + if("hsbmedkit") + var/obj/item/storage/firstaid/hsb = new/obj/item/storage/firstaid/regular + hsb.loc = usr.loc + if("hsbobj") + if(!hsboxspawn) return + + var/list/selectable = list() + for(var/O in typesof(/obj/item/)) + //Note, these istypes don't work + if(istype(O, /obj/item/gun)) + continue + if(istype(O, /obj/item/assembly)) + continue + if(istype(O, /obj/item/camera)) + continue + if(istype(O, /obj/item/dummy)) + continue + if(istype(O, /obj/item/melee/energy/sword)) + continue + if(istype(O, /obj/structure)) + continue + selectable += O + + var/hsbitem = tgui_input_list(usr, "Choose an object to spawn:", "Sandbox", selectable) + if(hsbitem) + new hsbitem(usr.loc) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index fa7f81ff62..761d6b5904 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -566,11 +566,11 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations) // It is VERY unlikely that we'll have two players, in the same round, with the same name and branch, but still, this is here. // If such conflict is encountered, a random number will be appended to the email address. If this fails too, no email account will be created. - if(ntnet_global.does_email_exist(complete_login)) + if(GLOB.ntnet_global.does_email_exist(complete_login)) complete_login = "[sanitized_name][random_id(/datum/computer_file/data/email_account/, 100, 999)]@[domain]" // If even fallback login generation failed, just don't give them an email. The chance of this happening is astronomically low. - if(ntnet_global.does_email_exist(complete_login)) + if(GLOB.ntnet_global.does_email_exist(complete_login)) to_chat(H, span_filter_notice("You were not assigned an email address.")) H.mind.store_memory("You were not assigned an email address.") else diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 605a69b881..1a4df26727 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -47,7 +47,7 @@ LAZYOR(client_huds, GLOB.global_hud.whitense) /* // Use this to look for cameras that have the same c_tag. - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) var/list/tempnetwork = C.network&src.network if(C != src && C.c_tag == src.c_tag && tempnetwork.len) to_world_log("[src.c_tag] [src.x] [src.y] [src.z] conflicts with [C.c_tag] [C.x] [C.y] [C.z]") @@ -132,7 +132,7 @@ /obj/machinery/camera/proc/setViewRange(var/num = 7) src.view_range = num - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) /obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob) if(!istype(user)) @@ -465,12 +465,12 @@ var/list/open_networks = difflist(network, GLOB.restricted_camera_networks) // Add or remove camera from the camera net as necessary if(on_open_network && !open_networks.len) - cameranet.removeCamera(src) + GLOB.cameranet.removeCamera(src) else if(!on_open_network && open_networks.len) on_open_network = 1 - cameranet.addCamera(src) + GLOB.cameranet.addCamera(src) else - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) // Resets the camera's wires to fully operational state. Used by one of Malfunction abilities. /obj/machinery/camera/proc/reset_wires() diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index f65d4ef517..f9f33bd10b 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -12,10 +12,10 @@ if(src.stat == 2) return - cameranet.process_sort() + GLOB.cameranet.process_sort() var/list/T = list() - for (var/obj/machinery/camera/C in cameranet.cameras) + for (var/obj/machinery/camera/C in GLOB.cameranet.cameras) var/list/tempnetwork = C.network&src.network if (tempnetwork.len) T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C @@ -218,7 +218,7 @@ /mob/living/proc/near_camera() if (!isturf(loc)) return 0 - else if(!cameranet.checkVis(src)) + else if(!GLOB.cameranet.checkVis(src)) return 0 return 1 diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index fe615a5984..9d98a42637 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -75,8 +75,8 @@ /obj/machinery/computer/message_monitor/LateInitialize() //Is the server isn't linked to a server, and there's a server available, default it to the first one in the list. if(!linkedServer) - if(message_servers && message_servers.len > 0) - linkedServer = message_servers[1] + if(GLOB.message_servers && GLOB.message_servers.len > 0) + linkedServer = GLOB.message_servers[1] /obj/machinery/computer/message_monitor/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -200,11 +200,11 @@ . = TRUE //Find a server if("find") - if(message_servers && message_servers.len > 1) - linkedServer = tgui_input_list(ui.user,"Please select a server.", "Select a server.", message_servers) + if(GLOB.message_servers && GLOB.message_servers.len > 1) + linkedServer = tgui_input_list(ui.user,"Please select a server.", "Select a server.", GLOB.message_servers) set_temp("NOTICE: Server selected.", "alert") - else if(message_servers && message_servers.len > 0) - linkedServer = message_servers[1] + else if(GLOB.message_servers && GLOB.message_servers.len > 0) + linkedServer = GLOB.message_servers[1] set_temp("NOTICE: Only Single Server Detected - Server selected.", "average") else temp = noserver @@ -346,10 +346,9 @@ return INITIALIZE_HINT_LATELOAD /obj/item/paper/monitorkey/LateInitialize() - if(message_servers) - for(var/obj/machinery/message_server/server in message_servers) - if(!isnull(server.decryptkey)) - info = "

Daily Key Reset


The new message monitor key is '[server.decryptkey]'.
Please keep this a secret and away from the clown.
If necessary, change the password to a more secure one." - info_links = info - icon_state = "paper_words" - break + for(var/obj/machinery/message_server/server in GLOB.message_servers) + if(!isnull(server.decryptkey)) + info = "

Daily Key Reset


The new message monitor key is '[server.decryptkey]'.
Please keep this a secret and away from the clown.
If necessary, change the password to a more secure one." + info_links = info + icon_state = "paper_words" + break diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 2b8931ae57..69755023bd 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -120,8 +120,6 @@ // PDA.new_news(annoncement) -var/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list. - GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) /obj/machinery/newscaster name = "newscaster" @@ -198,7 +196,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_light_on(FALSE) return - if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message + if(GLOB.news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message icon_state = "newscaster_wanted" add_overlay(mutable_appearance(icon, "newscaster_wanted_ov")) add_overlay(emissive_appearance(icon, "newscaster_wanted_ov")) @@ -303,22 +301,22 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) data["unit_no"] = unit_no var/list/wanted_issue = null - if(news_network.wanted_issue) + if(GLOB.news_network.wanted_issue) wanted_issue = list( - "author" = news_network.wanted_issue.backup_author, - "criminal" = news_network.wanted_issue.author, - "desc" = news_network.wanted_issue.body, + "author" = GLOB.news_network.wanted_issue.backup_author, + "criminal" = GLOB.news_network.wanted_issue.author, + "desc" = GLOB.news_network.wanted_issue.body, "img" = null ) - if(news_network.wanted_issue.img) - wanted_issue["img"] = icon2base64(news_network.wanted_issue.img) + if(GLOB.news_network.wanted_issue.img) + wanted_issue["img"] = icon2base64(GLOB.news_network.wanted_issue.img) data["wanted_issue"] = wanted_issue data["securityCaster"] = !!securityCaster var/list/network_channels = list() - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) network_channels.Add(list(list( "admin" = FC.is_admin_channel, "ref" = REF(FC), @@ -338,10 +336,10 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) data["photo_data"] = !!photo_data // Printing menu - var/total_num = LAZYLEN(news_network.network_channels) + var/total_num = LAZYLEN(GLOB.news_network.network_channels) var/active_num = total_num var/message_num = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) if(!FC.censored) message_num += length(FC.messages) //Dont forget, datum/feed_channel's var messages is a list of datum/feed_message else @@ -405,14 +403,14 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if("submit_new_channel") //var/list/existing_channels = list() //OBSOLETE var/list/existing_authors = list() - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) //existing_channels += FC.channel_name if(FC.author == "\[REDACTED\]") existing_authors += FC.backup_author else existing_authors +=FC.author var/check = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) if(FC.channel_name == channel_name) check = 1 break @@ -432,14 +430,14 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) var/choice = tgui_alert(ui.user, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) if(choice == "Confirm") - news_network.CreateFeedChannel(channel_name, our_user, c_locked) + GLOB.news_network.CreateFeedChannel(channel_name, our_user, c_locked) set_temp("Feed channel [channel_name] created successfully.", "success", FALSE) return TRUE if("set_channel_receiving") //var/list/datum/feed_channel/available_channels = list() var/list/available_channels = list() - for(var/datum/feed_channel/F in news_network.network_channels) + for(var/datum/feed_channel/F in GLOB.news_network.network_channels) if((!F.locked || F.author == scanned_user) && !F.censored) available_channels += F.channel_name var/new_channel_name = tgui_input_list(ui.user, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) @@ -476,7 +474,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) var/image = photo_data ? photo_data.photo : null feedback_inc("newscaster_stories",1) - news_network.SubmitArticle(msg, our_user, channel_name, image, 0, "", title) + GLOB.news_network.SubmitArticle(msg, our_user, channel_name, image, 0, "", title) set_temp("Feed message created successfully.", "success", FALSE) return TRUE @@ -509,15 +507,15 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) var/choice = tgui_alert(ui.user, "Please confirm Wanted Issue change.", "Network Security Handler", list("Confirm", "Cancel")) if(choice == "Confirm") - if(news_network.wanted_issue) - if(news_network.wanted_issue.is_admin_message) + if(GLOB.news_network.wanted_issue) + if(GLOB.news_network.wanted_issue.is_admin_message) tgui_alert_async(ui.user, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.") return - news_network.wanted_issue.author = channel_name - news_network.wanted_issue.body = msg - news_network.wanted_issue.backup_author = scanned_user + GLOB.news_network.wanted_issue.author = channel_name + GLOB.news_network.wanted_issue.body = msg + GLOB.news_network.wanted_issue.backup_author = scanned_user if(photo_data) - news_network.wanted_issue.img = photo_data.photo.img + GLOB.news_network.wanted_issue.img = photo_data.photo.img set_temp("Wanted issue for [channel_name] successfully edited.", "success", FALSE) return TRUE @@ -527,20 +525,20 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) WANTED.backup_author = scanned_user //I know, a bit wacky if(photo_data) WANTED.img = photo_data.photo.img - news_network.wanted_issue = WANTED - news_network.alert_readers() + GLOB.news_network.wanted_issue = WANTED + GLOB.news_network.alert_readers() set_temp("Wanted issue for [channel_name] is now in Network Circulation.", "success", FALSE) return TRUE if("cancel_wanted") if(!securityCaster) return FALSE - if(news_network.wanted_issue.is_admin_message) + if(GLOB.news_network.wanted_issue.is_admin_message) tgui_alert_async(ui.user, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.") return var/choice = tgui_alert(ui.user, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) if(choice=="Confirm") - news_network.wanted_issue = null + GLOB.news_network.wanted_issue = null for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters) NEWSCASTER.update_icon() set_temp("Wanted issue taken down.", "success", FALSE) @@ -682,10 +680,10 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) /obj/machinery/newscaster/proc/print_paper() feedback_inc("newscaster_newspapers_printed",1) var/obj/item/newspaper/NEWSPAPER = new /obj/item/newspaper - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) NEWSPAPER.news_content += FC - if(news_network.wanted_issue) - NEWSPAPER.important_message = news_network.wanted_issue + if(GLOB.news_network.wanted_issue) + NEWSPAPER.important_message = GLOB.news_network.wanted_issue NEWSPAPER.loc = get_turf(src) paper_remaining-- return diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index 78fb4e3bef..234e212053 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -41,7 +41,7 @@ /obj/machinery/power/supply_beacon/Initialize(mapload) . = ..() - if(!drop_type) drop_type = pick(supply_drop_random_loot_types()) + if(!drop_type) drop_type = pick(GLOB.supply_drop) /obj/machinery/power/supply_beacon/supermatter name = "supermatter supply beacon" diff --git a/code/game/objects/items/devices/ai_detector.dm b/code/game/objects/items/devices/ai_detector.dm index 87def8a152..06be51955d 100644 --- a/code/game/objects/items/devices/ai_detector.dm +++ b/code/game/objects/items/devices/ai_detector.dm @@ -56,13 +56,13 @@ if(!T) return PROXIMITY_OFF_CAMERANET - // Now for the somewhat harder AI cameranet checks. + // Now for the somewhat harder AI GLOB.cameranet checks. - // Check if we are even on the cameranet. - if(!cameranet.checkVis(T)) + // Check if we are even on the GLOB.cameranet. + if(!GLOB.cameranet.checkVis(T)) return PROXIMITY_OFF_CAMERANET - var/datum/chunk/chunk = cameranet.getChunk(T.x, T.y, T.z) + var/datum/chunk/chunk = GLOB.cameranet.getChunk(T.x, T.y, T.z) if(!chunk) return PROXIMITY_OFF_CAMERANET diff --git a/code/game/objects/items/devices/communicator/helper.dm b/code/game/objects/items/devices/communicator/helper.dm index e2fcfbbd0a..17d39405ea 100644 --- a/code/game/objects/items/devices/communicator/helper.dm +++ b/code/game/objects/items/devices/communicator/helper.dm @@ -6,7 +6,7 @@ // Description - Returns the list of newsfeeds, compiled for template processing /obj/item/communicator/proc/compile_news() var/list/feeds = list() - for(var/datum/feed_channel/channel in news_network.network_channels) + for(var/datum/feed_channel/channel in GLOB.news_network.network_channels) var/list/messages = list() if(!channel.censored && channel.channel_name != "Vir News Network") //Do not load the 'IC news' channel as it is simply too long. var/index = 0 @@ -41,7 +41,7 @@ var/list/news = list() // Compile all the newscasts - for(var/datum/feed_channel/channel in news_network.network_channels) + for(var/datum/feed_channel/channel in GLOB.news_network.network_channels) if(!channel.censored) for(var/datum/feed_message/FM in channel.messages) var/body = replacetext(FM.body, "\n", "
") diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 24be51724c..4eb51f4c74 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -16,7 +16,7 @@ for(var/obj/structure/lattice/LAT in src.loc) if(LAT != src) - log_mapping("Found multiple lattices at '[log_info_line(loc)]'") //VOREStation Edit, why was this a runtime, it's harmless + // log_mapping("Found multiple lattices at '[log_info_line(loc)]'") // We do this on map lint level. This messes with random seed genned maps where such can happen in rare cases return INITIALIZE_HINT_QDEL icon = 'icons/obj/smoothlattice.dmi' icon_state = "latticeblank" diff --git a/code/game/periodic_news.dm b/code/game/periodic_news.dm index 15a6ff3e35..678928adbf 100644 --- a/code/game/periodic_news.dm +++ b/code/game/periodic_news.dm @@ -104,17 +104,17 @@ /proc/process_newscaster() check_for_newscaster_updates(SSticker.mode.newscaster_announcements) -var/global/tmp/announced_news_types = list() +GLOBAL_LIST_EMPTY(announced_news_types) /proc/check_for_newscaster_updates(type) for(var/subtype in subtypesof(type)) var/datum/news_announcement/news = new subtype() - if(news.round_time * 10 <= world.time && !(subtype in announced_news_types)) - announced_news_types += subtype + if(news.round_time * 10 <= world.time && !(subtype in GLOB.announced_news_types)) + GLOB.announced_news_types += subtype announce_newscaster_news(news) /proc/announce_newscaster_news(datum/news_announcement/news) var/datum/feed_channel/sendto - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) if(FC.channel_name == news.channel_name) sendto = FC break @@ -125,7 +125,7 @@ var/global/tmp/announced_news_types = list() sendto.author = news.author sendto.locked = 1 sendto.is_admin_channel = 1 - news_network.network_channels += sendto + GLOB.news_network.network_channels += sendto var/author = news.author ? news.author : sendto.author - news_network.SubmitArticle(news.message, author, news.channel_name, null, !news.can_be_redacted, news.message_type) + GLOB.news_network.SubmitArticle(news.message, author, news.channel_name, null, !news.can_be_redacted, news.message_type) diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index bb31a3e91d..f1998200db 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -1,12 +1,8 @@ -var/image/no_ceiling_image = null - -/hook/startup/proc/setup_no_ceiling_image() - cache_no_ceiling_image() - return TRUE +GLOBAL_DATUM_INIT(no_ceiling_image, /image, new) /proc/cache_no_ceiling_image() - no_ceiling_image = image(icon = 'icons/turf/open_space.dmi', icon_state = "no_ceiling") - no_ceiling_image.plane = PLANE_MESONS + GLOB.no_ceiling_image = image(icon = 'icons/turf/open_space.dmi', icon_state = "no_ceiling") + GLOB.no_ceiling_image.plane = PLANE_MESONS /turf/simulated/floor/update_icon(var/update_neighbors) cut_overlays() @@ -92,7 +88,7 @@ var/image/no_ceiling_image = null // Show 'ceilingless' overlay. var/turf/above = GetAbove(src) if(!is_outdoors() && above && isopenspace(above)) // This won't apply to outdoor turfs since its assumed they don't have a ceiling anyways. - add_overlay(no_ceiling_image) + add_overlay(GLOB.no_ceiling_image) // Update our 'them-to-us' edges, aka edges from external turfs we feel should spill onto us if(edge_blending_priority && !forbid_turf_edge()) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 20ae0b7ab3..68a3a8227d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -319,7 +319,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units.
Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things! "} - if(news_network.wanted_issue) + if(GLOB.news_network.wanted_issue) dat+= "
Read Wanted Issue" dat+= {"

Create Feed Channel @@ -329,7 +329,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m "} var/wanted_already = 0 - if(news_network.wanted_issue) + if(GLOB.news_network.wanted_issue) wanted_already = 1 dat+={"
"} + span_bold("Feed Security functions:") + {"
@@ -340,10 +340,10 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m "} if(1) dat+= "Station Feed Channels
" - if( isemptylist(news_network.network_channels) ) + if( isemptylist(GLOB.news_network.network_channels) ) dat+=span_italics("No active channels found...") else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) + for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels) if(CHANNEL.is_admin_channel) dat+=span_bold("[CHANNEL.channel_name]") + "
" else @@ -390,7 +390,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]") dat+=span_maroon("•Invalid channel name.") + "
" var/check = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) if(FC.channel_name == src.admincaster_feed_channel.channel_name) check = 1 break @@ -430,10 +430,10 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m "} + span_small("Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.") + {"
Select Feed channel to get Stories from:
"} - if(isemptylist(news_network.network_channels)) + if(isemptylist(GLOB.news_network.network_channels)) dat+=span_italics("No feed channels found active...") + "
" else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) + for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels) dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? (span_red("***")) : null]
" dat+="
Cancel" if(11) @@ -443,10 +443,10 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m "} + span_small("morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed") + {" "} + span_small("stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.") + {"
"} - if(isemptylist(news_network.network_channels)) + if(isemptylist(GLOB.news_network.network_channels)) dat+=span_italics("No feed channels found active...") + "
" else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) + for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels) dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? (span_red("***")) : null]
" dat+="
Back" @@ -486,7 +486,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m dat+=span_bold("Wanted Issue Handler:") var/wanted_already = 0 var/end_param = 1 - if(news_network.wanted_issue) + if(GLOB.news_network.wanted_issue) wanted_already = 1 end_param = 2 if(wanted_already) @@ -497,7 +497,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m Description: [src.admincaster_feed_message.body]
"} if(wanted_already) - dat+=span_bold("Wanted Issue created by:") + span_green(" [news_network.wanted_issue.backup_author]") + "
" + dat+=span_bold("Wanted Issue created by:") + span_green(" [GLOB.news_network.wanted_issue.backup_author]") + "
" else dat+=span_bold("Wanted Issue will be created under prosecutor:") + span_green(" [src.admincaster_signature]") + "
" dat+="
[(wanted_already) ? ("Edit Issue") : ("Submit")]" @@ -523,13 +523,13 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m "} if(18) dat+={" - "} + span_bold(span_maroon("-- STATIONWIDE WANTED ISSUE --")) + {"
"} + span_normal("\[Submitted by: [span_green("[news_network.wanted_issue.backup_author]")]\]") + {"
- "} + span_bold("Criminal") + {": [news_network.wanted_issue.author]
- "} + span_bold("Description") + {": [news_network.wanted_issue.body]
+ "} + span_bold(span_maroon("-- STATIONWIDE WANTED ISSUE --")) + {"
"} + span_normal("\[Submitted by: [span_green("[GLOB.news_network.wanted_issue.backup_author]")]\]") + {"
+ "} + span_bold("Criminal") + {": [GLOB.news_network.wanted_issue.author]
+ "} + span_bold("Description") + {": [GLOB.news_network.wanted_issue.body]
"} + span_bold("Photo:") + {": "} - if(news_network.wanted_issue.img) - usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png") + if(GLOB.news_network.wanted_issue.img) + usr << browse_rsc(GLOB.news_network.wanted_issue.img, "tmp_photow.png") dat+="
" else dat+="None" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 1c11a9d997..979d75a7c6 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -330,15 +330,13 @@ ADMIN_VERB(make_sound, R_FUN, "Make Sound", "Display a message to everyone who c feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg) +ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg as text) var/mob/user_mob = user.mob if(!user_mob.control_object) return if(!msg) - msg = tgui_input_text(user, "oSay", "Object text to say.", "") - if(!msg) - return + return for(var/mob/V in hearers(user_mob.control_object)) V.show_message(span_filter_say(span_bold("[user_mob.control_object.name]") + " says: \"[msg]\""), 2) feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -573,7 +571,7 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of if(!A) return A.flags |= AREA_BLOCK_GHOST_SIGHT - ghostnet.addArea(A) + GLOB.ghostnet.addArea(A) /client/proc/remove_hidden_area() set name = "Remove Ghostsight Block Area" @@ -589,7 +587,7 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of if(!A) return A.flags &= ~(AREA_BLOCK_GHOST_SIGHT) - ghostnet.removeArea(A) + GLOB.ghostnet.removeArea(A) /client/proc/hide_motion_tracker_feedback() set name = "Toggle Motion Echos" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 6b283ee569..dd2f79c146 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1687,7 +1687,7 @@ else if(href_list["ac_submit_new_channel"]) var/check = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) + for(var/datum/feed_channel/FC in GLOB.news_network.network_channels) if(FC.channel_name == src.admincaster_feed_channel.channel_name) check = 1 break @@ -1696,7 +1696,7 @@ else var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) if(choice=="Confirm") - news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1) + GLOB.news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1) feedback_inc("newscaster_channels",1) //Adding channel to the global network log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!") src.admincaster_screen=5 @@ -1704,7 +1704,7 @@ else if(href_list["ac_set_channel_receiving"]) var/list/available_channels = list() - for(var/datum/feed_channel/F in news_network.network_channels) + for(var/datum/feed_channel/F in GLOB.news_network.network_channels) available_channels += F.channel_name src.admincaster_feed_channel.channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) src.access_news_network() @@ -1722,7 +1722,7 @@ src.admincaster_screen = 6 else feedback_inc("newscaster_stories",1) - news_network.SubmitArticle(admincaster_feed_message.body, admincaster_signature, admincaster_feed_channel.channel_name, null, 1, "", admincaster_feed_message.title) + GLOB.news_network.SubmitArticle(admincaster_feed_message.body, admincaster_signature, admincaster_feed_channel.channel_name, null, 1, "", admincaster_feed_message.title) src.admincaster_screen=4 log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!") @@ -1746,12 +1746,12 @@ else if(href_list["ac_menu_wanted"]) var/already_wanted = 0 - if(news_network.wanted_issue) + if(GLOB.news_network.wanted_issue) already_wanted = 1 if(already_wanted) - src.admincaster_feed_message.author = news_network.wanted_issue.author - src.admincaster_feed_message.body = news_network.wanted_issue.body + src.admincaster_feed_message.author = GLOB.news_network.wanted_issue.author + src.admincaster_feed_message.body = GLOB.news_network.wanted_issue.body src.admincaster_screen = 14 src.access_news_network() @@ -1776,15 +1776,15 @@ WANTED.body = src.admincaster_feed_message.body //Wanted desc WANTED.backup_author = src.admincaster_signature //Submitted by WANTED.is_admin_message = 1 - news_network.wanted_issue = WANTED + GLOB.news_network.wanted_issue = WANTED for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters) NEWSCASTER.newsAlert() NEWSCASTER.update_icon() src.admincaster_screen = 15 else - news_network.wanted_issue.author = src.admincaster_feed_message.author - news_network.wanted_issue.body = src.admincaster_feed_message.body - news_network.wanted_issue.backup_author = src.admincaster_feed_message.backup_author + GLOB.news_network.wanted_issue.author = src.admincaster_feed_message.author + GLOB.news_network.wanted_issue.body = src.admincaster_feed_message.body + GLOB.news_network.wanted_issue.backup_author = src.admincaster_feed_message.backup_author src.admincaster_screen = 19 log_admin("[key_name_admin(usr)] issued a Station-wide Wanted Notification for [src.admincaster_feed_message.author]!") src.access_news_network() @@ -1792,7 +1792,7 @@ else if(href_list["ac_cancel_wanted"]) var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) if(choice=="Confirm") - news_network.wanted_issue = null + GLOB.news_network.wanted_issue = null for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters) NEWSCASTER.update_icon() src.admincaster_screen=17 diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 5b84202ea4..61b598d9a6 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -59,7 +59,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging) qdel(C) if(GLOB.camera_range_display_status) - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) new/obj/effect/debugging/camera_range(C.loc) feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -75,7 +75,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging) var/list/obj/machinery/camera/CL = list() - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) CL += C var/output = span_bold("CAMERA ANNOMALITIES REPORT") + {"
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 1f588eda85..4c4864c41c 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -3,7 +3,7 @@ #define SHELLEO_STDOUT 2 #define SHELLEO_STDERR 3 -var/list/sounds_cache = list() +GLOBAL_LIST_EMPTY(sounds_cache) ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all players.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound) var/freq = 1 @@ -22,7 +22,7 @@ ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all play admin_sound.status = SOUND_STREAM admin_sound.volume = vol - sounds_cache += S + GLOB.sounds_cache += S var/res = tgui_alert(user, "Show the title of this song ([S]) to the players?\nOptions 'Yes' and 'No' will play the sound.",, list("Yes", "No", "Cancel")) if(!res) @@ -64,7 +64,7 @@ ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z- var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777) uploaded_sound.priority = 250 - sounds_cache += S + GLOB.sounds_cache += S if(tgui_alert(user, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) != "Play") return @@ -80,7 +80,7 @@ ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z- ADMIN_VERB(play_server_sound, R_SOUNDS, "Play Server Sound", "Plays a sound from the server to play.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound) var/list/sounds = world.file2list("sound/serversound_list.txt"); sounds += "--CANCEL--" - sounds += sounds_cache + sounds += GLOB.sounds_cache var/melody = tgui_input_list(user, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--") diff --git a/code/modules/admin/verbs/resize.dm b/code/modules/admin/verbs/resize.dm index 84e930ce99..179c09c0ae 100644 --- a/code/modules/admin/verbs/resize.dm +++ b/code/modules/admin/verbs/resize.dm @@ -1,21 +1,27 @@ -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) - user.do_resize(L) +ADMIN_VERB_ONLY_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", mob/living/living_target) + user.do_resize(living_target) -/client/proc/do_resize(var/mob/living/L) - var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1, round_value=FALSE) +ADMIN_VERB(mob_resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize Mob", "Resizes any living mob without any restrictions on size.", ADMIN_CATEGORY_FUN_EVENT_KIT) + var/mob/target_mob = tgui_input_list(user, "Select target to resize.", "Resize Target", GLOB.mob_list) + if(!target_mob) + return + user.do_resize(target_mob) + +/client/proc/do_resize(mob/living/living_target) + var/size_multiplier = tgui_input_number(src, "Input size multiplier.", "Resize", 1, round_value=FALSE) if(!size_multiplier) return //cancelled 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/can_be_big = living_target.has_large_resize_bounds() var/very_big = is_extreme_size(size_multiplier) if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse - to_chat(src, span_warning("[L] will lose this size upon moving into an area where this size is not allowed.")) + to_chat(src, span_warning("[living_target] will lose this size upon moving into an area where this size is not allowed.")) else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse - to_chat(src, span_warning("[L] will retain this normally unallowed size outside this area.")) + to_chat(src, span_warning("[living_target] will retain this normally unallowed size outside this area.")) - L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE) + living_target.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE) - log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].", src) + log_and_message_admins("has changed [key_name(living_target)]'s size multiplier to [size_multiplier].", src) feedback_add_details("admin_verb","RESIZE") diff --git a/code/modules/admin/verbs/tgui_verbs.dm b/code/modules/admin/verbs/tgui_verbs.dm deleted file mode 100644 index 75539b5a0b..0000000000 --- a/code/modules/admin/verbs/tgui_verbs.dm +++ /dev/null @@ -1,29 +0,0 @@ -//Allows some list search inputs -/client/proc/tgui_admin_lists() - set name = "TGUI Admin Lists" - set desc = "Allows to have some procs with searchable lists." - set category = "Admin.Game" - if(!check_rights(R_ADMIN|R_EVENT)) - return - - var/list/modification_options = list(TGUI_VIEW_ATTACK_LOGS, TGUI_VIEW_DIALOG_LOGS, TGUI_RESIZE) - - - var/tgui_list_choice = tgui_input_list(src, "Select the verb you would like to use with a tgui input","Choice", modification_options) - if(!tgui_list_choice || tgui_list_choice == "Cancel") - return - - log_and_message_admins("[key_name(src)] has used TGUI Admin Lists with ([tgui_list_choice])].") - feedback_add_details("admin_verb","TGUIADL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - switch(tgui_list_choice) - if(TGUI_VIEW_ATTACK_LOGS) - var/mob/living/L = tgui_input_list(src, "Check a player's attack logs.", "Check Player Attack Logs", GLOB.mob_list) - show_cmd_admin_check_player_logs(L) - if(TGUI_VIEW_DIALOG_LOGS) - var/mob/living/L = tgui_input_list(src, "Check a player's dialogue logs.", "Check Player Dialogue Logs", GLOB.mob_list) - show_cmd_admin_check_dialogue_logs(L) - if(TGUI_RESIZE) - var/mob/living/L = tgui_input_list(src, "Resizes any living mob without any restrictions on size.", "Resize", GLOB.mob_list) - if(L) - do_resize(L) diff --git a/code/modules/busy_space/loremaster.dm b/code/modules/busy_space/loremaster.dm index 9c2f0f55b4..dfdd708e9c 100644 --- a/code/modules/busy_space/loremaster.dm +++ b/code/modules/busy_space/loremaster.dm @@ -1,7 +1,5 @@ //I AM THE LOREMASTER, ARE YOU THE GATEKEEPER? -var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster - /datum/lore/loremaster var/list/organizations = list() diff --git a/code/modules/economy/Events.dm b/code/modules/economy/Events.dm index 0486df2215..e31dc84ab3 100644 --- a/code/modules/economy/Events.dm +++ b/code/modules/economy/Events.dm @@ -89,7 +89,7 @@ if(FESTIVAL) body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter","child")]","coming of age of their [pick("son","daughter","child")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet." - news_network.SubmitArticle(body, author, channel, null, 1) + GLOB.news_network.SubmitArticle(body, author, channel, null, 1) /datum/event/economic_event/end() for(var/good_type in dearer_goods) diff --git a/code/modules/economy/Events_Mundane.dm b/code/modules/economy/Events_Mundane.dm index 39c06c3a90..d0be73aaf9 100644 --- a/code/modules/economy/Events_Mundane.dm +++ b/code/modules/economy/Events_Mundane.dm @@ -92,4 +92,4 @@ "Broccoli discovered to be colonies of tiny aliens with murder on their minds"\ ) - news_network.SubmitArticle(body, author, channel, null, 1) + GLOB.news_network.SubmitArticle(body, author, channel, null, 1) diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 5ae68ee9e5..79178823de 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -30,9 +30,9 @@ GLOBAL_VAR_INIT(economy_init, 0) if(GLOB.economy_init) return 2 - //news_network.CreateFeedChannel("The [using_map.starsys_name] Times", "[using_map.starsys_name] Times ExoNode - [using_map.station_short]", 1, 1) - news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1) - news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1) + //GLOB.news_network.CreateFeedChannel("The [using_map.starsys_name] Times", "[using_map.starsys_name] Times ExoNode - [using_map.station_short]", 1, 1) + GLOB.news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1) + GLOB.news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1) for(var/loc_type in subtypesof(/datum/trade_destination)) var/datum/trade_destination/D = new loc_type diff --git a/code/modules/economy/lorenews.dm b/code/modules/economy/lorenews.dm index fd812fec95..3268497704 100644 --- a/code/modules/economy/lorenews.dm +++ b/code/modules/economy/lorenews.dm @@ -107,4 +107,4 @@ "Unusual stellar phenomena was detected on [pick(allloc)], sparking concerns about the colonies in the system.", ) - news_network.SubmitArticle(body, author, channel, null, 1) + GLOB.news_network.SubmitArticle(body, author, channel, null, 1) diff --git a/code/modules/events/camera_damage.dm b/code/modules/events/camera_damage.dm index 3e1b08c826..835ecb6b5a 100644 --- a/code/modules/events/camera_damage.dm +++ b/code/modules/events/camera_damage.dm @@ -22,12 +22,12 @@ cam.wires.cut(WIRE_CAM_ALARM) /datum/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5) - if(!cameranet.cameras.len) + if(!GLOB.cameranet.cameras.len) return if(!remaining_attempts) return - var/obj/machinery/camera/C = pick(cameranet.cameras) + var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras) if(is_valid_camera(C)) return C return acquire_random_camera(remaining_attempts--) diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 474ae4ed8a..3e526814b0 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -54,14 +54,13 @@ target.add_ion_law(law) target.show_laws() /* //VOREstation edit. Was fucking up all PDA messagess. - if(message_servers) - for (var/obj/machinery/message_server/MS in message_servers) - MS.spamfilter.Cut() - var/i - for (i = 1, i <= MS.spamfilter_limit, i++) - MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[using_map.station_short]", \ - "admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\ - "director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno") + for (var/obj/machinery/message_server/MS in GLOB.message_servers) + MS.spamfilter.Cut() + var/i + for (i = 1, i <= MS.spamfilter_limit, i++) + MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[using_map.station_short]", \ + "admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\ + "director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno") */ /datum/event/ionstorm/tick() if(botEmagChance) diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index 5e361a9a7b..2ce3f9e26e 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -30,4 +30,4 @@ if(!deposit_success) body += "
Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 Thalers to ND 'Stellar Slam' office on the The [using_map.starsys_name] Times gateway containing updated details, and your winnings'll be re-sent within the month." - news_network.SubmitArticle(body, author, channel, null, 1) + GLOB.news_network.SubmitArticle(body, author, channel, null, 1) diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm index cb05dfcfc9..1ac53cfb08 100644 --- a/code/modules/events/money_spam.dm +++ b/code/modules/events/money_spam.dm @@ -9,11 +9,10 @@ pick_message_server() /datum/event/pda_spam/proc/pick_message_server() - if(message_servers) - for (var/obj/machinery/message_server/MS in message_servers) - if(MS.active) - useMS = MS - break + for(var/obj/machinery/message_server/MS in GLOB.message_servers) + if(MS.active) + useMS = MS + break /datum/event/pda_spam/tick() if(world.time > last_spam_time + 3000) diff --git a/code/modules/gamemaster/event2/events/engineering/camera_damage.dm b/code/modules/gamemaster/event2/events/engineering/camera_damage.dm index c8826dbd65..2051d48b13 100644 --- a/code/modules/gamemaster/event2/events/engineering/camera_damage.dm +++ b/code/modules/gamemaster/event2/events/engineering/camera_damage.dm @@ -24,12 +24,12 @@ cam.wires.cut(WIRE_CAM_ALARM) /datum/event2/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5) - if(!cameranet.cameras.len) + if(!GLOB.cameranet.cameras.len) return if(!remaining_attempts) return - var/obj/machinery/camera/C = pick(cameranet.cameras) + var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras) if(is_valid_camera(C)) return C // It is very important to use --var and not var-- for recursive calls, as var-- will cause an infinite loop. diff --git a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm index 533c57a76e..b7bf3abb67 100644 --- a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm +++ b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm @@ -138,5 +138,5 @@ /datum/event2/event/pda_spam/proc/pick_message_server() - if(LAZYLEN(message_servers)) - return pick(message_servers) + if(LAZYLEN(GLOB.message_servers)) + return pick(GLOB.message_servers) diff --git a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm index 9c53eb4824..e27a997358 100644 --- a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm +++ b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm @@ -49,14 +49,13 @@ // Messaging server spam filters. // This might be better served as a seperate event since it seems more like a hacker attack than a natural occurance. - if(message_servers) - for(var/obj/machinery/message_server/MS in message_servers) - if(MS.z in get_location_z_levels()) - MS.spamfilter.Cut() - for (var/i = 1, i <= MS.spamfilter_limit, i++) - MS.spamfilter += pick("warble","help","almach","ai","liberty","freedom","drugs", "[using_map.station_short]", \ - "admin","sol","security","meow","_","monkey","-","moron","pizza","message","spam",\ - "director", "Hello", "Hi!"," ","nuke","crate","taj","xeno") + for(var/obj/machinery/message_server/MS in GLOB.message_servers) + if(MS.z in get_location_z_levels()) + MS.spamfilter.Cut() + for (var/i = 1, i <= MS.spamfilter_limit, i++) + MS.spamfilter += pick("warble","help","almach","ai","liberty","freedom","drugs", "[using_map.station_short]", \ + "admin","sol","security","meow","_","monkey","-","moron","pizza","message","spam",\ + "director", "Hello", "Hi!"," ","nuke","crate","taj","xeno") /datum/event2/event/ion_storm/announce() if(prob(announce_odds)) diff --git a/code/modules/lore_codex/lore_data/orgs.dm b/code/modules/lore_codex/lore_data/orgs.dm index 1d9e0e009b..c7e819db29 100644 --- a/code/modules/lore_codex/lore_data/orgs.dm +++ b/code/modules/lore_codex/lore_data/orgs.dm @@ -4,8 +4,8 @@ /datum/lore/codex/category/auto_org/New(var/new_holder, var/new_parent) ..(new_holder, new_parent) - for(var/path in loremaster.organizations) - var/datum/lore/organization/O = loremaster.organizations[path] + for(var/path in GLOB.loremaster.organizations) + var/datum/lore/organization/O = GLOB.loremaster.organizations[path] if(!(istype(O, desired_type))) continue var/datum/lore/codex/page/P = new(holder, src) diff --git a/code/modules/lore_codex/lore_data_vr/orgs.dm b/code/modules/lore_codex/lore_data_vr/orgs.dm index 2cd32f6c91..a64ec3f8cf 100644 --- a/code/modules/lore_codex/lore_data_vr/orgs.dm +++ b/code/modules/lore_codex/lore_data_vr/orgs.dm @@ -6,8 +6,8 @@ /datum/lore/codex/category/auto_org/New(var/new_holder, var/new_parent) ..(new_holder, new_parent) keywords += auto_keywords - for(var/path in loremaster.organizations) - var/datum/lore/organization/O = loremaster.organizations[path] + for(var/path in GLOB.loremaster.organizations) + var/datum/lore/organization/O = GLOB.loremaster.organizations[path] if(!(istype(O, desired_type))) continue var/datum/lore/codex/page/P = new(holder, src) diff --git a/code/modules/maps/map_template.dm b/code/modules/maps/map_template.dm index e9bc6abc61..78af650d14 100644 --- a/code/modules/maps/map_template.dm +++ b/code/modules/maps/map_template.dm @@ -177,7 +177,7 @@ var/deleted_atoms = 0 admin_notice(span_danger("Annihilating objects in submap loading locatation."), R_DEBUG) var/list/turfs_to_clean = get_affected_turfs(origin, centered) - if(turfs_to_clean.len) + if(length(turfs_to_clean)) for(var/turf/T in turfs_to_clean) for(var/atom/movable/AM in T) ++deleted_atoms @@ -215,7 +215,7 @@ /proc/seed_submaps(var/list/z_levels, var/budget = 0, var/whitelist = /area/space, var/desired_map_template_type = null) set background = TRUE - if(!z_levels || !z_levels.len) + if(!z_levels || !length(z_levels)) admin_notice("seed_submaps() was not given any Z-levels.", R_DEBUG) return @@ -253,8 +253,8 @@ overall_sanity-- var/datum/map_template/chosen_template = null - if(potential_submaps.len) - if(priority_submaps.len) // Do these first. + if(length(potential_submaps)) + if(length(priority_submaps)) // Do these first. chosen_template = pick(priority_submaps) else chosen_template = pick(potential_submaps) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 165d8e7768..7a3f2efd65 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -102,7 +102,7 @@ animate(pixel_y = default_pixel_y, time = 10, loop = -1) GLOB.observer_mob_list += src . = ..() - visualnet = ghostnet + visualnet = GLOB.ghostnet /mob/observer/dead/proc/checkStatic() return !(check_rights_for(src.client, R_ADMIN|R_FUN|R_EVENT|R_SERVER) || (client && client.buildmode) || isbelly(loc)) diff --git a/code/modules/mob/freelook/ai/eye.dm b/code/modules/mob/freelook/ai/eye.dm index f91e3fa83d..76d7a76766 100644 --- a/code/modules/mob/freelook/ai/eye.dm +++ b/code/modules/mob/freelook/ai/eye.dm @@ -9,7 +9,7 @@ /mob/observer/eye/aiEye/Initialize(mapload) . = ..() - visualnet = cameranet + visualnet = GLOB.cameranet /mob/observer/eye/aiEye/Destroy() if(owner) diff --git a/code/modules/mob/freelook/ai/update_triggers.dm b/code/modules/mob/freelook/ai/update_triggers.dm index 343abe9feb..34395183f9 100644 --- a/code/modules/mob/freelook/ai/update_triggers.dm +++ b/code/modules/mob/freelook/ai/update_triggers.dm @@ -14,7 +14,7 @@ updating = 1 spawn(BORG_CAMERA_BUFFER) if(old_loc != src.loc) - cameranet.updatePortableCamera(src.camera) + GLOB.cameranet.updatePortableCamera(src.camera) updating = 0 /mob/living/silicon/ai/Moved(atom/old_loc, direction, forced = FALSE) @@ -25,8 +25,8 @@ updating = 1 spawn(BORG_CAMERA_BUFFER) if(old_loc != src.loc) - cameranet.updateVisibility(old_loc, 0) - cameranet.updateVisibility(loc, 0) + GLOB.cameranet.updateVisibility(old_loc, 0) + GLOB.cameranet.updateVisibility(loc, 0) updating = 0 #undef BORG_CAMERA_BUFFER @@ -38,24 +38,24 @@ /obj/machinery/camera/deactivate(user as mob, var/choice = 1) ..(user, choice) if(src.can_use()) - cameranet.addCamera(src) + GLOB.cameranet.addCamera(src) else src.set_light(0) - cameranet.removeCamera(src) + GLOB.cameranet.removeCamera(src) /obj/machinery/camera/Initialize(mapload) . = ..() //Camera must be added to global list of all cameras no matter what... - if(cameranet.cameras_unsorted || !SSticker) - cameranet.cameras += src - cameranet.cameras_unsorted = 1 + if(GLOB.cameranet.cameras_unsorted || !SSticker) + GLOB.cameranet.cameras += src + GLOB.cameranet.cameras_unsorted = 1 else - dd_insertObjectList(cameranet.cameras, src) + dd_insertObjectList(GLOB.cameranet.cameras, src) update_coverage(1) /obj/machinery/camera/Destroy() clear_all_networks() - cameranet.cameras -= src + GLOB.cameranet.cameras -= src return ..() // Mobs @@ -64,9 +64,9 @@ ..() if(was_dead && stat != DEAD) // Arise! - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) /mob/living/silicon/ai/death(gibbed) if(..()) // If true, the mob went from living to dead (assuming everyone has been overriding as they should...) - cameranet.updateVisibility(src, 0) + GLOB.cameranet.updateVisibility(src, 0) diff --git a/code/modules/mob/freelook/mask/eye.dm b/code/modules/mob/freelook/mask/eye.dm index 253196e343..54b37595c5 100644 --- a/code/modules/mob/freelook/mask/eye.dm +++ b/code/modules/mob/freelook/mask/eye.dm @@ -10,4 +10,4 @@ /mob/observer/eye/maskEye/Initialize(mapload) . = ..() - visualnet = cultnet + visualnet = GLOB.cultnet diff --git a/code/modules/mob/freelook/mask/update_triggers.dm b/code/modules/mob/freelook/mask/update_triggers.dm index e66e680035..dc6d25e30e 100644 --- a/code/modules/mob/freelook/mask/update_triggers.dm +++ b/code/modules/mob/freelook/mask/update_triggers.dm @@ -6,40 +6,40 @@ /mob/living/Moved(atom/old_loc, direction, forced = FALSE) . = ..() - if(!cultnet.provides_vision(src)) + if(!GLOB.cultnet.provides_vision(src)) return if(!updating_cult_vision) updating_cult_vision = 1 spawn(CULT_UPDATE_BUFFER) if(old_loc != src.loc) - cultnet.updateVisibility(old_loc, 0) - cultnet.updateVisibility(loc, 0) + GLOB.cultnet.updateVisibility(old_loc, 0) + GLOB.cultnet.updateVisibility(loc, 0) updating_cult_vision = 0 #undef CULT_UPDATE_BUFFER /mob/living/Initialize(mapload) . = ..() - cultnet.updateVisibility(src, 0) + GLOB.cultnet.updateVisibility(src, 0) /mob/living/rejuvenate() var/was_dead = stat == DEAD ..() if(was_dead && stat != DEAD) // Arise! - cultnet.updateVisibility(src, 0) + GLOB.cultnet.updateVisibility(src, 0) /mob/living/death(gibbed, deathmessage="seizes up and falls limp...") if(..(gibbed, deathmessage)) // If true, the mob went from living to dead (assuming everyone has been overriding as they should...) - cultnet.updateVisibility(src) + GLOB.cultnet.updateVisibility(src) /datum/antagonist/add_antagonist(var/datum/mind/player) . = ..() if(src == GLOB.cult) - cultnet.updateVisibility(player.current, 0) + GLOB.cultnet.updateVisibility(player.current, 0) /datum/antagonist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted) ..() if(src == GLOB.cult) - cultnet.updateVisibility(player.current, 0) + GLOB.cultnet.updateVisibility(player.current, 0) diff --git a/code/modules/mob/freelook/read_me.dm b/code/modules/mob/freelook/read_me.dm index 55c44d7d16..2877a8e513 100644 --- a/code/modules/mob/freelook/read_me.dm +++ b/code/modules/mob/freelook/read_me.dm @@ -43,7 +43,7 @@ * * WHERE * IS * EVERYTHING? * - * cameranet.dm = Everything * about * the * cameranet * datum. + * cameranet.dm = Everything * about * the * GLOB.cameranet * datum. * chunk.dm = Everything * about * the * chunk * datum. * eye.dm = Everything * about * the * AI * and * the * AIEye. * updating.dm = Everything * about * triggers * that * will * update * chunks. diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm index aa4cfba60e..957219defd 100644 --- a/code/modules/mob/freelook/update_triggers.dm +++ b/code/modules/mob/freelook/update_triggers.dm @@ -4,7 +4,7 @@ /proc/updateVisibility(atom/A, var/opacity_check = 1) if(SSticker) - for(var/datum/visualnet/VN in visual_nets) + for(var/datum/visualnet/VN in GLOB.visual_nets) VN.updateVisibility(A, opacity_check) /turf diff --git a/code/modules/mob/freelook/visualnet.dm b/code/modules/mob/freelook/visualnet.dm index d7b0d39c33..1fc0219591 100644 --- a/code/modules/mob/freelook/visualnet.dm +++ b/code/modules/mob/freelook/visualnet.dm @@ -10,10 +10,10 @@ /datum/visualnet/New() ..() - visual_nets += src + GLOB.visual_nets += src /datum/visualnet/Destroy() - visual_nets -= src + GLOB.visual_nets -= src return ..() // Checks if a chunk has been Generated in x, y, z. @@ -153,8 +153,8 @@ /turf/verb/view_chunk() set src in world - if(cameranet.chunkGenerated(x, y, z)) - var/datum/chunk/chunk = cameranet.getCameraChunk(x, y, z) + if(GLOB.cameranet.chunkGenerated(x, y, z)) + var/datum/chunk/chunk = GLOB.cameranet.getCameraChunk(x, y, z) usr.client.debug_variables(chunk) */ diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 2063927854..7d552aea77 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -102,7 +102,7 @@ if(isobj(OR)) qdel(OR) - cultnet.updateVisibility(src, 0) + GLOB.cultnet.updateVisibility(src, 0) if(aiming) qdel(aiming) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 1117f53f03..a866f05a9d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -467,7 +467,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( unset_machine() src << browse(null, t1) if (href_list["switchcamera"]) - switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras + switchCamera(locate(href_list["switchcamera"])) in GLOB.cameranet.cameras if (href_list["showalerts"]) subsystem_alarm_monitor() //Carn: holopad requests @@ -504,7 +504,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( return /mob/living/silicon/ai/proc/camera_visibility(mob/observer/eye/aiEye/moved_eye) - cameranet.visibility(moved_eye, client, all_eyes) + GLOB.cameranet.visibility(moved_eye, client, all_eyes) /mob/living/silicon/ai/forceMove(atom/destination, direction, movetime) . = ..() @@ -556,7 +556,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( return var/list/cameralist = new() - for (var/obj/machinery/camera/C in cameranet.cameras) + for (var/obj/machinery/camera/C in GLOB.cameranet.cameras) if(!C.can_use()) continue var/list/tempnetwork = difflist(C.network, GLOB.restricted_camera_networks, 1) @@ -580,7 +580,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( src.network = network - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) if(!C.can_use()) continue if(network in C.network) diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 16736bb6eb..56fadcdd53 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -155,7 +155,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) if(screen && screen.ai) screen.ai.camera_visibility(src) else - cameranet.visibility(src) + GLOB.cameranet.visibility(src) update_camera_telegraphing() /mob/observer/eye/aiEye/pic_in_pic/proc/update_camera_telegraphing() diff --git a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm index 018396e60e..b8d0e2be19 100644 --- a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm +++ b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm @@ -11,8 +11,8 @@ var/global/ntnrc_uid = 0 /datum/ntnet_conversation/New() id = ntnrc_uid ntnrc_uid++ - if(ntnet_global) - ntnet_global.chat_channels.Add(src) + if(GLOB.ntnet_global) + GLOB.ntnet_global.chat_channels.Add(src) ..() /datum/ntnet_conversation/proc/add_message(var/message, var/username) diff --git a/code/modules/modular_computers/NTNet/NTNet.dm b/code/modules/modular_computers/NTNet/NTNet.dm index 9c698a382b..8cd4ecf91b 100644 --- a/code/modules/modular_computers/NTNet/NTNet.dm +++ b/code/modules/modular_computers/NTNet/NTNet.dm @@ -1,8 +1,8 @@ -var/global/datum/ntnet/ntnet_global = new() + // This is the NTNet datum. There can be only one NTNet datum in game at once. Modular computers read data from this. -/datum/ntnet/ +/datum/ntnet var/list/relays = list() var/list/logs = list() var/list/available_station_software = list() @@ -38,8 +38,8 @@ var/global/datum/ntnet/ntnet_global = new() // If new NTNet datum is spawned, it replaces the old one. /datum/ntnet/New() - if(ntnet_global && (ntnet_global != src)) - ntnet_global = src // There can be only one. + if(GLOB.ntnet_global && (GLOB.ntnet_global != src)) + GLOB.ntnet_global = src // There can be only one. if (SSatoms && SSatoms.initialized > INITIALIZATION_INSSATOMS) for(var/obj/machinery/ntnet_relay/R in GLOB.machines) relays.Add(R) @@ -139,7 +139,7 @@ var/global/datum/ntnet/ntnet_global = new() // Generates service email list. Currently only used by broadcaster service /datum/ntnet/proc/build_emails_list() for(var/F in subtypesof(/datum/computer_file/data/email_account/service)) - new F() + email_accounts += new F(TRUE) // Attempts to find a downloadable file according to filename var /datum/ntnet/proc/find_ntnet_file_by_name(var/filename) @@ -193,7 +193,7 @@ var/global/datum/ntnet/ntnet_global = new() add_log("Configuration Updated. Wireless network firewall now [setting_systemcontrol ? "allows" : "disallows"] remote control of station's systems.") /datum/ntnet/proc/does_email_exist(var/login) - for(var/datum/computer_file/data/email_account/A in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/A in GLOB.ntnet_global.email_accounts) if(A.login == login) return 1 return 0 diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm index e814815aad..a4cf97404a 100644 --- a/code/modules/modular_computers/NTNet/NTNet_relay.dm +++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm @@ -49,12 +49,12 @@ if((dos_overload > dos_capacity) && !dos_failure) dos_failure = 1 update_icon() - ntnet_global.add_log("Quantum relay switched from normal operation mode to overload recovery mode.") + GLOB.ntnet_global.add_log("Quantum relay switched from normal operation mode to overload recovery mode.") // If the DoS buffer reaches 0 again, restart. if((dos_overload == 0) && dos_failure) dos_failure = 0 update_icon() - ntnet_global.add_log("Quantum relay switched from overload recovery mode to normal operation mode.") + GLOB.ntnet_global.add_log("Quantum relay switched from overload recovery mode to normal operation mode.") ..() /obj/machinery/ntnet_relay/tgui_interact(mob/user, datum/tgui/ui) @@ -83,16 +83,16 @@ dos_overload = 0 dos_failure = 0 update_icon() - ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.") + GLOB.ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.") . = TRUE if("toggle") enabled = !enabled - ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].") + GLOB.ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].") update_icon() . = TRUE if("purge") - ntnet_global.banned_nids.Cut() - ntnet_global.add_log("Manual override: Network blacklist cleared.") + GLOB.ntnet_global.banned_nids.Cut() + GLOB.ntnet_global.add_log("Manual override: Network blacklist cleared.") . = TRUE /obj/machinery/ntnet_relay/Initialize(mapload) @@ -102,15 +102,15 @@ /obj/machinery/ntnet_relay/Initialize(mapload) . = ..() - if(ntnet_global) - ntnet_global.relays.Add(src) - NTNet = ntnet_global - ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]") + if(GLOB.ntnet_global) + GLOB.ntnet_global.relays.Add(src) + NTNet = GLOB.ntnet_global + GLOB.ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]") /obj/machinery/ntnet_relay/Destroy() - if(ntnet_global) - ntnet_global.relays.Remove(src) - ntnet_global.add_log("Quantum relay connection severed. Current amount of linked relays: [NTNet.relays.len]") + if(GLOB.ntnet_global) + GLOB.ntnet_global.relays.Remove(src) + GLOB.ntnet_global.add_log("Quantum relay connection severed. Current amount of linked relays: [NTNet.relays.len]") NTNet = null for(var/datum/computer_file/program/ntnet_dos/D in dos_sources) D.target = null diff --git a/code/modules/modular_computers/NTNet/emails/email_account.dm b/code/modules/modular_computers/NTNet/emails/email_account.dm index 7cccdeb6bc..36daa64add 100644 --- a/code/modules/modular_computers/NTNet/emails/email_account.dm +++ b/code/modules/modular_computers/NTNet/emails/email_account.dm @@ -1,4 +1,4 @@ -/datum/computer_file/data/email_account/ +/datum/computer_file/data/email_account var/list/inbox = list() var/list/outbox = list() var/list/spam = list() @@ -24,12 +24,13 @@ stored_message.calculate_size() size += stored_message.size -/datum/computer_file/data/email_account/New() - ntnet_global.email_accounts.Add(src) +/datum/computer_file/data/email_account/New(glob_load) + if(!glob_load) + GLOB.ntnet_global.email_accounts += src ..() /datum/computer_file/data/email_account/Destroy() - ntnet_global.email_accounts.Remove(src) + GLOB.ntnet_global.email_accounts -= src . = ..() /datum/computer_file/data/email_account/proc/all_emails() @@ -37,7 +38,7 @@ /datum/computer_file/data/email_account/proc/send_mail(var/recipient_address, var/datum/computer_file/data/email_message/message, var/relayed = 0) var/datum/computer_file/data/email_account/recipient - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts) if(account.login == recipient_address) recipient = account break @@ -48,12 +49,12 @@ if(!recipient.receive_mail(message, relayed)) return - ntnet_global.add_log_with_ids_check("EMAIL LOG: [login] -> [recipient.login] title: [message.title].") + GLOB.ntnet_global.add_log_with_ids_check("EMAIL LOG: [login] -> [recipient.login] title: [message.title].") return 1 /datum/computer_file/data/email_account/proc/receive_mail(var/datum/computer_file/data/email_message/received_message, var/relayed) received_message.set_timestamp() - if(!ntnet_global.intrusion_detection_enabled) + if(!GLOB.ntnet_global.intrusion_detection_enabled) inbox.Add(received_message) return 1 // Spam filters may occassionally let something through, or mark something as spam that isn't spam. @@ -70,10 +71,10 @@ return 1 // Address namespace (@internal-services.nt) for email addresses with special purpose only!. -/datum/computer_file/data/email_account/service/ +/datum/computer_file/data/email_account/service can_login = FALSE -/datum/computer_file/data/email_account/service/broadcaster/ +/datum/computer_file/data/email_account/service/broadcaster login = EMAIL_BROADCAST /datum/computer_file/data/email_account/service/broadcaster/receive_mail(var/datum/computer_file/data/email_message/received_message, var/relayed) @@ -84,7 +85,7 @@ log_and_message_admins("Broadcast email address used by [usr]. Message title: [received_message.title].") spawn(0) - for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/email_account in GLOB.ntnet_global.email_accounts) var/datum/computer_file/data/email_message/new_message = received_message.clone() send_mail(email_account.login, new_message, 1) sleep(2) @@ -105,7 +106,7 @@ log_and_message_admins("Broadcast email address used by [usr]. Message title: [received_message.title].") spawn(0) - for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/email_account in GLOB.ntnet_global.email_accounts) var/datum/computer_file/data/email_message/new_message = received_message.clone() send_mail(email_account.login, new_message, 1) sleep(2) diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm index 02a84c22f1..801b30c372 100644 --- a/code/modules/modular_computers/computers/modular_computer/core.dm +++ b/code/modules/modular_computers/computers/modular_computer/core.dm @@ -155,7 +155,7 @@ /obj/item/modular_computer/proc/add_log(var/text) if(!get_ntnet_status()) return 0 - return ntnet_global.add_log(text, network_card) + return GLOB.ntnet_global.add_log(text, network_card) /obj/item/modular_computer/proc/shutdown_computer(var/loud = 1) kill_program(1) diff --git a/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm b/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm index b969d9a8ad..5aff199141 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm @@ -44,9 +44,9 @@ if(progress >= target_progress) reset() RFID.stored_card.access |= target_access.id - if(ntnet_global.intrusion_detection_enabled) - ntnet_global.add_log("IDS WARNING - Unauthorised access to primary keycode database from device: [computer.network_card.get_network_tag()] - downloaded access codes for: [target_access.desc].") - ntnet_global.intrusion_detection_alarm = 1 + if(GLOB.ntnet_global.intrusion_detection_enabled) + GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access to primary keycode database from device: [computer.network_card.get_network_tag()] - downloaded access codes for: [target_access.desc].") + GLOB.ntnet_global.intrusion_detection_alarm = 1 message = "Successfully decrypted and saved operational key codes. Downloaded access codes for: [target_access.desc]" target_access = null @@ -72,13 +72,13 @@ return running = TRUE target_access = get_access_by_id("[params["access_target"]]") - if(ntnet_global.intrusion_detection_enabled) - ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]") - ntnet_global.intrusion_detection_alarm = TRUE + if(GLOB.ntnet_global.intrusion_detection_enabled) + GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]") + GLOB.ntnet_global.intrusion_detection_alarm = TRUE return TRUE /datum/computer_file/program/access_decrypter/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) - if(!ntnet_global) + if(!GLOB.ntnet_global) return var/list/data = get_header_data() diff --git a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm index f8ec1e3f5a..d13c56f95f 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm @@ -41,7 +41,7 @@ ..(forced) /datum/computer_file/program/ntnet_dos/tgui_data(mob/user) - if(!ntnet_global) + if(!GLOB.ntnet_global) return var/list/data = get_header_data() @@ -56,7 +56,7 @@ else data["target"] = FALSE data["relays"] = list() - for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays) + for(var/obj/machinery/ntnet_relay/R in GLOB.ntnet_global.relays) data["relays"] += list(list("id" = R.uid)) data["focus"] = target ? target.uid : null @@ -67,7 +67,7 @@ return TRUE switch(action) if("PRG_target_relay") - for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays) + for(var/obj/machinery/ntnet_relay/R in GLOB.ntnet_global.relays) if(R.uid == text2num(params["targid"])) target = R break @@ -83,8 +83,8 @@ if(target) executed = TRUE target.dos_sources.Add(src) - if(ntnet_global.intrusion_detection_enabled) + if(GLOB.ntnet_global.intrusion_detection_enabled) var/obj/item/computer_hardware/network_card/network_card = computer.network_card - ntnet_global.add_log("IDS WARNING - Excess traffic flood targeting relay [target.uid] detected from device: [network_card.get_network_tag()]") - ntnet_global.intrusion_detection_alarm = TRUE + GLOB.ntnet_global.add_log("IDS WARNING - Excess traffic flood targeting relay [target.uid] detected from device: [network_card.get_network_tag()]") + GLOB.ntnet_global.intrusion_detection_alarm = TRUE return TRUE diff --git a/code/modules/modular_computers/file_system/programs/antagonist/hacked_camera.dm b/code/modules/modular_computers/file_system/programs/antagonist/hacked_camera.dm index 3f6f4b1286..1caeffe932 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/hacked_camera.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/hacked_camera.dm @@ -17,6 +17,6 @@ // The program is active and connected to one of the station's networks. Has a very small chance to trigger IDS alarm every tick. if(prob(0.1)) - if(ntnet_global.intrusion_detection_enabled) - ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network by device with NID [computer.network_card.get_network_tag()]") - ntnet_global.intrusion_detection_alarm = 1 + if(GLOB.ntnet_global.intrusion_detection_enabled) + GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network by device with NID [computer.network_card.get_network_tag()]") + GLOB.ntnet_global.intrusion_detection_alarm = 1 diff --git a/code/modules/modular_computers/file_system/programs/command/comm.dm b/code/modules/modular_computers/file_system/programs/command/comm.dm index 81275f956e..a1c2d19237 100644 --- a/code/modules/modular_computers/file_system/programs/command/comm.dm +++ b/code/modules/modular_computers/file_system/programs/command/comm.dm @@ -27,13 +27,10 @@ /* General message handling stuff */ -var/list/comm_message_listeners = list() //We first have to initialize list then we can use it. -var/datum/comm_message_listener/global_message_listener = new //May be used by admins -var/last_message_id = 0 /proc/get_comm_message_id() - last_message_id = last_message_id + 1 - return last_message_id + GLOB.last_message_id = GLOB.last_message_id + 1 + return GLOB.last_message_id /proc/post_comm_message(var/message_title, var/message_text) var/list/message = list() @@ -41,7 +38,7 @@ var/last_message_id = 0 message["title"] = message_title message["contents"] = message_text - for(var/datum/comm_message_listener/l in comm_message_listeners) + for(var/datum/comm_message_listener/l in GLOB.comm_message_listeners) l.Add(message) /datum/comm_message_listener @@ -50,7 +47,7 @@ var/last_message_id = 0 /datum/comm_message_listener/New() ..() messages = list() - comm_message_listeners.Add(src) + GLOB.comm_message_listeners.Add(src) /datum/comm_message_listener/proc/Add(var/list/message) messages[++messages.len] = message diff --git a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm index 70a3c056d8..78af510bc8 100644 --- a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm @@ -57,7 +57,7 @@ "download_rate" = download_netspeed ) else // Viewing list of articles - for(var/datum/computer_file/data/news_article/F in ntnet_global.available_news) + for(var/datum/computer_file/data/news_article/F in GLOB.ntnet_global.available_news) if(!show_archived && F.archived) continue all_articles.Add(list(list( @@ -87,7 +87,7 @@ if(downloading || loaded_article) return TRUE - for(var/datum/computer_file/data/news_article/N in ntnet_global.available_news) + for(var/datum/computer_file/data/news_article/N in GLOB.ntnet_global.available_news) if(N.uid == text2num(params["uid"])) loaded_article = N.clone() downloading = 1 diff --git a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm index fd8884cac8..7acc272f49 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm @@ -37,17 +37,17 @@ if(downloaded_file) return 0 - var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(filename) + var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(filename) if(!check_file_download(filename)) return 0 ui_header = "downloader_running.gif" - if(PRG in ntnet_global.available_station_software) + if(PRG in GLOB.ntnet_global.available_station_software) generate_network_log("Began downloading file [PRG.filename].[PRG.filetype] from NTNet Software Repository.") hacked_download = 0 - else if(PRG in ntnet_global.available_antag_software) + else if(PRG in GLOB.ntnet_global.available_antag_software) generate_network_log("Began downloading file **ENCRYPTED**.[PRG.filetype] from unspecified server.") hacked_download = 1 else @@ -58,7 +58,7 @@ /datum/computer_file/program/ntnetdownload/proc/check_file_download(var/filename) //returns 1 if file can be downloaded, returns 0 if download prohibited - var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(filename) + var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(filename) if(!PRG || !istype(PRG)) return 0 @@ -154,7 +154,7 @@ data["disk_size"] = my_computer.hard_drive.max_capacity data["disk_used"] = my_computer.hard_drive.used_capacity var/list/all_entries[0] - for(var/datum/computer_file/program/P in ntnet_global.available_station_software) + for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_station_software) // Only those programs our user can run will show in the list if(!P.can_run(user) && P.requires_access_to_download || my_computer.hard_drive.find_file_by_name(P.filename)) continue @@ -169,7 +169,7 @@ data["hackedavailable"] = FALSE if(computer_emagged) // If we are running on emagged computer we have access to some "bonus" software var/list/hacked_programs[0] - for(var/datum/computer_file/program/P in ntnet_global.available_antag_software) + for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_antag_software) if(my_computer.hard_drive.find_file_by_name(P.filename)) continue data["hackedavailable"] = TRUE diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index 84f3a7c008..2fb9419961 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -30,7 +30,7 @@ if(..()) return - var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel) + var/datum/ntnet_conversation/channel = GLOB.ntnet_global.get_chat_channel_by_id(active_channel) var/authed = FALSE if(channel && ((channel.operator == src) || netadmin_mode)) authed = TRUE @@ -59,7 +59,7 @@ return TRUE active_channel = new_target - channel = ntnet_global.get_chat_channel_by_id(new_target) + channel = GLOB.ntnet_global.get_chat_channel_by_id(new_target) if(!(src in channel.clients) && !channel.password) channel.add_client(src) return TRUE @@ -85,7 +85,7 @@ channel.remove_client(src) // We shouldn't be in channel's user list, but just in case... return TRUE if(isliving(ui.user) && can_run(ui.user, TRUE, ACCESS_NETWORK)) - for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels) + for(var/datum/ntnet_conversation/chan as anything in GLOB.ntnet_global.chat_channels) chan.remove_client(src) netadmin_mode = TRUE return TRUE @@ -93,7 +93,7 @@ var/newname = sanitize(params["new_name"]) if(!newname) return - for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels) + for(var/datum/ntnet_conversation/chan as anything in GLOB.ntnet_global.chat_channels) if(src in chan.clients) chan.add_status_message("[username] is now known as [newname].") username = newname @@ -148,7 +148,7 @@ /datum/computer_file/program/chatclient/process_tick() ..() - var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel) + var/datum/ntnet_conversation/channel = GLOB.ntnet_global.get_chat_channel_by_id(active_channel) if(program_state != PROGRAM_STATE_KILLED) ui_header = "ntnrc_idle.gif" if(channel) @@ -163,7 +163,7 @@ ui_header = "ntnrc_idle.gif" /datum/computer_file/program/chatclient/kill_program(forced = FALSE) - for(var/datum/ntnet_conversation/channel as anything in ntnet_global.chat_channels) + for(var/datum/ntnet_conversation/channel as anything in GLOB.ntnet_global.chat_channels) channel.remove_client(src) ..() @@ -173,13 +173,13 @@ return data /datum/computer_file/program/chatclient/tgui_data(mob/user) - if(!ntnet_global || !ntnet_global.chat_channels) + if(!GLOB.ntnet_global || !GLOB.ntnet_global.chat_channels) return list() var/list/data = get_header_data() var/list/all_channels = list() - for(var/datum/ntnet_conversation/conv as anything in ntnet_global.chat_channels) + for(var/datum/ntnet_conversation/conv as anything in GLOB.ntnet_global.chat_channels) if(conv && conv.title) all_channels.Add(list(list( "chan" = conv.title, @@ -190,7 +190,7 @@ data["active_channel"] = active_channel data["username"] = username data["adminmode"] = netadmin_mode - var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel) + var/datum/ntnet_conversation/channel = GLOB.ntnet_global.get_chat_channel_by_id(active_channel) if(channel) data["title"] = channel.title var/authed = FALSE diff --git a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm index e847041423..591bf0ec21 100644 --- a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm +++ b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm @@ -1,4 +1,4 @@ -var/global/nttransfer_uid = 0 +GLOBAL_VAR_INIT(nttransfer_uid, 0) /datum/computer_file/program/nttransfer filename = "nttransfer" @@ -27,8 +27,8 @@ var/global/nttransfer_uid = 0 var/upload_menu = FALSE // Whether we show the program list and upload menu /datum/computer_file/program/nttransfer/New() - unique_token = nttransfer_uid - nttransfer_uid++ + unique_token = GLOB.nttransfer_uid + GLOB.nttransfer_uid++ ..() /datum/computer_file/program/nttransfer/process_tick() @@ -109,7 +109,7 @@ var/global/nttransfer_uid = 0 data["servers"] = list() if(!(downloaded_file || provided_file || upload_menu)) var/list/all_servers = list() - for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers) + for(var/datum/computer_file/program/nttransfer/P in GLOB.ntnet_global.fileservers) if(!P.provided_file) continue all_servers.Add(list(list( @@ -127,7 +127,7 @@ var/global/nttransfer_uid = 0 return TRUE switch(action) if("PRG_downloadfile") - for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers) + for(var/datum/computer_file/program/nttransfer/P in GLOB.ntnet_global.fileservers) if(P.unique_token == text2num(params["uid"])) remote = P break @@ -145,8 +145,8 @@ var/global/nttransfer_uid = 0 error = "" upload_menu = 0 finalize_download() - if(src in ntnet_global.fileservers) - ntnet_global.fileservers.Remove(src) + if(src in GLOB.ntnet_global.fileservers) + GLOB.ntnet_global.fileservers.Remove(src) for(var/datum/computer_file/program/nttransfer/T in connected_clients) T.crash_download("Remote server has forcibly closed the connection") provided_file = null @@ -167,7 +167,7 @@ var/global/nttransfer_uid = 0 error = "I/O Error: File locked." return provided_file = F - ntnet_global.fileservers |= src + GLOB.ntnet_global.fileservers |= src return error = "I/O Error: Unable to locate file on hard drive." return TRUE diff --git a/code/modules/modular_computers/file_system/programs/research/email_administration.dm b/code/modules/modular_computers/file_system/programs/research/email_administration.dm index 4132a5cf9e..57f19dba58 100644 --- a/code/modules/modular_computers/file_system/programs/research/email_administration.dm +++ b/code/modules/modular_computers/file_system/programs/research/email_administration.dm @@ -50,7 +50,7 @@ data["messages"] = all_messages var/list/all_accounts = list() - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts) if(!account.can_login) continue all_accounts.Add(list(list( @@ -85,7 +85,7 @@ return TRUE current_account.suspended = !current_account.suspended - ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended by SA [I.registered_name] ([I.assignment]).") + GLOB.ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended by SA [I.registered_name] ([I.assignment]).") error = "Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended." return TRUE @@ -97,7 +97,7 @@ if(!newpass) return TRUE current_account.password = newpass - ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Password for account [current_account.login] has been changed by SA [I.registered_name] ([I.assignment]).") + GLOB.ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Password for account [current_account.login] has been changed by SA [I.registered_name] ([I.assignment]).") return TRUE if("viewmail") @@ -111,7 +111,7 @@ return TRUE if("viewaccount") - for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/email_account in GLOB.ntnet_global.email_accounts) if(email_account.uid == text2num(params["viewaccount"])) current_account = email_account break @@ -126,7 +126,7 @@ return TRUE var/complete_login = "[newlogin]@[newdomain]" - if(ntnet_global.does_email_exist(complete_login)) + if(GLOB.ntnet_global.does_email_exist(complete_login)) error = "Error creating account: An account with same address already exists." return TRUE diff --git a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm index 30aa3b9216..c72cd437f3 100644 --- a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm +++ b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm @@ -13,29 +13,29 @@ category = PROG_ADMIN /datum/computer_file/program/ntnetmonitor/tgui_data(mob/user) - if(!ntnet_global) + if(!GLOB.ntnet_global) return var/list/data = get_header_data() - data["ntnetstatus"] = ntnet_global.check_function() - data["ntnetrelays"] = ntnet_global.relays.len - data["idsstatus"] = ntnet_global.intrusion_detection_enabled - data["idsalarm"] = ntnet_global.intrusion_detection_alarm + data["ntnetstatus"] = GLOB.ntnet_global.check_function() + data["ntnetrelays"] = GLOB.ntnet_global.relays.len + data["idsstatus"] = GLOB.ntnet_global.intrusion_detection_enabled + data["idsalarm"] = GLOB.ntnet_global.intrusion_detection_alarm - data["config_softwaredownload"] = ntnet_global.setting_softwaredownload - data["config_peertopeer"] = ntnet_global.setting_peertopeer - data["config_communication"] = ntnet_global.setting_communication - data["config_systemcontrol"] = ntnet_global.setting_systemcontrol + data["config_softwaredownload"] = GLOB.ntnet_global.setting_softwaredownload + data["config_peertopeer"] = GLOB.ntnet_global.setting_peertopeer + data["config_communication"] = GLOB.ntnet_global.setting_communication + data["config_systemcontrol"] = GLOB.ntnet_global.setting_systemcontrol data["ntnetlogs"] = list() data["minlogs"] = MIN_NTNET_LOGS data["maxlogs"] = MAX_NTNET_LOGS - data["banned_nids"] = list(ntnet_global.banned_nids) + data["banned_nids"] = list(GLOB.ntnet_global.banned_nids) - for(var/i in ntnet_global.logs) + for(var/i in GLOB.ntnet_global.logs) data["ntnetlogs"] += list(list("entry" = i)) - data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount + data["ntnetmaxlogs"] = GLOB.ntnet_global.setting_maxlogcount return data @@ -44,51 +44,51 @@ return switch(action) if("resetIDS") - if(ntnet_global) - ntnet_global.resetIDS() + if(GLOB.ntnet_global) + GLOB.ntnet_global.resetIDS() return TRUE if("toggleIDS") - if(ntnet_global) - ntnet_global.toggleIDS() + if(GLOB.ntnet_global) + GLOB.ntnet_global.toggleIDS() return TRUE if("toggleWireless") - if(!ntnet_global) + if(!GLOB.ntnet_global) return // NTNet is disabled. Enabling can be done without user prompt - if(ntnet_global.setting_disabled) - ntnet_global.setting_disabled = FALSE + if(GLOB.ntnet_global.setting_disabled) + GLOB.ntnet_global.setting_disabled = FALSE return TRUE var/response = tgui_alert(ui.user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No")) if(response == "Yes" && tgui_status(ui.user, state) == STATUS_INTERACTIVE) - ntnet_global.setting_disabled = TRUE + GLOB.ntnet_global.setting_disabled = TRUE return TRUE if("purgelogs") - if(ntnet_global) - ntnet_global.purge_logs() + if(GLOB.ntnet_global) + GLOB.ntnet_global.purge_logs() return TRUE if("updatemaxlogs") var/logcount = params["new_number"] - if(ntnet_global) - ntnet_global.update_max_log_count(logcount) + if(GLOB.ntnet_global) + GLOB.ntnet_global.update_max_log_count(logcount) return TRUE if("toggle_function") - if(!ntnet_global) + if(!GLOB.ntnet_global) return - ntnet_global.toggle_function(text2num(params["id"])) + GLOB.ntnet_global.toggle_function(text2num(params["id"])) return TRUE if("ban_nid") - if(!ntnet_global) + if(!GLOB.ntnet_global) return var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to block from the network:", "Enter NID") if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE) - ntnet_global.banned_nids |= nid + GLOB.ntnet_global.banned_nids |= nid return TRUE if("unban_nid") - if(!ntnet_global) + if(!GLOB.ntnet_global) return var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to unblock from the network:", "Enter NID") if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE) - ntnet_global.banned_nids -= nid + GLOB.ntnet_global.banned_nids -= nid return TRUE diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index f1f2e942e4..27ccbdff39 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -63,7 +63,7 @@ var/global/ntnet_card_uid = 1 if(!enabled) return 0 - if(!check_functionality() || !ntnet_global || is_banned()) + if(!check_functionality() || !GLOB.ntnet_global || is_banned()) return 0 return 2 @@ -88,7 +88,7 @@ var/global/ntnet_card_uid = 1 return "[identification_string] (NID [identification_id])" /obj/item/computer_hardware/network_card/proc/is_banned() - return ntnet_global.check_banned(identification_id) + return GLOB.ntnet_global.check_banned(identification_id) // 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection /obj/item/computer_hardware/network_card/proc/get_signal(var/specific_action = 0) @@ -98,13 +98,13 @@ var/global/ntnet_card_uid = 1 if(!enabled) return 0 - if(!check_functionality() || !ntnet_global || is_banned()) + if(!check_functionality() || !GLOB.ntnet_global || is_banned()) return 0 if(ethernet) // Computer is connected via wired connection. return 3 - if(!ntnet_global.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal. + if(!GLOB.ntnet_global.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal. return 0 if(holder2) @@ -114,7 +114,7 @@ var/global/ntnet_card_uid = 1 var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)// VOREStation Edit - , om_range = DEFAULT_OVERMAP_RANGE) var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range var/best = 0 - for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays) + for(var/obj/machinery/ntnet_relay/R as anything in GLOB.ntnet_global.relays) //Relay is down if(!R.operable()) continue diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm deleted file mode 100644 index 9e688d5048..0000000000 --- a/code/modules/nano/interaction/default.dm +++ /dev/null @@ -1,91 +0,0 @@ -/var/global/datum/topic_state/default/default_state = new() - -/datum/topic_state/default/href_list(var/mob/user) - return list() - -/datum/topic_state/default/can_use_topic(var/src_object, var/mob/user) - return user.default_can_use_topic(src_object) - -/mob/proc/default_can_use_topic(var/src_object) - return STATUS_CLOSE // By default no mob can do anything with NanoUI - -/mob/observer/dead/default_can_use_topic(var/src_object) - if(can_admin_interact()) - return STATUS_INTERACTIVE // Admins are more equal - if(!client || get_dist(src_object, src) > client.view) // Preventing ghosts from having a million windows open by limiting to objects in range - return STATUS_CLOSE - return STATUS_UPDATE // Ghosts can view updates - -/mob/living/silicon/pai/default_can_use_topic(var/src_object) - if((src_object == src || src_object == radio || src_object == communicator) && !stat) - return STATUS_INTERACTIVE - else - return ..() - -/mob/living/silicon/robot/default_can_use_topic(var/src_object) - . = shared_nano_interaction() - if(. <= STATUS_DISABLED) - return - - // robots can interact with things they can see within their view range - if((src_object in view(src)) && get_dist(src_object, src) <= src.client.view) - return STATUS_INTERACTIVE // interactive (green visibility) - return STATUS_DISABLED // no updates, completely disabled (red visibility) - -/mob/living/silicon/ai/default_can_use_topic(var/src_object) - . = shared_nano_interaction() - if(. != STATUS_INTERACTIVE) - return - - // Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras) - // unless it's on the same level as the object it's interacting with. - var/turf/T = get_turf(src_object) - if(!T || !(z == T.z || (T.z in using_map.player_levels))) - return STATUS_CLOSE - - // If an object is in view then we can interact with it - if(src_object in view(client.view, src)) - return STATUS_INTERACTIVE - - // If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view - if(is_in_chassis()) - //stop AIs from leaving windows open and using then after they lose vision - if(cameranet && !cameranet.checkTurfVis(get_turf(src_object))) - return STATUS_CLOSE - return STATUS_INTERACTIVE - else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard - return STATUS_INTERACTIVE - - return STATUS_CLOSE - -//Some atoms such as vehicles might have special rules for how mobs inside them interact with NanoUI. -/atom/proc/contents_nano_distance(var/src_object, var/mob/living/user) - return user.shared_living_nano_distance(src_object) - -/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object) - if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates - return STATUS_CLOSE - - var/dist = get_dist(src_object, src) - if (dist <= 1) - return STATUS_INTERACTIVE // interactive (green visibility) - else if (dist <= 2) - return STATUS_UPDATE // update only (orange visibility) - else if (dist <= 4) - return STATUS_DISABLED // no updates, completely disabled (red visibility) - return STATUS_CLOSE - -/mob/living/default_can_use_topic(var/src_object) - . = shared_nano_interaction(src_object) - if(. != STATUS_CLOSE) - if(loc) - . = min(., loc.contents_nano_distance(src_object, src)) - if(. == STATUS_INTERACTIVE) - return STATUS_UPDATE - -/mob/living/carbon/human/default_can_use_topic(var/src_object) - . = shared_nano_interaction(src_object) - if(. != STATUS_CLOSE) - . = min(., shared_living_nano_distance(src_object)) - if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction. - return STATUS_INTERACTIVE diff --git a/code/modules/nano/nanoexternal.dm b/code/modules/nano/nanoexternal.dm deleted file mode 100644 index 88576d94ca..0000000000 --- a/code/modules/nano/nanoexternal.dm +++ /dev/null @@ -1,44 +0,0 @@ -// This file contains all Nano procs/definitions for external classes/objects - -/** - * Called when a Nano UI window is closed - * This is how Nano handles closed windows - * It must be a verb so that it can be called using winset - * - * @return nothing - */ -/client/verb/nanoclose(var/uiref as text) - set hidden = 1 // hide this verb from the user's panel - set name = "nanoclose" - - var/datum/nanoui/ui = locate(uiref) - - if (istype(ui)) - ui.close() - - if(ui.ref) - var/href = "close=1" - src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's Topic() proc via client.Topic() - else if (ui.on_close_logic) - // no atomref specified (or not found) - // so just reset the user mob's machine var - if(src && src.mob) - src.mob.unset_machine() - -/** - * The ui_interact proc is used to open and update Nano UIs - * If ui_interact is not used then the UI will not update correctly - * ui_interact is currently defined for /atom/movable - * - * @param user /mob The mob who is interacting with this ui - * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") - * @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui - * @param force_open boolean Force the UI to (re)open, even if it's already open - * - * @return nothing - */ -/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, master_ui = null, var/datum/topic_state/state = default_state) - return - -// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob -/mob/var/list/open_uis = list() diff --git a/code/modules/news/news_init.dm b/code/modules/news/news_init.dm index 6a13a788f7..cae3cfdb01 100644 --- a/code/modules/news/news_init.dm +++ b/code/modules/news/news_init.dm @@ -12,7 +12,7 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new) /datum/lore/news/New() ..() spawn(50) //Give it a second or it gets fucky. - for(var/datum/feed_channel/F in news_network.network_channels) + for(var/datum/feed_channel/F in GLOB.news_network.network_channels) if(F.channel_name == "Vir News Network") station_newspaper = F break @@ -24,7 +24,7 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new) newsindex = news_codex.newsindex /datum/lore/news/proc/fill_codex_news() - if(!news_network) + if(!GLOB.news_network) log_runtime("Load: Could not find newscaster network.") return @@ -34,6 +34,6 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new) //Feed the Lore Codex into the News Machine for(var/datum/lore/codex/child in news_codex.children) - news_network.SubmitArticle("[child.data]", "Oculum", "Vir News Network", null, 1, "", "[child.name]") + GLOB.news_network.SubmitArticle("[child.data]", "Oculum", "Vir News Network", null, 1, "", "[child.name]") return 1 diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm index 22426ba9ed..11cd2d179f 100644 --- a/code/modules/pda/core_apps.dm +++ b/code/modules/pda/core_apps.dm @@ -248,7 +248,7 @@ /datum/data/pda/app/news/proc/compile_news() var/list/feeds = list() - for(var/datum/feed_channel/channel in news_network.network_channels) + for(var/datum/feed_channel/channel in GLOB.news_network.network_channels) var/list/messages = list() if(!channel.censored) var/index = 0 @@ -280,7 +280,7 @@ var/list/news = list() // Compile all the newscasts - for(var/datum/feed_channel/channel in news_network.network_channels) + for(var/datum/feed_channel/channel in GLOB.news_network.network_channels) if(!channel.censored) var/index = 0 for(var/datum/feed_message/FM in channel.messages) diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index f3669c5483..81df5c6e9c 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -148,12 +148,11 @@ // check if telecomms I/O route 1459 is stable //var/telecomms_intact = telecomms_process(P.owner, owner, t) var/obj/machinery/message_server/useMS = null - if(message_servers) - for(var/obj/machinery/message_server/MS as anything in message_servers) - //PDAs are now dependent on the Message Server. - if(MS.active) - useMS = MS - break + for(var/obj/machinery/message_server/MS as anything in GLOB.message_servers) + //PDAs are now dependent on the Message Server. + if(MS.active) + useMS = MS + break var/datum/signal/signal = pda.telecomms_process() diff --git a/code/modules/power/privacy_switch.dm b/code/modules/power/privacy_switch.dm index 0cfab0e137..3120d5d930 100644 --- a/code/modules/power/privacy_switch.dm +++ b/code/modules/power/privacy_switch.dm @@ -29,13 +29,13 @@ if(A.flag_check(AREA_BLOCK_GHOST_SIGHT)) A.flags ^= AREA_BLOCK_GHOST_SIGHT icon_state = "privacy0" - ghostnet.removeArea(A) + GLOB.ghostnet.removeArea(A) to_chat(user, span_notice("The area is no longer protected from ghost vison.")) log_and_message_admins("toggled ghost vision in [A] on.", user) else A.flags ^= AREA_BLOCK_GHOST_SIGHT icon_state = "privacy1" - ghostnet.addArea(A) + GLOB.ghostnet.addArea(A) to_chat(user, span_notice("The area is now protected from ghost vison.")) log_and_message_admins("toggled ghost vision in [A] off.", user) nextUse = world.time + 5 MINUTES diff --git a/code/modules/random_map/drop/drop_types.dm b/code/modules/random_map/drop/drop_types.dm index c0e4aa7a83..ae3d010ff0 100644 --- a/code/modules/random_map/drop/drop_types.dm +++ b/code/modules/random_map/drop/drop_types.dm @@ -1,9 +1,3 @@ -/proc/supply_drop_random_loot_types() - if(!supply_drop) - supply_drop = init_subtypes(/datum/supply_drop_loot) - supply_drop = dd_sortedObjectList(supply_drop) - return supply_drop - /datum/supply_drop_loot var/name = "" var/container = null diff --git a/code/modules/random_map/drop/supply.dm b/code/modules/random_map/drop/supply.dm index 6e6e4cda98..6402dc039c 100644 --- a/code/modules/random_map/drop/supply.dm +++ b/code/modules/random_map/drop/supply.dm @@ -11,7 +11,7 @@ // supplied_drop_types is a list of types to spawn in the pod. /datum/random_map/droppod/supply/get_spawned_drop(var/turf/T) - if(!drop_type) drop_type = pick(supply_drop_random_loot_types()) + if(!drop_type) drop_type = pick(GLOB.supply_drop) if(drop_type == "custom") if(supplied_drop_types.len) @@ -23,7 +23,7 @@ C.contents |= A return else - drop_type = pick(supply_drop_random_loot_types()) + drop_type = pick(GLOB.supply_drop) if(istype(drop_type, /datum/supply_drop_loot)) var/datum/supply_drop_loot/SDL = drop_type @@ -81,7 +81,7 @@ ADMIN_VERB(call_supply_drop, R_FUN, "Call Supply Drop", "Call an immediate suppl if(!choice) return if(choice == "Yes") - chosen_loot_type = tgui_input_list(user, "Select a loot type.", "Loot Selection", supply_drop_random_loot_types()) + chosen_loot_type = tgui_input_list(usr, "Select a loot type.", "Loot Selection", GLOB.supply_drop) choice = tgui_alert(user, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes")) if(choice != "Yes") diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index c46a83f467..3850f75ee5 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -70,12 +70,12 @@ /obj/machinery/message_server/Initialize(mapload) . = ..() - message_servers += src + GLOB.message_servers += src decryptkey = GenerateKey() send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.") /obj/machinery/message_server/Destroy() - message_servers -= src + GLOB.message_servers -= src return ..() /obj/machinery/message_server/examine(mob/user, distance, infix, suffix) diff --git a/code/modules/tgui/modules/alarm.dm b/code/modules/tgui/modules/alarm.dm index 6ed400d5b9..0a78fdc423 100644 --- a/code/modules/tgui/modules/alarm.dm +++ b/code/modules/tgui/modules/alarm.dm @@ -107,7 +107,7 @@ switch(action) if("switchTo") - var/obj/machinery/camera/C = locate(params["camera"]) in cameranet.cameras + var/obj/machinery/camera/C = locate(params["camera"]) in GLOB.cameranet.cameras if(!C) return diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm index fa78a8fad8..1d4476f824 100644 --- a/code/modules/tgui/modules/camera.dm +++ b/code/modules/tgui/modules/camera.dm @@ -257,7 +257,7 @@ all_networks += additional_networks var/list/D = list() - for(var/obj/machinery/camera/C in cameranet.cameras) + for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) if(!C.network) stack_trace("Camera in a cameranet has no camera network") continue diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index 856814b46f..1ffbcea1d4 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -137,7 +137,7 @@ var/datum/comm_message_listener/l = obtain_message_listener() data["messages"] = l.messages - data["message_deletion_allowed"] = l != global_message_listener + data["message_deletion_allowed"] = l != GLOB.global_message_listener data["message_current_id"] = current_viewing_message_id data["message_current"] = current_viewing_message @@ -172,7 +172,7 @@ if(istype(host, /datum/computer_file/program/comm)) var/datum/computer_file/program/comm/P = host return P.message_core - return global_message_listener + return GLOB.global_message_listener /proc/post_status(atom/source, command, data1, data2, mob/user = null) var/datum/radio_frequency/frequency = SSradio.return_frequency(1435) @@ -302,7 +302,7 @@ var/response = tgui_alert(ui.user, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No")) if(response == "Yes") if(current_viewing_message) - if(l != global_message_listener) + if(l != GLOB.global_message_listener) l.Remove(current_viewing_message) current_viewing_message = null setMenuState(ui.user, COMM_SCREEN_MESSAGES) diff --git a/code/modules/tgui/modules/ntos-only/email.dm b/code/modules/tgui/modules/ntos-only/email.dm index f44fc91d29..41255235df 100644 --- a/code/modules/tgui/modules/ntos-only/email.dm +++ b/code/modules/tgui/modules/ntos-only/email.dm @@ -25,7 +25,7 @@ var/datum/computer_file/data/email_message/current_message = null /datum/tgui_module/email_client/proc/log_in() - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts) if(!account.can_login) continue if(account.login == stored_login) @@ -128,7 +128,7 @@ data["current_account"] = current_account.login if(addressbook) var/list/all_accounts = list() - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts) if(!account.can_login) continue all_accounts.Add(list(list( diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm index 4fe65182c7..2e11829e5f 100644 --- a/code/modules/tgui/modules/ntos-only/uav.dm +++ b/code/modules/tgui/modules/ntos-only/uav.dm @@ -138,7 +138,7 @@ var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range var/their_signal = 0 // Measure z-distance between the AM passed in and the nearest relay - for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays) + for(var/obj/machinery/ntnet_relay/R as anything in GLOB.ntnet_global.relays) if(!R.operable()) continue if(R.z == their_z) diff --git a/code/modules/tgui/states/default.dm b/code/modules/tgui/states/default.dm index cb46286f87..7010735609 100644 --- a/code/modules/tgui/states/default.dm +++ b/code/modules/tgui/states/default.dm @@ -58,7 +58,7 @@ GLOBAL_DATUM_INIT(tgui_default_state, /datum/tgui_state/default, new) // If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view if(is_in_chassis()) //stop AIs from leaving windows open and using then after they lose vision - if(cameranet && !cameranet.checkTurfVis(get_turf(src_object))) + if(GLOB.cameranet && !GLOB.cameranet.checkTurfVis(get_turf(src_object))) return STATUS_CLOSE return STATUS_INTERACTIVE else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard diff --git a/maps/expedition_vr/space/_debrisfield.dm b/maps/expedition_vr/space/_debrisfield.dm index e61e125305..d16a00a575 100644 --- a/maps/expedition_vr/space/_debrisfield.dm +++ b/maps/expedition_vr/space/_debrisfield.dm @@ -102,7 +102,7 @@ /area/submap/debrisfield/phoron_tanker/Initialize(mapload) . = ..() - var/datum/lore/organization/O = loremaster.organizations[/datum/lore/organization/tsc/nanotrasen] + var/datum/lore/organization/O = GLOB.loremaster.organizations[/datum/lore/organization/tsc/nanotrasen] ic_name = pick(O.ship_names) name = "NTV [ic_name]" if(!tag) @@ -165,7 +165,7 @@ /obj/effect/overmap/visitable/ship/landable/luxury_boat/Initialize(mapload) . = ..() - var/datum/lore/organization/O = loremaster.organizations[/datum/lore/organization/gov/elysia] + var/datum/lore/organization/O = GLOB.loremaster.organizations[/datum/lore/organization/gov/elysia] var/newname = "ECS-T [pick(O.ship_names)]" name = newname scanner_desc = {"\[i\]Registration\[/i\]: [newname] @@ -256,7 +256,7 @@ /obj/effect/overmap/visitable/ship/landable/tinycarrier/Initialize(mapload) . = ..() - var/datum/lore/organization/O = loremaster.organizations[/datum/lore/organization/other/sysdef] + var/datum/lore/organization/O = GLOB.loremaster.organizations[/datum/lore/organization/other/sysdef] var/newname = "SDV [pick(O.ship_names)]" name = newname scanner_desc = {"\[i\]Registration\[/i\]: [newname] diff --git a/maps/submaps/admin_use_vr/event_autonomous_drone.dm b/maps/submaps/admin_use_vr/event_autonomous_drone.dm index 51b572b2bf..3d028c5c16 100644 --- a/maps/submaps/admin_use_vr/event_autonomous_drone.dm +++ b/maps/submaps/admin_use_vr/event_autonomous_drone.dm @@ -42,7 +42,7 @@ /obj/effect/overmap/visitable/ship/landable/event_autonomous_drone/Initialize(mapload) . = ..() - var/datum/lore/organization/O = loremaster.organizations[/datum/lore/organization/tsc/nanotrasen] + var/datum/lore/organization/O = GLOB.loremaster.organizations[/datum/lore/organization/tsc/nanotrasen] var/newname = "NTV [pick(O.ship_names)]" name = newname scanner_desc = {"\[i\]Registration\[/i\]: [newname] diff --git a/vorestation.dme b/vorestation.dme index 3f5fadd947..f1f9a3f3a6 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2233,7 +2233,6 @@ #include "code\modules\admin\verbs\smite.dm" #include "code\modules\admin\verbs\special_verbs.dm" #include "code\modules\admin\verbs\striketeam.dm" -#include "code\modules\admin\verbs\tgui_verbs.dm" #include "code\modules\admin\verbs\trader.dm" #include "code\modules\admin\verbs\tripAI.dm" #include "code\modules\admin\verbs\SDQL2\SDQL_2.dm"