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

50 Commits

Author SHA1 Message Date
Salman Ahmed
92e22c57a7 Introduce private APIRuleset for online ID equality comparison 2022-02-11 08:27:01 +03:00
Salman Ahmed
26839f6ad8 Consider OnlineIDs 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
9574bc1382 Allow IRulesetInfos 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
Dean Herbert
2d1a8a9d49 Use a more correct CompareTo implementation for ruleset ordering 2022-01-27 21:58:04 +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
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
f30d63107a Add SortID to RulesetInfo to allow stable ordering of rulesets for display 2022-01-27 15:35:16 +09:00
Dean Herbert
5cbd731864 Add RulesetInfo hashcode implementation and tidy up equality 2022-01-12 17:49:10 +09:00
Dean Herbert
82259ee072 Improve legibility of RulesetInfo.Equals 2022-01-12 17:00:17 +09:00
Dean Herbert
c3df58e01c Add required properties to make realm models backwards compatible 2022-01-12 16:39:36 +09:00
Dean Herbert
618903c217 Rename realm to become imposter classes 2022-01-12 16:39:36 +09:00
Dean Herbert
0b6c4497bd Rename EF classes to allow for shit to hit the fan 2022-01-12 16:39:36 +09:00
Dean Herbert
15db1372aa Add missing equality implementations on IRulesetInfo 2021-12-03 18:01:45 +09:00
Dean Herbert
e57c343531 Add helper setter to EF RulesetInfo.OnlineID to allow updating usages 2021-11-24 15:50:26 +09:00
Dean Herbert
8d69ebd7db Remove nullability of Ruleset.CreateInstance 2021-11-24 12:23:06 +09:00
Dean Herbert
cb5b6911e6 Seal RulesetInfo and remove virtual methods 2021-11-22 16:39:26 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Dean Herbert
2c5ba1d8e2 Change OnlineID to non-nullable to allow for indexing in Realm 2021-10-18 15:53:40 +09:00
Dean Herbert
d309636460 Update all EF based models to implement new read only interfaces 2021-10-01 16:55:50 +09:00
Bartłomiej Dach
628e7a71ed Ignore possible nulls in Type.GetType() calls
They're mostly used in extensibility scenarios, so everything happens in
runtime. There is no better resolution than to crash with a null
reference exception.
2021-05-15 00:09:34 +02:00
Bartłomiej Dach
1b579dd838 Extract invariant instantiation info extension method 2021-05-12 23:23:51 +02:00
smoogipoo
1143d5d992 Update class exclusion for dynamic compilation 2020-09-04 20:41:08 +09:00
Dean Herbert
a59db976d6 Fix loading a ruleset with a new version specification causing a crash 2020-05-08 18:05:06 +09:00
Andrei Zavatski
316c6b2a94 Simplify RulesetInfo string presentation 2020-02-18 01:17:12 +03:00
Dean Herbert
5738267642 Copy ruleset info over default 2019-12-24 16:05:20 +09:00
Dean Herbert
6e0802e50c Remove RulesetInfo parameter from Ruleset constructor 2019-12-18 14:49:09 +09:00
Dean Herbert
8e8f33ec7b Remove null hinting for now 2019-09-04 21:35:59 +09:00
Dean Herbert
b80a8296cd Fix unavailable rulesets crashing at song select 2019-09-04 20:28:52 +09:00
Dean Herbert
d0c8aaba4e Override basic equality function too 2019-07-15 15:50:50 +09:00
Dean Herbert
9c1badd2e3 Fix rulesets not matching in dictionary lookups due to missing GetHashCode implementation 2019-07-15 15:42:54 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Dean Herbert
e82ad3539b Move JsonIgnore specification to interface 2018-11-30 16:39:25 +09:00
Dean Herbert
693ba8e994 Add more ToString output 2018-07-19 18:43:11 +09:00
Dean Herbert
32a74f95a5 Normalize all the line endings 2018-04-13 18:26:38 +09:00
Dean Herbert
37d393bca0 Update licence headers 2018-01-05 20:21:19 +09:00
smoogipoo
c99ea32574 Merge branch 'master' into beatmap-serialization 2017-12-21 13:39:39 +09:00
Dean Herbert
d02e1ae896 Update RulesetInfo and add migration 2017-12-10 12:15:55 +09:00
smoogipoo
b584178e85 Make Beatmap ISerializable and add more JsonIgnores 2017-12-06 00:37:37 +09:00
smoogipoo
b178be21d1 Let's not rename columns yet 2017-10-14 14:30:58 +09:00
TocoToucan
887aa7496b Rework EF Core usage in model classes 2017-10-06 00:23:26 +03:00
TocoToucan
6a4198d0d6 Initial EF Core commit 2017-10-04 22:52:12 +03:00
smoogipooo
90885a31ae Round 2 of CI fixes. 2017-08-18 15:09:54 +09:00
smoogipooo
a47b6526a2 Fix CI issues. 2017-08-18 14:40:36 +09:00
Shane Woolcock
d19c8f56be Make RulesetInfo implement IEquatable since EqualityComparer was sometimes giving false negatives and causing Bindable observers to fire 2017-08-13 15:03:01 +09:30
Dean Herbert
7c0e7ebcd0 Give HitRenderer a reference to Ruleset
Used to get correct bindings for a mode (ActionMappingInputManager).
2017-08-09 13:05:52 +09:00
Dean Herbert
9e20a02c0a Split out BeatmapDatabase into BeatmapStore
Hide database functionality at a lower level in preparation from eventually making it private.
2017-07-26 16:31:34 +09:00
Dean Herbert
fce580d717 Reshuffle namespaces 2017-07-26 13:22:46 +09:00