Skip to content

Commit 6f3f000

Browse files
committed
Format with csharpier
1 parent a9bc9bf commit 6f3f000

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

Extensions/LevelExtensions.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ public static class LevelExtensions
1010
/// All levels that have a rank (not boss levels).
1111
/// Includes bonus levels such as Beans Hopper and Rhythm Weightlifter.
1212
/// </summary>
13-
public static readonly Level[] AllStandardLevels = [
13+
public static readonly Level[] AllStandardLevels =
14+
[
1415
// Act 1
1516
Level.OrientalTechno,
1617
Level.OrientalDubstep,
@@ -65,7 +66,8 @@ public static class LevelExtensions
6566
/// <summary>
6667
/// All boss levels.
6768
/// </summary>
68-
public static readonly Level[] AllBossLevels = [
69+
public static readonly Level[] AllBossLevels =
70+
[
6971
Level.OrientalInsomniac,
7072
Level.Boss2,
7173
Level.Lesmis,
@@ -76,15 +78,13 @@ public static class LevelExtensions
7678
/// <summary>
7779
/// All bonus levels.
7880
/// </summary>
79-
public static readonly Level[] AllBonusLevels = [
80-
Level.BeansHopper,
81-
Level.RhythmWeightlifter,
82-
];
81+
public static readonly Level[] AllBonusLevels = [Level.BeansHopper, Level.RhythmWeightlifter];
8382

8483
/// <summary>
8584
/// All intermission levels.
8685
/// </summary>
87-
public static readonly Level[] AllIntermissionLevels = [
86+
public static readonly Level[] AllIntermissionLevels =
87+
[
8888
Level.SongOfTheSea,
8989
Level.SongOfTheSeaH,
9090
Level.AthleteTherapy,

Localization/LocalizationHelpers.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
using Newtonsoft.Json;
21
using System.IO;
2+
using Newtonsoft.Json;
33

44
namespace PulseLib.Localization;
55

66
public static class LocalizationHelpers
77
{
88
private static Dictionary<LangCode, Dictionary<string, string>> Data = new();
99

10-
public static bool Exists(LangCode language, string key)
11-
=> TryGetLocalizedString(language, key, out _);
10+
public static bool Exists(LangCode language, string key) => TryGetLocalizedString(language, key, out _);
1211

1312
public static bool TryGetLocalizedString(LangCode language, string key, out string value)
1413
{
@@ -27,8 +26,8 @@ public static bool TryGetLocalizedString(LangCode language, string key, out stri
2726
return true;
2827
}
2928

30-
public static void Register(LangCode language, KeyValuePair<string, string> localizedString)
31-
=> Register(language, localizedString.Key, localizedString.Value);
29+
public static void Register(LangCode language, KeyValuePair<string, string> localizedString) =>
30+
Register(language, localizedString.Key, localizedString.Value);
3231

3332
public static void Register(LangCode language, string key, string value)
3433
{
@@ -43,13 +42,15 @@ public static void Register(LangCode language, string key, string value)
4342
public static void RegisterJson(LangCode language, string data)
4443
{
4544
Plugin.Logger.LogDebug($"Registering {data} for {language}");
46-
Dictionary<string, Dictionary<string, string>> values = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(data) ?? throw new ArgumentNullException();
45+
Dictionary<string, Dictionary<string, string>> values =
46+
JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(data)
47+
?? throw new ArgumentNullException();
4748
foreach (KeyValuePair<string, string> localizedString in values["Translations"])
4849
{
4950
Register(language, localizedString);
5051
}
5152
}
5253

53-
public static void LoadAndRegisterJson(LangCode language, string path)
54-
=> RegisterJson(language, File.ReadAllText(path));
54+
public static void LoadAndRegisterJson(LangCode language, string path) =>
55+
RegisterJson(language, File.ReadAllText(path));
5556
}

0 commit comments

Comments
 (0)