Commit Graph

465 Commits

Author SHA1 Message Date
3c028ce05c Add IDeepCloneable interface and update existing CreateCopy methods to use it 2021-07-19 12:54:17 +09:00
ed29646291 Remove IApplicableToDifficulty.ReadFromDifficulty
This was added specifically for `ModDifficultyAdjust`, but turned out to
be more of a headache than we expected. We have since removed usage and
would hope that this is not required by any other mods.

Opting for complete removal rather than obsoletion, as we discovered
this was already broken in multiple cases, with fixes being quite
logically complex.

If you happen to be a ruleset developer relying on this, open an issue
and we'll talk you through a better approach (or check what
`ModDifficultyAdjust` is doing now for an example).
2021-07-14 12:32:16 +09:00
cce4a4dc31 Fix incorrect value copy order in BindTo() 2021-07-12 22:27:36 +02:00
4b393209ec Implement UnbindFrom() 2021-07-12 17:33:29 +09:00
242982730f Fix incorrect DifficultyBindable binding implementation 2021-07-12 17:09:09 +09:00
a6258d705e Make CurrentNumber internal 2021-07-12 11:26:30 +09:00
32b4f5fbd6 Do not store direct references to original bindable
`DifficultyAdjustSettingsControl` and its inner `SliderControl` were
holding different references to `DifficultyBindable`s from the
difficulty adjust mod, therefore leading to bindings being lost to the
framework-side automatic unbind logic if the mod was toggled off and
back on in rapid succession.

Resolve by adding a shadowed implementation of `GetBoundCopy()` and
using it to isolate the controls from the mod bindable.
2021-07-11 15:28:13 +02:00
741062a6da Simplify bindable update methods 2021-07-09 13:58:44 +09:00
e0277763d0 Refactor DifficultyAdjustSettingsControl to help with readability 2021-07-09 13:50:07 +09:00
f9cd7f10d8 Allow null values for ReadCurrentFromDifficulty
As long as this isn't a constructor parameter it feels best to
gracefully handle omission. Realistically having it in the ctor is the
best move, but it doesn't feel great in line with the other parameters
passed in via object initalisers.
2021-07-09 13:26:01 +09:00
90326f8864 Standardise variables 2021-07-09 13:24:26 +09:00
b7803b889e Rename control class to be more descriptive 2021-07-08 20:37:38 +09:00
ba939c0b65 Simplify serialisation edge case by moving to Value override 2021-07-08 17:49:00 +09:00
52ea62e3b2 Add more comments and xmldoc 2021-07-08 17:49:00 +09:00
88b00123f6 Use existing reflection methods to avoid manual binding of ExtendedLimits 2021-07-08 17:49:00 +09:00
bd7c334588 Avoid the need for per-settings control classes 2021-07-08 17:49:00 +09:00
a6e94dd491 Add back extended limits support 2021-07-08 17:49:00 +09:00
c4313d6e96 Initial implementation of new flow (only working for approach rate) 2021-07-08 17:48:08 +09:00
0e4f4a6fde Initial storage changes 2021-07-08 14:28:13 +09:00
e1c646b9b2 Remove redundant arguments 2021-07-05 23:52:39 +08:00
6a0c5b54c3 Fix obsolete message in Mod.Ranked 2021-07-02 15:55:25 +08:00
0396a03bbc Rename Mod.Ranked back to avoid breaking ruleset API 2021-07-02 12:50:58 +09:00
0cceef8da5 Moved the string to int? conversion logic into SettingsNumberBox 2021-06-28 11:00:07 +08:00
3b822cd5cf Refactor SeedSettingsControl and related controls 2021-06-26 11:19:14 +08:00
31c786e1c3 Use SettingsNumberBox.NumberBox instead of OsuNumberBox 2021-06-25 09:51:34 +08:00
e1b2c63e09 Add IApplicableToBeatmapProcessor mod interface 2021-06-23 14:46:30 +09:00
54084f8a9c Move SeedSettingsControl to own file 2021-06-23 13:40:05 +09:00
6fd020d91d Remove unnecessary public accessibility
All interface members are implicitly public.
2021-06-23 12:00:57 +09:00
fc224c53f4 Remove extra usings 2021-06-22 14:49:37 +08:00
3745101f32 Extract seed setting control to IHasSeed 2021-06-22 14:43:41 +08:00
97cd1217a4 Move IApplicableToDrawableHitObjects to its own file 2021-06-18 13:06:13 +09:00
c59a3ce83f Obsolete plural IApplicableToDrawableHitObjects 2021-06-16 18:52:16 +09:00
af80418ee8 Implement IApplicableToDrawableHitObject for mods
A breaking change in `ModWithVisibilityAdjustment` if the method was overriden.
2021-06-16 18:52:01 +09:00
e69bb67afe Add IApplicableToDrawableHitObject that is taking a single DHO
Less cumbersome to implement than old version taking an enumerable. The implementation was always using `foreach` for the enumerable.
The new interface is not used yet.
2021-06-16 18:42:28 +09:00
ef9cb2c958 Rename nested classes 2021-06-12 18:37:31 +02:00
b79d57b68c Move OsuSettingsNumberBox into SettingsNumberBox 2021-06-12 17:57:40 +02:00
c728f673d6 Rename classes 2021-06-12 17:37:01 +02:00
29f3880415 Move classes into SettingsTextBox 2021-06-12 17:34:02 +02:00
fe39a47797 Add OsuModSettingsTextBox and OsuModSettingsNumberBox 2021-06-12 00:34:53 +02:00
d0e9f8ef90 Replace and obsolete Ranked flag with IsUserPlayable 2021-06-09 14:17:03 +09:00
7a4fc9ffc8 Move seed to base class 2021-06-03 18:16:11 +02:00
a3c78674a1 Add new interface for autoplay mods 2021-05-25 18:09:24 +09:00
166974506e Duplicate implementions 2021-05-15 11:55:50 +08:00
6e5c4ed7c6 Revert "Remove empty override"
This reverts commit a86a4bab91.
2021-05-15 11:45:14 +08:00
a86a4bab91 Remove empty override 2021-05-14 21:55:32 +08:00
67dfeeb1b7 Cleanup code in ModHidden 2021-05-14 21:29:13 +08:00
e69ec91c07 Add xmldoc for CurrentRotation 2021-04-30 11:25:39 +09:00
7bf3498e2a Calculate playfield scale locally 2021-04-30 02:49:19 +03:00
25e0fb1cf9 Refactor OsuModBarrelRoll to allow it's usage by other rulesets 2021-04-30 01:59:59 +03:00
e90d791754 Add base "classic" mod 2021-04-21 09:14:19 +03:00