ID:123103
 
BYOND Version:493
Operating System:Windows 7 Pro
Web Browser:Firefox 9.0.1
Applies to:Dream Maker
Status: Deferred

This issue may be low priority or very difficult to fix, and has been put on the back burner for the time being.
Descriptive Problem Summary:
When using Dream Maker's map editor, you can "insert" a turf over another turf, and the old turf will be added as an underlay to the new one. However, if the icon of the new turf is completely opaque, the "Insert" option is disabled (in the right-click menu and via the mouse) and it instead replaces the turf. This makes sense, because the underlay of the old turf wouldn't be visible anyways.

However, now that icon files can be any dimensions, if you try to insert a fully opaque 16x16 turf over a 32x32 turf, it incorrectly determines that the 16x16 turf covers the old turf and replaces it instead of inserting above it.

Numbered Steps to Reproduce Problem:
1) Create a 32x32 icon file with one state that is a solid color
2) Create a 16x16 icon with one state that is a solid color
3) Create two turf definitions, one for each icon file
4) Place the turf with 32x32 icon on the map
5) Attempt to insert the turf with the 16x16 icon over it
6) See that insert is disabled, and it instead replaces it, exposing the "void"
7) Open the 16x16 icon file, and remove a single pixel so that it is not completely opaque
8) Attempt to insert the 16x16 turf over the 32x32 turf again
9) See that insert works as expected

Code Snippet (if applicable) to Reproduce Problem:
turf
A/icon = '32grass.dmi'
B/icon = '16box.dmi'


Expected Results:
The map editor should consider the relative sizes of the icons when determining whether the new turf completely covers the existing one.

Actual Results:
The map editor only considers whether the new icon is fully opaque or not, causing the smaller 16x16 icon to replace (instead of inserting over) the original 32x32 icon.

Does the problem occur:
Every time? Or how often? Every time
In other games? Clean DM environment
In other user accounts? No other accounts, on administrator
On other computers? I believe so

When does the problem NOT occur?
If the icon of the turf you are inserting is not fully opaque.

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.)
Unknown.

Workarounds:
Make a single pixel of the icon have 254 alpha (this change can be done temporarily, until all the turfs have been placed)
This is actually part of a larger problem that comes about when overlapping turfs of different sizes, in that the mapper really represents the turf at at the lower-left coordinate. So depending on where you overlay the smaller turf, it will treat the overlap differently. Also, even with the fix in place, overlapped turfs will not necessarily draw correctly due to the order of operations. To do this properly, we'd have to make sure to always draw larger turfs before smaller ones.

Because mixing overlapping turfs is a somewhat unusual operation, this is pretty low-priority. We will revisit it when we next upgrade the map-editor, since we want to address all of the above issues as well.
Tom changed status to 'Deferred'