From bf743149eb9b99186773a056ee9ab152b829df54 Mon Sep 17 00:00:00 2001
From: rushiiMachine <33725716+rushiiMachine@users.noreply.github.com>
Date: Tue, 16 Apr 2024 17:18:03 -0700
Subject: [PATCH] style: reformat small issues
---
.../LivePerformance/PerformanceCalculator.cs | 2 +-
Osu.Patcher.Hook/Settings.cs | 14 +++++++-------
Osu.Stubs/Helpers/Obfuscated.cs | 1 -
osu-patcher.sln.DotSettings | 6 ++++++
4 files changed, 14 insertions(+), 9 deletions(-)
create mode 100644 osu-patcher.sln.DotSettings
diff --git a/Osu.Patcher.Hook/Patches/LivePerformance/PerformanceCalculator.cs b/Osu.Patcher.Hook/Patches/LivePerformance/PerformanceCalculator.cs
index 6eda314..b9f9bb8 100644
--- a/Osu.Patcher.Hook/Patches/LivePerformance/PerformanceCalculator.cs
+++ b/Osu.Patcher.Hook/Patches/LivePerformance/PerformanceCalculator.cs
@@ -14,7 +14,7 @@ namespace Osu.Patcher.Hook.Patches.LivePerformance;
internal static class PerformanceCalculator
{
private static readonly Obfuscated ObfuscatedModsStub = new(Stubs.Root.Mods.Type.Reference);
-
+
public static OsuPerformance? Calculator { get; private set; }
public static bool IsInitialized => Calculator != null;
diff --git a/Osu.Patcher.Hook/Settings.cs b/Osu.Patcher.Hook/Settings.cs
index 2e05370..e5b9e83 100644
--- a/Osu.Patcher.Hook/Settings.cs
+++ b/Osu.Patcher.Hook/Settings.cs
@@ -21,6 +21,12 @@ public class Settings
[XmlIgnore]
public static Settings Default = new();
+ #region Options
+
+ public bool EnableModAudioPreview { get; set; } = true;
+
+ #endregion
+
///
/// Handles reading the patcher options from disk.
///
@@ -56,7 +62,7 @@ public static void WriteToDisk(Settings settings, string osuDir)
Directory.CreateDirectory(osuDir);
var file = Path.Combine(osuDir, OptionsFilename);
- using var fs = File.OpenWrite(file);
+ using var fs = File.Open(file, FileMode.Create);
try
{
@@ -67,10 +73,4 @@ public static void WriteToDisk(Settings settings, string osuDir)
Console.WriteLine($"Failed to write config to disk: {e}");
}
}
-
- #region Options
-
- public bool EnableModAudioPreview { get; set; } = true;
-
- #endregion
}
\ No newline at end of file
diff --git a/Osu.Stubs/Helpers/Obfuscated.cs b/Osu.Stubs/Helpers/Obfuscated.cs
index 60d9dae..08f03db 100644
--- a/Osu.Stubs/Helpers/Obfuscated.cs
+++ b/Osu.Stubs/Helpers/Obfuscated.cs
@@ -5,7 +5,6 @@
namespace Osu.Stubs.Helpers;
-// TODO: make this into a generic wrapper like Bindable/OptionDropdown
[PublicAPI]
public class Obfuscated
{
diff --git a/osu-patcher.sln.DotSettings b/osu-patcher.sln.DotSettings
new file mode 100644
index 0000000..5be6121
--- /dev/null
+++ b/osu-patcher.sln.DotSettings
@@ -0,0 +1,6 @@
+
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file