mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
code/global.dm => code/_global_vars/ (#17244)
* 1 * Full conversion * . * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -145,7 +145,7 @@
|
||||
if(get_dist(linked_node, src) > linked_node.node_range)
|
||||
return
|
||||
|
||||
for(var/dirn in cardinal)
|
||||
for(var/dirn in GLOB.cardinal)
|
||||
var/turf/T1 = get_turf(src)
|
||||
var/turf/T2 = get_step(src, dirn)
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
|
||||
smoke.icon = I
|
||||
smoke.plane = ABOVE_PLANE
|
||||
smoke.set_dir(pick(cardinal))
|
||||
smoke.set_dir(pick(GLOB.cardinal))
|
||||
smoke.pixel_x = -32 + rand(-8, 8)
|
||||
smoke.pixel_y = -32 + rand(-8, 8)
|
||||
walk_to(smoke, T)
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
while(pending.len)
|
||||
for(var/turf/current in pending)
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
var/turf/target = get_step(current, D)
|
||||
if(wallList)
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
|
||||
@@ -53,7 +53,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)
|
||||
continue
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(confetti,direction)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate.
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S)) return
|
||||
for(var/d in cardinal)
|
||||
for(var/d in GLOB.cardinal)
|
||||
var/turf/simulated/target = get_step(src,d)
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
if(origin.CanPass(src, target) && target.CanPass(src, origin))
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
return
|
||||
|
||||
var/placement_dir = get_dir(user, W)
|
||||
if (!(placement_dir in cardinal))
|
||||
if (!(placement_dir in GLOB.cardinal))
|
||||
to_chat(user, span_warning("You must stand directly in front of the wall you wish to place that on."))
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
stuff_on_wall = 1
|
||||
|
||||
//crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it.
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/T = get_step(W, dir)
|
||||
if (locate(/obj/structure/sign/poster) in T)
|
||||
stuff_on_wall = 1
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return FALSE
|
||||
|
||||
var/placement_dir = get_dir(user, W)
|
||||
if(!(placement_dir in cardinal))
|
||||
if(!(placement_dir in GLOB.cardinal))
|
||||
to_chat(user, span_warning("You must stand directly in front of the wall you wish to place that on."))
|
||||
return FALSE
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
stuff_on_wall = 1
|
||||
|
||||
//crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it.
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/T = get_step(W, dir)
|
||||
if (locate(/obj/structure/sign/poster) in T)
|
||||
stuff_on_wall = 1
|
||||
|
||||
@@ -79,9 +79,9 @@ steam.start() -- spawns the effect
|
||||
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
@@ -147,9 +147,9 @@ steam.start() -- spawns the effect
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(sparks,direction)
|
||||
@@ -382,9 +382,9 @@ steam.start() -- spawns the effect
|
||||
var/direction = src.direction
|
||||
if(!direction)
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
|
||||
sleep(10)
|
||||
step(smoke,direction)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
|
||||
var/direct = pick(alldirs)
|
||||
var/direct = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
|
||||
sleep(1)
|
||||
step(expl,direct)
|
||||
|
||||
@@ -15,49 +15,49 @@
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
GLOB.monkeystart += loc
|
||||
delete_me = TRUE
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
GLOB.newplayer_start += loc
|
||||
delete_me = TRUE
|
||||
if("JoinLate") // Bit difference, since we need the spawn point to move.
|
||||
latejoin += src
|
||||
GLOB.latejoin += src
|
||||
simulated = TRUE
|
||||
//delete_me = TRUE // see above, moving, always use this list with get_turf
|
||||
if("JoinLateGateway")
|
||||
latejoin_gateway += loc
|
||||
latejoin += loc //VOREStation Addition
|
||||
GLOB.latejoin_gateway += loc
|
||||
GLOB.latejoin += loc //VOREStation Addition
|
||||
delete_me = TRUE
|
||||
if("JoinLateElevator")
|
||||
latejoin_elevator += loc
|
||||
GLOB.latejoin_elevator += loc
|
||||
delete_me = TRUE
|
||||
if("JoinLateCryo")
|
||||
latejoin_cryo += loc
|
||||
GLOB.latejoin_cryo += loc
|
||||
delete_me = TRUE
|
||||
if("JoinLateCyborg")
|
||||
latejoin_cyborg += loc
|
||||
GLOB.latejoin_cyborg += loc
|
||||
delete_me = TRUE
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
GLOB.prisonwarp += loc
|
||||
delete_me = TRUE
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
GLOB.holdingfacility += loc
|
||||
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("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
GLOB.prisonsecuritywarp += loc
|
||||
delete_me = TRUE
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
GLOB.blobstart += loc
|
||||
delete_me = TRUE
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
GLOB.xeno_spawn += loc
|
||||
delete_me = TRUE
|
||||
if("endgame_exit")
|
||||
endgame_safespawns += loc
|
||||
@@ -67,7 +67,7 @@
|
||||
delete_me = TRUE
|
||||
//VOREStation Add Start
|
||||
if("vinestart")
|
||||
vinestart += loc
|
||||
GLOB.vinestart += loc
|
||||
delete_me = TRUE
|
||||
//VORE Station Add End
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/effect_system_type = null // Which effect system to attach.
|
||||
|
||||
var/effect_amount = 10 // How many effect objects to create on each interval. Note that there's a hard cap on certain effect_systems.
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in cardinal directions.
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in GLOB.cardinal directions.
|
||||
var/effect_forced_dir = null // If set, effects emitted will always move in this direction.
|
||||
|
||||
/obj/effect/map_effect/interval/effect_emitter/Initialize(mapload)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/human/Initialize(mapload)
|
||||
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)
|
||||
. = ..()
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/robot/Initialize(mapload)
|
||||
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)
|
||||
. = ..()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/effect/temp_visual/Initialize(mapload)
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
set_dir(pick(global.cardinal))
|
||||
set_dir(pick(global.GLOB.cardinal))
|
||||
|
||||
spawn(duration)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user