ID:121885
 
Not a bug
BYOND Version:493
Operating System:Windows XP Home
Web Browser:Firefox 8.0.1
Applies to:Dream Seeker
Status: Not a bug (494)

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:
It seems both overlays and underlays adopt the icon of the atom they're tied to when their own icon is null. If you add an overlay with a null icon and pixel_x=32 to a blue circle, two blue circles will appear. This effects both atoms and images being used as overlays.

Numbered Steps to Reproduce Problem:
- Create something with its icon variable set to null.
- Add it as an overlay or underlay to something else.

Code Snippet to Reproduce Problem:
http://dl.dropbox.com/u/9855840/Test%20Environment_src.zip

Expected Results:
An invisible overlay or underlay should be added.

Actual Results:
The overlay or underlay adopts the icon of the atom it's being attached to.

Does the problem occur:
Every time? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes, Metamorphman independently discovered the bug as well.

Did the problem NOT occur in any earlier versions?
This seems to be a really old bug. It happens in v470 which is about how far back I can test without completely reinstalling BYOND.

Workarounds:
Use blank icons in place of null icons.
This is intended behavior. The blank icon workaround is the correct approach if you want a totally transparent icon to be used.
Wait, what? Why is this the intended behavior? That doesn't make any sense to me.

Shouldn't something with a null icon be invisible?

If you wanted the overlay to have the icon of its source object you should have to manually set it to that, not the other way around to make it blank.
Overlays can be something as simple as an icon_state. If you change icons, it will switch to using that state in a new icon. Existing games take advantage of this, so there is no way to change this without breaking them.