Skip to content

Commit

Permalink
backport some other getFlatIcon improvements so it compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Sep 15, 2024
1 parent a583a3a commit 4fd1d19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]) { \
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fd1d19

Please sign in to comment.