feat: dump item icons
This commit is contained in:
@@ -222,6 +222,21 @@ class Dumper
|
|||||||
_log.Info("Dumped all items");
|
_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
|
* internal helper functions
|
||||||
*/
|
*/
|
||||||
@@ -241,6 +256,7 @@ class Dumper
|
|||||||
value = default!;
|
value = default!;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryGetStringProp<T>(IEnumerable<FPropertyTag> properties, string propName, out string value)
|
private bool TryGetStringProp<T>(IEnumerable<FPropertyTag> properties, string propName, out string value)
|
||||||
{
|
{
|
||||||
if (TryGetProp<T>(properties, propName, out T? rawValue) && rawValue != null)
|
if (TryGetProp<T>(properties, propName, out T? rawValue) && rawValue != null)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ log.Info("Getting item data and icons");
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
dumper.DumpItems();
|
dumper.DumpItems();
|
||||||
|
dumper.DumpItemIcons();
|
||||||
}
|
}
|
||||||
catch (Exception er)
|
catch (Exception er)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user