mirror of
https://github.com/ppy/osu.git
synced 2024-12-04 16:12:58 +08:00
Compare commits
8 Commits
e0622cdf77
...
fb44759329
Author | SHA1 | Date | |
---|---|---|---|
|
fb44759329 | ||
|
f09d8f097a | ||
|
457957d3b8 | ||
|
2ceb3f6f85 | ||
|
9ac0f025f5 | ||
|
1162448736 | ||
|
955a2dbe91 | ||
|
c754574865 |
@ -77,6 +77,8 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||
if (beatmap.HitObjects.Count == 0)
|
||||
return new TaikoDifficultyAttributes { Mods = mods };
|
||||
|
||||
bool isRelax = mods.Any(h => h is TaikoModRelax);
|
||||
|
||||
Colour colour = (Colour)skills.First(x => x is Colour);
|
||||
Rhythm rhythm = (Rhythm)skills.First(x => x is Rhythm);
|
||||
Stamina stamina = (Stamina)skills.First(x => x is Stamina);
|
||||
@ -88,15 +90,18 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||
double monoStaminaRating = singleColourStamina.DifficultyValue() * stamina_skill_multiplier;
|
||||
double monoStaminaFactor = staminaRating == 0 ? 1 : Math.Pow(monoStaminaRating / staminaRating, 5);
|
||||
|
||||
double combinedRating = combinedDifficultyValue(rhythm, colour, stamina);
|
||||
double combinedRating = combinedDifficultyValue(rhythm, colour, stamina, isRelax);
|
||||
double starRating = rescale(combinedRating * 1.4);
|
||||
|
||||
// TODO: This is temporary measure as we don't detect abuse of multiple-input playstyles of converts within the current system.
|
||||
if (beatmap.BeatmapInfo.Ruleset.OnlineID == 0)
|
||||
{
|
||||
starRating *= 0.925;
|
||||
// For maps with low colour variance and high stamina requirement, multiple inputs are more likely to be abused.
|
||||
if (colourRating < 2 && staminaRating > 8)
|
||||
|
||||
// For maps with either relax or low colour variance and high stamina requirement, multiple inputs are more likely to be abused.
|
||||
if (isRelax)
|
||||
starRating *= 0.60;
|
||||
else if (colourRating < 2 && staminaRating > 8)
|
||||
starRating *= 0.80;
|
||||
}
|
||||
|
||||
@ -138,7 +143,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||
/// For each section, the peak strains of all separate skills are combined into a single peak strain for the section.
|
||||
/// The resulting partial rating of the beatmap is a weighted sum of the combined peaks (higher peaks are weighted more).
|
||||
/// </remarks>
|
||||
private double combinedDifficultyValue(Rhythm rhythm, Colour colour, Stamina stamina)
|
||||
private double combinedDifficultyValue(Rhythm rhythm, Colour colour, Stamina stamina, bool isRelax)
|
||||
{
|
||||
List<double> peaks = new List<double>();
|
||||
|
||||
@ -152,6 +157,12 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||
double rhythmPeak = rhythmPeaks[i] * rhythm_skill_multiplier;
|
||||
double staminaPeak = staminaPeaks[i] * stamina_skill_multiplier;
|
||||
|
||||
if (isRelax)
|
||||
{
|
||||
colourPeak = 0; // There is no colour difficulty in relax.
|
||||
staminaPeak /= 1.5; // Stamina difficulty is decreased with an increased available finger count.
|
||||
}
|
||||
|
||||
double peak = norm(1.5, colourPeak, staminaPeak);
|
||||
peak = norm(2, peak, rhythmPeak);
|
||||
|
||||
|
@ -44,6 +44,11 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString CheckUpdate => new TranslatableString(getKey(@"check_update"), @"Check for updates");
|
||||
|
||||
/// <summary>
|
||||
/// "Checking for updates"
|
||||
/// </summary>
|
||||
public static LocalisableString CheckingForUpdates => new TranslatableString(getKey(@"checking_for_updates"), @"Checking for updates");
|
||||
|
||||
/// <summary>
|
||||
/// "Open osu! folder"
|
||||
/// </summary>
|
||||
|
@ -4,7 +4,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Logging;
|
||||
@ -13,6 +12,7 @@ using osu.Framework.Screens;
|
||||
using osu.Framework.Statistics;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Overlays.Settings.Sections.Maintenance;
|
||||
using osu.Game.Updater;
|
||||
@ -36,8 +36,11 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
[Resolved]
|
||||
private Storage storage { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private OsuGame? game { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, OsuGame? game)
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
Add(new SettingsEnumDropdown<ReleaseStream>
|
||||
{
|
||||
@ -50,23 +53,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
Add(checkForUpdatesButton = new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.CheckUpdate,
|
||||
Action = () =>
|
||||
{
|
||||
checkForUpdatesButton.Enabled.Value = false;
|
||||
Task.Run(updateManager.CheckForUpdateAsync).ContinueWith(task => Schedule(() =>
|
||||
{
|
||||
if (!task.GetResultSafely())
|
||||
{
|
||||
notifications?.Post(new SimpleNotification
|
||||
{
|
||||
Text = GeneralSettingsStrings.RunningLatestRelease(game!.Version),
|
||||
Icon = FontAwesome.Solid.CheckCircle,
|
||||
});
|
||||
}
|
||||
|
||||
checkForUpdatesButton.Enabled.Value = true;
|
||||
}));
|
||||
}
|
||||
Action = () => checkForUpdates().FireAndForget()
|
||||
});
|
||||
}
|
||||
|
||||
@ -94,6 +81,44 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
}
|
||||
|
||||
private async Task checkForUpdates()
|
||||
{
|
||||
if (updateManager == null || game == null)
|
||||
return;
|
||||
|
||||
checkForUpdatesButton.Enabled.Value = false;
|
||||
|
||||
var checkingNotification = new ProgressNotification
|
||||
{
|
||||
Text = GeneralSettingsStrings.CheckingForUpdates,
|
||||
};
|
||||
notifications?.Post(checkingNotification);
|
||||
|
||||
try
|
||||
{
|
||||
bool foundUpdate = await updateManager.CheckForUpdateAsync().ConfigureAwait(true);
|
||||
|
||||
if (!foundUpdate)
|
||||
{
|
||||
notifications?.Post(new SimpleNotification
|
||||
{
|
||||
Text = GeneralSettingsStrings.RunningLatestRelease(game.Version),
|
||||
Icon = FontAwesome.Solid.CheckCircle,
|
||||
});
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
// This sequence allows the notification to be immediately dismissed.
|
||||
checkingNotification.State = ProgressNotificationState.Cancelled;
|
||||
checkingNotification.Close(false);
|
||||
checkForUpdatesButton.Enabled.Value = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void exportLogs()
|
||||
{
|
||||
ProgressNotification notification = new ProgressNotification
|
||||
|
Loading…
Reference in New Issue
Block a user