I plan on having my equipment show in a browser pop-up. I've gotten the code to work so far, except for one small problem: it won't replace previously browsed images.
For example, let's say that I'm not wearing any armor.
I use
M<<browse_rsc('blank.dmi',"armor.png")
Now, if I equip the armor, and run the proc again, it will use
M<<browse_rsc(icon(armor.icon, armor.icon_state),"armor.png")
If I wear the armor before calling the proc, everything shows up fine. If I call the proc while wearing nothing, and then call it with stuff equipped, it still shows blank.
I thought that perhaps the entry of "armor.png" was already in the cache, so it wouldn't be changed.
Ok, so I now save it as "armor[world.time].png". Still no dice.
Is there anyway to clear the cache or get it to recognize a new image under an already browse_rsc()'d name?
Another way to go is create a var for the image. Like below but it might take up alot of space if the browser comes up ALOT.
mob/var/armorvar = 0
mob/verb/armor()
src.armorvar += 1
//Define the var Armor.
M<<browse_rsc(icon(armor.icon, armor.icon_state),"armor[armorvar].png")
//Whatever here
I really don't know. Wait till some good programmer (Not me) like Lummox replies. I'm sure he can help.
- Hated Anarchy