ID:2692609
 
Resolved
Regression in 514.1555: Clearing a movable's vis_contents didn't update the object visually.
BYOND Version:514.1556
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 91.0.4472.77
Applies to:Dream Daemon
Status: Resolved (514.1557)

This issue has been resolved.
Descriptive Problem Summary:
Changes to an atom's vis_contents do not take immediate effect until another icon update occurs. The contents will persist on the atom until it's updated in some way. For example, having its invisibility value changed, or changing the direction it's facing on a directional sprite.

also occurs if removing the vis_locs entry on the item in the vis_contents instead

Numbered Steps to Reproduce Problem:
1. Add item to vis_contents
2. remove item from vis_contents
3. observe that the visual appearance of the atom is unchanged
4. cause some sort of update to the atom, such as altering its invis value or turning, if the sprite is multi directional. The visual contents that should have been removed already will vanish.

Code Snippet (if applicable) to Reproduce Problem:
world
name = "Test Case"
mob = /mob/player

mob/player
icon = 'icons/player.dmi'
var/obj/cheese/O = null

New()
O = new

verb/put_into_vis_contents()
src.vis_contents += O
verb/remove_from_vis_content()
src.vis_contents -= O
verb/make_invis_and_then_vis_again()
src.invisibility = 1
src.invisibility = 0
obj/cheese
icon = 'icons/cheese.dmi'
turf/floor
icon = 'icons/floor.dmi'


Expected Results:
Changes to vis_contents take immediate effect
Actual Results:
Changes to vis_contents are queued until some other icon update occurs
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?
Byond version 514.1554 and below
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.)
It does not occur in Byond version 514.1554 and below
Workarounds:
Downgrade to version 514.1554
Ah, I think I know what this is, but if you can create a test case that will help.
Here's the full test case zipped up with all needed icons/map:
https://www.dropbox.com/s/2llb4pgfb039ztw/ Your%20First%20World.zip?dl=0

Just use the verb to add the cheese to your viscontents, then click the other verb to remove and notice that it doesnt go away

Then you can either walk around to make it go away or use the invis toggle verb
Lummox JR resolved issue with message:
Regression in 514.1555: Clearing a movable's vis_contents didn't update the object visually.