mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-06-30 23:20:44 +02:00
Make stairplus:register_* functions work without using register_all.
This commit is contained in:
@ -17,19 +17,28 @@ and minetest.setting_getbool("creative_mode") then
|
||||
stairsplus.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
function stairsplus:register_all(modname, subname, recipeitem, fields)
|
||||
fields = fields or {}
|
||||
fields.groups = fields.groups or {}
|
||||
if not moreblocks.config.stairsplus_in_creative_inventory then
|
||||
fields.groups.not_in_creative_inventory = 1
|
||||
function stairsplus:prepare_groups(groups)
|
||||
result = {}
|
||||
if groups then
|
||||
for k, v in pairs(groups) do
|
||||
if k ~= "wood" and k ~= "stone" then
|
||||
result[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
if not moreblocks.config.stairsplus_in_creative_inventory then
|
||||
result.not_in_creative_inventory = 1
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function stairsplus:register_all(modname, subname, recipeitem, fields)
|
||||
self:register_stair(modname, subname, recipeitem, fields)
|
||||
self:register_slab (modname, subname, recipeitem, fields)
|
||||
self:register_slope(modname, subname, recipeitem, fields)
|
||||
self:register_panel(modname, subname, recipeitem, fields)
|
||||
self:register_micro(modname, subname, recipeitem, fields)
|
||||
-- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps.
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
end
|
||||
|
||||
function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
|
Reference in New Issue
Block a user