Forums » Suggestions

Lua - get plugin directories function

Dec 08, 2022 Luxen link
This'd be a "nice to have" for a very particular use case, but I'll shoot my shot - lemme explain a bit:

My current project is a semi-replacement for the in-game plugin loading system; By acting as a custom interface, it provides in-game enabling/disabling of plugins, loading plugins in a dependency-ordered manner, and some standardized inter-communication between different plugins.

It actually works really well so far, however in order for plugins to be loaded through this system, they must *first* register themselves into the config.ini, where they add a path to their own INI file that contains the information needed by the new loader. This makes the system just a little clunky.

My intent:
By getting access to every sub-directory in plugins (not a full directory tree or even a list of files (though others might like that?), just a single-level directory list), I would be able to auto-check installed plugins for compatibility (the named INI file) with the new loader and handle them. This would reduce some of the config.ini usage, and reduce some of the complexity on my side.