author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
664,874
17.07.2020 14:08:43
-28,800
e7606b4a1a55c34edeb4751b3860698776103943
Initial implementation of Hard Beat
[ { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHardBeat.cs", "diff": "+// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n+// See the LICENCE file in the repository root for full licence text.\n+\n+using System;\n+using System.Diagnostics;\n+using osu.Framework.Graphics;\n+using osu.Framework.Graphics.Shapes;\n+using osu.Framework.Graphics.Containers;\n+using osu.Framework.Input.Bindings;\n+using osu.Game.Rulesets.Objects.Drawables;\n+using osu.Game.Rulesets.Scoring;\n+using osuTK;\n+using osuTK.Graphics;\n+using System.Linq;\n+using osu.Framework.Allocation;\n+using osu.Game.Rulesets.Tau.Configuration;\n+using osu.Game.Rulesets.Tau.UI;\n+using osu.Framework.Bindables;\n+\n+namespace osu.Game.Rulesets.Tau.Objects.Drawables\n+{\n+ public class DrawableTauHardBeat : DrawableHitObject<TauHitObject>, IKeyBindingHandler<TauAction>\n+ {\n+ /// <summary>\n+ /// A list of keys which can result in hits for this HitObject.\n+ /// </summary>\n+ public TauAction[] HitActions { get; set; } = new[]\n+ {\n+ TauAction.HardButton\n+ };\n+\n+ /// <summary>\n+ /// The action that caused this <see cref=\"DrawableHit\"/> to be hit.\n+ /// </summary>\n+ public TauAction? HitAction { get; private set; }\n+\n+ private bool validActionPressed;\n+\n+ protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;\n+\n+ private CircularContainer ring;\n+\n+ public DrawableTauHardBeat(TauHitObject hitObject)\n+ : base(hitObject)\n+ {\n+ Anchor = Anchor.Centre;\n+ Origin = Anchor.Centre;\n+ RelativeSizeAxes = Axes.Both;\n+ Size = Vector2.One;\n+ AddRangeInternal(new Drawable[]\n+ {\n+ ring = new CircularContainer\n+ {\n+ Size = new Vector2(0),\n+ Masking=true,\n+ BorderThickness = 5,\n+ BorderColour = Color4.White,\n+ RelativePositionAxes = Axes.Both,\n+ Origin = Anchor.Centre,\n+ Anchor = Anchor.Centre,\n+ Alpha = 0.05f,\n+ Children = new Drawable[]{\n+ new Box{\n+ RelativeSizeAxes= Axes.Both,\n+ Alpha = 0,\n+ AlwaysPresent = true\n+ },\n+ }\n+ },\n+ }\n+ );\n+ Position = Vector2.Zero;\n+ }\n+\n+ protected override void UpdateInitialTransforms()\n+ {\n+ base.UpdateInitialTransforms();\n+\n+ ring.FadeIn(HitObject.TimeFadeIn);\n+ ring.ResizeTo(1, HitObject.TimePreempt)\n+ }\n+\n+ protected override void CheckForResult(bool userTriggered, double timeOffset)\n+ {\n+ Debug.Assert(HitObject.HitWindows != null);\n+\n+\n+ if (!userTriggered)\n+ {\n+ if (!HitObject.HitWindows.CanBeHit(timeOffset))\n+ ApplyResult(r => r.Type = HitResult.Miss);\n+\n+ return;\n+ }\n+\n+ var result = HitObject.HitWindows.ResultFor(timeOffset);\n+\n+ if (result == HitResult.None)\n+ return;\n+\n+ ApplyResult(r => r.Type = result);\n+ }\n+\n+ protected override void UpdateStateTransforms(ArmedState state)\n+ {\n+ base.UpdateStateTransforms(state);\n+\n+ const double time_fade_hit = 250, time_fade_miss = 400;\n+\n+ switch (state)\n+ {\n+ case ArmedState.Idle:\n+ LifetimeStart = HitObject.StartTime - HitObject.TimePreempt;\n+ HitAction = null;\n+\n+ break;\n+\n+ case ArmedState.Hit:\n+ var b = HitObject.Angle;\n+ var a = b *= (float)(Math.PI / 180);\n+\n+ ring.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n+ .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n+ .FadeOut(time_fade_hit);\n+\n+ this.FadeOut(time_fade_hit);\n+\n+ break;\n+\n+ case ArmedState.Miss:\n+ var c = HitObject.Angle;\n+ var d = c *= (float)(Math.PI / 180);\n+\n+ ring.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n+ .ResizeTo(1.1f, time_fade_hit, Easing.OutCubic)\n+ .FadeOut(time_fade_miss);\n+\n+ this.FadeOut(time_fade_miss);\n+\n+ break;\n+ }\n+ }\n+\n+ public bool OnPressed(TauAction action)\n+ {\n+ if (AllJudged)\n+ return false;\n+\n+ if (HitActions.Contains(action))\n+ return UpdateResult(true);\n+\n+ return false;\n+ }\n+\n+ public void OnReleased(TauAction action)\n+ {\n+ }\n+ }\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau/Objects/TauHardBeat.cs", "diff": "+using osu.Framework.Bindables;\n+using osu.Game.Beatmaps;\n+using osu.Game.Beatmaps.ControlPoints;\n+using osu.Game.Rulesets.Judgements;\n+using osu.Game.Rulesets.Objects;\n+using osu.Game.Rulesets.Objects.Types;\n+using osu.Game.Rulesets.Scoring;\n+using osu.Game.Rulesets.Tau.Judgements;\n+using osu.Game.Rulesets.Tau.Scoring;\n+using osuTK;\n+\n+namespace osu.Game.Rulesets.Tau.Objects\n+{\n+ public class TauBigBeats : TauHitObject\n+ {\n+\n+ }\n+}\n\\ No newline at end of file\n" } ]
C#
MIT License
taulazer/tau
Initial implementation of Hard Beat
664,874
17.07.2020 20:38:02
-28,800
6f7a8de4a79d5a43f8fe4c62f5b1474f77bbc869
Add Hard Beats to conversions
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Objects.Types;\nusing osu.Game.Rulesets.Tau.Objects;\n+using osu.Game.Audio;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau.Beatmaps\n@@ -27,10 +28,20 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\n{\nVector2 position = ((IHasPosition)original).Position;\nvar comboData = original as IHasCombo;\n+ bool isHard = (original is IHasPathWithRepeats tmp ? tmp.NodeSamples[0] : original.Samples).Any(s => s.Name == HitSampleInfo.HIT_FINISH);\nswitch (original)\n{\ndefault:\n+ if (isHard)\n+ return new TauHardBeat\n+ {\n+ Samples = original is IHasPathWithRepeats curve ? curve.NodeSamples[0] : original.Samples,\n+ StartTime = original.StartTime,\n+ NewCombo = comboData?.NewCombo ?? false,\n+ ComboOffset = comboData?.ComboOffset ?? 0,\n+ }.Yield();\n+ else\nreturn new TauHitObject\n{\nSamples = original is IHasPathWithRepeats curve ? curve.NodeSamples[0] : original.Samples,\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHardBeat.cs", "diff": "@@ -34,31 +34,28 @@ public class DrawableTauHardBeat : DrawableHitObject<TauHitObject>, IKeyBindingH\n/// </summary>\npublic TauAction? HitAction { get; private set; }\n- private bool validActionPressed;\n-\nprotected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;\n- private CircularContainer ring;\n-\npublic DrawableTauHardBeat(TauHitObject hitObject)\n: base(hitObject)\n{\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\nRelativeSizeAxes = Axes.Both;\n- Size = Vector2.One;\n+ Size = Vector2.Zero;\n+ Alpha = 0f;\nAddRangeInternal(new Drawable[]\n{\n- ring = new CircularContainer\n+ new CircularContainer\n{\n- Size = new Vector2(0),\n+ RelativeSizeAxes = Axes.Both,\n+ Size = new Vector2(1),\nMasking=true,\nBorderThickness = 5,\nBorderColour = Color4.White,\n- RelativePositionAxes = Axes.Both,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Alpha = 0.05f,\n+ Alpha = 1f,\nChildren = new Drawable[]{\nnew Box{\nRelativeSizeAxes= Axes.Both,\n@@ -76,15 +73,14 @@ protected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n- ring.FadeIn(HitObject.TimeFadeIn);\n- ring.ResizeTo(1, HitObject.TimePreempt)\n+ this.FadeIn(HitObject.TimeFadeIn);\n+ this.ResizeTo(1, HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n{\nDebug.Assert(HitObject.HitWindows != null);\n-\nif (!userTriggered)\n{\nif (!HitObject.HitWindows.CanBeHit(timeOffset))\n@@ -119,7 +115,7 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar b = HitObject.Angle;\nvar a = b *= (float)(Math.PI / 180);\n- ring.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n+ this.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n.FadeOut(time_fade_hit);\n@@ -131,7 +127,7 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar c = HitObject.Angle;\nvar d = c *= (float)(Math.PI / 180);\n- ring.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n+ this.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n.ResizeTo(1.1f, time_fade_hit, Easing.OutCubic)\n.FadeOut(time_fade_miss);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauJudgement.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauJudgement.cs", "diff": "using osu.Game.Configuration;\nusing osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Scoring;\n+using osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Skinning;\nusing osuTK;\nusing osuTK.Graphics;\n@@ -18,7 +19,7 @@ public class DrawableTauJudgement : DrawableJudgement\nprivate SkinnableSprite lighting;\nprivate Bindable<Color4> lightingColour;\n- public DrawableTauJudgement(JudgementResult result, DrawableTauHitObject judgedObject)\n+ public DrawableTauJudgement(JudgementResult result, DrawableHitObject judgedObject)\n: base(result, judgedObject)\n{\nRelativePositionAxes = Axes.Both;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/TauHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/TauHardBeat.cs", "diff": "namespace osu.Game.Rulesets.Tau.Objects\n{\n- public class TauBigBeats : TauHitObject\n+ public class TauHardBeat : TauHitObject\n{\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "diff": "@@ -28,7 +28,17 @@ public DrawableTauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n- public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h) => new DrawableTauHitObject(h);\n+ public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h)\n+ {\n+ switch (h)\n+ {\n+ case TauHardBeat _:\n+ return new DrawableTauHardBeat(h);\n+\n+ default:\n+ return new DrawableTauHitObject(h);\n+ }\n+ }\nprotected override PassThroughInputManager CreateInputManager() => new TauInputManager(Ruleset?.RulesetInfo);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -126,29 +126,32 @@ public override void Add(DrawableHitObject h)\n{\nbase.Add(h);\n+ switch (h)\n+ {\n+ case DrawableTauHitObject _:\nvar obj = (DrawableTauHitObject)h;\nobj.CheckValidation = CheckIfWeCanValidate;\n+ break;\n+ }\n- obj.OnNewResult += onNewResult;\n+ h.OnNewResult += onNewResult;\n}\nprivate void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\nif (!judgedObject.DisplayResult || !DisplayJudgements.Value)\nreturn;\n-\n- var tauObj = (DrawableTauHitObject)judgedObject;\n-\n- DrawableTauJudgement explosion = new DrawableTauJudgement(result, tauObj)\n+ DrawableTauJudgement explosion = new DrawableTauJudgement(result, judgedObject)\n{\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Position = Extensions.GetCircularPosition(.6f, tauObj.HitObject.Angle),\n- Rotation = tauObj.HitObject.Angle,\n};\n- judgementLayer.Add(explosion);\n-\n+ switch (judgedObject)\n+ {\n+ case DrawableTauHitObject tauObj:\n+ explosion.Position = Extensions.GetCircularPosition(.6f, tauObj.HitObject.Angle);\n+ explosion.Rotation = tauObj.HitObject.Angle;\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\nkiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject)\n{\n@@ -157,6 +160,10 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre\n});\n+ break;\n+ }\n+ judgementLayer.Add(explosion);\n+\n}\nprivate class VisualisationContainer : BeatSyncedContainer\n" } ]
C#
MIT License
taulazer/tau
Add Hard Beats to conversions
664,874
17.07.2020 21:14:21
-28,800
2b9c7da418b001fc06760d11b7cec83b43b45bb5
Make TauHitObject abstract
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "@@ -31,7 +31,7 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\nswitch (original)\n{\ndefault:\n- return new TauHitObject\n+ return new Beat\n{\nSamples = original is IHasPathWithRepeats curve ? curve.NodeSamples[0] : original.Samples,\nStartTime = original.StartTime,\n" }, { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau/Objects/Beat.cs", "diff": "+namespace osu.Game.Rulesets.Tau.Objects\n+{\n+ public class Beat : TauHitObject\n+ {\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/TauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/TauHitObject.cs", "diff": "using osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Judgements;\nusing osu.Game.Rulesets.Tau.Scoring;\n-using osuTK;\n-\nnamespace osu.Game.Rulesets.Tau.Objects\n{\n- public class TauHitObject : HitObject, IHasComboInformation\n+ public abstract class TauHitObject : HitObject, IHasComboInformation\n{\npublic override Judgement CreateJudgement() => new TauJudgement();\npublic double TimePreempt = 600;\npublic double TimeFadeIn = 400;\n- public float Angle { get; set; }\n+ public float Angle { get; set; } = 0;\npublic virtual bool NewCombo { get; set; }\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -41,7 +41,16 @@ private void load(IBindable<WorkingBeatmap> beatmap)\nthis.beatmap.BindTo(beatmap);\n}\n- public bool CheckForValidation(DrawableTauHitObject h) => h.IntersectArea.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\n+ public bool CheckForValidation(DrawableTauHitObject h)\n+ {\n+ switch (h)\n+ {\n+ case DrawableBeat beat:\n+ return beat.IntersectArea.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\n+ default:\n+ return true;\n+ }\n+ }\nprivate class DefaultCursor : CompositeDrawable\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "diff": "@@ -28,7 +28,16 @@ public DrawableTauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n- public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h) => new DrawableTauHitObject(h);\n+ public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h)\n+ {\n+ switch (h)\n+ {\n+ case Beat beat:\n+ return new DrawableBeat(beat);\n+ default:\n+ return null;\n+ }\n+ }\nprotected override PassThroughInputManager CreateInputManager() => new TauInputManager(Ruleset?.RulesetInfo);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Game.Graphics.Containers;\nusing osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects.Drawables;\n+using osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Scoring;\nusing osu.Framework.Graphics.Shapes;\nusing osu.Game.Beatmaps;\n@@ -143,20 +144,26 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Position = Extensions.GetCircularPosition(.6f, tauObj.HitObject.Angle),\n- Rotation = tauObj.HitObject.Angle,\n};\n-\n- judgementLayer.Add(explosion);\n+ switch (judgedObject)\n+ {\n+ case DrawableBeat beat:\n+ var angle = beat.HitObject.Angle;\n+ explosion.Position = Extensions.GetCircularPosition(.6f, angle);\n+ explosion.Rotation = angle;\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\nkiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject)\n{\n- Position = Extensions.GetCircularPosition(.475f, tauObj.HitObject.Angle),\n- Rotation = tauObj.HitObject.Angle,\n+ Position = Extensions.GetCircularPosition(.475f, angle),\n+ Rotation = angle,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre\n});\n+ break;\n+\n+ }\n+ judgementLayer.Add(explosion);\n}\nprivate class VisualisationContainer : BeatSyncedContainer\n" } ]
C#
MIT License
taulazer/tau
Make TauHitObject abstract
664,874
17.07.2020 21:35:58
-28,800
d2844217747b59c09fb9116c802b0364f2a8d25d
Teach autoplay how to deal with HardBeats
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing System;\n+using System.Linq;\nusing osu.Game.Beatmaps;\nusing osu.Game.Replays;\nusing osu.Game.Rulesets.Replays;\n@@ -44,22 +45,29 @@ public override Replay Generate()\nReplay.Frames.Add(new TauReplayFrame(-100000, new Vector2(offset, offset + 150)));\nReplay.Frames.Add(new TauReplayFrame(Beatmap.HitObjects[0].StartTime - reactionTime, new Vector2(offset, offset + 150)));\n+ float prevAngle = 0;\nfor (int i = 0; i < Beatmap.HitObjects.Count; i++)\n{\nTauHitObject h = Beatmap.HitObjects[i];\n+ switch (h)\n+ {\n+ case HardBeat _:\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime, (Replay.Frames.Last() as TauReplayFrame).Position, TauAction.HardButton));\n+ break;\n+ case Beat _:\n//Make the cursor stay at the last note's position if there's enough time between the notes\nif (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].StartTime > reactionTime)\n{\n- float prevAngle = Beatmap.HitObjects[i - 1].Angle;\n-\nReplay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, Extensions.GetCircularPosition(cursorDistance, prevAngle) + new Vector2(offset)));\nbuttonIndex = (int)TauAction.LeftButton;\n}\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset), (TauAction)(buttonIndex++ % 2)));\n+ prevAngle = h.Angle;\n+ break;\n+ }\n}\n-\nreturn Replay;\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Teach autoplay how to deal with HardBeats
664,874
17.07.2020 21:50:52
-28,800
d1086d3ada03d68bf0bbe7f5b4033f428477f3a6
Fix code factor bug
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -161,7 +161,6 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nOrigin = Anchor.Centre\n});\nbreak;\n-\n}\njudgementLayer.Add(explosion);\n}\n" } ]
C#
MIT License
taulazer/tau
Fix code factor bug
664,874
17.07.2020 22:02:35
-28,800
43058c056015462d98f15ab90f32b72423bfb3e2
Slightly adjust Relax mod
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "diff": "@@ -37,7 +37,7 @@ public void Update(Playfield playfield)\nif (tauHit.HitObject is IHasDuration hasEnd && time > hasEnd.EndTime || tauHit.IsHit)\ncontinue;\n- if (tauHit is DrawableTauHitObject)\n+ if (tauHit is DrawableBeat)\n{\nDebug.Assert(tauHit.HitObject.HitWindows != null);\n" } ]
C#
MIT License
taulazer/tau
Slightly adjust Relax mod
664,874
17.07.2020 22:46:28
-28,800
4aa38c7574ad02b8c5acc0f700e305ad9be2ffbb
Make HitActions list virtual Allows derived hitobjects to change this
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -18,7 +18,7 @@ public DrawableTauHitObject(TauHitObject obj)\n/// <summary>\n/// A list of keys which can result in hits for this HitObject.\n/// </summary>\n- public TauAction[] HitActions { get; set; } = new[]\n+ public virtual TauAction[] HitActions { get; set; } = new[]\n{\nTauAction.RightButton,\nTauAction.LeftButton,\n" } ]
C#
MIT License
taulazer/tau
Make HitActions list virtual Allows derived hitobjects to change this
664,874
17.07.2020 22:47:50
-28,800
5186da82447ee8fe6b95d2e488ea360d4bf80701
Make HardBeat derive from DrawableTauHitObject
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "namespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n- public class DrawableHardBeat : DrawableHitObject<TauHitObject>, IKeyBindingHandler<TauAction>\n+ public class DrawableHardBeat : DrawableTauHitObject, IKeyBindingHandler<TauAction>\n{\n- /// <summary>\n- /// A list of keys which can result in hits for this HitObject.\n- /// </summary>\n- public TauAction[] HitActions { get; set; } = new[]\n+ public override TauAction[] HitActions { get; set; } = new[]\n{\nTauAction.HardButton\n};\n- /// <summary>\n- /// The action that caused this <see cref=\"DrawableHit\"/> to be hit.\n- /// </summary>\n- public TauAction? HitAction { get; private set; }\n-\n- protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;\n-\npublic DrawableHardBeat(TauHitObject hitObject)\n: base(hitObject)\n{\n" } ]
C#
MIT License
taulazer/tau
Make HardBeat derive from DrawableTauHitObject
664,874
17.07.2020 22:54:50
-28,800
857a6177d115b3279e6e712989ffcfe9d5fd2813
Teach RX how to deal with HardBeats
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "diff": "@@ -21,6 +21,7 @@ public void Update(Playfield playfield)\n{\nbool requiresHold = false;\nbool requiresHit = false;\n+ bool requiresHardHit = false;\nconst float relax_leniency = 3;\n@@ -45,12 +46,20 @@ public void Update(Playfield playfield)\nif (tauHit.HitObject.HitWindows.CanBeHit(relativetime) && play.CheckIfWeCanValidate(tauHit))\nrequiresHit = true;\n}\n+ else if (tauHit is DrawableHardBeat)\n+ {\n+ if (tauHit.HitObject.HitWindows.CanBeHit(relativetime))\n+ {\n+ requiresHit = true;\n+ requiresHardHit = true;\n+ }\n+ }\n}\nif (requiresHit)\n{\n- addAction(false);\n- addAction(true);\n+ addAction(false, requiresHardHit);\n+ addAction(true, requiresHardHit);\n}\naddAction(requiresHold);\n@@ -61,7 +70,7 @@ public void Update(Playfield playfield)\nprivate TauInputManager tauInputManager;\n- private void addAction(bool hitting)\n+ private void addAction(bool hitting, bool hardhit = false)\n{\nif (wasHit == hitting)\nreturn;\n@@ -74,10 +83,17 @@ private void addAction(bool hitting)\n};\nif (hitting)\n+ {\n+ if (hardhit)\n+ {\n+ state.PressedActions.Add(TauAction.HardButton);\n+ }\n+ else\n{\nstate.PressedActions.Add(wasLeft ? TauAction.LeftButton : TauAction.RightButton);\nwasLeft = !wasLeft;\n}\n+ }\nstate.Apply(tauInputManager.CurrentState, tauInputManager);\n}\n" } ]
C#
MIT License
taulazer/tau
Teach RX how to deal with HardBeats
664,874
18.07.2020 02:05:03
-28,800
ae5765363813a26a4190d3a85e8ec060b377e1a6
Fixed autoplay not releasing notes on certain cases.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "@@ -23,6 +23,11 @@ public class TauAutoGenerator : AutoGenerator\n/// </summary>\nprivate const double reactionTime = 200;\n+ /// <summary>\n+ /// The \"release delay\" in ms between hitting an action then releasing it\n+ /// </summary>\n+ private const double releaseDelay = 20;\n+\npublic TauAutoGenerator(IBeatmap beatmap)\n: base(beatmap)\n{\n@@ -53,6 +58,7 @@ public override Replay Generate()\n{\ncase HardBeat _:\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, (Replay.Frames.Last() as TauReplayFrame).Position, TauAction.HardButton));\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime + releaseDelay, (Replay.Frames.Last() as TauReplayFrame).Position));\nbreak;\ncase Beat _:\n@@ -64,6 +70,7 @@ public override Replay Generate()\nbuttonIndex = (int)TauAction.LeftButton;\n}\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset), (TauAction)(buttonIndex++ % 2)));\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime + releaseDelay, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset)));\nprevAngle = h.Angle;\nbreak;\n}\n" } ]
C#
MIT License
taulazer/tau
Fixed autoplay not releasing notes on certain cases.
664,859
18.07.2020 23:02:11
14,400
934e3b9612712c83e366e94a656fc1e4314ce221
Adjust hardbeat to feel better
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -119,9 +119,9 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Hit:\n- Box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n- .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n- .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutCubic)\n+ Box.ScaleTo(2f, time_fade_hit, Easing.OutQuint)\n+ .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n+ .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\nthis.FadeOut(time_fade_hit);\n@@ -129,9 +129,9 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Miss:\n- Box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n+ Box.ScaleTo(0.5f, time_fade_miss, Easing.InQuint)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutCubic)\n+ .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_miss);\nthis.FadeOut(time_fade_miss);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "@@ -22,6 +22,8 @@ public class DrawableHardBeat : DrawableTauHitObject, IKeyBindingHandler<TauActi\nTauAction.HardButton\n};\n+ private CircularContainer container;\n+\npublic DrawableHardBeat(TauHitObject hitObject)\n: base(hitObject)\n{\n@@ -32,7 +34,7 @@ public DrawableHardBeat(TauHitObject hitObject)\nAlpha = 0f;\nAddRangeInternal(new Drawable[]\n{\n- new CircularContainer\n+ container = new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\nSize = new Vector2(1),\n@@ -52,6 +54,7 @@ public DrawableHardBeat(TauHitObject hitObject)\n},\n}\n);\n+\nPosition = Vector2.Zero;\n}\n@@ -101,11 +104,11 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar b = HitObject.Angle;\nvar a = b *= (float)(Math.PI / 180);\n- this.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n- .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n+ this.ScaleTo(1.25f, time_fade_hit, Easing.OutQuint)\n+ .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n- this.FadeOut(time_fade_hit);\n+ container.TransformTo(nameof(container.BorderThickness), 0f, time_fade_hit, Easing.OutQuint);\nbreak;\n@@ -114,10 +117,10 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar d = c *= (float)(Math.PI / 180);\nthis.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .ResizeTo(1.1f, time_fade_hit, Easing.OutCubic)\n+ .ResizeTo(1.1f, time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_miss);\n- this.FadeOut(time_fade_miss);\n+ container.TransformTo(nameof(container.BorderThickness), 0f, time_fade_miss, Easing.OutQuint);\nbreak;\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -160,6 +160,10 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nOrigin = Anchor.Centre\n});\nbreak;\n+\n+ case DrawableHardBeat hardBeat:\n+ explosion.Position = Extensions.GetCircularPosition(.6f, 0);\n+ break;\n}\njudgementLayer.Add(explosion);\n}\n" } ]
C#
MIT License
taulazer/tau
Adjust hardbeat to feel better
664,859
19.07.2020 00:05:54
14,400
7fc91ff90200dfe1e8b80a2e627a75589a7efec1
Add new particle system
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -151,18 +151,28 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nvar angle = beat.HitObject.Angle;\nexplosion.Position = Extensions.GetCircularPosition(.6f, angle);\nexplosion.Rotation = angle;\n+\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\n- kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject)\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject.AccentColour.Value)\n{\n- Position = Extensions.GetCircularPosition(.475f, angle),\n- Rotation = angle,\n+ Position = Extensions.GetCircularPosition(.5f, angle),\n+ Angle = angle,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre\n});\n+\nbreak;\ncase DrawableHardBeat hardBeat:\nexplosion.Position = Extensions.GetCircularPosition(.6f, 0);\n+\n+ if (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject.AccentColour.Value, true)\n+ {\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre\n+ });\n+\nbreak;\n}\njudgementLayer.Add(explosion);\n" } ]
C#
MIT License
taulazer/tau
Add new particle system
664,874
19.07.2020 12:21:10
-28,800
e20e3e1ea927067e262c1415ef984e7b1bb9b3fc
CodeFactor nits
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/HardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/HardBeat.cs", "diff": "@@ -2,6 +2,5 @@ namespace osu.Game.Rulesets.Tau.Objects\n{\npublic class HardBeat : TauHitObject\n{\n-\n}\n}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -39,7 +39,7 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nparticles.Add(new Box\n{\nRelativePositionAxes = Axes.Both,\n- Position = Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 0.15f + 0.5f, (float)rng.NextDouble() * 360f),\n+ Position = Extensions.GetCircularPosition(((float)(rng.NextDouble() * 0.15f) * 0.15f) + 0.5f, (float)rng.NextDouble() * 360f),\nRotation = (float)rng.NextDouble() * 360f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.BottomCentre,\n@@ -56,7 +56,7 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nparticles.Add(new Box\n{\nRelativePositionAxes = Axes.Both,\n- Position = Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 0.15f, (float)rng.NextDouble() / 10 * 10 + (Angle - 20)),\n+ Position = Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 0.15f, ((float)rng.NextDouble() / 10 * 10) + (Angle - 20)),\nRotation = (float)rng.NextDouble() * 360f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.BottomCentre,\n@@ -79,7 +79,7 @@ protected override void LoadComplete()\nif (circular)\n{\n- particle.MoveTo(Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 2f + 0.5f, particle.Position.GetDegreesFromPosition(Vector2.Zero)), duration, Easing.OutQuint)\n+ particle.MoveTo(Extensions.GetCircularPosition(((float)(rng.NextDouble() * 0.15f) * 2f) + 0.5f, particle.Position.GetDegreesFromPosition(Vector2.Zero)), duration, Easing.OutQuint)\n.ScaleTo(new Vector2(rng.Next(1, 2)), duration, Easing.OutQuint)\n.FadeOut(duration, Easing.OutQuint);\n}\n@@ -93,7 +93,7 @@ float randomBetween(float smallNumber, float bigNumber)\n{\nfloat diff = bigNumber - smallNumber;\n- return (float)rng.NextDouble() * diff + smallNumber;\n+ return ((float)rng.NextDouble() * diff) + smallNumber;\n}\n}\n" } ]
C#
MIT License
taulazer/tau
CodeFactor nits
664,874
19.07.2020 12:39:18
-28,800
eb8034a60f18b1cd2a9d42883a3f5a9ce5f62ee8
Remove kiai explosions after they finish
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -13,6 +13,7 @@ namespace osu.Game.Rulesets.Tau.UI\n{\npublic class KiaiHitExplosion : CompositeDrawable\n{\n+ public override bool RemoveWhenNotAlive => true;\nprivate List<Drawable> particles;\nprivate bool circular;\n" } ]
C#
MIT License
taulazer/tau
Remove kiai explosions after they finish
664,859
19.07.2020 00:49:44
14,400
b1f643de690fb8dfe517ec7ef830b30b06ca288b
Change to linear easing
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "@@ -108,7 +108,7 @@ protected override void UpdateStateTransforms(ArmedState state)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n- container.TransformTo(nameof(container.BorderThickness), 0f, time_fade_hit, Easing.OutQuint);\n+ container.TransformTo(nameof(container.BorderThickness), 0f, time_fade_hit);\nbreak;\n" } ]
C#
MIT License
taulazer/tau
Change to linear easing
664,874
19.07.2020 13:11:32
-28,800
b707ab5ece4c6f83cd48d3ec32382c838207c838
Add test scene for HardBeats
[ { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneHardBeats.cs", "diff": "+using NUnit.Framework;\n+using osu.Framework.Graphics;\n+using osu.Framework.Graphics.Containers;\n+using osu.Game.Beatmaps;\n+using osu.Game.Beatmaps.ControlPoints;\n+using osu.Game.Rulesets.Scoring;\n+using osu.Game.Rulesets.Tau.Objects;\n+using osu.Game.Rulesets.Tau.Objects.Drawables;\n+using osu.Game.Tests.Visual;\n+using osuTK;\n+using System.Linq;\n+\n+\n+namespace osu.Game.Rulesets.Tau.Tests.Objects\n+{\n+ [TestFixture]\n+ public class TestSceneHardBeat : OsuTestScene\n+ {\n+ private readonly Container content;\n+ protected override Container<Drawable> Content => content;\n+\n+ private int depthIndex;\n+\n+ public TestSceneHardBeat()\n+ {\n+ base.Content.Add(content = new TauInputManager(new RulesetInfo { ID = 0 })\n+ {\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Size = new Vector2(768),\n+ RelativeSizeAxes = Axes.None,\n+ Scale = new Vector2(.6f)\n+ });\n+\n+ AddStep(\"Miss Single\", () => testSingle());\n+ AddStep(\"Hit Single\", () => testSingle(true));\n+ AddUntilStep(\"Wait for object despawn\", () => !Children.Any(h => (h is DrawableTauHitObject) && (h as DrawableTauHitObject).AllJudged == false));\n+ }\n+\n+ private void testSingle(bool auto = false)\n+ {\n+ var circle = new HardBeat\n+ {\n+ StartTime = Time.Current + 1000,\n+ };\n+\n+ circle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { });\n+\n+ Add(new TestDrawableHardBeat(circle, auto)\n+ {\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Depth = depthIndex++,\n+ });\n+ }\n+\n+ private class TestDrawableHardBeat : DrawableHardBeat\n+ {\n+ private readonly bool auto;\n+\n+ public TestDrawableHardBeat(HardBeat h, bool auto)\n+ : base(h)\n+ {\n+ this.auto = auto;\n+ }\n+\n+ public void TriggerJudgement() => UpdateResult(true);\n+\n+ protected override void CheckForResult(bool userTriggered, double timeOffset)\n+ {\n+ if (auto && !userTriggered && timeOffset > 0)\n+ {\n+ // force success\n+ ApplyResult(r => r.Type = HitResult.Great);\n+ }\n+ else\n+ base.CheckForResult(userTriggered, timeOffset);\n+ }\n+ }\n+ }\n+}\n" } ]
C#
MIT License
taulazer/tau
Add test scene for HardBeats
664,874
19.07.2020 13:37:07
-28,800
f35d89d33fa5aba38b59d2441b00328b52ad72b2
Fix visual/potential crash when rewinding due to visualizer Yes, I know, it's pretty wack to copy paste original code then only changing a small portion of it. But it works.
[ { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualization.cs", "diff": "+using osuTK;\n+using osuTK.Graphics;\n+using osu.Framework.Graphics;\n+using osu.Framework.Graphics.Batches;\n+using osu.Framework.Graphics.Colour;\n+using osu.Framework.Graphics.OpenGL.Vertices;\n+using osu.Framework.Graphics.Primitives;\n+using osu.Framework.Graphics.Shaders;\n+using osu.Framework.Graphics.Textures;\n+using osu.Game.Beatmaps;\n+using osu.Game.Graphics;\n+using System;\n+using System.Collections.Generic;\n+using JetBrains.Annotations;\n+using osu.Framework.Allocation;\n+using osu.Framework.Audio;\n+using osu.Framework.Audio.Track;\n+using osu.Framework.Bindables;\n+using osu.Framework.Utils;\n+\n+namespace osu.Game.Rulesets.Tau.UI.Components\n+{\n+ /// <summary>\n+ /// A LogoVisualisation modified to better work with gameplay\n+ /// </summary>\n+ public class PlayfieldVisualisation : Drawable, IHasAccentColour\n+ {\n+ private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();\n+\n+ /// <summary>\n+ /// The number of bars to jump each update iteration.\n+ /// </summary>\n+ private const int index_change = 5;\n+\n+ /// <summary>\n+ /// The maximum length of each bar in the visualiser. Will be reduced when kiai is not activated.\n+ /// </summary>\n+ private const float bar_length = 600;\n+\n+ /// <summary>\n+ /// The number of bars in one rotation of the visualiser.\n+ /// </summary>\n+ private const int bars_per_visualiser = 200;\n+\n+ /// <summary>\n+ /// How many times we should stretch around the circumference (overlapping overselves).\n+ /// </summary>\n+ private const float visualiser_rounds = 5;\n+\n+ /// <summary>\n+ /// How much should each bar go down each millisecond (based on a full bar).\n+ /// </summary>\n+ private const float decay_per_milisecond = 0.0024f;\n+\n+ /// <summary>\n+ /// Number of milliseconds between each amplitude update.\n+ /// </summary>\n+ private const float time_between_updates = 50;\n+\n+ /// <summary>\n+ /// The minimum amplitude to show a bar.\n+ /// </summary>\n+ private const float amplitude_dead_zone = 1f / bar_length;\n+\n+ private int indexOffset;\n+\n+ public Color4 AccentColour { get; set; }\n+\n+ /// <summary>\n+ /// The relative movement of bars based on input amplification. Defaults to 1.\n+ /// </summary>\n+ public float Magnitude { get; set; } = 1;\n+\n+ private readonly float[] frequencyAmplitudes = new float[256];\n+\n+ private IShader shader;\n+ private readonly Texture texture;\n+\n+ public PlayfieldVisualisation()\n+ {\n+ texture = Texture.WhitePixel;\n+ Blending = BlendingParameters.Additive;\n+ }\n+\n+ private readonly List<IHasAmplitudes> amplitudeSources = new List<IHasAmplitudes>();\n+\n+ public void AddAmplitudeSource(IHasAmplitudes amplitudeSource)\n+ {\n+ amplitudeSources.Add(amplitudeSource);\n+ }\n+\n+ [BackgroundDependencyLoader]\n+ private void load(ShaderManager shaders, IBindable<WorkingBeatmap> beatmap)\n+ {\n+ this.beatmap.BindTo(beatmap);\n+ shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);\n+ }\n+\n+ private readonly float[] temporalAmplitudes = new float[ChannelAmplitudes.AMPLITUDES_SIZE];\n+\n+ private void updateAmplitudes()\n+ {\n+ var track = beatmap.Value.TrackLoaded ? beatmap.Value.Track : null;\n+ var effect = beatmap.Value.BeatmapLoaded ? beatmap.Value.Beatmap?.ControlPointInfo.EffectPointAt(track?.CurrentTime ?? Time.Current) : null;\n+\n+ if (!effect?.KiaiMode ?? false)\n+ return;\n+\n+ ReadOnlySpan<float> temporalAmplitudes = (track?.CurrentAmplitudes ?? ChannelAmplitudes.Empty).FrequencyAmplitudes.Span;\n+\n+ for (int i = 0; i < bars_per_visualiser; i++)\n+ {\n+ float targetAmplitude = temporalAmplitudes[(i + indexOffset) % bars_per_visualiser];\n+ if (targetAmplitude > frequencyAmplitudes[i])\n+ frequencyAmplitudes[i] = targetAmplitude;\n+ }\n+\n+ indexOffset = (indexOffset + index_change) % bars_per_visualiser;\n+ }\n+\n+ private double delta = 0;\n+\n+ protected override void Update()\n+ {\n+ base.Update();\n+\n+ delta += Math.Abs(Time.Elapsed);\n+ if (delta >= time_between_updates)\n+ {\n+ updateAmplitudes();\n+ delta %= time_between_updates;\n+ }\n+\n+ float decayFactor = Math.Abs((float)Time.Elapsed) * decay_per_milisecond;\n+\n+ for (int i = 0; i < bars_per_visualiser; i++)\n+ {\n+ //3% of extra bar length to make it a little faster when bar is almost at it's minimum\n+ frequencyAmplitudes[i] -= decayFactor * (frequencyAmplitudes[i] + 0.03f);\n+ if (frequencyAmplitudes[i] < 0)\n+ frequencyAmplitudes[i] = 0;\n+ }\n+\n+ Invalidate(Invalidation.DrawNode);\n+ }\n+\n+ protected override DrawNode CreateDrawNode() => new VisualisationDrawNode(this);\n+\n+ private void addAmplitudesFromSource([NotNull] IHasAmplitudes source)\n+ {\n+ if (source == null) throw new ArgumentNullException(nameof(source));\n+\n+ var amplitudes = source.CurrentAmplitudes.FrequencyAmplitudes.Span;\n+\n+ for (int i = 0; i < amplitudes.Length; i++)\n+ {\n+ if (i < temporalAmplitudes.Length)\n+ temporalAmplitudes[i] += amplitudes[i];\n+ }\n+ }\n+\n+ private class VisualisationDrawNode : DrawNode\n+ {\n+ protected new PlayfieldVisualisation Source => (PlayfieldVisualisation)base.Source;\n+\n+ private IShader shader;\n+ private Texture texture;\n+\n+ // Assuming the logo is a circle, we don't need a second dimension.\n+ private float size;\n+\n+ private Color4 colour;\n+ private float[] audioData;\n+\n+ private readonly QuadBatch<TexturedVertex2D> vertexBatch = new QuadBatch<TexturedVertex2D>(100, 10);\n+\n+ public VisualisationDrawNode(PlayfieldVisualisation source)\n+ : base(source)\n+ {\n+ }\n+\n+ public override void ApplyState()\n+ {\n+ base.ApplyState();\n+\n+ shader = Source.shader;\n+ texture = Source.texture;\n+ size = Source.DrawSize.X;\n+ colour = Source.AccentColour;\n+ audioData = Source.frequencyAmplitudes;\n+ }\n+\n+ public override void Draw(Action<TexturedVertex2D> vertexAction)\n+ {\n+ base.Draw(vertexAction);\n+\n+ shader.Bind();\n+\n+ Vector2 inflation = DrawInfo.MatrixInverse.ExtractScale().Xy;\n+\n+ ColourInfo colourInfo = DrawColourInfo.Colour;\n+ colourInfo.ApplyChild(colour);\n+\n+ if (audioData != null)\n+ {\n+ for (int j = 0; j < visualiser_rounds; j++)\n+ {\n+ for (int i = 0; i < bars_per_visualiser; i++)\n+ {\n+ if (audioData[i] < amplitude_dead_zone)\n+ continue;\n+\n+ float rotation = MathUtils.DegreesToRadians((i / (float)bars_per_visualiser * 360) + (j * 360 / visualiser_rounds));\n+ float rotationCos = MathF.Cos(rotation);\n+ float rotationSin = MathF.Sin(rotation);\n+ // taking the cos and sin to the 0..1 range\n+ var barPosition = new Vector2((rotationCos / 2) + 0.5f, (rotationSin / 2) + 0.5f) * size;\n+\n+ var barSize = new Vector2(size * MathF.Sqrt(2 * (1 - MathF.Cos(MathUtils.DegreesToRadians(360f / bars_per_visualiser)))) / 2f, bar_length * audioData[i]);\n+ // The distance between the position and the sides of the bar.\n+ var bottomOffset = new Vector2(-rotationSin * barSize.X / 2, rotationCos * barSize.X / 2);\n+ // The distance between the bottom side of the bar and the top side.\n+ var amplitudeOffset = new Vector2(rotationCos * barSize.Y, rotationSin * barSize.Y);\n+\n+ var rectangle = new Quad(\n+ Vector2Extensions.Transform(barPosition - bottomOffset, DrawInfo.Matrix),\n+ Vector2Extensions.Transform(barPosition - bottomOffset + amplitudeOffset, DrawInfo.Matrix),\n+ Vector2Extensions.Transform(barPosition + bottomOffset, DrawInfo.Matrix),\n+ Vector2Extensions.Transform(barPosition + bottomOffset + amplitudeOffset, DrawInfo.Matrix)\n+ );\n+\n+ DrawQuad(\n+ texture,\n+ rectangle,\n+ colourInfo,\n+ null,\n+ vertexBatch.AddAction,\n+ // barSize by itself will make it smooth more in the X axis than in the Y axis, this reverts that.\n+ Vector2.Divide(inflation, barSize.Yx));\n+ }\n+ }\n+ }\n+\n+ shader.Unbind();\n+ }\n+\n+ protected override void Dispose(bool isDisposing)\n+ {\n+ base.Dispose(isDisposing);\n+\n+ vertexBatch.Dispose();\n+ }\n+ }\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\n+using osu.Game.Rulesets.Tau.UI.Components;\nusing osu.Game.Rulesets.UI;\nusing osu.Game.Screens.Menu;\nusing osuTK;\n@@ -180,7 +181,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nprivate class VisualisationContainer : BeatSyncedContainer\n{\n- private LogoVisualisation visualisation;\n+ private PlayfieldVisualisation visualisation;\nprivate bool firstKiaiBeat = true;\nprivate int kiaiBeatIndex;\nprivate readonly Bindable<bool> ShowVisualisation = new Bindable<bool>(true);\n@@ -192,7 +193,7 @@ private void load(TauRulesetConfigManager settings)\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n- Child = visualisation = new LogoVisualisation\n+ Child = visualisation = new PlayfieldVisualisation\n{\nRelativeSizeAxes = Axes.Both,\nFillMode = FillMode.Fit,\n" } ]
C#
MIT License
taulazer/tau
Fix visual/potential crash when rewinding due to visualizer Yes, I know, it's pretty wack to copy paste original code then only changing a small portion of it. But it works.
664,859
19.07.2020 15:27:58
14,400
ba03634b26475c20d1bac0d4a2f038db5cd31a3e
Apply codefactor issues
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModBlinds.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModBlinds.cs", "diff": "@@ -123,7 +123,7 @@ private void load()\nprivate float calculateGap(float value) => Math.Clamp(value, 0, target_clamp) * targetBreakMultiplier;\n// lagrange polinominal for (0,0) (0.6,0.4) (1,1) should make a good curve\n- private static float applyAdjustmentCurve(float value) => 0.6f * (value * value) + 0.4f * value;\n+ private static float applyAdjustmentCurve(float value) => (0.6f * (value * value)) + (0.4f * value);\nprotected override void Update()\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualization.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualization.cs", "diff": "@@ -188,11 +188,11 @@ public override void Draw(Action<TexturedVertex2D> vertexAction)\nif (audioData[i] < amplitudeDeadZone)\ncontinue;\n- float rotation = MathUtils.DegreesToRadians(i / (float)barsPerVisualiser * 360 + j * 360 / visualiserRounds);\n+ float rotation = MathUtils.DegreesToRadians((i / (float)barsPerVisualiser * 360) + (j * 360 / visualiserRounds));\nfloat rotationCos = MathF.Cos(rotation);\nfloat rotationSin = MathF.Sin(rotation);\n// taking the cos and sin to the 0..1 range\n- var barPosition = new Vector2(rotationCos / 2 + 0.5f, rotationSin / 2 + 0.5f) * size;\n+ var barPosition = new Vector2((rotationCos / 2) + 0.5f, (rotationSin / 2) + 0.5f) * size;\nvar barSize = new Vector2(size * MathF.Sqrt(2 * (1 - MathF.Cos(MathUtils.DegreesToRadians(360f / barsPerVisualiser)))) / 2f, barLength * audioData[i]);\n// The distance between the position and the sides of the bar.\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -93,7 +93,7 @@ public DefaultCursor(float cs = 5f)\nconst double d = 25;\n// Thank you AlFas for this code.\n- double convertValue(double value) => c + (d - c) * (value - a) / (b - a);\n+ double convertValue(double value) => c + (((d - c) * (value - a)) / (b - a));\nAddInternal(new GameplayCursor(cs));\n@@ -172,7 +172,7 @@ public GameplayCursor(float cs)\nconst double d = 0.0605;\n// Thank you AlFas for this code.\n- double convertValue(double value) => c + (d - c) * (value - a) / (b - a);\n+ double convertValue(double value) => c + (((d - c) * (value - a)) / (b - a));\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -40,7 +40,7 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nparticles.Add(new Box\n{\nRelativePositionAxes = Axes.Both,\n- Position = Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 0.15f + 0.5f, (float)rng.NextDouble() * 360f),\n+ Position = Extensions.GetCircularPosition(((float)(rng.NextDouble() * 0.15f) * 0.15f) + 0.5f, (float)rng.NextDouble() * 360f),\nRotation = (float)rng.NextDouble() * 360f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.BottomCentre,\n@@ -57,7 +57,7 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nparticles.Add(new Box\n{\nRelativePositionAxes = Axes.Both,\n- Position = Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 0.15f, (float)rng.NextDouble() / 10 * 10 + (Angle - 20)),\n+ Position = Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 0.15f, ((float)rng.NextDouble() / 10 * 10) + (Angle - 20)),\nRotation = (float)rng.NextDouble() * 360f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.BottomCentre,\n@@ -80,7 +80,7 @@ protected override void LoadComplete()\nif (circular)\n{\n- particle.MoveTo(Extensions.GetCircularPosition((float)(rng.NextDouble() * 0.15f) * 2f + 0.5f, particle.Position.GetDegreesFromPosition(Vector2.Zero)), duration, Easing.OutQuint)\n+ particle.MoveTo(Extensions.GetCircularPosition(((float)(rng.NextDouble() * 0.15f) * 2f) + 0.5f, particle.Position.GetDegreesFromPosition(Vector2.Zero)), duration, Easing.OutQuint)\n.ScaleTo(new Vector2(rng.Next(1, 2)), duration, Easing.OutQuint)\n.FadeOut(duration, Easing.OutQuint);\n}\n@@ -94,7 +94,7 @@ float randomBetween(float smallNumber, float bigNumber)\n{\nfloat diff = bigNumber - smallNumber;\n- return (float)rng.NextDouble() * diff + smallNumber;\n+ return ((float)rng.NextDouble() * diff) + smallNumber;\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Apply codefactor issues
664,859
21.07.2020 15:33:37
14,400
e301191c2f09842a37e37e18d148e33946804322
Change playfieldDim bindable default
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -96,7 +96,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)\n});\n}\n- protected Bindable<float> PlayfieldDimLevel = new Bindable<float>(1); // Change the default as you see fit\n+ protected Bindable<float> PlayfieldDimLevel = new Bindable<float>(0.3f); // Change the default as you see fit\n[BackgroundDependencyLoader(true)]\nprivate void load(TauRulesetConfigManager config)\n" } ]
C#
MIT License
taulazer/tau
Change playfieldDim bindable default
664,859
21.07.2020 16:39:50
14,400
72741ac45339f5a95727889a0297fc6eb7118af1
Implement blueprint
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/TauHitObjectComposer.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/TauHitObjectComposer.cs", "diff": "using System.Collections.Generic;\nusing osu.Game.Rulesets.Edit;\nusing osu.Game.Rulesets.Edit.Tools;\n+using osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Objects;\n+using osu.Game.Screens.Edit.Compose.Components;\nnamespace osu.Game.Rulesets.Tau.Edit\n{\n@@ -14,5 +16,8 @@ public TauHitObjectComposer(Ruleset ruleset)\n}\nprotected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => Array.Empty<HitObjectCompositionTool>();\n+\n+ protected override ComposeBlueprintContainer CreateBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects) =>\n+ new TauBlueprintContainer(hitObjects);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -16,7 +16,6 @@ namespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\npublic class DrawableBeat : DrawableTauHitObject, IKeyBindingHandler<TauAction>\n{\n- public Container Box;\npublic Container IntersectArea;\nprivate bool validActionPressed;\n@@ -24,20 +23,11 @@ public class DrawableBeat : DrawableTauHitObject, IKeyBindingHandler<TauAction>\npublic DrawableBeat(Beat hitObject)\n: base(hitObject)\n{\n+ RelativePositionAxes = Axes.Both;\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n- RelativeSizeAxes = Axes.Both;\n- Size = Vector2.One;\nAddRangeInternal(new Drawable[]\n- {\n- Box = new Container\n- {\n- RelativePositionAxes = Axes.Both,\n- Origin = Anchor.Centre,\n- Anchor = Anchor.Centre,\n- Alpha = 0.05f,\n- Children = new Drawable[]\n{\nnew Box\n{\n@@ -51,12 +41,9 @@ public DrawableBeat(Beat hitObject)\nAnchor = Anchor.Centre,\nAlwaysPresent = true\n}\n- }\n- },\n});\nRotation = hitObject.Angle;\n- Position = Vector2.Zero;\n}\nprivate readonly Bindable<float> size = new Bindable<float>(16); // Change as you see fit.\n@@ -65,15 +52,15 @@ public DrawableBeat(Beat hitObject)\nprivate void load(TauRulesetConfigManager config)\n{\nconfig?.BindWith(TauRulesetSettings.BeatSize, size);\n- size.BindValueChanged(value => Box.Size = new Vector2(value.NewValue), true);\n+ size.BindValueChanged(value => Size = new Vector2(value.NewValue), true);\n}\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n- Box.FadeIn(HitObject.TimeFadeIn);\n- Box.MoveToY(-0.485f, HitObject.TimePreempt);\n+ this.FadeIn(HitObject.TimeFadeIn);\n+ this.MoveTo(Extensions.GetCircularPosition(0.485f, HitObject.Angle), HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n@@ -119,23 +106,19 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Hit:\n- Box.ScaleTo(2f, time_fade_hit, Easing.OutQuint)\n+ this.ScaleTo(2f, time_fade_hit, Easing.OutQuint)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n- .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n+ .MoveToOffset(Extensions.GetCircularPosition(.075f, HitObject.Angle), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n- this.FadeOut(time_fade_hit);\n-\nbreak;\ncase ArmedState.Miss:\n- Box.ScaleTo(0.5f, time_fade_miss, Easing.InQuint)\n+ this.ScaleTo(0.5f, time_fade_miss, Easing.InQuint)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n+ .MoveToOffset(Extensions.GetCircularPosition(.075f, HitObject.Angle), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_miss);\n- this.FadeOut(time_fade_miss);\n-\nbreak;\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Implement blueprint
664,859
22.07.2020 15:18:23
14,400
e6151bab5402f797132dc4d2284f535028960d4c
Change angle on movement (Attempt)
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -47,12 +47,15 @@ public DrawableBeat(Beat hitObject)\n}\nprivate readonly Bindable<float> size = new Bindable<float>(16); // Change as you see fit.\n+ private Bindable<float> angle;\n[BackgroundDependencyLoader(true)]\nprivate void load(TauRulesetConfigManager config)\n{\nconfig?.BindWith(TauRulesetSettings.BeatSize, size);\nsize.BindValueChanged(value => Size = new Vector2(value.NewValue), true);\n+\n+ angle = HitObject.AngleBindable.GetBoundCopy();\n}\nprotected override void UpdateInitialTransforms()\n@@ -60,7 +63,12 @@ protected override void UpdateInitialTransforms()\nbase.UpdateInitialTransforms();\nthis.FadeIn(HitObject.TimeFadeIn);\n- this.MoveTo(Extensions.GetCircularPosition(0.485f, HitObject.Angle), HitObject.TimePreempt);\n+\n+ angle.BindValueChanged(a =>\n+ {\n+ this.MoveTo(Extensions.GetCircularPosition(0.485f, a.NewValue), HitObject.TimePreempt);\n+ Rotation = a.NewValue;\n+ }, true);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/TauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/TauHitObject.cs", "diff": "@@ -18,7 +18,13 @@ public abstract class TauHitObject : HitObject, IHasComboInformation, IHasPositi\npublic double TimePreempt = 600;\npublic double TimeFadeIn = 400;\n- public float Angle { get; set; }\n+ public BindableFloat AngleBindable = new BindableFloat();\n+\n+ public float Angle\n+ {\n+ get => AngleBindable.Value;\n+ set => AngleBindable.Value = value;\n+ }\npublic virtual bool NewCombo { get; set; }\n" } ]
C#
MIT License
taulazer/tau
Change angle on movement (Attempt)
664,859
22.07.2020 16:41:11
14,400
f1036adc7a8b5930c2f21a82a74becc8a5a7f703
Correct movement code
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/TauSelectionBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/TauSelectionBlueprint.cs", "diff": "@@ -29,11 +29,21 @@ protected override void Update()\nvar topLeft = new Vector2(float.MaxValue, float.MaxValue);\nvar bottomRight = new Vector2(float.MinValue, float.MinValue);\n+ if (DrawableObject is DrawableBeat beat)\n+ {\n+ topLeft = Vector2.ComponentMin(topLeft, Parent.ToLocalSpace(beat.Box.ScreenSpaceDrawQuad.TopLeft));\n+\n+ Size = new Vector2(16);\n+ Position = topLeft;\n+ }\n+ else\n+ {\ntopLeft = Vector2.ComponentMin(topLeft, Parent.ToLocalSpace(DrawableObject.ScreenSpaceDrawQuad.TopLeft));\nbottomRight = Vector2.ComponentMax(bottomRight, Parent.ToLocalSpace(DrawableObject.ScreenSpaceDrawQuad.BottomRight));\n- Size = DrawableObject is DrawableHardBeat ? bottomRight - topLeft : new Vector2(16);\n+ Size = bottomRight - topLeft;\nPosition = topLeft;\n}\n}\n}\n+}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Extensions.cs", "new_path": "osu.Game.Rulesets.Tau/Extensions.cs", "diff": "@@ -8,11 +8,13 @@ public static class Extensions\npublic static Vector2 GetCircularPosition(float distance, float angle)\n=> new Vector2(-(distance * (float)Math.Cos((angle + 90f) * (float)(Math.PI / 180))), -(distance * (float)Math.Sin((angle + 90f) * (float)(Math.PI / 180))));\n- public static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\n+ public static float GetDegreesFromPosition(this Vector2 a, Vector2 b)\n{\n- Vector2 offset = self - target;\n+ Vector2 direction = b - a;\n+ float angle = MathHelper.RadiansToDegrees(MathF.Atan2(direction.Y, direction.X));\n+ if (angle < 0f) angle += 360f;\n- return (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y));\n+ return angle + 90;\n}\npublic static float GetHitObjectAngle(this Vector2 target)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\npublic class DrawableBeat : DrawableTauHitObject, IKeyBindingHandler<TauAction>\n{\n+ public Container Box;\npublic Container IntersectArea;\nprivate bool validActionPressed;\n@@ -23,11 +24,20 @@ public class DrawableBeat : DrawableTauHitObject, IKeyBindingHandler<TauAction>\npublic DrawableBeat(Beat hitObject)\n: base(hitObject)\n{\n- RelativePositionAxes = Axes.Both;\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n+ RelativeSizeAxes = Axes.Both;\n+ Size = Vector2.One;\nAddRangeInternal(new Drawable[]\n+ {\n+ Box = new Container\n+ {\n+ RelativePositionAxes = Axes.Both,\n+ Origin = Anchor.Centre,\n+ Anchor = Anchor.Centre,\n+ Alpha = 0.05f,\n+ Children = new Drawable[]\n{\nnew Box\n{\n@@ -41,9 +51,11 @@ public DrawableBeat(Beat hitObject)\nAnchor = Anchor.Centre,\nAlwaysPresent = true\n}\n+ }\n+ },\n});\n- Rotation = hitObject.Angle;\n+ Position = Vector2.Zero;\n}\nprivate readonly Bindable<float> size = new Bindable<float>(16); // Change as you see fit.\n@@ -53,22 +65,22 @@ public DrawableBeat(Beat hitObject)\nprivate void load(TauRulesetConfigManager config)\n{\nconfig?.BindWith(TauRulesetSettings.BeatSize, size);\n- size.BindValueChanged(value => Size = new Vector2(value.NewValue), true);\n+ size.BindValueChanged(value => Box.Size = new Vector2(value.NewValue), true);\nangle = HitObject.AngleBindable.GetBoundCopy();\n+\n+ angle.BindValueChanged(a =>\n+ {\n+ Rotation = a.NewValue;\n+ }, true);\n}\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n- this.FadeIn(HitObject.TimeFadeIn);\n-\n- angle.BindValueChanged(a =>\n- {\n- this.MoveTo(Extensions.GetCircularPosition(0.485f, a.NewValue), HitObject.TimePreempt);\n- Rotation = a.NewValue;\n- }, true);\n+ Box.FadeIn(HitObject.TimeFadeIn);\n+ Box.MoveToY(-0.485f, HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n@@ -114,19 +126,23 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Hit:\n- this.ScaleTo(2f, time_fade_hit, Easing.OutQuint)\n+ Box.ScaleTo(2f, time_fade_hit, Easing.OutQuint)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n- .MoveToOffset(Extensions.GetCircularPosition(.075f, HitObject.Angle), time_fade_hit, Easing.OutQuint)\n+ .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n+ this.FadeOut(time_fade_hit);\n+\nbreak;\ncase ArmedState.Miss:\n- this.ScaleTo(0.5f, time_fade_miss, Easing.InQuint)\n+ Box.ScaleTo(0.5f, time_fade_miss, Easing.InQuint)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .MoveToOffset(Extensions.GetCircularPosition(.075f, HitObject.Angle), time_fade_hit, Easing.OutQuint)\n+ .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_miss);\n+ this.FadeOut(time_fade_miss);\n+\nbreak;\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Correct movement code
664,859
22.07.2020 18:30:48
14,400
3d66d5577679d9377d5ca4b75c62f84a91134ff3
Fix movement code and implement new selection visualization
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "diff": "@@ -59,10 +59,10 @@ public override void UpdatePosition(SnapResult result)\nbase.UpdatePosition(result);\nvar angle = result.ScreenSpacePosition.GetDegreesFromPosition(ScreenSpaceDrawQuad.Centre);\n- HitObject.Angle = angle;\n- piece.Position = Extensions.GetCircularPosition(0.485f, angle);\n- piece.Rotation = angle;\n- distance.Rotation = angle + 180;\n+ HitObject.Angle = angle + 180;\n+ piece.Position = Extensions.GetCircularPosition(0.485f, angle + 180);\n+ piece.Rotation = angle + 180;\n+ distance.Rotation = angle;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/TauBlueprintContainer.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/TauBlueprintContainer.cs", "diff": "using osu.Game.Rulesets.Edit;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Edit.Blueprints;\n+using osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Screens.Edit.Compose.Components;\nnamespace osu.Game.Rulesets.Tau.Edit\n@@ -15,7 +16,15 @@ public TauBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects)\nprotected override SelectionHandler CreateSelectionHandler() => new TauSelectionHandler();\n- public override OverlaySelectionBlueprint CreateBlueprintFor(DrawableHitObject hitObject) =>\n- new TauSelectionBlueprint(hitObject);\n+ public override OverlaySelectionBlueprint CreateBlueprintFor(DrawableHitObject hitObject)\n+ {\n+ switch (hitObject)\n+ {\n+ case DrawableBeat beat:\n+ return new BeatSelectionBlueprint(beat);\n+ }\n+\n+ return base.CreateBlueprintFor(hitObject);\n+ }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix movement code and implement new selection visualization
664,859
22.07.2020 18:37:22
14,400
7584659b3653fcd2a1331e7ea1e957b1e3a2b730
Add HardBeat selection
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatSelectionBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatSelectionBlueprint.cs", "diff": "@@ -16,8 +16,8 @@ public class BeatSelectionBlueprint : TauSelectionBlueprint<Beat>\nprotected readonly HitPiece SelectionPiece;\nprotected readonly Box Distance;\n- public BeatSelectionBlueprint(DrawableBeat drawableCircle)\n- : base(drawableCircle)\n+ public BeatSelectionBlueprint(DrawableBeat hitObject)\n+ : base(hitObject)\n{\nInternalChildren = new Drawable[]\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/TauBlueprintContainer.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/TauBlueprintContainer.cs", "diff": "@@ -22,6 +22,9 @@ public override OverlaySelectionBlueprint CreateBlueprintFor(DrawableHitObject h\n{\ncase DrawableBeat beat:\nreturn new BeatSelectionBlueprint(beat);\n+\n+ case DrawableHardBeat hardBeat:\n+ return new HardBeatSelectionBlueprint(hardBeat);\n}\nreturn base.CreateBlueprintFor(hitObject);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "@@ -18,7 +18,7 @@ public class DrawableHardBeat : DrawableTauHitObject, IKeyBindingHandler<TauActi\nTauAction.HardButton\n};\n- private readonly CircularContainer container;\n+ public readonly CircularContainer Circle;\npublic DrawableHardBeat(TauHitObject hitObject)\n: base(hitObject)\n@@ -31,7 +31,7 @@ public DrawableHardBeat(TauHitObject hitObject)\nAddRangeInternal(new Drawable[]\n{\n- container = new CircularContainer\n+ Circle = new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\nSize = new Vector2(1),\n@@ -103,7 +103,7 @@ protected override void UpdateStateTransforms(ArmedState state)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n- container.TransformTo(nameof(container.BorderThickness), 0f, time_fade_hit);\n+ Circle.TransformTo(nameof(Circle.BorderThickness), 0f, time_fade_hit);\nbreak;\n@@ -112,7 +112,7 @@ protected override void UpdateStateTransforms(ArmedState state)\n.ResizeTo(1.1f, time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_miss);\n- container.TransformTo(nameof(container.BorderThickness), 0f, time_fade_miss, Easing.OutQuint);\n+ Circle.TransformTo(nameof(Circle.BorderThickness), 0f, time_fade_miss, Easing.OutQuint);\nbreak;\n}\n" } ]
C#
MIT License
taulazer/tau
Add HardBeat selection
664,859
22.07.2020 19:00:19
14,400
cf0df85ac269f4cdc2f99550242a69707f4cdfe4
Add HardBeat placement
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/TauHitObjectComposer.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/TauHitObjectComposer.cs", "diff": "@@ -17,6 +17,7 @@ public TauHitObjectComposer(Ruleset ruleset)\nprotected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => new HitObjectCompositionTool[]\n{\nnew BeatCompositionTool(),\n+ new HardBeatCompositionTool(),\n};\nprotected override ComposeBlueprintContainer CreateBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects) =>\n" } ]
C#
MIT License
taulazer/tau
Add HardBeat placement
664,859
22.07.2020 19:01:54
14,400
0f1255de59a5f3a95c109d19912ad18886ecab43
Smoother distance box
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "diff": "@@ -38,6 +38,7 @@ public BeatPlacementBlueprint()\nOrigin = Anchor.TopCentre,\nRelativePositionAxes = Axes.Both,\nWidth = 5,\n+ EdgeSmoothness = Vector2.One\n}\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatSelectionBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatSelectionBlueprint.cs", "diff": "@@ -31,6 +31,7 @@ public BeatSelectionBlueprint(DrawableBeat hitObject)\nOrigin = Anchor.TopCentre,\nRelativePositionAxes = Axes.Both,\nWidth = 5,\n+ EdgeSmoothness = Vector2.One\n}\n};\n}\n" } ]
C#
MIT License
taulazer/tau
Smoother distance box
664,874
23.07.2020 13:44:03
-28,800
e5f18facab4f1437088b41f84d3703b2e5c9b4bb
Fix misuse of GetDegreesFromPosition
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "diff": "@@ -35,7 +35,7 @@ public BeatPlacementBlueprint()\nRelativeSizeAxes = Axes.Y,\nHeight = .5f,\nAnchor = Anchor.Centre,\n- Origin = Anchor.TopCentre,\n+ Origin = Anchor.BottomCentre,\nRelativePositionAxes = Axes.Both,\nWidth = 5,\nEdgeSmoothness = Vector2.One\n@@ -59,10 +59,10 @@ public override void UpdatePosition(SnapResult result)\n{\nbase.UpdatePosition(result);\n- var angle = result.ScreenSpacePosition.GetDegreesFromPosition(ScreenSpaceDrawQuad.Centre);\n- HitObject.Angle = angle + 180;\n- piece.Position = Extensions.GetCircularPosition(0.485f, angle + 180);\n- piece.Rotation = angle + 180;\n+ var angle = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(result.ScreenSpacePosition);\n+ HitObject.Angle = angle;\n+ piece.Position = Extensions.GetCircularPosition(0.485f, angle);\n+ piece.Rotation = angle;\ndistance.Rotation = angle;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatSelectionBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatSelectionBlueprint.cs", "diff": "@@ -28,7 +28,7 @@ public BeatSelectionBlueprint(DrawableBeat hitObject)\nRelativeSizeAxes = Axes.Y,\nHeight = .5f,\nAnchor = Anchor.Centre,\n- Origin = Anchor.TopCentre,\n+ Origin = Anchor.BottomCentre,\nRelativePositionAxes = Axes.Both,\nWidth = 5,\nEdgeSmoothness = Vector2.One\n@@ -40,11 +40,11 @@ protected override void Update()\n{\nbase.Update();\n- SelectionPiece.Rotation = DrawableObject.Rotation + 180;\n- SelectionPiece.Position = Extensions.GetCircularPosition(DrawableObject.Box.Y, DrawableObject.Rotation + 180);\n+ SelectionPiece.Rotation = DrawableObject.Rotation;\n+ SelectionPiece.Position = Extensions.GetCircularPosition(-DrawableObject.Box.Y, DrawableObject.Rotation);\nDistance.Rotation = DrawableObject.Rotation;\n- Distance.Height = DrawableObject.Box.Y;\n+ Distance.Height = -DrawableObject.Box.Y;\n}\npublic override Vector2 ScreenSpaceSelectionPoint => DrawableObject.Box.ScreenSpaceDrawQuad.Centre;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/TauSelectionHandler.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/TauSelectionHandler.cs", "diff": "@@ -13,7 +13,7 @@ public override bool HandleMovement(MoveSelectionEvent moveEvent)\nif (h is HardBeat)\ncontinue;\n- h.Angle = moveEvent.ScreenSpacePosition.GetDegreesFromPosition(ScreenSpaceDrawQuad.Centre) + 180;\n+ h.Angle = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(moveEvent.ScreenSpacePosition);\nEditorBeatmap?.UpdateHitObject(h);\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -175,7 +175,7 @@ public GameplayCursor(float cs)\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\n- var angle = e.MousePosition.GetDegreesFromPosition(AnchorPosition);\n+ var angle = AnchorPosition.GetDegreesFromPosition(e.MousePosition);\nRotation = angle;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -77,7 +77,7 @@ protected override void LoadComplete()\nif (circular)\n{\n- particle.MoveTo(Extensions.GetCircularPosition(((float)(rng.NextDouble() * 0.15f) * 2f) + 0.5f, particle.Position.GetDegreesFromPosition(Vector2.Zero)), duration, Easing.OutQuint)\n+ particle.MoveTo(Extensions.GetCircularPosition(((float)(rng.NextDouble() * 0.15f) * 2f) + 0.5f, Vector2.Zero.GetDegreesFromPosition(particle.Position)), duration, Easing.OutQuint)\n.ScaleTo(new Vector2(rng.Next(1, 2)), duration, Easing.OutQuint)\n.FadeOut(duration, Easing.OutQuint);\n}\n" } ]
C#
MIT License
taulazer/tau
Fix misuse of GetDegreesFromPosition
664,874
23.07.2020 13:50:30
-28,800
738c7c96395d6a822d87161cb19a8ba83a3330f2
Directly use HitObject bindable in Drawable instead of making a copy
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -59,7 +59,6 @@ public DrawableBeat(Beat hitObject)\n}\nprivate readonly Bindable<float> size = new Bindable<float>(16); // Change as you see fit.\n- private Bindable<float> angle;\n[BackgroundDependencyLoader(true)]\nprivate void load(TauRulesetConfigManager config)\n@@ -67,9 +66,7 @@ private void load(TauRulesetConfigManager config)\nconfig?.BindWith(TauRulesetSettings.BeatSize, size);\nsize.BindValueChanged(value => Box.Size = new Vector2(value.NewValue), true);\n- angle = HitObject.AngleBindable.GetBoundCopy();\n-\n- angle.BindValueChanged(a =>\n+ HitObject.AngleBindable.BindValueChanged(a =>\n{\nRotation = a.NewValue;\n}, true);\n" } ]
C#
MIT License
taulazer/tau
Directly use HitObject bindable in Drawable instead of making a copy
664,874
24.07.2020 01:30:36
-28,800
b2ba9adfb3113420cf86f722f9694ef230b1042a
Fix relax mod interfering with replays
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "diff": "using osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\n+using osu.Game.Screens.Play;\nusing static osu.Game.Input.Handlers.ReplayInputHandler;\nnamespace osu.Game.Rulesets.Tau.Mods\n{\n- public class TauModRelax : ModRelax, IUpdatableByPlayfield, IApplicableToDrawableRuleset<TauHitObject>\n+ public class TauModRelax : ModRelax, IUpdatableByPlayfield, IApplicableToDrawableRuleset<TauHitObject>, IApplicableToPlayer\n{\npublic override string Description => @\"You don't need to click. Give your clicking/tapping fingers a break from the heat of things.\";\n+ private bool hasReplay;\n+ public void ApplyToPlayer(Player player)\n+ {\n+ if (tauInputManager.ReplayInputHandler != null)\n+ {\n+ hasReplay = true;\n+ return;\n+ }\n+ tauInputManager.AllowUserPresses = false;\n+ }\n+\npublic void Update(Playfield playfield)\n{\n+ if (hasReplay)\n+ return;\n+\nbool requiresHold = false;\nbool requiresHit = false;\nbool requiresHardHit = false;\n" } ]
C#
MIT License
taulazer/tau
Fix relax mod interfering with replays
664,874
24.07.2020 01:59:38
-28,800
e4fcf04e525ec97da44f04c5b3e76e21c59542c1
Update osu and fix Autoplay
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauFramedReplayInputHandler.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauFramedReplayInputHandler.cs", "diff": "@@ -33,19 +33,16 @@ protected Vector2 Position\n}\n}\n- public override List<IInput> GetPendingInputs()\n+ public override void CollectPendingInputs(List<IInput> inputs)\n{\n- return new List<IInput>\n- {\n- new MousePositionAbsoluteInput\n+ inputs.Add(new MousePositionAbsoluteInput\n{\nPosition = GamefieldToScreenSpace(Position),\n- },\n- new ReplayState<TauAction>\n+ });\n+ inputs.Add(new ReplayState<TauAction>\n{\nPressedActions = CurrentFrame?.Actions ?? new List<TauAction>(),\n- }\n- };\n+ });\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "new_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\"/>\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.714.0\" />\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.723.0\"/>\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\"/>\n" } ]
C#
MIT License
taulazer/tau
Update osu and fix Autoplay
664,874
14.08.2020 19:12:48
-28,800
88b7224a3be12432e3022902a275dfee115c8500
Add entry for HardBeats in BeatmapStatistics
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmap.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmap.cs", "diff": "using osu.Framework.Graphics.Sprites;\nusing osu.Game.Beatmaps;\nusing osu.Game.Rulesets.Tau.Objects;\n+using System.Linq;\nnamespace osu.Game.Rulesets.Tau.Beatmaps\n{\n@@ -9,7 +10,8 @@ public class TauBeatmap : Beatmap<TauHitObject>\n{\npublic override IEnumerable<BeatmapStatistic> GetStatistics()\n{\n- int beats = HitObjects.Count;\n+ int beats = HitObjects.Count(b => b is Beat);\n+ int hardbeats = HitObjects.Count(b => b is HardBeat);\nreturn new[]\n{\n@@ -18,6 +20,12 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()\nName = \"Beat count\",\nContent = beats.ToString(),\nIcon = FontAwesome.Solid.Square\n+ },\n+ new BeatmapStatistic\n+ {\n+ Name = \"HardBeat count\",\n+ Content = hardbeats.ToString(),\n+ Icon = FontAwesome.Regular.Circle\n}\n};\n}\n" } ]
C#
MIT License
taulazer/tau
Add entry for HardBeats in BeatmapStatistics
664,874
15.08.2020 00:41:15
-28,800
69f910831ecc2dea53fa30f741476f2735a16215
Fix visualizer stretching out when unpausing while multi-threading Single-threaded will still experience this problem. Alten's PC will still experience this as well.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualization.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualization.cs", "diff": "using osu.Game.Graphics;\nusing osuTK;\nusing osuTK.Graphics;\n+using System.Diagnostics;\nnamespace osu.Game.Rulesets.Tau.UI.Components\n{\n@@ -104,21 +105,19 @@ private void updateAmplitudes()\nindexOffset = (indexOffset + indexChange) % barsPerVisualiser;\n}\n- private double delta;\n+ private double lastUpdateTime = double.MinValue;\nprotected override void Update()\n{\nbase.Update();\n- delta += Math.Abs(Time.Elapsed);\n-\n- if (delta >= timeBetweenUpdates)\n- {\n+ if (Math.Abs(lastUpdateTime - Time.Current) > 50){\nupdateAmplitudes();\n- delta %= timeBetweenUpdates;\n+ lastUpdateTime = Time.Current;\n}\n- float decayFactor = Math.Abs((float)Time.Elapsed) * decayPerMilisecond;\n+ float decayFactor = (float)Math.Abs(Time.Elapsed) * decayPerMilisecond;\n+\nfor (int i = 0; i < barsPerVisualiser; i++)\n{\n" } ]
C#
MIT License
taulazer/tau
Fix visualizer stretching out when unpausing while multi-threading Single-threaded will still experience this problem. Alten's PC will still experience this as well.
664,874
15.08.2020 15:42:03
-28,800
761fed24469b971a192a5314ef7f919c7d8b88fc
Enable detailed score statistics These show when clicking the score cards after a play.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "diff": "using osu.Game.Rulesets.Tau.Scoring;\nusing osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\n+using osu.Game.Scoring;\n+using osu.Game.Screens.Ranking.Statistics;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau\n@@ -104,6 +106,21 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\nnew KeyBinding(InputKey.Space, TauAction.HardButton),\n};\n+ public override StatisticRow[] CreateStatisticsForScore(ScoreInfo score, IBeatmap playableBeatmap) => new[]\n+ {\n+ new StatisticRow\n+ {\n+ Columns = new[]\n+ {\n+ new StatisticItem(\"Timing Distribution\", new HitEventTimingDistributionGraph(score.HitEvents)\n+ {\n+ RelativeSizeAxes = Axes.X,\n+ Height = 250\n+ })\n+ }\n+ },\n+ };\n+\npublic override Drawable CreateIcon() => new Container\n{\nAutoSizeAxes = Axes.Both,\n" } ]
C#
MIT License
taulazer/tau
Enable detailed score statistics These show when clicking the score cards after a play.
664,874
26.08.2020 21:08:54
-28,800
c1ed8d908d141fd645d230459f094faf285b0369
Fix Autoplay not properly considering multiple objects at the same time This fixes Autoplay issues with weird maps such as Centipede.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "+using System;\nusing System.Linq;\nusing osu.Game.Beatmaps;\nusing osu.Game.Replays;\n@@ -18,11 +19,6 @@ public class TauAutoGenerator : AutoGenerator\n/// </summary>\nprivate const double reactionTime = 200;\n- /// <summary>\n- /// The \"release delay\" in ms between hitting an action then releasing it\n- /// </summary>\n- private const double releaseDelay = 20;\n-\npublic TauAutoGenerator(IBeatmap beatmap)\n: base(beatmap)\n{\n@@ -45,11 +41,15 @@ public override Replay Generate()\nReplay.Frames.Add(new TauReplayFrame(-100000, new Vector2(offset, offset + 150)));\nReplay.Frames.Add(new TauReplayFrame(Beatmap.HitObjects[0].StartTime - reactionTime, new Vector2(offset, offset + 150)));\n+\nfloat prevAngle = 0;\nfor (int i = 0; i < Beatmap.HitObjects.Count; i++)\n{\nTauHitObject h = Beatmap.HitObjects[i];\n+ double releaseDelay = KEY_UP_DELAY;\n+ if (i + 1 < Beatmap.HitObjects.Count)\n+ releaseDelay = Math.Min(KEY_UP_DELAY, Beatmap.HitObjects[i + 1].StartTime - h.StartTime);\nswitch (h)\n{\n" } ]
C#
MIT License
taulazer/tau
Fix Autoplay not properly considering multiple objects at the same time This fixes Autoplay issues with weird maps such as Centipede.
664,874
27.08.2020 21:40:02
-28,800
8252daa8a74e075896f276489b95bb7516aa3217
Remove excess blank line
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "@@ -41,7 +41,6 @@ public override Replay Generate()\nReplay.Frames.Add(new TauReplayFrame(-100000, new Vector2(offset, offset + 150)));\nReplay.Frames.Add(new TauReplayFrame(Beatmap.HitObjects[0].StartTime - reactionTime, new Vector2(offset, offset + 150)));\n-\nfloat prevAngle = 0;\nfor (int i = 0; i < Beatmap.HitObjects.Count; i++)\n" } ]
C#
MIT License
taulazer/tau
Remove excess blank line
664,874
31.08.2020 16:19:38
-28,800
daf7b42a28b54ca1e13ad83c65a9444397d6fb85
Fix Cinema mod not working as expected
[ { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau/Mods/TauModCinema.cs", "diff": "+using System;\n+using System.Linq;\n+using osu.Game.Beatmaps;\n+using osu.Game.Rulesets.Mods;\n+using osu.Game.Rulesets.Tau.Objects;\n+using osu.Game.Rulesets.Tau.Replays;\n+using osu.Game.Scoring;\n+using osu.Game.Users;\n+\n+namespace osu.Game.Rulesets.Tau.Mods\n+{\n+ public class TauModCinema : ModCinema<TauHitObject>\n+ {\n+ public override Score CreateReplayScore(IBeatmap beatmap) => new Score\n+ {\n+ ScoreInfo = new ScoreInfo { User = new User { Username = \"tau\" } },\n+ Replay = new TauAutoGenerator(beatmap).Generate()\n+ };\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "diff": "@@ -66,7 +66,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\ncase ModType.Automation:\nreturn new Mod[]\n{\n- new MultiMod(new TauModAutoplay(), new ModCinema()),\n+ new MultiMod(new TauModAutoplay(), new TauModCinema()),\nnew TauModRelax(),\n};\n" } ]
C#
MIT License
taulazer/tau
Fix Cinema mod not working as expected
664,874
16.09.2020 21:45:44
-7,200
cd2a79115d16cda3ce77af23d0c69c8d5ec116d5
Use CreateIcon instead of obsolete Icon var
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmap.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmap.cs", "diff": "using osu.Game.Beatmaps;\nusing osu.Game.Rulesets.Tau.Objects;\nusing System.Linq;\n+using osuTK;\nnamespace osu.Game.Rulesets.Tau.Beatmaps\n{\n@@ -19,13 +20,21 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()\n{\nName = \"Beat count\",\nContent = beats.ToString(),\n- Icon = FontAwesome.Solid.Square\n+ CreateIcon = () => new SpriteIcon\n+ {\n+ Icon = FontAwesome.Solid.Square,\n+ Scale = new Vector2(.7f)\n+ },\n},\nnew BeatmapStatistic\n{\nName = \"HardBeat count\",\nContent = hardbeats.ToString(),\n- Icon = FontAwesome.Regular.Circle\n+ CreateIcon = () => new SpriteIcon\n+ {\n+ Icon = FontAwesome.Regular.Circle,\n+ Scale = new Vector2(.7f)\n+ },\n}\n};\n}\n" } ]
C#
MIT License
taulazer/tau
Use CreateIcon instead of obsolete Icon var
664,874
16.09.2020 22:00:50
-7,200
66fbe08f09c40769e23d652c0d45619cb8014923
Tweak score chart to include unstable rate
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "diff": "@@ -116,9 +116,19 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\n{\nRelativeSizeAxes = Axes.X,\nHeight = 250\n- })\n+ }),\n}\n},\n+ new StatisticRow\n+ {\n+ Columns = new[]\n+ {\n+ new StatisticItem(string.Empty, new SimpleStatisticTable(3, new SimpleStatisticItem[]\n+ {\n+ new UnstableRate(score.HitEvents)\n+ }))\n+ }\n+ }\n};\npublic override Drawable CreateIcon() => new Container\n" } ]
C#
MIT License
taulazer/tau
Tweak score chart to include unstable rate
664,859
18.09.2020 10:05:22
14,400
11b0e628390a5686c2b57298fab6771b7104fd75
Fix combo-colouring
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "diff": "@@ -130,5 +130,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\npublic override IConvertibleReplayFrame CreateConvertibleReplayFrame() => new TauReplayFrame();\npublic override HitObjectComposer CreateHitObjectComposer() => new TauHitObjectComposer(this);\n+\n+ public override IBeatmapProcessor CreateBeatmapProcessor(IBeatmap beatmap) => new BeatmapProcessor(beatmap);\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix combo-colouring
664,859
18.09.2020 23:49:16
14,400
39f3e5406cd7ed2a5fe534b182578ccf952ae84b
Color visualizer and hitobjects
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "using osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.Shapes;\nusing osu.Framework.Input.Bindings;\n+using osu.Game.Graphics;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Configuration;\n@@ -108,6 +109,9 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\n}\n}\n+ [Resolved]\n+ private OsuColour colour { get; set; }\n+\nprotected override void UpdateStateTransforms(ArmedState state)\n{\nbase.UpdateStateTransforms(state);\n@@ -124,7 +128,7 @@ protected override void UpdateStateTransforms(ArmedState state)\ncase ArmedState.Hit:\nBox.ScaleTo(2f, time_fade_hit, Easing.OutQuint)\n- .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n+ .FadeColour(colour.ForHitResult(Result.Type), time_fade_hit, Easing.OutQuint)\n.MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "using System.Diagnostics;\nusing System.Linq;\n+using osu.Framework.Allocation;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.Shapes;\nusing osu.Framework.Input.Bindings;\n+using osu.Game.Graphics;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osuTK;\n@@ -84,6 +86,9 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nApplyResult(r => r.Type = result);\n}\n+ [Resolved]\n+ private OsuColour colour { get; set; }\n+\nprotected override void UpdateStateTransforms(ArmedState state)\n{\nbase.UpdateStateTransforms(state);\n@@ -100,7 +105,7 @@ protected override void UpdateStateTransforms(ArmedState state)\ncase ArmedState.Hit:\nthis.ScaleTo(1.25f, time_fade_hit, Easing.OutQuint)\n- .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutQuint)\n+ .FadeColour(colour.ForHitResult(Result.Type), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\nCircle.TransformTo(nameof(Circle.BorderThickness), 0f, time_fade_hit);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -213,7 +213,7 @@ private void load(TauRulesetConfigManager settings)\nprotected override void LoadComplete()\n{\nbase.LoadComplete();\n- visualisation.AccentColour = Color4.White;\n+ visualisation.AccentColour = ACCENT_COLOR.Opacity(0.5f);\nshowVisualisation.TriggerChange();\n}\n@@ -225,14 +225,14 @@ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint,\nif (firstKiaiBeat)\n{\n- visualisation.FlashColour(Color4.White, timingPoint.BeatLength * 4, Easing.In);\n+ visualisation.FlashColour(ACCENT_COLOR.Opacity(0.5f), timingPoint.BeatLength * 4, Easing.In);\nfirstKiaiBeat = false;\nreturn;\n}\nif (kiaiBeatIndex >= 5)\n- visualisation.FlashColour(Color4.White.Opacity(0.15f), timingPoint.BeatLength, Easing.In);\n+ visualisation.FlashColour(ACCENT_COLOR.Opacity(0.25f), timingPoint.BeatLength, Easing.In);\n}\nelse\n{\n" } ]
C#
MIT License
taulazer/tau
Color visualizer and hitobjects
664,859
19.09.2020 01:40:49
14,400
30f2815fcdc56ba005dd734a525a0f7f5e13d04e
Colour kiai effects
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -41,7 +41,8 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nRotation = (float)rng.NextDouble() * 360f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.BottomCentre,\n- Size = new Vector2(rng.Next(1, 15))\n+ Size = new Vector2(rng.Next(1, 15)),\n+ Colour = colour\n});\n}\n}\n@@ -58,7 +59,8 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nRotation = (float)rng.NextDouble() * 360f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.BottomCentre,\n- Size = new Vector2(rng.Next(1, 15))\n+ Size = new Vector2(rng.Next(1, 15)),\n+ Colour = colour\n});\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Framework.Graphics.Shapes;\nusing osu.Game.Beatmaps;\nusing osu.Game.Beatmaps.ControlPoints;\n+using osu.Game.Graphics;\nusing osu.Game.Graphics.Containers;\nusing osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects.Drawables;\n@@ -136,6 +137,9 @@ public override void Add(DrawableHitObject h)\nh.OnNewResult += onNewResult;\n}\n+ [Resolved]\n+ private OsuColour colour { get; set; }\n+\nprivate void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\nif (!judgedObject.DisplayResult || !DisplayJudgements.Value)\n@@ -155,7 +159,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nexplosion.Rotation = angle;\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\n- kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject.AccentColour.Value)\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(colour.ForHitResult(judgedObject.Result.Type))\n{\nPosition = Extensions.GetCircularPosition(.5f, angle),\nAngle = angle,\n@@ -169,10 +173,10 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nexplosion.Position = Extensions.GetCircularPosition(.6f, 0);\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\n- kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject.AccentColour.Value, true)\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(colour.ForHitResult(judgedObject.Result.Type), true)\n{\nAnchor = Anchor.Centre,\n- Origin = Anchor.Centre\n+ Origin = Anchor.Centre,\n});\nbreak;\n" } ]
C#
MIT License
taulazer/tau
Colour kiai effects
664,874
19.09.2020 21:15:42
-7,200
ee170fefd7d83730abbf82bfddecb08189fda92f
Add prereq extensions Will help out along the way
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Extensions.cs", "new_path": "osu.Game.Rulesets.Tau/Extensions.cs", "diff": "@@ -17,11 +17,40 @@ public static float GetDegreesFromPosition(this Vector2 a, Vector2 b)\nreturn angle + 90;\n}\n+ public static float GetDeltaAngle(float a, float b)\n+ {\n+ float x = b;\n+ float y = a;\n+\n+ if (a > b)\n+ {\n+ x = a;\n+ y = b;\n+ }\n+\n+ if (x - y < 180)\n+ x -= y;\n+ else\n+ x = 360 - x + y;\n+\n+ return x;\n+ }\n+\npublic static float GetHitObjectAngle(this Vector2 target)\n{\nVector2 offset = new Vector2(256, 192) - target; // Using centre of playfield.\n- return (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, -offset.Y)) - 180;\n+ var tmp = (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, -offset.Y)) - 180;\n+\n+ return tmp.NormalizeAngle();\n+ }\n+\n+ public static float NormalizeAngle(this float degrees)\n+ {\n+ if (degrees < 0) degrees += 360;\n+ if (degrees >= 360) degrees %= 360;\n+\n+ return degrees;\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Add prereq extensions Will help out along the way
664,874
19.09.2020 21:16:25
-7,200
5ed9302e16dcf2477a73824d3efdd57a5c3be129
Begin reimplementation of paddle and cursor Didn't care about code tidiness yet, just wanted to get things working
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "using osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osuTK;\nusing osuTK.Graphics;\n+using System;\nnamespace osu.Game.Rulesets.Tau.UI.Cursor\n{\n@@ -17,24 +18,30 @@ public class TauCursor : CompositeDrawable\n{\nprivate readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();\nprivate readonly BeatmapDifficulty difficulty;\n+ public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n+\n+\n+ private readonly float angleRange;\n- private DefaultCursor defaultCursor;\n+ private readonly Paddle paddle;\npublic TauCursor(BeatmapDifficulty difficulty)\n{\nthis.difficulty = difficulty;\n+ angleRange = 90 - ((difficulty.CircleSize - 2) * 11.25f);\n+\nOrigin = Anchor.Centre;\nAnchor = Anchor.Centre;\nRelativeSizeAxes = Axes.Both;\n+ AddInternal(paddle = new Paddle(angleRange));\n+ AddInternal(new AbsoluteCursor());\n}\n[BackgroundDependencyLoader]\nprivate void load(IBindable<WorkingBeatmap> beatmap)\n{\n- InternalChild = defaultCursor = new DefaultCursor(difficulty.CircleSize);\n-\nthis.beatmap.BindTo(beatmap);\n}\n@@ -43,71 +50,77 @@ public bool CheckForValidation(DrawableTauHitObject h)\nswitch (h)\n{\ncase DrawableBeat beat:\n- return beat.IntersectArea.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\n+ var angleDiff = Extensions.GetDeltaAngle(paddle.Rotation, beat.HitObject.Angle);\n+ return (Math.Abs(angleDiff) <= angleRange / 2);\ndefault:\nreturn true;\n}\n}\n- private class DefaultCursor : CompositeDrawable\n+ protected override bool OnMouseMove(MouseMoveEvent e)\n{\n- public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n+ paddle.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\n- public readonly Box HitReceptor;\n+ return base.OnMouseMove(e);\n+ }\n- public DefaultCursor(float cs = 5f)\n+ public class Paddle : CompositeDrawable\n{\n- Origin = Anchor.Centre;\n- Anchor = Anchor.Centre;\n+ public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n+ private readonly Box topLine;\n+ private readonly Box bottomLine;\n+ private readonly CircularContainer circle;\n+ public Paddle(float angleRange)\n+ {\nRelativeSizeAxes = Axes.Both;\n+ Anchor = Anchor.Centre;\n+ Origin = Anchor.Centre;\n+ FillMode = FillMode.Fit;\n+ FillAspectRatio = 1; // 1:1 Aspect Ratio.\n- AddInternal(new Container\n+ InternalChildren = new Drawable[]\n+ {\n+ new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\n+ Masking = true,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- FillMode = FillMode.Fit,\n- FillAspectRatio = 1, // 1:1 Aspect Ratio.\nChildren = new Drawable[]\n{\n- HitReceptor = new Box\n- {\n- Height = 50,\n- Width = (float)convertValue(cs) * 1.6f,\n- Anchor = Anchor.TopCentre,\n- Origin = Anchor.TopCentre,\n- Alpha = 0,\n- AlwaysPresent = true\n- }\n- }\n- });\n-\n- const double a = 1;\n- const double b = 10;\n- const double c = 230;\n- const double d = 25;\n-\n- // Thank you AlFas for this code.\n- double convertValue(double value) => c + (((d - c) * (value - a)) / (b - a));\n-\n- AddInternal(new GameplayCursor(cs));\n-\n- AddInternal(new AbsoluteCursor\n+ new CircularProgress\n{\nRelativeSizeAxes = Axes.Both,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- });\n- }\n-\n- private class AbsoluteCursor : CursorContainer\n- {\n- protected override Drawable CreateCursor() => new CircularContainer\n+ Current = new BindableDouble((double)(angleRange/360)),\n+ InnerRadius = 0.05f,\n+ Rotation = -angleRange/2\n+ },\n+ bottomLine = new Box{\n+ EdgeSmoothness = new Vector2(1f),\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.BottomCentre,\n+ RelativeSizeAxes = Axes.Y,\n+ Size = new Vector2(1.25f, 0.235f)\n+ },\n+ topLine = new Box{\n+ EdgeSmoothness = new Vector2(1f),\n+ Anchor = Anchor.TopCentre,\n+ Origin = Anchor.TopCentre,\n+ RelativeSizeAxes = Axes.Y,\n+ Size = new Vector2(1.25f, 0.235f)\n+ },\n+ circle = new CircularContainer\n{\n- Size = new Vector2(15),\n+ RelativePositionAxes = Axes.Both,\n+ RelativeSizeAxes = Axes.Both,\n+ Y = -.25f,\n+ Size = new Vector2(.03f),\nOrigin = Anchor.Centre,\n+ Anchor = Anchor.Centre,\nMasking = true,\nBorderColour = Color4.White,\nBorderThickness = 4,\n@@ -117,28 +130,29 @@ private class AbsoluteCursor : CursorContainer\nAlwaysPresent = true,\nAlpha = 0,\n}\n+ }\n+ }\n+ }\n};\n}\n- private class GameplayCursor : CompositeDrawable\n- {\n- public GameplayCursor(float cs)\n+ protected override bool OnMouseMove(MouseMoveEvent e)\n{\n- RelativeSizeAxes = Axes.Both;\n+ circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / (DrawHeight), .05f, .45f);\n+ bottomLine.Height = -circle.Y - .015f;\n+ topLine.Height = .5f + circle.Y - .015f;\n+ return base.OnMouseMove(e);\n+ }\n+ }\n- Anchor = Anchor.Centre;\n- Origin = Anchor.Centre;\n+ public class AbsoluteCursor : CursorContainer\n+ {\n- FillMode = FillMode.Fit;\n- FillAspectRatio = 1; // 1:1 Aspect Ratio.\n+ public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n- InternalChildren = new Drawable[]\n- {\n- new CircularContainer\n+ protected override Drawable CreateCursor() => new CircularContainer\n{\n- RelativeSizeAxes = Axes.Both,\n- Masking = true,\n- Anchor = Anchor.Centre,\n+ Size = new Vector2(60),\nOrigin = Anchor.Centre,\nChildren = new Drawable[]\n{\n@@ -147,40 +161,21 @@ public GameplayCursor(float cs)\nRelativeSizeAxes = Axes.Both,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Current = new BindableDouble(convertValue(cs)),\n- InnerRadius = 0.05f,\n- Rotation = -360 * ((float)convertValue(cs) / 2)\n+ Current = new BindableDouble(.33f),\n+ InnerRadius = 0.1f,\n+ Rotation = -150\n},\n- new Box\n+ new CircularProgress\n{\n- EdgeSmoothness = new Vector2(1f),\n- Anchor = Anchor.TopCentre,\n- Origin = Anchor.TopCentre,\n- RelativeSizeAxes = Axes.Y,\n- Size = new Vector2(2.5f / 2, 0.5f),\n- }\n- }\n+ RelativeSizeAxes = Axes.Both,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Current = new BindableDouble(.33f),\n+ InnerRadius = 0.1f,\n+ Rotation = 30\n+ },\n}\n};\n-\n- const double a = 2;\n- const double b = 7;\n- const double c = 0.15;\n- const double d = 0.0605;\n-\n- // Thank you AlFas for this code.\n- double convertValue(double value) => c + (((d - c) * (value - a)) / (b - a));\n- }\n- }\n-\n- protected override bool OnMouseMove(MouseMoveEvent e)\n- {\n- var angle = AnchorPosition.GetDegreesFromPosition(e.MousePosition);\n-\n- Rotation = angle;\n-\n- return base.OnMouseMove(e);\n- }\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Begin reimplementation of paddle and cursor Didn't care about code tidiness yet, just wanted to get things working
664,874
19.09.2020 22:59:58
-7,200
0b962929c272bdc6706f8c195f23f3845f248011
Rotate absolute cursor based on angle to screen centre
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -24,6 +24,7 @@ public class TauCursor : CompositeDrawable\nprivate readonly float angleRange;\nprivate readonly Paddle paddle;\n+ private readonly AbsoluteCursor cursor;\npublic TauCursor(BeatmapDifficulty difficulty)\n{\n@@ -36,7 +37,7 @@ public TauCursor(BeatmapDifficulty difficulty)\nRelativeSizeAxes = Axes.Both;\nAddInternal(paddle = new Paddle(angleRange));\n- AddInternal(new AbsoluteCursor());\n+ AddInternal(cursor = new AbsoluteCursor());\n}\n[BackgroundDependencyLoader]\n@@ -61,6 +62,7 @@ public bool CheckForValidation(DrawableTauHitObject h)\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\npaddle.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\n+ cursor.ActiveCursor.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\nreturn base.OnMouseMove(e);\n}\n" } ]
C#
MIT License
taulazer/tau
Rotate absolute cursor based on angle to screen centre
664,874
19.09.2020 23:23:17
-7,200
ba4db8de14235b3b5fcedae14d1fda18d9c871ad
Update angleRange to use lazer cs ranges
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -30,7 +30,7 @@ public TauCursor(BeatmapDifficulty difficulty)\n{\nthis.difficulty = difficulty;\n- angleRange = 90 - ((difficulty.CircleSize - 2) * 11.25f);\n+ angleRange = 90 - ((difficulty.CircleSize - 1) * 7.5f);\nOrigin = Anchor.Centre;\nAnchor = Anchor.Centre;\n" } ]
C#
MIT License
taulazer/tau
Update angleRange to use lazer cs ranges
664,874
19.09.2020 23:42:29
-7,200
663c1190f3838ce7ede53b9174e041bef010731c
Fix wrong calculations in clamping
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -30,7 +30,7 @@ public TauCursor(BeatmapDifficulty difficulty)\n{\nthis.difficulty = difficulty;\n- angleRange = 90 - ((difficulty.CircleSize - 1) * 7.5f);\n+ angleRange = 90 - ((difficulty.CircleSize - 1) * 9f);\nOrigin = Anchor.Centre;\nAnchor = Anchor.Centre;\n@@ -140,7 +140,7 @@ public Paddle(float angleRange)\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\n- circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / (DrawHeight), .05f, .45f);\n+ circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / (DrawHeight), .015f, .485f);\nbottomLine.Height = -circle.Y - .015f;\ntopLine.Height = .5f + circle.Y - .015f;\nreturn base.OnMouseMove(e);\n" } ]
C#
MIT License
taulazer/tau
Fix wrong calculations in clamping
664,859
19.09.2020 18:46:26
14,400
3321203f684c7cf64d985f107926dae0c268f398
Utilise DifficultyRange() function for calculating angleRange
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -30,7 +30,7 @@ public TauCursor(BeatmapDifficulty difficulty)\n{\nthis.difficulty = difficulty;\n- angleRange = 90 - ((difficulty.CircleSize - 1) * 9f);\n+ angleRange = (float)BeatmapDifficulty.DifficultyRange(difficulty.CircleSize, 75, 25, 10);\nOrigin = Anchor.Centre;\nAnchor = Anchor.Centre;\n@@ -154,7 +154,7 @@ public class AbsoluteCursor : CursorContainer\nprotected override Drawable CreateCursor() => new CircularContainer\n{\n- Size = new Vector2(60),\n+ Size = new Vector2(40),\nOrigin = Anchor.Centre,\nChildren = new Drawable[]\n{\n" } ]
C#
MIT License
taulazer/tau
Utilise DifficultyRange() function for calculating angleRange
664,874
20.09.2020 09:54:03
-7,200
9796d70f9f2f4cb734ad609b834454a2ca919339
Prevent stick ring from intersecting with paddle To improve the visual aspect
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -140,7 +140,7 @@ public Paddle(float angleRange)\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\n- circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / (DrawHeight), .015f, .485f);\n+ circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / (DrawHeight), .015f, .45f);\nbottomLine.Height = -circle.Y - .015f;\ntopLine.Height = .5f + circle.Y - .015f;\nreturn base.OnMouseMove(e);\n" } ]
C#
MIT License
taulazer/tau
Prevent stick ring from intersecting with paddle To improve the visual aspect
664,863
10.10.2020 08:22:53
-28,800
17b82aa2f9a858a46ab282d34de49e6f65cb5328
Bump ppy.osu.Game to 2020.1009.0 Also fixes the obsoleted code errors introduced by this update.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Judgements/TauJudgement.cs", "new_path": "osu.Game.Rulesets.Tau/Judgements/TauJudgement.cs", "diff": "@@ -7,7 +7,7 @@ public class TauJudgement : Judgement\n{\npublic override HitResult MaxResult => HitResult.Great;\n- protected override int NumericResultFor(HitResult result)\n+ protected new int ToNumericResult(HitResult result)\n{\nswitch (result)\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -22,7 +22,7 @@ protected DrawableTauHitObject(TauHitObject obj)\n};\n/// <summary>\n- /// The action that caused this <see cref=\"DrawableHit\"/> to be hit.\n+ /// The action that caused HitObjects to be hit.\n/// </summary>\nprotected TauAction? HitAction { get; set; }\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Scoring/TauScoreProcessor.cs", "new_path": "osu.Game.Rulesets.Tau/Scoring/TauScoreProcessor.cs", "diff": "@@ -4,6 +4,7 @@ namespace osu.Game.Rulesets.Tau.Scoring\n{\npublic class TauScoreProcessor : ScoreProcessor\n{\n- public override HitWindows CreateHitWindows() => new TauHitWindows();\n+ // Method now obsoleted as of build 2020.1009.0\n+ // public override HitWindows CreateHitWindows() => new TauHitWindows();\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauDifficultyCalculator.cs", "new_path": "osu.Game.Rulesets.Tau/TauDifficultyCalculator.cs", "diff": "@@ -20,7 +20,7 @@ public class TauDifficultyCalculator : DifficultyCalculator\nStarRating = beatmap.BeatmapInfo.StarDifficulty,\nMods = mods,\nSkills = skills,\n- MaxCombo = beatmap.HitObjects.Count(),\n+ MaxCombo = beatmap.HitObjects.Count,\n};\nprotected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Array.Empty<DifficultyHitObject>();\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauSettingsSubsection.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauSettingsSubsection.cs", "diff": "@@ -27,19 +27,19 @@ private void load()\nnew SettingsCheckbox\n{\nLabelText = \"Show Visualizer\",\n- Bindable = config.GetBindable<bool>(TauRulesetSettings.ShowVisualizer)\n+ Current = config.GetBindable<bool>(TauRulesetSettings.ShowVisualizer)\n},\nnew SettingsSlider<float>\n{\nLabelText = \"Playfield dim\",\n- Bindable = config.GetBindable<float>(TauRulesetSettings.PlayfieldDim),\n+ Current = config.GetBindable<float>(TauRulesetSettings.PlayfieldDim),\nKeyboardStep = 0.01f,\nDisplayAsPercentage = true\n},\nnew SettingsSlider<float>\n{\nLabelText = \"Beat Size\",\n- Bindable = config.GetBindable<float>(TauRulesetSettings.BeatSize),\n+ Current = config.GetBindable<float>(TauRulesetSettings.BeatSize),\nKeyboardStep = 1f\n}\n};\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "new_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "diff": "<PropertyGroup>\n<AssemblyName>osu.Game.Rulesets.Tau</AssemblyName>\n</PropertyGroup>\n- <ItemGroup>\n- <EmbeddedResource Include=\"Resources\\**\"/>\n- </ItemGroup>\n- <ItemGroup>\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.923.0\"/>\n- </ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\" />\n<Folder Include=\"Resources\\Textures\" />\n</ItemGroup>\n+ <ItemGroup>\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.1009.0\" />\n+ </ItemGroup>\n</Project>\n" } ]
C#
MIT License
taulazer/tau
Bump ppy.osu.Game to 2020.1009.0 Also fixes the obsoleted code errors introduced by this update.
664,863
10.10.2020 15:17:19
-28,800
9991b1fd39020ba94b62dbe6db2a60883d2dea40
Fix editor selection handler code As well as included code changes requested in PR.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/TauSelectionHandler.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/TauSelectionHandler.cs", "diff": "@@ -8,14 +8,14 @@ public class TauSelectionHandler : SelectionHandler\n{\npublic override bool HandleMovement(MoveSelectionEvent moveEvent)\n{\n- foreach (var h in SelectedHitObjects.OfType<TauHitObject>())\n+ foreach (var h in EditorBeatmap.SelectedHitObjects.OfType<TauHitObject>())\n{\nif (h is HardBeat)\ncontinue;\nh.Angle = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(moveEvent.ScreenSpacePosition);\n- EditorBeatmap?.UpdateHitObject(h);\n+ EditorBeatmap?.Update(h);\n}\nreturn true;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -22,7 +22,7 @@ protected DrawableTauHitObject(TauHitObject obj)\n};\n/// <summary>\n- /// The action that caused HitObjects to be hit.\n+ /// The action that caused this <see cref=\"DrawableHit\"/> to be hit.\n/// </summary>\nprotected TauAction? HitAction { get; set; }\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Scoring/TauScoreProcessor.cs", "new_path": "osu.Game.Rulesets.Tau/Scoring/TauScoreProcessor.cs", "diff": "@@ -4,7 +4,5 @@ namespace osu.Game.Rulesets.Tau.Scoring\n{\npublic class TauScoreProcessor : ScoreProcessor\n{\n- // Method now obsoleted as of build 2020.1009.0\n- // public override HitWindows CreateHitWindows() => new TauHitWindows();\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "new_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "diff": "<AssemblyName>osu.Game.Rulesets.Tau</AssemblyName>\n</PropertyGroup>\n<ItemGroup>\n- <Folder Include=\"Resources\\Samples\\Gameplay\" />\n- <Folder Include=\"Resources\\Textures\" />\n+ <EmbeddedResource Include=\"Resources\\**\"/>\n</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"ppy.osu.Game\" Version=\"2020.1009.0\"/>\n</ItemGroup>\n+ <ItemGroup>\n+ <Folder Include=\"Resources\\Samples\\Gameplay\"/>\n+ <Folder Include=\"Resources\\Textures\"/>\n+ </ItemGroup>\n</Project>\n\\ No newline at end of file\n" } ]
C#
MIT License
taulazer/tau
Fix editor selection handler code As well as included code changes requested in PR.
664,874
10.10.2020 20:07:34
-7,200
4b724d69c5a807af3850cd3b91ad209df15db494
CodeFactor cleanup
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -17,10 +17,8 @@ namespace osu.Game.Rulesets.Tau.UI.Cursor\npublic class TauCursor : CompositeDrawable\n{\nprivate readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();\n- private readonly BeatmapDifficulty difficulty;\npublic override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n-\nprivate readonly float angleRange;\nprivate readonly Paddle paddle;\n@@ -28,8 +26,6 @@ public class TauCursor : CompositeDrawable\npublic TauCursor(BeatmapDifficulty difficulty)\n{\n- this.difficulty = difficulty;\n-\nangleRange = (float)BeatmapDifficulty.DifficultyRange(difficulty.CircleSize, 75, 25, 10);\nOrigin = Anchor.Centre;\n@@ -52,7 +48,7 @@ public bool CheckForValidation(DrawableTauHitObject h)\n{\ncase DrawableBeat beat:\nvar angleDiff = Extensions.GetDeltaAngle(paddle.Rotation, beat.HitObject.Angle);\n- return (Math.Abs(angleDiff) <= angleRange / 2);\n+ return Math.Abs(angleDiff) <= angleRange / 2;\ndefault:\nreturn true;\n@@ -97,7 +93,7 @@ public Paddle(float angleRange)\nRelativeSizeAxes = Axes.Both,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Current = new BindableDouble((double)(angleRange/360)),\n+ Current = new BindableDouble(angleRange/360),\nInnerRadius = 0.05f,\nRotation = -angleRange/2\n},\n@@ -140,7 +136,7 @@ public Paddle(float angleRange)\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\n- circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / (DrawHeight), .015f, .45f);\n+ circle.Y = -Math.Clamp(Vector2.Distance(AnchorPosition, e.MousePosition) / DrawHeight, .015f, .45f);\nbottomLine.Height = -circle.Y - .015f;\ntopLine.Height = .5f + circle.Y - .015f;\nreturn base.OnMouseMove(e);\n@@ -149,7 +145,6 @@ protected override bool OnMouseMove(MouseMoveEvent e)\npublic class AbsoluteCursor : CursorContainer\n{\n-\npublic override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\nprotected override Drawable CreateCursor() => new CircularContainer\n" } ]
C#
MIT License
taulazer/tau
CodeFactor cleanup
664,874
10.10.2020 20:11:49
-7,200
0d3c49984fa256e55ed9d70f771fd093572d7e79
Animate AbsoluteCursor
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -173,6 +173,12 @@ public class AbsoluteCursor : CursorContainer\n},\n}\n};\n+\n+ protected override void LoadComplete()\n+ {\n+ base.LoadComplete();\n+ ActiveCursor.Spin(3000, RotationDirection.Clockwise).Loop();\n+ }\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Animate AbsoluteCursor
664,874
10.10.2020 21:41:00
-7,200
be385196124605d2f028536f3fe84aa7c67c3d47
We can't convert maps that isn't std yet
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "@@ -12,7 +12,7 @@ namespace osu.Game.Rulesets.Tau.Beatmaps\n{\npublic class TauBeatmapConverter : BeatmapConverter<TauHitObject>\n{\n- public override bool CanConvert() => true;\n+ public override bool CanConvert() => Beatmap.HitObjects.All(h => h is IHasPosition);\npublic TauBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)\n: base(beatmap, ruleset)\n" } ]
C#
MIT License
taulazer/tau
We can't convert maps that isn't std yet
664,874
10.10.2020 21:46:48
-7,200
c57c15546cf272bd01e86984c1c859720972c31c
Don't show all judgements on results card
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "diff": "@@ -159,5 +159,15 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\npublic override HitObjectComposer CreateHitObjectComposer() => new TauHitObjectComposer(this);\npublic override IBeatmapProcessor CreateBeatmapProcessor(IBeatmap beatmap) => new BeatmapProcessor(beatmap);\n+\n+ protected override IEnumerable<HitResult> GetValidHitResults()\n+ {\n+ return new[]\n+ {\n+ HitResult.Great,\n+ HitResult.Good,\n+ HitResult.Miss,\n+ };\n+ }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Don't show all judgements on results card
664,874
11.10.2020 11:04:47
-7,200
e6cfcba0b5d51a35be562aad4c88a0117038ab8e
Switch from using HitResult.Good to HitResult.Ok This was causing problems when using classic skin, since std has recently changed from using "good" to using "ok"
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Scoring/TauHitWindows.cs", "new_path": "osu.Game.Rulesets.Tau/Scoring/TauHitWindows.cs", "diff": "@@ -9,7 +9,7 @@ public override bool IsHitResultAllowed(HitResult result)\nswitch (result)\n{\ncase HitResult.Great:\n- case HitResult.Good:\n+ case HitResult.Ok:\ncase HitResult.Miss:\nreturn true;\n}\n@@ -20,7 +20,7 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\nnew DifficultyRange(HitResult.Great, 140, 100, 60),\n- new DifficultyRange(HitResult.Good, 200, 150, 100),\n+ new DifficultyRange(HitResult.Ok, 200, 150, 100),\nnew DifficultyRange(HitResult.Miss, 400, 400, 400),\n};\n}\n" } ]
C#
MIT License
taulazer/tau
Switch from using HitResult.Good to HitResult.Ok This was causing problems when using classic skin, since std has recently changed from using "good" to using "ok"
664,872
17.10.2020 23:27:09
14,400
1005fe75df2637229b43d7946390692fd3818c8e
Add basic build instructions
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -71,8 +71,14 @@ git clone https://github.com/Altenhh/tau.git\ncd tau\n```\n-### Building the Gamemode\n-[SECTION WIP]\n+### Building the Gamemode From Source\n+To build Tao, you will need to have [.NET Core](https://dotnet.microsoft.com/download) installed on your computer.\n+\n+First, open a terminal and navigate to wherever you have the Tao source code downloaded. Once you are in the root of the repository, enter the directory named `osu.Game.Rulesets.Tau`.\n+\n+Next, run the command `dotnet build` and wait for the project to be built. This shouldn't take very long.\n+\n+Once the project has finished building, dotnet should tell you where the binary was built to (usually somewhere along the lines of ./tau/osu.Game.Rulesets.Tau/bin/Debug/netstandardx.x/). Find the .dll binary in the given location and follow the installation instructions above.\n## Contributions\nAll contributions are appreciated, as to improve the mode on its playability and functionality. As this gamemode isn't perfect, we would enjoy all additions to the code through bugfixing and ideas. Contributions should be done over an issue or a pull request, to give maintainers a chance to review changes to the codebase.\n" } ]
C#
MIT License
taulazer/tau
Add basic build instructions
664,859
24.10.2020 18:32:03
14,400
7c236c7fb68b5993f6d8d1b54a645d0ab065a542
Initial implementation of sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "diff": "@@ -35,6 +35,9 @@ public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(Tau\ncase Beat beat:\nreturn new DrawableBeat(beat);\n+ case Slider slider:\n+ return new DrawableSlider(slider);\n+\ndefault:\nreturn null;\n}\n" } ]
C#
MIT License
taulazer/tau
Initial implementation of sliders
664,859
25.10.2020 08:07:59
14,400
db63dfae5431007b13f3c7751e25d5a44e697467
Properly animate sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneSlider.cs", "new_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneSlider.cs", "diff": "@@ -56,6 +56,7 @@ private void testSingle(bool auto = false)\nnew SliderNode(500, 25),\nnew SliderNode(1000, 270),\nnew SliderNode(1500, 180),\n+ new SliderNode(2000, 190),\n}\n};\n" } ]
C#
MIT License
taulazer/tau
Properly animate sliders
664,874
25.10.2020 15:10:22
-3,600
6a2e6ca0bb44243804c926c5e1f1a867f864c106
Fix using the wrong formula
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -59,7 +59,7 @@ protected override void UpdateAfterChildren()\nforeach (var node in HitObject.Nodes.Reverse())\n{\n- var distanceFromCenter = (float)Math.Max(0, Time.Current - node.Time - HitObject.TimePreempt);\n+ var distanceFromCenter = (float)Math.Max(0, Time.Current - (HitObject.StartTime + node.Time) - HitObject.TimePreempt);\npath.AddVertex(Extensions.GetCircularPosition(distanceFromCenter, node.Angle));\n}\n" } ]
C#
MIT License
taulazer/tau
Fix using the wrong formula
664,874
25.10.2020 19:56:49
-3,600
f02b72d8b70ded177bcfec2a300f269230f2474f
Super basic WORKING implementation
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneSlider.cs", "new_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneSlider.cs", "diff": "@@ -53,10 +53,10 @@ private void testSingle(bool auto = false)\nStartTime = Time.Current + 1000,\nNodes = new[]\n{\n- new SliderNode(500, 25),\n- new SliderNode(1000, 270),\n- new SliderNode(1500, 180),\n- new SliderNode(2000, 190),\n+ new SliderNode(0, 25),\n+ new SliderNode(500, 270),\n+ new SliderNode(1000, 180),\n+ new SliderNode(1500, 190),\n}\n};\n" } ]
C#
MIT License
taulazer/tau
Super basic WORKING implementation
664,859
25.10.2020 17:11:08
14,400
49c6d48037a562c1cb3ff4044f172b70e5f27aab
Format update function
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -57,12 +57,10 @@ protected override void UpdateAfterChildren()\nbase.UpdateAfterChildren();\npath.ClearVertices();\n- bool ShouldBeCulled(SliderNode node)\n- {\n- return Time.Current > HitObject.StartTime + node.Time;\n- }\n+ bool shouldBeCulled(SliderNode node) =>\n+ Time.Current > HitObject.StartTime + node.Time;\n- var cullPivot = HitObject.Nodes.LastOrDefault(x => ShouldBeCulled(x));\n+ var cullPivot = HitObject.Nodes.LastOrDefault(shouldBeCulled);\nvar cullAmount = cullPivot is null ? 0 : HitObject.Nodes.IndexOf(cullPivot);\nConsole.WriteLine(cullAmount.ToString());\n@@ -76,18 +74,22 @@ bool ShouldBeCulled(SliderNode node)\nif (node == cullPivot)\n{\nvar nextNode = HitObject.Nodes.GetNext(node);\n+\nif (nextNode == null)\nbreak;\nfloat difference = (nextNode.Angle - node.Angle) % 360;\n+\nif (difference > 180) difference -= 360;\nelse if (difference < -180) difference += 360;\n+\ntargetAngle = (float)Interpolation.Lerp(node.Angle, node.Angle + difference, (Time.Current - intersectTime) / (nextNode.Time - node.Time));\n}\nfloat distanceFromCentre = (float)Math.Clamp((Time.Current - (intersectTime - HitObject.TimePreempt)) / HitObject.TimePreempt, 0, 1) * 384;\npath.AddVertex(Extensions.GetCircularPosition(distanceFromCentre, targetAngle));\n}\n+\npath.Position = path.Vertices.Any() ? path.Vertices.Last() : new Vector2(0);\npath.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.Last()) : base.OriginPosition;\n}\n" } ]
C#
MIT License
taulazer/tau
Format update function
664,874
26.10.2020 18:50:44
-3,600
c92e5d15a5aa7809981112455c86dd09e06e8917
make converts less BS
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "using osu.Framework.Extensions.IEnumerableExtensions;\nusing osu.Game.Audio;\nusing osu.Game.Beatmaps;\n+using osu.Game.Beatmaps.ControlPoints;\nusing osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Objects.Types;\nusing osu.Game.Rulesets.Tau.Objects;\n@@ -28,14 +29,15 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\nswitch (original)\n{\n- case IHasPath pathData:\n+ case IHasPathWithRepeats pathData:\nvar nodes = new List<SliderNode>();\n- foreach (var point in pathData.Path.ControlPoints)\n+ for (double t = 0; t < pathData.Duration; t += 20)\n{\n- var time = pathData.Duration / pathData.Path.ControlPoints.Count * pathData.Path.ControlPoints.IndexOf(point);\n- nodes.Add(new SliderNode((float)time, (position + point.Position.Value).GetHitObjectAngle()));\n+ nodes.Add(new SliderNode((float)t, ((original as IHasPosition).Position + pathData.CurvePositionAt(t / pathData.Duration)).GetHitObjectAngle()));\n}\n+ nodes.Add(new SliderNode((float)pathData.Duration, ((original as IHasPosition).Position + pathData.CurvePositionAt(1)).GetHitObjectAngle()));\n+\nreturn new Slider\n{\n@@ -68,5 +70,38 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\n}\nprotected override Beatmap<TauHitObject> CreateBeatmap() => new TauBeatmap();\n+\n+ private IEnumerable<SliderNode> createNodeFromTicks(HitObject original)\n+ {\n+ var curve = original as IHasPathWithRepeats;\n+ double spanDuration = curve.Duration / (curve.RepeatCount + 1);\n+ bool isRepeatSpam = spanDuration < 75 && curve.RepeatCount > 0;\n+\n+ if (isRepeatSpam)\n+ yield break;\n+\n+ var difficulty = Beatmap.BeatmapInfo.BaseDifficulty;\n+\n+ var controlPointInfo = Beatmap.ControlPointInfo;\n+ TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(original.StartTime);\n+ DifficultyControlPoint difficultyPoint = controlPointInfo.DifficultyPointAt(original.StartTime);\n+\n+ double scoringDistance = 100 * difficulty.SliderMultiplier * difficultyPoint.SpeedMultiplier;\n+\n+ var velocity = scoringDistance / timingPoint.BeatLength;\n+ var tickDistance = scoringDistance / difficulty.SliderTickRate;\n+\n+ double legacyLastTickOffset = (original as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0;\n+\n+ foreach (var e in SliderEventGenerator.Generate(original.StartTime, spanDuration, velocity, tickDistance, curve.Path.Distance, curve.RepeatCount + 1, legacyLastTickOffset, CancellationToken.None))\n+ {\n+ switch (e.Type)\n+ {\n+ case SliderEventType.Repeat:\n+ yield return new SliderNode((float)(e.Time - original.StartTime), Extensions.GetHitObjectAngle(curve.CurvePositionAt(e.PathProgress)));\n+ break;\n+ }\n+ }\n+ }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
make converts less BS
664,874
26.10.2020 19:34:53
-3,600
69fdbfa922e4688358886e476bfd27cfa4cdc8a6
Fix jitteriness of slider
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneSlider.cs", "new_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneSlider.cs", "diff": "@@ -53,10 +53,22 @@ private void testSingle(bool auto = false)\nStartTime = Time.Current + 1000,\nNodes = new[]\n{\n- new SliderNode(0, 25),\n- new SliderNode(500, 270),\n+ new SliderNode(0, 0),\n+ new SliderNode(500, 90),\nnew SliderNode(1000, 180),\n- new SliderNode(1500, 190),\n+ new SliderNode(1500, 270),\n+ new SliderNode(2000, 0),\n+ new SliderNode(2500, 90),\n+ new SliderNode(3000, 180),\n+ new SliderNode(3500, 270),\n+ new SliderNode(4000, 0),\n+ new SliderNode(4500, 90),\n+ new SliderNode(5000, 180),\n+ new SliderNode(5500, 270),\n+ new SliderNode(6000, 0),\n+ new SliderNode(6500, 90),\n+ new SliderNode(7000, 180),\n+ new SliderNode(7500, 270),\n}\n};\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -79,14 +79,10 @@ protected override void UpdateAfterChildren()\n// Anything before Time.Current is NOT VISIBLE\nList<Vector2> vertices = new List<Vector2>();\n- for (double t = Time.Current; t < Time.Current + HitObject.TimePreempt; t += 20) // Generate vertex every 20ms\n+ for (double t = Math.Max(Time.Current, HitObject.StartTime + HitObject.Nodes.First().Time); t < Math.Min(Time.Current + HitObject.TimePreempt, HitObject.StartTime + HitObject.Nodes.Last().Time); t += 20) // Generate vertex every 1ms\n{\nvar currentNode = HitObject.Nodes.LastOrDefault(x => t >= HitObject.StartTime + x.Time);\n- if (currentNode == null) continue; // This is to ensure shit breaks... Because at least it is a controlled breakage ;)\n-\nvar nextNode = HitObject.Nodes.GetNext(currentNode);\n- if (nextNode == null) break; // Can't break if you break it yourself. <Insert big brain meme here>\n-\ndouble nodeStart = HitObject.StartTime + currentNode.Time;\ndouble nodeEnd = HitObject.StartTime + nextNode.Time;\n@@ -107,6 +103,15 @@ protected override void UpdateAfterChildren()\nvertices.Add(Extensions.GetCircularPosition(distanceFromCentre, targetAngle));\n}\n+ //Check if the last node is visible\n+ if (Time.Current + HitObject.TimePreempt > HitObject.StartTime + HitObject.Nodes.Last().Time)\n+ {\n+ double timeDiff = HitObject.StartTime + HitObject.Nodes.Last().Time - Time.Current;\n+ double progress = 1 - (timeDiff / HitObject.TimePreempt);\n+\n+ vertices.Add(Extensions.GetCircularPosition((float)(progress * 384), HitObject.Nodes.Last().Angle));\n+ }\n+\nforeach (var v in vertices)\npath.AddVertex(v);\n" } ]
C#
MIT License
taulazer/tau
Fix jitteriness of slider
664,874
26.10.2020 19:47:37
-3,600
4d6780aeb68357ff66a438526969e41dcb8515c8
Don't convert short std sliders into Tau sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "@@ -30,6 +30,9 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\nswitch (original)\n{\ncase IHasPathWithRepeats pathData:\n+\n+ if (pathData.Duration < BeatmapDifficulty.DifficultyRange(Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate, 1800, 1200, 450) / 2)\n+ goto default;\nvar nodes = new List<SliderNode>();\nfor (double t = 0; t < pathData.Duration; t += 20)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -79,7 +79,9 @@ protected override void UpdateAfterChildren()\n// Anything before Time.Current is NOT VISIBLE\nList<Vector2> vertices = new List<Vector2>();\n- for (double t = Math.Max(Time.Current, HitObject.StartTime + HitObject.Nodes.First().Time); t < Math.Min(Time.Current + HitObject.TimePreempt, HitObject.StartTime + HitObject.Nodes.Last().Time); t += 20) // Generate vertex every 1ms\n+ for (double t = Math.Max(Time.Current, HitObject.StartTime + HitObject.Nodes.First().Time);\n+ t < Math.Min(Time.Current + HitObject.TimePreempt, HitObject.StartTime + HitObject.Nodes.Last().Time);\n+ t += 20) // Generate vertex every 1ms\n{\nvar currentNode = HitObject.Nodes.LastOrDefault(x => t >= HitObject.StartTime + x.Time);\nvar nextNode = HitObject.Nodes.GetNext(currentNode);\n" } ]
C#
MIT License
taulazer/tau
Don't convert short std sliders into Tau sliders
664,874
26.10.2020 20:20:12
-3,600
d6225f78d3791e1dc41655fc98f73ba49bc994fd
Simplify setting vertices on sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -74,7 +74,6 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nprotected override void UpdateAfterChildren()\n{\nbase.UpdateAfterChildren();\n- path.ClearVertices();\n// Anything before Time.Current is NOT VISIBLE\nList<Vector2> vertices = new List<Vector2>();\n@@ -113,9 +112,8 @@ protected override void UpdateAfterChildren()\nvertices.Add(Extensions.GetCircularPosition((float)(progress * 384), HitObject.Nodes.Last().Angle));\n}\n-\n- foreach (var v in vertices)\n- path.AddVertex(v);\n+ vertices.Reverse();\n+ path.Vertices = vertices;\npath.Position = path.Vertices.Any() ? path.Vertices.Last() : new Vector2(0);\npath.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.Last()) : base.OriginPosition;\n" } ]
C#
MIT License
taulazer/tau
Simplify setting vertices on sliders
664,874
26.10.2020 20:29:42
-3,600
133420392bd05e5a8257ab4000d4a85de7b304b2
Pass angle for validation instead of DHO
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "diff": "@@ -59,7 +59,7 @@ public void Update(Playfield playfield)\nvar play = (TauPlayfield)playfield;\n- if (tauHit.HitObject.HitWindows.CanBeHit(relativetime) && play.CheckIfWeCanValidate(tauHit))\n+ if (tauHit.HitObject.HitWindows.CanBeHit(relativetime) && play.CheckIfWeCanValidate(tauHit.HitObject.Angle))\nrequiresHit = true;\n}\nelse if (tauHit is DrawableHardBeat)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -92,7 +92,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nreturn;\n}\n- if (CheckValidation.Invoke(this))\n+ if (CheckValidation.Invoke(HitObject.Angle))\n{\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -10,7 +10,7 @@ protected DrawableTauHitObject(TauHitObject obj)\n{\n}\n- public Func<DrawableTauHitObject, bool> CheckValidation;\n+ public Func<float, bool> CheckValidation;\n/// <summary>\n/// A list of keys which can result in hits for this HitObject.\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -42,18 +42,11 @@ private void load(IBindable<WorkingBeatmap> beatmap)\nthis.beatmap.BindTo(beatmap);\n}\n- public bool CheckForValidation(DrawableTauHitObject h)\n+ public bool CheckForValidation(float angle)\n{\n- switch (h)\n- {\n- case DrawableBeat beat:\n- var angleDiff = Extensions.GetDeltaAngle(paddle.Rotation, beat.HitObject.Angle);\n+ var angleDiff = Extensions.GetDeltaAngle(paddle.Rotation, angle);\nreturn Math.Abs(angleDiff) <= angleRange / 2;\n-\n- default:\n- return true;\n- }\n}\nprotected override bool OnMouseMove(MouseMoveEvent e)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -119,7 +119,7 @@ private void updateVisuals()\nplayfieldBackground.FadeTo(PlayfieldDimLevel.Value, 100);\n}\n- public bool CheckIfWeCanValidate(DrawableTauHitObject obj) => cursor.CheckForValidation(obj);\n+ public bool CheckIfWeCanValidate(float angle) => cursor.CheckForValidation(angle);\npublic override void Add(DrawableHitObject h)\n{\n" } ]
C#
MIT License
taulazer/tau
Pass angle for validation instead of DHO
664,874
26.10.2020 20:52:20
-3,600
64333aceb758752da7d120457a85b211ad09d9ac
Implement player input in sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "using osu.Framework.Utils;\nusing osu.Game.Rulesets.Scoring;\nusing osuTK;\n+using osu.Game.Rulesets.Objects;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n@@ -55,21 +56,21 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\n{\nDebug.Assert(HitObject.HitWindows != null);\n- if (!userTriggered)\n+ if (Time.Current > HitObject.GetEndTime())\n{\n- if (!HitObject.HitWindows.CanBeHit(timeOffset))\n- ApplyResult(r => r.Type = HitResult.Great);\n+ double percentage = totalTimeHeld / HitObject.Duration;\n- return;\n- }\n-\n- var result = HitObject.HitWindows.ResultFor(timeOffset);\n+ HitResult result;\n- if (result == HitResult.None)\n- return;\n+ if (percentage > .66) result = HitResult.Great;\n+ else if (percentage > .33) result = HitResult.Ok;\n+ else result = HitResult.Miss;\nApplyResult(r => r.Type = result);\n}\n+ }\n+\n+ double totalTimeHeld = 0;\nprotected override void UpdateAfterChildren()\n{\n@@ -117,6 +118,14 @@ protected override void UpdateAfterChildren()\npath.Position = path.Vertices.Any() ? path.Vertices.Last() : new Vector2(0);\npath.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.Last()) : base.OriginPosition;\n+\n+ if ((CheckValidation?.Invoke(Vector2.Zero.GetDegreesFromPosition(path.Position)) ?? false) && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n+ {\n+ totalTimeHeld += Time.Elapsed;\n}\n}\n+\n+ private TauInputManager tauActionInputManager;\n+ internal TauInputManager TauActionInputManager => tauActionInputManager ??= GetContainingInputManager() as TauInputManager;\n+ }\n}\n" } ]
C#
MIT License
taulazer/tau
Implement player input in sliders
664,874
26.10.2020 22:15:52
-3,600
d26e7fa3c2bd54728825e336552b85abe5d68fc1
Only measure player hit percentage during HitObject active duration
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -41,7 +41,7 @@ public DrawableSlider(TauHitObject obj)\nAlpha = 0,\nAlwaysPresent = true\n},\n- path = new SmoothPath\n+ path = new Path\n{\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n@@ -119,6 +119,8 @@ protected override void UpdateAfterChildren()\npath.Position = path.Vertices.Any() ? path.Vertices.Last() : new Vector2(0);\npath.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.Last()) : base.OriginPosition;\n+ if (Time.Current < HitObject.StartTime || Time.Current >= HitObject.GetEndTime()) return;\n+\nif ((CheckValidation?.Invoke(Vector2.Zero.GetDegreesFromPosition(path.Position)) ?? false) && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n{\ntotalTimeHeld += Time.Elapsed;\n" } ]
C#
MIT License
taulazer/tau
Only measure player hit percentage during HitObject active duration
664,859
30.10.2020 13:40:54
14,400
aa47bf74b2647015fb6e29935f990d675bf97506
Fix ActiveCursor not rotating when rewound.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -180,10 +180,10 @@ public class AbsoluteCursor : CursorContainer\n}\n};\n- protected override void LoadComplete()\n+ protected override void UpdateAfterChildren()\n{\n- base.LoadComplete();\n- ActiveCursor.Spin(3000, RotationDirection.Clockwise).Loop();\n+ base.UpdateAfterChildren();\n+ ActiveCursor.Rotation += (float)Clock.ElapsedFrameTime / 5;\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix ActiveCursor not rotating when rewound.
664,874
31.10.2020 17:15:34
-3,600
f037da9ff1e2ae4487d9886d2547a2f8a46c0602
Decrease speed limit requirement of converted sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "@@ -42,10 +42,11 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\nfor (double t = 0; t < pathData.Duration; t += 20)\n{\nfloat angle = ((original as IHasPosition).Position + pathData.CurvePositionAt(t / pathData.Duration)).GetHitObjectAngle();\n- if (lastAngle.HasValue && (Math.Abs(Extensions.GetDeltaAngle(lastAngle.Value, angle)) / (float)Math.Abs(lastTime.Value - t)) > 0.9)\n- {\n+\n+ // We don't want sliders that switch angles too fast. We would default to a normal note in this case\n+ if (lastAngle.HasValue && (Math.Abs(Extensions.GetDeltaAngle(lastAngle.Value, angle)) / (float)Math.Abs(lastTime.Value - t)) > 0.6)\ngoto default;\n- }\n+\nlastAngle = angle;\nlastTime = t;\nnodes.Add(new SliderNode((float)t, angle));\n" } ]
C#
MIT License
taulazer/tau
Decrease speed limit requirement of converted sliders
664,874
31.10.2020 17:31:11
-3,600
480c6bdf8e569cba8869d089070a29c2f957908a
Add .gitattributes Mainly to automatically normalize the line endings, regardless of platform.
[ { "change_type": "ADD", "old_path": null, "new_path": ".gitattributes", "diff": "+# Autodetect text files and ensure that we normalise their\n+# line endings to lf internally. When checked out they may\n+# use different line endings.\n+* text=auto\n+\n+# Check out with crlf (Windows) line endings\n+*.sln text eol=crlf\n+*.csproj text eol=crlf\n+*.cs text diff=csharp eol=crlf\n+*.resx text eol=crlf\n+*.vsixmanifest text eol=crlf\n+packages.config text eol=crlf\n+App.config text eol=crlf\n+*.bat text eol=crlf\n+*.cmd text eol=crlf\n+*.snippet text eol=crlf\n+*.manifest text eol=crlf\n+*.licenseheader text eol=crlf\n+\n+# Check out with lf (UNIX) line endings\n+*.sh text eol=lf\n+.gitignore text eol=lf\n+.gitattributes text eol=lf\n+*.md text eol=lf\n+.travis.yml text eol=lf\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": ".gitignore", "new_path": ".gitignore", "diff": "@@ -24,14 +24,11 @@ bld/\n[Oo]bj/\n[Ll]og/\n-# Visual Studio 2015/2017 cache/options directory\n+# Visual Studio 2015 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n-# Visual Studio 2017 auto generated files\n-Generated\\ Files/\n-\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n@@ -45,29 +42,20 @@ TestResult.xml\n[Rr]eleasePS/\ndlldata.c\n-# Benchmark Results\n-BenchmarkDotNet.Artifacts/\n-\n# .NET Core\nproject.lock.json\nproject.fragment.lock.json\nartifacts/\n**/Properties/launchSettings.json\n-# StyleCop\n-StyleCopReport.xml\n-\n-# Files built by Visual Studio\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n-*.iobj\n*.pch\n*.pdb\n-*.ipdb\n*.pgc\n*.pgd\n*.rsp\n@@ -105,9 +93,6 @@ ipch/\n*.vspx\n*.sap\n-# Visual Studio Trace Files\n-*.e2e\n-\n# TFS 2012 Local Workspace\n$tf/\n@@ -128,10 +113,6 @@ _TeamCity*\n# DotCover is a Code Coverage Tool\n*.dotCover\n-# AxoCover is a Code Coverage Tool\n-.axoCover/*\n-!.axoCover/settings.json\n-\n# Visual Studio code coverage results\n*.coverage\n*.coveragexml\n@@ -167,7 +148,7 @@ publish/\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n-# Note: Comment the next line if you want to checkin your web deploy settings,\n+# TODO: Comment the next line if you want to checkin your web deploy settings\n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n@@ -180,11 +161,11 @@ PublishScripts/\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n-**/[Pp]ackages/*\n+**/packages/*\n# except build/, which is used as an MSBuild target.\n-!**/[Pp]ackages/build/\n+!**/packages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n-#!**/[Pp]ackages/repositories.config\n+#!**/packages/repositories.config\n# NuGet v3's project.json files produces more ignorable files\n*.nuget.props\n*.nuget.targets\n@@ -202,7 +183,6 @@ AppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n-*.appx\n# Visual Studio cache files\n# files ending in .cache can be ignored\n@@ -221,10 +201,6 @@ ClientBin/\n*.publishsettings\norleans.codegen.cs\n-# Including strong name files can present a security risk\n-# (https://github.com/github/gitignore/pull/2483#issue-259490424)\n-#*.snk\n-\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n@@ -239,8 +215,6 @@ _UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n-ServiceFabricBackup/\n-*.rptproj.bak\n# SQL Server files\n*.mdf\n@@ -251,7 +225,6 @@ ServiceFabricBackup/\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n-*.rptproj.rsuser\n# Microsoft Fakes\nFakesAssemblies/\n@@ -263,6 +236,9 @@ FakesAssemblies/\n.ntvs_analysis.dat\nnode_modules/\n+# Typescript v1 declaration files\n+typings/\n+\n# Visual Studio 6 build log\n*.plg\n@@ -302,9 +278,6 @@ __pycache__/\n# tools/**\n# !tools/packages.config\n-# Tabs Studio\n-*.tss\n-\n# Telerik's JustMock configuration file\n*.jmconfig\n@@ -313,18 +286,3 @@ __pycache__/\n*.btm.cs\n*.odx.cs\n*.xsd.cs\n-\n-# OpenCover UI analysis results\n-OpenCover/\n-\n-# Azure Stream Analytics local run output\n-ASALocalRun/\n-\n-# MSBuild Binary and Structured Log\n-*.binlog\n-\n-# NVidia Nsight GPU debugger configuration file\n-*.nvuser\n-\n-# MFractors (Xamarin productivity tool) working folder\n-.mfractor/\n" } ]
C#
MIT License
taulazer/tau
Add .gitattributes Mainly to automatically normalize the line endings, regardless of platform.
664,874
04.11.2020 23:02:11
-3,600
878b44a3b0c12aee155395eada9a0d4bb9e7fd70
Drastically improve performance of Sliders TIL that Path's autosize computations is fkin expensive.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -41,11 +41,13 @@ public DrawableSlider(TauHitObject obj)\nAlpha = 0,\nAlwaysPresent = true\n},\n- path = new Path\n+ path = new SmoothPath\n{\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nPathRadius = 5,\n+ AutoSizeAxes = Axes.None,\n+ Size = new Vector2(768)\n}\n}\n},\n" } ]
C#
MIT License
taulazer/tau
Drastically improve performance of Sliders TIL that Path's autosize computations is fkin expensive.
664,874
07.11.2020 14:13:35
-3,600
c589cac5708f7daeabea74d70c7dab3c0b0f5e07
Teach autoplay how to deal with sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "using System.Linq;\nusing osu.Game.Beatmaps;\nusing osu.Game.Replays;\n+using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Replays;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osuTK;\n@@ -49,10 +50,29 @@ public override Replay Generate()\ndouble releaseDelay = KEY_UP_DELAY;\nif (i + 1 < Beatmap.HitObjects.Count)\n- releaseDelay = Math.Min(KEY_UP_DELAY, Beatmap.HitObjects[i + 1].StartTime - h.StartTime);\n+ releaseDelay = Math.Min(KEY_UP_DELAY, Beatmap.HitObjects[i + 1].StartTime - h.GetEndTime());\nswitch (h)\n{\n+ case Slider slider:\n+ //Make the cursor stay at the last note's position if there's enough time between the notes\n+ if (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].GetEndTime() > reaction_time)\n+ {\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime - reaction_time, Extensions.GetCircularPosition(cursor_distance, prevAngle) + new Vector2(offset)));\n+\n+ buttonIndex = (int)TauAction.LeftButton;\n+ }\n+\n+ var buttonUsed = (TauAction)(buttonIndex++ % 2);\n+ foreach (var node in slider.Nodes)\n+ {\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime + node.Time, Extensions.GetCircularPosition(cursor_distance, node.Angle) + new Vector2(offset), buttonUsed));\n+ }\n+ Replay.Frames.Add(new TauReplayFrame(h.GetEndTime() + releaseDelay, ((TauReplayFrame)Replay.Frames.Last()).Position));\n+ prevAngle = slider.Nodes.Last().Angle;\n+\n+ break;\n+\ncase HardBeat _:\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, ((TauReplayFrame)Replay.Frames.Last()).Position, TauAction.HardButton));\nReplay.Frames.Add(new TauReplayFrame(h.StartTime + releaseDelay, ((TauReplayFrame)Replay.Frames.Last()).Position));\n@@ -61,7 +81,7 @@ public override Replay Generate()\ncase Beat _:\n//Make the cursor stay at the last note's position if there's enough time between the notes\n- if (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].StartTime > reaction_time)\n+ if (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].GetEndTime() > reaction_time)\n{\nReplay.Frames.Add(new TauReplayFrame(h.StartTime - reaction_time, Extensions.GetCircularPosition(cursor_distance, prevAngle) + new Vector2(offset)));\n" } ]
C#
MIT License
taulazer/tau
Teach autoplay how to deal with sliders
664,874
07.11.2020 14:15:50
-3,600
1fe44d57dc38ccd3080f99f1851d113104627bc8
Temporarily disable Hidden mod Sliders don't support them. The whole mod will need to be reworked from the ground up to support it,
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModHidden.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModHidden.cs", "diff": "@@ -19,6 +19,8 @@ public class TauModHidden : ModHidden\nprivate const double fade_in_duration_multiplier = 0.4;\nprivate const double fade_out_duration_multiplier = 0.3;\n+ public override bool HasImplementation => false;\n+\npublic override void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)\n{\nstatic void adjustFadeIn(TauHitObject h) => h.TimeFadeIn = h.TimePreempt * fade_in_duration_multiplier;\n" } ]
C#
MIT License
taulazer/tau
Temporarily disable Hidden mod Sliders don't support them. The whole mod will need to be reworked from the ground up to support it,
664,874
07.11.2020 14:28:26
-3,600
980416577a3a67640559872c16c9f637d0997e35
Add Slider support in RX mod Did a few things that I would consider a bit hacky, but the alternative is a mess.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModRelax.cs", "diff": "@@ -53,21 +53,28 @@ public void Update(Playfield playfield)\nif (tauHit.HitObject is IHasDuration hasEnd && time > hasEnd.EndTime || tauHit.IsHit)\ncontinue;\n- if (tauHit is DrawableBeat)\n+ switch (tauHit)\n{\n+ case DrawableBeat _:\nDebug.Assert(tauHit.HitObject.HitWindows != null);\nvar play = (TauPlayfield)playfield;\nif (tauHit.HitObject.HitWindows.CanBeHit(relativetime) && play.CheckIfWeCanValidate(tauHit.HitObject.Angle))\nrequiresHit = true;\n- }\n- else if (tauHit is DrawableHardBeat)\n- {\n+ break;\n+\n+ case DrawableHardBeat _:\nif (!tauHit.HitObject.HitWindows.CanBeHit(relativetime)) continue;\nrequiresHit = true;\nrequiresHardHit = true;\n+ break;\n+\n+ case DrawableSlider slider:\n+ if (slider.IsWithinPaddle)\n+ requiresHold = true;\n+ break;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -123,12 +123,14 @@ protected override void UpdateAfterChildren()\nif (Time.Current < HitObject.StartTime || Time.Current >= HitObject.GetEndTime()) return;\n- if ((CheckValidation?.Invoke(Vector2.Zero.GetDegreesFromPosition(path.Position)) ?? false) && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n+ if (IsWithinPaddle && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n{\ntotalTimeHeld += Time.Elapsed;\n}\n}\n+ public bool IsWithinPaddle => CheckValidation?.Invoke(Vector2.Zero.GetDegreesFromPosition(path.Position)) ?? false;\n+\nprivate TauInputManager tauActionInputManager;\ninternal TauInputManager TauActionInputManager => tauActionInputManager ??= GetContainingInputManager() as TauInputManager;\n}\n" } ]
C#
MIT License
taulazer/tau
Add Slider support in RX mod Did a few things that I would consider a bit hacky, but the alternative is a mess.
664,874
07.11.2020 17:15:09
-3,600
15887cfbd2b5ea6cd7ca09953c9fec37ff55c1cc
Adjust HitWindows
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Scoring/TauHitWindows.cs", "new_path": "osu.Game.Rulesets.Tau/Scoring/TauHitWindows.cs", "diff": "@@ -21,7 +21,7 @@ public override bool IsHitResultAllowed(HitResult result)\n{\nnew DifficultyRange(HitResult.Great, 140, 100, 60),\nnew DifficultyRange(HitResult.Ok, 200, 150, 100),\n- new DifficultyRange(HitResult.Miss, 400, 400, 400),\n+ new DifficultyRange(HitResult.Miss, 200, 150, 100),\n};\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Adjust HitWindows
664,874
07.11.2020 18:01:56
-3,600
d9bea2b26156ca7a72e08d57781cb7c4c982817a
Add notelock Implementation copied straight from osu!std, will tweak if required.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -27,5 +27,9 @@ protected DrawableTauHitObject(TauHitObject obj)\nprotected TauAction? HitAction { get; set; }\nprotected override double InitialLifetimeOffset => HitObject.TimePreempt;\n+\n+ public Func<DrawableHitObject, double, bool> CheckHittable;\n+\n+ public void MissForcefully() => ApplyResult(r => r.Type = r.Judgement.MinResult);\n}\n}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.Tau/UI/OrderedHitPolicy.cs", "diff": "+// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n+// See the LICENCE file in the repository root for full licence text.\n+\n+using System;\n+using System.Collections.Generic;\n+using osu.Game.Rulesets.Objects;\n+using osu.Game.Rulesets.Objects.Drawables;\n+using osu.Game.Rulesets.Tau.Objects.Drawables;\n+using osu.Game.Rulesets.UI;\n+\n+namespace osu.Game.Rulesets.Tau.UI\n+{\n+ /// <summary>\n+ /// Ensures that <see cref=\"HitObject\"/>s are hit in-order. Affectionately known as \"note lock\".\n+ /// If a <see cref=\"HitObject\"/> is hit out of order:\n+ /// <list type=\"number\">\n+ /// <item><description>The hit is blocked if it occurred earlier than the previous <see cref=\"HitObject\"/>'s start time.</description></item>\n+ /// <item><description>The hit causes all previous <see cref=\"HitObject\"/>s to missed otherwise.</description></item>\n+ /// </list>\n+ /// </summary>\n+ public class OrderedHitPolicy\n+ {\n+ private readonly HitObjectContainer hitObjectContainer;\n+\n+ public OrderedHitPolicy(HitObjectContainer hitObjectContainer)\n+ {\n+ this.hitObjectContainer = hitObjectContainer;\n+ }\n+\n+ /// <summary>\n+ /// Determines whether a <see cref=\"DrawableHitObject\"/> can be hit at a point in time.\n+ /// </summary>\n+ /// <param name=\"hitObject\">The <see cref=\"DrawableHitObject\"/> to check.</param>\n+ /// <param name=\"time\">The time to check.</param>\n+ /// <returns>Whether <paramref name=\"hitObject\"/> can be hit at the given <paramref name=\"time\"/>.</returns>\n+ public bool IsHittable(DrawableHitObject hitObject, double time)\n+ {\n+ DrawableHitObject blockingObject = null;\n+\n+ foreach (var obj in enumerateHitObjectsUpTo(hitObject.HitObject.StartTime))\n+ {\n+ if (hitObjectCanBlockFutureHits(obj))\n+ blockingObject = obj;\n+ }\n+\n+ // If there is no previous hitobject, allow the hit.\n+ if (blockingObject == null)\n+ return true;\n+\n+ // A hit is allowed if:\n+ // 1. The last blocking hitobject has been judged.\n+ // 2. The current time is after the last hitobject's start time.\n+ // Hits at exactly the same time as the blocking hitobject are allowed for maps that contain simultaneous hitobjects (e.g. /b/372245).\n+ return blockingObject.Judged || time >= blockingObject.HitObject.StartTime;\n+ }\n+\n+ /// <summary>\n+ /// Handles a <see cref=\"HitObject\"/> being hit to potentially miss all earlier <see cref=\"HitObject\"/>s.\n+ /// </summary>\n+ /// <param name=\"hitObject\">The <see cref=\"HitObject\"/> that was hit.</param>\n+ public void HandleHit(DrawableHitObject hitObject)\n+ {\n+ // Hitobjects which themselves don't block future hitobjects don't cause misses (e.g. slider ticks, spinners).\n+ if (!hitObjectCanBlockFutureHits(hitObject))\n+ return;\n+\n+ if (!IsHittable(hitObject, hitObject.HitObject.StartTime + hitObject.Result.TimeOffset))\n+ throw new InvalidOperationException($\"A {hitObject} was hit before it became hittable!\");\n+\n+ foreach (var obj in enumerateHitObjectsUpTo(hitObject.HitObject.StartTime))\n+ {\n+ if (obj.Judged)\n+ continue;\n+\n+ if (hitObjectCanBlockFutureHits(obj))\n+ ((DrawableTauHitObject)obj).MissForcefully();\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Whether a <see cref=\"HitObject\"/> blocks hits on future <see cref=\"HitObject\"/>s until its start time is reached.\n+ /// </summary>\n+ /// <param name=\"hitObject\">The <see cref=\"HitObject\"/> to test.</param>\n+ private static bool hitObjectCanBlockFutureHits(DrawableHitObject hitObject)\n+ => hitObject is DrawableBeat || hitObject is DrawableHardBeat;\n+\n+ private IEnumerable<DrawableHitObject> enumerateHitObjectsUpTo(double targetTime)\n+ {\n+ foreach (var obj in hitObjectContainer.AliveObjects)\n+ {\n+ if (obj.HitObject.StartTime >= targetTime)\n+ yield break;\n+\n+ yield return obj;\n+\n+ foreach (var nestedObj in obj.NestedHitObjects)\n+ {\n+ if (nestedObj.HitObject.StartTime >= targetTime)\n+ break;\n+\n+ yield return nestedObj;\n+ }\n+ }\n+ }\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -29,6 +29,7 @@ public class TauPlayfield : Playfield\nprivate readonly TauCursor cursor;\nprivate readonly JudgementContainer<DrawableTauJudgement> judgementLayer;\nprivate readonly Container<KiaiHitExplosion> kiaiExplosionContainer;\n+ private readonly OrderedHitPolicy hitPolicy;\npublic static readonly Vector2 BASE_SIZE = new Vector2(768, 768);\n@@ -97,6 +98,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)\nAnchor = Anchor.Centre,\n},\n});\n+ hitPolicy = new OrderedHitPolicy(HitObjectContainer);\n}\nprotected Bindable<float> PlayfieldDimLevel = new Bindable<float>(0.3f); // Change the default as you see fit\n@@ -127,9 +129,9 @@ public override void Add(DrawableHitObject h)\nswitch (h)\n{\n- case DrawableTauHitObject _:\n- var obj = (DrawableTauHitObject)h;\n+ case DrawableTauHitObject obj:\nobj.CheckValidation = CheckIfWeCanValidate;\n+ obj.CheckHittable = hitPolicy.IsHittable;\nbreak;\n}\n" } ]
C#
MIT License
taulazer/tau
Add notelock Implementation copied straight from osu!std, will tweak if required.
664,874
07.11.2020 18:08:06
-3,600
d28fd0ef55c852cf07b4b68886b40e7bd4f49d6d
Actually use notelock
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "@@ -96,7 +96,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\n{\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n- if (result == HitResult.None)\n+ if (result == HitResult.None || CheckHittable?.Invoke(this, Time.Current) == false)\nreturn;\nif (!validActionPressed)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "@@ -80,7 +80,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n- if (result == HitResult.None)\n+ if (result == HitResult.None || CheckHittable?.Invoke(this, Time.Current) == false)\nreturn;\nApplyResult(r => r.Type = result);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -144,6 +144,8 @@ public override void Add(DrawableHitObject h)\nprivate void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\n+ hitPolicy.HandleHit(judgedObject);\n+\nif (!judgedObject.DisplayResult || !DisplayJudgements.Value)\nreturn;\n" } ]
C#
MIT License
taulazer/tau
Actually use notelock
664,874
07.11.2020 18:48:08
-3,600
b9189d87d3b3927bf013d8f2411a4ac3e748e10e
Block input when catching notes This will prevent future notes from receiving the input that is meant for sliders.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "using osu.Game.Rulesets.Scoring;\nusing osuTK;\nusing osu.Game.Rulesets.Objects;\n+using osu.Framework.Input.Bindings;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n- public class DrawableSlider : DrawableTauHitObject\n+ public class DrawableSlider : DrawableTauHitObject, IKeyBindingHandler<TauAction>\n{\nprivate readonly Path path;\n@@ -121,14 +122,22 @@ protected override void UpdateAfterChildren()\npath.Position = path.Vertices.Any() ? path.Vertices.Last() : new Vector2(0);\npath.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.Last()) : base.OriginPosition;\n+ isBeingHit = false;\n+\nif (Time.Current < HitObject.StartTime || Time.Current >= HitObject.GetEndTime()) return;\nif (IsWithinPaddle && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n{\ntotalTimeHeld += Time.Elapsed;\n+ isBeingHit = true;\n}\n}\n+ private bool isBeingHit;\n+\n+ public bool OnPressed(TauAction action) => HitActions.Contains(action) && !isBeingHit;\n+ public void OnReleased(TauAction action) { }\n+\npublic bool IsWithinPaddle => CheckValidation?.Invoke(Vector2.Zero.GetDegreesFromPosition(path.Position)) ?? false;\nprivate TauInputManager tauActionInputManager;\n" } ]
C#
MIT License
taulazer/tau
Block input when catching notes This will prevent future notes from receiving the input that is meant for sliders.
664,874
11.11.2020 17:05:21
-3,600
823d72c377f7459a161a0f47d69bd8378bf486cc
Fix AbsoluteCursor rotation being reset whenever the cursor moves
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -59,7 +59,6 @@ public bool CheckForValidation(DrawableTauHitObject h)\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\npaddle.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\n- cursor.ActiveCursor.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\nreturn base.OnMouseMove(e);\n}\n@@ -183,7 +182,7 @@ public class AbsoluteCursor : CursorContainer\nprotected override void UpdateAfterChildren()\n{\nbase.UpdateAfterChildren();\n- ActiveCursor.Rotation += (float)Clock.ElapsedFrameTime / 5;\n+ ActiveCursor.Rotation += (float)Time.Elapsed / 5;\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix AbsoluteCursor rotation being reset whenever the cursor moves
664,874
14.11.2020 13:33:41
-3,600
e5fb91bd996070f0513986eefa079ccb65b8831e
Assign proper lifetimes to slider
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "using osuTK;\nusing osu.Game.Rulesets.Objects;\nusing osu.Framework.Input.Bindings;\n+using osu.Game.Rulesets.Objects.Drawables;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n@@ -138,6 +139,24 @@ protected override void UpdateAfterChildren()\npublic bool OnPressed(TauAction action) => HitActions.Contains(action) && !isBeingHit;\npublic void OnReleased(TauAction action) { }\n+ protected override void UpdateHitStateTransforms(ArmedState state)\n+ {\n+ base.UpdateHitStateTransforms(state);\n+\n+ switch (state)\n+ {\n+ case ArmedState.Idle:\n+ LifetimeStart = HitObject.StartTime - HitObject.TimePreempt;\n+\n+ break;\n+\n+ case ArmedState.Hit:\n+ case ArmedState.Miss:\n+ Expire();\n+ break;\n+ }\n+ }\n+\npublic bool IsWithinPaddle => CheckValidation?.Invoke(Vector2.Zero.GetDegreesFromPosition(path.Position)) ?? false;\nprivate TauInputManager tauActionInputManager;\n" } ]
C#
MIT License
taulazer/tau
Assign proper lifetimes to slider
664,874
14.11.2020 16:08:46
-3,600
07ac938988dfe008f3c4f2aa537f93e6abc815df
Reduce unnecessary reversal of vertices
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -79,15 +79,13 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nprotected override void UpdateAfterChildren()\n{\nbase.UpdateAfterChildren();\n-\n- // Anything before Time.Current is NOT VISIBLE\n- List<Vector2> vertices = new List<Vector2>();\n+ path.ClearVertices();\nfor (double t = Math.Max(Time.Current, HitObject.StartTime + HitObject.Nodes.First().Time);\nt < Math.Min(Time.Current + HitObject.TimePreempt, HitObject.StartTime + HitObject.Nodes.Last().Time);\n- t += 20) // Generate vertex every 1ms\n+ t += 20) // Generate vertex every 20ms\n{\n- var currentNode = HitObject.Nodes.LastOrDefault(x => t >= HitObject.StartTime + x.Time);\n+ var currentNode = HitObject.Nodes.Last(x => t >= HitObject.StartTime + x.Time);\nvar nextNode = HitObject.Nodes.GetNext(currentNode);\ndouble nodeStart = HitObject.StartTime + currentNode.Time;\n@@ -106,7 +104,7 @@ protected override void UpdateAfterChildren()\nfloat targetAngle = (float)Interpolation.Lerp(currentNode.Angle, currentNode.Angle + difference, ActualProgress);\n- vertices.Add(Extensions.GetCircularPosition(distanceFromCentre, targetAngle));\n+ path.AddVertex(Extensions.GetCircularPosition(distanceFromCentre, targetAngle));\n}\n//Check if the last node is visible\n@@ -115,13 +113,12 @@ protected override void UpdateAfterChildren()\ndouble timeDiff = HitObject.StartTime + HitObject.Nodes.Last().Time - Time.Current;\ndouble progress = 1 - (timeDiff / HitObject.TimePreempt);\n- vertices.Add(Extensions.GetCircularPosition((float)(progress * 384), HitObject.Nodes.Last().Angle));\n+ path.AddVertex(Extensions.GetCircularPosition((float)(progress * 384), HitObject.Nodes.Last().Angle));\n}\n- vertices.Reverse();\n- path.Vertices = vertices;\n- path.Position = path.Vertices.Any() ? path.Vertices.Last() : new Vector2(0);\n- path.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.Last()) : base.OriginPosition;\n+\n+ path.Position = path.Vertices.Any() ? path.Vertices.First() : new Vector2(0);\n+ path.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.First()) : base.OriginPosition;\nisBeingHit = false;\n" } ]
C#
MIT License
taulazer/tau
Reduce unnecessary reversal of vertices
664,874
16.11.2020 16:01:46
-3,600
78b4461147076c69a23d065972a3f947430a8dc7
Fix speed check not being applied to the last slider node in beatmapgen
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs", "diff": "@@ -51,8 +51,12 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\nlastTime = t;\nnodes.Add(new SliderNode((float)t, angle));\n}\n- nodes.Add(new SliderNode((float)pathData.Duration, ((original as IHasPosition).Position + pathData.CurvePositionAt(1)).GetHitObjectAngle()));\n+ float finalAngle = ((original as IHasPosition).Position + pathData.CurvePositionAt(1)).GetHitObjectAngle();\n+ if (lastAngle.HasValue && (Math.Abs(Extensions.GetDeltaAngle(lastAngle.Value, finalAngle)) / (float)Math.Abs(lastTime.Value - pathData.Duration)) > 0.6)\n+ goto default;\n+\n+ nodes.Add(new SliderNode((float)pathData.Duration, finalAngle));\nreturn new Slider\n{\n" } ]
C#
MIT License
taulazer/tau
Fix speed check not being applied to the last slider node in beatmapgen
664,874
21.11.2020 13:40:46
-3,600
c9fff90b01325b4f4991293087946b3089c85627
Fix FromLegacy in replay This caused desyncs when playing back replays
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauReplayFrame.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauReplayFrame.cs", "diff": "@@ -27,8 +27,8 @@ public void FromLegacy(LegacyReplayFrame currentFrame, IBeatmap beatmap, ReplayF\n{\nPosition = currentFrame.Position;\n- if (currentFrame.MouseLeft) Actions.Add(TauAction.LeftButton);\n- if (currentFrame.MouseRight) Actions.Add(TauAction.RightButton);\n+ if (currentFrame.MouseLeft1) Actions.Add(TauAction.LeftButton);\n+ if (currentFrame.MouseRight1) Actions.Add(TauAction.RightButton);\nif (currentFrame.MouseLeft2) Actions.Add(TauAction.HardButton);\n}\n" } ]
C#
MIT License
taulazer/tau
Fix FromLegacy in replay This caused desyncs when playing back replays
664,874
27.11.2020 19:51:08
-3,600
5ba9c5827f58b7f1914c0c0ea24bdcc80a2e1d58
Fix autoplay time machine
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "using System.Linq;\nusing osu.Game.Beatmaps;\nusing osu.Game.Replays;\n+using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Replays;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osuTK;\n@@ -42,6 +43,7 @@ public override Replay Generate()\nReplay.Frames.Add(new TauReplayFrame(Beatmap.HitObjects[0].StartTime - reaction_time, new Vector2(offset, offset + 150)));\nfloat prevAngle = 0;\n+ double lastTime = 0;\nfor (int i = 0; i < Beatmap.HitObjects.Count; i++)\n{\n@@ -56,12 +58,13 @@ public override Replay Generate()\ncase HardBeat _:\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, ((TauReplayFrame)Replay.Frames.Last()).Position, TauAction.HardButton));\nReplay.Frames.Add(new TauReplayFrame(h.StartTime + releaseDelay, ((TauReplayFrame)Replay.Frames.Last()).Position));\n+ lastTime = h.GetEndTime() + releaseDelay;\nbreak;\ncase Beat _:\n//Make the cursor stay at the last note's position if there's enough time between the notes\n- if (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].StartTime > reaction_time)\n+ if (i > 0 && h.StartTime - lastTime > reaction_time)\n{\nReplay.Frames.Add(new TauReplayFrame(h.StartTime - reaction_time, Extensions.GetCircularPosition(cursor_distance, prevAngle) + new Vector2(offset)));\n@@ -71,6 +74,7 @@ public override Replay Generate()\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, Extensions.GetCircularPosition(cursor_distance, h.Angle) + new Vector2(offset), (TauAction)(buttonIndex++ % 2)));\nReplay.Frames.Add(new TauReplayFrame(h.StartTime + releaseDelay, Extensions.GetCircularPosition(cursor_distance, h.Angle) + new Vector2(offset)));\nprevAngle = h.Angle;\n+ lastTime = h.GetEndTime() + releaseDelay;\nbreak;\n}\n" } ]
C#
MIT License
taulazer/tau
Fix autoplay time machine
664,874
28.11.2020 22:29:58
-3,600
f3e9dcb249a42e347cf4aca808c0e182af7c9b0f
Add validation and notelock delegates using playfield override
[ { "change_type": "DELETE", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauPool.cs", "new_path": null, "diff": "-using System;\n-using osu.Framework.Graphics;\n-using osu.Framework.Graphics.Pooling;\n-using osu.Game.Rulesets.Objects.Drawables;\n-\n-namespace osu.Game.Rulesets.Tau.Objects.Drawables\n-{\n- public class DrawableTauPool<T> : DrawablePool<T>\n- where T : DrawableHitObject, new()\n- {\n- private readonly Func<DrawableTauHitObject, bool> checkValidation;\n- private readonly Func<DrawableHitObject, double, bool> checkHittable;\n-\n- public DrawableTauPool(Func<DrawableTauHitObject, bool> checkValidation, Func<DrawableHitObject, double, bool> checkHittable, int initialSize, int? maximumSize = null)\n- : base(initialSize, maximumSize)\n- {\n- this.checkValidation = checkValidation;\n- this.checkHittable = checkHittable;\n- }\n-\n- protected override T CreateNewDrawable() => base.CreateNewDrawable().With(o =>\n- {\n- if (o is DrawableTauHitObject tauHitObject)\n- {\n- tauHitObject.CheckValidation += checkValidation;\n- tauHitObject.CheckHittable += checkHittable;\n- }\n- });\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -112,18 +112,19 @@ private void load(TauRulesetConfigManager config)\nconfig?.BindWith(TauRulesetSettings.PlayfieldDim, PlayfieldDimLevel);\nPlayfieldDimLevel.ValueChanged += _ => updateVisuals();\n- registerPool<Beat, DrawableBeat>(10);\n- registerPool<HardBeat, DrawableHardBeat>(5);\n+ RegisterPool<Beat, DrawableBeat>(10);\n+ RegisterPool<HardBeat, DrawableHardBeat>(5);\n}\n- private void registerPool<TObject, TDrawable>(int initialSize, int? maximumSize = null)\n- where TObject : HitObject\n- where TDrawable : DrawableHitObject, new()\n- => RegisterPool<TObject, TDrawable>(CreatePool<TDrawable>(initialSize, maximumSize));\n-\n- protected virtual DrawablePool<TDrawable> CreatePool<TDrawable>(int initialSize, int? maximumSize = null)\n- where TDrawable : DrawableHitObject, new()\n- => new DrawableTauPool<TDrawable>(CheckIfWeCanValidate, hitPolicy.IsHittable, initialSize, maximumSize);\n+ protected override void OnNewDrawableHitObject(DrawableHitObject drawableHitObject)\n+ {\n+ base.OnNewDrawableHitObject(drawableHitObject);\n+ if (drawableHitObject is DrawableTauHitObject t)\n+ {\n+ t.CheckHittable = hitPolicy.IsHittable;\n+ t.CheckValidation = CheckIfWeCanValidate;\n+ }\n+ }\nprotected override HitObjectLifetimeEntry CreateLifetimeEntry(HitObject hitObject) => new TauHitObjectLifetimeEntry(hitObject);\n" } ]
C#
MIT License
taulazer/tau
Add validation and notelock delegates using playfield override
664,874
29.11.2020 13:09:18
-3,600
300725551ad099d175343280bced141e1b2fb1b6
Fix Hidden mod
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModHidden.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModHidden.cs", "diff": "using System.Linq;\nusing osu.Framework.Graphics;\nusing osu.Game.Rulesets.Mods;\n+using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\n@@ -21,19 +22,24 @@ public class TauModHidden : ModHidden\npublic override void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)\n{\n- static void adjustFadeIn(TauHitObject h) => h.TimeFadeIn = h.TimePreempt * fade_in_duration_multiplier;\n+ foreach (var d in drawables)\n+ d.HitObjectApplied += applyFadeInAdjustment;\n- foreach (var d in drawables.OfType<DrawableTauHitObject>())\n+ base.ApplyToDrawableHitObjects(drawables);\n+ }\n+\n+ private void applyFadeInAdjustment(DrawableHitObject hitObject)\n{\n- adjustFadeIn(d.HitObject);\n+ if (!(hitObject is DrawableTauHitObject d))\n+ return;\n- foreach (var h in d.HitObject.NestedHitObjects.OfType<TauHitObject>())\n- adjustFadeIn(h); // future proofing\n- }\n+ d.HitObject.TimeFadeIn = d.HitObject.TimePreempt * fade_in_duration_multiplier;\n- base.ApplyToDrawableHitObjects(drawables);\n+ foreach (var nested in d.NestedHitObjects)\n+ applyFadeInAdjustment(nested);\n}\n+\nprotected override void ApplyNormalVisibilityState(DrawableHitObject drawable, ArmedState state)\n{\nif (!(drawable is DrawableTauHitObject d))\n" } ]
C#
MIT License
taulazer/tau
Fix Hidden mod
664,874
29.11.2020 13:11:28
-3,600
ca1d9b17a040689da59dcae0325200c40fd41016
Reimplement judgement text
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -102,6 +102,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)\n},\n});\nhitPolicy = new OrderedHitPolicy(HitObjectContainer);\n+ NewResult += onNewResult;\n}\nprotected Bindable<float> PlayfieldDimLevel = new Bindable<float>(0.3f); // Change the default as you see fit\n" } ]
C#
MIT License
taulazer/tau
Reimplement judgement text
664,874
29.11.2020 20:29:30
-3,600
5234aed9c90a6e836e16ff5b2ce705f34e1f54bb
Remove unused overload for "Add" in Playfield
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -142,22 +142,6 @@ private void updateVisuals()\npublic bool CheckIfWeCanValidate(DrawableTauHitObject obj) => cursor.CheckForValidation(obj);\n- public override void Add(DrawableHitObject h)\n- {\n- base.Add(h);\n-\n- switch (h)\n- {\n- case DrawableTauHitObject obj:\n- obj.CheckValidation = CheckIfWeCanValidate;\n- obj.CheckHittable = hitPolicy.IsHittable;\n-\n- break;\n- }\n-\n- h.OnNewResult += onNewResult;\n- }\n-\n[Resolved]\nprivate OsuColour colour { get; set; }\n" } ]
C#
MIT License
taulazer/tau
Remove unused overload for "Add" in Playfield
664,859
16.12.2020 06:05:33
18,000
e2a2359a7b425ec8e427e174f97e3b3a08d8b8e1
Add new kiai effect.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Configuration/TauRulesetConfigManager.cs", "new_path": "osu.Game.Rulesets.Tau/Configuration/TauRulesetConfigManager.cs", "diff": "@@ -17,6 +17,7 @@ protected override void InitialiseDefaults()\nSet(TauRulesetSettings.ShowVisualizer, true);\nSet(TauRulesetSettings.PlayfieldDim, 0.3f, 0, 1, 0.01f);\nSet(TauRulesetSettings.BeatSize, 16f, 10, 25, 1f);\n+ Set(TauRulesetSettings.KiaiEffect, KiaiType.Turbulent);\n}\n}\n@@ -24,6 +25,7 @@ public enum TauRulesetSettings\n{\nShowVisualizer,\nPlayfieldDim,\n- BeatSize\n+ BeatSize,\n+ KiaiEffect\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "new_path": "osu.Game.Rulesets.Tau/Edit/Blueprints/BeatPlacementBlueprint.cs", "diff": "@@ -55,9 +55,9 @@ protected override bool OnMouseDown(MouseDownEvent e)\nreturn base.OnMouseDown(e);\n}\n- public override void UpdatePosition(SnapResult result)\n+ public override void UpdateTimeAndPosition(SnapResult result)\n{\n- base.UpdatePosition(result);\n+ base.UpdateTimeAndPosition(result);\nvar angle = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(result.ScreenSpacePosition);\nHitObject.Angle = angle;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Diagnostics;\n+using osu.Framework.Allocation;\n+using osu.Framework.Bindables;\nusing osu.Framework.Extensions.IEnumerableExtensions;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osuTK;\nusing osu.Game.Rulesets.Objects;\nusing osu.Framework.Input.Bindings;\n+using osu.Framework.Timing;\n+using osu.Game.Graphics;\nusing osu.Game.Rulesets.Objects.Drawables;\n+using osu.Game.Rulesets.Tau.Configuration;\n+using osu.Game.Rulesets.Tau.UI;\n+using osu.Game.Rulesets.Tau.UI.Particles;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n@@ -22,6 +29,12 @@ public class DrawableSlider : DrawableTauHitObject, IKeyBindingHandler<TauAction\npublic new Slider HitObject => base.HitObject as Slider;\n+ [Resolved]\n+ private TauPlayfield playfield { get; set; }\n+\n+ [Resolved]\n+ private OsuColour colour { get; set; }\n+\npublic DrawableSlider(TauHitObject obj)\n: base(obj)\n{\n@@ -56,6 +69,14 @@ public DrawableSlider(TauHitObject obj)\n});\n}\n+ private readonly Bindable<KiaiType> effect = new Bindable<KiaiType>();\n+\n+ [BackgroundDependencyLoader(true)]\n+ private void load(TauRulesetConfigManager config)\n+ {\n+ config?.BindWith(TauRulesetSettings.KiaiEffect, effect);\n+ }\n+\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n{\nDebug.Assert(HitObject.HitWindows != null);\n@@ -99,6 +120,7 @@ protected override void UpdateAfterChildren()\n// Angle calc\nfloat difference = (nextNode.Angle - currentNode.Angle) % 360;\n+\nif (difference > 180) difference -= 360;\nelse if (difference < -180) difference += 360;\n@@ -116,7 +138,6 @@ protected override void UpdateAfterChildren()\npath.AddVertex(Extensions.GetCircularPosition((float)(progress * 384), HitObject.Nodes.Last().Angle));\n}\n-\npath.Position = path.Vertices.Any() ? path.Vertices.First() : new Vector2(0);\npath.OriginPosition = path.Vertices.Any() ? path.PositionInBoundingBox(path.Vertices.First()) : base.OriginPosition;\n@@ -128,13 +149,75 @@ protected override void UpdateAfterChildren()\n{\ntotalTimeHeld += Time.Elapsed;\nisBeingHit = true;\n+\n+ if (!HitObject.Kiai)\n+ return;\n+\n+ var angle = Vector2.Zero.GetDegreesFromPosition(path.Position);\n+ Drawable particle = Empty();\n+ const int duration = 1500;\n+\n+ switch (effect.Value)\n+ {\n+ case KiaiType.Turbulent:\n+ {\n+ for (int i = 0; i < 3; i++)\n+ {\n+ particle = new Particle\n+ {\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Position = Extensions.GetCircularPosition(380, angle),\n+ Velocity = Extensions.GetCircularPosition(380, randomBetween(angle - 40, angle + 40)),\n+ Size = new Vector2(RNG.NextSingle(1, 3)),\n+ Blending = BlendingParameters.Additive,\n+ Rotation = RNG.NextSingle(0, 360),\n+ Colour = TauPlayfield.ACCENT_COLOR,\n+ Clock = new FramedClock()\n+ };\n+ }\n+\n+ break;\n+ }\n+\n+ case KiaiType.Classic:\n+ particle = new Box\n+ {\n+ Position = Extensions.GetCircularPosition(380, angle),\n+ Rotation = (float)RNG.NextDouble() * 360f,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.BottomCentre,\n+ Size = new Vector2(RNG.Next(1, 10)),\n+ Clock = new FramedClock(),\n+ Blending = BlendingParameters.Additive,\n+ Colour = TauPlayfield.ACCENT_COLOR\n+ };\n+\n+ particle.MoveTo(Extensions.GetCircularPosition(RNG.NextSingle() * 50 + 390, angle), duration, Easing.OutQuint)\n+ .ResizeTo(new Vector2(RNG.NextSingle(0, 5)), duration, Easing.OutQuint);\n+\n+ break;\n+ }\n+\n+ particle.FadeOut(duration).Then().Expire();\n+ playfield.SliderParticleEmitter.Add(particle);\n+\n+ float randomBetween(float smallNumber, float bigNumber)\n+ {\n+ float diff = bigNumber - smallNumber;\n+\n+ return ((float)RNG.NextDouble() * diff) + smallNumber;\n+ }\n}\n}\nprivate bool isBeingHit;\npublic bool OnPressed(TauAction action) => HitActions.Contains(action) && !isBeingHit;\n- public void OnReleased(TauAction action) { }\n+\n+ public void OnReleased(TauAction action)\n+ {\n+ }\nprotected override void UpdateHitStateTransforms(ArmedState state)\n{\n@@ -150,6 +233,7 @@ protected override void UpdateHitStateTransforms(ArmedState state)\ncase ArmedState.Hit:\ncase ArmedState.Miss:\nExpire();\n+\nbreak;\n}\n}\n" }, { "change_type": "RENAME", "old_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualization.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Components/PlayfieldVisualisation.cs", "diff": "" }, { "change_type": "RENAME", "old_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/UI/DrawableTauRuleset.cs", "diff": "" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauSettingsSubsection.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauSettingsSubsection.cs", "diff": "@@ -41,6 +41,11 @@ private void load()\nLabelText = \"Beat Size\",\nCurrent = config.GetBindable<float>(TauRulesetSettings.BeatSize),\nKeyboardStep = 1f\n+ },\n+ new SettingsEnumDropdown<KiaiType>\n+ {\n+ LabelText = \"Kiai Effect\",\n+ Current = config.GetBindable<KiaiType>(TauRulesetSettings.KiaiEffect),\n}\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "new_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\" />\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.1121.0\"/>\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.1216.0\" />\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\" />\n" } ]
C#
MIT License
taulazer/tau
Add new kiai effect.
664,874
16.12.2020 13:56:39
-3,600
a56b22ba2e1e94c7afccec12c8c477285dcf8313
Reduce particle amount for now
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -192,7 +192,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nswitch (effect.Value)\n{\ncase KiaiType.Turbulent:\n- for (int i = 0; i < 20; i++)\n+ for (int i = 0; i < 10; i++)\n{\nSliderParticleEmitter.AddParticle(sAngle, result.Type);\n}\n@@ -224,7 +224,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nswitch (effect.Value)\n{\ncase KiaiType.Turbulent:\n- for (int i = 0; i < 20; i++)\n+ for (int i = 0; i < 10; i++)\n{\nSliderParticleEmitter.AddParticle(angle, result.Type);\n}\n@@ -254,7 +254,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nswitch (effect.Value)\n{\ncase KiaiType.Turbulent:\n- for (int i = 0; i < 300; i++)\n+ for (int i = 0; i < 100; i++)\n{\nvar randomAngle = RNG.NextSingle(0, 360);\n" } ]
C#
MIT License
taulazer/tau
Reduce particle amount for now
664,874
16.12.2020 16:47:32
-3,600
34ec9c747ccd378a26b56ebd1678a36d879975fb
Pool sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -22,6 +22,10 @@ public class DrawableSlider : DrawableTauHitObject, IKeyBindingHandler<TauAction\npublic new Slider HitObject => base.HitObject as Slider;\n+ public DrawableSlider() : this(null)\n+ {\n+ }\n+\npublic DrawableSlider(TauHitObject obj)\n: base(obj)\n{\n@@ -56,6 +60,12 @@ public DrawableSlider(TauHitObject obj)\n});\n}\n+ protected override void OnApply()\n+ {\n+ base.OnApply();\n+ totalTimeHeld = 0;\n+ }\n+\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n{\nDebug.Assert(HitObject.HitWindows != null);\n@@ -144,7 +154,6 @@ protected override void UpdateHitStateTransforms(ArmedState state)\n{\ncase ArmedState.Idle:\nLifetimeStart = HitObject.StartTime - HitObject.TimePreempt;\n-\nbreak;\ncase ArmedState.Hit:\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "@@ -57,7 +57,7 @@ public override Replay Generate()\n{\ncase Slider slider:\n//Make the cursor stay at the last note's position if there's enough time between the notes\n- if (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].GetEndTime() > reaction_time)\n+ if (i > 0 && h.StartTime - lastTime > reaction_time)\n{\nReplay.Frames.Add(new TauReplayFrame(h.StartTime - reaction_time, Extensions.GetCircularPosition(cursor_distance, prevAngle) + new Vector2(offset)));\n@@ -71,6 +71,7 @@ public override Replay Generate()\n}\nReplay.Frames.Add(new TauReplayFrame(h.GetEndTime() + releaseDelay, ((TauReplayFrame)Replay.Frames.Last()).Position));\nprevAngle = slider.Nodes.Last().Angle;\n+ lastTime = h.GetEndTime() + releaseDelay;\nbreak;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauDrawableRuleset.cs", "diff": "@@ -25,11 +25,7 @@ public DrawableTauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n- public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h)\n- {\n- if (h is Slider) return new DrawableSlider(h);\n- return null;\n- }\n+ public override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h) => null;\nprotected override PassThroughInputManager CreateInputManager() => new TauInputManager(Ruleset?.RulesetInfo);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -117,6 +117,7 @@ private void load(TauRulesetConfigManager config)\nRegisterPool<Beat, DrawableBeat>(10);\nRegisterPool<HardBeat, DrawableHardBeat>(5);\n+ RegisterPool<Slider, DrawableSlider>(3);\n}\nprotected override void OnNewDrawableHitObject(DrawableHitObject drawableHitObject)\n" } ]
C#
MIT License
taulazer/tau
Pool sliders
664,874
18.12.2020 22:47:33
-3,600
4360633eef4d8368cc2c49b7aa7fdd8eed0f4413
Add basic slider feedback
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "using osu.Game.Rulesets.Objects;\nusing osu.Framework.Input.Bindings;\nusing osu.Game.Rulesets.Objects.Drawables;\n+using osu.Framework.Allocation;\n+using osu.Game.Rulesets.Tau.UI;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n@@ -22,6 +24,9 @@ public class DrawableSlider : DrawableTauHitObject, IKeyBindingHandler<TauAction\npublic new Slider HitObject => base.HitObject as Slider;\n+ [Resolved]\n+ private TauPlayfield playfield { get; set; }\n+\npublic DrawableSlider() : this(null)\n{\n}\n@@ -136,9 +141,17 @@ protected override void UpdateAfterChildren()\nif (IsWithinPaddle && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n{\n+ playfield.CreateSliderEffect(Vector2.Zero.GetDegreesFromPosition(path.Position), HitObject.Kiai);\ntotalTimeHeld += Time.Elapsed;\nisBeingHit = true;\n}\n+\n+ if (AllJudged) return;\n+\n+ if (isBeingHit)\n+ playfield.AdjustRingGlow((float)(totalTimeHeld / HitObject.Duration));\n+ else\n+ playfield.AdjustRingGlow(0);\n}\nprivate bool isBeingHit;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -19,7 +19,7 @@ public class KiaiHitExplosion : CompositeDrawable\n/// </summary>\npublic float Angle;\n- public KiaiHitExplosion(Color4 colour, bool circular = false)\n+ public KiaiHitExplosion(Color4 colour, bool circular = false, int particleAmount = 10)\n{\nthis.circular = circular;\nvar rng = new Random();\n@@ -30,9 +30,7 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\nif (circular)\n{\n- const int particle_count = 50;\n-\n- for (int i = 0; i < particle_count; i++)\n+ for (int i = 0; i < particleAmount; i++)\n{\nparticles.Add(new Box\n{\n@@ -48,9 +46,7 @@ public KiaiHitExplosion(Color4 colour, bool circular = false)\n}\nelse\n{\n- const int particle_count = 10;\n-\n- for (int i = 0; i < particle_count; i++)\n+ for (int i = 0; i < particleAmount; i++)\n{\nparticles.Add(new Box\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Framework.Extensions.Color4Extensions;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\n+using osu.Framework.Graphics.Effects;\nusing osu.Framework.Graphics.Pooling;\nusing osu.Framework.Graphics.Shapes;\nusing osu.Game.Beatmaps;\n@@ -41,6 +42,8 @@ public class TauPlayfield : Playfield\npublic override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n+ private readonly CircularContainer ring;\n+\npublic TauPlayfield(BeatmapDifficulty difficulty)\n{\nRelativeSizeAxes = Axes.None;\n@@ -73,7 +76,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)\nOrigin = Anchor.Centre,\nChildren = new Drawable[]\n{\n- new CircularContainer\n+ ring= new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\nAnchor = Anchor.Centre,\n@@ -81,6 +84,12 @@ public TauPlayfield(BeatmapDifficulty difficulty)\nMasking = true,\nBorderThickness = 3,\nBorderColour = ACCENT_COLOR.Opacity(0.5f),\n+ EdgeEffect = new EdgeEffectParameters{\n+ Hollow = true,\n+ Colour = Color4.Transparent,\n+ Radius = 20,\n+ Type = EdgeEffectType.Glow,\n+ },\nChild = new Box\n{\nRelativeSizeAxes = Axes.Both,\n@@ -149,6 +158,28 @@ private void updateVisuals()\n[Resolved]\nprivate OsuColour colour { get; set; }\n+ public void CreateSliderEffect(float angle, bool kiai)\n+ {\n+ if ((int)Time.Current % (kiai ? 8 : 16) != 0) return;\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(ACCENT_COLOR, particleAmount: 1)\n+ {\n+ Position = Extensions.GetCircularPosition(.5f, angle),\n+ Angle = angle,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre\n+ });\n+ }\n+\n+ private float cacheProgress;\n+ public void AdjustRingGlow(float progress)\n+ {\n+ if (cacheProgress == progress) return;\n+ cacheProgress = progress;\n+ ring.FinishTransforms();\n+ ring.FadeEdgeEffectTo(ACCENT_COLOR.Opacity(progress), progress == 0 ? 200 : 0);\n+ }\n+\n+\nprivate void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\nhitPolicy.HandleHit(judgedObject);\n@@ -165,6 +196,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nswitch (judgedObject)\n{\ncase DrawableSlider slider:\n+ ring.FadeEdgeEffectTo(ACCENT_COLOR.Opacity(0), 200);\nvar sAngle = slider.HitObject.Nodes.Last().Angle;\nexplosion.Position = Extensions.GetCircularPosition(.6f, sAngle);\nexplosion.Rotation = sAngle;\n" } ]
C#
MIT License
taulazer/tau
Add basic slider feedback
664,874
20.12.2020 13:56:50
-3,600
95c7f659296715ef214a9ff9960f0fb6645f32d9
Localized fade effect while hitting sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -149,9 +149,9 @@ protected override void UpdateAfterChildren()\nif (AllJudged) return;\nif (isBeingHit)\n- playfield.AdjustRingGlow((float)(totalTimeHeld / HitObject.Duration));\n+ playfield.AdjustRingGlow((float)(totalTimeHeld / HitObject.Duration), Vector2.Zero.GetDegreesFromPosition(path.Position));\nelse\n- playfield.AdjustRingGlow(0);\n+ playfield.AdjustRingGlow(0, Vector2.Zero.GetDegreesFromPosition(path.Position));\n}\nprivate bool isBeingHit;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "using osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.Cursor;\nusing osu.Framework.Graphics.Shapes;\n+using osu.Framework.Graphics.Textures;\nusing osu.Framework.Graphics.UserInterface;\nusing osu.Framework.Input.Events;\nusing osu.Game.Beatmaps;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osuTK;\nusing osuTK.Graphics;\n+using SixLabors.ImageSharp;\n+using SixLabors.ImageSharp.PixelFormats;\nnamespace osu.Game.Rulesets.Tau.UI.Cursor\n{\n@@ -21,8 +24,7 @@ public class TauCursor : CompositeDrawable\nprivate readonly float angleRange;\n- private readonly Paddle paddle;\n- private readonly AbsoluteCursor cursor;\n+ public readonly Paddle PaddleDrawable;\npublic TauCursor(BeatmapDifficulty difficulty)\n{\n@@ -32,8 +34,8 @@ public TauCursor(BeatmapDifficulty difficulty)\nAnchor = Anchor.Centre;\nRelativeSizeAxes = Axes.Both;\n- AddInternal(paddle = new Paddle(angleRange));\n- AddInternal(cursor = new AbsoluteCursor());\n+ AddInternal(PaddleDrawable = new Paddle(angleRange));\n+ AddInternal(new AbsoluteCursor());\n}\n[BackgroundDependencyLoader]\n@@ -44,14 +46,14 @@ private void load(IBindable<WorkingBeatmap> beatmap)\npublic bool CheckForValidation(float angle)\n{\n- var angleDiff = Extensions.GetDeltaAngle(paddle.Rotation, angle);\n+ var angleDiff = Extensions.GetDeltaAngle(PaddleDrawable.Rotation, angle);\nreturn Math.Abs(angleDiff) <= angleRange / 2;\n}\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\n- paddle.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\n+ PaddleDrawable.Rotation = ScreenSpaceDrawQuad.Centre.GetDegreesFromPosition(e.ScreenSpaceMousePosition);\nreturn base.OnMouseMove(e);\n}\n@@ -64,6 +66,8 @@ public class Paddle : CompositeDrawable\nprivate readonly Box bottomLine;\nprivate readonly CircularContainer circle;\n+ public readonly PaddleGlow Glow;\n+\npublic Paddle(float angleRange)\n{\nRelativeSizeAxes = Axes.Both;\n@@ -77,12 +81,15 @@ public Paddle(float angleRange)\nnew CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\n- Masking = true,\n+ //Masking = true,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nColour = TauPlayfield.ACCENT_COLOR,\nChildren = new Drawable[]\n{\n+ Glow = new PaddleGlow(angleRange){\n+ Alpha = 0\n+ },\nnew CircularProgress\n{\nRelativeSizeAxes = Axes.Both,\n@@ -90,7 +97,7 @@ public Paddle(float angleRange)\nOrigin = Anchor.Centre,\nCurrent = new BindableDouble(angleRange / 360),\nInnerRadius = 0.05f,\n- Rotation = -angleRange / 2\n+ Rotation = -angleRange / 2,\n},\nbottomLine = new Box\n{\n@@ -178,5 +185,60 @@ protected override void UpdateAfterChildren()\nActiveCursor.Rotation += (float)Time.Elapsed / 5;\n}\n}\n+\n+ public class PaddleGlow : CompositeDrawable\n+ {\n+ private readonly Texture gradientTextureBoth;\n+ public PaddleGlow(float angleRange)\n+ {\n+ const int width = 128;\n+\n+ var image = new Image<Rgba32>(width, width);\n+\n+ gradientTextureBoth = new Texture(width, width, true);\n+\n+ for (int i = 0; i < width; ++i)\n+ {\n+ for (int j = 0; j < width; ++j)\n+ {\n+ float brightness = (float)i / (width - 1);\n+ float brightness2 = (float)j / (width - 1);\n+ image[i, j] = new Rgba32(\n+ 255,\n+ 255,\n+ 255,\n+ (byte)(255 - (1 + brightness2 - brightness) / 2 * 255));\n+ }\n+ }\n+\n+ gradientTextureBoth.SetData(new TextureUpload(image));\n+\n+ RelativeSizeAxes = Axes.Both;\n+ Size = new Vector2(1.5f);\n+ Anchor = Anchor.Centre;\n+ Origin = Anchor.Centre;\n+ InternalChildren = new Drawable[]{\n+ new CircularProgress{\n+ RelativeSizeAxes = Axes.Both,\n+ Size = new Vector2(.675f),\n+ InnerRadius = 0.005f,\n+ Rotation = -5f,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Current = new BindableDouble(10f/ 360),\n+ },\n+ new CircularProgress\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ InnerRadius = 0.325f,\n+ Rotation = -5f,\n+ Texture = gradientTextureBoth,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Current = new BindableDouble(10f / 360),\n+ }\n+ };\n+ }\n+ }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -84,12 +84,6 @@ public TauPlayfield(BeatmapDifficulty difficulty)\nMasking = true,\nBorderThickness = 3,\nBorderColour = ACCENT_COLOR.Opacity(0.5f),\n- EdgeEffect = new EdgeEffectParameters{\n- Hollow = true,\n- Colour = Color4.Transparent,\n- Radius = 20,\n- Type = EdgeEffectType.Glow,\n- },\nChild = new Box\n{\nRelativeSizeAxes = Axes.Both,\n@@ -171,12 +165,13 @@ public void CreateSliderEffect(float angle, bool kiai)\n}\nprivate float cacheProgress;\n- public void AdjustRingGlow(float progress)\n+ public void AdjustRingGlow(float progress, float angle)\n{\nif (cacheProgress == progress) return;\ncacheProgress = progress;\n- ring.FinishTransforms();\n- ring.FadeEdgeEffectTo(ACCENT_COLOR.Opacity(progress), progress == 0 ? 200 : 0);\n+ cursor.PaddleDrawable.Glow.FinishTransforms();\n+ cursor.PaddleDrawable.Glow.FadeTo(progress, progress == 0 ? 200 : 0);\n+ cursor.PaddleDrawable.Glow.Rotation = angle - cursor.PaddleDrawable.Rotation;\n}\n@@ -196,7 +191,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nswitch (judgedObject)\n{\ncase DrawableSlider slider:\n- ring.FadeEdgeEffectTo(ACCENT_COLOR.Opacity(0), 200);\n+ cursor.PaddleDrawable.Glow.FadeOut(200);\nvar sAngle = slider.HitObject.Nodes.Last().Angle;\nexplosion.Position = Extensions.GetCircularPosition(.6f, sAngle);\nexplosion.Rotation = sAngle;\n" } ]
C#
MIT License
taulazer/tau
Localized fade effect while hitting sliders
664,859
21.12.2020 11:17:27
18,000
acdf19393b6665e2c5f57e49d937ad4a1180432e
Animate angle on glow.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -87,7 +87,8 @@ public Paddle(float angleRange)\nColour = TauPlayfield.ACCENT_COLOR,\nChildren = new Drawable[]\n{\n- Glow = new PaddleGlow(angleRange){\n+ Glow = new PaddleGlow(angleRange)\n+ {\nAlpha = 0\n},\nnew CircularProgress\n@@ -188,14 +189,13 @@ protected override void UpdateAfterChildren()\npublic class PaddleGlow : CompositeDrawable\n{\n- private readonly Texture gradientTextureBoth;\npublic PaddleGlow(float angleRange)\n{\nconst int width = 128;\nvar image = new Image<Rgba32>(width, width);\n- gradientTextureBoth = new Texture(width, width, true);\n+ var gradientTextureBoth = new Texture(width, width, true);\nfor (int i = 0; i < width; ++i)\n{\n@@ -203,6 +203,7 @@ public PaddleGlow(float angleRange)\n{\nfloat brightness = (float)i / (width - 1);\nfloat brightness2 = (float)j / (width - 1);\n+\nimage[i, j] = new Rgba32(\n255,\n255,\n@@ -217,17 +218,20 @@ public PaddleGlow(float angleRange)\nSize = new Vector2(1.5f);\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n- InternalChildren = new Drawable[]{\n- new CircularProgress{\n+\n+ InternalChildren = new Drawable[]\n+ {\n+ Line = new CircularProgress\n+ {\nRelativeSizeAxes = Axes.Both,\n- Size = new Vector2(.675f),\n- InnerRadius = 0.005f,\n+ Size = new Vector2(.68f),\n+ InnerRadius = 0.01f,\nRotation = -5f,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Current = new BindableDouble(10f/ 360),\n+ Current = new BindableDouble(8f / 360),\n},\n- new CircularProgress\n+ Glow = new CircularProgress\n{\nRelativeSizeAxes = Axes.Both,\nInnerRadius = 0.325f,\n@@ -235,10 +239,13 @@ public PaddleGlow(float angleRange)\nTexture = gradientTextureBoth,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Current = new BindableDouble(10f / 360),\n+ Current = new BindableDouble(8f / 360),\n}\n};\n}\n+\n+ public CircularProgress Line;\n+ public CircularProgress Glow;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Framework.Extensions.Color4Extensions;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\n-using osu.Framework.Graphics.Effects;\n-using osu.Framework.Graphics.Pooling;\nusing osu.Framework.Graphics.Shapes;\n+using osu.Framework.Utils;\nusing osu.Game.Beatmaps;\nusing osu.Game.Beatmaps.ControlPoints;\nusing osu.Game.Graphics;\n@@ -155,6 +154,7 @@ private void updateVisuals()\npublic void CreateSliderEffect(float angle, bool kiai)\n{\nif ((int)Time.Current % (kiai ? 8 : 16) != 0) return;\n+\nkiaiExplosionContainer.Add(new KiaiHitExplosion(ACCENT_COLOR, particleAmount: 1)\n{\nPosition = Extensions.GetCircularPosition(.5f, angle),\n@@ -165,15 +165,23 @@ public void CreateSliderEffect(float angle, bool kiai)\n}\nprivate float cacheProgress;\n+\npublic void AdjustRingGlow(float progress, float angle)\n{\nif (cacheProgress == progress) return;\ncacheProgress = progress;\n- cursor.PaddleDrawable.Glow.FinishTransforms();\n- cursor.PaddleDrawable.Glow.FadeTo(progress, progress == 0 ? 200 : 0);\n- cursor.PaddleDrawable.Glow.Rotation = angle - cursor.PaddleDrawable.Rotation;\n- }\n+ var glow = cursor.PaddleDrawable.Glow;\n+ glow.FinishTransforms();\n+\n+ glow.FadeTo(progress, progress == 0 ? 200 : 0);\n+ glow.Rotation = angle - cursor.PaddleDrawable.Rotation;\n+\n+ glow.Line.Current.Value = Interpolation.ValueAt(progress, 0, 8f / 360, 0, 1, Easing.In);\n+ glow.Glow.Current.Value = Interpolation.ValueAt(progress, 0, 8f / 360, 0, 1, Easing.In);\n+ glow.Glow.Size = Interpolation.ValueAt(progress, new Vector2(0.6f), new Vector2(1.01f), 0, 1, Easing.In);\n+ glow.Glow.InnerRadius = Interpolation.ValueAt(progress, 0, 0.325f, 0, 1, Easing.In);\n+ }\nprivate void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\n@@ -204,7 +212,9 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre\n});\n+\nbreak;\n+\ncase DrawableBeat beat:\nvar angle = beat.HitObject.Angle;\nexplosion.Position = Extensions.GetCircularPosition(.6f, angle);\n" } ]
C#
MIT License
taulazer/tau
Animate angle on glow.
664,859
22.12.2020 09:01:44
18,000
61f88ea6867e5dc83c8dcce3ac8a6b883ad464ef
Fix null reference on tests
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "@@ -24,7 +24,7 @@ public class DrawableSlider : DrawableTauHitObject, IKeyBindingHandler<TauAction\npublic new Slider HitObject => base.HitObject as Slider;\n- [Resolved]\n+ [Resolved(CanBeNull = true)]\nprivate TauPlayfield playfield { get; set; }\npublic DrawableSlider() : this(null)\n@@ -141,7 +141,7 @@ protected override void UpdateAfterChildren()\nif (IsWithinPaddle && TauActionInputManager.PressedActions.Any(x => HitActions.Contains(x)))\n{\n- playfield.CreateSliderEffect(Vector2.Zero.GetDegreesFromPosition(path.Position), HitObject.Kiai);\n+ playfield?.CreateSliderEffect(Vector2.Zero.GetDegreesFromPosition(path.Position), HitObject.Kiai);\ntotalTimeHeld += Time.Elapsed;\nisBeingHit = true;\n}\n@@ -149,9 +149,9 @@ protected override void UpdateAfterChildren()\nif (AllJudged) return;\nif (isBeingHit)\n- playfield.AdjustRingGlow((float)(totalTimeHeld / HitObject.Duration), Vector2.Zero.GetDegreesFromPosition(path.Position));\n+ playfield?.AdjustRingGlow((float)(totalTimeHeld / HitObject.Duration), Vector2.Zero.GetDegreesFromPosition(path.Position));\nelse\n- playfield.AdjustRingGlow(0, Vector2.Zero.GetDegreesFromPosition(path.Position));\n+ playfield?.AdjustRingGlow(0, Vector2.Zero.GetDegreesFromPosition(path.Position));\n}\nprivate bool isBeingHit;\n" } ]
C#
MIT License
taulazer/tau
Fix null reference on tests
664,859
22.12.2020 13:16:57
18,000
c0b2e1660bd6d15b062e41010f60a8365bb47284
Add basic skinning
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneBeat.cs", "new_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneBeat.cs", "diff": "using osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\n-using osu.Game.Tests.Visual;\n-using osuTK;\nnamespace osu.Game.Rulesets.Tau.Tests.Objects\n{\n[TestFixture]\n- public class TestSceneBeat : OsuTestScene\n+ public class TestSceneBeat : TauSkinnableTestScene\n{\n- private readonly Container content;\n- protected override Container<Drawable> Content => content;\n-\nprivate int depthIndex;\npublic TestSceneBeat()\n{\n- base.Content.Add(content = new TauInputManager(new RulesetInfo { ID = 0 })\n- {\n- Anchor = Anchor.Centre,\n- Origin = Anchor.Centre,\n- Size = new Vector2(768),\n- RelativeSizeAxes = Axes.None,\n- Scale = new Vector2(.6f)\n- });\n-\n- AddStep(\"Miss Single\", () => testSingle());\n- AddStep(\"Hit Single\", () => testSingle(true));\n- AddStep(\"Miss Stream\", () => testStream());\n- AddStep(\"Hit Stream\", () => testStream(true));\n+ AddStep(\"Miss Single\", () => SetContents(() => testSingle()));\n+ AddStep(\"Hit Single\", () => SetContents(() => testSingle(true)));\n+ AddStep(\"Miss Stream\", () => SetContents(() => testStream()));\n+ AddStep(\"Hit Stream\", () => SetContents(() => testStream(true)));\nAddUntilStep(\"Wait for object despawn\", () => !Children.Any(h => h is DrawableTauHitObject hitObject && hitObject.AllJudged == false));\n}\n- private void testSingle(bool auto = false, double timeOffset = 0, float angle = 0)\n+ private Drawable testSingle(bool auto = false, double timeOffset = 0, float angle = 0)\n{\nvar beat = new Beat\n{\n@@ -48,20 +34,27 @@ private void testSingle(bool auto = false, double timeOffset = 0, float angle =\nbeat.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());\n- Add(new TestDrawableBeat(beat, auto)\n+ return new TestDrawableBeat(beat, auto)\n{\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nDepth = depthIndex++\n- });\n+ };\n}\n- private void testStream(bool auto = false)\n+ private Drawable testStream(bool auto = false)\n+ {\n+ var playfield = new Container\n{\n+ RelativeSizeAxes = Axes.Both,\n+ };\n+\nfor (int i = 0; i <= 1000; i += 100)\n{\n- testSingle(auto, i, i / 10f);\n+ playfield.Add(testSingle(auto, i, i / 10f));\n}\n+\n+ return playfield;\n}\nprivate class TestDrawableBeat : DrawableBeat\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/beat.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/beat.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/beat.png differ\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/beat.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/beat.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/special-skin/beat.png differ\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau.Tests/osu.Game.Rulesets.Tau.Tests.csproj", "new_path": "osu.Game.Rulesets.Tau.Tests/osu.Game.Rulesets.Tau.Tests.csproj", "diff": "<TargetFramework>netcoreapp3.1</TargetFramework>\n<RootNamespace>osu.Game.Rulesets.Tau.Tests</RootNamespace>\n</PropertyGroup>\n+ <ItemGroup>\n+ <EmbeddedResource Include=\"Resources\\**\\*\" />\n+ </ItemGroup>\n</Project>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs", "diff": "using osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Configuration;\n+using osu.Game.Rulesets.Tau.Skinning.Default;\n+using osu.Game.Skinning;\nusing osuTK;\nusing osuTK.Graphics;\n@@ -18,7 +20,7 @@ namespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\npublic class DrawableBeat : DrawableTauHitObject, IKeyBindingHandler<TauAction>\n{\n- public Container Box;\n+ public CompositeDrawable Box;\npublic Container IntersectArea;\nprivate bool validActionPressed;\n@@ -55,10 +57,7 @@ private void load(TauRulesetConfigManager config)\nAlpha = 0.05f,\nChildren = new Drawable[]\n{\n- new Box\n- {\n- RelativeSizeAxes = Axes.Both\n- },\n+ new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.Beat), _ => new BeatPiece(), null, ConfineMode.ScaleToFit),\nIntersectArea = new Container\n{\nSize = new Vector2(16),\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "new_path": "osu.Game.Rulesets.Tau/TauRuleset.cs", "diff": "using osu.Game.Rulesets.Tau.Mods;\nusing osu.Game.Rulesets.Tau.Replays;\nusing osu.Game.Rulesets.Tau.Scoring;\n+using osu.Game.Rulesets.Tau.Skinning.Legacy;\nusing osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\nusing osu.Game.Scoring;\nusing osu.Game.Screens.Ranking.Statistics;\n+using osu.Game.Skinning;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau\n{\npublic class TauRuleset : Ruleset\n{\n- public override string Description => \"tau\";\n+ public const string SHORT_NAME = \"tau\";\n+ public override string Description => SHORT_NAME;\npublic override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) =>\nnew DrawableTauRuleset(this, beatmap, mods);\n@@ -87,7 +90,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\n}\n}\n- public override string ShortName => \"tau\";\n+ public override string ShortName => SHORT_NAME;\npublic override string PlayingVerb => \"Hitting beats\";\n@@ -160,6 +163,8 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\npublic override IBeatmapProcessor CreateBeatmapProcessor(IBeatmap beatmap) => new BeatmapProcessor(beatmap);\n+ public override ISkin CreateLegacySkinProvider(ISkinSource source, IBeatmap beatmap) => new TauLegacySkinTransformer(source);\n+\nprotected override IEnumerable<HitResult> GetValidHitResults()\n{\nreturn new[]\n" } ]
C#
MIT License
taulazer/tau
Add basic skinning
664,859
22.12.2020 15:38:26
18,000
7b1854889dbf5712f76a983ac838726852565ab3
Add LegacyPlayfield
[ { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/field-background.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/field-background.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/field-background.png differ\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/field-overlay.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/field-overlay.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/field-overlay.png differ\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/field-background.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/field-background.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/special-skin/field-background.png differ\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/field-overlay.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/field-overlay.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/special-skin/field-overlay.png differ\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauSkinComponents.cs", "new_path": "osu.Game.Rulesets.Tau/TauSkinComponents.cs", "diff": "{\npublic enum TauSkinComponents\n{\n- Beat\n+ Beat,\n+ Playfield\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.Shapes;\n-using osu.Framework.Logging;\nusing osu.Framework.Utils;\nusing osu.Game.Beatmaps;\nusing osu.Game.Beatmaps.ControlPoints;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Scoring;\n+using osu.Game.Rulesets.Tau.Skinning.Default;\nusing osu.Game.Rulesets.Tau.UI.Components;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\nusing osu.Game.Rulesets.UI;\n+using osu.Game.Skinning;\nusing osuTK;\nusing osuTK.Graphics;\n@@ -34,7 +35,6 @@ namespace osu.Game.Rulesets.Tau.UI\n[Cached]\npublic class TauPlayfield : Playfield\n{\n- private readonly Circle playfieldBackground;\nprivate readonly TauCursor cursor;\nprivate readonly Container judgementLayer;\nprivate readonly Container<KiaiHitExplosion> kiaiExplosionContainer;\n@@ -67,37 +67,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)\nOrigin = Anchor.Centre,\n},\nnew VisualisationContainer(),\n- playfieldBackground = new Circle\n- {\n- Colour = Color4.Black,\n- RelativeSizeAxes = Axes.Both,\n- Anchor = Anchor.Centre,\n- Origin = Anchor.Centre,\n- },\n- new Container\n- {\n- RelativeSizeAxes = Axes.Both,\n- Anchor = Anchor.Centre,\n- Origin = Anchor.Centre,\n- Children = new Drawable[]\n- {\n- ring = new CircularContainer\n- {\n- RelativeSizeAxes = Axes.Both,\n- Anchor = Anchor.Centre,\n- Origin = Anchor.Centre,\n- Masking = true,\n- BorderThickness = 3,\n- BorderColour = ACCENT_COLOR.Opacity(0.5f),\n- Child = new Box\n- {\n- RelativeSizeAxes = Axes.Both,\n- AlwaysPresent = true,\n- Alpha = 0,\n- }\n- },\n- }\n- },\n+ new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.Playfield), _ => new PlayfieldPiece()),\nHitObjectContainer,\ncursor,\nkiaiExplosionContainer = new Container<KiaiHitExplosion>\n@@ -127,14 +97,9 @@ private void onJudgmentLoaded(DrawableTauJudgement judgement)\njudgementLayer.Add(judgement.GetProxyAboveHitObjectsContent());\n}\n- protected Bindable<float> PlayfieldDimLevel = new Bindable<float>(0.3f); // Change the default as you see fit\n-\n- [BackgroundDependencyLoader(true)]\n- private void load(TauRulesetConfigManager config)\n+ [BackgroundDependencyLoader]\n+ private void load()\n{\n- config?.BindWith(TauRulesetSettings.PlayfieldDim, PlayfieldDimLevel);\n- PlayfieldDimLevel.ValueChanged += _ => updateVisuals();\n-\nRegisterPool<Beat, DrawableBeat>(10);\nRegisterPool<HardBeat, DrawableHardBeat>(5);\nRegisterPool<Slider, DrawableSlider>(3);\n@@ -153,17 +118,6 @@ protected override void OnNewDrawableHitObject(DrawableHitObject drawableHitObje\nprotected override HitObjectLifetimeEntry CreateLifetimeEntry(HitObject hitObject) => new TauHitObjectLifetimeEntry(hitObject);\n- protected override void LoadComplete()\n- {\n- base.LoadComplete();\n- updateVisuals();\n- }\n-\n- private void updateVisuals()\n- {\n- playfieldBackground.FadeTo(PlayfieldDimLevel.Value, 100);\n- }\n-\npublic bool CheckIfWeCanValidate(float angle) => cursor.CheckForValidation(angle);\n[Resolved]\n" } ]
C#
MIT License
taulazer/tau
Add LegacyPlayfield
664,859
22.12.2020 16:11:20
18,000
92ccb35971da7d3e2ad92a84f0d57fbdd7db6cf2
Add LegacyHardBeat
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneHardBeats.cs", "new_path": "osu.Game.Rulesets.Tau.Tests/Objects/TestSceneHardBeats.cs", "diff": "using osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\n-using osu.Game.Tests.Visual;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau.Tests.Objects\n{\n[TestFixture]\n- public class TestSceneHardBeat : OsuTestScene\n+ public class TestSceneHardBeat : TauSkinnableTestScene\n{\n- private readonly Container content;\n- protected override Container<Drawable> Content => content;\n-\nprivate int depthIndex;\npublic TestSceneHardBeat()\n{\n- base.Content.Add(content = new TauInputManager(new RulesetInfo { ID = 0 })\n- {\n- Anchor = Anchor.Centre,\n- Origin = Anchor.Centre,\n- Size = new Vector2(768),\n- RelativeSizeAxes = Axes.None,\n- Scale = new Vector2(.6f)\n- });\n-\n- AddStep(\"Miss Single\", () => testSingle());\n- AddStep(\"Hit Single\", () => testSingle(true));\n+ AddStep(\"Miss Single\", () => SetContents(() => testSingle()));\n+ AddStep(\"Hit Single\", () => SetContents(() => testSingle(true)));\nAddUntilStep(\"Wait for object despawn\", () => !Children.Any(h => h is DrawableTauHitObject && (h as DrawableTauHitObject).AllJudged == false));\n}\n- private void testSingle(bool auto = false)\n+ private Drawable testSingle(bool auto = false)\n{\nvar circle = new HardBeat\n{\n@@ -45,12 +32,19 @@ private void testSingle(bool auto = false)\ncircle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { });\n- Add(new TestDrawableHardBeat(circle, auto)\n+ return new Container\n+ {\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ RelativeSizeAxes = Axes.Both,\n+ Size = new Vector2(0.6f),\n+ Child = new TestDrawableHardBeat(circle, auto)\n{\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nDepth = depthIndex++,\n- });\n+ }\n+ };\n}\nprivate class TestDrawableHardBeat : DrawableHardBeat\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/hard-beat.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/hard-beat.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/metrics-skin/hard-beat.png differ\n" }, { "change_type": "ADD", "old_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/hard-beat.png", "new_path": "osu.Game.Rulesets.Tau.Tests/Resources/special-skin/hard-beat.png", "diff": "Binary files /dev/null and b/osu.Game.Rulesets.Tau.Tests/Resources/special-skin/hard-beat.png differ\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs", "diff": "using osu.Game.Graphics;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\n+using osu.Game.Rulesets.Tau.Skinning.Default;\n+using osu.Game.Skinning;\nusing osuTK;\nusing osuTK.Graphics;\n@@ -20,7 +22,7 @@ public class DrawableHardBeat : DrawableTauHitObject, IKeyBindingHandler<TauActi\nTauAction.HardButton\n};\n- public CircularContainer Circle;\n+ public SkinnableDrawable Circle;\npublic DrawableHardBeat()\n: this(null)\n@@ -41,29 +43,7 @@ private void load()\nSize = Vector2.Zero;\nAlpha = 0f;\n- AddRangeInternal(new Drawable[]\n- {\n- Circle = new CircularContainer\n- {\n- RelativeSizeAxes = Axes.Both,\n- Size = new Vector2(1),\n- Masking = true,\n- BorderThickness = 5,\n- BorderColour = Color4.White,\n- Origin = Anchor.Centre,\n- Anchor = Anchor.Centre,\n- Alpha = 1f,\n- Children = new Drawable[]\n- {\n- new Box\n- {\n- RelativeSizeAxes = Axes.Both,\n- Alpha = 0,\n- AlwaysPresent = true\n- },\n- }\n- },\n- });\n+ AddInternal(Circle = new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.HardBeat), _ => new HardBeatPiece(), null, ConfineMode.ScaleToFit));\nPosition = Vector2.Zero;\n}\n@@ -118,8 +98,6 @@ protected override void UpdateHitStateTransforms(ArmedState state)\n.FadeColour(colour.ForHitResult(Result.Type), time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_hit);\n- Circle.TransformTo(nameof(Circle.BorderThickness), 0f, time_fade_hit);\n-\nbreak;\ncase ArmedState.Miss:\n@@ -127,8 +105,6 @@ protected override void UpdateHitStateTransforms(ArmedState state)\n.ResizeTo(1.1f, time_fade_hit, Easing.OutQuint)\n.FadeOut(time_fade_miss);\n- Circle.TransformTo(nameof(Circle.BorderThickness), 0f, time_fade_miss, Easing.OutQuint);\n-\nbreak;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/TauSkinComponents.cs", "new_path": "osu.Game.Rulesets.Tau/TauSkinComponents.cs", "diff": "public enum TauSkinComponents\n{\nBeat,\n- Playfield\n+ Playfield,\n+ HardBeat\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Add LegacyHardBeat
664,859
22.12.2020 20:16:55
18,000
ba11149f0429c158f18caacbe6a6b256cef8af47
Add colour skinning.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs", "diff": "using osu.Framework.Input.Bindings;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Framework.Allocation;\n+using osu.Game.Rulesets.Tau.Skinning;\nusing osu.Game.Rulesets.Tau.UI;\n+using osu.Game.Skinning;\n+using osuTK.Graphics;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n@@ -65,6 +68,12 @@ public DrawableSlider(TauHitObject obj)\n});\n}\n+ [BackgroundDependencyLoader]\n+ private void load(ISkinSource skin)\n+ {\n+ path.Colour = skin.GetConfig<TauSkinColour, Color4>(TauSkinColour.Slider)?.Value ?? Color4.White;\n+ }\n+\nprotected override void OnApply()\n{\nbase.OnApply();\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Skinning/Default/HardBeatPiece.cs", "new_path": "osu.Game.Rulesets.Tau/Skinning/Default/HardBeatPiece.cs", "diff": "@@ -20,6 +20,8 @@ public HardBeatPiece()\nRelativeSizeAxes = Axes.Both;\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n+ FillAspectRatio = 1;\n+ FillMode = FillMode.Fit;\nChild = new Box\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Skinning/Default/PlayfieldPiece.cs", "new_path": "osu.Game.Rulesets.Tau/Skinning/Default/PlayfieldPiece.cs", "diff": "@@ -13,6 +13,7 @@ namespace osu.Game.Rulesets.Tau.Skinning.Default\npublic class PlayfieldPiece : CompositeDrawable\n{\nprivate readonly Circle background;\n+ private readonly CircularContainer border;\npublic PlayfieldPiece()\n{\n@@ -30,14 +31,13 @@ public PlayfieldPiece()\nColour = Color4.Black,\nAlpha = 0.3f\n},\n- new CircularContainer\n+ border = new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nMasking = true,\nBorderThickness = 3,\n- BorderColour = TauPlayfield.ACCENT_COLOR.Opacity(0.5f),\nChild = new Box\n{\nRelativeSizeAxes = Axes.Both,\n@@ -46,6 +46,8 @@ public PlayfieldPiece()\n}\n},\n});\n+\n+ border.BorderColour = TauPlayfield.ACCENT_COLOR.Value;\n}\nprivate readonly Bindable<float> playfieldDimLevel = new Bindable<float>(0.3f);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Skinning/TauSkinColour.cs", "new_path": "osu.Game.Rulesets.Tau/Skinning/TauSkinColour.cs", "diff": "{\npublic enum TauSkinColour\n{\n-\n+ Slider,\n+ Accent\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -65,6 +65,7 @@ public class Paddle : CompositeDrawable\nprivate readonly Box topLine;\nprivate readonly Box bottomLine;\nprivate readonly CircularContainer circle;\n+ private readonly CircularContainer border;\npublic readonly PaddleGlow Glow;\n@@ -78,13 +79,12 @@ public Paddle(float angleRange)\nInternalChildren = new Drawable[]\n{\n- new CircularContainer\n+ border = new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\n//Masking = true,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Colour = TauPlayfield.ACCENT_COLOR,\nChildren = new Drawable[]\n{\nGlow = new PaddleGlow(angleRange)\n@@ -137,6 +137,8 @@ public Paddle(float angleRange)\n}\n}\n};\n+\n+ border.Colour = TauPlayfield.ACCENT_COLOR.Value;\n}\nprotected override bool OnMouseMove(MouseMoveEvent e)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "using osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Scoring;\n+using osu.Game.Rulesets.Tau.Skinning;\nusing osu.Game.Rulesets.Tau.Skinning.Default;\nusing osu.Game.Rulesets.Tau.UI.Components;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\n@@ -43,7 +44,7 @@ public class TauPlayfield : Playfield\npublic static readonly Vector2 BASE_SIZE = new Vector2(768, 768);\n- public static readonly Color4 ACCENT_COLOR = Color4Extensions.FromHex(@\"FF0040\");\n+ public static readonly Bindable<Color4> ACCENT_COLOR = new Bindable<Color4>(Color4Extensions.FromHex(@\"FF0040\"));\npublic override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n@@ -98,11 +99,13 @@ private void onJudgmentLoaded(DrawableTauJudgement judgement)\n}\n[BackgroundDependencyLoader]\n- private void load()\n+ private void load(ISkinSource skin)\n{\nRegisterPool<Beat, DrawableBeat>(10);\nRegisterPool<HardBeat, DrawableHardBeat>(5);\nRegisterPool<Slider, DrawableSlider>(3);\n+\n+ ACCENT_COLOR.Value = skin.GetConfig<TauSkinColour, Color4>(TauSkinColour.Accent)?.Value ?? Color4Extensions.FromHex(@\"FF0040\");\n}\nprotected override void OnNewDrawableHitObject(DrawableHitObject drawableHitObject)\n@@ -127,7 +130,7 @@ public void CreateSliderEffect(float angle, bool kiai)\n{\nif ((int)Time.Current % (kiai ? 8 : 16) != 0) return;\n- kiaiExplosionContainer.Add(new KiaiHitExplosion(ACCENT_COLOR, particleAmount: 1)\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(ACCENT_COLOR.Value, particleAmount: 1)\n{\nPosition = Extensions.GetCircularPosition(.5f, angle),\nAngle = angle,\n@@ -242,7 +245,7 @@ private void load(TauRulesetConfigManager settings)\nprotected override void LoadComplete()\n{\nbase.LoadComplete();\n- visualisation.AccentColour = ACCENT_COLOR.Opacity(0.5f);\n+ visualisation.AccentColour = ACCENT_COLOR.Value.Opacity(0.5f);\nshowVisualisation.TriggerChange();\n}\n@@ -254,14 +257,14 @@ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint,\nif (firstKiaiBeat)\n{\n- visualisation.FlashColour(ACCENT_COLOR.Opacity(0.5f), timingPoint.BeatLength * 4, Easing.In);\n+ visualisation.FlashColour(visualisation.AccentColour.Opacity(0.5f), timingPoint.BeatLength * 4, Easing.In);\nfirstKiaiBeat = false;\nreturn;\n}\nif (kiaiBeatIndex >= 5)\n- visualisation.FlashColour(ACCENT_COLOR.Opacity(0.25f), timingPoint.BeatLength, Easing.In);\n+ visualisation.FlashColour(visualisation.AccentColour.Opacity(0.25f), timingPoint.BeatLength, Easing.In);\n}\nelse\n{\n" } ]
C#
MIT License
taulazer/tau
Add colour skinning.