According to the documentation:
// For every turf in locs, this atom will also be in that turf's contents list.
// If loc is not a turf, it will be the only item in the locs list. If loc is null, locs will be empty.
However it seems to be adding the base turf regardless of whether it's inside something else. Furthermore, the turf in locs does not have the object in it's contents.
Numbered Steps to Reproduce Problem:
Use the below code and run the verb test_loc
Code Snippet (if applicable) to Reproduce Problem:
/world/maxx = 1
/client/verb/test_loc()
var/atom/movable/holder = new(locate(1,1,1))
holder.name = "holder"
var/atom/movable/thing = new(holder)
usr << "loc:[thing.loc], locs:[json_encode(thing.locs)]"
if(isturf(thing.locs[1]))
var/turf/place = thing.locs[1]
usr << "turf contents:[json_encode(place.contents)]"
Expected Results:
loc:the holder, locs:["the holder"]
Actual Results:
loc:the holder, locs:["the turf"]
turf contents:["the holder"]
Does the problem occur:
Every time? Or how often? Every time
In other user accounts? Untested
On other computers? Untested
When does the problem NOT occur?
Never
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
I found this while debugging some code in 512 and it happens at least in latest 511. I have no clue where to start looking before then.
Workarounds:
None