Compare commits
3 Commits
2025.1111.
...
b7e36164c3
| Author | SHA1 | Date | |
|---|---|---|---|
| b7e36164c3 | |||
| 0f5f13858d | |||
| 89a0c75156 |
12
.github/ISSUE_TEMPLATE/config.yml
vendored
12
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,12 +1,6 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Help
|
- name: Help
|
||||||
url: https://github.com/ppy/osu/discussions/categories/q-a
|
url: https://t.me/jvnkosu_chat
|
||||||
about: osu! not working or performing as you'd expect? Not sure it's a bug? Check the Q&A section!
|
about: Your jvnkosu! is not working right? Please contact us using our Telegram chat
|
||||||
- name: Suggestions or feature request
|
|
||||||
url: https://github.com/ppy/osu/discussions/categories/ideas
|
|
||||||
about: Got something you think should change or be added? Search for or start a new discussion!
|
|
||||||
- name: osu!stable issues
|
|
||||||
url: https://github.com/ppy/osu-stable-issues
|
|
||||||
about: For osu!(stable) - ie. the current "live" game version, check out the dedicated repository. Note that this is for serious bug reports only, not tech support.
|
|
||||||
|
|
||||||
|
|||||||
@@ -208,9 +208,10 @@ namespace osu.Desktop
|
|||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
private static void configureWindows(VelopackApp app)
|
private static void configureWindows(VelopackApp app)
|
||||||
{
|
{
|
||||||
app.OnFirstRun(_ => WindowsAssociationManager.InstallAssociations());
|
// we do not want associations here, as that breaks official lazer's associations
|
||||||
app.OnAfterUpdateFastCallback(_ => WindowsAssociationManager.UpdateAssociations());
|
// app.OnFirstRun(_ => WindowsAssociationManager.InstallAssociations());
|
||||||
app.OnBeforeUninstallFastCallback(_ => WindowsAssociationManager.UninstallAssociations());
|
// app.OnAfterUpdateFastCallback(_ => WindowsAssociationManager.UpdateAssociations());
|
||||||
|
// app.OnBeforeUninstallFastCallback(_ => WindowsAssociationManager.UninstallAssociations());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
typeof(ManiaModFadeIn)
|
typeof(ManiaModFadeIn)
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
|
|
||||||
public override bool Ranked => false;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public override bool ValidForFreestyleAsRequiredMod => false;
|
public override bool ValidForFreestyleAsRequiredMod => false;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public class ManiaModHardRock : ModHardRock, IApplicableToHitObject
|
public class ManiaModHardRock : ModHardRock, IApplicableToHitObject
|
||||||
{
|
{
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
public override bool Ranked => false;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public const double HIT_WINDOW_DIFFICULTY_MULTIPLIER = 1.4;
|
public const double HIT_WINDOW_DIFFICULTY_MULTIPLIER = 1.4;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public class ManiaModMirror : ModMirror, IApplicableToBeatmap
|
public class ManiaModMirror : ModMirror, IApplicableToBeatmap
|
||||||
{
|
{
|
||||||
public override LocalisableString Description => "Notes are flipped horizontally.";
|
public override LocalisableString Description => "Notes are flipped horizontally.";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public void ApplyToBeatmap(IBeatmap beatmap)
|
public void ApplyToBeatmap(IBeatmap beatmap)
|
||||||
{
|
{
|
||||||
|
|||||||
16
osu.Game.Rulesets.Osu/Mods/OsuModRateAdjustConcrete.cs
Normal file
16
osu.Game.Rulesets.Osu/Mods/OsuModRateAdjustConcrete.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Overlays.Settings;
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
|
{
|
||||||
|
public class OsuModRateAdjustConcrete : ModRateAdjustConcrete
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public override LocalisableString Description => @"Spinners will be automatically completed.";
|
public override LocalisableString Description => @"Spinners will be automatically completed.";
|
||||||
public override double ScoreMultiplier => 0.9;
|
public override double ScoreMultiplier => 0.9;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(OsuModAutopilot), typeof(OsuModTargetPractice) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(OsuModAutopilot), typeof(OsuModTargetPractice) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public void ApplyToDrawableHitObject(DrawableHitObject hitObject)
|
public void ApplyToDrawableHitObject(DrawableHitObject hitObject)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public class OsuModTouchDevice : ModTouchDevice
|
public class OsuModTouchDevice : ModTouchDevice
|
||||||
{
|
{
|
||||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot), typeof(OsuModBloom) }).ToArray();
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot), typeof(OsuModBloom) }).ToArray();
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,6 +230,12 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new ModScoreV2(),
|
new ModScoreV2(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
case ModType.Special:
|
||||||
|
return new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModRateAdjustConcrete(),
|
||||||
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Array.Empty<Mod>();
|
return Array.Empty<Mod>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,6 +183,9 @@ namespace osu.Game.Graphics
|
|||||||
case ModType.System:
|
case ModType.System:
|
||||||
return Yellow;
|
return Yellow;
|
||||||
|
|
||||||
|
case ModType.Special:
|
||||||
|
return Orange2;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type");
|
throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
yield return createModColumnContent(ModType.Automation);
|
yield return createModColumnContent(ModType.Automation);
|
||||||
yield return createModColumnContent(ModType.Conversion);
|
yield return createModColumnContent(ModType.Conversion);
|
||||||
yield return createModColumnContent(ModType.Fun);
|
yield return createModColumnContent(ModType.Fun);
|
||||||
|
yield return createModColumnContent(ModType.Special);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ColumnDimContainer createModColumnContent(ModType modType)
|
private ColumnDimContainer createModColumnContent(ModType modType)
|
||||||
|
|||||||
22
osu.Game/Rulesets/Mods/IApplicableFailExit.cs
Normal file
22
osu.Game/Rulesets/Mods/IApplicableFailExit.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a mod which can override a fail and quit the game instead.
|
||||||
|
/// </summary>
|
||||||
|
public interface IApplicableFailExit : IApplicableMod
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether we should allow failing at the current point in time.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Whether the fail should be allowed to proceed. Return false to block.</returns>
|
||||||
|
bool PerformFail();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether we want to exit the game on fail. Only used if <see cref="PerformFail"/> returns true.
|
||||||
|
/// </summary>
|
||||||
|
bool ExitOnFail { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using osu.Game;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An interface for mods that apply changes to the <see cref="OsuGameBase"/>.
|
|
||||||
/// This is really stupid and f%%king dangerous, possibly disasterous even.
|
|
||||||
/// </summary>
|
|
||||||
public interface IApplicableToOsuGameBase : IApplicableMod
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Provide a <see cref="OsuGameBase"/>. Called once on initialisation of a play instance.
|
|
||||||
/// </summary>
|
|
||||||
void ApplyToOsuGameBase(OsuGameBase game);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -127,7 +127,9 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// The settings are returned in ascending key order as per <see cref="SettingsMap"/>.
|
/// The settings are returned in ascending key order as per <see cref="SettingsMap"/>.
|
||||||
/// The ordering is intentionally enforced manually, as ordering of <see cref="Dictionary{TKey,TValue}.Values"/> is unspecified.
|
/// The ordering is intentionally enforced manually, as ordering of <see cref="Dictionary{TKey,TValue}.Values"/> is unspecified.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal IEnumerable<IBindable> SettingsBindables => SettingsMap.OrderBy(pair => pair.Key).Select(pair => pair.Value);
|
internal IEnumerable<IBindable> SettingsBindables => SettingsMap.OrderBy(pair => pair.Key)
|
||||||
|
.Select(pair => pair.Value)
|
||||||
|
.Where(x => !x.GetType().GetCustomAttributes(typeof(JsonIgnoreAttribute)).Any());
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides mapping of names to <see cref="IBindable"/>s of all settings within this mod.
|
/// Provides mapping of names to <see cref="IBindable"/>s of all settings within this mod.
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// - Hit windows differ (https://github.com/ppy/osu/issues/11311).
|
/// - Hit windows differ (https://github.com/ppy/osu/issues/11311).
|
||||||
/// - Sliders always gives combo for slider end, even on miss (https://github.com/ppy/osu/issues/11769).
|
/// - Sliders always gives combo for slider end, even on miss (https://github.com/ppy/osu/issues/11769).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed override bool Ranked => false;
|
public sealed override bool Ranked => true;
|
||||||
|
|
||||||
public sealed override bool ValidForFreestyleAsRequiredMod => false;
|
public sealed override bool ValidForFreestyleAsRequiredMod => false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModDaycore;
|
public override IconUsage? Icon => OsuIcon.ModDaycore;
|
||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override LocalisableString Description => "Whoaaaaa...";
|
public override LocalisableString Description => "Whoaaaaa...";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModDoubleTime;
|
public override IconUsage? Icon => OsuIcon.ModDoubleTime;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Zoooooooooom...";
|
public override LocalisableString Description => "Zoooooooooom...";
|
||||||
public override bool Ranked => SpeedChange.IsDefault;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override double ScoreMultiplier => 0.5;
|
public override double ScoreMultiplier => 0.5;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock), typeof(ModDifficultyAdjust) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock), typeof(ModDifficultyAdjust) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
public override bool ValidForFreestyleAsRequiredMod => true;
|
public override bool ValidForFreestyleAsRequiredMod => true;
|
||||||
|
|
||||||
protected const float ADJUST_RATIO = 0.5f;
|
protected const float ADJUST_RATIO = 0.5f;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
@@ -9,17 +10,23 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
public abstract class ModFailCondition : Mod, IApplicableToHealthProcessor, IApplicableFailOverride
|
public abstract class ModFailCondition : Mod, IApplicableToHealthProcessor, IApplicableFailOverride, IApplicableFailExit
|
||||||
{
|
{
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModNoFail), typeof(ModCinema) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModNoFail), typeof(ModCinema) };
|
||||||
|
|
||||||
[SettingSource("Restart on fail", "Automatically restarts when failed.")]
|
[SettingSource("Restart on fail", "Automatically restarts when failed.")]
|
||||||
public BindableBool Restart { get; } = new BindableBool();
|
public BindableBool Restart { get; } = new BindableBool();
|
||||||
|
|
||||||
|
[SettingSource("Exit game on fail", "Automatically exits the game when failed."), JsonIgnore]
|
||||||
|
public BindableBool Exit { get; } = new BindableBool();
|
||||||
|
|
||||||
public virtual bool PerformFail() => true;
|
public virtual bool PerformFail() => true;
|
||||||
|
|
||||||
public virtual bool RestartOnFail => Restart.Value;
|
public virtual bool RestartOnFail => Restart.Value;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool ExitOnFail => Exit.Value;
|
||||||
|
|
||||||
private Action? triggerFailureDelegate;
|
private Action? triggerFailureDelegate;
|
||||||
|
|
||||||
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
||||||
@@ -39,7 +46,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="healthProcessor">The loaded <see cref="HealthProcessor"/>.</param>
|
/// <param name="healthProcessor">The loaded <see cref="HealthProcessor"/>.</param>
|
||||||
/// <param name="result">The latest <see cref="JudgementResult"/>.</param>
|
/// <param name="result">The latest <see cref="JudgementResult"/>.</param>
|
||||||
/// <returns>Whether the fail condition has been met.</returns>
|
/// <returns>Whether the fail condition has been met.</returns>z
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This method should only be used to trigger failures based on <paramref name="result"/>.
|
/// This method should only be used to trigger failures based on <paramref name="result"/>.
|
||||||
/// Using outside values to evaluate failure may introduce event ordering discrepancies, use
|
/// Using outside values to evaluate failure may introduce event ordering discrepancies, use
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModFlashlight;
|
public override IconUsage? Icon => OsuIcon.ModFlashlight;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Restricted view area.";
|
public override LocalisableString Description => "Restricted view area.";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||||
public abstract BindableFloat SizeMultiplier { get; }
|
public abstract BindableFloat SizeMultiplier { get; }
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModHalfTime;
|
public override IconUsage? Icon => OsuIcon.ModHalfTime;
|
||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override LocalisableString Description => "Less zoom...";
|
public override LocalisableString Description => "Less zoom...";
|
||||||
public override bool Ranked => SpeedChange.IsDefault;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Everything just got a bit harder...";
|
public override LocalisableString Description => "Everything just got a bit harder...";
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
public override bool ValidForFreestyleAsRequiredMod => true;
|
public override bool ValidForFreestyleAsRequiredMod => true;
|
||||||
|
|
||||||
protected const float ADJUST_RATIO = 1.4f;
|
protected const float ADJUST_RATIO = 1.4f;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override string Acronym => "HD";
|
public override string Acronym => "HD";
|
||||||
public override IconUsage? Icon => OsuIcon.ModHidden;
|
public override IconUsage? Icon => OsuIcon.ModHidden;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public virtual void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
public virtual void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModNightcore;
|
public override IconUsage? Icon => OsuIcon.ModNightcore;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Uguuuuuuuu...";
|
public override LocalisableString Description => "Uguuuuuuuu...";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override LocalisableString Description => "You can't fail, no matter what.";
|
public override LocalisableString Description => "You can't fail, no matter what.";
|
||||||
public override double ScoreMultiplier => 0.5;
|
public override double ScoreMultiplier => 0.5;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModFailCondition), typeof(ModCinema) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModFailCondition), typeof(ModCinema) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
public override bool ValidForFreestyleAsRequiredMod => true;
|
public override bool ValidForFreestyleAsRequiredMod => true;
|
||||||
|
|
||||||
private readonly Bindable<bool> showHealthBar = new Bindable<bool>();
|
private readonly Bindable<bool> showHealthBar = new Bindable<bool>();
|
||||||
|
|||||||
47
osu.Game/Rulesets/Mods/ModRateAdjustConcrete.cs
Normal file
47
osu.Game/Rulesets/Mods/ModRateAdjustConcrete.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Overlays.Settings;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
public abstract class ModRateAdjustConcrete : ModRateAdjust
|
||||||
|
{
|
||||||
|
public override string Name => "Rate Adjust";
|
||||||
|
public override LocalisableString Description => "[DEBUG BUILDS ONLY] Set any speed";
|
||||||
|
public override string Acronym => "_R";
|
||||||
|
private readonly RateAdjustModHelper rateAdjustHelper;
|
||||||
|
|
||||||
|
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||||
|
{
|
||||||
|
MinValue = 0.1, // BASS breaks at lower rates
|
||||||
|
MaxValue = 10,
|
||||||
|
Precision = 0.01
|
||||||
|
};
|
||||||
|
|
||||||
|
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||||
|
public virtual BindableBool AdjustPitch { get; } = new BindableBool();
|
||||||
|
|
||||||
|
|
||||||
|
protected ModRateAdjustConcrete()
|
||||||
|
{
|
||||||
|
rateAdjustHelper = new RateAdjustModHelper(SpeedChange);
|
||||||
|
rateAdjustHelper.HandleAudioAdjustments(AdjustPitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override double ScoreMultiplier => 1.0;
|
||||||
|
public override void ApplyToTrack(IAdjustableAudioComponent track)
|
||||||
|
{
|
||||||
|
rateAdjustHelper.ApplyToTrack(track);
|
||||||
|
}
|
||||||
|
public override bool Ranked => false;
|
||||||
|
public override ModType Type => ModType.Special;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Conversion,
|
Conversion,
|
||||||
Automation,
|
Automation,
|
||||||
Fun,
|
Fun,
|
||||||
System
|
System,
|
||||||
|
Special
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
// if the dialog has already displayed and been accepted by the user, we are good.
|
// if the dialog has already displayed and been accepted by the user, we are good.
|
||||||
&& !exitConfirmedViaDialog
|
&& !exitConfirmedViaDialog
|
||||||
// Only require confirmation if there is either an ongoing operation or the user exited via a non-hold escape press.
|
// Only require confirmation if there is either an ongoing operation or the user exited via a non-hold escape press.
|
||||||
&& (notifications.HasOngoingOperations || !exitConfirmedViaHoldOrClick);
|
&& (notifications.HasOngoingOperations /* || !exitConfirmedViaHoldOrClick */);
|
||||||
|
|
||||||
if (requiresConfirmation)
|
if (requiresConfirmation)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -983,6 +983,14 @@ namespace osu.Game.Screens.Play
|
|||||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||||
PauseOverlay.Hide();
|
PauseOverlay.Hide();
|
||||||
|
|
||||||
|
bool exitOnFail = GameplayState.Mods.OfType<IApplicableFailExit>().Any(m => m.ExitOnFail);
|
||||||
|
if (exitOnFail)
|
||||||
|
{
|
||||||
|
// game.AttemptExit();
|
||||||
|
game.Exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
|
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
|
||||||
if (!restartOnFail)
|
if (!restartOnFail)
|
||||||
failAnimationContainer.Start();
|
failAnimationContainer.Start();
|
||||||
|
|||||||
Reference in New Issue
Block a user