-
-
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
Add "Single Tap" mod for osu! ruleset #17781
Conversation
I believe the proposal was to abstract the shared logic, not combine both into a single mod. |
To answer your question that should have been posted here: You can find many examples of this, look for abstract implementations of mods, such as |
Noted,
And noted. |
If anyone has ideas for an icon for single tap I'll add that before I push here. The mods are seperated into There's also tests for single tap and alternate. |
I think the icon should be an image of a single keycap with an optional index finger over it. But the index finger might get confused with Touch Device, hence "optional". |
I think this is a good idea as well, but: |
I would say push for now and leave picking icons for later. It's very likely for this mod to not have any icons assigned to it for the time being.
Abstract mod classes which derive into multiple implementations usually have |
Well if we're doing this I'll probably remove |
That's part of what I meant there, yes. Don't see any needs for adding abstract mod classes if it's only implemented for one ruleset. |
Ugh I was so careful not to make useless pushes, but I messed up the description in single tap, before I make another push, lemme know of anything else I should change. |
There's multiple code formatting issue, try running |
OsuHitObject firstHitObject; | ||
try | ||
{ | ||
firstHitObject = ruleset.Beatmap.HitObjects[0]; | ||
} | ||
catch(IndexOutOfRangeException) | ||
{ | ||
firstHitObject = null; | ||
} |
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.
I'd just use .FirstOrDefault()
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.
I would like to add that there's not really any reason to alter existing modern code if it doesn't affect anything, to avoid actually making it worse.
|
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.
For the icon I think HandPointUp
public override string Name => "Single Tap"; | ||
public override string Acronym => "ST"; | ||
public override string Description => @"Alternate tapping!"; | ||
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay) }; |
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.
Should also be incompatible with Relax
public override string Name => @"Alternate"; | ||
public override string Acronym => @"AL"; | ||
public override string Name => "Alternate"; | ||
public override string Acronym => "AL"; |
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.
Revert this
Ok, I've fixed the couple issues you guys pointed out, and ran
So I ran |
You could try to use Rider EAP or ReSharper EAP as you don't need to buy a license for them, and fix formatting inspections manually as a alternative. |
I downloaded one of them I forget now, but it didn't work. I then tried installing resharper with Is there a list of formatting guidelines I can follow, I found I have done some formatting, like putting spaces after if, and ordering the using statements correctly. |
I'm not sure what you mean by Rider or ReSharper just straight up not working for you, but I'll leave that for you to continue figuring it out (would suggest starting here). In general, you should have got code-style analysis working on your end before submitting this PR, as mentioned in the contributing guidelines: |
This PR is heavily conflicted since a4ca8bf. Will require some reconsideration. Maybe to the point of opening a new PR? @Euro20179 do you still have interest in tackling this one? |
Not particularly. |
No worries. Will close this for now and we can revisit at a later point. |
This adds a mod that only allows single tapping as discussed here
It is stacked ontop of the
alternate
mod, because that felt like the most natural place to put it.