Merge pull request #32864 from ike709/dir

Fixes some computer dirs
This commit is contained in:
Jordie
2017-11-20 15:42:27 +11:00
committed by CitadelStationBot
parent ac4ca767d0
commit 571985ca5d
6 changed files with 19 additions and 16 deletions
+4 -4
View File
@@ -13,12 +13,12 @@
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
for(var/direction in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, direction))
if(table)
table.computer = src
break
/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -60,7 +60,7 @@
var/alternative_step
if(surgery_step.repeatable)
var/datum/surgery_step/next_step = procedure.get_surgery_next_step()
if(next_step)
if(next_step)
alternative_step = capitalize(next_step.name)
else
alternative_step = "Finish operation"
@@ -129,8 +129,8 @@
/obj/machinery/computer/gulag_teleporter_computer/proc/findteleporter()
var/obj/machinery/gulag_teleporter/teleporterf = null
for(dir in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, dir))
for(var/direction in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction))
if(teleporterf && teleporterf.is_operational())
return teleporterf
+2 -2
View File
@@ -27,8 +27,8 @@
/obj/machinery/computer/teleporter/proc/link_power_station()
if(power_station)
return
for(dir in GLOB.cardinals)
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
for(var/direction in GLOB.cardinals)
power_station = locate(/obj/machinery/teleport/station, get_step(src, direction))
if(power_station)
break
return power_station