diff options
author | Calinou <calinou9999spam@gmail.com> | 2013-09-25 18:20:57 +0200 |
---|---|---|
committer | Calinou <calinou9999spam@gmail.com> | 2013-09-25 18:20:57 +0200 |
commit | 26e7268a5e29b3d02f7762a80369d214686628c9 (patch) | |
tree | 0fa34b2af35488b5f3cd2d52cc8a7fd31e2f31be | |
parent | 474d62ac7c6f540318ccba9777f4f2c8d35007ec (diff) | |
download | moreblocks-26e7268a5e29b3d02f7762a80369d214686628c9.tar.gz moreblocks-26e7268a5e29b3d02f7762a80369d214686628c9.tar.bz2 moreblocks-26e7268a5e29b3d02f7762a80369d214686628c9.zip |
Fix circlar saw duplication bug, thanks Sokomine
-rw-r--r-- | circular_saw.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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()); |