1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 09:23:06 +08:00

Score multiplier edits

This commit is contained in:
Joseph Madamba 2018-03-24 16:00:18 -07:00
parent c9276ce2b8
commit 78a7564acd
7 changed files with 37 additions and 15 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string Name => "Dual Stages";
public override string ShortenedName => "DS";
public override string Description => @"Double the stages, double the fun!";
public override double ScoreMultiplier => 0;
public override double ScoreMultiplier => 1;
public void ApplyToBeatmapConverter(BeatmapConverter<ManiaHitObject> beatmapConverter)
{

View File

@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string ShortenedName => "RD";
public override FontAwesome Icon => FontAwesome.fa_osu_dice;
public override string Description => @"Shuffle around the keys!";
public override double ScoreMultiplier => 0;
public override double ScoreMultiplier => 1;
public void ApplyToRulesetContainer(RulesetContainer<ManiaHitObject> rulesetContainer)
{

View File

@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public override string ShortenedName => "AP";
public override FontAwesome Icon => FontAwesome.fa_osu_mod_autopilot;
public override string Description => @"Automatic cursor movement - just follow the rhythm.";
public override double ScoreMultiplier => 0;
public override double ScoreMultiplier => 1;
public override bool Ranked => false;
public override Type[] IncompatibleMods => new[] { typeof(OsuModSpunOut), typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail), typeof(ModAutoplay) };
}

View File

@ -105,7 +105,7 @@ namespace osu.Game.Tests.Visual
private void testManiaMods(ManiaRuleset ruleset)
{
testMultiplierTextUnranked(ruleset.GetModsFor(ModType.Special).First(m => m is ManiaModRandom));
testRankedTextUnranked(ruleset.GetModsFor(ModType.Special).First(m => m is ManiaModRandom));
}
private void testSingleMod(Mod mod)
@ -182,13 +182,13 @@ namespace osu.Game.Tests.Visual
checkLabelColor(Color4.White);
}
private void testMultiplierTextUnranked(Mod mod)
private void testRankedTextUnranked(Mod mod)
{
AddAssert("check for ranked", () => !modSelect.MultiplierLabel.Text.EndsWith(unranked_suffix));
AddAssert("check for ranked", () => !modSelect.RankedLabel.Text.EndsWith(unranked_suffix));
selectNext(mod);
AddAssert("check for unranked", () => modSelect.MultiplierLabel.Text.EndsWith(unranked_suffix));
AddAssert("check for unranked", () => modSelect.RankedLabel.Text.EndsWith(unranked_suffix));
selectPrevious(mod);
AddAssert("check for ranked", () => !modSelect.MultiplierLabel.Text.EndsWith(unranked_suffix));
AddAssert("check for ranked", () => !modSelect.RankedLabel.Text.EndsWith(unranked_suffix));
}
private void selectNext(Mod mod) => AddStep($"left click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(1));
@ -224,6 +224,7 @@ namespace osu.Game.Tests.Visual
}
public new OsuSpriteText MultiplierLabel => base.MultiplierLabel;
public new OsuSpriteText RankedLabel => base.RankedLabel;
public new TriangleButton DeselectAllButton => base.DeselectAllButton;
public new Color4 LowMultiplierColour => base.LowMultiplierColour;

View File

@ -27,10 +27,11 @@ namespace osu.Game.Overlays.Mods
{
private const float content_width = 0.8f;
protected Color4 LowMultiplierColour, HighMultiplierColour;
protected Color4 LowMultiplierColour, HighMultiplierColour, RankedColour;
protected readonly TriangleButton DeselectAllButton;
protected readonly OsuSpriteText MultiplierLabel;
protected readonly OsuSpriteText RankedLabel;
private readonly FillFlowContainer footerContainer;
protected override bool BlockPassThroughKeyboard => false;
@ -55,8 +56,9 @@ namespace osu.Game.Overlays.Mods
{
SelectedMods.ValueChanged += selectedModsChanged;
LowMultiplierColour = colours.Red;
LowMultiplierColour = colours.Yellow;
HighMultiplierColour = colours.Green;
RankedColour = colours.Red;
if (osu != null)
Ruleset.BindTo(osu.Ruleset);
@ -98,15 +100,24 @@ namespace osu.Game.Overlays.Mods
}
MultiplierLabel.Text = $"{multiplier:N2}x";
if (!ranked)
MultiplierLabel.Text += " (Unranked)";
if (multiplier > 1.0)
MultiplierLabel.FadeColour(HighMultiplierColour, 200);
else if (multiplier < 1.0)
MultiplierLabel.FadeColour(LowMultiplierColour, 200);
else
MultiplierLabel.FadeColour(Color4.White, 200);
RankedLabel.Text = null;
if (!ranked)
{
RankedLabel.Text += " (Unranked)";
RankedLabel.FadeColour(RankedColour, 200);
}
else
{
RankedLabel.Text = null;
RankedLabel.FadeColour(Color4.White, 200);
}
}
protected override void PopOut()
@ -362,6 +373,16 @@ namespace osu.Game.Overlays.Mods
}
},
MultiplierLabel = new OsuSpriteText
{
Font = @"Exo2.0-Bold",
TextSize = 30,
Shadow = true,
Margin = new MarginPadding
{
Top = 5
}
},
RankedLabel = new OsuSpriteText
{
Font = @"Exo2.0-Bold",
TextSize = 30,

View File

@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Mods
public override string ShortenedName => "AT";
public override FontAwesome Icon => FontAwesome.fa_osu_mod_auto;
public override string Description => "Watch a perfect automated play through the song.";
public override double ScoreMultiplier => 0;
public override double ScoreMultiplier => 1;
public bool AllowFail => false;
public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail) };
}

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
public override string Name => "Relax";
public override string ShortenedName => "RX";
public override FontAwesome Icon => FontAwesome.fa_osu_mod_relax;
public override double ScoreMultiplier => 0;
public override double ScoreMultiplier => 1;
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModSuddenDeath) };
}
}