fix: correct badge item detection by checking classname prefix
Badge item_names already start with 'badge_' (e.g. badge_citycpa3),
so checking for badge_<item_name>_icon.png produces a double prefix
(badge_badge_citycpa3_icon.png). Now uses item_name.startsWith('badge_')
instead, which correctly identifies badge items without depending on
icon files existing in the directory.
This commit is contained in:
1 parent
1167a48344
commit
750973de38
3 files changed
+10
-11
No files matched your search
@@ -240,11 +240,9 @@ export async function runCatalogAudit(
|
||||
itemId: item.id,
|
||||
message: `"${item.item_name}" (ID ${item.id}) has no catalog_items entry — not purchasable`,
|
||||
});
|
||||
// Only include items that actually have a .nitro asset — a catalog
|
||||
// entry for a furni without a bundle would be un-placeable in-game.
|
||||
// Badge items use .gif files, not .nitro bundles.
|
||||
if (
|
||||
!iconSet.has(`badge_${item.item_name}_icon.png`) &&
|
||||
!item.item_name.startsWith("badge_") &&
|
||||
nitroSet.has(`${item.item_name}.nitro`)
|
||||
) {
|
||||
missingCatalogEntries.push({
|
||||
@@ -316,7 +314,7 @@ export async function runCatalogAudit(
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
// Badge items use .gif files, not .nitro bundles.
|
||||
if (iconSet.has(`badge_${item.item_name}_icon.png`)) continue;
|
||||
if (item.item_name.startsWith("badge_")) continue;
|
||||
if (!nitroSet.has(`${item.item_name}.nitro`)) {
|
||||
missingNitroClassnames.push(item.item_name);
|
||||
issues.push({
|
||||
|
||||
Reference in new issue
Block a user