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:
wsor4035
2024-04-14 06:23:58 -04:00
committed by GitHub
parent 4b5e58331c
commit 640bc42ae5
12 changed files with 82 additions and 83 deletions

View File

@ -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",

View File

@ -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},
},
})

View File

@ -1,2 +1,3 @@
name = home_vending_machines
depends = xcompat
optional_depends = screwdriver, default, dye, vessels, farming