1
0
mirror of https://github.com/mt-mods/basic_materials.git synced 2024-11-05 01:50:28 +01:00
basic_materials/plastics.lua
Louis fb800f9fc3 Add custom groups
This will allow others mods (as https://github.com/louisroyer/minetest-keyring)
to register crafts using groups (because I don't care of the material used, only the shape matter).
2020-07-12 13:05:06 +02:00

57 lines
1.6 KiB
Lua

-- Translation support
local S = minetest.get_translator("basic_materials")
-- items
minetest.register_craftitem("basic_materials:plastic_sheet", {
description = S("Plastic sheet"),
inventory_image = "basic_materials_plastic_sheet.png",
})
minetest.register_craftitem("basic_materials:plastic_strip", {
description = S("Plastic strips"),
groups = { strip = 1 },
inventory_image = "basic_materials_plastic_strip.png",
})
minetest.register_craftitem("basic_materials:empty_spool", {
description = S("Empty wire spool"),
inventory_image = "basic_materials_empty_spool.png"
})
-- crafts
minetest.register_craft({
type = "cooking",
output = "basic_materials:plastic_sheet",
recipe = "basic_materials:paraffin",
})
minetest.register_craft({
type = "fuel",
recipe = "basic_materials:plastic_sheet",
burntime = 30,
})
minetest.register_craft( {
output = "basic_materials:plastic_strip 9",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
},
})
minetest.register_craft( {
output = "basic_materials:empty_spool 3",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "", "basic_materials:plastic_sheet", "" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
},
})
-- aliases
minetest.register_alias("homedecor:plastic_sheeting", "basic_materials:plastic_sheet")
minetest.register_alias("homedecor:plastic_strips", "basic_materials:plastic_strip")
minetest.register_alias("homedecor:empty_spool", "basic_materials:empty_spool")