Fix reference dupe glitches

This commit is contained in:
Elias Fleckenstein 2021-11-19 15:22:40 +01:00
parent 9200c3fe44
commit b0aceae73d
No known key found for this signature in database
GPG Key ID: 06927A5199D6C9B2
3 changed files with 6 additions and 6 deletions

View File

@ -293,7 +293,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
local function drop_items_chest(pos, oldnode, oldmetadata)
local meta = minetest.get_meta(pos)
local meta2 = meta
local meta2 = meta:to_table()
if oldmetadata then
meta:from_table(oldmetadata)
end
@ -305,7 +305,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
meta:from_table(meta2)
end
local function on_chest_blast(pos)

View File

@ -461,7 +461,7 @@ minetest.register_node("mcl_furnaces:furnace", {
on_timer = furnace_node_timer,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta2 = meta
local meta2 = meta:to_table()
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for _, listname in ipairs({"src", "dst", "fuel"}) do
@ -471,7 +471,7 @@ minetest.register_node("mcl_furnaces:furnace", {
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
meta:from_table(meta2)
end,
on_construct = function(pos)

View File

@ -61,7 +61,7 @@ local def_hopper = {
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta2 = meta
local meta2 = meta:to_table()
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for i=1,inv:get_size("main") do
@ -71,7 +71,7 @@ local def_hopper = {
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
meta:from_table(meta2)
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()