Fix badge icon detection in catalog audit and repair
Badge icons are stored as badge_<code>_icon.png (with badge_ prefix) instead of <code>_icon.png like regular furni. Update the audit and icon repair to check for both patterns so badge items are not falsely flagged as missing icons.
This commit is contained in:
1 parent
e97213e5d1
commit
40da24bd8c
2 files changed
+17
-19
No files matched your search
@@ -344,9 +344,11 @@ export async function runCatalogAudit(
|
||||
const missingIconClassnames: string[] = [];
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
// Badge items use .gif icons, not .png icons.
|
||||
if (item.interaction_type === "badge") continue;
|
||||
if (!iconSet.has(`${item.item_name}_icon.png`)) {
|
||||
// Badge items use .gif icons stored as badge_<code>_icon.png,
|
||||
// not <code>_icon.png like regular furni.
|
||||
const iconFileName = `${item.item_name}_icon.png`;
|
||||
const badgeIconFileName = `badge_${item.item_name}_icon.png`;
|
||||
if (!iconSet.has(iconFileName) && !iconSet.has(badgeIconFileName)) {
|
||||
missingIconClassnames.push(item.item_name);
|
||||
issues.push({
|
||||
type: "missing_icon",
|
||||
|
||||
Reference in new issue
Block a user