mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Merge branch 'master' into intro-outro-break
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -13,6 +14,7 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Beatmaps.Legacy;
|
using osu.Game.Beatmaps.Legacy;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -23,6 +25,9 @@ namespace osu.Game.Tournament.Components
|
|||||||
{
|
{
|
||||||
private BeatmapInfo beatmap;
|
private BeatmapInfo beatmap;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IBindable<RulesetInfo> ruleset { get; set; }
|
||||||
|
|
||||||
public BeatmapInfo Beatmap
|
public BeatmapInfo Beatmap
|
||||||
{
|
{
|
||||||
get => beatmap;
|
get => beatmap;
|
||||||
@ -165,7 +170,8 @@ namespace osu.Game.Tournament.Components
|
|||||||
string hardRockExtra = "";
|
string hardRockExtra = "";
|
||||||
string srExtra = "";
|
string srExtra = "";
|
||||||
|
|
||||||
//var ar = beatmap.BaseDifficulty.ApproachRate;
|
var ar = beatmap.BaseDifficulty.ApproachRate;
|
||||||
|
|
||||||
if ((mods & LegacyMods.HardRock) > 0)
|
if ((mods & LegacyMods.HardRock) > 0)
|
||||||
{
|
{
|
||||||
hardRockExtra = "*";
|
hardRockExtra = "*";
|
||||||
@ -174,12 +180,46 @@ namespace osu.Game.Tournament.Components
|
|||||||
|
|
||||||
if ((mods & LegacyMods.DoubleTime) > 0)
|
if ((mods & LegacyMods.DoubleTime) > 0)
|
||||||
{
|
{
|
||||||
//ar *= 1.5f;
|
// temporary local calculation (taken from OsuDifficultyCalculator)
|
||||||
|
double preempt = (int)BeatmapDifficulty.DifficultyRange(ar, 1800, 1200, 450) / 1.5;
|
||||||
|
ar = (float)(preempt > 1200 ? (1800 - preempt) / 120 : (1200 - preempt) / 150 + 5);
|
||||||
|
|
||||||
bpm *= 1.5f;
|
bpm *= 1.5f;
|
||||||
length /= 1.5f;
|
length /= 1.5f;
|
||||||
srExtra = "*";
|
srExtra = "*";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(string heading, string content)[] stats;
|
||||||
|
|
||||||
|
switch (ruleset.Value.ID)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
stats = new (string heading, string content)[]
|
||||||
|
{
|
||||||
|
("CS", $"{beatmap.BaseDifficulty.CircleSize:0.#}{hardRockExtra}"),
|
||||||
|
("AR", $"{ar:0.#}{hardRockExtra}"),
|
||||||
|
("OD", $"{beatmap.BaseDifficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
case 3:
|
||||||
|
stats = new (string heading, string content)[]
|
||||||
|
{
|
||||||
|
("OD", $"{beatmap.BaseDifficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
||||||
|
("HP", $"{beatmap.BaseDifficulty.DrainRate:0.#}{hardRockExtra}")
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
stats = new (string heading, string content)[]
|
||||||
|
{
|
||||||
|
("CS", $"{beatmap.BaseDifficulty.CircleSize:0.#}{hardRockExtra}"),
|
||||||
|
("AR", $"{ar:0.#}"),
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
panelContents.Children = new Drawable[]
|
panelContents.Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new DiffPiece(("Length", TimeSpan.FromMilliseconds(length).ToString(@"mm\:ss")))
|
new DiffPiece(("Length", TimeSpan.FromMilliseconds(length).ToString(@"mm\:ss")))
|
||||||
@ -192,12 +232,7 @@ namespace osu.Game.Tournament.Components
|
|||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.TopLeft
|
Origin = Anchor.TopLeft
|
||||||
},
|
},
|
||||||
new DiffPiece(
|
new DiffPiece(stats)
|
||||||
//("CS", $"{beatmap.BaseDifficulty.CircleSize:0.#}{hardRockExtra}"),
|
|
||||||
//("AR", $"{ar:0.#}{srExtra}"),
|
|
||||||
("OD", $"{beatmap.BaseDifficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
|
||||||
("HP", $"{beatmap.BaseDifficulty.DrainRate:0.#}{hardRockExtra}")
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.BottomRight
|
Origin = Anchor.BottomRight
|
||||||
|
Reference in New Issue
Block a user