mirror of
https://github.com/Sokomine/replacer.git
synced 2025-07-07 18:40:57 +02:00
remove test code
This commit is contained in:
28
init.lua
28
init.lua
@ -300,34 +300,6 @@ replacer.node_is_owned = function(pos, placer)
|
||||
end
|
||||
end
|
||||
|
||||
-- Handle taking item from inventory or unified inventory bags
|
||||
local function get_player_bag_stack(player, i)
|
||||
return minetest.get_inventory({
|
||||
type = "detached",
|
||||
name = user:get_player_name() .. "_bags"
|
||||
}):get_stack("bag" .. i, 1)
|
||||
end
|
||||
|
||||
replacer.remove_from_inventory = function()
|
||||
|
||||
|
||||
local inv = user:get_inventory()
|
||||
for i = 1, 4 do
|
||||
local def = get_player_bag_stack(player, i):get_definition()
|
||||
if def.groups.bagslots then
|
||||
local list_name = "bag" .. i .. "contents"
|
||||
local size = inv:get_size(list_name)
|
||||
for si = 1, size do
|
||||
local stk = inv:get_stack(list_name, si)
|
||||
if not stk:is_empty() then
|
||||
minetest.chat_send_all(stk:to_string())
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- Handle mode setting/getting
|
||||
replacer.set_mode = function(player, mode_name)
|
||||
if mode_name ~= "legacy" and mode_name ~= "paint" then
|
||||
|
Reference in New Issue
Block a user