Running a for loop on datums does not return atoms as well. As atoms are a child of datums, they should be included as well.
Numbered Steps to Reproduce Problem:
1. do a for loop for every datum in world, outputting somewhere
2. Observe that only datum specifically are returned, instead of everything.
Code Snippet (if applicable) to Reproduce Problem:
/datum/thingone
name = "the datum"
/obj/thingtwo
name = "the object"
var/holder = new /datum/thingone
var/object = new /obj/thingtwo
/proc/findthings()
for(var/datum/thing)
world.log << "[thing]"
Expected Results:
All types but client are returned as datum is the parent
Actual Results:
Only specifically datums are returned
Does the problem occur:
Every time? Or how often?
Every time
In other games?
Yes
In other user accounts?
Yes
On other computers?
Yes
When does the problem NOT occur?
It always occurs
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
The code utilizing it was implemented in 508, so that's the last version I definitely know of it working.
Workarounds:
Create a seperate loop for atoms
As doing this operation is performance heavy, we haven't utilized the code for it in months. The code is used for debugging the garbage collection system, and is usually behind a disabled define.
The relevant code that I noticed this at is here
https://github.com/tgstation/tgstation/blob/master/code/ controllers/subsystem/garbage.dm#L254