ID:2473581
 
Resolved
The compiler did not include some vars in turf underlays that impacted their appearance, when those underlays used modified types (vars set in the map editor). This very old bug, which can be traced back to BYOND 324 because it impacted pixel offsets too, has been corrected.
BYOND Version:512
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 74.0.3729.169
Applies to:Dream Maker
Status: Resolved (512.1471)

This issue has been resolved.
Descriptive Problem Summary:

When two turfs are stacked on top of one another, the underlay that results from the lower turfs neglects to properly reflect the entire appearance, specifically, plane seems to be defaulting to 0.

turf
utest
plane = 0

New()
underlays += /turf/utest2
spawn(30)
var/image/a = underlays[1]
if(a)
world.log << "utest1: [a:plane]"

utest2
plane = -1

utest3
plane = 0

New()
spawn(30)
var/image/a = underlays[1]
if(a)
world.log << "utest2: [a:plane]"


If you have the following DMM:

"a" = (/turf/utest1,/area)
"b" = (/turf/utest3,/turf/utest2,/area)

(1,1,1) = {"
ab
"}


The resulting outputs should demonstrate the problem:

"utest1: -1"
"utest2: 0"
I tested this out, but it appears utest2 is the top turf, not utest3. utest3 is the underlay, so it didn't produce any output for me (except from utest1) till I added output to both. This is the code as I have it now:

turf
icon = 'icons.dmi'
utest1
icon_state = "red"
plane = 0

New()
underlays += /turf/utest2
spawn(30)
var/image/a = underlays[1]
if(a)
world.log << "utest1: [a:plane]"

utest2
icon_state = "green"
plane = -1

New()
spawn(30)
world.log << "from utest2"
world.log << "utest2: [plane]"
world.log << "utest3: [underlays[1]:plane]"

utest3
icon_state = "blue"
plane = 0

New()
spawn(30)
world.log << "from utest3"
world.log << "utest3: [plane]"
world.log << "utest2: [underlays[1]:plane]"

The output is coming from utest1 and utest2, where utest3 is the underlay.
Red herring. The issue is modified types.

turf
icon = 'icons.dmi'
utest1
icon_state = "red"
plane = 0

New()
underlays += /turf/utest2
spawn(30)
var/image/a = underlays[1]
if(a)
world.log << "utest1: [a:plane]"

utest2
icon_state = "green"

New()
spawn(30)
world.log << "from utest2"
world.log << "utest2: [plane]"
world.log << "utest3: [underlays[1]:plane]"

utest3
icon_state = "blue"
plane = 0

New()
spawn(30)
world.log << "from utest3"
world.log << "utest3: [plane]"
world.log << "utest2: [underlays[1]:plane]"


"a" = (/turf/utest1,/area)
"b" = (/turf/utest2{plane = -1},/turf/utest3,/area)

(1,1,1) = {"
ab
"}


http://files.byondhome.com/Ter13/planetest_src.zip

test project included.
Lummox JR resolved issue with message:
The compiler did not include some vars in turf underlays that impacted their appearance, when those underlays used modified types (vars set in the map editor). This very old bug, which can be traced back to BYOND 324 because it impacted pixel offsets too, has been corrected.