mod.lua, lib.lua config files and scripts/main.lua main scripts (attempt 2)#263
mod.lua, lib.lua config files and scripts/main.lua main scripts (attempt 2)#263MrOinky wants to merge 7 commits intoKristalTeam:mainfrom
mod.lua, lib.lua config files and scripts/main.lua main scripts (attempt 2)#263Conversation
The old structure for mods will continue to work as a legacy option as there is no incompatibility as of yet, but with an {} to indicate they are using the legacy json format
|
Disregard my prior comments about reading the file in text as i have gotten rid of that awful 🤮 system now in place of executing the file again but much better than the time before with several safe checks on how it executes and the return values that i am fairly confident should now catch every library correctly (and never error in the loadthread) |
I've come up with a new fix for the legacy checking which, while it appears a bit finnicky at first (reading the
lib.luafile as text in the ambiguous case), after properly testing it, including on Dark Place this time (because it has a ton of libraries in particular, where the errors were arising) works properly, and as far as i can tell will not run into any of the previous problemsAnd to clarify further what the legacy checker is doing when it is reading
lib.luanow, it is checking for areturn {at the start, as this is how files on the new system only end up looking - it does not affect the format of anything still on the old system, and is only used as a last resort when there is no other indication of whether a library is using the legacy or new system, not the default way of checking