mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Ports "The punisher!"
* From tgstation/tgstation#27196 * The mc will now punish subsystems that overrun their tick allotment with less allotment in later fires. * The punisher also delays the next fire of subsystems that overrun. Because of how this is ends up being calculated, this will almost never actually kick in, but sometimes subsystems like garbage will overrun into multiple ticks, so delaying their next fire is needed. * The punisher does not delay the next fire of SS_TICKER subsystems (tgstation/tgstation#34964) Note: SS_KEEP_TIMING subsystems do not get their next fire delayed.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
var/next_fire = 0 //scheduled world.time for next fire()
|
||||
var/cost = 0 //average time to execute
|
||||
var/tick_usage = 0 //average tick usage
|
||||
var/tick_overrun = 0 //average tick overrun
|
||||
var/state = SS_IDLE //tracks the current state of the ss, running, paused, etc.
|
||||
var/paused_ticks = 0 //ticks this ss is taking to run right now.
|
||||
var/paused_tick_usage //total tick_usage of all of our runs while pausing this run
|
||||
@@ -167,7 +168,7 @@
|
||||
|
||||
|
||||
if(can_fire && !(SS_NO_FIRE & flags))
|
||||
msg = "[round(cost,1)]ms|[round(tick_usage,1)]%|[round(ticks,0.1)]\t[msg]"
|
||||
msg = "[round(cost,1)]ms|[round(tick_usage,1)]%([round(tick_overrun,1)]%)|[round(ticks,0.1)]\t[msg]"
|
||||
else
|
||||
msg = "OFFLINE\t[msg]"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user