mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-23 07:05:13 +01:00
2dfbf0b81a
## About The Pull Request There's a few of these that conflict, mostly relating to timing. This conflicting won't actually break anything but it does muddy "what is this doing" somewhat and it's good to be clear so here we go ## Why It's Good For The Game Makes the MC very slightly harder to confuse yourself with
13 lines
932 B
Plaintext
13 lines
932 B
Plaintext
// Ensures subystem flags are set in a coherent way
|
|
/datum/unit_test/subsystem_flags
|
|
|
|
/datum/unit_test/subsystem_flags/Run()
|
|
for(var/datum/controller/subsystem/sub_lad as anything in subtypesof(/datum/controller/subsystem))
|
|
if((sub_lad::ss_flags & (SS_TICKER | SS_KEEP_TIMING)) == (SS_TICKER | SS_KEEP_TIMING))
|
|
var/list/matching = get_matching_bitflags("ss_flags", sub_lad::ss_flags)
|
|
TEST_FAIL("[sub_lad] {[matching.Join(" | ")]} had both SS_TICKER and SEE_KEEP_TIMING set, this is redundant! You should likely remove SS_KEEP_TIMING.")
|
|
if((sub_lad::ss_flags & (SS_POST_FIRE_TIMING | SS_KEEP_TIMING)) == (SS_POST_FIRE_TIMING | SS_KEEP_TIMING))
|
|
var/list/matching = get_matching_bitflags("ss_flags", sub_lad::ss_flags)
|
|
TEST_FAIL("[sub_lad] {[matching.Join(" | ")]} had both SS_POST_FIRE_TIMING and SEE_KEEP_TIMING set, this is redundant! You should likely remove SS_KEEP_TIMING as SS_POST_FIRE_TIMING overrides it.")
|
|
|