mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
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:
co-authored by
Arkatos1
Azarak
parent
1c64cd2e4c
commit
a2511bc8bb
@@ -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>")
|
||||
|
||||
Reference in New Issue
Block a user