-
-
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
Refactor skills - move logic out of inheritance hierarchy #15010
Conversation
requesting review from committee wrt the initial strain change |
Why is this adjusting values and also majorly changing structure? Why are those two things not done separately? |
@peppy have already brought this up in #15010 (comment). i do agree it may be better to split off the initial strain change to a separate PR. |
Several merge conflicts to be resolved here, unfortunately :( |
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.
The structure seems fine to me. A few nitpicks with the docs but I consider the blockers resolved.
@@ -9,7 +9,7 @@ | |||
namespace osu.Game.Rulesets.Difficulty.Skills | |||
{ | |||
/// <summary> | |||
/// A bare minimal abstract skill for fully custom skill implementations. | |||
/// Process the <see cref="DifficultyHitObject"/> in a map and produce a difficulty value. |
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.
Unsure if this is a better description than the previous one. They're both pretty barebones.
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.
My thought was that the previous docs pretty much say public abstract class Skill
in words. I can revert or even just delete the doc
I can't understand why straindecaybase and sectionlength should go into parameter. |
Gonna close this for the time being since there's going to be some heavy merge conflicts. Feel free to rebase and open a new PR as I still think it's a good direction. |
Split out the implementations of strain peaks, decaying values, and exponential weighted sums into their own functions apart from the Skill inheritance hierarchy.
In preparation for a PR to add a list of attributes for each hit object - see #14934
The simplest implementation of that would requre skills to have their own Process(DIfficultyHitObject) function in order to have access to current and cumulative strain. Leaving the inheritance hierarchy as is would result in a confusing ping pong of method calls up and down the inheritance hierarchy.
Note: This affects difficulty values. Some of the simplifications make it slightly awkward to keep the initial strain value as 1, so I change the starting value to zero - see the relevant commit below.
It doesn't make sense for strain to start at 1 anyway - it's basically an unconfigurable strain for the first hit object which isn't affected by SkillMultiplier