handle smoke removal with on_destruct

master
capitalthree 1 year ago
parent f08ed693cf
commit 141a6e6697
  1. 2
      rules.lua
  2. 2
      stones.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

@ -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 = {

Loading…
Cancel
Save