digistuff/init.lua

34 lines
885 B
Lua
Raw Normal View History

2016-01-06 00:11:13 +01:00
digistuff = {}
2015-12-15 21:42:58 +01:00
2018-11-24 22:56:29 +01:00
local components = {
"internal",
"conductors",
2018-11-24 22:56:29 +01:00
"touchscreen",
"light",
"noteblock",
"camera",
"switches",
2018-11-24 22:56:29 +01:00
"panel",
"piezo",
"detector",
2018-11-25 04:00:18 +01:00
"piston",
2019-06-01 23:50:42 +02:00
"timer",
"cardreader",
2020-04-30 07:44:04 +02:00
"channelcopier",
"controller",
2018-11-24 22:56:29 +01:00
}
2019-09-13 21:09:25 +02:00
if minetest.get_modpath("mesecons_luacontroller") then table.insert(components,"ioexpander") end
2018-11-24 22:56:29 +01:00
for _,name in ipairs(components) do
dofile(string.format("%s%s%s.lua",minetest.get_modpath(minetest.get_current_modname()),DIR_DELIM,name))
2016-08-10 19:11:32 +02:00
end
2018-11-25 22:19:56 +01:00
local http = minetest.request_http_api()
if not http then
2020-04-15 22:32:26 +02:00
minetest.log("warning","digistuff is not allowed to use the HTTP API - digilines NIC will not be available!")
minetest.log("warning","If this functionality is desired, please add digistuff to your secure.http_mods setting")
2018-11-25 22:19:56 +01:00
else
loadfile(string.format("%s%s%s.lua",minetest.get_modpath(minetest.get_current_modname()),DIR_DELIM,"nic"))(http)
end