add giant parasol mushrooms

This commit is contained in:
HybridDog 2013-11-10 11:06:24 +01:00
parent e071c4265a
commit 58be4076b0
6 changed files with 49 additions and 19 deletions

View File

@ -1,6 +1,7 @@
------Mushrooms------
— riesenpilz_head.png and riesenpilz_stem.png (edited with gimp) from gamiano.de
— riesenpilz_stem.png (edited with gimp) from gamiano.de
TODO:
— add giant nethershroom and parasol
— add giant nethershroom
— finish supporting the mushrooms mod
— generate mushrooms not only in mushroom biomes

View File

@ -233,30 +233,46 @@ end
function riesenpilz_parasol(pos)
local t1 = os.clock()
local height = 6+math.random(MAX_SIZE)
local br = math.random(MAX_SIZE+1,MAX_SIZE+2)
local manip = minetest.get_voxel_manip()
local area = r_area(manip, 2, 5+MAX_SIZE, pos)
local area = r_area(manip, br, height, pos)
local nodes = manip:get_data()
local height = 4+math.random(MAX_SIZE)
local rh = math.random(2,3)
local bhead1 = br-1
local bhead2 = math.random(1,br-2)
--stem
for i = 0, height-1, 1 do
for i = 0, height-2 do
nodes[area:index(pos.x, pos.y+i, pos.z)] = riesenpilz_c_stem
end
--ring
for l = 0, 1, 1 do
for k = -1, 1, 2 do
nodes[area:index(pos.x+k, pos.y+rh, pos.z-l*k)] = riesenpilz_c_head_brown
nodes[area:index(pos.x+l*k, pos.y+rh, pos.z+k)] = riesenpilz_c_head_red
for i = -bhead2,bhead2 do
for j = -bhead2,bhead2 do
nodes[area:index(pos.x+i, pos.y+height, pos.z+j)] = riesenpilz_c_head_brown_bright
end
end
for i = -bhead1,bhead1 do
for j = -bhead1,bhead1 do
nodes[area:index(pos.x+i, pos.y+height-1, pos.z+j)] = riesenpilz_c_head_binge
end
end
--head
for i = -2,2,1 do
for j = -2,2,1 do
nodes[area:index(pos.x+i, pos.y+height, pos.z+j)] = riesenpilz_c_head_brown
for k = -1, 1, 2 do
for l = 0, 1 do
nodes[area:index(pos.x+k, pos.y+rh, pos.z-l*k)] = riesenpilz_c_head_white
nodes[area:index(pos.x+l*k, pos.y+rh, pos.z+k)] = riesenpilz_c_head_white
end
for l = -br+1, br do
nodes[area:index(pos.x+br*k, pos.y+height-2, pos.z-l*k)] = riesenpilz_c_head_binge
nodes[area:index(pos.x+l*k, pos.y+height-2, pos.z+br*k)] = riesenpilz_c_head_binge
end
for l = -bhead1+1, bhead1 do
nodes[area:index(pos.x+bhead1*k, pos.y+height-2, pos.z-l*k)] = riesenpilz_c_head_white
nodes[area:index(pos.x+l*k, pos.y+height-2, pos.z+bhead1*k)] = riesenpilz_c_head_white
end
end
@ -464,6 +480,7 @@ local GSS = GS.."Stem "
local pilznode_list = {
{"stem", GSS.."Beige", {rs.."top.png", rs.."top.png", "riesenpilz_stem.png"}, "stem"},
{s.."brown", GSS.."Brown", {rs.."top.png", rs.."top.png", rs.."brown.png"}, s.."brown"},
{s.."blue", GSS.."Blue", {rs.."top.png",rs.."top.png",rs.."blue.png"}, s.."blue"},
{"lamellas", "Giant Mushroom Lamella", {"riesenpilz_lamellas.png"}, "lamellas"},
{h.."red", GSH.."Red", {"riesenpilz_head.png", "riesenpilz_lamellas.png", "riesenpilz_head.png"}, "red"},
{h.."orange", GSH.."Orange", {rh.."orange.png"}, "lavashroom"},
@ -472,7 +489,9 @@ local pilznode_list = {
{h.."brown_full", GSH.."Full Brown", {r.."brown_top.png"},"brown"},
{h.."blue_bright", GSH.."Blue Bright", {rh.."blue_bright.png"},"glowshroom"},
{h.."blue", GSH.."Blue", {rh.."blue.png"},"glowshroom"},
{s.."blue", GSS.."Blue", {rs.."top.png",rs.."top.png",rs.."blue.png"}, s.."blue"},
{h.."white", GSH.."White", {rh.."white.png"},"parasol"},
{h.."binge", GSH.."Binge", {rh.."binge.png", rh.."white.png", rh.."binge.png"},"parasol"},
{h.."brown_bright", GSH.."Brown Bright", {rh.."brown_bright.png", rh.."white.png", rh.."brown_bright.png"},"parasol"},
}
for _,i in ipairs(pilznode_list) do
@ -517,6 +536,10 @@ riesenpilz_c_stem_blue = minetest.get_content_id("riesenpilz:stem_blue")
riesenpilz_c_head_blue = minetest.get_content_id("riesenpilz:head_blue")
riesenpilz_c_head_blue_bright = minetest.get_content_id("riesenpilz:head_blue_bright")
riesenpilz_c_head_white = minetest.get_content_id("riesenpilz:head_white")
riesenpilz_c_head_binge = minetest.get_content_id("riesenpilz:head_binge")
riesenpilz_c_head_brown_bright = minetest.get_content_id("riesenpilz:head_brown_bright")
riesenpilz_c_red = minetest.get_content_id("default:copperblock")
riesenpilz_c_brown = minetest.get_content_id("default:desert_stone")
riesenpilz_c_tree = minetest.get_content_id("default:tree")

View File

@ -220,6 +220,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
elseif pr:next(1,6000) == 2 and pr:next(1,200) == 15 then
tab[num] = {4, boden}
num = num+1
elseif pr:next(1,800) == 7 then
tab[num] = {5, boden}
num = num+1
end
end
end
@ -236,14 +239,17 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
for _,v in ipairs(tab) do
local p = v[2]
if v[1] == 1 then
local m = v[1]
if m == 1 then
riesenpilz_hybridpilz(p)
elseif v[1] == 2 then
elseif m == 2 then
riesenpilz_brauner_minecraftpilz(p)
elseif v[1] == 3 then
elseif m == 3 then
riesenpilz_minecraft_fliegenpilz(p)
elseif v[1] == 4 then
elseif m == 4 then
riesenpilz_lavashroom(p)
elseif m == 5 then
riesenpilz_parasol(p)
end
end
if riesenpilz.info then

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B