Dean Herbert
0267aed846
Change ToMod
to return an UnknownMod
rather than throw if a mod isn't available
...
As seen by this kind of crash, having the `.ToMod` method throw can be
very problematic and also hidden (as it is used inside of models in
places where exceptions are not expected to occur).
Given there are tens of usages of this method, returning a placeholder
mod seems like a better idea than outright throwing.
```
An unhandled has occurred.
System.InvalidOperationException:
There is no mod in the ruleset (osu) matching the acronym AS.
at osu.Game.Online.API.APIMod.ToMod(Ruleset ruleset) in /Users/dean/Projects/osu/osu.Game/Online/API/APIMod.cs:line 54
at osu.Game.Scoring.ScoreInfo.<get_Mods>b__117_0(APIMod m) in /Users/dean/Projects/osu/osu.Game/Scoring/ScoreInfo.cs:line 193
at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
at osu.Game.Scoring.ScoreInfo.get_Mods() in /Users/dean/Projects/osu/osu.Game/Scoring/ScoreInfo.cs:line 193
at osu.Game.Screens.Select.Leaderboards.BeatmapLeaderboard.<>c.<subscribeToLocalScores>b__40_2(ScoreInfo s) in /Users/dean/Projects/osu/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs:line 199
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at osu.Game.Database.RealmObjectExtensions.Detach[T](IEnumerable`1 items) in /Users/dean/Projects/osu/osu.Game/Database/RealmObjectExtensions.cs:line 180
at osu.Game.Screens.Select.Leaderboards.BeatmapLeaderboard.<>c__DisplayClass40_0.<subscribeToLocalScores>g__localScoresChanged|1(IRealmCollection`1 sender, ChangeSet changes, Exception exception) in /Users/dean/Projects/osu/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs:line
209
at Realms.RealmCollectionBase`1.Realms.INotifiable<Realms.NotifiableObjectHandleBase.CollectionChangeSet>.NotifyCallbacks(Nullable`1 changes, Nullable`1 exception)
at Realms.NotifiableObjectHandleBase.NotifyObjectChanged(IntPtr managedHandle, IntPtr changes, IntPtr exception)
```
2022-03-09 17:57:55 +09:00
Dean Herbert
8bb07f83cd
Merge pull request #17054 from hlysine/mod-adaptive-speed
...
Implement Adaptive Speed mod
2022-03-09 17:56:34 +09:00
Dan Balasescu
6fd8b4d891
Safeguard method against invalid invocation
2022-03-08 22:30:44 +09:00
Dan Balasescu
f1c40bd9ed
Rework GetScore() method signatures + implementations
...
Rename legacy-facing overload to mention as much
2022-03-08 22:30:44 +09:00
Dan Balasescu
a8e99f1a95
Calculate classic score using total basic hitobject count
2022-03-08 21:49:41 +09:00
Dan Balasescu
5b6b8d1fa9
Remove GetStandardisedScore() proxy method
2022-03-08 21:49:41 +09:00
Dan Balasescu
6654977a7b
Add GetScore() overload with total hitobject count
2022-03-08 21:49:41 +09:00
Dan Balasescu
2c382bd1d9
Rename GetImmediateScore() as overload of GetScore()
2022-03-08 21:49:40 +09:00
Dan Balasescu
a352a140bc
Merge pull request #17157 from peppy/fix-statistics-json-serialisation
...
Fix incorrect serialisation of submitted scores
2022-03-08 20:20:31 +09:00
Dan Balasescu
a172fc6cb8
Add IsBasic() and IsTick() extensions on HitResult
2022-03-08 18:19:12 +09:00
Dean Herbert
589a40ca2d
Add EnumMember
naming to HitResult
to allow for correct json serialisation
2022-03-08 17:58:37 +09:00
Henry Lin
8b8b54b58f
Scale rate adjustments based on hit timing consistency and tweak some related numbers
2022-03-05 21:48:57 +08:00
Henry Lin
76d257fbe4
Merge branch 'master' into mod-adaptive-speed
2022-03-04 15:16:37 +08:00
Henry Lin
f72c9a1f41
Cap speed change per hit and apply a speed decrease on miss
2022-03-04 11:48:48 +08:00
Henry Lin
b66af7edf4
Rename approximatedRates
to ratesForRewinding
and update xmldoc
2022-03-04 11:03:57 +08:00
Bartłomiej Dach
fcefd3c725
Fix slightly wrong references in xmldocs
2022-03-03 17:39:55 +01:00
Bartłomiej Dach
3797871aa0
Add extended documentation of adaptive speed mod machinations
2022-03-03 17:25:49 +01:00
Bartłomiej Dach
ffaf5b729f
Move and reword docs of allowable rate range constants
2022-03-03 17:07:43 +01:00
Henry Lin
464be6e64c
Only call IUpdatableByPlayfield.Update
if the playfield isn't nested
2022-03-03 14:37:39 +08:00
Henry Lin
4ce2044e4c
Reorder members
2022-03-03 13:09:41 +08:00
Henry Lin
9c2aa51194
Rename applyPitchAdjustment
to adjustPitchChanged
2022-03-03 13:07:30 +08:00
Henry Lin
ae71dcceeb
Convert comments to xmldoc
2022-03-03 13:03:53 +08:00
Henry Lin
09254407fe
Interpolate speed change using IUpdatableByPlayfield
2022-03-03 12:09:36 +08:00
Henry Lin
51258dbab4
Use binary search in ApplyToBeatmap
2022-03-03 11:21:20 +08:00
Henry Lin
95a40c5dc5
Remove pointless comment
2022-03-03 10:43:30 +08:00
Henry Lin
ff7f65de27
Extract duplicated conditionals
2022-03-03 10:43:04 +08:00
Henry Lin
55737226a3
Use Enumerable.Repeat
2022-03-03 10:18:36 +08:00
Henry Lin
d335a2229f
Tweak average_count
2022-03-02 21:07:57 +08:00
Henry Lin
17bc714297
Allow the mod to properly react to nested hit objects
2022-03-02 20:48:57 +08:00
Henry Lin
6caecf79a0
Use smooth speed change
2022-03-02 20:08:05 +08:00
Henry Lin
c6934b4bce
Improve adaptive speed algorithm and add rewind support
2022-03-02 10:35:03 +08:00
Henry Lin
783f43ccfb
Add initial rate setting
2022-03-02 09:57:52 +08:00
Henry Lin
c9b205afeb
Add adaptive speed mod
2022-03-02 09:57:52 +08:00
Dean Herbert
7215f3f66b
Fix CalculateAverageHitError
throwing if there are zero HitEvent
s
2022-03-01 18:44:15 +09:00
Dean Herbert
159db38f8a
Add missing xmldoc
2022-02-28 19:14:43 +09:00
Dean Herbert
a41e1c80f1
Show hit error on results screen
...
Leading up to implementation of "local offset", this feels like a good
thing to have visible first and foremost.
2022-02-28 19:11:06 +09:00
Dan Balasescu
3a03833912
Merge pull request #16890 from peppy/beatmap-decoder-ruleset-store
...
Fix `LegacyBeatmapDecoder` not populating correct rulesets
2022-02-25 19:03:43 +09:00
Bartłomiej Dach
d8fa443ea0
Extract default mod switch measurements to constants
...
For use later when specific sizes/scales of the mod switches are
desired.
2022-02-22 23:22:11 +01:00
Dan Balasescu
bedd07d2e4
Add remark about usage of CalculateAll()
2022-02-22 18:12:55 +09:00
Bartłomiej Dach
cfc41a0a36
Implement small mod switch
2022-02-22 00:26:35 +01:00
Bartłomiej Dach
5186693dad
Implement tiny mod switch
2022-02-22 00:26:35 +01:00
Dan Balasescu
c466d6df94
Ensure to not multiply by 0
2022-02-21 17:19:35 +09:00
Dan Balasescu
c3b365cf6b
Scale classic score by hitobject count
2022-02-21 13:31:03 +09:00
Dan Balasescu
567da9214e
Merge branch 'master' into osu-diff-calc-max-combo
2022-02-18 18:35:24 +09:00
Dan Balasescu
3945cd24eb
wip
2022-02-17 21:14:49 +09:00
Dean Herbert
7307e68e9c
Revert "Merge pull request #16889 from smoogipoo/remove-mod-multiplier"
...
This reverts commit 252b945d3b
, reversing
changes made to a1b39a96cf
.
2022-02-17 13:26:12 +09:00
Dean Herbert
23933fc881
Update xmldoc to mention that multipliers are not applied anywhere
2022-02-16 17:32:22 +09:00
Dean Herbert
5ffd3ff82a
Add xmldoc and allow constructing an AssemblyRulesetStore
with a directory path
2022-02-16 17:25:16 +09:00
Dean Herbert
d0efecfc9c
Add RulesetStore
for use where realm is not present (ie. other projects)
2022-02-16 17:13:54 +09:00
Dean Herbert
7a69de0060
Split out realm portion of RulesetStore
2022-02-16 17:13:31 +09:00
Dan Balasescu
4c1413e0c7
No longer require Mod implementation
2022-02-16 16:36:02 +09:00
Dan Balasescu
5dd9771c5f
Remove mod multipliers from being applied to scores
2022-02-16 16:27:27 +09:00
Dan Balasescu
84e82ef5e4
Add XMLDocs to difficulty attribute properties
2022-02-16 14:09:19 +09:00
Dean Herbert
b9d9fc56af
Move files to UI namespace
2022-02-14 17:51:39 +09:00
Salman Ahmed
92e22c57a7
Introduce private APIRuleset
for online ID equality comparison
2022-02-11 08:27:01 +03:00
Salman Ahmed
26839f6ad8
Consider OnlineID
s during ruleset equality if available
...
Required for `APIBeatmap`s, which provide `Ruleset` instances with `OnlineID` available only.
Also consistent with the comparer implementation.
2022-02-11 04:26:58 +03:00
Salman Ahmed
1b729e891d
Update pointless CompareTo
implementation once again
2022-02-11 04:17:30 +03:00
Salman Ahmed
9574bc1382
Allow IRulesetInfo
s of same type to be comparable
...
At first I was planning on making `CompareTo` implemented at
`IRulesetInfo` itself and shared across classes, but turns out it only
implements it explicitly and not allow direct `IRulesetInfo.Equals`
calls.
It messed with my head enough that I decided to just let each class have
its own implementation and only allow same type.
2022-02-11 04:03:23 +03:00
Dan Balasescu
ebd105422f
Remove unused using
2022-02-10 14:22:08 +09:00
Dan Balasescu
f7fb7825cc
Simplify disposal
2022-02-10 14:21:51 +09:00
Dan Balasescu
a3896a8ebd
Remove allowance of null dependency
2022-02-10 14:21:50 +09:00
Dan Balasescu
45b3f472ab
Merge branch 'master' into spectator-state-rework
2022-02-08 19:51:50 +09:00
Henry Lin
56c90a21ce
Add a todo
2022-02-06 11:22:12 +08:00
Henry Lin
f78c853bc7
Calculate max combo locally in PerformanceBreakdownCalculator
2022-02-06 10:59:53 +08:00
Henry Lin
0b1fef38af
Use the playable beatmap provided in CreateStatisticsForScore
2022-02-05 21:36:34 +08:00
Henry Lin
f29301cd1e
Merge branch 'master' into display-performance-attributes
2022-02-05 16:59:46 +08:00
Dan Balasescu
483977d5c8
Merge branch 'master' into spectator-state-rework
2022-02-03 19:59:07 +09:00
Bartłomiej Dach
82f9ad63f5
Fix flashlight size multiplier printing with too many decimal digits
2022-02-02 20:41:25 +01:00
Salman Ahmed
074a691635
Set keyboard step to 0.1
for difficulty adjust sliders
2022-02-02 17:43:08 +03:00
Dan Balasescu
6d3bc005ea
Merge branch 'master' into spectator-state-rework
2022-02-02 18:57:04 +09:00
Dean Herbert
0c5da9370a
Fix rulesets potentially being marked Available
even when methods are missing
...
Came up when running the game after the recent breaking changes
(https://github.com/ppy/osu/pull/16722 ), where two template rulesets I
had loaded were erroring on startup but still being marked as available,
allowing them to crash the game on attempting to initiate relpay logic.
These cases are already handled for first-time ruleset loading via the
`GetTypes()` enumeration in `RulesetStore.addRuleset`, but when
consistency checking already present rulesets the only runtime
validation being done was `ruleset.CreateInstance()`, which does not
handle missing types or methods.
2022-02-02 14:52:01 +09:00
Henry Lin
b06128ffa5
Rename "Final PP" to "Achieved PP"
2022-02-01 22:26:55 +08:00
Dan Balasescu
41007169f7
Give SpectatorState a user state
2022-02-01 21:51:05 +09:00
Dean Herbert
0f83f77d2b
Add xmldoc for new ResetFromReplayFrame
method
2022-02-01 16:52:53 +09:00
Dan Balasescu
0641264a11
Merge branch 'master' into spectator-consistency-frames
2022-02-01 14:35:30 +09:00
Dan Balasescu
c50577e25f
Apply suggestion from review
...
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2022-02-01 10:48:41 +09:00
Dan Balasescu
4fb565e15f
Reset ScoreProcessor from statistics replay frames
2022-01-31 21:32:56 +09:00
Dan Balasescu
39e1d65976
Make ScoreProcessor write all judgement types
2022-01-31 18:53:47 +09:00
Dan Balasescu
0458d408bb
Add replay statistics frames to FramedReplayInputHandler
2022-01-31 18:53:47 +09:00
Dan Balasescu
4727aeda01
Give last bundled replay frame the frame header
2022-01-31 18:53:47 +09:00
Dean Herbert
0e764538e0
Retrieve KeyBindingContainer
via DI rather than traversal lookup
2022-01-31 17:05:04 +09:00
Dean Herbert
a84fd2e20c
Merge branch 'master' into master
2022-01-31 16:30:08 +09:00
Dean Herbert
2d1a8a9d49
Use a more correct CompareTo
implementation for ruleset ordering
2022-01-27 21:58:04 +09:00
Dean Herbert
33b7bdcf82
Update pointless CompareTo
implementation
2022-01-27 21:49:33 +09:00
Dean Herbert
7af23328a4
Merge branch 'master' into ruleset-ordering-fix
2022-01-27 21:46:03 +09:00
Dean Herbert
a5d422e82c
Merge branch 'master' into ruleset-id-fixes
2022-01-27 17:07:18 +09:00
Dan Balasescu
54d18bd7ac
Merge pull request #16642 from peppy/ruleset-private-info-set
...
Make `Ruleset.RulesetInfo` get only
2022-01-27 16:41:52 +09:00
Dean Herbert
5637fd64d6
Perform ordering using IComparable
instead
2022-01-27 15:59:20 +09:00
Dean Herbert
5288eedd31
Update all usages of RulesetID
and Ruleset.ID
to use Ruleset.OnlineID
2022-01-27 15:38:03 +09:00
Dean Herbert
714177cce1
Remove pointless constructor in RulesetInfo
2022-01-27 15:37:27 +09:00
Dean Herbert
e67b1fe0ec
Make Ruleset.RulesetInfo
get only
2022-01-27 15:36:35 +09:00
Dean Herbert
f30d63107a
Add SortID
to RulesetInfo
to allow stable ordering of rulesets for display
2022-01-27 15:35:16 +09:00
Dan Balasescu
0dd2de3e1e
Merge pull request #16628 from peppy/fix-realm-ruleset-ordering
...
Fix custom rulesets being displayed before official ones
2022-01-26 19:19:01 +09:00
Dean Herbert
57e624d8e7
Fix custom rulesets being displayed before official ones
2022-01-26 18:46:32 +09:00
Dean Herbert
f2d48d088d
Fix realm migration failures with presence of databased EF rulesets that don't exist on disk
2022-01-26 17:57:03 +09:00
Dan Balasescu
bfa521bdd2
Merge pull request #16593 from peppy/realm-clean-up
...
Clean up realm naming
2022-01-25 14:33:53 +09:00
Dean Herbert
d7342880f5
Update remaining cases of clashes with realm.Write
and realm.RegisterForNotifications
2022-01-25 13:09:48 +09:00
Bartłomiej Dach
8c3fbb6eb4
Merge branch 'master' into Liswiera-FL-changes
2022-01-24 21:32:36 +01:00
Bartłomiej Dach
a227af75ed
Simplify flashlight parameter passing flow
2022-01-24 21:03:02 +01:00
Bartłomiej Dach
5874475dff
Extract DefaultFlashlightSize
to base flashlight class
2022-01-24 21:03:02 +01:00