mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Ports tgstation/-tg-station#16569, World Topic() changes
Full changes:
- World Topic() is now standardized to use if("parameter" in topic_list)
instead of an amalgamation of findtext() and if(topic == "parameter").
- Comms password is now verified at the top of world/Topic() and sets a
variable to true if it is present and correct.
- "status" now returns extra information if the comms_password is
provided and correct.
Misc changes:
- Shuttle text has been standardized as a proc on mobile docking ports.
This is used by status/supply displays and mob/Stat() for the -ETA- etc stuff.
This commit is contained in:
+3
-22
@@ -995,28 +995,9 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/show_stat_emergency_shuttle_eta()
|
||||
var/obj/docking_port/mobile/emergency/E = shuttle_master.emergency
|
||||
|
||||
if(E.mode >= SHUTTLE_RECALL)
|
||||
var/message = ""
|
||||
|
||||
var/timeleft = E.timeLeft()
|
||||
message = "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
|
||||
switch(E.mode)
|
||||
if(SHUTTLE_RECALL, SHUTTLE_ESCAPE)
|
||||
message = "ETR-[message]"
|
||||
if(SHUTTLE_CALL)
|
||||
message = "ETA-[message]"
|
||||
if(SHUTTLE_DOCKED)
|
||||
if(timeleft < 5)
|
||||
message = "Departing..."
|
||||
else
|
||||
message = "ETD-[message]"
|
||||
if(SHUTTLE_STRANDED)
|
||||
message = "ETA-ERR"
|
||||
if(SHUTTLE_ENDGAME)
|
||||
return
|
||||
|
||||
stat(null, message)
|
||||
var/ETA = shuttle_master.emergency.getModeStr()
|
||||
if(ETA)
|
||||
stat(null, "[ETA] [shuttle_master.emergency.getTimerStr()]")
|
||||
|
||||
/mob/proc/add_stings_to_statpanel(var/list/stings)
|
||||
for(var/obj/effect/proc_holder/changeling/S in stings)
|
||||
|
||||
@@ -563,6 +563,32 @@
|
||||
return round(callTime/divisor, 1)
|
||||
return max( round((timer+callTime-world.time)/divisor,1), 0 )
|
||||
|
||||
// returns 3-letter mode string, used by status screens and mob status panel
|
||||
/obj/docking_port/mobile/proc/getModeStr()
|
||||
switch(mode)
|
||||
if(SHUTTLE_RECALL)
|
||||
return "RCL"
|
||||
if(SHUTTLE_CALL)
|
||||
return "ETA"
|
||||
if(SHUTTLE_DOCKED)
|
||||
return "ETD"
|
||||
if(SHUTTLE_ESCAPE)
|
||||
return "ESC"
|
||||
if(SHUTTLE_STRANDED)
|
||||
return "ERR"
|
||||
return ""
|
||||
|
||||
// returns 5-letter timer string, used by status screens and mob status panel
|
||||
/obj/docking_port/mobile/proc/getTimerStr()
|
||||
if(mode == SHUTTLE_STRANDED)
|
||||
return "--:--"
|
||||
|
||||
var/timeleft = timeLeft()
|
||||
if(timeleft > 0)
|
||||
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
else
|
||||
return "00:00"
|
||||
|
||||
/obj/docking_port/mobile/proc/getStatusText()
|
||||
var/obj/docking_port/stationary/dockedAt = get_docked()
|
||||
. = (dockedAt && dockedAt.name) ? dockedAt.name : "unknown"
|
||||
|
||||
Reference in New Issue
Block a user