2019-11-10 09:33:40 -05:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
|
|
|
local minetest
|
|
|
|
= minetest
|
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
2019-11-10 09:40:15 -05:00
|
|
|
local function reg(name, vis, climb, lv)
|
2019-11-10 09:33:40 -05:00
|
|
|
local def = {
|
|
|
|
drawtype = "airlike",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
air_equivalent = true,
|
2019-11-10 09:40:15 -05:00
|
|
|
groups = {[modname] = lv}
|
2019-11-10 09:33:40 -05:00
|
|
|
}
|
|
|
|
if vis then
|
|
|
|
def.light_source = 1
|
|
|
|
def.groups[modname .. "_fx"] = 1
|
|
|
|
end
|
|
|
|
def.climbable = (not not climb) or nil
|
|
|
|
return minetest.register_node(modname .. ":" .. name, def)
|
|
|
|
end
|
|
|
|
|
2019-11-10 09:40:15 -05:00
|
|
|
reg("ceil", true, true, 4)
|
|
|
|
reg("wall", true, true, 3)
|
|
|
|
reg("floor", true, false, 2)
|
|
|
|
reg("hang", false, true, 1)
|