Adds a unit test that makes sure subsystem flags make sense (#96022)

## 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
This commit is contained in:
LemonInTheDark
2026-05-11 08:20:24 -07:00
committed by GitHub
parent f1a2ab4f76
commit 2dfbf0b81a
5 changed files with 32 additions and 13 deletions
@@ -103,20 +103,14 @@
return "<a href='byond://?_src_=vars;[HrefToken()];[link_vars]'>/list ([list_value.len])</a>"
// if it's a number, is it a bitflag?
var/list/valid_bitflags
if(!isnum(name))
valid_bitflags = get_valid_bitflags(name)
var/list/matching_bitflags = get_matching_bitflags(name, value)
if(!length(valid_bitflags))
return "<span class='value'>[VV_HTML_ENCODE(value)]</span>"
if(!isnull(matching_bitflags))
if(length(matching_bitflags))
return "[VV_HTML_ENCODE(matching_bitflags.Join(", "))]"
return "NONE"
var/list/flags = list()
for (var/bit_name in valid_bitflags)
if (value & valid_bitflags[bit_name])
flags += bit_name
if(length(flags))
return "[VV_HTML_ENCODE(flags.Join(", "))]"
return "NONE"
return "<span class='value'>[VV_HTML_ENCODE(value)]</span>"
/datum/proc/debug_variable_value(name, level, datum/owner, sanitize, display_flags)
if("[src]" != "[type]") // If we have a name var, let's use it.