Pass the current tool to the stripped_tree.swap_node function
Some checks failed
build / build (pull_request) Waiting to run
build / build (push) Has been cancelled

This commit was merged in pull request #1.
This commit is contained in:
2025-12-06 11:33:34 +01:00
parent 880a60b7e0
commit 6f1d331771

View File

@@ -16,7 +16,7 @@ stripped_tree.has_stripped = function(pos)
end end
-- Function to swap nodes -- Function to swap nodes
stripped_tree.swap_node = function(pos, user, in_creative_mode) stripped_tree.swap_node = function(pos, user, in_creative_mode, tool)
local old_node = core.get_node(pos).name local old_node = core.get_node(pos).name
local mod_name, node_name = unpack(old_node:split(":")) local mod_name, node_name = unpack(old_node:split(":"))
local stripped = mod_name .. ":" .. "stripped_" .. node_name local stripped = mod_name .. ":" .. "stripped_" .. node_name
@@ -35,7 +35,7 @@ stripped_tree.swap_node = function(pos, user, in_creative_mode)
end end
end end
return itemstack return tool
end end
-- Function to register nodes -- Function to register nodes
@@ -93,7 +93,7 @@ if stripped_tree.ENABLE_CHISEL ~= true then
end end
if stripped_tree.has_stripped(pos) then if stripped_tree.has_stripped(pos) then
stripped_tree.swap_node(pos, user, creative_mode) stripped_tree.swap_node(pos, user, creative_mode, itemstack)
end end
end, end,
} }