Makes all global variables handled by the GLOB controller (#13152)

* Handlers converted, now to fix 3532 compile errors

* 3532 compile fixes later, got runtimes on startup

* Well the server loads now atleast

* Take 2

* Oops
This commit is contained in:
AffectedArc07
2020-03-20 21:56:37 -06:00
committed by GitHub
parent c8dbd0190e
commit 210f8badf4
667 changed files with 4243 additions and 4240 deletions
@@ -47,11 +47,11 @@
newhud.join_hud(current)
/datum/mind/proc/leave_all_huds()
for(var/datum/atom_hud/antag/hud in huds)
for(var/datum/atom_hud/antag/hud in GLOB.huds)
if(current in hud.hudusers)
hud.leave_hud(current)
for(var/datum/atom_hud/data/hud in huds)
for(var/datum/atom_hud/data/hud in GLOB.huds)
if(current in hud.hudusers)
hud.remove_hud_from(current)
@@ -266,7 +266,7 @@
to_chat(user, "<span class='notice'>The sludge does not respond to your attempt to awake it. Perhaps you should try again later.</span>")
/obj/item/antag_spawner/morph/spawn_antag(client/C, turf/T, type = "", mob/user)
var/mob/living/simple_animal/hostile/morph/wizard/M = new /mob/living/simple_animal/hostile/morph/wizard(pick(xeno_spawn))
var/mob/living/simple_animal/hostile/morph/wizard/M = new /mob/living/simple_animal/hostile/morph/wizard(pick(GLOB.xeno_spawn))
M.key = C.key
M.mind.assigned_role = SPECIAL_ROLE_MORPH
M.mind.special_role = SPECIAL_ROLE_MORPH
@@ -44,10 +44,10 @@
owner.objectives -= O
/datum/antagonist/mindslave/proc/update_mindslave_icons_added()
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR]
traitorhud.join_hud(owner.current, null)
set_antag_hud(owner.current, "hudmindslave")
/datum/antagonist/mindslave/proc/update_mindslave_icons_removed()
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR]
traitorhud.leave_hud(owner.current, null)
@@ -118,7 +118,7 @@
var/objective_amount = config.traitor_objectives_amount
if(is_hijacker && objective_count <= objective_amount) //Don't assign hijack if it would exceed the number of objectives set in config.traitor_objectives_amount
if (!(locate(/datum/objective/hijack) in objectives))
var/datum/objective/hijack/hijack_objective = new
@@ -187,7 +187,7 @@
destroy_objective.owner = owner
destroy_objective.find_target()
if("[destroy_objective]" in assigned_targets) // Is this target already in their list of assigned targets? If so, don't add this objective and return
return 0
return 0
else if(destroy_objective.target) // Is the target a real one and not null? If so, add it to our list of targets to avoid duplicate targets
assigned_targets.Add("[destroy_objective.target]") // This logic is applied to all traitor objectives including steal objectives
add_objective(destroy_objective)
@@ -221,7 +221,7 @@
else if(kill_objective.target)
assigned_targets.Add("[kill_objective.target]")
add_objective(kill_objective)
else
var/datum/objective/steal/steal_objective = new
steal_objective.owner = owner
@@ -231,7 +231,7 @@
else if(steal_objective.steal_target)
assigned_targets.Add("[steal_objective.steal_target]")
add_objective(steal_objective)
/datum/antagonist/traitor/proc/forge_single_AI_objective()
. = 1
@@ -251,13 +251,13 @@
/datum/antagonist/traitor/proc/update_traitor_icons_added(datum/mind/traitor_mind)
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR]
traitorhud.join_hud(owner.current, null)
set_antag_hud(owner.current, "hudsyndicate")
/datum/antagonist/traitor/proc/update_traitor_icons_removed(datum/mind/traitor_mind)
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR]
traitorhud.leave_hud(owner.current, null)
set_antag_hud(owner.current, null)
@@ -273,7 +273,7 @@
if(should_equip)
equip_traitor()
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE)
/datum/antagonist/traitor/proc/give_codewords()
if(!owner.current)
@@ -309,7 +309,7 @@
if(traitor_kind == TRAITOR_HUMAN)
var/mob/living/carbon/human/traitor_mob = owner.current
// find a radio! toolbox(es), backpack, belt, headset
var/obj/item/R = locate(/obj/item/pda) in traitor_mob.contents //Hide the uplink in a PDA if available, otherwise radio
if(!R)
@@ -22,56 +22,56 @@
if(!istype(H))
return
H.ignore_gene_stability = TRUE
H.dna.SetSEState(HULKBLOCK, TRUE)
genemutcheck(H, HULKBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.hulkblock, TRUE)
genemutcheck(H, GLOB.hulkblock, null, MUTCHK_FORCED)
H.dna.SetSEState(XRAYBLOCK, TRUE)
genemutcheck(H, XRAYBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.xrayblock, TRUE)
genemutcheck(H, GLOB.xrayblock, null, MUTCHK_FORCED)
H.dna.SetSEState(FIREBLOCK, TRUE)
genemutcheck(H, FIREBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.fireblock, TRUE)
genemutcheck(H, GLOB.fireblock, null, MUTCHK_FORCED)
H.dna.SetSEState(COLDBLOCK, TRUE)
genemutcheck(H, COLDBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.coldblock, TRUE)
genemutcheck(H, GLOB.coldblock, null, MUTCHK_FORCED)
H.dna.SetSEState(TELEBLOCK, TRUE)
genemutcheck(H, TELEBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.teleblock, TRUE)
genemutcheck(H, GLOB.teleblock, null, MUTCHK_FORCED)
H.dna.SetSEState(INCREASERUNBLOCK, TRUE)
genemutcheck(H, INCREASERUNBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.increaserunblock, TRUE)
genemutcheck(H, GLOB.increaserunblock, null, MUTCHK_FORCED)
H.dna.SetSEState(BREATHLESSBLOCK, TRUE)
genemutcheck(H, BREATHLESSBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.breathlessblock, TRUE)
genemutcheck(H, GLOB.breathlessblock, null, MUTCHK_FORCED)
H.dna.SetSEState(REGENERATEBLOCK, TRUE)
genemutcheck(H, REGENERATEBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.regenerateblock, TRUE)
genemutcheck(H, GLOB.regenerateblock, null, MUTCHK_FORCED)
H.dna.SetSEState(SHOCKIMMUNITYBLOCK, TRUE)
genemutcheck(H, SHOCKIMMUNITYBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.shockimmunityblock, TRUE)
genemutcheck(H, GLOB.shockimmunityblock, null, MUTCHK_FORCED)
H.dna.SetSEState(SMALLSIZEBLOCK, TRUE)
genemutcheck(H, SMALLSIZEBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.smallsizeblock, TRUE)
genemutcheck(H, GLOB.smallsizeblock, null, MUTCHK_FORCED)
H.dna.SetSEState(SOBERBLOCK, TRUE)
genemutcheck(H, SOBERBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.soberblock, TRUE)
genemutcheck(H, GLOB.soberblock, null, MUTCHK_FORCED)
H.dna.SetSEState(PSYRESISTBLOCK, TRUE)
genemutcheck(H, PSYRESISTBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.psyresistblock, TRUE)
genemutcheck(H, GLOB.psyresistblock, null, MUTCHK_FORCED)
H.dna.SetSEState(SHADOWBLOCK, TRUE)
genemutcheck(H, SHADOWBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.shadowblock, TRUE)
genemutcheck(H, GLOB.shadowblock, null, MUTCHK_FORCED)
H.dna.SetSEState(CRYOBLOCK, TRUE)
genemutcheck(H, CRYOBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.cryoblock, TRUE)
genemutcheck(H, GLOB.cryoblock, null, MUTCHK_FORCED)
H.dna.SetSEState(EATBLOCK, TRUE)
genemutcheck(H, EATBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.eatblock, TRUE)
genemutcheck(H, GLOB.eatblock, null, MUTCHK_FORCED)
H.dna.SetSEState(JUMPBLOCK, TRUE)
genemutcheck(H, JUMPBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.jumpblock, TRUE)
genemutcheck(H, GLOB.jumpblock, null, MUTCHK_FORCED)
H.dna.SetSEState(IMMOLATEBLOCK, TRUE)
genemutcheck(H, IMMOLATEBLOCK, null, MUTCHK_FORCED)
H.dna.SetSEState(GLOB.immolateblock, TRUE)
genemutcheck(H, GLOB.immolateblock, null, MUTCHK_FORCED)
H.mutations.Add(LASER)
H.update_mutations()