mirror of
				https://github.com/mt-mods/home_workshop_modpack.git
				synced 2025-11-04 09:55:33 +01:00 
			
		
		
		
	improve game agnostic ism (#18)
* start work on xcompating this * make items digable in farlands * remove reduntant if check * use xcompat for copperblock and remove checks that prevent issues on non mtg before * computers crafting * last two crafts
This commit is contained in:
		@@ -12,7 +12,7 @@ local function reg_simple(name, def)
 | 
			
		||||
        tiles = def.tiles,
 | 
			
		||||
        paramtype = "light",
 | 
			
		||||
        paramtype2 = "facedir",
 | 
			
		||||
        groups = def.groups or {snappy=3},
 | 
			
		||||
        groups = def.groups or {snappy=3, dig_tree=2},
 | 
			
		||||
        is_ground_content = false,
 | 
			
		||||
        selection_box = {
 | 
			
		||||
            type = "fixed",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,32 +1,26 @@
 | 
			
		||||
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("vessels") 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.global_exists("farming") and farming.mod == "redo" 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
 | 
			
		||||
local materials = xcompat.materials
 | 
			
		||||
 | 
			
		||||
minetest.register_craft({
 | 
			
		||||
    output = "home_workshop_misc:soda_machine",
 | 
			
		||||
    recipe = {
 | 
			
		||||
        {materials.steel_ingot, materials.steel_ingot, materials.steel_ingot},
 | 
			
		||||
        {materials.steel_ingot, materials.dye_red, materials.steel_ingot},
 | 
			
		||||
        {materials.steel_ingot, materials.copper_block, materials.steel_ingot},
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
minetest.register_craft({
 | 
			
		||||
    output = "home_vending_machines:drink_machine",
 | 
			
		||||
    recipe = {
 | 
			
		||||
        {materials.steel_ingot, "group:vessel", materials.steel_ingot},
 | 
			
		||||
        {materials.steel_ingot, materials.steel_ingot, materials.steel_ingot},
 | 
			
		||||
        {materials.steel_ingot, materials.copper_block, materials.steel_ingot},
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
minetest.register_craft({
 | 
			
		||||
    output = "home_vending_machines:sweet_machine",
 | 
			
		||||
    recipe = {
 | 
			
		||||
        {materials.steel_ingot, "group:food_sugar",    materials.steel_ingot},
 | 
			
		||||
        {materials.steel_ingot, materials.steel_ingot, materials.steel_ingot},
 | 
			
		||||
        {materials.steel_ingot, materials.copper_block, materials.steel_ingot},
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
@@ -1,2 +1,3 @@
 | 
			
		||||
name = home_vending_machines
 | 
			
		||||
depends = xcompat
 | 
			
		||||
optional_depends = screwdriver, default, dye, vessels, farming
 | 
			
		||||
		Reference in New Issue
	
	Block a user