add crafts for vending machines

This commit is contained in:
unknown 2022-02-02 06:33:58 -05:00
parent 2058c58738
commit 0af4ae2eb2
3 changed files with 34 additions and 10 deletions

View File

@ -0,0 +1,32 @@
if minetest.get_modpath("default") then
if minetest.get_modpath("dye") then
minetest.register_craft({
output = "home_workshop_misc:soda_machine",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "dye:red", "default:steel_ingot"},
{"default:steel_ingot", "default:copperblock", "default:steel_ingot"},
},
})
end
if minetest.get_modpath("vessel") then
minetest.register_craft({
output = "home_vending_machines:drink_machine",
recipe = {
{"default:steel_ingot", "group:vessel", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:copperblock", "default:steel_ingot"},
},
})
end
if minetest.get_modpath("farming") then
minetest.register_craft({
output = "home_vending_machines:sweet_machine",
recipe = {
{"default:steel_ingot", "group:food_sugar", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:copperblock", "default:steel_ingot"},
},
})
end
end

View File

@ -4,5 +4,6 @@ home_vending_machines = {}
dofile(modpath .. "/api.lua")
dofile(modpath .. "/machines.lua")
dofile(modpath .. "/items.lua")
dofile(modpath .. "/crafts.lua")
home_vending_machines.init = true

View File

@ -14,13 +14,4 @@ minetest.register_craft({
{ "basic_materials:steel_bar", "default:steel_ingot", "basic_materials:steel_bar" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
},
})
minetest.register_craft({
output = "homedecor:soda_machine",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "dye:red", "default:steel_ingot"},
{"default:steel_ingot", "default:copperblock", "default:steel_ingot"},
},
})
})