feat: dump item icons

This commit is contained in:
2026-06-18 17:59:34 -03:00
parent 37c7fbe8d0
commit fd25b1c43a
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -222,6 +222,21 @@ class Dumper
_log.Info("Dumped all items");
}
public void DumpItemIcons()
{
if (_provider == null)
throw new InvalidOperationException("Attempted to call dump function without dumper initialization");
_log.Info("Dumping item icons");
foreach (ItemInfo info in _itemMap.Values)
ExportIcon(info.iconFilePath, "/item-icons/");
_log.Info("Dumped all item icons");
return;
}
/*
* internal helper functions
*/
@@ -241,6 +256,7 @@ class Dumper
value = default!;
return false;
}
private bool TryGetStringProp<T>(IEnumerable<FPropertyTag> properties, string propName, out string value)
{
if (TryGetProp<T>(properties, propName, out T? rawValue) && rawValue != null)