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:
Fluffy
2024-10-25 17:56:02 +00:00
committed by GitHub
parent e8107c3170
commit d9c44532fc
146 changed files with 377 additions and 281 deletions
+1 -1
View File
@@ -242,7 +242,7 @@
return 0
if(is_train_head())
if(direction == reverse_direction(dir) && tow)
if(direction == REVERSE_DIR(dir) && tow)
//Allow the engine to rotate, but only if there's not another piece in the new direction
//Basically, to allow the first rotation at spawn to align with the rest of the convoy, without it being a CBT
if(!(locate(/obj/vehicle/train) in get_step(src, direction)))
+1 -1
View File
@@ -177,7 +177,7 @@
if(dir == T_dir) //if car is ahead
src.attach_to(T, user)
else if(reverse_direction(dir) == T_dir) //else if car is behind
else if(REVERSE_DIR(dir) == T_dir) //else if car is behind
T.attach_to(src, user)
//returns 1 if this is the lead car of the train
+1 -1
View File
@@ -167,7 +167,7 @@
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
pulse2.anchored = 1
pulse2.set_dir(pick(GLOB.cardinal))
pulse2.set_dir(pick(GLOB.cardinals))
QDEL_IN(pulse2, 10)
if(on)