Skip to content

Commit

Permalink
Merge pull request #173 from Altenhh/Extra-HardBeat-Button
Browse files Browse the repository at this point in the history
  • Loading branch information
naoei authored May 14, 2021
2 parents ba4b280 + 857e076 commit 180d678
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau/Mods/TauModRelax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void addAction(bool hitting, bool hardhit = false)
{
if (hardhit)
{
state.PressedActions.Add(TauAction.HardButton);
state.PressedActions.Add(TauAction.HardButton1);
}
else
{
Expand Down
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public class DrawableHardBeat : DrawableTauHitObject, IKeyBindingHandler<TauActi
{
protected override TauAction[] HitActions { get; set; } = new[]
{
TauAction.HardButton
TauAction.HardButton1,
TauAction.HardButton2
};

public SkinnableDrawable Circle;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override Replay Generate()
break;

case HardBeat _:
Replay.Frames.Add(new TauReplayFrame(h.StartTime, ((TauReplayFrame)Replay.Frames.Last()).Position, TauAction.HardButton));
Replay.Frames.Add(new TauReplayFrame(h.StartTime, ((TauReplayFrame)Replay.Frames.Last()).Position, TauAction.HardButton1));
Replay.Frames.Add(new TauReplayFrame(h.StartTime + releaseDelay, ((TauReplayFrame)Replay.Frames.Last()).Position));
lastTime = h.GetEndTime() + releaseDelay;

Expand Down
6 changes: 4 additions & 2 deletions osu.Game.Rulesets.Tau/Replays/TauReplayFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public void FromLegacy(LegacyReplayFrame currentFrame, IBeatmap beatmap, ReplayF

if (currentFrame.MouseLeft1) Actions.Add(TauAction.LeftButton);
if (currentFrame.MouseRight1) Actions.Add(TauAction.RightButton);
if (currentFrame.MouseLeft2) Actions.Add(TauAction.HardButton);
if (currentFrame.MouseLeft2) Actions.Add(TauAction.HardButton1);
if (currentFrame.MouseRight2) Actions.Add(TauAction.HardButton2);
}

public LegacyReplayFrame ToLegacy(IBeatmap beatmap)
Expand All @@ -38,7 +39,8 @@ public LegacyReplayFrame ToLegacy(IBeatmap beatmap)

if (Actions.Contains(TauAction.LeftButton)) state |= ReplayButtonState.Left1;
if (Actions.Contains(TauAction.RightButton)) state |= ReplayButtonState.Right1;
if (Actions.Contains(TauAction.HardButton)) state |= ReplayButtonState.Left2;
if (Actions.Contains(TauAction.HardButton1)) state |= ReplayButtonState.Left2;
if (Actions.Contains(TauAction.HardButton2)) state |= ReplayButtonState.Right2;

return new LegacyReplayFrame(Time, Position.X, Position.Y, state);
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau/Skinning/Legacy/LegacyPlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void load(ISkinSource skin, TauRulesetConfigManager config)
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
Texture = skin.GetTexture("field-overlay")
Texture = skin.GetTexture("ring-overlay")
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public override Drawable GetDrawableComponent(ISkinComponent component)
case TauSkinComponents.Handle:
return Source.GetTexture("handle") != null ? new LegacyHandle() : null;

case TauSkinComponents.Playfield:
return Source.GetTexture("field-overlay") != null ? new LegacyPlayfield() : null;
case TauSkinComponents.Ring:
return Source.GetTexture("ring-overlay") != null ? new LegacyPlayfield() : null;
}

return null;
Expand Down
7 changes: 5 additions & 2 deletions osu.Game.Rulesets.Tau/TauInputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ public enum TauAction
[Description("Right tick button")]
RightButton,

[Description("Hard beat button")]
HardButton
[Description("Hard beat button 1")]
HardButton1,

[Description("Hard beat button 2")]
HardButton2,
}
}
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Tau/TauRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public override IEnumerable<KeyBinding> GetDefaultKeyBindings(int variant = 0) =
new KeyBinding(InputKey.X, TauAction.RightButton),
new KeyBinding(InputKey.MouseLeft, TauAction.LeftButton),
new KeyBinding(InputKey.MouseRight, TauAction.RightButton),
new KeyBinding(InputKey.Space, TauAction.HardButton),
new KeyBinding(InputKey.Space, TauAction.HardButton1),
new KeyBinding(InputKey.LShift, TauAction.HardButton2),
};

public override StatisticRow[] CreateStatisticsForScore(ScoreInfo score, IBeatmap playableBeatmap) => new[]
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau/TauSkinComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public enum TauSkinComponents
{
Beat,
Playfield,
Ring,
HardBeat,
Handle
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau/UI/TauPlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)
Origin = Anchor.Centre,
},
new VisualisationContainer(),
new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.Playfield), _ => new PlayfieldPiece()),
new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.Ring), _ => new PlayfieldPiece()),
HitObjectContainer,
cursor,
kiaiExplosionContainer = new Container<KiaiHitExplosion>
Expand Down

0 comments on commit 180d678

Please sign in to comment.