Rework EngineContainer to use generics#414
Open
Supersonicboss1 wants to merge 1 commit into
Open
Conversation
wyrdough
approved these changes
Jul 12, 2026
wyrdough
left a comment
Contributor
There was a problem hiding this comment.
Gonna need to look at this in context and do a bit of testing, but at first blush this looks good to me. Thanks!
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.
We also store an
InstrumentDifficulty<TNoteType>now, instead of separate Instrument and Difficulty members (though we still expose these through an auto-property for convenience). This has the benefit ofGetUnisonSectionsusing the note chart the engine uses, instead of the original note chart, preserving any modifications made by modifiers.We pass in all three parameters the engine requires (note, params, stats) instead of a note/engine pair because it allows us to use anything in
BaseEngine.Generic.cs, including a bunch of events (e.g.OnNoteHit) that we would otherwise not be able to use without manual type checks. This saves us a bunch of boilerplate in event subscriptions, for example (though we still need some, e.g. because ofOnOverhit/OnOverstrum, and vocals-specific events).Unfortunately a fair bit of boilerplate had to be added to ReplayAnalyzer since it can't really use generics easily.
Requires YARC-Official/YARG#1560.