mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
Adds supply shuttle datum
This commit is contained in:
@@ -110,13 +110,22 @@
|
||||
update_display(line1, line2)
|
||||
if(4) // supply shuttle timer
|
||||
var/line1 = "SUPPLY"
|
||||
var/line2
|
||||
if(supply_shuttle.moving)
|
||||
var/line2 = ""
|
||||
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_shuttle.get_shuttle()
|
||||
if (!shuttle)
|
||||
line2 = "Error"
|
||||
else if(shuttle.has_eta())
|
||||
line2 = get_supply_shuttle_timer()
|
||||
if(lentext(line2) > CHARS_PER_LINE)
|
||||
line2 = "Error"
|
||||
else if (shuttle.moving_status == SHUTTLE_WARMUP)
|
||||
if (shuttle.at_station())
|
||||
line2 = "Launch"
|
||||
else
|
||||
line2 = "ETA"
|
||||
else
|
||||
if(supply_shuttle.at_station)
|
||||
if(shuttle.at_station())
|
||||
line2 = "Docked"
|
||||
else
|
||||
line1 = ""
|
||||
@@ -162,8 +171,12 @@
|
||||
return ""
|
||||
|
||||
proc/get_supply_shuttle_timer()
|
||||
if(supply_shuttle.moving)
|
||||
var/timeleft = round((supply_shuttle.eta_timeofday - world.timeofday) / 10,1)
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_shuttle.get_shuttle()
|
||||
if (!shuttle)
|
||||
return "Error"
|
||||
|
||||
if(shuttle.has_eta())
|
||||
var/timeleft = round((shuttle.arrive_time - world.time) / 10,1)
|
||||
if(timeleft < 0)
|
||||
return "Late"
|
||||
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
|
||||
Reference in New Issue
Block a user