light staff works on all nodes with {stone=1} group

master
tenplus1 2020-08-25 15:02:43 +01:00
parent 60ef937c4f
commit b229e2bd15
5 changed files with 10 additions and 14 deletions

View File

@ -32,9 +32,6 @@ local add_biome = function(a, l, m, n, o, p, b, c, d, e, f, g)
})
end
-- add_biome(name, y_min, y_max, heat, humidity, biome enabled,
-- dust node, top node, depth, filler node, depth, stone node)
-- always registered biomes
add_biome("mountain", 140, 31000, 50, 50, 1,

View File

@ -700,7 +700,7 @@ end
local random = math.random
-- Generate Illumishroom in caves next to coal
-- Generate Illumishroom in caves on top of coal
minetest.register_on_generated(function(minp, maxp)
if minp.y > -30 or maxp.y < -3000 then
@ -713,9 +713,9 @@ minetest.register_on_generated(function(minp, maxp)
for n = 1, #coal do
if random(1, 2) == 1 then
if random(2) == 1 then
bpos = {x = coal[n].x, y = coal[n].y + 1, z = coal[n].z }
bpos = {x = coal[n].x, y = coal[n].y + 1, z = coal[n].z}
if bpos.y > -3000 and bpos.y < -2000 then
minetest.swap_node(bpos, {name = "ethereal:illumishroom3"})

View File

@ -326,9 +326,10 @@ minetest.register_tool("ethereal:light_staff", {
end
local node = minetest.get_node(pos).name
local def = minetest.registered_nodes[node]
local stone = def and def.groups and def.groups.stone
if node == "default:stone"
or node == "default:desert_stone" then
if stone then
minetest.swap_node(pos, {name = "ethereal:glostone"})

View File

@ -55,7 +55,7 @@ lucky_block:add_blocks({
{"exp", 4},
{"dro", {"ethereal:crystal_gilly_staff"}},
{"dro", {"ethereal:light_staff"}},
{"nod", "default:chest", 0, {
{"nod", "default:chest", 0, {
{name = "ethereal:birch_sapling", max = 10},
{name = "ethereal:palm_sapling", max = 10},
{name = "ethereal:orange_tree_sapling", max = 10},
@ -63,9 +63,9 @@ lucky_block:add_blocks({
{name = "ethereal:bamboo_sprout", max = 10},
{name = "ethereal:banana_tree_sapling", max = 10},
{name = "ethereal:mushroom_sapling", max = 10},
{name = "ethereal:frost_tree_sapling", max = 10},
{name = "ethereal:sakura_sapling", max = 10},
{name = "ethereal:willow_sapling", max = 10},
{name = "ethereal:frost_tree_sapling", max = 10},
{name = "ethereal:sakura_sapling", max = 10},
{name = "ethereal:willow_sapling", max = 10},
}},
})

View File

@ -48,8 +48,6 @@ local add_schem = function(a, b, c, d, e, f, g, h, i, j, k)
})
end
-- add_schem(place on, ratio, biomes, y_min, y_max, schem, biome enabled,
-- replace, spawn_by, num_spawn_by, rotation)
-- igloo
add_schem("default:snowblock", 0.0005, {"glacier"}, 3, 50,