ID:261294
 
How would i go about adding a picture from an Faceset in the Stat panel.(This is for my WW2 game)
Super saiyan3 wrote:
How would i go about adding a pictur from an Faceset in the Stat panel.(This is for my WW2 game)

Any icons in the stat panel must be attached to an object. If the icon is assigned to an object already, you simply add that object to the stat list. Otherwise, you can create a place-holder object, assign it the icon, and put that up.
In response to Skysaw
Can you please explain that in less interlectual terms please?(or leave and example)
In response to Super saiyan3
If you want an icon to be added to a statpanel, you have to refer to the atom itself. Heres an example:
obj/Icons/Wind_Pipe
icon = 'WindPipe.dmi'

mob/Stat()
var/obj/wpipe = Locate(/obj/Icons/Wind_Pipe,src.contents) // This stores a reference to an object of type /obj/Icons/Wind_Pipe in the variable wpipe. Look at Locate() below
statpanel("Pictures") // new statpanel called Pictures
stat(wpipe) // now use the reference to the wind pipe object in stat()

proc
Locate(path,list/L) // Locate(the path of the item, the list to search)
for(var/a in L) // for everything in L
if(istype(a,path)) // if that anythings(refered to by a) type is equal to the path your searching for
return a // return it

Hope this didnt confuse you more than help you, and note that it's not tested.

Alathon