techage_modpack/networks/init.lua

40 lines
935 B
Lua
Raw Normal View History

2021-08-01 12:00:22 +03:00
--[[
Networks
========
2023-03-05 13:54:37 +03:00
Copyright (C) 2021-2023 Joachim Stolberg
2021-08-01 12:00:22 +03:00
AGPL v3
See LICENSE.txt for more information
]]--
networks = {}
-- Version for compatibility checks, see readme.md/history
2023-03-05 13:54:37 +03:00
networks.version = 0.13
2021-08-01 12:00:22 +03:00
2022-01-28 20:22:52 +03:00
if not minetest.global_exists("tubelib2") or tubelib2.version < 2.2 then
minetest.log("error", "[networks] Networks requires tubelib2 version 2.2 or newer!")
2021-08-01 12:00:22 +03:00
return
end
local MP = minetest.get_modpath("networks")
dofile(MP .. "/hidden.lua")
dofile(MP .. "/networks.lua")
dofile(MP .. "/junction.lua")
dofile(MP .. "/observer.lua")
dofile(MP .. "/power.lua")
dofile(MP .. "/liquid.lua")
dofile(MP .. "/control.lua")
if minetest.settings:get_bool("networks_test_enabled") == true then
-- Only for testing/demo purposes
dofile(MP .. "/test/test_liquid.lua")
local Cable = dofile(MP .. "/test/test_power.lua")
assert(loadfile(MP .. "/test/test_control.lua"))(Cable)
dofile(MP .. "/test/test_tool.lua")
2022-01-28 20:22:52 +03:00
end