mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 15:23:43 +01:00
keep items w/ wear or items w/ max stacksize=1 from going into warehouses
This commit is contained in:
parent
49352529e4
commit
10409987f0
@ -206,6 +206,10 @@ end
|
||||
function techpack_warehouse.allow_metadata_inventory_put(self, pos, listname, index, stack, player)
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
return 0
|
||||
elseif stack:get_wear() ~= 0 then
|
||||
return 0
|
||||
elseif stack:get_stack_max() == 1 then
|
||||
return 0
|
||||
end
|
||||
local inv = M(pos):get_inventory()
|
||||
local main_stack = inv:get_stack("main", index)
|
||||
|
Loading…
Reference in New Issue
Block a user