From 48806a3dfde9eaad0c80369219e3d39fd6cd8218 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Mon, 8 Mar 2021 20:15:55 -0700 Subject: [PATCH] Fix canopies being indestructible --- js/tiletypes.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/js/tiletypes.js b/js/tiletypes.js index 66160c1..6fb4453 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -2738,13 +2738,6 @@ const TILE_TYPES = { if (! tile) continue; - // Canopy protects everything else - if (tile.type.name === 'canopy') { - actor = null; - terrain = null; - break; - } - // Terrain is transmuted afterwards; VFX are left alone; actors are killed // after the loop (which also allows the glass block to safely drop an item) if (tile.type.layer === LAYERS.terrain || @@ -2757,6 +2750,13 @@ const TILE_TYPES = { // Anything else is destroyed level.remove_tile(tile); removed_anything = true; + + // Canopy protects everything else + if (tile.type.name === 'canopy') { + actor = null; + terrain = null; + break; + } } if (actor) {