Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to using xcompat #113

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ read_globals = {
-- mods
"default", "mesecon", "digiline",
"screwdriver", "unified_inventory",
"i3", "mcl_experience", "awards"
"i3", "mcl_experience", "awards",
"xcompat",

}
4 changes: 2 additions & 2 deletions crafts.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Crafting recipes for pipes
local materials = ...
local materials = xcompat.materials

minetest.register_craft( {
output = "pipeworks:pipe_1_empty 12",
Expand Down Expand Up @@ -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" }
},
})
Expand Down
7 changes: 2 additions & 5 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down
67 changes: 0 additions & 67 deletions materials.lua

This file was deleted.

2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tubes/embedded_tube.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down