* Polished the malf timer logic

* added a protection to prevent division by 0 when all hacked apcs are destroyed
* added a midnight rollover check for the MC (fixes #4905)
* toggling breakers won't add/remove a hacked APC from the AI apcs pool anymore
This commit is contained in:
Menshin
2014-09-28 12:16:21 +02:00
parent 88d26ee22d
commit ed807f8538
7 changed files with 19 additions and 20 deletions
+4
View File
@@ -118,6 +118,10 @@ var/global/pipe_processing_killed = 0
if(!Failsafe) new /datum/controller/failsafe()
var/currenttime = world.timeofday
if((last_tick_timeofday - currenttime) > 1e5) //midnight rollover protection
last_tick_timeofday -= MIDNIGHT_ROLLOVER
last_tick_duration = (currenttime - last_tick_timeofday) / 10
last_tick_timeofday = currenttime