Skip to content

Commit

Permalink
Fixed bug with external names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Razmoth committed Sep 30, 2024
1 parent 5bce05f commit f47bdd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Audio/Entries/Entry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Audio.Chunks;
using Audio.Conversion;
using Audio.Utils;
using System.Buffers;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
Expand All @@ -13,9 +12,9 @@ public abstract record Entry : IBankReadable
public uint Offset { get; set; }
public uint Size { get; set; }
public uint Folder { get; set; }
public string? Name { get; set; }
public EntryType Type { get; set; }
public string Source => Parent?.Source ?? "";
public virtual string? Name { get; set; }
public virtual string? Location => $"{FolderName}/{Name}";
public virtual string FolderName => Parent is AKPK akpk && akpk.FoldersDict.TryGetValue(Folder, out string? name) == true ? name : "None";

Expand Down
1 change: 1 addition & 0 deletions Audio/Entries/External.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Audio.Entries;
public record External : TaggedEntry<ulong>
{
public override string? Name => ID.ToString();
public override string? Location => string.IsNullOrEmpty(Name) ? $"{FolderName}/{Name}.wem" : Name + (Path.GetExtension(Name) == ".wem" ? "" : ".wem");

public External() : base(EntryType.External) { }
Expand Down

0 comments on commit f47bdd0

Please sign in to comment.