tgstation/-tg-station — pull request #5004 by Menshin (2014-09-28 11:02:53+00:00)
Title: Malf timer polishing/fixes

__Malf timer polishing and fixes__

* Polished malf timer logic :

* The time to take control of the station is _5400 / number_of_hacked_apcs_
* The AI can't start the hostile runtime if less then 3 hacked apcs
* Once the runtime is started, the amount by which the timer is decreased, is dynamically adjusted by destroyed/hacked apcs (down to 1 APC ; at 0 the hostile runtime is stopped, but can resume).

Note that it's _mainly_ the same logic as before, the implementation being modified.

* toggling an APC breaker won't save you anymore : disposing of an hacked apc is done by deconstructing or blowing (or blobing) it !
* added a protection to prevent division by 0 when all hacked apcs are destroyed
* added a midnight rollover check for the MC _last_tick_duration_ (fixes #4905)