Salman Ahmed
abb88b0907
Move distance spacing application to DistanceSnapGrid
2022-04-28 10:54:38 +03:00
Salman Ahmed
7aaa88cac2
Convert data type of DistanceSpacing
to float
2022-04-28 10:24:36 +03:00
Salman Ahmed
2e8372fe90
Minor cleanup
...
Just from reading diff.
2022-04-28 07:14:43 +03:00
Salman Ahmed
bfc6bfc91b
Let CatchHitObjectComposer
inherit from DistancedHitObjectComposer
and hide control
2022-04-28 06:44:50 +03:00
Salman Ahmed
835898dd30
Introduce DistancedHitObjectComposer
and supersede OsuToolboxComposite
2022-04-28 06:44:50 +03:00
Salman Ahmed
59cf3ff50f
Move distancing methods from IPositionSnapProvider
to IDistanceSnapProvider
2022-04-28 05:48:45 +03:00
Salman Ahmed
8ed39009fd
Encapsulate distance spacing control handling to a "distance toolbox composite"
...
Encapsulated in a way which can allow further extensibility for the
right-side area of toolboxes.
2022-04-24 08:33:03 +03:00
Salman Ahmed
70a93c0e7e
Move DistanceSpacingMultiplier
bindable to its own IDistanceSnapProvider
interface
2022-04-24 08:33:00 +03:00
Salman Ahmed
4f8f27a58b
Merge branch 'master' into osu-distance-spacing
2022-04-24 05:23:30 +03:00
Dean Herbert
ea9495eb74
Update all existing calls to extension method with correct fallback handling
2022-03-29 16:51:30 +09:00
Dean Herbert
8d1ee28e67
Add settings modification UI to skin editor
2022-03-13 17:03:25 +09:00
Salman Ahmed
0992bec2c8
Change "distance spacing" multipler type to double
...
Avoids losing precision on initial load, causing an unnecessary
hash change in `EditorChangeHandler`.
Resolves test failures in `TestSceneEditorChangeStates`
(https://github.com/ppy/osu/runs/5192493482?check_suite_focus=true ).
2022-02-16 03:28:12 +03:00
Salman Ahmed
868dcd20f5
Remove e.ShiftPressed
handling for now
...
Broken on macOS, will be handled differently later on as discussed.
2022-02-15 02:21:53 +03:00
Salman Ahmed
528dc03b8c
Expose distance spacing in IPositionSnapProvider
for updating distance grid
...
Alternate method is to expose a `SnapDistancesChanged` event in
`IPositionSnapProvider` instead, but I chose this way as an analogue to
`IBeatSnapProvider.BeatDivisor`, which might even make sense to be
exposed as `BindableBeatDivisor` instead of caching that separately.
2022-02-15 02:21:53 +03:00
Salman Ahmed
19ee05c232
Add "distance spacing" multiplier for osu! ruleset
...
While osu!catch also implements a distance snap grid, it doesn't rely on
`GetBeatSnapDistanceAt` (unlike osu!), therefore it can't have the
"distance spacing" multiplier yet.
2022-02-15 02:21:53 +03:00
Dean Herbert
b9d9fc56af
Move files to UI namespace
2022-02-14 17:51:39 +09:00
Dean Herbert
51251e3204
Fix CI reported warnings
2022-01-12 22:39:00 +09:00
Dean Herbert
eb70a1eeb7
Replace compatibility properties with direct references
2022-01-12 18:13:14 +09:00
Dean Herbert
3811bd8520
Fix some null inspections
2022-01-12 17:00:16 +09:00
Dean Herbert
cea9cab4dc
Use ExpandingButtonContainer
in editor composer
2022-01-06 21:10:45 +09:00
Dean Herbert
ef2a4aed9a
Fix editor playfield not being centered correctly
...
This has come up multiple times, with mappers citing that they have
muscle memory for mapping based on the centre of the playfield being in
the centre of the window.
The original plan was to have a second toolbar on the right hand side of
the screen to balance the padding, but we're not at that point yet.
Easiest solution is to do what stable does and allow the left-hand
toolbar items to overlap the playfield underneath it.
In edge cases where the user is running at an aspect ratio that causes
overlaps, they can choose to collapse the toolbars down. We can probably
work on this UI/UX a bit more as we update designs to be more friendly
to such cases.
2022-01-05 16:05:18 +09:00
Bartłomiej Dach
5cbaa028eb
Use extracted ruleset config cache implementation in DI
2021-12-23 19:02:10 +01:00
Dean Herbert
59e763467f
Move StoragePath
implementation to an extension method
2021-11-19 16:08:38 +09:00
Naxesss
b888185799
Properly dispose of Stream
in bg quality check
2021-11-10 05:06:11 +01:00
Dean Herbert
e43d91ad5d
Fix another case of incorrect null checking in editor verification processing
2021-11-04 15:18:10 +09:00
Dean Herbert
1e73b09e57
Fix another couple of cases of incorrect string null/empty checking
2021-11-04 14:22:28 +09:00
Dean Herbert
6944151486
Apply batch fixing of built-in types using var
2021-10-27 13:04:41 +09:00
smoogipoo
aa380a11c1
Merge branch 'master' into no-more-difficulty-control-points-info
2021-10-14 12:02:10 +09:00
Bartłomiej Dach
c7db286b94
Merge branch 'master' into file-sanity-checks
2021-10-14 00:17:29 +02:00
Dean Herbert
82f7f99f37
Refactor to use scoped using
(and also correctly dispose TagLib portion)
2021-10-12 10:46:26 +09:00
Naxesss
f2f97602f2
Dispose of video resource later
...
We need the Stream to stay open here because `StreamFileAbstraction` uses it later in the block.
2021-10-12 00:40:39 +02:00
Naxesss
47b4d03145
Dispose of Stream
s when used
2021-10-12 00:13:38 +02:00
Naxesss
ce69dd3588
Use Prescan
flag for audio length check
2021-10-11 23:57:23 +02:00
Naxesss
8f093b9a11
Use TagLib instead of ManagedBass
2021-10-11 13:56:26 +02:00
Naxesss
f0cd18a721
Only check each video file once
2021-10-11 13:55:50 +02:00
Naxesss
6aa054b5fa
Change to non-BASS error template
2021-10-11 13:53:23 +02:00
smoogipoo
bc37cb6f43
Merge branch 'master' into no-more-difficulty-control-points-info
2021-10-08 18:41:17 +09:00
Dean Herbert
b339c149d8
Copy BaseDifficulty
to Beatmap<T>
and move all write operations across
2021-10-06 15:10:45 +09:00
Dean Herbert
a92d499d7a
Convert usages of BeatmapDifficulty
to IBeatmapDifficultyInfo
2021-10-01 16:55:50 +09:00
Dean Herbert
693ecdf62a
Refactor some incorrect/outdated terminology
2021-09-06 21:32:43 +09:00
Dean Herbert
d4e5a612ea
Update IPositionalSnapProvider
to take a HitObject
as reference, rather than raw time
...
This allows fetching the correct `DifficultyControlPoint` from the
hitobject. Nothing more.
2021-09-03 17:11:12 +09:00
Dean Herbert
a3d9ab1e2e
Move approach rate to EffectControlPoint
2021-09-03 16:58:16 +09:00
Dean Herbert
b29209d13f
Ensure tool is always set back to select tool when beatmap becomes untimed
2021-07-19 17:08:40 +09:00
Dean Herbert
bde35d9f21
Rename radio button classes to be local to editor
2021-07-19 16:57:12 +09:00
Dean Herbert
eac9b1ec7e
Disable toolbox composition buttons when beatmap is not timed
2021-07-17 02:30:13 +09:00
Naxess
3a5912e35e
Add new checks to verifiers
2021-07-13 10:53:25 +02:00
Naxess
6da2a3d51f
Add zero-length objects check and tests
2021-07-13 10:50:11 +02:00
Naxess
dc4285582b
Fix misplaced "f" in issue message
2021-07-13 06:07:04 +02:00
Naxess
c8f58cbf6c
Add audio in video check and tests
2021-07-13 04:17:41 +02:00
Naxess
a4a1919842
Add too short audio files check and tests
2021-07-13 03:46:45 +02:00
Naxess
0a8fd01b99
Add zero byte check and tests
2021-07-13 03:45:21 +02:00
ekrctb
663ffae42f
Fix hit object selection blueprint potential null reference
2021-07-08 14:19:00 +09:00
Naxess
9f9e96ce9e
Add check for spanDuration
<= 0 prior to division
2021-06-27 15:40:09 +02:00
Naxess
a4a5325b73
Improve acceptable difference for repeat edges
...
Likelihood that `spanDuration` is greater than E+7 is quite low in any realistic case, so this should work fine.
2021-06-27 15:39:31 +02:00
Naxess
4cfa0ae5ec
Improve precision for repeat edges
2021-06-27 03:26:35 +02:00
Naxess
2cd7eda3c4
Add "or equal to" to volume threshold xmldocs
2021-06-27 02:30:12 +02:00
Naxess
0c0fd291d9
Order hitobjects by endtime
2021-06-27 01:25:03 +02:00
Naxess
4796b1b208
Use local variables for hasHitsound
& couldHaveHitsound
2021-06-27 00:04:30 +02:00
Naxess
5bc08ebadb
Rename hasHitsounds
-> mapHasHitsounds
2021-06-26 23:49:25 +02:00
Naxess
d29e6f4695
Add negligible template to PossibleTemplates
2021-06-26 23:49:06 +02:00
Naxess
1913084342
Use HitSampleInfo.AllAdditions
instead of new list
2021-06-26 23:48:28 +02:00
Naxess
f78cc9397e
Factor out edge type logic
2021-06-26 20:45:31 +02:00
Naxess
51147405c5
Make || and && priority explicit
2021-06-26 20:44:39 +02:00
Naxess
4b436b774d
Add few hitsounds check
2021-06-26 19:20:46 +02:00
Naxess
d8117fa730
Add muted objects check
2021-06-26 19:20:34 +02:00
ekrctb
9dcd0bf311
Remove IPlayfieldProvider
by caching Playfield
2021-06-17 10:15:24 +09:00
ekrctb
ef96ceb4ab
Introduce IPlayfieldProvider
2021-06-15 14:43:04 +09:00
Dean Herbert
8a76d97b63
Remove replay logic from DrawableRuleset
(and implement in DrawableEditorRulesetWrapper
)
2021-06-02 11:06:30 +09:00
Dean Herbert
bbfd7ea23f
Ensure RegenerateAutoplay
is only run once per frame
2021-05-23 21:20:08 +09:00
Dean Herbert
6c4709e7b4
Fix PlacementBlueprint
using the wrong beatmap when applying defaults
...
Closes #12855 .
2021-05-19 18:34:07 +09:00
Dean Herbert
a96603f025
Merge pull request #12782 from smoogipoo/rework-hitobject-blueprints
...
Rename hitobject blueprints and tie them to HitObjects
2021-05-18 16:30:58 +09:00
smoogipoo
882d54a8f8
Remove now unnecessary Apply() method
2021-05-18 14:26:26 +09:00
smoogipoo
e621cfc4ea
Add Apply() method for applying new DHOs
2021-05-18 14:14:10 +09:00
smoogipoo
f1f3606fd0
Fix unresolved xmldocs
2021-05-18 13:11:58 +09:00
Dan Balasescu
9d423245d8
Fix up xmldocs
...
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2021-05-18 13:02:23 +09:00
Dean Herbert
fcb226bd20
Add local variable for regular access to HitObjects
2021-05-14 16:23:45 +09:00
Naxess
a447f20095
Fix formatting of #nullable enable
2021-05-14 03:38:35 +02:00
Naxess
90e0b3374e
Add #nullable enable
...
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-05-14 03:34:50 +02:00
smoogipoo
ffb6135a1b
Rework hitobject blueprints to take in hitobject models
2021-05-13 19:53:32 +09:00
Naxess
19800f5f7f
Move IBeatmap
arg into context
2021-05-13 11:24:22 +02:00
Naxess
b37cb3bdbe
Change interpreted difficulty from bindable to regular value
...
There's no reason for why checks would need this to be bindable. A 1-directional binding is more appropriate.
2021-05-13 09:00:30 +02:00
Naxess
b7bc42e0d3
Rename "playableBeatmap" check arg to "beatmap"
...
The working beatmap is now in the context, so it's easier to distinguish beatmap type, hence no need for this prefix.
2021-05-12 02:34:16 +02:00
Naxess
64d96b06a6
Add interpreted difficulty info to BeatmapVerifierContext
...
Enables checks to make use of the difficulty level as shown in the settings UI.
2021-05-12 02:30:21 +02:00
Naxess
c13b93e6f1
Replace IWorkingBeatmap
arg with BeatmapVerifierContext
in checks
...
This simplifies passing of contextual information by enabling addition without needing to refactor lots of classes.
See next commit for example.
2021-05-12 02:29:18 +02:00
Naxess
75adec57eb
Remove negligible default hidden TODO
2021-05-12 01:31:16 +02:00
Salman Ahmed
b145f46a0a
Merge branch 'master' into skin-components-list
2021-04-30 21:10:55 +03:00
Dan Balasescu
e6eea73b8b
Merge branch 'master' into basic-compose-checks
2021-04-30 23:41:46 +09:00
Dean Herbert
a1e64f4e3c
Use the existing toolbox design
2021-04-30 14:41:06 +09:00
Dean Herbert
9c62c90cfc
Refactor SelectionBlueprint
and MoveSelectionEvent
to work in screen-space coordinates
...
Until now, the implementation of the overrides in `SelectionBlueprint`
have been confusing to the point where I would just implement by
trial-and-error (or copying from an existing implementation). This was
due to a combination of using "object" space coordinates
(ie. the thing the `Blueprint` is operating on) and screen-space coordinates.
This change switches all event related coordinates to screen-space,
which is how we already handle rotation/scale operations. With the
introduction of other editor types where the related objects are
drawables, this also makes a lot more sense.
2021-04-29 16:10:42 +09:00
Dean Herbert
f3c7694eeb
Rename methods to match generally how these find-methods are named elsewhere
2021-04-28 16:57:52 +09:00
Dean Herbert
48d6c9ac4b
Move snap/divisor helper methods to inside ControlPointInfo
2021-04-28 16:47:30 +09:00
Naxess
200352b750
Rename unsnap check templates
2021-04-27 13:56:05 +02:00
Dean Herbert
7ec5ea1eb5
Remove hitobject terminology from base classes
2021-04-27 19:01:29 +09:00
Dean Herbert
dd3d8e5d03
Make SelectionHandler
abstract to ensure things get implemented
2021-04-27 19:01:29 +09:00
Dean Herbert
f2e56bd306
Refactor editor selection/blueprint components to be generic
2021-04-27 19:01:29 +09:00
Dean Herbert
ec1c336b0a
Fix a couple of inspections
2021-04-27 13:23:14 +09:00
Naxess
7a6e9e5070
Change category of unsnap check to timing
...
Makes more sense, as this is typically the result of timing changes.
2021-04-27 02:32:57 +02:00
Naxess
9e49ecb573
Remove unused virtual
keywords
...
Added these in a previous iteration, where I had the mania variant inherit this class.
No longer necessary as `IHasColumn` was used to make this check more generic.
2021-04-27 02:23:06 +02:00
Naxess
a3c1b1fd52
Fix accessibility of areConcurrent
2021-04-27 01:24:38 +02:00
Naxess
ce258febf6
Rename CheckUnsnaps
-> CheckUnsnappedObjects
...
Will potentially have `CheckUnsnappedKiai` or similar later, so this is worth specifying.
Also consistent with `CheckConcurrentObjects`, which will likely have a `CheckConcurrentLines` later.
2021-04-26 20:32:44 +02:00
Naxess
b9e4f73f78
Add concurrent objects check to BeatmapVerifier
2021-04-26 20:28:59 +02:00
Naxess
a3570e18dd
Add concurrent objects check
...
Here we use `IHasColumn` to support rulesets with columns, and so I moved that interface out into `osu.Game` from `osu.Game.Rulesets.Mania`.
We also use the same threshold as the unsnap check to ensure that no problems slip through. Specifically where an object is simultaneously not concurrent and not unsnapped but still on the same tick.
2021-04-26 20:17:18 +02:00
Naxess
9b9c473616
Remove redundant string formatting
2021-04-26 16:17:38 +02:00
Naxess
7b9ed924be
Rename snapping methods
...
Further separates them from `IBeatSnapProvider`'s `SnapTime`, and groups them together more, to prevent confusion between the two interfaces.
Also changes the xmldoc of the reference time to that of `IBeatSnapProvider` for consistency.
2021-04-26 16:07:30 +02:00
smoogipoo
fd5fbaf0db
Rename ruleset wrapper class
2021-04-26 15:37:42 +09:00
Naxess
049e42fa85
Move snapping responsibility to IBeatmap
...
Seems `EditorBeatmap` already implements a different kind of `SnapTime` from `IBeatSnapProvider`, so method names here aren't great.
This is very similar to what https://github.com/ppy/osu/pull/12558 is doing, so may need to do some duplicate resolution later, especially surrounding `ClosestBeatSnapDivisor`.
Worth noting that this change makes 1/7, 1/5, etc unsupported for now, as we now rely on `BindableBeatDivisor.VALID_DIVISORS`.
2021-04-26 05:07:24 +02:00
Naxess
6fd77e536d
Add unsnap check
2021-04-25 05:34:54 +02:00
Dean Herbert
9a7bf8109f
Allow certain mouse input to pass through PlacementBlueprints
to the selection logic
2021-04-22 15:44:12 +09:00
Naxess
4510e795e1
Fix category of audio quality check
2021-04-20 02:13:26 +02:00
Naxess
c633f15565
Add audio quality check
2021-04-20 01:36:03 +02:00
Naxess
40ae856dfc
Show 2 decimals for background filesize
2021-04-20 01:34:05 +02:00
Naxess
14c626ffcb
Use the playable beatmap for file presence checks
2021-04-20 01:33:19 +02:00
Naxess
8656176ab8
Add the playable beatmap as check argument
...
This is different from the working beatmap's `.Beatmap` property in that it is mutated by the ruleset/editor.
So hit objects, for example, are actually of type `Slider` and such instead of the legacy `ConvertSlider`.
This should be preferred over `workingBeatmap.Beatmap`.
2021-04-20 01:31:51 +02:00
Naxess
9a69ca34a6
Add audio presence check
2021-04-18 02:07:57 +02:00
Naxess
010720de74
Factor out general file presence checking
...
This allows us to use the same method of checking for other files that should exist, for example the audio file.
By using the same method, they all share test cases too.
2021-04-18 02:07:33 +02:00
Naxess
56bf49c85c
Take IWorkingBeatmap
instead of WorkingBeatmap
...
This makes testing much easier, and allows for checking of any class deriving from that interface, including `WorkingBeatmap`.
2021-04-18 01:21:20 +02:00
Naxess
abf512532e
Clean up check logic
...
Makes use of the new `BeatmapSet.GetPathForFile` method and removes dependency on `WorkingBeatmap` specifically, allowing us to switch to `IWorkingBeatmap` later.
2021-04-18 01:19:25 +02:00
Naxess
cb41c89935
Don't return low res and too low res at the same time
2021-04-17 20:10:07 +02:00
Naxess
62c54e00cb
Add check for background resolution and filesize
2021-04-17 18:01:04 +02:00
Naxess
448574e7e6
Use WorkingBeatmap
instead of IBeatmap
...
This lets us access things like the background, track, etc. which are necessary for quality and filesize checks.
Also improves the structure of the `CheckBackgroundTest` class in the process.
2021-04-17 17:33:53 +02:00
Dean Herbert
119c9b4294
Fix placement blueprints not being correctly removed after a rolled back placement
2021-04-16 14:11:33 +09:00
Dean Herbert
cb4f64133e
Add xmldoc to interfaces
2021-04-13 23:30:20 +09:00
Naxess
69da804f81
Add missing period
2021-04-13 13:57:56 +02:00
Dean Herbert
0d6890243f
Fix typo in xmldoc
2021-04-13 20:18:18 +09:00
Dean Herbert
03ba04e8ce
Split out general checks into its own verifier class (and remove static
usage)
2021-04-13 19:50:22 +09:00
Naxess
aa5fe2e9fc
Rename BeatmapVerifier
-> IBeatmapVerifier
2021-04-13 11:02:01 +02:00
Naxess
60c2494b31
Make BeatmapVerifier
an interface
2021-04-13 10:40:56 +02:00
Naxess
6d3f9fa9ce
Use is
class instead of Equals
with template index
...
Ensures ordering of `PossibleTemplates` does not affect tests.
2021-04-13 02:29:25 +02:00
Naxess
d8088777ea
Add Equals
method to IssueTemplate
...
This will be useful in tests.
2021-04-13 01:21:34 +02:00
Naxess
19a154ddf1
Rename checkOrigin
-> check
...
More consistent with `Issue.ctor`'s "template".
2021-04-12 17:28:12 +02:00
Naxess
bb720c23a0
Remove check ctors and locals
2021-04-12 17:12:37 +02:00
Dean Herbert
62c1812282
Remove redundant parameter naming
2021-04-12 23:37:47 +09:00
Dean Herbert
36bd235021
Move nested classes to bottom of file
2021-04-12 23:36:10 +09:00
Naxess
6d50d01186
Make IssueTemplate.Check
readonly
2021-04-12 16:23:05 +02:00
Naxess
caaaba5950
Rename Check
-> ICheck
2021-04-12 16:20:53 +02:00
Naxess
008dbc7dd6
Reverse IssueType
ordering
...
Reversed both in the enum and where it's displayed, so ends up the same in the end.
2021-04-12 15:49:13 +02:00
Naxess
7c4f6d2b62
Rework template usage
...
Includes moving the origin check back to templates, constructing nested template classes in each check, and making parameterized template usage.
2021-04-12 15:47:26 +02:00
Naxess
65ebdd8f7a
Move check origin from IssueTemplate
to Issue
...
As a result we can also make check an interface, and need to provide the check itself when constructing an issue.
2021-04-12 10:08:08 +02:00
Dean Herbert
8bf85d737c
Change Metadata into a get property
2021-04-12 15:52:29 +09:00
Dean Herbert
78bbc8f5c8
Tidy some remaining code
2021-04-12 15:52:18 +09:00
Dean Herbert
8c31e96cdf
Change some methods to get properties
2021-04-12 15:52:18 +09:00
Dean Herbert
f78239c7f2
Move enums out of nesting
2021-04-12 15:52:18 +09:00
Dean Herbert
3551322f1d
Fix formatting of colour getter
2021-04-12 15:52:18 +09:00
Dean Herbert
257acf9cd8
Colour constants to private
2021-04-12 15:52:18 +09:00
Dean Herbert
136627b9ac
Wrap xmldoc less and make a few fixes
2021-04-12 15:52:18 +09:00
Dean Herbert
1c553b5d48
Checker -> BeatmapVerifier
2021-04-12 15:29:05 +09:00
Dean Herbert
14bd5bdc77
Merge branch 'master' into verify-tab
2021-04-12 15:14:37 +09:00
Naxess
3289bb0379
Merge Check
and BeatmapCheck
...
We're probably not going to need GeneralChecks or BeatmapsetChecks.
The verify tab is only available to a single difficulty at a time, and we already have access to the rest of the set through `IBeatmap`.
2021-04-10 14:56:30 +02:00
Naxess
bc4f3351f3
Replace checks with realistic ones
2021-04-10 13:03:16 +02:00
Naxess
b30e41b805
Fix comment; mode -> ruleset
2021-04-10 13:02:36 +02:00