Skip to content

Commit

Permalink
Preserve the metadata of items in the itemholder by converting to str…
Browse files Browse the repository at this point in the history
…ing instead of taking name
  • Loading branch information
mt-curated authored and BuckarooBanzay committed Dec 14, 2020
1 parent eed0d60 commit d2dd770
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nodeboxes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1080,10 +1080,9 @@ minetest.register_node("scifi_nodes:itemholder", {
local meta = minetest.get_meta(pos)
if name == meta:get_string("owner") or
minetest.check_player_privs(name, "protection_bypass") then
local wield_item = clicker:get_wielded_item():get_name()
local taken = item:take_item()
if taken and not taken:is_empty() then
minetest.add_item(pos, wield_item)
minetest.add_item(pos, taken:to_string())
return item
end
end
Expand Down

0 comments on commit d2dd770

Please sign in to comment.