Skip to content

Commit

Permalink
start converting to using xcompat
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Aug 9, 2024
1 parent 81414e5 commit b084b58
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ read_globals = {
"minetest",
"vector",
"ItemStack",
"xcompat",

-- Deps
"creative", "mesecon", "mtt"
Expand Down
25 changes: 6 additions & 19 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ travelnet.abm_enabled = minetest.settings:get_bool("travelnet.abm_e

-- change these if you want other receipes for travelnet or elevator
travelnet.travelnet_recipe = {
{ "default:glass", "default:steel_ingot", "default:glass" },
{ "default:glass", "default:mese", "default:glass" },
{ "default:glass", "default:steel_ingot", "default:glass" }
{ xcompat.materials.glass, xcompat.materials.steel_ingot, xcompat.materials.glass },
{ xcompat.materials.glass, xcompat.materials.mese, xcompat.materials.glass },
{ xcompat.materials.glass, xcompat.materials.steel_ingot, xcompat.materials.glass }
}
travelnet.elevator_recipe = {
{ "default:steel_ingot", "default:glass", "default:steel_ingot" },
{ "default:steel_ingot", "", "default:steel_ingot" },
{ "default:steel_ingot", "default:glass", "default:steel_ingot" }
{ xcompat.materials.steel_ingot, xcompat.materials.glass, xcompat.materials.steel_ingot },
{ xcompat.materials.steel_ingot, "", xcompat.materials.steel_ingot },
{ xcompat.materials.steel_ingot, xcompat.materials.glass, xcompat.materials.steel_ingot }
}
travelnet.tiles_elevator = {
"travelnet_elevator_front.png",
Expand All @@ -43,19 +43,6 @@ travelnet.tiles_elevator = {
}
travelnet.elevator_inventory_image = "travelnet_elevator_inv.png"

if minetest.get_modpath("mcl_core") then
travelnet.travelnet_recipe = {
{ "mcl_core:glass", "mcl_core:iron_ingot", "mcl_core:glass" },
{ "mcl_core:glass", "mesecons_torch:redstoneblock", "mcl_core:glass" },
{ "mcl_core:glass", "mcl_core:iron_ingot", "mcl_core:glass" }
}
travelnet.elevator_recipe = {
{ "mcl_core:iron_ingot", "mcl_core:glass", "mcl_core:iron_ingot" },
{ "mcl_core:iron_ingot", "", "mcl_core:iron_ingot" },
{ "mcl_core:iron_ingot", "mcl_core:glass", "mcl_core:iron_ingot" }
}
end

travelnet.node_box = {
type = "fixed",
fixed = {
Expand Down
3 changes: 2 additions & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name = travelnet
optional_depends = mesecons, dye, mtt, mcl_core
depends = xcompat
optional_depends = mesecons, mtt
description = Network of teleporter-boxes that allows easy travelling to other boxes on the same network.

0 comments on commit b084b58

Please sign in to comment.