[MIRROR] Ports TG Anomalies (#12105)

Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-12-11 07:27:13 -05:00
committed by GitHub
co-authored by Guti Cameron Lennox
parent e7feab24f7
commit 7971b00c5d
48 changed files with 1860 additions and 33 deletions
+16
View File
@@ -0,0 +1,16 @@
/proc/bitfield_to_list(bitfield = 0, list/wordlist)
var/list/return_list = list()
if(islist(wordlist))
var/max = min(wordlist.len, 24)
var/bit = 1
for(var/i in 1 to max)
if(bitfield & bit)
return_list += wordlist[i]
bit = bit << 1
else
for(var/bit_number = 0 to 23)
var/bit = 1 << bit_number
if(bitfield & bit)
return_list += bit
return return_list