04-15-2011, 10:21 PM
I think the best solution for this is to simply write your own Lua "libraries" in a separate .lua file which can then be included in each plugin that uses this shared code. If I would run all plugins on a single stack and plugin B is dependant on plugin A for a certain function, what will happen if plugin A gets disabled? I think the system will be far more robust if plugins just load each "library" in their own stack so they wont interfere with each other. If there is a certain need to call a function on an other plugin, it can be done by calling a C++ function ( not right now, but in the future ).
Since I can call a Lua function from C++ by simply giving the name of a function as a string, so can you from Lua.
Since I can call a Lua function from C++ by simply giving the name of a function as a string, so can you from Lua.