diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index b9f9639504..0bea402d97 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -77,13 +77,13 @@ ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various per options[strtype] = S //Goon PS stuff, and other yet-to-be-subsystem things. - options["LEGACY: master_controller"] = master_controller - options["LEGACY: job_master"] = job_master + options["LEGACY: master_controller"] = GLOB.master_controller + options["LEGACY: job_master"] = GLOB.job_master options["LEGACY: SSradio"] = SSradio options["LEGACY: emergency_shuttle"] = emergency_shuttle options["LEGACY: paiController"] = paiController options["LEGACY: cameranet"] = cameranet - options["LEGACY: transfer_controller"] = transfer_controller + options["LEGACY: transfer_controller"] = GLOB.transfer_controller var/pick = tgui_input_list(user, "Choose a controller to debug/view variables of.", "VV controller:", options) if(!pick) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index a8e3702738..ce642c5cde 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -1,4 +1,4 @@ -var/datum/controller/transfer_controller/transfer_controller +GLOBAL_DATUM(transfer_controller, /datum/controller/transfer_controller) /datum/controller/transfer_controller var/timerbuffer = 0 //buffer for time check diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 6fcf3e8596..9478652cc0 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -5,26 +5,23 @@ // // TODO - This will be completely replaced by master.dm in time. // - -var/global/datum/controller/game_controller/master_controller //Set in world.New() - -var/global/last_tick_duration = 0 +GLOBAL_DATUM(master_controller, /datum/controller/game_controller) //Set in world.New() /datum/controller/game_controller var/list/shuttle_list // For debugging and VV /datum/controller/game_controller/New() //There can be only one master_controller. Out with the old and in with the new. - if(master_controller != src) + if(GLOB.master_controller != src) log_world("Rebuilding Master Controller") - if(istype(master_controller)) - qdel(master_controller) - master_controller = src + if(istype(GLOB.master_controller)) + qdel(GLOB.master_controller) + GLOB.master_controller = src - if(!job_master) - job_master = new /datum/controller/occupations() - job_master.SetupOccupations() - job_master.LoadJobs("config/jobs.txt") + if(!GLOB.job_master) + GLOB.job_master = new /datum/controller/occupations() + GLOB.job_master.SetupOccupations() + GLOB.job_master.LoadJobs("config/jobs.txt") admin_notice(span_danger("Job setup complete"), R_DEBUG) if(!GLOB.syndicate_code_phrase) @@ -39,7 +36,7 @@ var/global/last_tick_duration = 0 // setupgenetics() Moved to SSatoms // SetupXenoarch() - Moved to SSxenoarch - transfer_controller = new + GLOB.transfer_controller = new admin_notice(span_danger("Initializations complete."), R_DEBUG) // #if UNIT_TESTS diff --git a/code/controllers/subsystems/persist_vr.dm b/code/controllers/subsystems/persist_vr.dm index 10a5a62059..ac2cfcb65e 100644 --- a/code/controllers/subsystems/persist_vr.dm +++ b/code/controllers/subsystems/persist_vr.dm @@ -109,10 +109,10 @@ SUBSYSTEM_DEF(persist) if(R) // We found someone with a record. var/recorded_rank = R.fields["real_rank"] if(recorded_rank) - . = job_master.GetJob(recorded_rank) + . = GLOB.job_master.GetJob(recorded_rank) if(.) return // They have a custom title, aren't crew, or someone deleted their record, so we need a fallback method. // Let's check the mind. if(M.mind && M.mind.assigned_role) - . = job_master.GetJob(M.mind.assigned_role) + . = GLOB.job_master.GetJob(M.mind.assigned_role) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 8af232ee44..288d754571 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -321,16 +321,16 @@ SUBSYSTEM_DEF(ticker) to_chat(world, span_boldannounce("Serious error in mode setup! Reverting to pregame lobby.")) //Uses setup instead of set up due to computational context. return 0 - job_master.ResetOccupations() + GLOB.job_master.ResetOccupations() src.mode.create_antagonists() src.mode.pre_setup() - job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly. + GLOB.job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly. if(!src.mode.can_start()) to_chat(world, span_filter_system(span_bold("Unable to start [mode.name].") + " Not enough players readied, [CONFIG_GET(keyed_list/player_requirements)[mode.config_tag]] players needed. Reverting to pregame lobby.")) mode.fail_setup() mode = null - job_master.ResetOccupations() + GLOB.job_master.ResetOccupations() return 0 if(hide_mode) @@ -376,7 +376,7 @@ SUBSYSTEM_DEF(ticker) // Ask their new_player mob to spawn them if(!player.spawn_checks_vr(player.mind.assigned_role)) - var/datum/job/job_datum = job_master.GetJob(J.title) + var/datum/job/job_datum = GLOB.job_master.GetJob(J.title) job_datum.current_positions-- player.mind.assigned_role = null continue //VOREStation Add @@ -413,7 +413,7 @@ SUBSYSTEM_DEF(ticker) if(player.mind.assigned_role == JOB_SITE_MANAGER) captainless=0 if(!player_is_antag(player.mind, only_offstation_roles = 1)) - job_master.EquipRank(player, player.mind.assigned_role, 0) + GLOB.job_master.EquipRank(player, player.mind.assigned_role, 0) UpdateFactionList(player) //equip_custom_items(player) //VOREStation Removal //player.apply_traits() //VOREStation Removal diff --git a/code/datums/components/antags/changeling/changeling.dm b/code/datums/components/antags/changeling/changeling.dm index 89c9fb27c3..e13a2028a5 100644 --- a/code/datums/components/antags/changeling/changeling.dm +++ b/code/datums/components/antags/changeling/changeling.dm @@ -1,9 +1,11 @@ ///Changeling component. ///Stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind) GLOBAL_LIST_INIT(possible_changeling_IDs,list("Alpha","Beta","Chi","Delta","Epsilon","Eta","Gamma","Iota","Kappa","Lambda","Mu","Nu","Omega","Omicron","Phi","Pi","Psi","Rho","Sigma","Tau","Theta","Upsilon","Xi","Zeta")) //ALPHABETICAL ORDER. + //Needs cleanup -var/list/powers = subtypesof(/datum/power/changeling) //needed for the badmin verb for now -var/list/datum/power/changeling/powerinstances = list() +GLOBAL_LIST_INIT(changeling_powers, subtypesof(/datum/power/changeling)) //needed for the badmin verb for now +GLOBAL_LIST_EMPTY_TYPED(powerinstances, /datum/power/changeling) + /datum/power //Could be used by other antags too var/name = "Power" var/desc = "Placeholder" @@ -159,12 +161,12 @@ var/list/datum/power/changeling/powerinstances = list() mind.antag_holder.changeling = comp var/lesser_form = !ishuman(src) - if(!powerinstances.len) - for(var/P in powers) - powerinstances += new P() + if(!GLOB.powerinstances.len) + for(var/P in GLOB.changeling_powers) + GLOB.powerinstances += new P() // Code to auto-purchase free powers. - for(var/datum/power/changeling/P in powerinstances) + for(var/datum/power/changeling/P in GLOB.powerinstances) if(!P.genomecost) // Is it free? if(!(P in comp.purchased_powers)) // Do we not have it already? comp.purchasePower(comp.owner, P.name, 0)// Purchase it. Don't remake our verbs, we're doing it after this. @@ -363,9 +365,9 @@ var/list/datum/power/changeling/powerinstances = list() if(!comp) to_chat(src, "You are not a changeling!") return - if(!powerinstances.len) - for(var/changeling_power in powers) - powerinstances += new changeling_power() + if(!GLOB.powerinstances.len) + for(var/changeling_power in GLOB.changeling_powers) + GLOB.powerinstances += new changeling_power() if(!comp.power_panel) comp.power_panel = new() comp.power_panel.comp = comp @@ -377,7 +379,7 @@ var/list/datum/power/changeling/powerinstances = list() var/datum/power/changeling/Thepower = Pname - for (var/datum/power/changeling/P in powerinstances) + for (var/datum/power/changeling/P in GLOB.powerinstances) //to_world("[P] - [Pname] = [P.name == Pname ? "True" : "False"]") if(P.name == Pname) Thepower = P @@ -471,7 +473,7 @@ var/list/datum/power/changeling/powerinstances = list() var/list/data = list() var/list/power_list = list() - for(var/datum/power/changeling/P in powerinstances) + for(var/datum/power/changeling/P in GLOB.powerinstances) var/list/all_powers = list( "power_name" = P.name, "power_cost" = P.genomecost, diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 6d11727d79..2ba017ce37 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -483,7 +483,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) hidden_general += G else general += G - job_master.update_limit(JOB_ANOMALY, general.len) //CHOMPAdd + GLOB.job_master.update_limit(JOB_ANOMALY, general.len) //CHOMPAdd return G diff --git a/code/datums/outfits/jobs/job.dm b/code/datums/outfits/jobs/job.dm index 3e78803e4a..96695519e5 100644 --- a/code/datums/outfits/jobs/job.dm +++ b/code/datums/outfits/jobs/job.dm @@ -20,7 +20,7 @@ var/obj/item/card/id/C = ..() if(!C) return - var/datum/job/J = job_master.GetJob(rank) + var/datum/job/J = GLOB.job_master.GetJob(rank) if(J) C.access = J.get_access() if(H.mind) diff --git a/code/datums/repositories/ammomaterial.dm b/code/datums/repositories/ammomaterial.dm index 0e6e8013ef..dd8947a18b 100644 --- a/code/datums/repositories/ammomaterial.dm +++ b/code/datums/repositories/ammomaterial.dm @@ -1,4 +1,4 @@ -var/global/datum/repository/ammomaterial/ammo_repository = new() +GLOBAL_DATUM_INIT(ammo_repository, /datum/repository/ammomaterial, new) /datum/repository/ammomaterial var/list/ammotypes diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index b0649672dd..0b8b27afc0 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -1,9 +1,9 @@ -var/datum/antagonist/cultist/cult +GLOBAL_DATUM(cult, /datum/antagonist/cultist) /proc/iscultist(var/mob/player) - if(!cult || !player.mind) + if(!GLOB.cult || !player.mind) return 0 - if(player.mind in cult.current_antagonists) + if(player.mind in GLOB.cult.current_antagonists) return 1 /datum/antagonist/cultist @@ -40,7 +40,7 @@ var/datum/antagonist/cultist/cult /datum/antagonist/cultist/New() ..() - cult = src + GLOB.cult = src /datum/antagonist/cultist/create_global_objectives() diff --git a/code/game/antagonist/station/event.dm b/code/game/antagonist/station/event.dm index 617baabd67..25b5e48bff 100644 --- a/code/game/antagonist/station/event.dm +++ b/code/game/antagonist/station/event.dm @@ -1,4 +1,4 @@ -var/datum/antagonist/event/event +GLOBAL_DATUM(event, /datum/antagonist/event) // Inherits most of its vars from the base datum. /datum/antagonist/event @@ -13,3 +13,7 @@ var/datum/antagonist/event/event antag_text = "You are have been selected as an event character, this gives you \ access to the AOOC chat channel to organise with other event characters. Please remember all \ rules aside from those with explicit exceptions apply to event characters." + +/datum/antagonist/event/New() + ..() + GLOB.event = src diff --git a/code/game/antagonist/station/infiltrator.dm b/code/game/antagonist/station/infiltrator.dm index 472b0737bf..6d1c87f5a8 100644 --- a/code/game/antagonist/station/infiltrator.dm +++ b/code/game/antagonist/station/infiltrator.dm @@ -1,6 +1,5 @@ // Infiltrator is a variant of Traitor, except that the traitors are in a team and can communicate with a special headset. - -var/datum/antagonist/traitor/infiltrator/infiltrators +GLOBAL_DATUM(infiltrators, /datum/antagonist/traitor/infiltrator) // Inherits most of its vars from the base datum. /datum/antagonist/traitor/infiltrator @@ -17,7 +16,7 @@ var/datum/antagonist/traitor/infiltrator/infiltrators /datum/antagonist/traitor/infiltrator/New() ..() - infiltrators = src + GLOB.infiltrators = src /datum/antagonist/traitor/infiltrator/equip(var/mob/living/carbon/human/traitor_mob) ..() // Give the uplink and other stuff. diff --git a/code/game/antagonist/station/renegade.dm b/code/game/antagonist/station/renegade.dm index 83f13e83ae..e99d596a2a 100644 --- a/code/game/antagonist/station/renegade.dm +++ b/code/game/antagonist/station/renegade.dm @@ -1,4 +1,4 @@ -var/datum/antagonist/renegade/renegades +GLOBAL_DATUM(renegades, /datum/antagonist/renegade) /datum/antagonist/renegade id = MODE_RENEGADE @@ -64,7 +64,7 @@ var/datum/antagonist/renegade/renegades /datum/antagonist/renegade/New() ..() - renegades = src + GLOB.renegades = src /datum/antagonist/renegade/create_objectives(var/datum/mind/player) @@ -103,4 +103,4 @@ var/datum/antagonist/renegade/renegades for(var/mob/living/carbon/human/H in GLOB.player_list) if(H.stat == 2 || !(H.client)) continue if(is_special_character(H)) continue - renegades.add_antagonist(H.mind) + GLOB.renegades.add_antagonist(H.mind) diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index 5632c4c3a1..f7fce5da68 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -1,4 +1,4 @@ -var/datum/antagonist/rogue_ai/malf +GLOBAL_DATUM(malf, /datum/antagonist/rogue_ai) /datum/antagonist/rogue_ai id = MODE_MALFUNCTION @@ -20,7 +20,7 @@ var/datum/antagonist/rogue_ai/malf /datum/antagonist/rogue_ai/New() ..() - malf = src + GLOB.malf = src /datum/antagonist/rogue_ai/get_candidates() diff --git a/code/game/antagonist/station/stowaway.dm b/code/game/antagonist/station/stowaway.dm index 574fda0bca..d2de14d41b 100644 --- a/code/game/antagonist/station/stowaway.dm +++ b/code/game/antagonist/station/stowaway.dm @@ -1,6 +1,6 @@ -var/datum/antagonist/stowaway/stowaways +GLOBAL_DATUM(stowaways, /datum/antagonist/stowaway) -/datum/antagonist/STOWAWAY +/datum/antagonist/stowaway id = MODE_STOWAWAY role_type = BE_RENEGADE role_text = "Stowaway" @@ -16,3 +16,7 @@ var/datum/antagonist/stowaway/stowaways rules aside from those with explicit exceptions apply to antagonists." flags = ANTAG_SUSPICIOUS | ANTAG_IMPLANT_IMMUNE | ANTAG_RANDSPAWN | ANTAG_VOTABLE can_speak_aooc = FALSE + +/datum/antagonist/stowaway/New() + ..() + GLOB.stowaways = src diff --git a/code/game/antagonist/station/thug.dm b/code/game/antagonist/station/thug.dm index f26d6441a8..876478406d 100644 --- a/code/game/antagonist/station/thug.dm +++ b/code/game/antagonist/station/thug.dm @@ -1,6 +1,6 @@ -var/datum/antagonist/thug/thugs +GLOBAL_DATUM(thugs, /datum/antagonist/thug) -/datum/antagonist/THUG +/datum/antagonist/thug id = MODE_THUG role_type = BE_RENEGADE role_text = "Thug" @@ -16,3 +16,7 @@ var/datum/antagonist/thug/thugs rules aside from those with explicit exceptions apply to antagonists." flags = ANTAG_SUSPICIOUS | ANTAG_IMPLANT_IMMUNE | ANTAG_RANDSPAWN | ANTAG_VOTABLE can_speak_aooc = FALSE + +/datum/antagonist/thug/New() + ..() + GLOB.thugs = src diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm index f05e232192..38e8cd3580 100644 --- a/code/game/antagonist/station/traitor.dm +++ b/code/game/antagonist/station/traitor.dm @@ -1,4 +1,4 @@ -var/datum/antagonist/traitor/traitors +GLOBAL_DATUM(traitors, /datum/antagonist/traitor) // Inherits most of its vars from the base datum. /datum/antagonist/traitor @@ -16,7 +16,7 @@ var/datum/antagonist/traitor/traitors /datum/antagonist/traitor/New() ..() - traitors = src + GLOB.traitors = src /datum/antagonist/traitor/get_extra_panel_options(var/datum/mind/player) return "\[set crystals\]\[spawn uplink\]" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 53ef86145c..56d0888043 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -368,8 +368,7 @@ GLOBAL_LIST_EMPTY(areas_by_type) return (actual_static_equip == static_equip && actual_static_light == static_light && actual_static_environ == static_environ) ////////////////////////////////////////////////////////////////// - -var/list/mob/living/forced_ambiance_list = list() +GLOBAL_LIST_EMPTY(forced_ambiance_list) /area/Entered(mob/M) if(!istype(M) || !M.ckey) @@ -406,15 +405,15 @@ var/list/mob/living/forced_ambiance_list = list() var/volume_mod = L.get_preference_volume_channel(VOLUME_CHANNEL_AMBIENCE) // If we previously were in an area with force-played ambiance, stop it. - if((L in forced_ambiance_list) && initial) + if((L in GLOB.forced_ambiance_list) && initial) L << sound(null, channel = CHANNEL_AMBIENCE_FORCED) - forced_ambiance_list -= L + GLOB.forced_ambiance_list -= L if(forced_ambience) - if(L in forced_ambiance_list) + if(L in GLOB.forced_ambiance_list) return if(forced_ambience.len) - forced_ambiance_list |= L + GLOB.forced_ambiance_list |= L var/sound/chosen_ambiance = pick(forced_ambience) if(!istype(chosen_ambiance)) chosen_ambiance = sound(chosen_ambiance, repeat = 1, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE_FORCED) diff --git a/code/game/gamemodes/cult/cultify/mob.dm b/code/game/gamemodes/cult/cultify/mob.dm index dd2f1ba6d1..8322d22698 100644 --- a/code/game/gamemodes/cult/cultify/mob.dm +++ b/code/game/gamemodes/cult/cultify/mob.dm @@ -28,7 +28,7 @@ G.invisibility = INVISIBILITY_NONE to_chat(G, span_sinister("You feel relieved as what's left of your soul finally escapes its prison of flesh.")) - cult.harvested += G.mind + GLOB.cult.harvested += G.mind else dust() diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index 8b9e54647b..4caac313db 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -1,5 +1,5 @@ -var/global/narsie_behaviour = "CultStation13" -var/global/narsie_cometh = 0 +GLOBAL_VAR_INIT(narsie_behaviour, "CultStation13") +GLOBAL_VAR_INIT(narsie_cometh, 0) /obj/singularity/narsie //Moving narsie to its own file for the sake of being clearer name = "Nar-Sie" desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees." @@ -47,10 +47,10 @@ var/global/narsie_cometh = 0 narsie_spawn_animation() - if(!narsie_cometh)//so we don't initiate Hell more than one time. + if(!GLOB.narsie_cometh)//so we don't initiate Hell more than one time. if(cause_hell) SetUniversalState(/datum/universal_state/hell) - narsie_cometh = 1 + GLOB.narsie_cometh = 1 spawn(10 SECONDS) if(emergency_shuttle) @@ -157,12 +157,12 @@ var/global/narsie_cometh = 0 /obj/singularity/narsie/large/consume(const/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO //NEW BEHAVIOUR - if(narsie_behaviour == "CultStation13") + if(GLOB.narsie_behaviour == "CultStation13") //MOB PROCESSING new_narsie(A) //OLD BEHAVIOUR - else if(narsie_behaviour == "Nar-Singulo") + else if(GLOB.narsie_behaviour == "Nar-Singulo") old_narsie(A) /obj/singularity/narsie/proc/new_narsie(const/atom/A) @@ -273,7 +273,7 @@ var/global/narsie_cometh = 0 /obj/singularity/narsie/proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO var/list/cultists = list() - for(var/datum/mind/cult_nh_mind in cult.current_antagonists) + for(var/datum/mind/cult_nh_mind in GLOB.cult.current_antagonists) if(!cult_nh_mind.current) continue if(cult_nh_mind.current.stat) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 2d6d42bbdb..7b36c98936 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -334,7 +334,7 @@ GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa"," to_chat(user, span_warning("You do not have enough space to write a proper rune.")) return - if (C>=26 + GLOB.runedec + cult.current_antagonists.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist + if (C>=26 + GLOB.runedec + GLOB.cult.current_antagonists.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist tgui_alert_async(user, "The cloth of reality can't take that much of a strain. Remove some runes first!") return else diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index b5c30a160c..0f96794d92 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1,4 +1,4 @@ -var/list/sacrificed = list() +GLOBAL_LIST_EMPTY(sacrificed) /obj/effect/rune/cultify() return @@ -165,7 +165,7 @@ var/list/sacrificed = list() if(!waiting_for_input[target]) //so we don't spam them with dialogs if they hesitate waiting_for_input[target] = 1 - if(!cult.can_become_antag(target.mind) || jobban_isbanned(target, JOB_CULTIST))//putting jobban check here because is_convertable uses mind as argument + if(!GLOB.cult.can_become_antag(target.mind) || jobban_isbanned(target, JOB_CULTIST))//putting jobban check here because is_convertable uses mind as argument //waiting_for_input ensures this is only shown once, so they basically auto-resist from here on out. They still need to find a way to get off the freaking rune if they don't want to burn to death, though. to_chat(target, span_cult("Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.")) to_chat(target, span_danger("And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs.")) @@ -174,7 +174,7 @@ var/list/sacrificed = list() var/choice = tgui_alert(target,"Do you want to join the cult?","Submit to Nar'Sie",list("Resist","Submit")) waiting_for_input[target] = 0 if(choice == "Submit") //choosing 'Resist' does nothing of course. - cult.add_antagonist(target.mind) + GLOB.cult.add_antagonist(target.mind) converting -= target target.hallucination = 0 //sudden clarity @@ -184,7 +184,7 @@ var/list/sacrificed = list() /////////////////////////////////////////FOURTH RUNE /obj/effect/rune/proc/tearreality() - if(!cult.allow_narsie) + if(!GLOB.cult.allow_narsie) return fizzle() var/list/cultists = new() @@ -195,12 +195,12 @@ var/list/sacrificed = list() continue cultists.Add(M) if(cultists.len >= 9) - if(!narsie_cometh)//so we don't initiate Hell more than one time. + if(!GLOB.narsie_cometh)//so we don't initiate Hell more than one time. to_chat(world, span_world(span_narsie(span_red("THE VEIL HAS BEEN SHATTERED!")))) world << sound('sound/effects/weather/old_wind/wind_5_1.ogg') // CHOMPEdit - No idea why this wind is here now SetUniversalState(/datum/universal_state/hell) - narsie_cometh = 1 + GLOB.narsie_cometh = 1 spawn(10 SECONDS) if(emergency_shuttle) @@ -319,7 +319,7 @@ var/list/sacrificed = list() var/is_sacrifice_target = 0 for(var/mob/living/carbon/human/M in src.loc) if(M.stat == DEAD) - if(cult && M.mind == cult.sacrifice_target) + if(GLOB.cult && M.mind == GLOB.cult.sacrifice_target) is_sacrifice_target = 1 else corpse_to_raise = M @@ -336,7 +336,7 @@ var/list/sacrificed = list() for(var/obj/effect/rune/R in GLOB.rune_list) if(R.word1==GLOB.cultwords["blood"] && R.word2==GLOB.cultwords["join"] && R.word3==GLOB.cultwords["hell"]) for(var/mob/living/carbon/human/N in R.loc) - if(cult && N.mind && N.mind == cult.sacrifice_target) + if(GLOB.cult && N.mind && N.mind == GLOB.cult.sacrifice_target) is_sacrifice_target = 1 else if(N.stat!= DEAD) @@ -350,7 +350,7 @@ var/list/sacrificed = list() to_chat(usr, span_warning("The sacrifical corpse is not dead. You must free it from this world of illusions before it may be used.")) return fizzle() - if(!cult.can_become_antag(corpse_to_raise.mind) || jobban_isbanned(corpse_to_raise, JOB_CULTIST)) + if(!GLOB.cult.can_become_antag(corpse_to_raise.mind) || jobban_isbanned(corpse_to_raise, JOB_CULTIST)) to_chat(usr, span_warning("The Geometer of Blood refuses to touch this one.")) return fizzle() else if(!corpse_to_raise.client && corpse_to_raise.mind) //Don't force the dead person to come back if they don't want to. @@ -365,7 +365,7 @@ var/list/sacrificed = list() if(corpse_to_raise.client) - cult.add_antagonist(corpse_to_raise.mind) + GLOB.cult.add_antagonist(corpse_to_raise.mind) corpse_to_raise.revive() usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") @@ -477,7 +477,7 @@ var/list/sacrificed = list() D.update_eyes() D.all_underwear.Cut() D.key = ghost.key - cult.add_antagonist(D.mind) + GLOB.cult.add_antagonist(D.mind) if(!chose_name) D.real_name = pick("Anguished", "Blasphemous", "Corrupt", "Cruel", "Depraved", "Despicable", "Disturbed", "Exacerbated", "Foul", "Hateful", "Inexorable", "Implacable", "Impure", "Malevolent", "Malignant", "Malicious", "Pained", "Profane", "Profligate", "Relentless", "Resentful", "Restless", "Spiteful", "Tormented", "Unclean", "Unforgiving", "Vengeful", "Vindictive", "Wicked", "Wronged") @@ -619,7 +619,7 @@ var/list/sacrificed = list() usr.whisper("O bidai nabora se[pick("'","`")]sma!") log_and_message_admins("used a communicate rune to say '[input]'") - for(var/datum/mind/H in cult.current_antagonists) + for(var/datum/mind/H in GLOB.cult.current_antagonists) if (H.current) to_chat(H.current, span_cult("[input]")) for(var/mob/observer/dead/O in GLOB.player_list) @@ -660,9 +660,9 @@ var/list/sacrificed = list() worth = 1 if (SSticker.mode.name == "cult") - if(H.mind == cult.sacrifice_target) + if(H.mind == GLOB.cult.sacrifice_target) if(cultsinrange.len >= 3) - sacrificed += H.mind + GLOB.sacrificed += H.mind if(isrobot(H)) H.dust()//To prevent the MMI from remaining else @@ -675,7 +675,7 @@ var/list/sacrificed = list() if(H.stat !=2) if(prob(80) || worth) to_chat(usr, span_cult("The Geometer of Blood accepts this [worth ? "exotic " : ""]sacrifice.")) - cult.grant_runeword(usr) + GLOB.cult.grant_runeword(usr) else to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) to_chat(usr, span_warning("However, this soul was not enough to gain His favor.")) @@ -686,7 +686,7 @@ var/list/sacrificed = list() else if(prob(40) || worth) to_chat(usr, span_cult("The Geometer of Blood accepts this [worth ? "exotic " : ""]sacrifice.")) - cult.grant_runeword(usr) + GLOB.cult.grant_runeword(usr) else to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) to_chat(usr, span_warning("However, a mere dead body is not enough to satisfy Him.")) @@ -701,7 +701,7 @@ var/list/sacrificed = list() if(prob(40)) to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) - cult.grant_runeword(usr) + GLOB.cult.grant_runeword(usr) else to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) to_chat(usr, span_warning("However, a mere dead body is not enough to satisfy Him.")) @@ -714,7 +714,7 @@ var/list/sacrificed = list() if(H.stat !=2) if(prob(80)) to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) - cult.grant_runeword(usr) + GLOB.cult.grant_runeword(usr) else to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) to_chat(usr, span_warning("However, this soul was not enough to gain His favor.")) @@ -725,7 +725,7 @@ var/list/sacrificed = list() else if(prob(40)) to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) - cult.grant_runeword(usr) + GLOB.cult.grant_runeword(usr) else to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) to_chat(usr, span_warning("However, a mere dead body is not enough to satisfy Him.")) @@ -739,7 +739,7 @@ var/list/sacrificed = list() else if(prob(40)) to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) - cult.grant_runeword(usr) + GLOB.cult.grant_runeword(usr) else to_chat(usr, span_cult("The Geometer of Blood accepts this sacrifice.")) to_chat(usr, span_warning("However, a mere dead body is not enough to satisfy Him.")) @@ -810,7 +810,7 @@ var/list/sacrificed = list() /obj/effect/rune/proc/freedom() var/mob/living/user = usr var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in cult.current_antagonists) + for(var/datum/mind/H in GLOB.cult.current_antagonists) if (istype(H.current,/mob/living/carbon)) cultists+=H.current var/list/mob/living/carbon/users = new @@ -857,7 +857,7 @@ var/list/sacrificed = list() /obj/effect/rune/proc/cultsummon() var/mob/living/user = usr var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in cult.current_antagonists) + for(var/datum/mind/H in GLOB.cult.current_antagonists) if (istype(H.current,/mob/living/carbon)) cultists+=H.current var/list/mob/living/carbon/users = new diff --git a/code/game/gamemodes/cult/soulstone.dm b/code/game/gamemodes/cult/soulstone.dm index 71202d8c76..db23dc350c 100644 --- a/code/game/gamemodes/cult/soulstone.dm +++ b/code/game/gamemodes/cult/soulstone.dm @@ -192,7 +192,7 @@ var/mob/living/simple_mob/construct/juggernaut/Z = new /mob/living/simple_mob/construct/juggernaut (get_turf(T.loc)) Z.key = A.key if(iscultist(U)) - cult.add_antagonist(Z.mind) + GLOB.cult.add_antagonist(Z.mind) qdel(T) to_chat(Z, span_infoplain(span_bold("You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike."))) to_chat(Z, span_infoplain(span_bold("You are still bound to serve your creator, follow their orders and help them complete their goals at all costs."))) @@ -202,7 +202,7 @@ var/mob/living/simple_mob/construct/wraith/Z = new /mob/living/simple_mob/construct/wraith (get_turf(T.loc)) Z.key = A.key if(iscultist(U)) - cult.add_antagonist(Z.mind) + GLOB.cult.add_antagonist(Z.mind) qdel(T) to_chat(Z, span_infoplain(span_bold("You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls."))) to_chat(Z, span_infoplain(span_bold("You are still bound to serve your creator, follow their orders and help them complete their goals at all costs."))) @@ -212,7 +212,7 @@ var/mob/living/simple_mob/construct/artificer/Z = new /mob/living/simple_mob/construct/artificer (get_turf(T.loc)) Z.key = A.key if(iscultist(U)) - cult.add_antagonist(Z.mind) + GLOB.cult.add_antagonist(Z.mind) qdel(T) to_chat(Z, span_infoplain(span_bold("You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs"))) to_chat(Z, span_infoplain(span_bold("You are still bound to serve your creator, follow their orders and help them complete their goals at all costs."))) @@ -222,7 +222,7 @@ var/mob/living/simple_mob/construct/harvester/Z = new /mob/living/simple_mob/construct/harvester (get_turf(T.loc)) Z.key = A.key if(iscultist(U)) - cult.add_antagonist(Z.mind) + GLOB.cult.add_antagonist(Z.mind) qdel(T) to_chat(Z, span_infoplain(span_bold("You are playing a Harvester. You are relatively weak, but your physical frailty is made up for by your ranged abilities."))) to_chat(Z, span_infoplain(span_bold("You are still bound to serve your creator, follow their orders and help them complete their goals at all costs."))) @@ -232,7 +232,7 @@ var/mob/living/simple_mob/construct/juggernaut/behemoth/Z = new /mob/living/simple_mob/construct/juggernaut/behemoth (get_turf(T.loc)) Z.key = A.key if(iscultist(U)) - cult.add_antagonist(Z.mind) + GLOB.cult.add_antagonist(Z.mind) qdel(T) to_chat(Z, span_infoplain(span_bold("You are playing a Behemoth. You are incredibly slow, though your slowness is made up for by the fact your shell is far larger than any of your bretheren. You are the Unstoppable Force, and Immovable Object."))) to_chat(Z, span_infoplain(span_bold("You are still bound to serve your creator, follow their orders and help them complete their goals at all costs."))) diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 8872dc8565..10940eaf1a 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -54,7 +54,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0) OverlayAndAmbientSet() // Disable Nar-Sie. - cult.allow_narsie = 0 + GLOB.cult.allow_narsie = 0 PlayerSet() diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 2ca52158e3..64a2ffa5c2 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -13,7 +13,7 @@ /datum/game_mode/meteor/process() if(world.time >= next_wave) next_wave = world.time + GLOB.meteor_wave_delay - spawn() spawn_meteors(6, meteors_normal) + spawn() spawn_meteors(6, GLOB.meteors_normal) /datum/game_mode/meteor/declare_completion() var/text diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index d988e472c5..90ce8a7a43 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -4,33 +4,38 @@ GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths o //Meteors probability of spawning during a given wave //for space dust event -/var/list/meteors_dust = list(/obj/effect/meteor/dust) +/* Not in use +GLOBAL_LIST_INIT(meteors_dust, list(/obj/effect/meteor/dust)) +*/ //for normal meteor event -/var/list/meteors_normal = list( +GLOBAL_LIST_INIT(meteors_normal, list( /obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, /obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3 - ) + )) //for threatening meteor event -/var/list/meteors_threatening = list( +GLOBAL_LIST_INIT(meteors_threatening, list( /obj/effect/meteor/medium=5, /obj/effect/meteor/big=10, /obj/effect/meteor/flaming=3, /obj/effect/meteor/irradiated=3, - /obj/effect/meteor/emp=3) + /obj/effect/meteor/emp=3 + )) +/* Not in use //for catastrophic meteor event -/var/list/meteors_catastrophic = list( +GLOBAL_LIST_INIT(meteors_catastrophic, list( /obj/effect/meteor/medium=5, /obj/effect/meteor/big=75, /obj/effect/meteor/flaming=10, /obj/effect/meteor/irradiated=10, - /obj/effect/meteor/emp=10) - + /obj/effect/meteor/emp=10 + )) +*/ /////////////////////////////// diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index d65ab05126..b8580d5352 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -803,9 +803,9 @@ GLOBAL_LIST_EMPTY(all_objectives) /datum/objective/cult/survive/check_completion() var/acolytes_survived = 0 - if(!cult) + if(!GLOB.cult) return 0 - for(var/datum/mind/cult_mind in cult.current_antagonists) + for(var/datum/mind/cult_mind in GLOB.cult.current_antagonists) if (cult_mind.current && cult_mind.current.stat!=2) var/area/A = get_area(cult_mind.current ) if ( is_type_in_list(A, GLOB.centcom_areas)) @@ -828,14 +828,14 @@ GLOBAL_LIST_EMPTY(all_objectives) var/list/possible_targets = list() if(!possible_targets.len) for(var/mob/living/carbon/human/player in GLOB.player_list) - if(player.mind && !(player.mind in cult)) + if(player.mind && !(player.mind in GLOB.cult)) possible_targets += player.mind if(possible_targets.len > 0) target = pick(possible_targets) if(target) explanation_text = "Sacrifice [target.name], the [target.assigned_role]. You will need the sacrifice rune (Hell blood join) and three acolytes to do so." /datum/objective/cult/sacrifice/check_completion() - return (target && cult && !cult.sacrificed.Find(target)) + return (target && GLOB.cult && !GLOB.cult.sacrificed.Find(target)) /datum/objective/rev/find_target() ..() diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index adf62dd5f8..d54fe196ab 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -177,7 +177,7 @@ return message /datum/job/proc/get_job_icon() - if(!job_master.job_icons[title]) + if(!GLOB.job_master.job_icons[title]) var/mob/living/carbon/human/dummy/mannequin/mannequin = get_mannequin("#job_icon") dress_mannequin(mannequin) mannequin.dir = SOUTH @@ -185,9 +185,9 @@ var/icon/preview_icon = getFlatIcon(mannequin) preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser. - job_master.job_icons[title] = preview_icon + GLOB.job_master.job_icons[title] = preview_icon - return job_master.job_icons[title] + return GLOB.job_master.job_icons[title] /datum/job/proc/dress_mannequin(var/mob/living/carbon/human/dummy/mannequin/mannequin) mannequin.delete_inventory(TRUE) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 37cbfb54b7..9adeb63d47 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -1,4 +1,4 @@ -var/global/datum/controller/occupations/job_master +GLOBAL_DATUM(job_master, /datum/controller/occupations) /datum/controller/occupations //List of all jobs @@ -73,7 +73,7 @@ var/global/datum/controller/occupations/job_master unassigned -= player job.current_positions++ //CHOMPadd START - if(job.camp_protection && round_duration_in_ds < transfer_controller.shift_hard_end - 30 MINUTES) + if(job.camp_protection && round_duration_in_ds < GLOB.transfer_controller.shift_hard_end - 30 MINUTES) job.register_shift_key(player.client.ckey) //CHOMPadd END return 1 diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index 150e26ec61..6c066da7ca 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(alien_whitelist) /proc/is_job_whitelisted(mob/M, var/rank) // Check if the job actually requires a whitelist - var/datum/job/job = job_master.GetJob(rank) + var/datum/job/job = GLOB.job_master.GetJob(rank) if(!job.whitelist_only) return TRUE diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index fdde2bfe43..0c3b490338 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -224,7 +224,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva /obj/structure/AIcore/deactivated/proc/check_malf(var/mob/living/silicon/ai/ai) if(!ai) return - for (var/datum/mind/malfai in malf.current_antagonists) + for (var/datum/mind/malfai in GLOB.malf.current_antagonists) if (ai.mind == malfai) return 1 diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 59ae35728c..4a9a50ced5 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -92,7 +92,7 @@ data["card"] = "[card]" data["assignment"] = card.assignment data["card_cooldown"] = getCooldown() - var/datum/job/job = job_master.GetJob(card.rank) + var/datum/job/job = GLOB.job_master.GetJob(card.rank) if(job) data["job_datum"] = list( "title" = job.title, @@ -150,7 +150,7 @@ /obj/machinery/computer/timeclock/proc/getOpenOnDutyJobs(var/mob/user, var/department) var/list/available_jobs = list() - for(var/datum/job/job in job_master.occupations) + for(var/datum/job/job in GLOB.job_master.occupations) if(isOpenOnDutyJob(user, department, job)) available_jobs[job.title] = list(job.title) if(job.alt_titles) @@ -171,8 +171,8 @@ && job.timeoff_factor > 0 /obj/machinery/computer/timeclock/proc/makeOnDuty(var/newrank, var/newassignment, var/mob/user) - var/datum/job/oldjob = job_master.GetJob(card.rank) - var/datum/job/newjob = job_master.GetJob(newrank) + var/datum/job/oldjob = GLOB.job_master.GetJob(card.rank) + var/datum/job/newjob = GLOB.job_master.GetJob(newrank) if(!oldjob || !isOpenOnDutyJob(user, oldjob.pto_type, newjob)) return if(newassignment != newjob.title && !(newassignment in newjob.alt_titles)) @@ -203,12 +203,12 @@ return /obj/machinery/computer/timeclock/proc/makeOffDuty(var/mob/user) - var/datum/job/foundjob = job_master.GetJob(card.rank) + var/datum/job/foundjob = GLOB.job_master.GetJob(card.rank) if(!foundjob) return var/new_dept = foundjob.pto_type || PTO_CIVILIAN var/datum/job/ptojob = null - for(var/datum/job/job in job_master.occupations) + for(var/datum/job/job in GLOB.job_master.occupations) if(job.pto_type == new_dept && job.timeoff_factor < 0) ptojob = job break diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index e72bed231d..e3de68819e 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -489,7 +489,7 @@ //Handle job slot/tater cleanup. var/job = to_despawn.mind.assigned_role - job_master.FreeRole(job) + GLOB.job_master.FreeRole(job) to_despawn.mind.assigned_role = null if(to_despawn.mind.objectives.len) diff --git a/code/game/machinery/protean_reconstitutor.dm b/code/game/machinery/protean_reconstitutor.dm index 26090eb29f..61b55c0157 100644 --- a/code/game/machinery/protean_reconstitutor.dm +++ b/code/game/machinery/protean_reconstitutor.dm @@ -254,7 +254,7 @@ antag_data.add_antagonist(P.mind) antag_data.place_mob(P) P.mind.assigned_role = charjob - P.mind.role_alt_title = job_master.GetPlayerAltTitle(P, charjob) + P.mind.role_alt_title = GLOB.job_master.GetPlayerAltTitle(P, charjob) //no need to be particularly thorough about language handover, we can safely assume that they were allowed to have it if they had it to begin with P.languages.Cut() diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 9f6e8b7f0e..915c437bc7 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -61,8 +61,8 @@ if(ishuman(M)) var/mob/living/carbon/human/N = M to_chat(N, span_infoplain(span_bold("You have joined the ranks of the Syndicate and become a traitor to the station!"))) - traitors.add_antagonist(N.mind) - traitors.equip(N) + GLOB.traitors.add_antagonist(N.mind) + GLOB.traitors.equip(N) message_admins("[N]/([N.ckey]) has accepted a traitor objective from a syndicate beacon.") updateUsrDialog(usr) diff --git a/code/game/machinery/syndicatebeacon_vr.dm b/code/game/machinery/syndicatebeacon_vr.dm index c35454278e..99901cae6f 100644 --- a/code/game/machinery/syndicatebeacon_vr.dm +++ b/code/game/machinery/syndicatebeacon_vr.dm @@ -35,7 +35,7 @@ if(ishuman(M)) var/mob/living/carbon/human/N = M to_chat(N, span_infoplain(span_bold("Access granted, here are the supplies!"))) - traitors.spawn_uplink(N) + GLOB.traitors.spawn_uplink(N) N.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT N.mind.accept_tcrystals = 1 message_admins("[N]/([N.ckey]) has received an uplink and telecrystals from the syndicate beacon.") diff --git a/code/game/machinery/virtual_reality/ar_console.dm b/code/game/machinery/virtual_reality/ar_console.dm index 04f9196e73..f39c66e15b 100644 --- a/code/game/machinery/virtual_reality/ar_console.dm +++ b/code/game/machinery/virtual_reality/ar_console.dm @@ -117,7 +117,7 @@ occupant.enter_vr(avatar) if(spawn_with_clothing) - job_master.EquipRank(avatar,"Visitor", 1, FALSE) + GLOB.job_master.EquipRank(avatar,"Visitor", 1, FALSE) add_verb(avatar,/mob/living/carbon/human/proc/perform_exit_vr) avatar.virtual_reality_mob = FALSE //THIS IS THE BIG DIFFERENCE WITH ALIEN VR PODS. THEY ARE NOT VR, THEY ARE REAL. diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm index 50ee9d1fa4..ed8c9afcc0 100644 --- a/code/game/machinery/virtual_reality/vr_console.dm +++ b/code/game/machinery/virtual_reality/vr_console.dm @@ -293,7 +293,7 @@ occupant.enter_vr(avatar) if(spawn_with_clothing) - job_master.EquipRank(avatar,"Visitor", 1, FALSE) + GLOB.job_master.EquipRank(avatar,"Visitor", 1, FALSE) add_verb(avatar,/mob/living/carbon/human/proc/perform_exit_vr) add_verb(avatar,/mob/living/carbon/human/proc/vr_transform_into_mob) add_verb(avatar,/mob/living/proc/set_size) diff --git a/code/game/machinery/virtual_reality/vr_procs.dm b/code/game/machinery/virtual_reality/vr_procs.dm index 224be627b1..9a79a4039c 100644 --- a/code/game/machinery/virtual_reality/vr_procs.dm +++ b/code/game/machinery/virtual_reality/vr_procs.dm @@ -81,7 +81,7 @@ avatar.regenerate_icons() avatar.update_transform() - job_master.EquipRank(avatar,JOB_VR, 1, FALSE) + GLOB.job_master.EquipRank(avatar,JOB_VR, 1, FALSE) add_verb(avatar,/mob/living/carbon/human/proc/fake_exit_vr) add_verb(avatar,/mob/living/carbon/human/proc/vr_transform_into_mob) add_verb(avatar,/mob/living/proc/set_size) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 45c4149889..dd250597a9 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -480,7 +480,7 @@ user.position_hud_item(src,slot) if(user.client) user.client.screen |= src if(user.pulling == src) user.stop_pulling() - if(("[slot]" in slot_flags_enumeration) && (slot_flags & slot_flags_enumeration["[slot]"])) + if(("[slot]" in GLOB.slot_flags_enumeration) && (slot_flags & GLOB.slot_flags_enumeration["[slot]"])) if(equip_sound && !muffled_by_belly(user)) playsound(src, equip_sound, 20, preference = /datum/preference/toggle/pickup_sounds) else if(!muffled_by_belly(user)) @@ -518,7 +518,7 @@ return //Defines which slots correspond to which slot flags -var/list/global/slot_flags_enumeration = list( +GLOBAL_LIST_INIT(slot_flags_enumeration, list( "[slot_wear_mask]" = SLOT_MASK, "[slot_back]" = SLOT_BACK, "[slot_wear_suit]" = SLOT_OCLOTHING, @@ -532,7 +532,7 @@ var/list/global/slot_flags_enumeration = list( "[slot_w_uniform]" = SLOT_ICLOTHING, "[slot_wear_id]" = SLOT_ID, "[slot_tie]" = SLOT_TIE, - ) + )) //the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't. //If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. @@ -553,8 +553,8 @@ var/list/global/slot_flags_enumeration = list( return 0 //First check if the item can be equipped to the desired slot. - if("[slot]" in slot_flags_enumeration) - var/req_flags = slot_flags_enumeration["[slot]"] + if("[slot]" in GLOB.slot_flags_enumeration) + var/req_flags = GLOB.slot_flags_enumeration["[slot]"] if(!(req_flags & slot_flags)) return 0 diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm index 1b2fd75964..3972125693 100644 --- a/code/game/objects/items/devices/scanners/sleevemate.dm +++ b/code/game/objects/items/devices/scanners/sleevemate.dm @@ -1,4 +1,4 @@ -var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob +GLOBAL_DATUM(sleevemate_mob, /mob/living/carbon/human/dummy/mannequin) //SleeveMate! /obj/item/sleevemate @@ -295,15 +295,15 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob return //Uninstalled it? //Lazzzyyy. - if(!sleevemate_mob) - sleevemate_mob = new() + if(!GLOB.sleevemate_mob) + GLOB.sleevemate_mob = new() if(!(soulcatcher_pref_flags & SOULCATCHER_ALLOW_CAPTURE)) - to_chat(usr,span_notice("[sleevemate_mob] can't be transferred!")) + to_chat(usr,span_notice("[GLOB.sleevemate_mob] can't be transferred!")) return - put_mind(sleevemate_mob) - SC.catch_mob(sleevemate_mob) + put_mind(GLOB.sleevemate_mob) + SC.catch_mob(GLOB.sleevemate_mob) to_chat(usr,span_notice("Mind transferred into Soulcatcher!")) if(href_list["mindupload"]) diff --git a/code/game/objects/items/weapons/RMS.dm b/code/game/objects/items/weapons/RMS.dm index ebc146c078..54883396d6 100644 --- a/code/game/objects/items/weapons/RMS.dm +++ b/code/game/objects/items/weapons/RMS.dm @@ -5,7 +5,7 @@ #define RMS_STONE 5 #define RMS_RAND 6 -var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell, +GLOBAL_LIST_INIT(RMS_random_malfunction, list(/obj/item/fbp_backup_cell, /obj/item/trash/rkibble, /obj/item/clothing/gloves/bluespace/deluxe, /obj/item/flame/lighter/supermatter/syndismzippo, @@ -20,7 +20,8 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell, /obj/item/clothing/shoes/clown_shoes, /obj/item/clothing/mask/gas/clown_hat, /obj/item/pda/clown, - /mob/living/simple_mob/vore/catgirl) + /mob/living/simple_mob/vore/catgirl + )) /obj/item/rms name = "Rapid Material Synthesizer" @@ -135,7 +136,7 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell, if(do_after(user, 5, target = A)) if(overcharge) if(prob(5)) //5% chance for malfunction - var/thing_to_spawn = pick(RMS_random_malfunction) + var/thing_to_spawn = pick(GLOB.RMS_random_malfunction) product = new thing_to_spawn else product = choose_overcharge(user) diff --git a/code/game/objects/items/weapons/id cards/station_ids.dm b/code/game/objects/items/weapons/id cards/station_ids.dm index 1d5bf5f7f4..df0ceb7e08 100644 --- a/code/game/objects/items/weapons/id cards/station_ids.dm +++ b/code/game/objects/items/weapons/id cards/station_ids.dm @@ -142,7 +142,7 @@ /obj/item/card/id/Initialize(mapload) . = ..() - var/datum/job/J = job_master.GetJob(rank) + var/datum/job/J = GLOB.job_master.GetJob(rank) if(J) access = J.get_access() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 600670eff6..1b5bc080fe 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -52,10 +52,10 @@ //Chaplain null rod removes ALL unholy traits. REMOVE_TRAITS_IN(M, UNHOLY_TRAIT) - if(cult && (M.mind in cult.current_antagonists) && prob(33)) + if(GLOB.cult && (M.mind in GLOB.cult.current_antagonists) && prob(33)) to_chat(M, span_danger("The power of [src] clears your mind of the cult's influence!")) to_chat(user, span_danger("You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal.")) - cult.remove_antagonist(M.mind) + GLOB.cult.remove_antagonist(M.mind) M.visible_message(span_danger("\The [user] waves \the [src] over \the [M]'s head.")) else to_chat(user, span_danger("The rod appears to do nothing.")) diff --git a/code/game/objects/structures/ghost_pods/event_vr.dm b/code/game/objects/structures/ghost_pods/event_vr.dm index 27ce2fa256..d56f41c44b 100644 --- a/code/game/objects/structures/ghost_pods/event_vr.dm +++ b/code/game/objects/structures/ghost_pods/event_vr.dm @@ -170,7 +170,7 @@ new_character.mind.loaded_from_ckey = picked_ckey new_character.mind.loaded_from_slot = picked_slot - job_master.EquipRank(new_character, JOB_MAINT_LURKER, 1) + GLOB.job_master.EquipRank(new_character, JOB_MAINT_LURKER, 1) for(var/lang in new_character.client.prefs.alternate_languages) var/datum/language/chosen_language = GLOB.all_languages[lang] diff --git a/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm b/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm index e0b8e8c704..1b5ee829a6 100644 --- a/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm +++ b/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm @@ -131,7 +131,7 @@ new_character.mind.loaded_from_ckey = picked_ckey new_character.mind.loaded_from_slot = picked_slot - job_master.EquipRank(new_character, JOB_MAINT_LURKER, 1) + GLOB.job_master.EquipRank(new_character, JOB_MAINT_LURKER, 1) for(var/lang in new_character.client.prefs.alternate_languages) var/datum/language/chosen_language = GLOB.all_languages[lang] diff --git a/code/game/world.dm b/code/game/world.dm index f0fbcd5b7e..2ec5a17c5e 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -199,11 +199,11 @@ GLOBAL_VAR(restart_counter) // Create robolimbs for chargen. populate_robolimb_list() - master_controller = new /datum/controller/game_controller() + GLOB.master_controller = new /datum/controller/game_controller() Master.Initialize(10, FALSE, TRUE) // VOREStation Edit spawn(1) - master_controller.setup() + GLOB.master_controller.setup() RunUnattendedFunctions() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 7f6e5b6cbb..5c4e0320a0 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -702,9 +702,6 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re log_admin("Announce: [key_name(usr)] : [message]") feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -//VOREStation Edit to this verb for the purpose of making it compliant with the annunciator system -var/datum/announcement/priority/admin_pri_announcer = new -var/datum/announcement/minor/admin_min_announcer = new /datum/admins/proc/intercom() set category = "Fun.Event Kit" set name = "Intercom Msg" @@ -722,13 +719,11 @@ var/datum/announcement/minor/admin_min_announcer = new var/msgverb = tgui_input_text(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says") if(message) //They put a message message = sanitize(message, 500, extra = 0) - //VOREStation Edit Start if(msgverb) msgverb = sanitize(msgverb, 50, extra = 0) else msgverb = "states" GLOB.global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. - //VOREStation Edit End log_admin("Intercom: [key_name(usr)] : [sender]:[message]") feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -817,7 +812,7 @@ var/datum/announcement/minor/admin_min_announcer = new var/this_sender = decomposed[i] var/this_message = decomposed[++i] var/this_wait = decomposed[++i] - GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. //VOREStation Edit + GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. sleep(this_wait SECONDS) /datum/admins/proc/toggleooc() @@ -1479,7 +1474,7 @@ var/datum/announcement/minor/admin_min_announcer = new set category = "Debug.Game" set name = "Set Telecrystals" set desc = "Allows admins to change telecrystals of a user." - set popup_menu = FALSE //VOREStation Edit - Declutter. + set popup_menu = FALSE var/crystals if(check_rights(R_ADMIN|R_EVENT)) @@ -1495,7 +1490,7 @@ var/datum/announcement/minor/admin_min_announcer = new set category = "Debug.Game" set name = "Add Telecrystals" set desc = "Allows admins to change telecrystals of a user by addition." - set popup_menu = FALSE //VOREStation Edit - Declutter. + set popup_menu = FALSE var/crystals if(check_rights(R_ADMIN|R_EVENT)) @@ -1616,7 +1611,7 @@ var/datum/announcement/minor/admin_min_announcer = new set popup_menu = FALSE if(check_rights(R_ADMIN|R_DEBUG)) - traitors.spawn_uplink(H) + GLOB.traitors.spawn_uplink(H) H.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT H.mind.accept_tcrystals = 1 var/msg = "[key_name(usr)] has given [H.ckey] an uplink." diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 3a7f8c36ee..513474c721 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -476,7 +476,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY set category = "Admin.Game" if(check_rights(R_HOLDER)) var/list/jobs = list() - for (var/datum/job/J in job_master.occupations) + for (var/datum/job/J in GLOB.job_master.occupations) if (J.current_positions >= J.total_positions && J.total_positions != -1) jobs += J.title if (!jobs.len) @@ -484,7 +484,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY return var/job = tgui_input_list(usr, "Please select job slot to free", "Free job slot", jobs) if (job) - job_master.FreeRole(job) + GLOB.job_master.FreeRole(job) message_admins("A job slot for [job] has been opened by [key_name_admin(usr)]") return @@ -759,4 +759,4 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb") ADMIN_VERB(modify_shift_end, (R_ADMIN|R_EVENT|R_SERVER), "Modify Shift End", "Modifies the hard shift end time.", "Server.Game") - transfer_controller.modify_hard_end(user) + GLOB.transfer_controller.modify_hard_end(user) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 7b832cd4de..198ba088b8 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -255,7 +255,7 @@ if(!M.ckey) //sanity to_chat(usr, span_filter_adminlog("This mob has no ckey")) return - if(!job_master) + if(!GLOB.job_master) to_chat(usr, span_filter_adminlog("Job Master has not been setup!")) return @@ -276,7 +276,7 @@ jobs += "