2014-03-09 13:38:18 +04:00
|
|
|
-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
|
|
|
|
|
2014-07-21 14:24:49 +04:00
|
|
|
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
|
2014-03-09 13:38:18 +04:00
|
|
|
|
|
|
|
stairsplus = {}
|
|
|
|
stairsplus.expect_infinite_stacks = false
|
|
|
|
|
2014-06-27 22:14:08 +04:00
|
|
|
if not minetest.get_modpath("unified_inventory")
|
|
|
|
and minetest.setting_getbool("creative_mode") then
|
2014-03-09 13:38:18 +04:00
|
|
|
stairsplus.expect_infinite_stacks = true
|
|
|
|
end
|
|
|
|
|
|
|
|
function stairsplus:register_all(modname, subname, recipeitem, fields)
|
|
|
|
fields = fields or {}
|
|
|
|
fields.groups = fields.groups or {}
|
2014-10-19 20:15:46 +04:00
|
|
|
if not moreblocks.config.stairsplus_in_creative_inventory then
|
2014-03-09 13:38:18 +04:00
|
|
|
fields.groups.not_in_creative_inventory = 1
|
|
|
|
end
|
|
|
|
self:register_stair(modname, subname, recipeitem, fields)
|
|
|
|
self:register_slab (modname, subname, recipeitem, fields)
|
2014-10-29 00:12:40 +03:00
|
|
|
self:register_slope(modname, subname, recipeitem, fields)
|
2014-03-09 13:38:18 +04:00
|
|
|
self:register_panel(modname, subname, recipeitem, fields)
|
|
|
|
self:register_micro(modname, subname, recipeitem, fields)
|
2014-06-27 22:14:08 +04:00
|
|
|
-- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps.
|
2014-03-09 13:38:18 +04:00
|
|
|
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
|
|
|
end
|
|
|
|
|
|
|
|
function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
|
|
|
stairsplus:register_all(modname, subname, recipeitem, {
|
|
|
|
groups = groups,
|
|
|
|
tiles = images,
|
|
|
|
description = description,
|
|
|
|
drop = drop,
|
|
|
|
light_source = light
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2014-07-21 14:24:49 +04:00
|
|
|
-- dofile(modpath.. "/aliases.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
|
|
|
|
-- dofile(modpath.. "/conversion.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
|
2014-10-29 00:12:40 +03:00
|
|
|
dofile(modpath .. "/stairs.lua")
|
|
|
|
dofile(modpath .. "/slabs.lua")
|
|
|
|
dofile(modpath .. "/slopes.lua")
|
|
|
|
dofile(modpath .. "/panels.lua")
|
|
|
|
dofile(modpath .. "/microblocks.lua")
|
|
|
|
dofile(modpath .. "/registrations.lua")
|