From 6514e23cbd44ba8ebc9c45774ed33837f54549f8 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Thu, 25 Apr 2013 20:34:00 +0200 Subject: [PATCH] update lavashrooms and the brown one --- init.lua | 94 ++++++++++++++++++++-------- riesenpilz_head_blue1.png | Bin 0 -> 688 bytes riesenpilz_head_blue2.png | Bin 0 -> 652 bytes textures/riesenpilz_head_orange.png | Bin 0 -> 579 bytes textures/riesenpilz_head_yellow.png | Bin 0 -> 543 bytes textures/riesenpilz_stem_brown.png | Bin 0 -> 701 bytes 6 files changed, 69 insertions(+), 25 deletions(-) create mode 100644 riesenpilz_head_blue1.png create mode 100644 riesenpilz_head_blue2.png create mode 100644 textures/riesenpilz_head_orange.png create mode 100644 textures/riesenpilz_head_yellow.png create mode 100644 textures/riesenpilz_stem_brown.png diff --git a/init.lua b/init.lua index 902a3f2..6ff5522 100644 --- a/init.lua +++ b/init.lua @@ -41,18 +41,26 @@ end function riesenpilz_brauner_minecraftpilz(pos) + local head = "riesenpilz:head_brown" local random = math.random(MAX_SIZE-1) - local height = 3+random - local breite = 2+random + local br = random+1 + local breite = br+1 + local height = br+2 for i = 0, height, 1 do minetest.env:add_node({x=pos.x, y=pos.y+i, z=pos.z}, {name="riesenpilz:stem"}) end - for j = -breite, breite, 1 do - for k = -(breite-1), breite-1, 1 do - minetest.env:add_node({x=pos.x+j, y=pos.y+height+1, z=pos.z+k}, {name="riesenpilz:head_brown"}) - minetest.env:add_node({x=pos.x+k, y=pos.y+height+1, z=pos.z+j}, {name="riesenpilz:head_brown"}) + for k = -breite, breite, breite*2 do + for l = -br, br, 1 do + minetest.env:add_node({x=pos.x+k, y=pos.y+height+1, z=pos.z+l}, {name=head}) + minetest.env:add_node({x=pos.x+l, y=pos.y+height+1, z=pos.z+k}, {name=head}) + end + end + + for j = -br, br, 1 do + for k = -br, br, 1 do + minetest.env:add_node({x=pos.x+j, y=pos.y+height+1, z=pos.z+k}, {name=head}) end end end @@ -80,23 +88,39 @@ end local function add_head_lavashroom(pos, ran) - local head = "wool:orange" + local head = "riesenpilz:head_orange" if math.random(ran) == 1 then - head = "wool:yellow" + head = "riesenpilz:head_yellow" else - head = "wool:orange" + head = "riesenpilz:head_orange" end minetest.env:add_node(pos, {name=head}) end -local function lavashroom(pos) +local function add_top_lavashroom(pos,h,ran,a) + for k = -a, a, 2*a do + for l = -a+1, a-1, 1 do + add_head_lavashroom({x=pos.x+k, y=pos.y+h, z=pos.z+l}, ran) + add_head_lavashroom({x=pos.x+l, y=pos.y+h, z=pos.z+k}, ran) + end + end + for k = -a, a, 2*a do + for l = -a, a, 2*a do + add_head_lavashroom({x=pos.x+k, y=pos.y+h, z=pos.z+l}, ran) + end + end +end + +function riesenpilz_lavashroom(pos) + local stem = "riesenpilz:stem_brown" + local brown = "riesenpilz:head_brown_full" local height = 3+math.random(MAX_SIZE-2) minetest.env:remove_node(pos) for i = 0, height, 1 do for k = -1, 1, 2 do - minetest.env:add_node({x=pos.x+k, y=pos.y+i, z=pos.z}, {name="wool:brown"}) - minetest.env:add_node({x=pos.x, y=pos.y+i, z=pos.z+k}, {name="wool:brown"}) + minetest.env:add_node({x=pos.x+k, y=pos.y+i, z=pos.z}, {name=stem}) + minetest.env:add_node({x=pos.x, y=pos.y+i, z=pos.z+k}, {name=stem}) end end @@ -104,32 +128,46 @@ local function lavashroom(pos) for l = -3, 3, 1 do if ( k <= 1 and k >= -1 ) or( l <= 1 and l >= -1 ) then - minetest.env:add_node({x=pos.x+k, y=pos.y+height+2, z=pos.z+l}, {name="wool:brown"}) + if not ( k <= 1 and k >= -1 and l <= 1 and l >= -1 ) then + minetest.env:add_node({x=pos.x+k, y=pos.y+height+2, z=pos.z+l}, {name=brown}) + end else add_head_lavashroom({x=pos.x+k, y=pos.y+height+2, z=pos.z+l}, 7) end end end - for k = -2, 2, 1 do - for l = -2, 2, 1 do - minetest.env:add_node({x=pos.x+k, y=pos.y+height+1, z=pos.z+l}, {name="wool:brown"}) + for k = -1, 1, 1 do + for l = -2, 2, 4 do + minetest.env:add_node({x=pos.x+k, y=pos.y+height+1, z=pos.z+l}, {name=brown}) + minetest.env:add_node({x=pos.x+l, y=pos.y+height+1, z=pos.z+k}, {name=brown}) + end + end + for k = -2, 2, 4 do + for l = -2, 2, 4 do + minetest.env:add_node({x=pos.x+k, y=pos.y+height+1, z=pos.z+l}, {name=brown}) end end + for k = -1, 1, 2 do + for l = -1, 1, 2 do + minetest.env:add_node({x=pos.x+k, y=pos.y+height+1, z=pos.z+l}, {name=brown}) + end + end + +-- add_top_lavashroom(pos,height+3,6,4) +-- add_top_lavashroom(pos,height+4,6,4) +-- round edges: for j = 0, 1, 1 do - for k = -4, 4, 1 do - for l = -4, 4, 1 do + for k = -4, 4, 8 do + for l = -3, 3, 1 do add_head_lavashroom({x=pos.x+k, y=pos.y+height+3+j, z=pos.z+l}, 6) + add_head_lavashroom({x=pos.x+l, y=pos.y+height+3+j, z=pos.z+k}, 6) end end end - for k = -3, 3, 1 do - for l = -3, 3, 1 do - add_head_lavashroom({x=pos.x+k, y=pos.y+height+5, z=pos.z+l}, 5) - end - end + add_top_lavashroom(pos,height+5,5,3) for k = -2, 2, 1 do for l = -2, 2, 1 do @@ -233,9 +271,15 @@ minetest.register_node("riesenpilz:"..name, { end pilznode("stem", "Giant Mushroom Stem", {"riesenpilz_stem_top.png","riesenpilz_stem_top.png","riesenpilz_stem.png"}, "stem") +pilznode("stem_brown", "Giant Mushroom Stem Brown", +{"riesenpilz_stem_top.png","riesenpilz_stem_top.png","riesenpilz_stem_brown.png"}, "stem_brown") pilznode("lamellas", "Giant Mushroom Lamella", {"riesenpilz_lamellas.png"}, "lamellas") pilznode("head_red", "Giant Mushroom Head Red", {"riesenpilz_head.png", "riesenpilz_lamellas.png", "riesenpilz_head.png"}, "red") -pilznode("head_brown", "Giant Mushroom Head Brown", {"riesenpilz_brown_top.png","riesenpilz_lamellas.png","riesenpilz_brown_top.png"}, "brown") +pilznode("head_orange", "Giant Mushroom Head Red", {"riesenpilz_head_orange.png"}, "lavashroom") +pilznode("head_yellow", "Giant Mushroom Head Red", {"riesenpilz_head_yellow.png"}, "lavashroom") +pilznode("head_brown", "Giant Mushroom Head Brown", +{"riesenpilz_brown_top.png","riesenpilz_lamellas.png","riesenpilz_brown_top.png"}, "brown") +pilznode("head_brown_full", "Giant Mushroom Head Full Brown", {"riesenpilz_brown_top.png"},"brown") minetest.register_node("riesenpilz:head_red_side", { description = "Giant Mushroom Head Side", @@ -275,7 +319,7 @@ minetest.register_on_punchnode(function(pos, node, puncher) elseif minetest.env:get_node(pos).name == "riesenpilz:brown" then riesenpilz_brauner_minecraftpilz(pos) elseif minetest.env:get_node(pos).name == "riesenpilz:lavashroom" then - lavashroom(pos) + riesenpilz_lavashroom(pos) end end end) diff --git a/riesenpilz_head_blue1.png b/riesenpilz_head_blue1.png new file mode 100644 index 0000000000000000000000000000000000000000..3dbd850bcaa30fe00d7499f0283daa3ca269554d GIT binary patch literal 688 zcmV;h0#E&kP)Px%YDq*vR4C6S!Od$_R~W$I-+Rui*ErorjFPLW4sEi2_Z5N*z9EYSH)QrlmjEJ$&O+$>Mv2CKz{^J z9q+ol-r!lAdWXWI9si3!GVJOp7nb$VAeQpCMW!PI(H!`pXRI0DQ{J11Gk zdSpFNk67jZ_{PnYD9=-o{$4gkK7_jP0>y@>aMa3FSU%{o)l&2Pn^;WM$w!Sh539fY zLn=w0B2WawkVU(+(9MtC$uAJrXrH^t%FonOu@9g!N_#L;@kt4FQK_$!mMv2@|AGv9 zH=#ct2PLVevkcH#gK~9BRm#L$Cki) zl<#gQJF%at@aYM?cbuhZKXX&IbQx7_i&P@Bfhn&?jut;&FjY)(5W6){W<0+cZrz}2 zq?yZ}9If~}rkZCC)|@mB_5ut;CKQSthJGWxhL&bUGp~7~*sN$0SAVy!iSQp} W&>Y={O0gaQ0000Px%MoC0LR4C6a!98nUWf;Km|8?E>d3o}@X@ZKWDS~vc4lY7!7r}ra5mC{_P3Twf zJE(&n#Gz2?;N&1ys2H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