ID:117422
 
Not a bug
BYOND Version:489
Operating System:Windows 7 Pro 64-bit
Web Browser:Firefox 6.0
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND Developer forums.
Descriptive Problem Summary:
When you add an image to an object's overlays, and that image has no icon, the image added takes on the icon of the base object.

Numbered Steps to Reproduce Problem:
  1. Create an image using either the image proc or new with no icon
  2. Change the image's pixel_x or pixel_y
  3. Add the image to an object's overlays


Code Snippet (if applicable) to Reproduce Problem:
Here is a demo of the bug.
//This is the entire code in the project
mob
icon = 'mob.dmi'
Login()
..()
var/image/I = new
I.pixel_x = 50
overlays += I //adds 'mob.dmi' to the overlays
var/turf/T = locate(5, 5, 1)
T.overlays += I //adds 'turf.dmi'

turf
icon = 'turf.dmi'


Expected Results:
The image doesn't show up at all.

Actual Results:
The image has the icon of the base object.

Does the problem occur:
Every time? Or how often? Always.
In other games? Yes.
In other user accounts? N/A
On other computers? Have not tested.

When does the problem NOT occur?
It always occurs. You have to change the pixel_x or pixel_y, otherwise you won't be able to tell, though.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
I'm not sure. I only recently encountered the bug.

Workarounds:
Set the image's icon/icon_state to an icon or icon_state that is blank.

Notes:
It is sometimes useful to have an overlay with a blank icon. For example, if you want to display screen text that is attached to an object, you could add every letter to the overlays of the image, and then add the image to the overlays of the object. The image itself shouldn't have an icon, in that case, since the overlays of it are what it displays.
Overlays without an icon may be useful in some rare circumstances (the one you described doesn't sound like one of them), but that would fall in the realm of a feature request. The fact that this isn't supported now is not a bug.
Thought you might say that.
It was worth a try.
If for any reason you needed this behavior for overlays, you could easily work around it by providing an actual blank icon.