pioneerspacesim/pioneer — Issue #695: Lua load order
Author: Brianetta
Created: 2011-10-19 19:25:25+00:00
State: open
Labels: To do

IRC excerpt follows. Basically, load order is starting to become a headache.

**The system should be changed to set up the Lua path properly and just include the 'main' script for each module, then let them use require() to pull in whatever ancillary scripts they need**

```
[20:19] Is there an issue for Lua module load order yet? Because that's becoming a serious problem.
[20:19] I think the work-around where needed is numeral prefixes in filenames
[20:19] so we'd use 01_Langueages.lua, 02_Assassinations.lua
[20:20] The system should be changed to set up the Lua path properly and just include the 'main' script for each module, then let them use require() to pull in whatever ancillary scripts they need
[20:20] ideally, yes
[20:20] libs/ is loaded first, regardless
[20:20] which is where Translate.lua lives
[20:20] so they shouldn't need to be require()d
[20:21] but languages, yes
[20:21] which also makes it much more certain to coders, where these things are coming from
[20:21] in general modules may end up with multiple script files -- best to have a sensible way of dealing with that
[20:21] * Brianetta concurs