summaryrefslogtreecommitdiff
path: root/lcdocs.lua
blob: 6661af4a5ea239de4aa26d1b616c9d592289d0fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if (not minetest.global_exists("mesecon")) or type(mesecon.lc_docs) ~= "table" then return end

local examples = {
	["Digilines Piston"] = "piston.lua",
	["Digilines Button"] = "button.lua",
	["Digilines I/O Expander"] = "ioexpander.lua",
	["Digilines EEPROM/SRAM"] = "memory.lua",
	["Digilines Dimmable Light"] = "light.lua",
}

for k,v in pairs(examples) do
	local f = io.open(minetest.get_modpath("digistuff")..DIR_DELIM.."lc_examples"..DIR_DELIM..v,"r")
	mesecon.lc_docs.examples[k] = f:read("*all")
	f:close()
end