mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
tgui usr to ui.user
This commit is contained in:
@@ -14,20 +14,20 @@
|
||||
// "engines_charging" = ((shuttle.last_move + (shuttle.cooldown SECONDS)) > world.time), // Replaced by longer warmup_time
|
||||
)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/multi/tgui_act(action, list/params)
|
||||
/obj/machinery/computer/shuttle_control/multi/tgui_act(action, list/params, datum/tgui/ui)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
var/datum/shuttle/autodock/multi/shuttle = SSshuttles.shuttles[shuttle_tag]
|
||||
if(!istype(shuttle))
|
||||
to_chat(usr, span_warning("Unable to establish link with the shuttle."))
|
||||
to_chat(ui.user, span_warning("Unable to establish link with the shuttle."))
|
||||
return TRUE
|
||||
|
||||
switch(action)
|
||||
if("pick")
|
||||
var/dest_key = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations())
|
||||
if(dest_key && CanInteract(usr, GLOB.tgui_default_state))
|
||||
shuttle.set_destination(dest_key, usr)
|
||||
var/dest_key = tgui_input_list(ui.user, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations())
|
||||
if(dest_key && CanInteract(ui.user, GLOB.tgui_default_state))
|
||||
shuttle.set_destination(dest_key, ui.user)
|
||||
return TRUE
|
||||
|
||||
if("toggle_cloaked")
|
||||
@@ -35,7 +35,7 @@
|
||||
return TRUE
|
||||
shuttle.cloaked = !shuttle.cloaked
|
||||
if(shuttle.legit)
|
||||
to_chat(usr, span_notice("Ship ATC inhibitor systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be notified of our arrival."))
|
||||
to_chat(ui.user, span_notice("Ship ATC inhibitor systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be notified of our arrival."))
|
||||
else
|
||||
to_chat(usr, span_warning("Ship stealth systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival."))
|
||||
to_chat(ui.user, span_warning("Ship stealth systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival."))
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user