Bob's library shows that it is possible to make library for data.lua, but I can't get it to work when making my library for control.lua. If I add require "the file from the library mod" in control.lua, it complains for no such file. I have tried
- require "file-name"
- require "mod-name/file-name"
- require "__mod-name__/file-name"
![Confused :?](./images/smilies/icon_e_confused.gif)
Edit:
The answer is: you can actually make library mod for control.lua.
The trick is to use remote.add_interface in your library mod, and use remote.call in the other mods.
See the API doc for more details.
Thanks DedlySpyder for the answer.