From ea46187fb2ecd9879f5bef8f1c65d634b85f2ffb Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sat, 18 May 2013 20:23:54 +0200 Subject: [PATCH] fix some stuff --- sumpf/birke.lua | 18 ++++++-- sumpf/depends.txt | 1 + sumpf/init.lua | 39 +++++++++++++++--- sumpf/textures/sumpf_bucket_dirtywater.png | Bin 0 -> 176 bytes .../{sumpfstein.png => sumpf_swampstone.png} | Bin sumpf/textures/sumpf_swampstone_brick.png | Bin 0 -> 1346 bytes 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 sumpf/textures/sumpf_bucket_dirtywater.png rename sumpf/textures/{sumpfstein.png => sumpf_swampstone.png} (100%) create mode 100644 sumpf/textures/sumpf_swampstone_brick.png diff --git a/sumpf/birke.lua b/sumpf/birke.lua index 7aa60cd..520382a 100644 --- a/sumpf/birke.lua +++ b/sumpf/birke.lua @@ -7,13 +7,17 @@ minetest.register_node("sumpf:sapling", { paramtype = "light", walkable = false, groups = {snappy=2,dig_immediate=3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + furnace_burntime = 9, }) + minetest.register_node("sumpf:birk", { tiles = {"birke_mossytree.png"}, inventory_image = "birke_mossytree.png^birke_sapling.png", paramtype = "light", stack_max = 1024, groups = {snappy=2,dig_immediate=3}, + sounds = default.node_sound_leaves_defaults(), on_construct = function(pos) mache_birke(pos) end, @@ -45,6 +49,7 @@ minetest.register_node("sumpf:tree", { description = "Birch Trunk", tiles = {"birke_tree_top.png", "birke_tree_top.png", "birke_tree.png"}, groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, + sounds = default.node_sound_wood_defaults(), }) minetest.register_node("sumpf:tree_horizontal", { @@ -54,12 +59,14 @@ minetest.register_node("sumpf:tree_horizontal", { paramtype2 = "facedir", legacy_facedir_simple = true, groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, + sounds = default.node_sound_wood_defaults(), }) minetest.register_node("sumpf:mossytree", { description = "Mossy Birch Trunk", tiles = {"birke_tree_top.png", "sumpf.png", "birke_mossytree.png"}, groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, + sounds = default.node_sound_wood_defaults(), }) local function tree_crafts(input) @@ -109,7 +116,7 @@ local function add_tree_branch(pos, dir) p = {x=pos.x+i, y=pos.y+1, z=pos.z+k} n = minetest.env:get_node(p) if (n.name=="air") then - minetest.env:add_node(p, {name="sumpf:leaves"}) + minetest.env:add_node(p, {name="sumpf:leaves"}) end end end @@ -137,16 +144,19 @@ end minetest.register_abm({ nodenames = {"sumpf:sapling"}, interval = 10, - chance = 6, + chance = 16, action = function(pos) - mache_birke(pos) + if minetest.env:find_node_near(pos, 1, "group:crumbly") + and minetest.env:get_node_light(pos, nil) > 7 then + mache_birke(pos) + end end ,}) --function anti_generate(node, surfaces, minp, maxp, height_min, height_max, spread, habitat_size, habitat_nodes) if sumpf.enable_birches then minetest.register_on_generated(function(minp, maxp, seed) - generate("sumpf:birk", {"default:dirt_with_grass"}, minp, maxp, 20, 25, 100, 500, + generate("sumpf:birk", {"default:dirt_with_grass"}, minp, maxp, 20, 25, 100, 500, {"default:water_source"},30,{"default:desert_sand"}) end) end diff --git a/sumpf/depends.txt b/sumpf/depends.txt index 239f2dc..7adcd34 100644 --- a/sumpf/depends.txt +++ b/sumpf/depends.txt @@ -2,3 +2,4 @@ default riesenpilz jungletree habitat +bucket diff --git a/sumpf/init.lua b/sumpf/init.lua index f2f370f..c3ee33d 100644 --- a/sumpf/init.lua +++ b/sumpf/init.lua @@ -5,6 +5,20 @@ sounds: supertux (GPL) I looked at snow mod for mapgen and at the jungletree mod for birches. ]] +minetest.register_craft({ + output = "sumpf:junglestonebrick", + recipe = { + {"sumpf:junglestone", "sumpf:junglestone"}, + {"sumpf:junglestone", "sumpf:junglestone"}, + } +}) + +minetest.register_craft({ + output = "sumpf:junglestone 4", + recipe = { + {"sumpf:junglestonebrick"}, + } +}) minetest.register_node("sumpf:gras", { description = "Swamp Grass", @@ -21,10 +35,17 @@ minetest.register_node("sumpf:gras", { minetest.register_node("sumpf:junglestone", { description = "Swamp Stone", - tile_images = {"sumpfstein.png"}, + tile_images = {"sumpf_swampstone.png"}, groups = {cracky=3}, legacy_mineral = true, - sounds = SOUND, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("sumpf:junglestonebrick", { + description = "Swamp Stone Brick", + tiles = {"sumpf_swampstone_brick.png"}, + groups = {cracky=2, stone=1}, + sounds = default.node_sound_stone_defaults(), }) minetest.register_node("sumpf:peat", { @@ -39,7 +60,7 @@ minetest.register_node("sumpf:peat", { minetest.register_node("sumpf:kohle", { description = "Coal Ore", - tiles = {"sumpfstein.png^default_mineral_coal.png"}, + tiles = {"sumpf_swampstone.png^default_mineral_coal.png"}, groups = {cracky=3}, drop = 'default:coal_lump', sounds = default.node_sound_stone_defaults(), @@ -47,7 +68,7 @@ minetest.register_node("sumpf:kohle", { minetest.register_node("sumpf:eisen", { description = "Iron Ore", - tiles = {"sumpfstein.png^default_mineral_iron.png"}, + tiles = {"sumpf_swampstone.png^default_mineral_iron.png"}, groups = {cracky=3}, drop = 'default:iron_lump', sounds = default.node_sound_stone_defaults(), @@ -63,7 +84,7 @@ minetest.register_node("sumpf:sumpf", { }) minetest.register_node("sumpf:sumpf2", { - tiles = {"sumpf.png","sumpfstein.png","sumpfstein.png^sumpf2.png"}, + tiles = {"sumpf.png","sumpf_swampstone.png","sumpf_swampstone.png^sumpf2.png"}, groups = {cracky=3}, drop = "sumpf:junglestone", sounds = default.node_sound_stone_defaults({ @@ -110,6 +131,14 @@ minetest.register_node("sumpf:dirtywater_source", { groups = {water=3, liquid=3, puts_out_fire=1}, }) +bucket.register_liquid( + "sumpf:dirtywater_source", + "sumpf:dirtywater_flowing", + "sumpf:bucket_dirtywater", + "bucket.png^sumpf_bucket_dirtywater.png", + "Swampwater Bucket" +) + sumpf = {} dofile(minetest.get_modpath("sumpf").."/settings.lua") dofile(minetest.get_modpath("sumpf") .. "/birke.lua") diff --git a/sumpf/textures/sumpf_bucket_dirtywater.png b/sumpf/textures/sumpf_bucket_dirtywater.png new file mode 100644 index 0000000000000000000000000000000000000000..c289de759b683be80ae2ce23e6cc497d5c4baffb GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF!F}~d(YL<3#m~QrQtC|Y?hNbsdzVm}jDGBlm zW^j0RBMrz=@pN$v;kcfhaDe;X+tv%+m(om}A|B3S3fQS>;CjY@ji31_0|T=@D?{oO R?F^uL22WQ%mvv4FO#sOXFe?B6 literal 0 HcmV?d00001 diff --git a/sumpf/textures/sumpfstein.png b/sumpf/textures/sumpf_swampstone.png similarity index 100% rename from sumpf/textures/sumpfstein.png rename to sumpf/textures/sumpf_swampstone.png diff --git a/sumpf/textures/sumpf_swampstone_brick.png b/sumpf/textures/sumpf_swampstone_brick.png new file mode 100644 index 0000000000000000000000000000000000000000..3b2592f0bd44872eb478f1eaedca3ff28f7d0ef3 GIT binary patch literal 1346 zcmV-I1-<%-P)Px({7FPXR7l6A)y-?1*A>U{pN@|1TwOhSW;}Wssgf8ggAtAhO_Pu|2{B%j5WHx+ z$v)6kpxgW%S*0PH(zGd*V!SA!m_o9MA;E4);y8*BgDN}Y$Md4mGozW&_0`qsp^HFi zL-X>qzvaDfmY?s`jh&lDbxo9^-rx*WihLTWFHk~a)v=aToP}Kg5o82^jKK(^C>t^s zVuU~(jWuvfamMPP-Tl+=UO#B=v<~{5JlOf;Tffh;FamVdaAF)0L4EX0l3FrRr5A%@ zSjDMAGo6W=l;J9zq%o2Li>SGq!}g*}=!RdQV-zLxBCMbdhJ<8Ex=f*^16* zgEUTvqW1%T`1i3KOF4kNoQ}ivIix?dl`T`<;HbFM45I^)OsmdpJ-#rzXxq^@+hM2K z>wk%lBJv)l?oM8N>)Nl|@uWX6dv~;ZpxUP}Rv*+FX`J)qsD*?X4ddM$Mrjg85AvejgS$$Nuo(~HR9Z0^jhee=s58S#rvwNL)Mq$h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