Artur
2020-09-02 18:32:54 +03:00
parent d59748ceaa
commit debc300563
4 changed files with 45 additions and 39 deletions
+16 -12
View File
@@ -6,7 +6,6 @@
possible_destinations = "laborcamp_home;laborcamp_away"
req_access = list(ACCESS_BRIG)
/obj/machinery/computer/shuttle/labor/one_way
name = "prisoner shuttle console"
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
@@ -14,14 +13,19 @@
circuit = /obj/item/circuitboard/computer/labor_shuttle/one_way
req_access = list( )
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
if(href_list["move"])
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
if(!M)
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
to_chat(usr, "<span class='warning'>Shuttle is already at the outpost!</span>")
return 0
..()
/obj/machinery/computer/shuttle/labor/one_way/ui_act(action, params)
if(!allowed(usr))
to_chat(usr, "<span class='danger'>Access denied.</span>")
return
switch(action)
if("move")
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
if(!M)
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
return
var/obj/docking_port/stationary/S = M.get_docked()
if(S?.name == "laborcamp_away")
to_chat(usr, "<span class='warning'>Shuttle is already at the outpost!</span>")
return
return ..()