forked from mtcontrib/riesenpilz
add fences
This commit is contained in:
parent
5db544f7ef
commit
3850de05ae
@ -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)
|
||||
|
@ -1,2 +1,3 @@
|
||||
default
|
||||
vector_extras
|
||||
fence_registration?
|
||||
|
13
init.lua
13
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", {
|
||||
|
Loading…
Reference in New Issue
Block a user