FEAT: Add support for LUAL records (openMW) #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think the PR overall should be pretty straightforward so I won't bore you too much with details, and instead focus on validating the results this PR gives.
We have this omwaddon that integration tests generate at OpenMW which uses LUAL and all possible subrecords/combinations thereof.
lua_conf_test.omwaddon.zip
The description for the structs and bitflags in C++ are here: https://gitlab.com/OpenMW/openmw/-/blob/master/components/esm/luascripts.hpp#L21
NOTE: This does mean that LUAL has merge logic you'll need to account for in MTM, but they're pretty simple to deal with. If byte 8, merge with previous configuration for this script path (LUAS), otherwise overwrite.
Yea, that's about it, I guess. You can build tes3conv against this version of tes3, and the lua_conf_test.omwaddon is byte-identical to the original after the round-trip, so it's mostly fine with me.
Maybe we could do better than
ScriptConfigList.EDIT: There was one another thing I wanted to mention. In a separate PR, I'd like to add support for encoding and decoding the LUAD sub, but that'll necessitate its own crate which I didn't feel like making just now. Much more important to get the feature itself into people's hands.