mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
Refactored directionals (#20082)
Refactored directionals, ported lists of directions from TG, got rid of useless proc to get the reverse direction.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
if(cached_icon)
|
||||
icon = cached_icon
|
||||
|
||||
set_dir(pick(GLOB.cardinal))
|
||||
set_dir(pick(GLOB.cardinals))
|
||||
pixel_x = -32 + rand(-8, 8)
|
||||
pixel_y = -32 + rand(-8, 8)
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
while(pending.len)
|
||||
for(var/turf/current in pending)
|
||||
for(var/D in GLOB.cardinal)
|
||||
for(var/D in GLOB.cardinals)
|
||||
var/turf/target = get_step(current, D)
|
||||
if(wallList)
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
for(var/direction in GLOB.cardinal)
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!T)
|
||||
continue
|
||||
|
||||
@@ -33,7 +33,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 GLOB.cardinal)
|
||||
for(var/d in GLOB.cardinals)
|
||||
var/turf/simulated/target = get_step(src,d)
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
||||
@@ -88,7 +88,7 @@
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S))
|
||||
return
|
||||
for(var/d in GLOB.cardinal)
|
||||
for(var/d in GLOB.cardinals)
|
||||
var/turf/simulated/target = get_step(src,d)
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
||||
@@ -149,7 +149,7 @@
|
||||
if(amount < 15) return
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S)) return
|
||||
for(var/d in GLOB.cardinal)
|
||||
for(var/d in GLOB.cardinals)
|
||||
var/turf/simulated/target = get_step(src,d)
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return
|
||||
|
||||
var/placement_dir = get_dir(user, W)
|
||||
if (!(placement_dir in GLOB.cardinal))
|
||||
if (!(placement_dir in GLOB.cardinals))
|
||||
to_chat(user, SPAN_WARNING("You must stand directly in front of the wall you wish to place that on."))
|
||||
return
|
||||
|
||||
@@ -47,7 +47,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 GLOB.cardinal)
|
||||
for (var/dir in GLOB.cardinals)
|
||||
var/turf/T = get_step(W, dir)
|
||||
if (locate(/obj/structure/sign/poster) in T)
|
||||
stuff_on_wall = 1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
icon_state = "drift"
|
||||
|
||||
/obj/effect/floor_decal/snowdrift/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
supplied_dir = pick(GLOB.cardinal)
|
||||
supplied_dir = pick(GLOB.cardinals)
|
||||
return ..()
|
||||
|
||||
/obj/effect/floor_decal/snowdrift/large
|
||||
@@ -22,5 +22,5 @@
|
||||
pixel_x = -16
|
||||
|
||||
/obj/effect/floor_decal/snowdrift/large/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
supplied_dir = pick(GLOB.cardinal)
|
||||
supplied_dir = pick(GLOB.cardinals)
|
||||
return ..()
|
||||
|
||||
@@ -78,7 +78,7 @@ 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(GLOB.cardinal)
|
||||
direction = pick(GLOB.cardinals)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
@@ -282,7 +282,7 @@ steam.start() -- spawns the effect
|
||||
var/direction = src.direction
|
||||
if(!direction)
|
||||
if(src.cardinals)
|
||||
direction = pick(GLOB.cardinal)
|
||||
direction = pick(GLOB.cardinals)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
/obj/effect/overlay/temp/New()
|
||||
..()
|
||||
if(randomdir)
|
||||
dir = (pick(GLOB.cardinal))
|
||||
dir = (pick(GLOB.cardinals))
|
||||
flick("[icon_state]", src)
|
||||
|
||||
QDEL_IN(src, duration)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter/Initialize(mapload, set_dir, _color)
|
||||
if(set_dir in GLOB.cornerdirs)
|
||||
if(set_dir in GLOB.diagonals)
|
||||
icon_state = "[splatter_type][pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "[splatter_type][pick(3, 4, 5)]"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(new_dir)
|
||||
set_dir(new_dir)
|
||||
else if(randomdir)
|
||||
set_dir(pick(GLOB.cardinal))
|
||||
set_dir(pick(GLOB.cardinals))
|
||||
|
||||
QDEL_IN(src, duration)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user