forked from mtcontrib/riesenpilz
add 3 sounds
add 3 sounds
This commit is contained in:
parent
087cc358b8
commit
2f0dace10f
159
init.lua
159
init.lua
@ -25,6 +25,7 @@ local function set_vm_data(manip, nodes, pos, t1, name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--Growing Functions
|
--Growing Functions
|
||||||
|
|
||||||
local c
|
local c
|
||||||
@ -112,7 +113,7 @@ function riesenpilz_minecraft_fliegenpilz(pos)
|
|||||||
end
|
end
|
||||||
for l = 1, height do
|
for l = 1, height do
|
||||||
local y = pos.y+l
|
local y = pos.y+l
|
||||||
for _,p in ipairs({
|
for _,p in pairs({
|
||||||
{area:index(pos.x+j, y, pos.z+2), 0},
|
{area:index(pos.x+j, y, pos.z+2), 0},
|
||||||
{area:index(pos.x+j, y, pos.z-2), 2},
|
{area:index(pos.x+j, y, pos.z-2), 2},
|
||||||
{area:index(pos.x+2, y, pos.z+j), 1},
|
{area:index(pos.x+2, y, pos.z+j), 1},
|
||||||
@ -262,7 +263,7 @@ function riesenpilz_parasol(pos)
|
|||||||
nodes[i] = c.stem
|
nodes[i] = c.stem
|
||||||
end
|
end
|
||||||
|
|
||||||
for _,j in ipairs({
|
for _,j in pairs({
|
||||||
{bhead2, 0, c.head_brown_bright},
|
{bhead2, 0, c.head_brown_bright},
|
||||||
{bhead1, -1, c.head_binge}
|
{bhead1, -1, c.head_binge}
|
||||||
}) do
|
}) do
|
||||||
@ -701,46 +702,134 @@ end)
|
|||||||
--Mushroom Blocks
|
--Mushroom Blocks
|
||||||
|
|
||||||
|
|
||||||
local r = "riesenpilz_"
|
|
||||||
local h = "head_"
|
|
||||||
local s = "stem_"
|
|
||||||
local rh = r..h
|
|
||||||
local rs = r..s
|
|
||||||
|
|
||||||
local GS = "giant mushroom "
|
|
||||||
local GSH = GS.."head "
|
|
||||||
local GSS = GS.."stem "
|
|
||||||
|
|
||||||
local pilznode_list = {
|
local pilznode_list = {
|
||||||
{"stem", GSS.."beige", {rs.."top.png", rs.."top.png", "riesenpilz_stem.png"}, "stem"},
|
{
|
||||||
{s.."brown", GSS.."brown", {rs.."top.png", rs.."top.png", rs.."brown.png"}, s.."brown"},
|
typ = "stem",
|
||||||
{s.."blue", GSS.."blue", {rs.."top.png",rs.."top.png",rs.."blue.png"}, s.."blue"},
|
description = "white",
|
||||||
{"lamellas", "giant mushroom lamella", {"riesenpilz_lamellas.png"}, "lamellas"},
|
textures = {"stem_top.png", "stem_top.png", "stem_white.png"},
|
||||||
{h.."red", GSH.."red", {"riesenpilz_head.png", "riesenpilz_lamellas.png", "riesenpilz_head.png"}, "red"},
|
},
|
||||||
{h.."orange", GSH.."orange", {rh.."orange.png"}, "lavashroom"},
|
{
|
||||||
{h.."yellow", GSH.."yellow", {rh.."yellow.png"}, "lavashroom"},
|
typ = "stem",
|
||||||
{h.."brown", GSH.."brown", {r.."brown_top.png", r.."lamellas.png", r.."brown_top.png"}, "brown"},
|
name = "brown",
|
||||||
{h.."brown_full", GSH.."full brown", {r.."brown_top.png"},"brown"},
|
textures = {"stem_top.png", "stem_top.png", "stem_brown.png"},
|
||||||
{h.."blue_bright", GSH.."blue bright", {rh.."blue_bright.png"},"glowshroom"},
|
},
|
||||||
{h.."blue", GSH.."blue", {rh.."blue.png"},"glowshroom"},
|
{
|
||||||
{h.."white", GSH.."white", {rh.."white.png"},"parasol"},
|
typ = "stem",
|
||||||
{h.."binge", GSH.."binge", {rh.."binge.png", rh.."white.png", rh.."binge.png"},"parasol"},
|
name = "blue",
|
||||||
{h.."brown_bright", GSH.."brown bright", {rh.."brown_bright.png", rh.."white.png", rh.."brown_bright.png"},"parasol"},
|
textures = {"stem_top.png","stem_top.png","stem_blue.png"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "lamellas",
|
||||||
|
description = "giant mushroom lamella",
|
||||||
|
textures = "lamellas.png",
|
||||||
|
sapling = "lamellas"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "red",
|
||||||
|
textures = {"head.png", "lamellas.png", "head.png"},
|
||||||
|
sapling = "red"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "orange",
|
||||||
|
textures = "head_orange.png",
|
||||||
|
sapling = "lavashroom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "yellow",
|
||||||
|
textures = "head_yellow.png",
|
||||||
|
sapling = "lavashroom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "brown",
|
||||||
|
textures = {"brown_top.png", "lamellas.png", "brown_top.png"},
|
||||||
|
sapling = "brown"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "brown_full",
|
||||||
|
description = "full brown",
|
||||||
|
textures = "brown_top.png",
|
||||||
|
sapling = "brown"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "blue_bright",
|
||||||
|
description = "blue bright",
|
||||||
|
textures = "head_blue_bright.png",
|
||||||
|
sapling = "glowshroom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "blue",
|
||||||
|
textures = "head_blue.png",
|
||||||
|
sapling = "glowshroom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "white",
|
||||||
|
textures = "head_white.png",
|
||||||
|
sapling = "parasol"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "binge",
|
||||||
|
textures = {"head_binge.png", "head_white.png", "head_binge.png"},
|
||||||
|
sapling = "parasol"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
typ = "head",
|
||||||
|
name = "brown_bright",
|
||||||
|
description = "brown bright",
|
||||||
|
textures = {"head_brown_bright.png", "head_white.png", "head_brown_bright.png"},
|
||||||
|
sapling = "parasol"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _,i in ipairs(pilznode_list) do
|
for _,i in pairs(pilznode_list) do
|
||||||
local name, desc, textures, sapling = unpack(i)
|
-- fill missing stuff
|
||||||
minetest.register_node("riesenpilz:"..name, {
|
local textures = i.textures
|
||||||
description = desc,
|
i.description = i.description or i.name
|
||||||
|
if type(textures) == "string" then
|
||||||
|
textures = {textures}
|
||||||
|
end
|
||||||
|
for i = 1,#textures do
|
||||||
|
textures[i] = "riesenpilz_"..textures[i]
|
||||||
|
end
|
||||||
|
local nodename = "riesenpilz:"
|
||||||
|
local desctiption,sounds = "giant mushroom "
|
||||||
|
if i.typ == "stem" then
|
||||||
|
desctiption = desctiption.."stem "..i.description
|
||||||
|
nodename = nodename.."stem"..((i.name and "_"..i.name) or "")
|
||||||
|
sounds = default.node_sound_wood_defaults({
|
||||||
|
footstep = {name="riesenpilz_stem", gain=0.2},
|
||||||
|
place = {name="default_place_node", gain=0.8},
|
||||||
|
dig = {name="riesenpilz_stem", gain=0.4},
|
||||||
|
dug = {name="default_wood_footstep", gain=0.3}
|
||||||
|
})
|
||||||
|
elseif i.typ == "head" then
|
||||||
|
desctiption = desctiption.."head "..i.description
|
||||||
|
nodename = nodename.."head_"..i.name
|
||||||
|
else
|
||||||
|
nodename = nodename..i.name
|
||||||
|
desctiption = desctiption..i.description
|
||||||
|
end
|
||||||
|
local drop = i.sapling and {max_items = 1, items = {
|
||||||
|
{items = {"riesenpilz:"..i.sapling}, rarity = 20},
|
||||||
|
{items = {nodename}, rarity = 1}
|
||||||
|
}}
|
||||||
|
minetest.register_node(nodename, {
|
||||||
|
description = desctiption,
|
||||||
tiles = textures,
|
tiles = textures,
|
||||||
groups = {oddly_breakable_by_hand=3},
|
groups = {oddly_breakable_by_hand=3},
|
||||||
drop = {max_items = 1,
|
drop = drop,
|
||||||
items = {{items = {"riesenpilz:"..sapling},rarity = 20,},
|
sounds = sounds,
|
||||||
{items = {"riesenpilz:"..name},rarity = 1,}}},
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("riesenpilz:head_red_side", {
|
minetest.register_node("riesenpilz:head_red_side", {
|
||||||
description = "giant mushroom head red side",
|
description = "giant mushroom head red side",
|
||||||
tiles = {"riesenpilz_head.png", "riesenpilz_lamellas.png", "riesenpilz_head.png",
|
tiles = {"riesenpilz_head.png", "riesenpilz_lamellas.png", "riesenpilz_head.png",
|
||||||
@ -752,6 +841,8 @@ minetest.register_node("riesenpilz:head_red_side", {
|
|||||||
{items = {"riesenpilz:head_red"},rarity = 1,}}},
|
{items = {"riesenpilz:head_red"},rarity = 1,}}},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("riesenpilz:ground", {
|
minetest.register_node("riesenpilz:ground", {
|
||||||
description = "dirt with rotten grass",
|
description = "dirt with rotten grass",
|
||||||
tiles = {"riesenpilz_ground_top.png","default_dirt.png","default_dirt.png^riesenpilz_ground_side.png"},
|
tiles = {"riesenpilz_ground_top.png","default_dirt.png","default_dirt.png^riesenpilz_ground_side.png"},
|
||||||
|
BIN
rest/cutting.ogg
Normal file
BIN
rest/cutting.ogg
Normal file
Binary file not shown.
BIN
rest/frying.mp3
Normal file
BIN
rest/frying.mp3
Normal file
Binary file not shown.
2
rest/info.txt
Normal file
2
rest/info.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
frying from http://freesound.org/people/davidkay/sounds/132472/ (WTFPL)
|
||||||
|
cutting from http://freesound.org/people/nhaudio/sounds/192416/ (WTFPL)
|
BIN
sounds/riesenpilz_stem.0.ogg
Normal file
BIN
sounds/riesenpilz_stem.0.ogg
Normal file
Binary file not shown.
BIN
sounds/riesenpilz_stem.1.ogg
Normal file
BIN
sounds/riesenpilz_stem.1.ogg
Normal file
Binary file not shown.
BIN
sounds/riesenpilz_stem.2.ogg
Normal file
BIN
sounds/riesenpilz_stem.2.ogg
Normal file
Binary file not shown.
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Loading…
Reference in New Issue
Block a user