digistuff-cd2025/init.lua

39 lines
984 B
Lua
Raw Normal View History

2016-01-05 17:11:13 -06:00
digistuff = {}
2015-12-15 14:42:58 -06:00
2018-11-24 15:56:29 -06:00
local components = {
"internal",
"conductors",
2018-11-24 15:56:29 -06:00
"touchscreen",
"light",
"noteblock",
"camera",
"switches",
2018-11-24 15:56:29 -06:00
"panel",
"piezo",
"detector",
2018-11-24 21:00:18 -06:00
"piston",
2019-06-01 16:50:42 -05:00
"timer",
"cardreader",
2020-04-30 00:44:04 -05:00
"channelcopier",
"controller",
2021-01-26 15:44:07 -06:00
"memory",
"gpu",
2021-01-29 21:22:58 -06:00
"sillystuff",
2021-02-05 20:09:30 -06:00
"movestone",
2018-11-24 15:56:29 -06:00
}
2019-09-13 14:09:25 -05:00
if minetest.get_modpath("mesecons_luacontroller") then table.insert(components,"ioexpander") end
2018-11-24 15:56:29 -06: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 12:11:32 -05:00
end
2018-11-25 15:19:56 -06:00
local http = minetest.request_http_api()
if not http then
2020-04-15 15:32:26 -05: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 15:19:56 -06:00
else
2021-03-05 14:28:57 +01:00
local qos_http = QoS and QoS(http, 3) or http
2021-03-04 17:39:41 +01:00
loadfile(string.format("%s%s%s.lua",minetest.get_modpath(minetest.get_current_modname()),DIR_DELIM,"nic"))(qos_http)
2018-11-25 15:19:56 -06:00
end