-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace indexed skill access with skills.First(s is ...)
#30034
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Game.Rulesets.Mods; | ||
|
||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills | ||
{ | ||
/// <summary> | ||
/// Represents the Aim skill that does not include sliders length in it's calculation | ||
/// </summary> | ||
public class AimWithoutSliders : Aim | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this is... kinda weird? Why bother? Why not expose skills.OfType<Aim>().SingleOrDefault(aim => aim.WithSliders) or something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's mostly for the tools, to be able to distinguish between two aim skills There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that to say they can't distinguish by based on a property for some reason? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now to display the skill name it just takes the type name. I could add an exception for aim, but I feel like it's an ugly way cos for example if someone works on aim revamping they'll need to remove it, or if someone add another multipass skill it'll need another exception and so on, and that'd need to happen not only in tools but in diffcalc itself. Creating a separate class seems like a more elegant solution to me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. In general I'd expect that to be handled by a |
||
{ | ||
public AimWithoutSliders(Mod[] mods) | ||
: base(mods, false) | ||
{ | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should really say
.Single()
.