switch to using xcompat (#113)

This commit is contained in:
wsor4035 2024-03-03 06:37:46 -05:00 committed by GitHub
parent cb2a59131c
commit 8724c28939
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 77 deletions

View File

@ -20,6 +20,7 @@ read_globals = {
-- mods
"default", "mesecon", "digiline",
"screwdriver", "unified_inventory",
"i3", "mcl_experience", "awards"
"i3", "mcl_experience", "awards",
"xcompat",
}

View File

@ -1,5 +1,5 @@
-- Crafting recipes for pipes
local materials = ...
local materials = xcompat.materials
minetest.register_craft( {
output = "pipeworks:pipe_1_empty 12",
@ -151,7 +151,7 @@ minetest.register_craft( {
output = "pipeworks:teleport_tube_1 2",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ materials.desert_stone, materials.teleporter, materials.desert_stone },
{ materials.desert_stone, materials.mese, materials.desert_stone },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
},
})

View File

@ -61,14 +61,11 @@ dofile(pipeworks.modpath.."/flowing_logic.lua")
dofile(pipeworks.modpath.."/filter-injector.lua")
dofile(pipeworks.modpath.."/trashcan.lua")
dofile(pipeworks.modpath.."/wielder.lua")
local materials = loadfile(pipeworks.modpath.."/materials.lua")()
dofile(pipeworks.modpath.."/tubes/registration.lua")
dofile(pipeworks.modpath.."/tubes/routing.lua")
dofile(pipeworks.modpath.."/tubes/sorting.lua")
dofile(pipeworks.modpath.."/tubes/signal.lua")
loadfile(pipeworks.modpath.."/tubes/embedded_tube.lua")(materials)
dofile(pipeworks.modpath.."/tubes/embedded_tube.lua")
dofile(pipeworks.modpath.."/tubes/pane_embedded_tube.lua")
if pipeworks.enable_teleport_tube then
@ -111,7 +108,7 @@ if pipeworks.enable_autocrafter then
dofile(pipeworks.modpath.."/autocrafter.lua")
end
loadfile(pipeworks.modpath.."/crafts.lua")(materials)
dofile(pipeworks.modpath.."/crafts.lua")
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")

View File

@ -1,67 +0,0 @@
local materials = {
stone = "default:stone",
desert_stone = "default:desert_stone",
desert_sand = "default:desert_sand",
chest = "default:chest",
copper_ingot = "default:copper_ingot",
steel_ingot = "default:steel_ingot",
gold_ingot = "default:gold_ingot",
mese = "default:mese",
mese_crystal = "default:mese_crystal",
mese_crystal_fragment = "default:mese_crystal_fragment",
teleporter = "default:mese",
glass = "default:glass"
}
if minetest.get_modpath("mcl_core") then
materials = {
stone = "mcl_core:stone",
desert_stone = "mcl_core:redsandstone",
desert_sand = "mcl_core:sand",
chest = "mcl_chests:chest",
steel_ingot = "mcl_core:iron_ingot",
gold_ingot = "mcl_core:gold_ingot",
mese = "mesecons_torch:redstoneblock",
mese_crystal = "mesecons:redstone",
mese_crystal_fragment = "mesecons:redstone",
teleporter = "mesecons_torch:redstoneblock",
copper_ingot = "mcl_copper:copper_ingot",
glass = "mcl_core:glass",
}
elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then
materials = {
stone = "fl_stone:stone",
desert_stone = "fl_stone:desert_stone",
desert_sand = "fl_stone:desert_sand",
chest = "fl_storage:wood_chest",
steel_ingot = "fl_ores:iron_ingot",
gold_ingot = "fl_ores:gold_ingot",
mese = "fl_ores:iron_ingot",
mese_crystal = "fl_ores:iron_ingot",
mese_crystal_fragment = "fl_ores:iron_ingot",
teleporter = "fl_ores:iron_ingot",
copper_ingot = "fl_ores:copper_ingot",
glass = "fl_glass:framed_glass",
}
elseif minetest.get_modpath("hades_core") then
materials = {
stone = "hades_core:stone",
desert_stone = "hades_core:stone_baked",
desert_sand = "hades_core:volcanic_sand",
chest = "hades_chests:chest";
steel_ingot = "hades_core:steel_ingot",
gold_ingot = "hades_core:gold_ingot",
mese = "hades_core:mese",
mese_crystal = "hades_core:mese_crystal",
mese_crystal_fragment = "hades_core:mese_crystal_fragment",
teleporter = "hades_materials:teleporter_device",
copper_ingot = "hades_core:copper_ingot",
tin_ingot = "hades_core:tin_ingot",
glass = "hades_core:glass",
}
if minetest.get_modpath("hades_default") then
materials.desert_sand = "hades_default:desert_sand"
end
end
return materials

View File

@ -1,5 +1,5 @@
name = pipeworks
description = This mod uses mesh nodes and nodeboxes to supply a complete set of 3D pipes and tubes, along with devices that work with them.
depends = basic_materials
depends = basic_materials, xcompat
optional_depends = mesecons, mesecons_mvps, digilines, signs_lib, unified_inventory, default, screwdriver, fl_mapgen, sound_api, i3, hades_core, hades_furnaces, hades_chests, mcl_mapgen_core, mcl_barrels, mcl_furnaces, mcl_experience
min_minetest_version = 5.5.0

View File

@ -1,4 +1,4 @@
local materials = ...
local materials = xcompat.materials
local S = minetest.get_translator("pipeworks")
local straight = function(pos, node, velocity, stack) return {velocity} end