mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-03 16:40:42 +02:00
more recipe schemata
This commit is contained in:
@ -158,7 +158,7 @@ function api.register_single(node, shape, overrides, meta)
|
||||
|
||||
if not meta.allow_override_groups and overrides.groups then
|
||||
stairsplus.log("warning", "removing group overrides from %s (was %s, will be %s)",
|
||||
shaped_name, minetest.serialize(overrides.groups):sub(8), minetest.serialize(def.groups):sub(8)
|
||||
shaped_name, minetest.write_json(overrides.groups), minetest.write_json(def.groups)
|
||||
)
|
||||
overrides.groups = nil
|
||||
end
|
||||
|
@ -68,7 +68,7 @@ function api.register_craft_schema(schema)
|
||||
error(problems)
|
||||
end
|
||||
|
||||
stairsplus.log("info", "registering craft schema %s", minetest.serialize(schema):sub(#("return ")))
|
||||
stairsplus.log("info", "registering craft schema %s", minetest.write_json(schema))
|
||||
|
||||
table.insert(api.registered_recipe_schemas, schema)
|
||||
|
||||
@ -138,7 +138,7 @@ local function register_for_schema(node, schema)
|
||||
end
|
||||
end
|
||||
|
||||
stairsplus.log("info", "registering recipe %s", minetest.serialize(recipe):sub(#("return ")))
|
||||
stairsplus.log("info", "registering recipe %s", minetest.write_json(recipe))
|
||||
|
||||
minetest.register_craft(recipe)
|
||||
end
|
||||
@ -148,7 +148,7 @@ function api.register_schema_crafts_for_node(node)
|
||||
local shapes = api.get_shapes_hash(node)
|
||||
for _, schema in ipairs(api.registered_recipe_schemas) do
|
||||
if has_the_right_shapes(schema, shapes) then
|
||||
stairsplus.log("verbose", "using schema %s", minetest.serialize(schema):sub(#("return ")))
|
||||
stairsplus.log("verbose", "using schema %s", minetest.write_json(schema))
|
||||
register_for_schema(node, schema)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user