ID:2405128
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
You can override layer while creating an image, but you cannot do the same for plane. In the case of an image as a default value for a datum var, this allows layer to be specified right in the var definition, while specifying plane requires using New(). This is just an annoyance, but it's still... well, annoying.
TBH I'm not sure this will happen. The image() proc basically has way too many arguments as it is, and the same request could be made for any of a dozen other appearance vars that aren't part of it.

I think for cases like this it makes more sense to create a subtype of /image for these purposes that already defines the vars you want, and simply call new() on that.

image/sandwich
pixel_x = 8
plane = 3
icon = 'sandwich.dmi'
You know, even though I knew you could override image procs, for some reason it never occurred to me that you could inherit from /image
Indeed; it's actually quite useful.
Currently image() and icon() don't appear to support plane as an argument, only layer. While this is easy enough to work around including it as an argument for either or both would make for much cleaner code. If it is already included, it doesn't appear to be in the reference.
In response to TemporalOroboros
I understand wanting it for image(), so you don't have to do this:
var/image/i = image(...)
i.plane = ...
return i

// can instead do this:
return image(..., plane = ...)

But icon() makes an /icon object which doesn't support layering at all. They're used to create dynamic cached icons that can be saved as .dmi files or embedded into text or used as the icon of an atom or image.
In response to TemporalOroboros
In response to Exxion
Reattached.