diff options
author | cheapie <no-email-for-you@example.com> | 2022-01-07 16:51:04 -0600 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2022-01-07 16:51:04 -0600 |
commit | 32641893e75f11903489a38a201bd661c8f99b50 (patch) | |
tree | 2412538cad02594cf04f7952c8a751c54155fd99 /lcdocs.lua | |
parent | ee316f2325e26dc532ccaa09369e9d173b5ef411 (diff) | |
download | digistuff-32641893e75f11903489a38a201bd661c8f99b50.tar digistuff-32641893e75f11903489a38a201bd661c8f99b50.tar.gz digistuff-32641893e75f11903489a38a201bd661c8f99b50.tar.bz2 digistuff-32641893e75f11903489a38a201bd661c8f99b50.tar.xz digistuff-32641893e75f11903489a38a201bd661c8f99b50.zip |
Diffstat (limited to 'lcdocs.lua')
-rw-r--r-- | lcdocs.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lcdocs.lua b/lcdocs.lua new file mode 100644 index 0000000..6661af4 --- /dev/null +++ b/lcdocs.lua @@ -0,0 +1,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 |