Skip to content

Commit

Permalink
Revert more C#12
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurochi51 committed Feb 20, 2024
1 parent 729055b commit def7e7b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PetScale/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace PetScale;
public class Configuration : IPluginConfiguration
{
public int Version { get; set; } = 0;
public IList<PetStruct> PetData { get; set; } = [];
public IList<PetStruct> PetData { get; set; } = new List<PetStruct>();


public void Save(DalamudPluginInterface pi) => pi.SavePluginConfig(this);
Expand Down
4 changes: 2 additions & 2 deletions PetScale/PetScale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public sealed class PetScale : IDalamudPlugin

private readonly CultureInfo cultureInfo = CultureInfo.InvariantCulture;
private readonly StringComparison ordinalComparison = StringComparison.Ordinal;
private readonly Dictionary<Pointer<BattleChara>, (Pointer<Character> character, bool petSet)> activePetDictionary = [];
private readonly Dictionary<string, (float smallScale, float mediumScale, float largeScale)> petSizeMap = [];
private readonly Dictionary<Pointer<BattleChara>, (Pointer<Character> character, bool petSet)> activePetDictionary = new();

Check warning on line 42 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Hash table unfriendly type is used in a hash table (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0066.md)

Check warning on line 42 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Hash table unfriendly type is used in a hash table (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0066.md)

Check warning on line 42 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Hash table unfriendly type is used in a hash table (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0066.md)

Check warning on line 42 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Hash table unfriendly type is used in a hash table (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0066.md)
private readonly Dictionary<string, (float smallScale, float mediumScale, float largeScale)> petSizeMap = new();

Check warning on line 43 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Use an overload that has a IEqualityComparer<string> or IComparer<string> parameter (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0002.md)

Check warning on line 43 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Use an overload that has a IEqualityComparer<string> or IComparer<string> parameter (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0002.md)

Check warning on line 43 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Use an overload that has a IEqualityComparer<string> or IComparer<string> parameter (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0002.md)

Check warning on line 43 in PetScale/PetScale.cs

View workflow job for this annotation

GitHub Actions / build

Use an overload that has a IEqualityComparer<string> or IComparer<string> parameter (https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0002.md)
private readonly Stopwatch stopwatch = new();
private readonly TimeSpan dictionaryExpirationTime = TimeSpan.FromMilliseconds(500); // used via .TotalMilliseconds
private const string Others = "Other players";
Expand Down
2 changes: 1 addition & 1 deletion PetScale/PetScale.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<TargetFramework>net7.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<LangVersion>11</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
Expand Down
4 changes: 2 additions & 2 deletions PetScale/Windows/DevWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace PetScale.Windows;

public class DevWindow : Window
{
private static readonly List<string> PrintLines = [];
private static readonly Queue<Pointer<GameObject>> RedrawObjects = [];
private static readonly List<string> PrintLines = new();
private static readonly Queue<Pointer<GameObject>> RedrawObjects = new();
#pragma warning disable S4487
private readonly IPluginLog log;
private readonly DalamudPluginInterface pluginInterface;
Expand Down
8 changes: 8 additions & 0 deletions manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[plugin]
repository = "https://github.com/Kurochi51/PetScale.git"
commit = "729055b78bf85fea161c91d1a8cfd7d36edf4f7c"
owners = ["Kurochi51"]
project_path = "PetScale"
changelog = """
- New plugin that allows you to control the scale of summoner pets
"""

0 comments on commit def7e7b

Please sign in to comment.