refactor leaves node registrations.
This commit is contained in:
parent
5bc048eb12
commit
06110f157b
1 changed files with 19 additions and 24 deletions
|
@ -29,31 +29,26 @@ blockgame.reg_simple_node("sapling", "Sapling", {
|
|||
planty = 1,
|
||||
})
|
||||
|
||||
blockgame.register_node(modname .. ":leaves", {
|
||||
description = "Leaves",
|
||||
local function reg_leaves (name, desc, groups, drop)
|
||||
blockgame.register_node(modname .. ":" .. name, {
|
||||
description = desc,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
modname .. "_leaves.png",
|
||||
modname .. "_" .. name .. ".png",
|
||||
},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
planty = 1,
|
||||
},
|
||||
groups = groups,
|
||||
drop = drop,
|
||||
})
|
||||
blockgame.register_node(modname .. ":leaves_alive", {
|
||||
description = "Growing Leaves",
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
modname .. "_leaves_alive.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
end
|
||||
|
||||
reg_leaves("leaves", "Leaves", {
|
||||
planty = 1,
|
||||
},
|
||||
drop = modname .. ":leaves",
|
||||
})
|
||||
reg_leaves("leaves_alive", "Growing Leaves", {
|
||||
planty = 1,
|
||||
}, modname .. ":leaves")
|
||||
|
||||
blockgame.reg_simple_node("nut", "Nut", {
|
||||
woody = 1,
|
||||
|
|
Loading…
Reference in a new issue