Fix dupe bug

This commit is contained in:
afkplayer5000 2021-01-16 14:03:25 -07:00 committed by GitHub
parent ddf8b39f5a
commit e26e3cc183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -336,6 +336,7 @@ function circular_saw.on_metadata_inventory_take(
local input_stack = inv:get_stack(listname, index)
if not input_stack:is_empty() and input_stack:get_name()~=stack:get_name() then
local player_inv = player:get_inventory()
inv:remove_item(listname, input_stack)
if player_inv:room_for_item("main", input_stack) then
player_inv:add_item("main", input_stack)
end