mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-03 16:40:42 +02:00
Make stairplus:register_* functions work without using register_all.
This commit is contained in:
@ -10,7 +10,7 @@ local S = moreblocks.intllib
|
||||
-- Node will be called <modname>:micro_<subname>
|
||||
|
||||
function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
return stairsplus:register_micro(modname, subname, recipeitem, {
|
||||
stairsplus:register_micro(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
@ -68,22 +68,24 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
|
||||
local desc = S("%s Microblock"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
||||
end
|
||||
|
||||
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
|
Reference in New Issue
Block a user