Operating System: Windows ME
Detailed Problem Description:
I've already solved this one, I believe. Not sure if it's a bug, or just a lack of implementation, or what.
Anyways. My goal here was to make a make a procedure that allows you to select different portions of the map and output each turf's icon in that selection to a new icon with different icon states. For an example of where this might be used, you may wish to employ it for aid when converting a large .png down to separate .dmi files.
The problem came in with the new icon. It seems var/icon/I = new() doesn't work as I would've hoped. The result returns true with isicon(), yet I would have no luck when attempting to make additions to that icon via the Insert() procedure.
Fair enough. But, I encountered more problems. It also seems that isicon() does not return true when using file() with double quotations to locate an icon that may or may not exist, regardless of if the returned file ends up being a valid icon or not.
Code Snippet to Reproduce Problem (enclose in DM tags):
turf/Click()
var/icon/I = new()
if(isicon(I))
world << "Yep"
else
world << "Nope"
I.Insert(icon(icon,icon_state),"insert icon_state")
fcopy(I,"result.dmi")
Have a look at result.dmi to see what happened.
Does the problem occur:
Every time? Or how often? Every Time
icon/New() takes a file argument at the very least. You can't simply create a blank one by not passing it a file (although that would be nice).
I suggest making a file called blank.dmi which includes just a single transparent icon as the default state.
Lummox JR