Skip to content

Add classic hotkey support and set default OD for catch maps - #336

Merged
winnerspiros merged 3 commits into
winnerspiros:masterfrom
ppy:master
May 12, 2026
Merged

Add classic hotkey support and set default OD for catch maps#336
winnerspiros merged 3 commits into
winnerspiros:masterfrom
ppy:master

Conversation

@winnerspiros

@winnerspiros winnerspiros commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • F hotkey now toggles Traceable mod in addition to Hidden mod.
    • G hotkey now toggles Blinds mod in addition to Flashlight mod.
  • Adjustments

    • Updated overall difficulty calculation behavior in Catch mode.

Review Change Stack

peppy and others added 3 commits May 13, 2026 02:52
Closes #37725.

Read inline comment as to why this matters. Or don't, if you wish to
preserve sanity.
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 73942865-a5f2-4c1c-976c-264bb583b1c9

📥 Commits

Reviewing files that changed from the base of the PR and between 52795f2 and 6b50909.

📒 Files selected for processing (7)
  • osu.Game.Rulesets.Catch/Edit/Setup/CatchDifficultySection.cs
  • osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs
  • osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
  • osu.Game.Tests/Visual/Multiplayer/TestSceneDrawableLoungeRoom.cs
  • osu.Game/Overlays/Mods/Input/ClassicModHotkeyHandler.cs
  • osu.Game/Rulesets/Mods/ModBlinds.cs
  • osu.Game/Rulesets/Mods/ModTraceable.cs

📝 Walkthrough

Walkthrough

This PR refactors the mod hierarchy to support flexible hotkey bindings by introducing abstract base classes, updates Osu rulesets to use the new hierarchy, expands classic hotkey mappings to accommodate multiple mods per key, and applies independent fixes to catch difficulty syncing and test async scheduling.

Changes

Hotkey Refactoring and Supporting Fixes

Layer / File(s) Summary
Mod base classes for hotkey support
osu.Game/Rulesets/Mods/ModBlinds.cs, osu.Game/Rulesets/Mods/ModTraceable.cs
Introduces ModBlinds abstract class inheriting from Mod and ModTraceable abstract class inheriting from ModWithVisibilityAdjustment. These serve as parent classes for ruleset-specific implementations to enable flexible hotkey binding through inheritance.
Osu mod inheritance updates
osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs, osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
Updates OsuModBlinds to inherit from ModBlinds instead of Mod, and OsuModTraceable to inherit from ModTraceable instead of ModWithVisibilityAdjustment. Preserves all interfaces and implementation details.
Classic hotkey handler mapping expansion
osu.Game/Overlays/Mods/Input/ClassicModHotkeyHandler.cs
Expands the key-to-mod binding lookup table: the F key now maps to both ModHidden and ModTraceable (previously only ModHidden), and the G key now maps to both ModFlashlight and ModBlinds (previously only ModFlashlight). This enables the hotkey handler to select from multiple mods using the new inheritance hierarchy.
Catch difficulty OverallDifficulty sync
osu.Game.Rulesets.Catch/Edit/Setup/CatchDifficultySection.cs
Updates updateValues() to set Beatmap.Difficulty.OverallDifficulty from the approachRateSlider value, with documentation explaining lazer vs stable behavior differences and a stable edge case on marathon maps.
Multiplayer test scheduler fix
osu.Game.Tests/Visual/Multiplayer/TestSceneDrawableLoungeRoom.cs
Updates the mocked IOnlinePlayLounge.Join callback to schedule the "Incorrect password" failure response via Schedule() instead of invoking directly, ensuring the callback executes in the proper scheduler context.

🎯 2 (Simple) | ⏱️ ~10 minutes

A rabbit hops with glee,
New mod bases set mods free!
Hotkeys now bind two,
Catch syncs, tests renew—
Refactoring's complete, you see! 🐰

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@winnerspiros
winnerspiros merged commit 4e0fbc9 into winnerspiros:master May 12, 2026
4 of 10 checks passed
@gitar-bot

gitar-bot Bot commented May 12, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants