Skip to content

Commit f47bdd0

Browse files
committed
Fixed bug with external names.
1 parent 5bce05f commit f47bdd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Audio/Entries/Entry.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Audio.Chunks;
22
using Audio.Conversion;
3-
using Audio.Utils;
43
using System.Buffers;
54
using System.Diagnostics.CodeAnalysis;
65
using System.Text.Json.Serialization;
@@ -13,9 +12,9 @@ public abstract record Entry : IBankReadable
1312
public uint Offset { get; set; }
1413
public uint Size { get; set; }
1514
public uint Folder { get; set; }
16-
public string? Name { get; set; }
1715
public EntryType Type { get; set; }
1816
public string Source => Parent?.Source ?? "";
17+
public virtual string? Name { get; set; }
1918
public virtual string? Location => $"{FolderName}/{Name}";
2019
public virtual string FolderName => Parent is AKPK akpk && akpk.FoldersDict.TryGetValue(Folder, out string? name) == true ? name : "None";
2120

Audio/Entries/External.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Audio.Entries;
22
public record External : TaggedEntry<ulong>
33
{
4+
public override string? Name => ID.ToString();
45
public override string? Location => string.IsNullOrEmpty(Name) ? $"{FolderName}/{Name}.wem" : Name + (Path.GetExtension(Name) == ".wem" ? "" : ".wem");
56

67
public External() : base(EntryType.External) { }

0 commit comments

Comments
 (0)