1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 16:47:24 +08:00
Commit Graph

447 Commits

Author SHA1 Message Date
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