Removes Last Minute Autoantag

Autotraitor and other latespawning modes that may exist in the future should no longer spawn an antag if the shuttle's warming up or in transit.
It will also not spawn antags in the last 20 minutes of the round.  If the round gets extended due to a vote, it'll start again until the last 20 minutes of that hour.
This commit is contained in:
Neerti
2017-01-11 23:21:04 -05:00
parent 1efa9988e3
commit da34b5c8f0

View File

@@ -31,6 +31,16 @@
if(emergency_shuttle.departed || !round_autoantag)
return
if(emergency_shuttle.shuttle && (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP || emergency_shuttle.shuttle.moving_status == SHUTTLE_INTRANSIT))
return // Don't do anything if the shuttle's coming.
var/mills = round_duration_in_ticks
var/mins = round((mills % 36000) / 600)
var/hours = round(mills / 36000)
if(hours >= 2 && mins >= 40) // Don't do anything in the last twenty minutes of the round, as well.
return
if(world.time < next_spawn)
return