1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-08 04:57:24 +08:00
Commit Graph

53921 Commits

Author SHA1 Message Date
Ryuki
d5f10cbb9d
Revert 787dee24 and initialize calculator in HUDOverlay 2022-08-14 18:53:00 +02:00
Ryuki
e08f71797e
Change displayed metric from "KPS" to "clicks/s" 2022-08-13 04:27:26 +02:00
Ryuki
9b252b1d81
Make KeysPerSecondCalculator dependency in HUDOverlay nullable 2022-08-11 11:58:30 +02:00
Ryuki
d29cba80e9
Remove useless comment in KeysPerSecondCounter 2022-08-11 11:01:16 +02:00
Ryuki
787dee249d
Move KeysPerSecondCalculator instantiation from HUDOverlay to Player
This prevents messing with *future* Skin (de)serialization
2022-08-11 10:37:16 +02:00
Ryuki
3c6461b9e4
Remove KPS acronym usage 2022-08-11 10:01:39 +02:00
Ryuki
0e1efbd865
Rename DrawableCookieziRuleset to MockDrawableRuleset 2022-08-11 01:04:06 +02:00
Ryuki
d58d5eebe2
Add basic tests for KPS
Created private mock classes to use them in place of `GameplayClock` and
`DrawableRuleset`.
2022-08-11 00:51:13 +02:00
Ryuki
0a94fb4039
Make KPS counter strictly depending only on KPS calculator
`KeysPerSecondCounter` now depends on `KeysPerSecondCalculator` via the
`BackgroundDependencyLoaderAttribute` method, making it appear only in a
gameplay context without requiring `GameplayClock` without using it.
2022-08-11 00:46:39 +02:00
Ryuki
46e372cb99
Add more readiness checks in KeysPerSecondCalculator 2022-08-11 00:43:15 +02:00
Ryuki
9e80d3f71c
Re-adjust timespan conditions in KeysPerSecondCalculator 2022-08-11 00:42:22 +02:00
Ryuki
edb8e5e33e
Temporarily emptying TestSceneKeysPerSecondCounter until a good test can be found 2022-08-09 02:43:41 +02:00
Ryuki
b52a07c16a
Use DI to provide dependencies for KPS Calculator and improve input
gathering

KPS Calculator now uses DI to retrieve the clocks. Using `HUDOverlay` it
is now cached for `KeysPerSecondCounter`s to resolve it. This also
allows to make an "Attach" flow like `KeyCounter`.
2022-08-08 21:54:06 +02:00
Ryuki
b2557a8d2d
Refactor KPS
- Remove '#nullable disable' in KeysPerSecondCalculator and
  KeysPerSecondCounter
- Remove KeysPerSecondCalculator IDisposable implementation
- Make KeysPerSecondCalculator static instance initialized once by
  KeysPerSecondCounters
- Auto transfer dependencies from KeysPerSecondCounter to
  KeysPerSecondCalculator using Resolved properties
- Add internal reset logic to KeysPerSecondCalculator and make it
  independent from Player
- Use GameplayClock.TrueGameplayRate to get real-time rate. If 0 then it
  defaults to the last non 0 rate if no such mod is enabled
