Closed jshield closed 1 year ago
Turns out this is because while I allow files to require files from different mods, those required files "forget" that they're in a different mod archive, so if those files try to require additional files, it will attempt to load them from an entirely different archive and predictably fail. So (despite my best efforts) I do need to keep a persistent tree of the current mod/file and handle entering and exiting their scope. I'll try and get to that this weekend.
Alright, this is now fixed. Now behaves successfully with the FreightForwarding pack as described, and I cross-checked it against Space Exploration which still works, so ideally there should be no regression issues with any other mod. In the process I also fixed an issue where Lua require paths with a prepended dot or slash wouldn't be resolved correctly, which is also now fixed. I'll probably push 1.0.4
to PYPI once I get it cleaned up in a little bit.
Cloned main down, updated factorio-data to "a7452ebca5ef4fa12f9e024be1fb5492fbb6d869 factorio-data (1.1.81)", installed stock FreightForwardingPack mod, no customized settings.
works correctly on 1.1.81 data without any mods installed.
and the resulting log occurs:
EDIT: fixed formatting