This is an issue that's hard to describe with words. As such, I've made a video of this issue in action here: https://www.youtube.com/watch?v=zToOEQ0RoLI
As seen in the video, when a turf is rendering a turf with vis_contents via vis_contents, moving the mob into the vision of the turf that was previously rendered via vis_contents will result in that turf suddenly failing to render it's own vis_contents. This issue occurs consistently, and makes implementing proper multi z-level rendering more of a chore than necessary.
Code Snippet (if applicable) to Reproduce Problem:
/turf/openturf/New()
. = ..()
vis_contents += locate(x,y,z-1)
color = "#666666"
/mob/verb/moveup()
var/turf/T = locate(x, y, z+1)
if(istype(T) && !T.density)
Move(T)
world << "You moved up"
/mob/verb/movedown()
var/turf/T = locate(x, y, z-1)
if(istype(T) && !T.density)
Move(T)
world << "You moved down"
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.)
This issue seems to occur in every version of 512 I've tried.
Workarounds:
Here's the workaround I've been able to implement for this issue. It comes at the cost of moving down z-levels not being as seamless as moving up z-levels
/mob/verb/movedown()
var/turf/T = locate(x, y, z-1)
if(istype(T) && !T.density)
Move(T)
world << "You moved down"
if(client)
sight |= BLIND
client.eye = locate(T.x, T.y, max(T.z-1,1))
sleep(2)
sight &= ~BLIND
client.eye = src
I apologize in advance if I accidentally posted this more than once. I've been getting an "unable to save to database" error every time I tried to post this, so I've been making some adjustments to various bits of the post in an attempt to get this to actually post
One thing I should explain about how vis_contents works is that it should never allow you to enter into an infinite loop. That is, whenever an object's vis_contents are being converted into icons for display, the object is temporarily marked as off-limits for recursing into vis_contents again. So if A contains B, B contains C, and C contains A, you'll get A, B, then C, you will get a second icon of A but you won't get a second B because A is still processing.