fix: use badge icon file pattern to exclude badge items from audit and repair
Previously identified badge items by interaction_type='badge', but clone-imported badges have interaction_type='default'. Now checks for badge_<code>_icon.png file existence instead.
This commit is contained in:
1 parent
40da24bd8c
commit
1167a48344
2 files changed
+8
-17
No files matched your search
@@ -154,18 +154,16 @@ export async function runCatalogAudit(
|
||||
item_name: string;
|
||||
public_name: string;
|
||||
type: string;
|
||||
interaction_type: string;
|
||||
}>;
|
||||
try {
|
||||
const [rows] = (await db.execute(sql`
|
||||
SELECT id, item_name, public_name, type, interaction_type FROM items_base ORDER BY id
|
||||
SELECT id, item_name, public_name, type FROM items_base ORDER BY id
|
||||
`)) as unknown as [
|
||||
Array<{
|
||||
id: number;
|
||||
item_name: string;
|
||||
public_name: string;
|
||||
type: string;
|
||||
interaction_type: string;
|
||||
}>,
|
||||
unknown,
|
||||
];
|
||||
@@ -246,7 +244,7 @@ export async function runCatalogAudit(
|
||||
// entry for a furni without a bundle would be un-placeable in-game.
|
||||
// Badge items use .gif files, not .nitro bundles.
|
||||
if (
|
||||
item.interaction_type !== "badge" &&
|
||||
!iconSet.has(`badge_${item.item_name}_icon.png`) &&
|
||||
nitroSet.has(`${item.item_name}.nitro`)
|
||||
) {
|
||||
missingCatalogEntries.push({
|
||||
@@ -318,7 +316,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 (item.interaction_type === "badge") continue;
|
||||
if (iconSet.has(`badge_${item.item_name}_icon.png`)) continue;
|
||||
if (!nitroSet.has(`${item.item_name}.nitro`)) {
|
||||
missingNitroClassnames.push(item.item_name);
|
||||
issues.push({
|
||||
|
||||
Reference in new issue
Block a user