mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
维护设置本地化、代码质量
This commit is contained in:
@@ -191,7 +191,7 @@ namespace osu.Game.Rulesets.Mania.LAsEZMania.Helper
|
||||
double meh = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(OverallDifficulty, meh_window_range) * TotalMultiplier) + 0.5;
|
||||
double miss = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(OverallDifficulty, miss_window_range) * TotalMultiplier) + 0.5;
|
||||
double poor = miss;
|
||||
SetRanges(perfect, great, good, ok, meh, miss, poor);
|
||||
setRanges(perfect, great, good, ok, meh, miss, poor);
|
||||
break;
|
||||
|
||||
case EzEnumHitMode.O2Jam:
|
||||
@@ -329,7 +329,7 @@ namespace osu.Game.Rulesets.Mania.LAsEZMania.Helper
|
||||
}
|
||||
}
|
||||
|
||||
private void SetRanges(double range305, double range300, double range200, double range100, double range050, double range000, double poorRange)
|
||||
private void setRanges(double range305, double range300, double range200, double range100, double range050, double range000, double poorRange)
|
||||
{
|
||||
Range305 = range305;
|
||||
Range300 = range300;
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace osu.Game.Rulesets.Mania.LAsEzMania.Mods.LAsMods
|
||||
}
|
||||
|
||||
// In-place Cooley-Tukey FFT (radix-2)
|
||||
private static void FFT(Complex[] buffer, bool inverse)
|
||||
private static void fft(Complex[] buffer, bool inverse)
|
||||
{
|
||||
int n = buffer.Length;
|
||||
int bits = (int)Math.Log(n, 2);
|
||||
|
||||
@@ -32,9 +32,7 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
||||
public ManiaHealthProcessor(double drainStartTime)
|
||||
: base(drainStartTime)
|
||||
{
|
||||
if (GlobalConfigStore.EzConfig != null)
|
||||
mode = GlobalConfigStore.EzConfig.Get<EzEnumHealthMode>(Ez2Setting.CustomHealthMode);
|
||||
|
||||
mode = GlobalConfigStore.EzConfig.Get<EzEnumHealthMode>(Ez2Setting.CustomHealthMode);
|
||||
row = switchHealthMode(mode);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
|
||||
// Logger.Log("!GlobalConfigStore.EzConfig Ez2Skin", LoggingTarget.Runtime, LogLevel.Important);
|
||||
// }
|
||||
|
||||
var ezSkinConfig1 = GlobalConfigStore.EzConfig!;
|
||||
var ezSkinConfig1 = GlobalConfigStore.EzConfig;
|
||||
|
||||
// this.ezSkinSettings = ezSkinSettings ?? throw new ArgumentNullException(nameof(ezSkinSettings));
|
||||
columnWidthBindable = ezSkinConfig1.GetBindable<double>(Ez2Setting.ColumnWidth);
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
public Bindable<string> SlowText { get; } = new Bindable<string>("Slow");
|
||||
|
||||
[SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.FAST_COLOUR_STYLE), nameof(FastSlowDisplayStrings.FAST_COLOUR_STYLE_DESCRIPTION))]
|
||||
public Bindable<ColourStyle> FastColourStyle { get; } = new Bindable<ColourStyle>();
|
||||
public Bindable<YuColourStyle> FastColourStyle { get; } = new Bindable<YuColourStyle>();
|
||||
|
||||
[SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.FAST_COLOUR), nameof(FastSlowDisplayStrings.TEXT_COLOUR_DESCRIPTION))]
|
||||
public BindableColour4 FastColour { get; } = new BindableColour4(Colour4.FromHex("#97A5FF"));
|
||||
@@ -88,7 +88,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
public BindableColour4 FastColourGradient { get; } = new BindableColour4(Colour4.LightPink);
|
||||
|
||||
[SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SLOW_COLOUR_STYLE), nameof(FastSlowDisplayStrings.SLOW_COLOUR_STYLE_DESCRIPTION))]
|
||||
public Bindable<ColourStyle> SlowColourStyle { get; } = new Bindable<ColourStyle>();
|
||||
public Bindable<YuColourStyle> SlowColourStyle { get; } = new Bindable<YuColourStyle>();
|
||||
|
||||
[SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SLOW_COLOUR), nameof(FastSlowDisplayStrings.TEXT_COLOUR_DESCRIPTION))]
|
||||
public BindableColour4 SlowColour { get; } = new BindableColour4(Colour4.FromHex("#D1FF74"));
|
||||
@@ -119,7 +119,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
public BindableBool OnlyDisplayOne { get; } = new BindableBool(false);
|
||||
|
||||
[SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SELECT_COLUMN), nameof(FastSlowDisplayStrings.SELECT_COLUMN_DESCRIPTION))]
|
||||
public Bindable<Column> SelectColumn { get; } = new Bindable<Column>();
|
||||
public Bindable<YuColumnPosition> SelectColumn { get; } = new Bindable<YuColumnPosition>();
|
||||
|
||||
private Container textContainer = null!;
|
||||
private Container fast = null!;
|
||||
@@ -256,15 +256,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
|
||||
FastColourStyle.BindValueChanged(e =>
|
||||
{
|
||||
if (e.NewValue == ColourStyle.SingleColour)
|
||||
if (e.NewValue == YuColourStyle.SingleColour)
|
||||
{
|
||||
SetFastTextColour(FastColour.Value);
|
||||
}
|
||||
else if (e.NewValue == ColourStyle.HorizontalGradient)
|
||||
else if (e.NewValue == YuColourStyle.HorizontalGradient)
|
||||
{
|
||||
SetFastTextColour(FastColour.Value, FastColourGradient.Value);
|
||||
}
|
||||
else if (e.NewValue == ColourStyle.VerticalGradient)
|
||||
else if (e.NewValue == YuColourStyle.VerticalGradient)
|
||||
{
|
||||
SetFastTextColour(FastColour.Value, FastColourGradient.Value);
|
||||
}
|
||||
@@ -272,15 +272,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
|
||||
SlowColourStyle.BindValueChanged(e =>
|
||||
{
|
||||
if (e.NewValue == ColourStyle.SingleColour)
|
||||
if (e.NewValue == YuColourStyle.SingleColour)
|
||||
{
|
||||
SetSlowTextColour(SlowColour.Value);
|
||||
}
|
||||
else if (e.NewValue == ColourStyle.HorizontalGradient)
|
||||
else if (e.NewValue == YuColourStyle.HorizontalGradient)
|
||||
{
|
||||
SetSlowTextColour(SlowColour.Value, SlowColourGradient.Value);
|
||||
}
|
||||
else if (e.NewValue == ColourStyle.VerticalGradient)
|
||||
else if (e.NewValue == YuColourStyle.VerticalGradient)
|
||||
{
|
||||
SetSlowTextColour(SlowColour.Value, SlowColourGradient.Value);
|
||||
}
|
||||
@@ -427,15 +427,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
|
||||
displayFastText.Colour = colour;
|
||||
|
||||
if (gradient != null && FastColourStyle.Value != ColourStyle.SingleColour)
|
||||
if (gradient != null && FastColourStyle.Value != YuColourStyle.SingleColour)
|
||||
{
|
||||
FastColourGradient.Value = gradient.Value;
|
||||
|
||||
if (FastColourStyle.Value == ColourStyle.HorizontalGradient)
|
||||
if (FastColourStyle.Value == YuColourStyle.HorizontalGradient)
|
||||
{
|
||||
displayFastText.Colour = ColourInfo.GradientHorizontal(colour, gradient.Value);
|
||||
}
|
||||
else if (FastColourStyle.Value == ColourStyle.VerticalGradient)
|
||||
else if (FastColourStyle.Value == YuColourStyle.VerticalGradient)
|
||||
{
|
||||
displayFastText.Colour = ColourInfo.GradientVertical(colour, gradient.Value);
|
||||
}
|
||||
@@ -447,15 +447,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
SlowColour.Value = colour;
|
||||
displaySlowText.Colour = colour;
|
||||
|
||||
if (gradient != null && FastColourStyle.Value != ColourStyle.SingleColour)
|
||||
if (gradient != null && FastColourStyle.Value != YuColourStyle.SingleColour)
|
||||
{
|
||||
SlowColourGradient.Value = gradient.Value;
|
||||
|
||||
if (SlowColourStyle.Value == ColourStyle.HorizontalGradient)
|
||||
if (SlowColourStyle.Value == YuColourStyle.HorizontalGradient)
|
||||
{
|
||||
displaySlowText.Colour = ColourInfo.GradientHorizontal(colour, gradient.Value);
|
||||
}
|
||||
else if (SlowColourStyle.Value == ColourStyle.VerticalGradient)
|
||||
else if (SlowColourStyle.Value == YuColourStyle.VerticalGradient)
|
||||
{
|
||||
displaySlowText.Colour = ColourInfo.GradientVertical(colour, gradient.Value);
|
||||
}
|
||||
@@ -507,11 +507,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
var legacyRuleset = (ILegacyRuleset)ruleset.Value.CreateInstance();
|
||||
int keys = legacyRuleset.GetKeyCount(beatmap.Value.BeatmapInfo, mods.Value);
|
||||
|
||||
if (SelectColumn.Value == Column.Middle && keys / 2.0 != Math.Truncate(keys / 2.0) && column == (keys / 2) + 1)
|
||||
if (SelectColumn.Value == YuColumnPosition.Middle && keys / 2.0 != Math.Truncate(keys / 2.0) && column == (keys / 2) + 1)
|
||||
{
|
||||
displayResult(judgement);
|
||||
}
|
||||
else if (SelectColumn.Value == Column.RightHalf && column > keys / 2.0)
|
||||
else if (SelectColumn.Value == YuColumnPosition.RightHalf && column > keys / 2.0)
|
||||
{
|
||||
if (keys % 2 != 0 && column > (keys / 2) + 1)
|
||||
{
|
||||
@@ -522,11 +522,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
displayResult(judgement);
|
||||
}
|
||||
}
|
||||
else if (SelectColumn.Value == Column.LeftHalf && column <= keys / 2.0)
|
||||
else if (SelectColumn.Value == YuColumnPosition.LeftHalf && column <= keys / 2.0)
|
||||
{
|
||||
displayResult(judgement);
|
||||
}
|
||||
else if (column >= LowerColumnBound.Value && column <= UpperColumnBound.Value && SelectColumn.Value == Column.None)
|
||||
else if (column >= LowerColumnBound.Value && column <= UpperColumnBound.Value && SelectColumn.Value == YuColumnPosition.None)
|
||||
{
|
||||
displayResult(judgement);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
{
|
||||
public partial class YuComFastSlowDisplay
|
||||
{
|
||||
public enum Column
|
||||
public enum YuColumnPosition
|
||||
{
|
||||
[LocalisableDescription(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.NONE))]
|
||||
None,
|
||||
@@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
Middle
|
||||
}
|
||||
|
||||
public enum ColourStyle
|
||||
public enum YuColourStyle
|
||||
{
|
||||
[LocalisableDescription(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SINGLE_COLOUR))]
|
||||
SingleColour,
|
||||
@@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
|
||||
VerticalGradient
|
||||
}
|
||||
|
||||
public static class FastSlowDisplayStrings
|
||||
protected static class FastSlowDisplayStrings
|
||||
{
|
||||
public static readonly LocalisableString SHOW_JUDGEMENT = new EzLocalizationManager.EzLocalisableString("判定", "Judgement");
|
||||
public static readonly LocalisableString SHOW_STYLE_DESCRIPTION = new EzLocalizationManager.EzLocalisableString("何时显示快/慢", "When to show fast/slow.");
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
|
||||
[Resolved]
|
||||
private Ez2ConfigManager ezSkinConfig { get; set; } = null!;
|
||||
|
||||
public EzJudgementLine()
|
||||
{
|
||||
// AddLayout(layout);
|
||||
}
|
||||
// public EzJudgementLine()
|
||||
// {
|
||||
// // AddLayout(layout);
|
||||
// }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(IEzSkinInfo ezSkinInfo)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
|
||||
// Logger.Log("!GlobalConfigStore.EzConfig EzStyleProSkin", LoggingTarget.Runtime, LogLevel.Important);
|
||||
// }
|
||||
|
||||
ezSkinConfig = GlobalConfigStore.EzConfig!;
|
||||
ezSkinConfig = GlobalConfigStore.EzConfig;
|
||||
|
||||
columnWidthBindable = ezSkinConfig.GetBindable<double>(Ez2Setting.ColumnWidth);
|
||||
specialFactorBindable = ezSkinConfig.GetBindable<double>(Ez2Setting.SpecialFactor);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.SbI
|
||||
// Logger.Log("!GlobalConfigStore.EzConfig SbISkin", LoggingTarget.Runtime, LogLevel.Important);
|
||||
// }
|
||||
|
||||
ezSkinConfig = GlobalConfigStore.EzConfig!;
|
||||
ezSkinConfig = GlobalConfigStore.EzConfig;
|
||||
columnWidthBindable = ezSkinConfig.GetBindable<double>(Ez2Setting.ColumnWidth);
|
||||
specialFactorBindable = ezSkinConfig.GetBindable<double>(Ez2Setting.SpecialFactor);
|
||||
hitPosition = ezSkinConfig.GetBindable<double>(Ez2Setting.HitPosition);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.EzLatency;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@@ -26,9 +25,6 @@ namespace osu.Game.LAsEzExtensions.Audio
|
||||
[Resolved(canBeNull: true)]
|
||||
private INotificationOverlay? notificationOverlay { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private AudioManager? audioManager { get; set; }
|
||||
|
||||
private Ez2ConfigManager ezConfig { get; set; }
|
||||
|
||||
private ScoreProcessor? scoreProcessor;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace osu.Game.LAsEzExtensions.Localization
|
||||
{
|
||||
public static readonly EzLocalizationManager.EzLocalisableString SCALING_GAME_MODE = new EzLocalizationManager.EzLocalisableString("缩放游戏模式", "Scaling Game Mode");
|
||||
|
||||
public static readonly EzLocalizationManager.EzLocalisableString ScalingGameModeTooltip = new EzLocalizationManager.EzLocalisableString(
|
||||
public static readonly EzLocalizationManager.EzLocalisableString SCALING_GAME_MODE_TOOLTIP = new EzLocalizationManager.EzLocalisableString(
|
||||
"缩放游戏模式会根据当前游戏模式自动调整界面元素的大小。"
|
||||
+ "\n开启后,界面元素会根据当前游戏模式进行缩放,以提供更适合的视觉体验。"
|
||||
+ "\n例如,在Mania模式下,界面元素会缩小以适应更多的列数,而在其他模式下则保持默认大小。",
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
new SettingsItemV2(new FormEnumDropdown<ScalingGameMode>
|
||||
{
|
||||
Caption = EzSettingsStrings.SCALING_GAME_MODE,
|
||||
HintText = EzSettingsStrings.ScalingGameModeTooltip,
|
||||
HintText = EzSettingsStrings.SCALING_GAME_MODE_TOOLTIP,
|
||||
Current = ezConfig.GetBindable<ScalingGameMode>(Ez2Setting.ScalingGameMode),
|
||||
})
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace osu.Game.Rulesets
|
||||
|
||||
private static readonly ConcurrentDictionary<string, IMod[]> mod_reference_cache = new ConcurrentDictionary<string, IMod[]>();
|
||||
|
||||
private Mod[]? cached_all_mods;
|
||||
private Mod[]? cachedAllMods;
|
||||
|
||||
/// <summary>
|
||||
/// Version history:
|
||||
@@ -66,7 +66,7 @@ namespace osu.Game.Rulesets
|
||||
/// <summary>
|
||||
/// A queryable source containing all available mods.
|
||||
/// Call <see cref="IMod.CreateInstance"/> for consumption purposes.
|
||||
/// /// </summary>
|
||||
/// </summary>
|
||||
public IEnumerable<IMod> AllMods
|
||||
{
|
||||
get
|
||||
@@ -91,10 +91,10 @@ namespace osu.Game.Rulesets
|
||||
/// </remarks>
|
||||
public IEnumerable<Mod> CreateAllMods()
|
||||
{
|
||||
if (cached_all_mods != null)
|
||||
return cached_all_mods;
|
||||
if (cachedAllMods != null)
|
||||
return cachedAllMods;
|
||||
|
||||
return cached_all_mods = Enum.GetValues<ModType>()
|
||||
return cachedAllMods = Enum.GetValues<ModType>()
|
||||
// Confine all mods of each mod type into a single IEnumerable<Mod>
|
||||
.SelectMany(GetModsFor)
|
||||
// Filter out all null mods
|
||||
|
||||
Reference in New Issue
Block a user