aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalinou <calinou9999spam@gmail.com>2013-07-11 21:54:15 +0200
committerCalinou <calinou9999spam@gmail.com>2013-07-11 21:54:15 +0200
commit8b1c7c506de9004f54290e7815e4b76d28b18fea (patch)
tree5d937e4378a38261824721f1d745b1afe068541e
parent5ec13858bc2021c60366e7c002ee26e08e600f4f (diff)
downloadmoreblocks-8b1c7c506de9004f54290e7815e4b76d28b18fea.tar.gz
moreblocks-8b1c7c506de9004f54290e7815e4b76d28b18fea.tar.bz2
moreblocks-8b1c7c506de9004f54290e7815e4b76d28b18fea.zip
Put mod load print at bottom; fix crash with putting strings in number fields
-rw-r--r--circular_saw.lua2
-rw-r--r--init.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/circular_saw.lua b/circular_saw.lua
index 0e6687e..144b056 100644
--- a/circular_saw.lua
+++ b/circular_saw.lua
@@ -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
diff --git a/init.lua b/init.lua
index fb74721..f42bb56 100644
--- a/init.lua
+++ b/init.lua
@@ -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."))