Skip to content

Commit

Permalink
fixes compile on latest byond (#6709)
Browse files Browse the repository at this point in the history
  • Loading branch information
silicons committed Sep 4, 2024
1 parent c8cef90 commit d3bcbe2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
9 changes: 4 additions & 5 deletions code/datums/mutable_appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions code/game/rendering/legacy/radial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,13 @@ 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)
MA.layer = HUD_LAYER_ABOVE
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)
Expand Down
2 changes: 2 additions & 0 deletions code/game/rendering/parallax/parallax_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/overmap/bounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d3bcbe2

Please sign in to comment.