Skip to content
Snippets Groups Projects
Commit c1e75822 authored by tenplus1's avatar tenplus1
Browse files

Tweaked staff of Light

parent f43b99fd
No related branches found
No related tags found
No related merge requests found
......@@ -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,
})
......
......@@ -7,7 +7,8 @@ dofile(minetest.get_modpath("ethereal").."/schematics/apple_tree.lua")
dofile(minetest.get_modpath("ethereal").."/schematics/orange_tree.lua")
dofile(minetest.get_modpath("ethereal").."/schematics/banana_tree.lua")
-- Biomes (for 0.4.12 with new changes from Paramat)
--= Biomes (Minetest 0.4.12 and above)
if ethereal.icewater == 1 then
minetest.register_biome({
name = "icewater",
......@@ -692,8 +693,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
pr = PseudoRandom(seed+1)
x = pr:next(minp.x + math.floor((divx+0)*divlen), minp.x + math.floor((divx+1)*divlen))
z = pr:next(minp.z + math.floor((divz+0)*divlen), minp.z + math.floor((divz+1)*divlen))
if minetest.get_node({x=x,y=1,z=z}).name == "default:sand" and
minetest.find_node_near({x=x,y=1,z=z}, 1, "default:water_source") then
if minetest.get_node({x=x,y=1,z=z}).name == "default:sand"
and minetest.find_node_near({x=x,y=1,z=z}, 1, "default:water_source") then
minetest.place_schematic({x=x-4,y=2,z=z-4}, path.."palmtree.mts", 0, '', 0)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment