From 0af4ae2eb22ed49366752eed766cc10a19c0d08d Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Wed, 2 Feb 2022 06:33:58 -0500 Subject: [PATCH] add crafts for vending machines --- home_vending_machines/crafts.lua | 32 ++++++++++++++++++++++++++++++++ home_vending_machines/init.lua | 1 + home_workshop_misc/crafts.lua | 11 +---------- 3 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 home_vending_machines/crafts.lua diff --git a/home_vending_machines/crafts.lua b/home_vending_machines/crafts.lua new file mode 100644 index 0000000..2990b29 --- /dev/null +++ b/home_vending_machines/crafts.lua @@ -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 \ No newline at end of file diff --git a/home_vending_machines/init.lua b/home_vending_machines/init.lua index cf44cf6..ca9fe6d 100644 --- a/home_vending_machines/init.lua +++ b/home_vending_machines/init.lua @@ -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 \ No newline at end of file diff --git a/home_workshop_misc/crafts.lua b/home_workshop_misc/crafts.lua index 8e6523b..46b0826 100644 --- a/home_workshop_misc/crafts.lua +++ b/home_workshop_misc/crafts.lua @@ -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"}, - }, -}) +}) \ No newline at end of file