ID:271658
 
How would you go about loading multiple png image files into a single dmi file and giving each png its own icon_state?

I would assume it would have to do with using the /icon object but I am not sure how it can be done.

Thanks for any help.

[Solved]
1. First create a blank icon object.
2. Edit and insert your png files.
3. Output new icon object to an icon variable.
4. Output the icon variable to a new dmi file.
// Empty icon object.
var/icon/I = new('empty.dmi')

// Add your png files with their own icon_states.
J = new("images/file.png")
I.Insert(J,"file Icon_state!")

// Output to icon variable
src.icon = I

// Output to .dmi file.
fcopy(src.icon,"pnged_dmi.dmi")


If any one else has a better way. Please share.