add 1-10k#201
Merged
Merged
Conversation
Merged
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for additional key modes, allowing maps to support between 1 and 10 keys. Key changes include refactoring key-bindings in the virtual replay player, updating key press state enums, and modifying helper methods for mode conversion and key count calculations.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Quaver.API/Replays/Virtual/VirtualReplayPlayer.cs | Refactored virtual key binding logic to use a dynamic key count and updated scratch key handling |
| Quaver.API/Replays/ReplayKeyPressState.cs | Extended the ReplayKeyPressState enum to include additional keys |
| Quaver.API/Replays/Replay.cs | Simplified key lane conversion and updated key flag handling logic |
| Quaver.API/Maps/Qua.cs | Modified key count calculation using the new ModeHelper function |
| Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs | Refactored hand and finger mapping logic based on dynamic key count |
| Quaver.API/Maps/Parsers/OsuBeatmap.cs | Updated key count validation and game mode conversion logic |
| Quaver.API/Maps/Parsers/Malody/MalodyFile.cs | Updated game mode determination using ModeHelper |
| Quaver.API/Helpers/ModeHelper.cs | Added support for new game modes and key count conversions |
| Quaver.API/Enums/GameMode.cs | Added new game mode values for 1-10 keys |
Comments suppressed due to low confidence (3)
Quaver.API/Replays/Virtual/VirtualReplayPlayer.cs:105
- The approach adds 2 to keyCount for scratch keys, whereas in Qua.GetKeyCount scratch is added as 1, creating an inconsistency. Consider reviewing and harmonizing scratch key handling across modules.
if (map.HasScratchKey) keyCount += 2; // Scratch can be pressed by 2 keys
Quaver.API/Replays/Replay.cs:386
- Consider adding input validation to ensure that 'lane' falls within the expected range to avoid producing an invalid key press state.
public static ReplayKeyPressState KeyLaneToPressState(int lane) => (ReplayKeyPressState)(1 << (lane - 1));
Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs:91
- [nitpick] The bitwise calculation for determining FingerState in even key counts is non-obvious. Consider adding inline comments to explain the rationale behind the bit shifting logic.
return (FingerState)(1 << (half - lane));
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.
No description provided.