digistuff/init.lua

28 lines
734 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",
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
minetest.log("error","digistuff is not allowed to use the HTTP API - digilines NIC will not be available!")
minetest.log("error","If this functionality is desired, please add digistuff to your secure.http_mods setting")
else
loadfile(string.format("%s%s%s.lua",minetest.get_modpath(minetest.get_current_modname()),DIR_DELIM,"nic"))(http)
end