add fences

This commit is contained in:
HybridDog 2015-12-28 16:54:35 +01:00
parent 5db544f7ef
commit 3850de05ae
3 changed files with 15 additions and 3 deletions

View File

@ -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)

View File

@ -1,2 +1,3 @@
default
vector_extras
fence_registration?

View File

@ -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", {