Repository navigation
feat(merge): merge command and Sequence lists per run - #9
Merged
Merged
Conversation
Three-way merge of the event command lists and Sequence lists that several mods edit. A command tree parser, a per-body match of whole nodes and then of unique heads, moves kept as one run at any depth, and a merge inside one node. A clashing run is one LogicClash or SequenceClash per list, which PickMod and PickVanilla resolve per run. Inserts of several mods at one gap are OrderAmbiguous, unless one mod's inserts hold another's in order, which are taken once. A map's width and height join its whole data op, and a resize keeps data one value even when the tile count stays the same.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Slice 2b of the merge engine: event command lists and Sequence lists that several mods edit are merged with vanilla's list, instead of clashing as one value.
What it does
CommandTreeparses a command list by indent, as the engine walks it, and refuses anything else (GR-T2), so a list it cannot read stays one value.LogicClashorSequenceClashper list;PickModandPickVanillaact per clashing run, and clean edits elsewhere stay. Inserts of several mods at one gap areOrderAmbiguous, profile order by default; when one mod's inserts hold another's in order ([a]and[a, b]), the longer run is taken once. Fingerprints do not change with profile order.datais one value even when the tile count stays the same, andwidthandheightjoin its cluster.Review first
RPGModder.Core/Merge/ListMerge.cs: matching, moves, units, merge inside a node, fingerprints.RPGModder.Core/Merge/CommandTree.cs: the parser and GR-T8.RPGModder.Core/Merge/Composer.Lists.cs: collisions and choices per list.Known limits
Out of scope
The allocator, gates and plugin writer (slice 2c) are the next PRs. Showing these collisions to the player is lane A's A10.
Checks
dotnet format --verify-no-changesclean, LF only