2022-08-07 00:53:00 +02:00
Ryuki
0886137e39
Prevent KeysPerSecondCounter from NRE when no instance is initialized 2022-08-05 21:03:00 +02:00
Ryuki
0c07df2c26
Remove DT from KPS test 2022-08-05 21:02:37 +02:00
Ryuki
b4e0fa7c53
Rewrite tests for KPS 2022-08-05 15:53:06 +02:00
Ryuki
24c29b7e2f
Do not add KPS calculation when gameplay rate is 0 2022-08-05 15:51:07 +02:00
Ryuki
42d1bdfc95
Move KPS calculation to a standalone class 2022-08-05 04:17:01 +02:00
Ryuki
89855cc1d6
Change KPS Counter implementation base and add better replay integration
The counter implementaiton is now list based, and will not invalidate
previous hits by removing them but by testing if they are within the 1
second span, allowing better integration with replays and spectators.
2022-07-31 01:29:57 +02:00
Ryuki
2df24019fd
Merge branch 'master' into kps 2022-07-28 18:38:09 +02:00
Ryuki
079150849a
Add some tests 2022-07-28 18:37:50 +02:00
Ryuki
b2e7da5aa0
Add basic Queue based implementation of KPS 2022-07-28 18:37:12 +02:00
Dean Herbert
45879f7836
Merge pull request #19443 from smoogipoo/fix-intermittent-hud-tests
Fix intermittent HUD tests
2022-07-28 23:20:46 +09:00
Dan Balasescu
0d6b45e515
Merge pull request #19431 from peppy/collections-track-beatmap-updates
Add collection transfer logic to beatmap import-as-update flow
2022-07-28 22:52:54 +09:00
Dan Balasescu
a59d7f6710
Merge branch 'master' into collections-track-beatmap-updates 2022-07-28 22:05:34 +09:00
Dan Balasescu
aa03df905f
Merge pull request #19441 from peppy/test-working-beatmap-unfuck
Reduce calls to `LoadTrack` by implicitly running on test/dummy classes
2022-07-28 22:05:25 +09:00
Dan Balasescu
5003eb5629
Merge pull request #19430 from peppy/realm-collections
Move beatmap collections to realm
2022-07-28 22:05:10 +09:00
Dan Balasescu
11e0022fad Merge branch 'master' into realm-collections 2022-07-28 21:00:08 +09:00
Dean Herbert
a21aee4e9c Reduce calls to LoadTrack by implicitly running on test/dummy classes 2022-07-28 18:11:40 +09:00
Dan Balasescu
1039338d80 Fix intermittent HUD tests 2022-07-28 17:58:07 +09:00
Dean Herbert
628a30193f Remove incorrect TrackLoaded override from TestWorkingBeatmap 2022-07-28 17:49:17 +09:00
Dan Balasescu
1da9830145
Merge pull request #19435 from peppy/remove-beatmap-manager-ruleset-store
Remove unused `RulesetStore` from `BeatmapManager` constructor
2022-07-28 17:46:12 +09:00
Dan Balasescu
6d4023b933 Adjust comment 2022-07-28 16:56:11 +09:00
Dan Balasescu
ebe64422d6
Merge pull request #19433 from peppy/beatmap-model-documentation
Add more comprehensive xmldoc for beatmap model classes
2022-07-28 16:40:29 +09:00
Dan Balasescu
cd01c5d3ac Fix assertion 2022-07-28 16:34:31 +09:00
Dan Balasescu
fe6b487d75
Merge pull request #19432 from peppy/fix-update-test-failures
Add realm refresh calls to fix intermittent test failures on new update tests
2022-07-28 16:19:46 +09:00
Dean Herbert
2b9d46d803 Remove unused RulesetStore from BeatmapManager constructor 2022-07-28 16:19:05 +09:00
Dan Balasescu
c1aaf27c54 Link to correct model in xmldoc 2022-07-28 16:02:19 +09:00
Dean Herbert
525e4a2019 Fix crash in DrawableRoomPlaylistItem context menu creation due to incorrect enumeration casting 2022-07-28 15:51:18 +09:00
Dan Balasescu
6bf293e130 Fix managed object reused between test runs 2022-07-28 15:45:33 +09:00
Dean Herbert
452d82f292 Add more comprehensive xmldoc for beatmap model classes 2022-07-28 15:41:28 +09:00
Salman Ahmed
ce48984bda
Merge pull request #19419 from andy840119/remove-nullable-disable-in-the-mods-for-taiko-ruleset
Remove nullable disable annotation in mods for taiko ruleset.
2022-07-28 09:32:35 +03:00
Dean Herbert
8ac886a247 Update test to account for sort order 2022-07-28 15:20:25 +09:00
Dean Herbert
67c44552cb Add realm Refresh calls to ensure tests are stable 2022-07-28 15:18:04 +09:00
Dean Herbert
485d140a21 Add realm refresh calls to fix intermittent test failures on new update tests 2022-07-28 15:15:41 +09:00
Dean Herbert
070f56c30c Add collection transfer logic to beatmap import-as-update flow 2022-07-28 15:03:23 +09:00
Dean Herbert
2209afd0e8 Mark Live methods as InstantHandleAttribute 2022-07-28 15:03:08 +09:00
Dean Herbert
2ae5a34c0e Add test coverage of beatmap updates transferring collection hashes 2022-07-28 15:02:58 +09:00
Salman Ahmed
1f13d89205
Merge branch 'master' into remove-nullable-disable-in-the-mods-for-taiko-ruleset 2022-07-28 09:01:50 +03:00