mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2024-12-26 18:50:22 +01:00
Fix circlar saw duplication bug, thanks Sokomine
This commit is contained in:
parent
474d62ac7c
commit
26e7268a5e
@ -195,6 +195,14 @@ circular_saw.on_metadata_inventory_put = function(pos, listname, index, stack, p
|
|||||||
-- Putting something into the input slot is only possible if that had been empty before or did contain something of the same material
|
-- Putting something into the input slot is only possible if that had been empty before or did contain something of the same material
|
||||||
if( listname=="input") then
|
if( listname=="input") then
|
||||||
|
|
||||||
|
if( not( inv:is_empty("input"))) then
|
||||||
|
|
||||||
|
local old_stack = inv:get_stack("input", 1 );
|
||||||
|
if( old_stack:get_name() ~= stack:get_name() ) then
|
||||||
|
return 0;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Each new block is worth 8 microblocks
|
-- Each new block is worth 8 microblocks
|
||||||
circular_saw.update_inventory(pos, 8 * stack:get_count());
|
circular_saw.update_inventory(pos, 8 * stack:get_count());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user