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
@@ -108,7 +108,7 @@
if(3)
//Swarm of creatures
T.visible_message("<span class='userdanger'>A swarm of creatures surround [user]!</span>")
for(var/direction in alldirs)
for(var/direction in GLOB.alldirs)
new /mob/living/simple_animal/hostile/netherworld(get_step(get_turf(user),direction))
if(4)
//Destroy Equipment
@@ -131,7 +131,7 @@
T.visible_message("<span class='userdanger'>Unseen forces throw [user]!</span>")
user.Stun(6)
user.adjustBruteLoss(50)
var/throw_dir = cardinal
var/throw_dir = GLOB.cardinal
var/atom/throw_target = get_edge_target_turf(user, throw_dir)
user.throw_at(throw_target, 200, 4)
if(8)
@@ -160,7 +160,7 @@
//Mad Dosh
T.visible_message("<span class='userdanger'>Mad dosh shoots out of [src]!</span>")
var/turf/Start = get_turf(src)
for(var/direction in alldirs)
for(var/direction in GLOB.alldirs)
var/turf/dirturf = get_step(Start,direction)
if(rand(0,1))
new /obj/item/stack/spacecash/c1000(dirturf)
@@ -255,7 +255,7 @@
if(!target_mob)
return
var/turf/Start = get_turf(user)
for(var/direction in alldirs)
for(var/direction in GLOB.alldirs)
var/turf/T = get_step(Start,direction)
if(!T.density)
target_mob.Move(T)
@@ -94,11 +94,11 @@ obj/item/gun/energy/laser/retro/sc_retro
*/
//These vars hold the code itself, they'll be generated at round-start
var/sc_safecode1 = "[rand(0,9)]"
var/sc_safecode2 = "[rand(0,9)]"
var/sc_safecode3 = "[rand(0,9)]"
var/sc_safecode4 = "[rand(0,9)]"
var/sc_safecode5 = "[rand(0,9)]"
GLOBAL_VAR_INIT(sc_safecode1, "[rand(0,9)]") // Do these even need to be strings? Probably for the best
GLOBAL_VAR_INIT(sc_safecode2, "[rand(0,9)]")
GLOBAL_VAR_INIT(sc_safecode3, "[rand(0,9)]")
GLOBAL_VAR_INIT(sc_safecode4, "[rand(0,9)]")
GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
//Pieces of paper actually containing the hints
/obj/item/paper/sc_safehint_paper_prison
@@ -106,13 +106,13 @@ var/sc_safecode5 = "[rand(0,9)]"
/obj/item/paper/sc_safehint_paper_prison/New()
..()
info = "<i>The ink is smudged, you can only make out a couple numbers:</i> '[sc_safecode1]**[sc_safecode4]*'"
info = "<i>The ink is smudged, you can only make out a couple numbers:</i> '[GLOB.sc_safecode1]**[GLOB.sc_safecode4]*'"
/obj/item/paper/sc_safehint_paper_hydro
name = "shredded paper"
/obj/item/paper/sc_safehint_paper_hydro/New()
..()
info = "<i>Although the paper is shredded, you can clearly see the number:</i> '[sc_safecode2]'"
info = "<i>Although the paper is shredded, you can clearly see the number:</i> '[GLOB.sc_safecode2]'"
/obj/item/paper/sc_safehint_paper_caf
name = "blood-soaked paper"
@@ -124,7 +124,7 @@ var/sc_safecode5 = "[rand(0,9)]"
/obj/item/paper/sc_safehint_paper_bible/New()
..()
info = {"<i>It would appear that the pen hidden with the paper had leaked ink over the paper.
However you can make out the last three digits:</i>'[sc_safecode3][sc_safecode4][sc_safecode5]'
However you can make out the last three digits:</i>'[GLOB.sc_safecode3][GLOB.sc_safecode4][GLOB.sc_safecode5]'
"}
/obj/item/paper/sc_safehint_paper_shuttle
@@ -148,7 +148,7 @@ var/sc_safecode5 = "[rand(0,9)]"
/obj/item/storage/secure/safe/sc_ssafe/New()
..()
l_code = "[sc_safecode1][sc_safecode2][sc_safecode3][sc_safecode4][sc_safecode5]"
l_code = "[GLOB.sc_safecode1][GLOB.sc_safecode2][GLOB.sc_safecode3][GLOB.sc_safecode4][GLOB.sc_safecode5]"
l_set = 1
new /obj/item/gun/energy/mindflayer(src)
new /obj/item/soulstone(src)