From 58be4076b0f3a92eec3118bad7edb0ea50a6fffd Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sun, 10 Nov 2013 11:06:24 +0100 Subject: [PATCH] add giant parasol mushrooms --- README.txt | 5 ++- init.lua | 49 ++++++++++++++++------ mapgen.lua | 14 +++++-- textures/riesenpilz_head_binge.png | Bin 0 -> 318 bytes textures/riesenpilz_head_brown_bright.png | Bin 0 -> 237 bytes textures/riesenpilz_head_white.png | Bin 0 -> 544 bytes 6 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 textures/riesenpilz_head_binge.png create mode 100644 textures/riesenpilz_head_brown_bright.png create mode 100644 textures/riesenpilz_head_white.png diff --git a/README.txt b/README.txt index daa68e6..c84557c 100644 --- a/README.txt +++ b/README.txt @@ -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 diff --git a/init.lua b/init.lua index 4dba9f4..1937f8d 100644 --- a/init.lua +++ b/init.lua @@ -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") diff --git a/mapgen.lua b/mapgen.lua index 1c5d41d..cc88410 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -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 diff --git a/textures/riesenpilz_head_binge.png b/textures/riesenpilz_head_binge.png new file mode 100644 index 0000000000000000000000000000000000000000..8ed142951a581033c708eb5989d7f94929010807 GIT binary patch literal 318 zcmV-E0m1%>P)Px#NKi~vMYxY>z?pZ%n{~yZfy}0V%%+6OsEN<5kI}A<)vt-vu#eWXmf5(N+qs?H zxtQL+pyI)z<-(!k#HZ)Ts_M$C>&>z6(6jW_x}IsgCwq)9|UR2b6*!3ko-APfY- zF<1_P-j(9<@&BKuN`b;LPy{d9MMZuY+^4TI_O9u~jJ&w~Gw8xuUO4YBt8WrTRaUVU z?T|!%(n+9B3zlHa8T7Utajahp|2+(vc1gjbm!gIy1#` zOJl_GnFY7kwY@tuoBspjUZ9j@iEBiObAE1aYF-J0b5UwyNotBhd1gt5g1e`0KzJjc zI8af#r;B3<$92|&os3L|94rS^MOktho^u&=^Gdwgua=%rPx$+DSw~R4C6ql8JKKKoCUt|9>cjPAb8PLE2No;<9l78373)e~>pTSE{BK%`(&7 z)3eIeNw9^jQ*TmNXTfG(r;W>7S2QN)-c(62T;`1}y~&lW($-Jg@OAa_J-EV|tnsC{ z(%-r%SdA;+cCJ6JH{HV5siJki^B_5$9o_>BHZss4Ve^+}Mr!KhIvm_0Q84zWEi%CF zPiw)pROc{LXW?mPMkn6o_uDDxLV>;No-f1C>*dh3KPW}mZd0H8?f%s|Q+Qh{N|4)1J@wyu35ZR23Jn`9 z#2uF~2QNKHa#gZwX1}fnu@x3sR+Wl_RTgwM8qGcD7{JMzO^OGK_rni$PD*np7Nujv i*Dm(cgU-i&fb$<=re=oj#dw_n0000