This commit is contained in:
HybridDog 2014-12-05 23:52:55 +01:00
parent f56ccc4747
commit e1641d4eef
5 changed files with 73 additions and 20 deletions

View File

@ -1,2 +1,2 @@
default
vector_extras

View File

@ -443,41 +443,94 @@ local mushrooms_list = {
description = "brown mushroom",
box = BOX.BROWN,
growing = {
}
r = {min=3, max=4},
grounds = {soil=1, crumbly=3},
neighbours = {"default:tree"},
light = {min=1, max=4},
interval = 100,
chance = 18,
},
},
["red"] = {
description = "red mushroom",
box = BOX.RED
box = BOX.RED,
growing = {
r = {min=4, max=5},
grounds = {soil=2},
neighbours = {"default:water_flowing"},
light = {min=3, max=10},
interval = 50,
chance = 30,
},
},
["fly_agaric"] = {
description = "fly agaric",
box = BOX.FLY_AGARIC
box = BOX.FLY_AGARIC,
growing = {
r = 4,
grounds = {soil=1, crumbly=3},
neighbours = {"default:pinetree"},
light = {min=2, max=7},
interval = 101,
chance = 30,
},
},
["lavashroom"] = {
description = "Lavashroom",
box = BOX.LAVASHROOM
box = BOX.LAVASHROOM,
growing = {
r = {min=5, max=6},
grounds = {cracky=3},
neighbours = {"default:lava_source"},
light = {min=10, max=14},
interval = 1010,
chance = 60,
},
},
["glowshroom"] = {
description = "Glowshroom",
box = BOX.GLOWSHROOM
box = BOX.GLOWSHROOM,
growing = {
r = 3,
grounds = {soil=1, crumbly=3},
neighbours = {"default:stone"},
light = 0,
},
},
["nether_shroom"] = {
description = "Nether mushroom",
box = BOX.NETHER_SHROOM,
burntime = 6
burntime = 6,
},
["parasol"] = {
description = "white parasol mushroom",
box = BOX.PARASOL
box = BOX.PARASOL,
growing = {
r = {min=3, max=5},
grounds = {soil=1, crumbly=3},
neighbours = {"default:pinetree"},
light = {min=1, max=7},
},
},
["red45"] = {
description = "45 red mushroom",
box = BOX.RED45
box = BOX.RED45,
growing = {
r = {min=3, max=4},
grounds = {soil=2},
neighbours = {"default:water_source"},
light = {min=2, max=3},
},
},
["brown45"] = {
description = "45 brown mushroom",
box = BOX.BROWN45
box = BOX.BROWN45,
growing = {
r = {min=2, max=3},
grounds = {tree=1},
neighbours = {"default:water_flowing"},
light = {min=7, max=11},
},
},
}

View File

@ -42,7 +42,7 @@ local function define_contents()
end
local function find_grond(a,list)
local function find_ground(a,list)
for _,nam in ipairs(list) do
if a == nam then
return true
@ -53,13 +53,13 @@ end
function riesenpilz_circle(nam, pos, radius, chance)
for i = -radius, radius do
for j = -radius, radius do
if math.floor( math.sqrt(i^2+j^2) +0.5) == radius
and data[area:index(pos.x+i, pos.y, pos.z+j)] == c.air
and pr:next(1,chance) == 1
and data[area:index(pos.x+i, pos.y-1, pos.z+j)] == c.ground then
data[area:index(pos.x+i, pos.y, pos.z+j)] = nam
for _,p in pairs(vector.circle(radius)) do
if pr:next(1,chance) == 1 then
local p = vector.add(pos, p)
local p_p = area:indexp(p)
if data[p_p] == c.air
and data[area:index(p.x, p.y-1, p.z)] == c.ground then
data[p_p] = nam
end
end
end
@ -184,7 +184,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local ground_y = nil --Definition des Bodens:
-- for y=maxp.y,0,-1 do
for y=maxp.y,1,-1 do
if find_grond(data[area:index(x, y, z)], c.GROUND) then
if find_ground(data[area:index(x, y, z)], c.GROUND) then
ground_y = y
break
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 113 B