2018-04-05 05:57:30 +00:00
|
|
|
tinkering.pattern = {}
|
|
|
|
|
|
|
|
-- Register a new pattern
|
|
|
|
function tinkering.register_pattern(name, data)
|
2018-04-05 09:54:07 +00:00
|
|
|
local mod = data.mod_name or minetest.get_current_modname()
|
2018-04-05 05:57:30 +00:00
|
|
|
local desc = data.description
|
|
|
|
|
|
|
|
tinkering.pattern[name] = data
|
|
|
|
|
|
|
|
minetest.register_craftitem(mod..":"..name.."_pattern", {
|
|
|
|
description = desc.." Pattern",
|
|
|
|
inventory_image = "tinkering_"..name.."_pattern.png",
|
|
|
|
groups = {pattern=1}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Create blank pattern
|
|
|
|
minetest.register_craftitem("tinkering:blank_pattern", {
|
|
|
|
description = "Blank Pattern",
|
|
|
|
inventory_image = "tinkering_blank_pattern.png",
|
|
|
|
groups = {pattern=1}
|
|
|
|
})
|