From 4fd1d196c7820583eae129bf76e02bf150ea4191 Mon Sep 17 00:00:00 2001 From: Lucy Date: Sun, 15 Sep 2024 18:51:48 -0400 Subject: [PATCH] backport some other getFlatIcon improvements so it compiles --- code/__HELPERS/icons.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 6f0011ef03ec..54892b25294b 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -730,6 +730,10 @@ world } \ current_layer = base_layer + appearance.layer + current_layer / 1000; \ } \ + /* If we are using topdown rendering, chop that part off so things layer together as expected */ \ + if((current_layer >= TOPDOWN_LAYER && current_layer < EFFECTS_LAYER) || current_layer > TOPDOWN_LAYER + EFFECTS_LAYER) { \ + current_layer -= TOPDOWN_LAYER; \ + } \ for (var/index_to_compare_to in 1 to layers.len) { \ var/compare_to = layers[index_to_compare_to]; \ if (current_layer < layers[compare_to]) { \ @@ -741,9 +745,10 @@ world } var/static/icon/flat_template = icon('icons/blanks/32x32.dmi', "nothing") + var/icon/flat = icon(flat_template) if(!appearance || appearance.alpha <= 0) - return icon(flat_template) + return flat if(start) if(!defdir) @@ -792,7 +797,6 @@ world var/curblend = appearance.blend_mode || defblend if(appearance.overlays.len || appearance.underlays.len) - var/icon/flat = icon(flat_template) // Layers will be a sorted list of icons/overlays, based on the order in which they are displayed var/list/layers = list() var/image/copy