From d3bcbe2c10391c87b3f9232e468a504334385917 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 3 Sep 2024 21:33:06 -0400 Subject: [PATCH] fixes compile on latest byond (#6709) --- code/datums/mutable_appearance.dm | 9 ++++----- code/game/rendering/legacy/radial.dm | 2 -- code/game/rendering/parallax/parallax_object.dm | 2 ++ code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm | 2 ++ code/modules/overmap/bounds.dm | 4 ++++ 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/datums/mutable_appearance.dm b/code/datums/mutable_appearance.dm index 1f08f52c6c2c..d7e04d7a14cf 100644 --- a/code/datums/mutable_appearance.dm +++ b/code/datums/mutable_appearance.dm @@ -4,11 +4,10 @@ // Mutable appearances are children of images, just so you know. -/mutable_appearance/New(copy_from, ...) - ..() - if(!copy_from) - plane = FLOAT_PLANE // No clue why this is 0 by default yet images are on FLOAT_PLANE - // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var +/** + * * Mutable appearances do **not** have FLOAT_PLANE by default. Set it manually if you aren't using [mutable_appearance()] + */ +/mutable_appearance // Helper similar to image() /proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE) diff --git a/code/game/rendering/legacy/radial.dm b/code/game/rendering/legacy/radial.dm index 31b2425da037..39da472582e4 100644 --- a/code/game/rendering/legacy/radial.dm +++ b/code/game/rendering/legacy/radial.dm @@ -256,7 +256,6 @@ GLOBAL_LIST_EMPTY(radial_menus) choices_icons[id] = I setup_menu(use_tooltips) - /datum/radial_menu/proc/extract_image(E) var/mutable_appearance/MA = new /mutable_appearance(E) if(MA) @@ -264,7 +263,6 @@ GLOBAL_LIST_EMPTY(radial_menus) MA.appearance_flags |= RESET_TRANSFORM return MA - /datum/radial_menu/proc/next_page() if(pages > 1) current_page = WRAP(current_page + 1,1,pages+1) diff --git a/code/game/rendering/parallax/parallax_object.dm b/code/game/rendering/parallax/parallax_object.dm index ac298821a082..b998484e9fee 100644 --- a/code/game/rendering/parallax/parallax_object.dm +++ b/code/game/rendering/parallax/parallax_object.dm @@ -84,6 +84,8 @@ clone.icon = icon clone.icon_state = icon_state clone.overlays = GetOverlays() + clone.layer = FLOAT_LAYER + clone.plane = FLOAT_PLANE // do NOT inherit our overlays! parallax layers should never have overlays, // because if it inherited us it'll result in exponentially increasing overlays // due to cut_overlays() above over there being a queue operation and not instant! diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm index 94089a1a4213..77f23e97c33e 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm @@ -5,6 +5,8 @@ /proc/_animate(atom/A, set_vars, time = 10, loop = 1, easing = LINEAR_EASING, flags = null) var/mutable_appearance/MA = new() + // mutable appearance is not FLOAT_PLANE by default + MA.plane = FLOAT_PLANE for(var/v in set_vars) MA.vars[v] = set_vars[v] animate(A, appearance = MA, time, loop, easing, flags) diff --git a/code/modules/overmap/bounds.dm b/code/modules/overmap/bounds.dm index 4ba1da1d2983..b373fff61c76 100644 --- a/code/modules/overmap/bounds.dm +++ b/code/modules/overmap/bounds.dm @@ -20,6 +20,8 @@ var/mutable_appearance/MA = new . = MA MA.appearance_flags = KEEP_APART | RESET_TRANSFORM + // mutable appearance is not FLOAT_PLANE by default + MA.plane = FLOAT_PLANE MA.icon = I MA.color = color MA.alpha = 160 @@ -59,6 +61,8 @@ var/mutable_appearance/MA = new . = MA MA.appearance_flags = KEEP_APART | RESET_TRANSFORM + // mutable appearance is not FLOAT_PLANE by default + MA.plane = FLOAT_PLANE MA.icon = I MA.alpha = 160 MA.filters = filter(