proc
WeaponShop()
return \
var/obj/sword = new
sword.icon = 'items.dmi'
sword.icon_state = "sword"
{"<html><b><center><body bgcolor=black><font color=red><font size=5><font face=verdana>Weapon Shop</center></font><font color=green size=3><IMG CLASS=icon SRC=\ref[sword.icon] ICONSTATE='[sword.icon_state]'> Sword (500 gold)"}
return
mob/shopkeeper
weapons
verb/Buy()
set src in oview(1)
src << browse(WeaponShop(),"window=weaponshop")
The browser window pops-up, but the sword icon is the little x (a.k.a the x for images not found)
Can anyone help me?
- You need to use browse_rsc() on the icons.
- You need to reference the icons as normal images, like this:
<img src='whatever.dmi'>
Look up browse_rsc() in the reference for more information.