When I load an icon from an associated list, stored in a savefile, it loads improperly (AKA: not animated).
Numbered Steps to Reproduce Problem:
Use the following snippet to save something
Use the same snippet to attempt to load it, and it's icon
Code Snippet (if applicable) to Reproduce Problem:
var/list/icons = new/list()
world/New()
if(fexists("characters.ico"))
var/savefile/f=new("characters.ico")
f >> icons
world/Del()
var/savefile/f=new("characters.ico")
f << icons
..()
client/proc/Load()
if(icons.Find(key) && icons[key])
mob.icon=icons[key]
client/proc/Save()
if(icons.Find(key))
icons[key]=mob.icon
else
icons += key
icons[key]=mob.icon
Expected Results:
The icon I load from the list becomes animated, but..
Actual Results:
Outputting my icon after I load, world << icon, shows the full icon, but it appears that the icon will only use the first state.
Does the problem occur:
Every time? Or how often? Every time
In other games? Assuming so
In other user accounts? Yes
On other computers? Yes
When does the problem NOT occur?
When you use a normal savefile.
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.)
Workarounds:
Use a normal savefile.
</<>
Also, it wouldn't hurt to save the icons in a separate directory. It'll make adding parameters to the savefile easier later.