summaryrefslogtreecommitdiff
path: root/extra.lua
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2015-06-05 19:58:10 +0100
committertenplus1 <kinsellaja@yahoo.com>2015-06-05 19:58:10 +0100
commitc1e758227df8cb3462985a6f18911e100b0c3b03 (patch)
tree3fceaaff02c5373d7e9ca459121028735cc615b4 /extra.lua
parentf43b99fdf07aaf8e53c056295d48b86b40b1a45a (diff)
Tweaked staff of Light
Diffstat (limited to 'extra.lua')
-rw-r--r--extra.lua12
1 files changed, 4 insertions, 8 deletions
diff --git a/extra.lua b/extra.lua
index fd8a9aa..ca8f84e 100644
--- a/extra.lua
+++ b/extra.lua
@@ -258,8 +258,6 @@ minetest.register_node("ethereal:illumishroom3", {
},
})
-local USES = 100
-
-- Staff of Light (by Xanthin)
minetest.register_tool("ethereal:light_staff", {
description = "Staff of Light",
@@ -283,14 +281,12 @@ minetest.register_tool("ethereal:light_staff", {
if node == "default:stone" then
minetest.add_node(pos, {name="ethereal:glostone"})
- elseif node == "ethereal:glostone" then
- minetest.add_node(pos, {name="default:stone"})
+ if not minetest.setting_getbool("creative_mode") then
+ itemstack:add_wear(65535 / 99) -- 100 uses
+ end
+ return itemstack
end
- if not minetest.setting_getbool("creative_mode") then
- itemstack:add_wear(65535 / (USES - 1))
- end
- return itemstack
end,
})