mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +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:
@@ -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>")
|
||||
|
||||
@@ -740,8 +740,6 @@
|
||||
else
|
||||
dst = destination
|
||||
return "In transit to [dst?.name || "unknown location"]"
|
||||
else if(mode == SHUTTLE_RECHARGING)
|
||||
return "[docked_at], recharging [getTimerStr()]"
|
||||
else
|
||||
return docked_at
|
||||
|
||||
|
||||
@@ -17,23 +17,16 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/ui_act(action, params)
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("move")
|
||||
if(istype(src, /obj/machinery/computer/shuttle/syndicate/drop_pod))
|
||||
if(!is_centcom_level(z))
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = circuit
|
||||
if(board?.challenge && world.time < SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(usr, "<span class='warning'>You've issued a combat challenge to the station! You've got to give them at least [DisplayTimeText(SYNDICATE_CHALLENGE_TIMER - world.time)] more to allow them to prepare.</span>")
|
||||
return
|
||||
board.moved = TRUE
|
||||
return ..()
|
||||
/obj/machinery/computer/shuttle/syndicate/launch_check(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = circuit
|
||||
if(board?.challenge && world.time < SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(user, "<span class='warning'>You've issued a combat challenge to the station! You've got to give them at least [DisplayTimeText(SYNDICATE_CHALLENGE_TIMER - world.time)] more to allow them to prepare.</span>")
|
||||
return FALSE
|
||||
board.moved = TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/recall
|
||||
name = "syndicate shuttle recall terminal"
|
||||
@@ -50,6 +43,15 @@
|
||||
shuttleId = "steel_rain"
|
||||
possible_destinations = null
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/launch_check(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!is_centcom_level(z))
|
||||
to_chat(user, "<span class='warning'>Pods are one way!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/syndicate
|
||||
name = "syndicate shuttle navigation computer"
|
||||
desc = "Used to designate a precise transit location for the syndicate shuttle."
|
||||
|
||||
Reference in New Issue
Block a user