When an icon is created and nothing is passed to its constructor the DrawBox proc doesn't fail but it doesn't do anything.
Code Snippet (if applicable) to Reproduce Problem:
#define DEBUG
mob
Login()
var/icon/i = new()
// var/icon/i = new('icons.dmi')
world << "[i.Width()] x [i.Height()]"
i.DrawBox(rgb(0,0,0,255),1,1,32,32)
world << "\icon[i]"
world << "Done!"
Expected Results:
I expect both (using the empty and non-empty icon constructors) to result in printing a 32x32 black box.
Actual Results:
When you use the empty constructor the icon's size is reported as being 32x32 but when the icon is output nothing is shown. The proc executes to completion ("Done!" is printed) but no icon or error message is printed.
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
Every time.
When does the problem NOT occur?
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.)
Not that I know of.
Workarounds:
I'd like to be able to create a blank icon without knowing the name of an icon file or requiring an icon to be in the .rsc file. For this reason I haven't found any satisfactory workarounds.
I'd definitely like to improve on our capacity to edit icons at runtime since creating a new blank state would be a highly desirable thing to do. A workaround in the meantime is to have an icon file with a single blank state.