mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-16 10:27:14 +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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user