star_wars/mods/ethereal/leaves.lua

306 lines
7.6 KiB
Lua
Raw Normal View History

2020-05-18 17:44:59 +02:00
local S = ethereal.intllib
-- set leaftype (value inside init.lua)
local leaftype = "plantlike"
if ethereal.leaftype ~= 0 then
leaftype = "allfaces_optional"
end
2020-05-18 23:23:52 +02:00
-- jogan leaves
minetest.register_node("ethereal:jogan_leaves", {
description = S("Jogan Leaves"),
2020-05-18 17:44:59 +02:00
drawtype = "plantlike",
2020-05-18 23:23:52 +02:00
tiles = {"jogan_leaves.png"},
inventory_image = "jogan_leaves.png",
wield_image = "jogan_leaves.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
visual_scale = 1.4,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:jogan_sapling"}, rarity = 15},
{items = {"ethereal:jogan_leaves"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- pine needles
minetest.register_node("ethereal:pine_needles", {
description = S("Pine Needles"),
drawtype = "plantlike",
tiles = {"pine_needles.png"},
inventory_image = "pine_needles.png",
wield_image = "pine_needles.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
visual_scale = 1.4,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:pine_sapling"}, rarity = 20},
{items = {"ethereal:pine_needles"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- palm leaves
minetest.register_node("ethereal:palm_leaves", {
description = S("Palm Leaves"),
2020-05-18 17:44:59 +02:00
drawtype = leaftype,
visual_scale = 1.4,
2020-05-18 23:23:52 +02:00
tiles = {"moretrees_palm_leaves.png"},
inventory_image = "moretrees_palm_leaves.png",
wield_image = "moretrees_palm_leaves.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:palm_sapling"}, rarity = 10},
{items = {"ethereal:palm_leaves"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- wroshyr leaves
minetest.register_node("ethereal:wroshyr_leaves", {
description = S("Wroshyr Leaves"),
drawtype = "plantlike",
tiles = {"wroshyr_leaves.png"},
inventory_image = "wroshyr_leaves.png",
wield_image = "wroshyr_leaves.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
2020-05-18 23:23:52 +02:00
visual_scale = 1.4,
2020-05-18 17:44:59 +02:00
waving = 1,
2020-05-18 23:23:52 +02:00
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
2020-05-18 17:44:59 +02:00
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:wroshyr_sapling"}, rarity = 50},
{items = {"ethereal:wroshyr_leaves"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- gnarltree leaves
minetest.register_node("ethereal:gnarltree_leaves", {
description = S("Gnarltree Leaves"),
2020-05-18 17:44:59 +02:00
drawtype = leaftype,
visual_scale = 1.4,
2020-05-18 23:23:52 +02:00
tiles = {"gnarltree_leaves.png"},
inventory_image = "gnarltree_leaves.png",
wield_image = "gnarltree_leaves.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:gnarltree_sapling"}, rarity = 20},
{items = {"ethereal:gnarltree_leaves"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- uneti leaves
minetest.register_node("ethereal:uneti_leaves", {
description = S("Uneti Leaves"),
2020-05-18 17:44:59 +02:00
drawtype = leaftype,
visual_scale = 1.4,
2020-05-18 23:23:52 +02:00
tiles = {"uneti_leaves.png"},
inventory_image = "uneti_leaves.png",
wield_image = "uneti_leaves.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:uneti_sapling"}, rarity = 50},
{items = {"ethereal:uneti_leaves"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- brylark leaves
minetest.register_node("ethereal:brylark_leaves", {
description = S("Brylark Leaves"),
2020-05-18 17:44:59 +02:00
drawtype = leaftype,
visual_scale = 1.4,
2020-05-18 23:23:52 +02:00
tiles = {"brylark_leaves.png"},
inventory_image = "brylark_leaves.png",
wield_image = "brylark_leaves.png",
2020-05-18 17:44:59 +02:00
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
2020-05-18 23:23:52 +02:00
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
2020-05-18 17:44:59 +02:00
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:brylark_sapling"}, rarity = 50},
{items = {"ethereal:brylark_leaves"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- bamboo leaves
2020-05-18 17:44:59 +02:00
minetest.register_node("ethereal:bamboo_leaves", {
description = S("Bamboo Leaves"),
drawtype = leaftype,
visual_scale = 1.4,
tiles = {"bamboo_leaves.png"},
inventory_image = "bamboo_leaves.png",
wield_image = "bamboo_leaves.png",
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:bamboo_sprout"}, rarity = 10},
2020-05-18 17:44:59 +02:00
{items = {"ethereal:bamboo_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
2020-05-18 23:23:52 +02:00
-- mushroom cap
minetest.register_node("ethereal:mushroom_cap", {
2020-05-18 17:44:59 +02:00
description = S("Mushroom Cap"),
2020-05-18 23:23:52 +02:00
tiles = {"mushroom_cap.png"},
2020-05-18 17:44:59 +02:00
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
drop = {
max_items = 1,
items = {
2020-05-18 23:23:52 +02:00
-- {items = {"ethereal:mushroom_sapling"}, rarity = 20},
{items = {"ethereal:mushroom_cap"}}
2020-05-18 17:44:59 +02:00
}
},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
type = "fuel",
2020-05-18 23:23:52 +02:00
recipe = "ethereal:mushroom_cap",
2020-05-18 17:44:59 +02:00
burntime = 10,
})
-- mushroom pore (spongelike material found inside giant shrooms)
minetest.register_node("ethereal:mushroom_pore", {
description = S("Mushroom Pore"),
tiles = {"mushroom_pore.png"},
groups = {
snappy = 3, cracky = 3, choppy = 3, oddly_breakable_by_hand = 3,
flammable = 2, disable_jump = 1, fall_damage_add_percent = -100
},
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:mushroom_pore",
burntime = 3,
})
-- hedge block
minetest.register_node("ethereal:bush", {
description = S("Bush"),
tiles = {"ethereal_bush.png"},
walkable = true,
groups = {snappy = 3, flammable = 2},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_craft({
output = "ethereal:bush",
recipe = {
{"group:leaves", "group:leaves", "group:leaves"},
{"group:leaves", "ethereal:bamboo_leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:bush",
burntime = 1,
})
2020-05-18 23:23:52 +02:00
-- leaf decay
2020-05-18 17:44:59 +02:00
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:jogan_trunk"},
2020-05-18 17:44:59 +02:00
leaves = {
2020-05-18 23:23:52 +02:00
"default:joganfruit", "ethereal:jogan_leaves"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:pine_trunk"},
leaves = {"ethereal:pine_needles"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:palm_trunk"},
leaves = {"ethereal:palm_leaves", "ethereal:coconut"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:gnarltree_trunk"},
leaves = {"ethereal:gnarltree_leaves", "ethereal:vine"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:wroshyr_trunk"},
leaves = {"ethereal:wroshyr_leaves"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:uneti_trunk"},
leaves = {"ethereal:uneti_leaves"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
2020-05-18 23:23:52 +02:00
trunks = {"ethereal:brylark_trunk"},
leaves = {"ethereal:brylark_leaves"},
2020-05-18 17:44:59 +02:00
radius = 3
})
default.register_leafdecay({
trunks = {"ethereal:bamboo"},
leaves = {"ethereal:bamboo_leaves"},
radius = 2
})