From d7754c23d378077457b715d3a79f34a1a0a4788f Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Fri, 29 Dec 2023 14:09:43 +0800 Subject: [PATCH] Allow grenade explosions to break ice on water --- mods/pvp/grenades/grenades.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mods/pvp/grenades/grenades.lua b/mods/pvp/grenades/grenades.lua index a1e6e0a69f..f603dcdf5a 100644 --- a/mods/pvp/grenades/grenades.lua +++ b/mods/pvp/grenades/grenades.lua @@ -1,11 +1,13 @@ +local grenade_remove_list = { + "group:flora", "group:mushroom", -- Flowers + "default:snow", "winterize:ice", -- Winter-specific +} local function remove_flora(pos, radius) local pos1 = vector.subtract(pos, radius) local pos2 = vector.add(pos, radius) - for _, p in ipairs(minetest.find_nodes_in_area(pos1, pos2, { - "group:flora", "group:mushroom", "default:snow" - })) do + for _, p in ipairs(minetest.find_nodes_in_area(pos1, pos2, grenade_remove_list)) do if vector.distance(pos, p) <= radius then minetest.remove_node(p) end