Improve ME node/item registration functions
Improves item registration and adds node registration. These functions allow easy registration of recipes, changing colour of second line in description, and "autocompletion" for texture names.
This commit is contained in:
@ -26,7 +26,7 @@ function microexpansion.register_cell(itemstring, def)
|
||||
if def.recipe then
|
||||
-- if recipe, register recipe
|
||||
if def.recipe then
|
||||
register_recipe(BASENAME..":"..itemstring, def.recipe)
|
||||
microexpansion.register_recipe(BASENAME..":"..itemstring, def.recipe)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -50,15 +50,16 @@ local function chest_formspec(pos, start_id, listname, page_max, query)
|
||||
end
|
||||
|
||||
-- [me chest] Register node
|
||||
minetest.register_node("microexpansion:chest", {
|
||||
description = "ME Chest\nCan interact with items in ME storage cells",
|
||||
microexpansion.register_node("chest", {
|
||||
description = "ME Chest",
|
||||
usedfor = "Can interact with items in ME storage cells",
|
||||
tiles = {
|
||||
"microexpansion_chest_top.png",
|
||||
"microexpansion_chest_top.png",
|
||||
"microexpansion_chest_side.png",
|
||||
"microexpansion_chest_side.png",
|
||||
"microexpansion_chest_side.png",
|
||||
"microexpansion_chest_front.png",
|
||||
"chest_top",
|
||||
"chest_top",
|
||||
"chest_side",
|
||||
"chest_side",
|
||||
"chest_side",
|
||||
"chest_front",
|
||||
},
|
||||
is_ground_content = false,
|
||||
groups = { cracky = 1 },
|
||||
|
Reference in New Issue
Block a user