mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Sanity check shuttle code.
This commit is contained in:
@@ -72,6 +72,7 @@ datum/shuttle_controller
|
||||
// returns the time (in seconds) before shuttle arrival
|
||||
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
|
||||
proc/timeleft()
|
||||
|
||||
if(online)
|
||||
var/timeleft = round((endtime - world.timeofday)/10 ,1)
|
||||
if(direction == 1 || direction == 2)
|
||||
@@ -106,6 +107,8 @@ datum/shuttle_controller
|
||||
var/timeleft = timeleft()
|
||||
if(timeleft > 1e5) // midnight rollover protection
|
||||
timeleft = 0
|
||||
if(timeleft < 0) // Sanity
|
||||
timeleft = 0
|
||||
switch(location)
|
||||
if(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user