Exclude badge items from catalog audit and repair checks
Badge items use .gif files, not .nitro bundles, so they should not be flagged as missing .nitro or missing catalog entries. Also add badge logicType handling in furni-import.ts so badges get the correct interaction_type when imported.
This commit is contained in:
1 parent
1cbb33a4e2
commit
86d59195ec
4 files changed
+35
-12
No files matched your search
@@ -136,11 +136,14 @@ export async function repairMissingNitros(
|
||||
...targets.mirrorDirs.map((d) => d.nitroDir),
|
||||
]);
|
||||
|
||||
let items: Array<{ id: number; item_name: string }>;
|
||||
let items: Array<{ id: number; item_name: string; interaction_type: string }>;
|
||||
try {
|
||||
const [rows] = (await db.execute(sql`
|
||||
SELECT id, item_name FROM items_base ORDER BY id
|
||||
`)) as unknown as [Array<{ id: number; item_name: string }>, unknown];
|
||||
SELECT id, item_name, interaction_type FROM items_base ORDER BY id
|
||||
`)) as unknown as [
|
||||
Array<{ id: number; item_name: string; interaction_type: string }>,
|
||||
unknown,
|
||||
];
|
||||
items = rows;
|
||||
} catch (err) {
|
||||
onEvent?.({
|
||||
@@ -153,7 +156,11 @@ export async function repairMissingNitros(
|
||||
const total = items.length;
|
||||
onEvent?.({ type: "started", total });
|
||||
|
||||
const processItem = async (classname: string) => {
|
||||
const processItem = async (classname: string, interactionType: string) => {
|
||||
// Badge items use .gif files, not .nitro bundles.
|
||||
if (interactionType === "badge") {
|
||||
return { status: "skipped" } as const;
|
||||
}
|
||||
const fileName = `${classname}.nitro`;
|
||||
|
||||
const presentDirs = nitroDirs.filter((dir) =>
|
||||
@@ -259,7 +266,7 @@ export async function repairMissingNitros(
|
||||
|
||||
await runPool(items, REPAIR_CONCURRENCY, async (item, i) => {
|
||||
const classname = item.item_name;
|
||||
const result = await processItem(classname);
|
||||
const result = await processItem(classname, item.interaction_type);
|
||||
if (result.status === "skipped") {
|
||||
skipped++;
|
||||
onEvent?.({
|
||||
|
||||
Reference in new issue
Block a user