digistuff/init.lua

28 lines
734 B
Lua
Raw Permalink Normal View History

2016-01-05 15:11:13 -08:00
digistuff = {}
2015-12-15 12:42:58 -08:00
2018-11-24 13:56:29 -08:00
local components = {
"internal",
"conductors",
2018-11-24 13:56:29 -08:00
"touchscreen",
"light",
"noteblock",
"camera",
"switches",
2018-11-24 13:56:29 -08:00
"panel",
"piezo",
"detector",
2018-11-24 19:00:18 -08:00
"piston",
2019-06-01 14:50:42 -07:00
"timer",
2018-11-24 13:56:29 -08: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 10:11:32 -07:00
end
2018-11-25 13:19:56 -08: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