mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-21 09:56:53 +01:00
[MDB IGNORE] Smoothing Bitfield Optimizations and Unit Test Upgrades (#4816)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Presorting smoothing lists to improve init time. ## Credits Mostly just taken from tgstation PRs, here's the major ones: https://github.com/tgstation/tgstation/pull/57408 https://github.com/tgstation/tgstation/pull/71719 https://github.com/tgstation/tgstation/pull/71989 And of course my haphazard ports of TG code when something breaks.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Why? Because when you screw up too early in init, total runtimes won't be initialized. You can see why this can be a problem, right?
|
||||
GLOBAL_REAL_VAR(total_runtimes) = 0
|
||||
GLOBAL_VAR_INIT(total_runtimes_seen, 0)
|
||||
GLOBAL_VAR_INIT(total_runtimes, GLOB.total_runtimes || 0)
|
||||
GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
|
||||
GLOBAL_VAR_INIT(total_runtimes_seen, 0)
|
||||
// to detect when someone fucks up royally and breaks error handling with preinit runtimes
|
||||
GLOBAL_REAL_VAR(runtime_skip_once) = FALSE
|
||||
GLOBAL_REAL_VAR(runtime_trap_triggered) = FALSE
|
||||
@@ -18,7 +18,7 @@ GLOBAL_REAL_VAR(runtime_trap_triggered) = FALSE
|
||||
return
|
||||
#endif
|
||||
|
||||
++global.total_runtimes
|
||||
++GLOB.total_runtimes
|
||||
|
||||
var/static/list/error_last_seen = list()
|
||||
var/static/list/error_cooldown = list() /* Error_cooldown items will either be positive(cooldown time) or negative(silenced error)
|
||||
|
||||
Reference in New Issue
Block a user