A Problem With Images and Overlays in Developer Help
|
|
I was working on a system to update a player's icon based on what gear the mob was wearing. It was a simple matter of adding an image based on the object to the mob's overlays when the object is worn and remove it when the obj is removed. Then I ran into a problem. When the mob is saved via Deadron's character handling lib and reloaded, the same process to remove the image doesn't seem to work anymore. Why? As far as I can tell
mob.overlays+=image(obj.icon, icon_state="worn")
|
should be reverted by:
mob.overlays-=image(obj.icon, icon_state="worn")
|
What am I doing wrong?
|