nakama
nakama copied to clipboard
[Lua][Improvement] Consider processing all init.lua before other scripts
Shouldn't init.lua been processed before all other scripts?
Asscending depth order of folder structure and priority to init.lua before other script.
I'm running a project which contain an api folder, all dependecy have been handled and server starts without complains. After I deleted the api folder, some of the global variable and global functions are now missing, which affect to other modules.
Current the compling order will look like this.
- class.agent
- class.init
- class.table
- game.agent
- game.init
- game.table
- init
It should be like this, in case of breaking the dependency between.
- init
- class.init
- game.init
- class.agent
- class.table
- game.agent
- game.table
I could provide a PR if needed.