mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 00:57:29 +01:00
fix hard-coded inventory name in wielders
This commit is contained in:
parent
223c90e684
commit
71fe60014f
@ -169,7 +169,7 @@ function pipeworks.register_wielder(def)
|
|||||||
local inv = minetest.get_meta(pos):get_inventory()
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
return inv:add_item(def.wield_inv.name, stack)
|
return inv:add_item(def.wield_inv.name, stack)
|
||||||
end,
|
end,
|
||||||
input_inventory = "main",
|
input_inventory = def.wield_inv.name,
|
||||||
connect_sides = def.connect_sides,
|
connect_sides = def.connect_sides,
|
||||||
can_remove = function(pos, node, stack)
|
can_remove = function(pos, node, stack)
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
@ -195,7 +195,7 @@ function pipeworks.register_wielder(def)
|
|||||||
minetest.get_meta(pos):set_string("owner", placer:get_player_name())
|
minetest.get_meta(pos):set_string("owner", placer:get_player_name())
|
||||||
end,
|
end,
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
for _,stack in ipairs(oldmetadata.inventory.main or {}) do
|
for _,stack in ipairs(oldmetadata.inventory[def.wield_inv.name] or {}) do
|
||||||
if not stack:is_empty() then
|
if not stack:is_empty() then
|
||||||
minetest.add_item(pos, stack)
|
minetest.add_item(pos, stack)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user