This commit is contained in:
Calinou 2013-08-01 10:58:34 +02:00
commit 2839770413
2 changed files with 3 additions and 3 deletions

View File

@ -136,7 +136,7 @@ end
-- The amount of items offered per shape can be configured
circular_saw.on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.env:get_meta(pos);
if(fields.max_offered and tonumber(fields.max_offered) > 0 and tonumber(fields.max_offered) < 99) then
if tonumber(fields.max_offered) and tonumber(fields.max_offered) > 0 and tonumber(fields.max_offered) < 99 then
meta:set_string("max_offered", fields.max_offered);
circular_saw.update_inventory(pos, 0); -- update to show the correct number of items
end

View File

@ -22,8 +22,6 @@ dofile(minetest.get_modpath("moreblocks").."/stairsplus/aliases.lua")
dofile(minetest.get_modpath("moreblocks").."/stairsplus.lua")
dofile(minetest.get_modpath("moreblocks").."/circular_saw.lua")
print(S("[moreblocks] loaded."))
--[[
****
More Blocks
@ -356,3 +354,5 @@ minetest.register_craftitem("moreblocks:nothing", {
inventory_image = "invisible.png",
on_use = minetest.item_eat(0),
})
print(S("[moreblocks] loaded."))