feat: dump codename for characters

This commit is contained in:
2026-06-19 09:25:13 -03:00
parent a9fa773f36
commit b1e4058b22
+4 -3
View File
@@ -18,6 +18,7 @@ using Newtonsoft.Json;
struct CharacterInfo struct CharacterInfo
{ {
public string name; public string name;
public string codeName;
public int idx; public int idx;
public string iconFilePath; public string iconFilePath;
} }
@@ -61,7 +62,6 @@ struct CustomizationItemInfo
public ECustomizationCategory category; public ECustomizationCategory category;
} }
struct AddonInfo struct AddonInfo
{ {
public string id { get; set; } public string id { get; set; }
@@ -165,12 +165,13 @@ class Dumper
if (charIndex == -1) return; // there is a -1 character (template, placeholder, spectator or smth) if (charIndex == -1) return; // there is a -1 character (template, placeholder, spectator or smth)
if (!TryGetStringProp<FText>(props, "DisplayName", out string charName) || !TryGetStringProp<FName>(props, "IconFilePath", out string charIconFilePath)) if (!TryGetStringProp<FName>(props, "CharacterCodename", out string codeName) || !TryGetStringProp<FText>(props, "DisplayName", out string charName) || !TryGetStringProp<FName>(props, "IconFilePath", out string charIconFilePath))
throw new KeyNotFoundException("DisplayName or IconFilePath was not found."); throw new KeyNotFoundException($"Required properties missing for Character: {rowKey}");
_characterMap[charIndex] = new CharacterInfo _characterMap[charIndex] = new CharacterInfo
{ {
name = charName, name = charName,
codeName = codeName,
idx = charIndex, idx = charIndex,
iconFilePath = charIconFilePath iconFilePath = charIconFilePath
}; };