Help With Lua Require
Posted: Fri Nov 30, 2018 6:33 pm
Hey,
I'm trying to figure out how Factorio and Angels Refining uses Lua Require but outside of Factorio I can't seem to get the same behaviour.
I opened a Stackoverflow question: https://stackoverflow.com/questions/535 ... quire-path
The line is question is the first line in this file:
https://github.com/Arch666Angel/ModsCur ... ctions.lua
Which originally included here: https://github.com/Arch666Angel/ModsCur ... ta.lua#L21
I'm trying to figure out how to configure Lua in my external tool to ensure that the require in override-functions.lua uses the correct path (relative to that file). Instead it's searching for paths relative to data.lua and a bunch of other hardcoded paths I have configured.
Any help would be appreciated.
Thanks.
I'm trying to figure out how Factorio and Angels Refining uses Lua Require but outside of Factorio I can't seem to get the same behaviour.
I opened a Stackoverflow question: https://stackoverflow.com/questions/535 ... quire-path
The line is question is the first line in this file:
https://github.com/Arch666Angel/ModsCur ... ctions.lua
Which originally included here: https://github.com/Arch666Angel/ModsCur ... ta.lua#L21
I'm trying to figure out how to configure Lua in my external tool to ensure that the require in override-functions.lua uses the correct path (relative to that file). Instead it's searching for paths relative to data.lua and a bunch of other hardcoded paths I have configured.
Any help would be appreciated.
Thanks.