56 lines
1.5 KiB
Lua
56 lines
1.5 KiB
Lua
local ns = rgt_world
|
|
|
|
function ns.register_slab(def)
|
|
def = table.copy(def)
|
|
def._variants = nil
|
|
|
|
rgt.register_node(def._name.."_slab", extend(def, {
|
|
drawtype = "nodebox",
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
|
|
},
|
|
paramtype = "light",
|
|
paramtype2 = "facedir"
|
|
}))
|
|
end
|
|
|
|
function ns.register_stair(def)
|
|
def = table.copy(def)
|
|
def._variants = nil
|
|
|
|
rgt.register_node(def._name.."_stair", extend(table.copy(def), {
|
|
drawtype = "nodebox",
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.5, 0.5}}
|
|
},
|
|
paramtype = "light",
|
|
paramtype2 = "facedir"
|
|
}))
|
|
|
|
rgt.register_node(def._name.."_stair_inner", extend(table.copy(def), {
|
|
drawtype = "nodebox",
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0, 0.5, 0.5}}
|
|
},
|
|
paramtype = "light",
|
|
paramtype2 = "facedir"
|
|
}))
|
|
|
|
rgt.register_node(def._name.."_stair_outer", extend(def, {
|
|
drawtype = "nodebox",
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, 0.5, 0, 0.5, 0}}
|
|
},
|
|
paramtype = "light",
|
|
paramtype2 = "facedir"
|
|
}))
|
|
end
|
|
|
|
function ns.register_all(def)
|
|
ns.register_slab(def)
|
|
ns.register_stair(def)
|
|
end
|