mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
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:
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/effect/anomaly/proc/anomalyEffect()
|
||||
if(prob(50))
|
||||
step(src,pick(alldirs))
|
||||
step(src,pick(GLOB.alldirs))
|
||||
|
||||
|
||||
/obj/effect/anomaly/proc/anomalyNeutralize()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
GLOBAL_LIST_EMPTY(bump_teleporters)
|
||||
|
||||
/obj/effect/bump_teleporter
|
||||
name = "bump-teleporter"
|
||||
@@ -13,10 +13,10 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
|
||||
/obj/effect/bump_teleporter/New()
|
||||
..()
|
||||
BUMP_TELEPORTERS += src
|
||||
GLOB.bump_teleporters += src
|
||||
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
BUMP_TELEPORTERS -= src
|
||||
GLOB.bump_teleporters -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/bump_teleporter/singularity_act()
|
||||
@@ -34,7 +34,7 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
//user.loc = src.loc //Stop at teleporter location, there is nowhere to teleport to.
|
||||
return
|
||||
|
||||
for(var/obj/effect/bump_teleporter/BT in BUMP_TELEPORTERS)
|
||||
for(var/obj/effect/bump_teleporter/BT in GLOB.bump_teleporters)
|
||||
if(BT.id == src.id_target)
|
||||
usr.loc = BT.loc //Teleport to location with correct id.
|
||||
return
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S))
|
||||
return
|
||||
for(var/d in cardinal)
|
||||
for(var/d in GLOB.cardinal)
|
||||
if(rand(25))
|
||||
var/turf/simulated/target = get_step(src, d)
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define DRYING_TIME 5 * 60 * 10 //for 1 unit of depth in puddle (amount var)
|
||||
|
||||
var/global/list/image/splatter_cache = list()
|
||||
GLOBAL_LIST_EMPTY(splatter_cache)
|
||||
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define TRACKS_CRUSTIFY_TIME 50
|
||||
|
||||
// color-dir-dry
|
||||
var/global/list/image/fluidtrack_cache = list()
|
||||
GLOBAL_LIST_EMPTY(fluidtrack_cache)
|
||||
|
||||
// Footprints, tire trails...
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
@@ -55,7 +55,7 @@ var/global/list/image/fluidtrack_cache = list()
|
||||
if(!(entered_dirs & H.dir))
|
||||
entered_dirs |= H.dir
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
|
||||
..()
|
||||
if(ishuman(O))
|
||||
@@ -87,24 +87,24 @@ var/global/list/image/fluidtrack_cache = list()
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_icon()
|
||||
overlays.Cut()
|
||||
|
||||
for(var/Ddir in cardinal)
|
||||
for(var/Ddir in GLOB.cardinal)
|
||||
if(entered_dirs & Ddir)
|
||||
var/image/I
|
||||
if(fluidtrack_cache["entered-[blood_state]-[Ddir]"])
|
||||
I = fluidtrack_cache["entered-[blood_state]-[Ddir]"]
|
||||
if(GLOB.fluidtrack_cache["entered-[blood_state]-[Ddir]"])
|
||||
I = GLOB.fluidtrack_cache["entered-[blood_state]-[Ddir]"]
|
||||
else
|
||||
I = image(icon,"[blood_state]1",dir = Ddir)
|
||||
fluidtrack_cache["entered-[blood_state]-[Ddir]"] = I
|
||||
GLOB.fluidtrack_cache["entered-[blood_state]-[Ddir]"] = I
|
||||
if(I)
|
||||
I.color = basecolor
|
||||
overlays += I
|
||||
if(exited_dirs & Ddir)
|
||||
var/image/I
|
||||
if(fluidtrack_cache["exited-[blood_state]-[Ddir]"])
|
||||
I = fluidtrack_cache["exited-[blood_state]-[Ddir]"]
|
||||
if(GLOB.fluidtrack_cache["exited-[blood_state]-[Ddir]"])
|
||||
I = GLOB.fluidtrack_cache["exited-[blood_state]-[Ddir]"]
|
||||
else
|
||||
I = image(icon,"[blood_state]2",dir = Ddir)
|
||||
fluidtrack_cache["exited-[blood_state]-[Ddir]"] = I
|
||||
GLOB.fluidtrack_cache["exited-[blood_state]-[Ddir]"] = I
|
||||
if(I)
|
||||
I.color = basecolor
|
||||
overlays += I
|
||||
|
||||
@@ -118,10 +118,10 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
// will always spawn at the items location, even if it's moved.
|
||||
|
||||
/* Example:
|
||||
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
*/
|
||||
/////////////////////////////////////////////
|
||||
/obj/effect/effect/steam
|
||||
|
||||
@@ -14,11 +14,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
/obj/effect/particle_effect/New()
|
||||
..()
|
||||
if(SSticker)
|
||||
cameranet.updateVisibility(src)
|
||||
GLOB.cameranet.updateVisibility(src)
|
||||
|
||||
/obj/effect/particle_effect/Destroy()
|
||||
if(SSticker)
|
||||
cameranet.updateVisibility(src)
|
||||
GLOB.cameranet.updateVisibility(src)
|
||||
return ..()
|
||||
|
||||
/datum/effect_system
|
||||
@@ -61,9 +61,9 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
total_effects++
|
||||
var/direction
|
||||
if(cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
var/steps_amt = pick(1,2,3)
|
||||
for(var/j in 1 to steps_amt)
|
||||
sleep(5)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
for(var/i in 1 to number)
|
||||
spawn(0)
|
||||
var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(location)
|
||||
var/direct = pick(alldirs)
|
||||
var/direct = pick(GLOB.alldirs)
|
||||
var/steps_amt = pick(1;25,2;50,3,4;200)
|
||||
for(var/j in 1 to steps_amt)
|
||||
sleep(1)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!T)
|
||||
|
||||
@@ -172,13 +172,13 @@
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if(round(amount/12) > 0)
|
||||
devastation = min (MAX_EX_DEVASTATION_RANGE, devastation + round(amount/12))
|
||||
devastation = min (GLOB.max_ex_devastation_range, devastation + round(amount/12))
|
||||
|
||||
if(round(amount/6) > 0)
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
heavy = min (GLOB.max_ex_heavy_range, heavy + round(amount/6))
|
||||
|
||||
if(round(amount/3) > 0)
|
||||
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
|
||||
light = min (GLOB.max_ex_light_range, light + round(amount/3))
|
||||
|
||||
if(flashing && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
@@ -97,9 +97,9 @@
|
||||
var/obj/effect/particle_effect/smoke/S = new effect_type(location)
|
||||
if(!direction)
|
||||
if(cardinals)
|
||||
S.direction = pick(cardinal)
|
||||
S.direction = pick(GLOB.cardinal)
|
||||
else
|
||||
S.direction = pick(alldirs)
|
||||
S.direction = pick(GLOB.alldirs)
|
||||
else
|
||||
S.direction = direction
|
||||
S.steps = pick(0,1,1,1,2,2,2,3)
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
// will always spawn at the items location, even if it's moved.
|
||||
|
||||
/* Example:
|
||||
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
*/
|
||||
/////////////////////////////////////////////
|
||||
/obj/effect/particle_effect/steam
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
var/placeCount = 1
|
||||
for(var/obj/structure/glowshroom/shroom in newLoc)
|
||||
shroomCount++
|
||||
for(var/wallDir in cardinal)
|
||||
for(var/wallDir in GLOB.cardinal)
|
||||
var/turf/isWall = get_step(newLoc,wallDir)
|
||||
if(isWall.density)
|
||||
placeCount++
|
||||
@@ -123,7 +123,7 @@
|
||||
/obj/structure/glowshroom/proc/CalcDir(turf/location = loc)
|
||||
var/direction = 16
|
||||
|
||||
for(var/wallDir in cardinal)
|
||||
for(var/wallDir in GLOB.cardinal)
|
||||
var/turf/newTurf = get_step(location,wallDir)
|
||||
if(newTurf.density)
|
||||
direction |= wallDir
|
||||
|
||||
@@ -13,80 +13,80 @@
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
GLOB.newplayer_start += loc
|
||||
qdel(src)
|
||||
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
GLOB.wizardstart += loc
|
||||
qdel(src)
|
||||
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
GLOB.latejoin += loc
|
||||
qdel(src)
|
||||
|
||||
if("JoinLateGateway")
|
||||
latejoin_gateway += loc
|
||||
GLOB.latejoin_gateway += loc
|
||||
qdel(src)
|
||||
|
||||
if("JoinLateCryo")
|
||||
latejoin_cryo += loc
|
||||
GLOB.latejoin_cryo += loc
|
||||
qdel(src)
|
||||
|
||||
if("JoinLateCyborg")
|
||||
latejoin_cyborg += loc
|
||||
GLOB.latejoin_cyborg += loc
|
||||
qdel(src)
|
||||
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
GLOB.prisonwarp += loc
|
||||
qdel(src)
|
||||
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
GLOB.prisonsecuritywarp += loc
|
||||
qdel(src)
|
||||
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
GLOB.tdome1 += loc
|
||||
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
GLOB.tdome2 += loc
|
||||
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
GLOB.tdomeadmin += loc
|
||||
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
GLOB.tdomeobserve += loc
|
||||
|
||||
if("aroomwarp")
|
||||
aroomwarp += loc
|
||||
GLOB.aroomwarp += loc
|
||||
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
GLOB.blobstart += loc
|
||||
qdel(src)
|
||||
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
GLOB.xeno_spawn += loc
|
||||
qdel(src)
|
||||
|
||||
if("ninjastart")
|
||||
ninjastart += loc
|
||||
GLOB.ninjastart += loc
|
||||
qdel(src)
|
||||
|
||||
if("carpspawn")
|
||||
carplist += loc
|
||||
GLOB.carplist += loc
|
||||
|
||||
if("voxstart")
|
||||
raider_spawn += loc
|
||||
GLOB.raider_spawn += loc
|
||||
|
||||
if("ERT Director")
|
||||
ertdirector += loc
|
||||
GLOB.ertdirector += loc
|
||||
qdel(src)
|
||||
|
||||
if("Response Team")
|
||||
emergencyresponseteamspawn += loc
|
||||
GLOB.emergencyresponseteamspawn += loc
|
||||
qdel(src)
|
||||
|
||||
if("Syndicate Officer")
|
||||
syndicateofficer += loc
|
||||
GLOB.syndicateofficer += loc
|
||||
qdel(src)
|
||||
|
||||
GLOB.landmarks_list += src
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
/obj/effect/snowcloud/proc/try_to_spread_cloud()
|
||||
if(prob(95 - parent_machine.cooling_speed * 5)) //10 / 15 / 20 / 25% chance to spawn a new cloud
|
||||
return
|
||||
var/list/random_dirs = shuffle(cardinal)
|
||||
var/list/random_dirs = shuffle(GLOB.cardinal)
|
||||
for(var/potential in random_dirs)
|
||||
var/turf/T = get_turf(get_step(src, potential))
|
||||
if(isspaceturf(T) || T.density)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/human/New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/xeno/New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/robot/New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
qdel(G) //just in case mappers don't know what they are doing
|
||||
|
||||
if(!useFull)
|
||||
for(var/cdir in cardinal)
|
||||
for(var/cdir in GLOB.cardinal)
|
||||
for(var/obj/effect/spawner/window/WS in get_step(src,cdir))
|
||||
cdir = null
|
||||
break
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter/New(loc, set_dir, blood_color)
|
||||
if(blood_color)
|
||||
color = blood_color
|
||||
if(set_dir in diagonals)
|
||||
if(set_dir in GLOB.diagonals)
|
||||
icon_state = "[splatter_type][pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "[splatter_type][pick(3, 4, 5)]"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/effect/temp_visual/Initialize(mapload)
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
setDir(pick(cardinal))
|
||||
setDir(pick(GLOB.cardinal))
|
||||
|
||||
timerid = QDEL_IN(src, duration)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user