Objects bigger than a turf and on map border during map expansion won't have their locs' contents set properly.
I'd imagine this also apply to smaller ones that use pixel movement, but untested
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem, something like this, i dunno:
/atom/movable/fun
bound_width = 64
/proc/test()
var/turf/T = locate(world.maxx, world.maxy, 1)
var/atom/movable/fun/F = new(T)
world.maxx += 1
world << "Number of contents at [T.x],[T.y],[T.z]: [length(T.contents)]"
var/turf/N = locate(world.maxx, T.y, T.z)
world << "Number of contents at [N.x],[N.y],[N.z]: [length(N.contents)]"
Expected Results, sorta, give or take:
Number of contents at 10,10,1: 1
Number of contents at 11,10,1: 1
Actual Results, sadly:
Number of contents at 10,10,1: 1
Number of contents at 11,10,1: 0 !!!!!!!! <- here
Does the problem occur:
Every time? Or how often? Yes
In other games? Replicated on another SS13 codebase, but that shares similar backend
In other user accounts? Uh....
On other computers? Yes
When does the problem NOT occur?
When not using atoms more than one turf in height/width, or not performing world map expansion while they're not to border.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Can't say for sure but i believe we've had this problem for 6-12 months.
Workarounds:
loc = loc
(this is not a joke)
Why this happens:
Long story short, usually, putting an /atom somewhere sets its 'loc', and 'contents' of its 'loc' in accordance. For atoms using eg. bound_width or bound_height that border on several turfs, we similarly use the multiple 'locs'.
When you place an atom near map border, it clips outside of the map, but there's nothing to set 'contents' on. However, once you expand the map, new turfs are added, but the contents are not inferred retroactively.
This is noticeable on SS13 because of /tg/ maploader which for some reason expands through X direction while reading map contents. This means multitiles it spawn will past a certain point in dimensions suffer from this, as it keeps expanding in X direction right after instanciating them.
FWIW, In our case @ CM-SS13 we noticed that due to atmospheric map props (... rocks) on one of our maps which would all be lacking collision for over a year (as mob/turf code uses the contents).
Either way i'd believe this is an oversight and irrelevant