FreeER Grandmaster Cheater Supreme Reputation: 53 Joined: 09 Aug 2013 Posts: 1091
|
Posted: Fri Jul 22, 2022 11:54 pm Post subject: Simple Autorun Subdirectory Loader |
|
|
So I noticed mece's title extension and thought it looked nice, then I got annoyed by how many "random" lua files I had in autorun/ and decided to move them into more organized folders for what comes with CE vs what's from the forum and my own. CE doesn't auto load from subdirectories however and I wasn't going to just explicitly load every single file, hence I wrote a quick script that will load all lua files from any subdirectories in autorun, excluding ceshare since it had issues. If an init.lua file exists then only that file will be loaded to offer some customizability for larger projects. To exclude a folder you can either add it to the excludeDirs table like ceshare, though this would have to be redone if this extension ever updates, or simply create an empty init.lua file in the directory (since it'd be the only one called and then would do nothing).
https://github.com/FreeER/CE-Extensions/blob/master/loader.lua _________________ https://github.com/FreeER/ has a few CE related repos
|
|