tgui: Interface improvements (#990)

Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-09-26 16:46:14 +02:00
committed by GitHub
co-authored by Arkatos1 Azarak
parent 1c64cd2e4c
commit a2511bc8bb
14 changed files with 133 additions and 148 deletions
+13
View File
@@ -49,6 +49,8 @@
data["status"] = "Igniting"
if(SHUTTLE_IDLE)
data["status"] = "Idle"
if(SHUTTLE_RECHARGING)
data["status"] = "Recharging"
else
data["status"] = "In Transit"
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
@@ -70,6 +72,15 @@
data["status"] = "Locked"
return data
/**
* Checks if we are allowed to launch the shuttle, for special cases
*
* Arguments:
* * user - The mob trying to initiate the launch
*/
/obj/machinery/computer/shuttle/proc/launch_check(mob/user)
return TRUE
/obj/machinery/computer/shuttle/ui_act(action, params)
. = ..()
if(.)
@@ -80,6 +91,8 @@
switch(action)
if("move")
if(!launch_check(usr))
return
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
if(M.launch_status == ENDGAME_LAUNCHED)
to_chat(usr, "<span class='warning'>You've already escaped. Never going back to that place again!</span>")