mesecons
mesecons copied to clipboard
Feature request: allow a mod to add its own global tables/vars/functions to LuaC env
My LED marquee mod takes messages and command/control keywords from a Lua Controller via digilines. While everything works just fine, there are a couple of tables in my mod that I'd like to make available to LuaC programs.
I see no way to do this without modifying the LuaC mod itself.
I think that feature would be very nice to have. Things to note are:
- The code will run inside the sandbox, so 1) it can be interrupted at any time, and 2) there is a string sandbox (although it can be left easily).
- There is a proposal #387 (that’s not my personal request, I’m just the man who made a dedicated issue) to separate the sandbox from the LuaC itself. I also want to make a true sandbox, it will require a special API to make functions available inside.
Related: #341