diff options
author | tenplus1 <kinsellaja@yahoo.com> | 2015-06-05 19:58:10 +0100 |
---|---|---|
committer | tenplus1 <kinsellaja@yahoo.com> | 2015-06-05 19:58:10 +0100 |
commit | c1e758227df8cb3462985a6f18911e100b0c3b03 (patch) | |
tree | 3fceaaff02c5373d7e9ca459121028735cc615b4 /extra.lua | |
parent | f43b99fdf07aaf8e53c056295d48b86b40b1a45a (diff) |
Tweaked staff of Light
Diffstat (limited to 'extra.lua')
-rw-r--r-- | extra.lua | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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, }) |