[MIRROR] More globals (#12341)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-01-30 20:27:42 +01:00
committed by GitHub
co-authored by Kashargul
parent 38e634dce7
commit d031fa3c4e
76 changed files with 267 additions and 257 deletions
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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
+10 -13
View File
@@ -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
+2 -2
View File
@@ -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)
+5 -5
View File
@@ -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
@@ -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,
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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()
+5 -1
View File
@@ -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. <b>Please remember all \
rules aside from those with explicit exceptions apply to event characters.</b>"
/datum/antagonist/event/New()
..()
GLOB.event = src
+2 -3
View File
@@ -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.
+3 -3
View File
@@ -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)
+2 -2
View File
@@ -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()
+6 -2
View File
@@ -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.</b>"
flags = ANTAG_SUSPICIOUS | ANTAG_IMPLANT_IMMUNE | ANTAG_RANDSPAWN | ANTAG_VOTABLE
can_speak_aooc = FALSE
/datum/antagonist/stowaway/New()
..()
GLOB.stowaways = src
+6 -2
View File
@@ -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.</b>"
flags = ANTAG_SUSPICIOUS | ANTAG_IMPLANT_IMMUNE | ANTAG_RANDSPAWN | ANTAG_VOTABLE
can_speak_aooc = FALSE
/datum/antagonist/thug/New()
..()
GLOB.thugs = src
+2 -2
View File
@@ -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 "<a href='byond://?src=\ref[player];[HrefToken()];common=crystals'>\[set crystals\]</a><a href='byond://?src=\ref[src];[HrefToken()];spawn_uplink=\ref[player.current]'>\[spawn uplink\]</a>"
+5 -6
View File
@@ -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)
+1 -1
View File
@@ -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()
+7 -7
View File
@@ -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)
+1 -1
View File
@@ -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
+22 -22
View File
@@ -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
+5 -5
View File
@@ -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.")))
@@ -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()
+1 -1
View File
@@ -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
+13 -8
View File
@@ -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
))
*/
///////////////////////////////
+4 -4
View File
@@ -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()
..()
+3 -3
View File
@@ -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)
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+6 -6
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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.")
@@ -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.
@@ -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)
@@ -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)
+5 -5
View File
@@ -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
@@ -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"])
+4 -3
View File
@@ -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)
@@ -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()
+2 -2
View File
@@ -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."))
@@ -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]
@@ -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]
+2 -2
View File
@@ -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()
+4 -9
View File
@@ -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."
+3 -3
View File
@@ -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)
+22 -22
View File
@@ -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 += "<tr align='center' bgcolor='ccccff'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -296,7 +296,7 @@
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -316,7 +316,7 @@
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -336,7 +336,7 @@
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=cargodept;jobban4=\ref[M]'>Cargo Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -356,7 +356,7 @@
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -376,7 +376,7 @@
jobs += "<tr bgcolor='e79fff'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -396,7 +396,7 @@
jobs += "<tr bgcolor='ebb8fc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_PLANET))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=explorationdept;jobban4=\ref[M]'>Exploration Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_PLANET))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -420,7 +420,7 @@
jobs += "<tr bgcolor='00ffff'><th colspan='[length(offmap_jobs)]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=offmapdept;jobban4=\ref[M]'>Offmap Positions</a></th></tr><tr align='center'>"
for(var/jobPos in offmap_jobs)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -440,7 +440,7 @@
jobs += "<tr bgcolor='dddddd'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -465,7 +465,7 @@
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=nonhumandept;jobban4=\ref[M]'>Synthetic Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -545,7 +545,7 @@
tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!")
return
if(!job_master)
if(!GLOB.job_master)
to_chat(usr, span_filter_adminlog("Job Master has not been setup!"))
return
@@ -555,63 +555,63 @@
if("commanddept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("securitydept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("engineeringdept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("cargodept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("medicaldept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("sciencedept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("explorationdept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_PLANET))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("offmapdept")
for(var/dept in GLOB.offmap_departments)
for(var/jobPos in SSjob.get_job_titles_in_department(dept))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("civiliandept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("nonhumandept")
joblist += "pAI"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
else
+1 -1
View File
@@ -2,7 +2,7 @@
set category = "Debug.Investigate"
set name = "Show Air Report"
if(!master_controller || !SSair)
if(!GLOB.master_controller || !SSair)
tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report")
return
+1 -1
View File
@@ -69,7 +69,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
set category = "Mapping"
set name = "Camera Report"
if(!master_controller)
if(!GLOB.master_controller)
tgui_alert_async(usr,"Master_controller not found.","Sec Camera Report")
return 0
+4 -4
View File
@@ -572,10 +572,10 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
//If desired, apply equipment.
if(equipment)
if(charjob)
job_master.EquipRank(new_character, charjob, 1, announce)
GLOB.job_master.EquipRank(new_character, charjob, 1)
if(new_character.mind)
new_character.mind.assigned_role = charjob
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
new_character.mind.role_alt_title = GLOB.job_master.GetPlayerAltTitle(new_character, charjob)
equip_custom_items(new_character) //CHOMPEdit readded to enable custom_item.txt
//If customised job title, modify here.
@@ -734,8 +734,8 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if (!check_rights_for(src, R_HOLDER))
return
if(job_master)
for(var/datum/job/job in job_master.occupations)
if(GLOB.job_master)
for(var/datum/job/job in GLOB.job_master.occupations)
to_chat(src, "[job.title]: [job.total_positions]")
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+2 -2
View File
@@ -392,10 +392,10 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before
var/choice = tgui_alert(holder, "How do you wish for Nar-Sie to interact with its surroundings?","NarChoice",list("CultStation13", "Nar-Singulo"))
if(choice == "CultStation13")
log_and_message_admins("has set narsie's behaviour to \"CultStation13\".", holder)
narsie_behaviour = choice
GLOB.narsie_behaviour = choice
if(choice == "Nar-Singulo")
log_and_message_admins("has set narsie's behaviour to \"Nar-Singulo\".", holder)
narsie_behaviour = choice
GLOB.narsie_behaviour = choice
if("remove_all_clothing")
for(var/obj/item/clothing/O in world)
+2 -2
View File
@@ -6,8 +6,8 @@
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
return
if(job_master && SSticker)
var/datum/job/job = job_master.GetJob(JOB_AI)
if(GLOB.job_master && SSticker)
var/datum/job/job = GLOB.job_master.GetJob(JOB_AI)
if(!job)
to_chat(usr, "Unable to locate the AI job")
return
@@ -71,10 +71,10 @@
//CHOMPStation Add End
if(!(pref.player_alt_titles)) pref.player_alt_titles = new()
if(!job_master)
if(!GLOB.job_master)
return
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
var/alt_title = pref.player_alt_titles[job.title]
if(alt_title && !(alt_title in job.alt_titles))
pref.player_alt_titles -= job.title
@@ -188,7 +188,7 @@
if("job_info")
var/rank = params["rank"]
var/datum/job/job = job_master.GetJob(rank)
var/datum/job/job = GLOB.job_master.GetJob(rank)
if(!istype(job))
return TOPIC_NOACTION
@@ -240,7 +240,7 @@
pref.player_alt_titles[job.title] = new_title
/datum/category_item/player_setup_item/occupation/proc/SetJob(mob/user, role, level)
var/datum/job/job = job_master.GetJob(role)
var/datum/job/job = GLOB.job_master.GetJob(role)
if(!job)
return 0
+1 -1
View File
@@ -57,7 +57,7 @@
..()
if(enables_planes)
user.recalculate_vis()
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]"]))
for(var/trait in clothing_traits)
ADD_CLOTHING_TRAIT(user, trait)
@@ -37,7 +37,7 @@
var/wave_lower_bound = 4 // Min amount.
/datum/event2/event/meteor_defense/proc/set_meteor_types()
meteor_types = meteors_threatening.Copy()
meteor_types = GLOB.meteors_threatening.Copy()
/datum/event2/event/meteor_defense/set_up()
direction = pick(GLOB.cardinal) // GLOB.alldirs doesn't work with current meteor code unfortunately.
+1 -1
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(prevent_respawns)
//Job slot cleanup
var/job = src.mind.assigned_role
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
//Their objectives cleanup
if(src.mind.objectives.len)
+2 -2
View File
@@ -579,7 +579,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(check_rights_for(src.client, R_ADMIN|R_FUN|R_EVENT))
return 0
return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists))
return (T && T.holy) && (is_manifest || (mind in GLOB.cult.current_antagonists))
/mob/observer/dead/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost.Game"
@@ -691,7 +691,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/ghosts_can_write
if(SSticker.mode.name == "cult")
if(cult.current_antagonists.len > CONFIG_GET(number/cult_ghostwriter_req_cultists))
if(GLOB.cult.current_antagonists.len > CONFIG_GET(number/cult_ghostwriter_req_cultists))
ghosts_can_write = 1
if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such.
+1 -1
View File
@@ -18,7 +18,7 @@
return seen_turfs_in_range(src, 3)
/mob/living/carbon/human/seen_cult_turfs()
if(mind in cult.current_antagonists)
if(mind in GLOB.cult.current_antagonists)
return seen_turfs_in_range(src, world.view)
return ..()
@@ -36,10 +36,10 @@
/datum/antagonist/add_antagonist(var/datum/mind/player)
. = ..()
if(src == cult)
if(src == GLOB.cult)
cultnet.updateVisibility(player.current, 0)
/datum/antagonist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted)
..()
if(src == cult)
if(src == GLOB.cult)
cultnet.updateVisibility(player.current, 0)
+1 -1
View File
@@ -223,7 +223,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
ooc_notes_style = read_preference(/datum/preference/toggle/living/ooc_notes_style)
private_notes = client.prefs.read_preference(/datum/preference/text/living/private_notes)
if (malf && !(mind in malf.current_antagonists))
if (GLOB.malf && !(mind in GLOB.malf.current_antagonists))
show_laws()
to_chat(src, span_filter_notice(span_bold("These laws may be changed by other players, or by you being the traitor.")))
@@ -229,7 +229,7 @@
return
if (syndicate)
for(var/datum/mind/tra in traitors.current_antagonists)
for(var/datum/mind/tra in GLOB.traitors.current_antagonists)
if(tra.current)
// TODO: Update to new antagonist system.
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
@@ -239,7 +239,7 @@
// TODO: Update to new antagonist system.
if(!mind.special_role)
mind.special_role = "traitor"
traitors.current_antagonists |= mind
GLOB.traitors.current_antagonists |= mind
update_cell()
+3 -3
View File
@@ -382,10 +382,10 @@
/mob/living/silicon/proc/is_traitor()
return mind && (mind in traitors.current_antagonists)
return mind && (mind in GLOB.traitors.current_antagonists)
/mob/living/silicon/proc/is_malf()
return mind && (mind in malf.current_antagonists)
return mind && (mind in GLOB.malf.current_antagonists)
/mob/living/silicon/proc/is_malf_or_traitor()
return is_traitor() || is_malf()
@@ -408,7 +408,7 @@
//Handle job slot/tater cleanup.
var/job = mind.assigned_role
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
if(mind.objectives.len)
qdel(mind.objectives)
+1 -1
View File
@@ -471,7 +471,7 @@
//Job slot cleanup
var/job = mind.assigned_role
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
//Their objectives cleanup
if(mind.objectives.len)
+4 -4
View File
@@ -209,7 +209,7 @@
return timer - world.time
/mob/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
var/datum/job/job = GLOB.job_master.GetJob(rank)
if(!job)
return 0
if(!job.is_position_available())
@@ -244,7 +244,7 @@
return 0
//Find our spawning point.
var/list/join_props = job_master.LateSpawn(client, rank)
var/list/join_props = GLOB.job_master.LateSpawn(client, rank)
if(!join_props)
return
@@ -283,10 +283,10 @@
qdel(src)
return
job_master.AssignRole(src, rank, 1)
GLOB.job_master.AssignRole(src, rank, 1)
var/mob/living/character = create_character(T) //creates the human and transfers vars and mind
character = job_master.EquipRank(character, rank, 1) //equips the human
character = GLOB.job_master.EquipRank(character, rank, 1) //equips the human
UpdateFactionList(character)
var/datum/job/J = SSjob.get_job(rank)
@@ -192,11 +192,11 @@
var/datum/job/previewJob
// Determine what job is marked as 'High' priority, and dress them up as such.
if(job_civilian_low & ASSISTANT)
previewJob = job_master.GetJob(JOB_ALT_VISITOR)
previewJob = GLOB.job_master.GetJob(JOB_ALT_VISITOR)
else if(client && ispAI(client.mob))
pass() //Don't do anything!
else
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
var/job_flag
switch(job.department_flag)
if(CIVILIAN)
@@ -257,9 +257,9 @@
var/datum/job/highJob
// Determine what job is marked as 'High' priority, and dress them up as such.
if(job_civilian_low & ASSISTANT)
highJob = job_master.GetJob(JOB_ALT_ASSISTANT)
highJob = GLOB.job_master.GetJob(JOB_ALT_ASSISTANT)
else
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
var/job_flag
switch(job.department_flag)
if(CIVILIAN)
@@ -132,7 +132,7 @@
// Sets how much energy is drained to make each bullet
/obj/item/ammo_magazine/smart/proc/set_production_cost(var/obj/item/ammo_casing/A)
var/list/matters = ammo_repository.get_materials_from_object(A)
var/list/matters = GLOB.ammo_repository.get_materials_from_object(A)
var/tempcost
for(var/key in matters)
var/value = matters[key]
+4 -4
View File
@@ -411,8 +411,8 @@
/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(ishuman(M)) // Any location
if(M.mind && cult.is_antagonist(M.mind) && prob(10))
cult.remove_antagonist(M.mind)
if(M.mind && GLOB.cult.is_antagonist(M.mind) && prob(10))
GLOB.cult.remove_antagonist(M.mind)
if(prob(2)) //Get an ACTUAL chaplain for your stuff
if(M.has_modifier_of_type(/datum/modifier/redspace_corruption))
M.remove_modifiers_of_type(/datum/modifier/redspace_corruption)
@@ -431,8 +431,8 @@
/datum/reagent/water/holywater/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(ishuman(M)) // Any location
if(M.mind && cult.is_antagonist(M.mind) && prob(5))
cult.remove_antagonist(M.mind)
if(M.mind && GLOB.cult.is_antagonist(M.mind) && prob(5))
GLOB.cult.remove_antagonist(M.mind)
if(prob(1)) //injecting holy water makes it weaker because that's sinful
if(M.has_modifier_of_type(/datum/modifier/redspace_corruption))
M.remove_modifiers_of_type(/datum/modifier/redspace_corruption)
+2 -2
View File
@@ -209,9 +209,9 @@ GLOBAL_LIST_EMPTY(active_autoresleevers)
//If desired, apply equipment.
if(equip_body)
if(charjob)
job_master.EquipRank(new_character, charjob, 1)
GLOB.job_master.EquipRank(new_character, charjob, 1)
new_character.mind.assigned_role = charjob
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
new_character.mind.role_alt_title = GLOB.job_master.GetPlayerAltTitle(new_character, charjob)
//A redraw for good measure
new_character.regenerate_icons()
+14 -14
View File
@@ -8,8 +8,8 @@ GLOBAL_VAR_INIT(security_level, 0)
//6 = code delta
//config.alert_desc_blue_downto
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/effects/alert_levels/alert_raise.ogg'))
/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1)
GLOBAL_DATUM_INIT(security_announcement_up, /datum/announcement/priority/security, new(do_log = 0, do_newscast = 1, new_sound = sound('sound/effects/alert_levels/alert_raise.ogg')))
GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/security, new(do_log = 0, do_newscast = 1))
/proc/set_security_level(var/level)
switch(level)
@@ -32,40 +32,40 @@ GLOBAL_VAR_INIT(security_level, 0)
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level)
switch(level)
if(SEC_LEVEL_GREEN)
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_green)]", "Attention! Alert level lowered to code green.")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_green)]", "Attention! Alert level lowered to code green.")
GLOB.security_level = SEC_LEVEL_GREEN
if(SEC_LEVEL_YELLOW)
if(GLOB.security_level < SEC_LEVEL_YELLOW)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_yellow_upto)]", "Attention! Alert level elevated to yellow")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_yellow_upto)]", "Attention! Alert level elevated to yellow")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_yellow_downto)]", "Attention! Alert level lowered to yellow")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_yellow_downto)]", "Attention! Alert level lowered to yellow")
GLOB.security_level = SEC_LEVEL_YELLOW
if(SEC_LEVEL_VIOLET)
if(GLOB.security_level < SEC_LEVEL_VIOLET)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_violet_upto)]", "Attention! Alert level elevated to violet")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_violet_upto)]", "Attention! Alert level elevated to violet")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_violet_downto)]", "Attention! Alert level lowered to violet")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_violet_downto)]", "Attention! Alert level lowered to violet")
GLOB.security_level = SEC_LEVEL_VIOLET
if(SEC_LEVEL_ORANGE)
if(GLOB.security_level < SEC_LEVEL_ORANGE)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_orange_upto)]", "Attention! Alert level elevated to orange")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_orange_upto)]", "Attention! Alert level elevated to orange")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_orange_downto)]", "Attention! Alert level lowered to orange")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_orange_downto)]", "Attention! Alert level lowered to orange")
GLOB.security_level = SEC_LEVEL_ORANGE
if(SEC_LEVEL_BLUE)
if(GLOB.security_level < SEC_LEVEL_BLUE)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_blue_upto)]", "Attention! Alert level elevated to blue")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_blue_upto)]", "Attention! Alert level elevated to blue")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_blue_downto)]", "Attention! Alert level lowered to blue")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_blue_downto)]", "Attention! Alert level lowered to blue")
GLOB.security_level = SEC_LEVEL_BLUE
if(SEC_LEVEL_RED)
if(GLOB.security_level < SEC_LEVEL_RED)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_red_upto)]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_red_upto)]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_red_downto)]", "Attention! Code red!")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_red_downto)]", "Attention! Code red!")
GLOB.security_level = SEC_LEVEL_RED
if(SEC_LEVEL_DELTA)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_delta)]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_delta)]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
GLOB.security_level = SEC_LEVEL_DELTA
var/newlevel = get_security_level()
+2 -2
View File
@@ -408,7 +408,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations)
if(action == "help")
var/list/whitelist_jobs = list()
for(var/datum/job/our_job in job_master.occupations)
for(var/datum/job/our_job in GLOB.job_master.occupations)
if(our_job.whitelist_only)
whitelist_jobs += our_job.title
message.text = "The following jobs and species have a whitelist:\nJobs: [english_list(whitelist_jobs)]\nSpecies: [english_list(GLOB.whitelisted_species)]"
@@ -450,7 +450,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations)
switch(action)
if("add")
if(kind == "job")
var/datum/job/job = job_master.GetJob(role)
var/datum/job/job = GLOB.job_master.GetJob(role)
if(!job)
message.text = "Error, invalid job entered. Check spelling and capitalization."
return message
+1 -1
View File
@@ -74,7 +74,7 @@
var/list/jobs = list()
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
if(job && user.IsJobAvailable(job.title))
// Check for jobs with minimum age requirements
if(!character_old_enough_for_job(user.client.prefs, job))
+1 -1
View File
@@ -21,7 +21,7 @@
. = ..()
if (!istype(user))
return
if(("[slot_equipped]" in slot_flags_enumeration) && (slot_flags & slot_flags_enumeration["[slot_equipped]"]))
if(("[slot_equipped]" in GLOB.slot_flags_enumeration) && (slot_flags & GLOB.slot_flags_enumeration["[slot_equipped]"]))
if (LAZYLEN(user_vars_to_edit))
for(var/variable in user_vars_to_edit)
if(variable in user.vars)
+6 -6
View File
@@ -30,7 +30,7 @@
data["card"] = "[pda.id]"
data["assignment"] = pda.id.assignment
data["card_cooldown"] = getCooldown()
var/datum/job/job = job_master.GetJob(pda.id.rank)
var/datum/job/job = GLOB.job_master.GetJob(pda.id.rank)
if(job)
data["job_datum"] = list(
"title" = job.title,
@@ -63,7 +63,7 @@
/datum/data/pda/app/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)
@@ -84,8 +84,8 @@
&& job.timeoff_factor > 0
/datum/data/pda/app/timeclock/proc/makeOnDuty(mob/user, var/newrank, var/newassignment)
var/datum/job/oldjob = job_master.GetJob(pda.id.rank)
var/datum/job/newjob = job_master.GetJob(newrank)
var/datum/job/oldjob = GLOB.job_master.GetJob(pda.id.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))
@@ -112,7 +112,7 @@
return
/datum/data/pda/app/timeclock/proc/makeOffDuty(mob/user)
var/datum/job/foundjob = job_master.GetJob(pda.id.rank)
var/datum/job/foundjob = GLOB.job_master.GetJob(pda.id.rank)
if(!foundjob)
return
//If we're not in an area that allows clockout and not in a belly, shouldn't be able to clock out.
@@ -121,7 +121,7 @@
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