From 26e7268a5e29b3d02f7762a80369d214686628c9 Mon Sep 17 00:00:00 2001 From: Calinou Date: Wed, 25 Sep 2013 18:20:57 +0200 Subject: [PATCH] Fix circlar saw duplication bug, thanks Sokomine --- circular_saw.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/circular_saw.lua b/circular_saw.lua index 50068e8..c58869e 100644 --- a/circular_saw.lua +++ b/circular_saw.lua @@ -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 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 circular_saw.update_inventory(pos, 8 * stack:get_count());