mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into announcements
This commit is contained in:
@@ -85,7 +85,10 @@ datum/shuttle_controller
|
||||
proc/timeleft()
|
||||
if(online)
|
||||
var/timeleft = round((endtime - world.timeofday)/10 ,1)
|
||||
if(direction == 1 || direction == 2)
|
||||
if(timeleft > (MIDNIGHT_ROLLOVER/10)) // midnight rollover protection
|
||||
endtime -= MIDNIGHT_ROLLOVER // subtract 24 hours from endtime
|
||||
timeleft = round((endtime - world.timeofday)/10 ,1) // recalculate timeleft
|
||||
if(direction == 1)
|
||||
return timeleft
|
||||
else
|
||||
return SHUTTLEARRIVETIME-timeleft
|
||||
@@ -144,11 +147,9 @@ datum/shuttle_controller
|
||||
if(!online)
|
||||
return
|
||||
var/timeleft = timeleft()
|
||||
if(timeleft > 1e5) // midnight rollover protection
|
||||
timeleft = 0
|
||||
if(location == UNDOCKED)
|
||||
if(direction == -1)
|
||||
if(timeleft >= timelimit)
|
||||
if(timeleft >= timelimit) // Shuttle reaches CentCom after being recalled.
|
||||
online = 0
|
||||
direction = 1
|
||||
endtime = null
|
||||
|
||||
Reference in New Issue
Block a user