mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-27 18:41:59 +00:00
Mining refinery machines are linked to set consoles now.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/obj/machinery/mineral
|
||||
var/id //used for linking machines to consoles
|
||||
|
||||
/**********************Mineral processing unit console**************************/
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console
|
||||
@@ -45,7 +48,10 @@
|
||||
var/area/A = get_area(src)
|
||||
var/best_distance = INFINITY
|
||||
for(var/obj/machinery/mineral/processing_unit/checked_machine in SSmachinery.all_machines)
|
||||
if(!checked_machine.console && A == get_area(checked_machine) && get_dist_euclidian(checked_machine, src) < best_distance)
|
||||
if(id)
|
||||
if(checked_machine.id == id)
|
||||
machine = checked_machine
|
||||
else if(!checked_machine.console && A == get_area(checked_machine) && get_dist_euclidian(checked_machine, src) < best_distance)
|
||||
machine = checked_machine
|
||||
best_distance = get_dist_euclidian(checked_machine, src)
|
||||
if(machine)
|
||||
|
||||
Reference in New Issue
Block a user