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 19:56:02 +02:00
committed by GitHub
parent e8107c3170
commit d9c44532fc
146 changed files with 377 additions and 281 deletions
+3 -3
View File
@@ -355,19 +355,19 @@ GLOBAL_LIST_EMPTY_TYPED(alloy_data, /datum/alloy)
. = ..()
//Locate our output and input machinery.
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(input_spot)
input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine
break
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(output)
output = get_turf(output_spot)
break
if(!input)
input = get_step(src, GLOB.reverse_dir[dir])
input = get_step(src, REVERSE_DIR(dir))
if(!output)
output = get_step(src, dir)