Skip to content

Commit

Permalink
style: reformat small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Apr 17, 2024
1 parent 52454d8 commit bf74314
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions Osu.Patcher.Hook/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public class Settings
[XmlIgnore]
public static Settings Default = new();

#region Options

public bool EnableModAudioPreview { get; set; } = true;

#endregion

/// <summary>
/// Handles reading the patcher options from disk.
/// </summary>
Expand Down Expand Up @@ -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
{
Expand All @@ -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
}
1 change: 0 additions & 1 deletion Osu.Stubs/Helpers/Obfuscated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace Osu.Stubs.Helpers;

// TODO: make this into a generic wrapper like Bindable/OptionDropdown
[PublicAPI]
public class Obfuscated
{
Expand Down
6 changes: 6 additions & 0 deletions osu-patcher.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Akatsuki/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=devserver/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=lazer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nightcore/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rosu/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 comments on commit bf74314

Please sign in to comment.