mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 16:39:33 +01:00
Fix reference dupes for droppers and dispensers
This commit is contained in:
parent
2127bb3ef1
commit
d3015edeb9
3 changed files with 6 additions and 6 deletions
|
@ -82,7 +82,7 @@ local dispenserdef = {
|
||||||
end,
|
end,
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local meta2 = meta
|
local meta2 = meta:to_table()
|
||||||
meta:from_table(oldmetadata)
|
meta:from_table(oldmetadata)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
for i=1, inv:get_size("main") do
|
for i=1, inv:get_size("main") do
|
||||||
|
@ -92,7 +92,7 @@ local dispenserdef = {
|
||||||
minetest.add_item(p, stack)
|
minetest.add_item(p, stack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
meta:from_table(meta2:to_table())
|
meta:from_table(meta2)
|
||||||
end,
|
end,
|
||||||
_mcl_blast_resistance = 3.5,
|
_mcl_blast_resistance = 3.5,
|
||||||
_mcl_hardness = 3.5,
|
_mcl_hardness = 3.5,
|
||||||
|
|
|
@ -55,7 +55,7 @@ local dropperdef = {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local meta2 = meta
|
local meta2 = meta:to_table()
|
||||||
meta:from_table(oldmetadata)
|
meta:from_table(oldmetadata)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
for i=1, inv:get_size("main") do
|
for i=1, inv:get_size("main") do
|
||||||
|
@ -65,7 +65,7 @@ local dropperdef = {
|
||||||
minetest.add_item(p, stack)
|
minetest.add_item(p, stack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
meta:from_table(meta2:to_table())
|
meta:from_table(meta2)
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
|
@ -53,7 +53,7 @@ local dropperdef = {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local meta2 = meta
|
local meta2 = meta:to_table()
|
||||||
meta:from_table(oldmetadata)
|
meta:from_table(oldmetadata)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
for i=1, inv:get_size("main") do
|
for i=1, inv:get_size("main") do
|
||||||
|
@ -63,7 +63,7 @@ local dropperdef = {
|
||||||
minetest.add_item(p, stack)
|
minetest.add_item(p, stack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
meta:from_table(meta2:to_table())
|
meta:from_table(meta2)
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
Loading…
Reference in a new issue