From 141a6e669701df5dc66d5dca83bcd9dff120198d Mon Sep 17 00:00:00 2001 From: capitalthree Date: Thu, 30 Nov 2023 22:25:24 -0600 Subject: [PATCH] handle smoke removal with on_destruct --- rules.lua | 2 -- stones.lua | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rules.lua b/rules.lua index de5d1f8..e291214 100644 --- a/rules.lua +++ b/rules.lua @@ -414,7 +414,6 @@ function lc_liberties.handle_dig(pos, node, digger) local count = 0 for i, v in pairs(connected_group(pos)) do count = count + 1 - smokecontrol(v) nodecore.set_loud(v, {name = "air"}) end @@ -422,7 +421,6 @@ function lc_liberties.handle_dig(pos, node, digger) return true else - smokecontrol(pos) return minetest.node_dig(pos, node, digger) end end diff --git a/stones.lua b/stones.lua index ad4a71d..c734cb2 100644 --- a/stones.lua +++ b/stones.lua @@ -79,6 +79,8 @@ local function reg(name, basename, basedef) on_construct = lc_liberties.handle_placement, on_dig = lc_liberties.handle_dig, + + on_destruct = nodecore.smokeclear, }) local territory_selection_box = {