diff --git a/README.md b/README.md index 8bc39db..ca28889 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -[Mod] riesenpilz [riesenpilz] +[Mod] mushrooms [riesenpilz] + +This mod adds mushrooms to minetest. The growing tool can make them giant. **Depends:** see [depends.txt](https://raw.githubusercontent.com/HybridDog/riesenpilz/master/depends.txt) **License:** see [LICENSE.txt](https://raw.githubusercontent.com/HybridDog/riesenpilz/master/LICENSE.txt) diff --git a/depends.txt b/depends.txt index c24e6b1..a81d43a 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ default vector_extras +fence_registration? diff --git a/init.lua b/init.lua index 37b456e..435f737 100644 --- a/init.lua +++ b/init.lua @@ -829,6 +829,7 @@ local head_sounds = default.node_sound_wood_defaults({ dig = {name="riesenpilz_head", gain=0.2}, dug = {name="riesenpilz_stem", gain=0.1} }) +local add_fence = minetest.register_fence for _,i in pairs({ { @@ -840,11 +841,13 @@ for _,i in pairs({ typ = "stem", name = "brown", textures = {"stem_top.png", "stem_top.png", "stem_brown.png"}, + fence = false, }, { typ = "stem", name = "blue", textures = {"stem_top.png","stem_top.png","stem_blue.png"}, + fence = false, }, { typ = "stem", @@ -879,14 +882,15 @@ for _,i in pairs({ typ = "head", name = "brown", textures = {"brown_top.png", "lamellas.png", "brown_top.png"}, - sapling = "brown" + sapling = "brown", }, { typ = "head", name = "brown_full", description = "full brown", textures = "brown_top.png", - sapling = "brown" + sapling = "brown", + fence = false, }, { typ = "head", @@ -960,6 +964,11 @@ for _,i in pairs({ drop = drop, sounds = sounds, }) + + if add_fence + and i.fence ~= false then + add_fence({fence_of = nodename}) + end end minetest.register_node("riesenpilz:head_red_side", {