Skip to content

Commit

Permalink
Fix Dependencies JSON parse
Browse files Browse the repository at this point in the history
  • Loading branch information
cooolbros committed Dec 20, 2023
1 parent a7a312f commit 987ae17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/HUDMerger/Models/Dependencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public class Dependencies
{
private static readonly Dependencies PropertyNames = JsonSerializer.Deserialize<Dependencies>(File.ReadAllText("Resources\\Dependencies.json"))!;

public SchemeDependencies ClientScheme { get; } = new();
public SchemeDependencies SourceScheme { get; } = new();
public HashSet<string> HUDLayout { get; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Events { get; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> LanguageTokens { get; } = new(StringComparer.OrdinalIgnoreCase);
public FilesHashSet Images { get; } = [];
public FilesHashSet Audio { get; } = [];
public FilesHashSet Files { get; } = [];
public SchemeDependencies ClientScheme { get; init; } = new();
public SchemeDependencies SourceScheme { get; init; } = new();
public HashSet<string> HUDLayout { get; init; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Events { get; init; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> LanguageTokens { get; init; } = new(StringComparer.OrdinalIgnoreCase);
public FilesHashSet Images { get; init; } = [];
public FilesHashSet Audio { get; init; } = [];
public FilesHashSet Files { get; init; } = [];

public Dependencies()
{
Expand Down Expand Up @@ -131,7 +131,7 @@ public void Add(KeyValues keyValues)
{
if (keyValue.Key.Contains(audioProperty, StringComparison.OrdinalIgnoreCase))
{
Images.Add($"sound\\{keyValue.Value}");
Audio.Add($"sound\\{keyValue.Value}");
}
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/HUDMerger/Models/SchemeDependencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace HUDMerger.Models;

public class SchemeDependencies
{
public HashSet<string> Colours { get; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Borders { get; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Fonts { get; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Colours { get; init; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Borders { get; init; } = new(StringComparer.OrdinalIgnoreCase);
public HashSet<string> Fonts { get; init; } = new(StringComparer.OrdinalIgnoreCase);

public void UnionWith(SchemeDependencies other)
{
Expand Down

0 comments on commit 987ae17

Please sign in to comment.