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
@@ -154,16 +154,18 @@ 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 FROM items_base ORDER BY id
|
||||
SELECT id, item_name, public_name, type, interaction_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,
|
||||
];
|
||||
@@ -242,7 +244,11 @@ export async function runCatalogAudit(
|
||||
});
|
||||
// Only include items that actually have a .nitro asset — a catalog
|
||||
// entry for a furni without a bundle would be un-placeable in-game.
|
||||
if (nitroSet.has(`${item.item_name}.nitro`)) {
|
||||
// Badge items use .gif files, not .nitro bundles.
|
||||
if (
|
||||
item.interaction_type !== "badge" &&
|
||||
nitroSet.has(`${item.item_name}.nitro`)
|
||||
) {
|
||||
missingCatalogEntries.push({
|
||||
classname: item.item_name,
|
||||
itemId: item.id,
|
||||
@@ -311,6 +317,8 @@ export async function runCatalogAudit(
|
||||
const missingNitroClassnames: string[] = [];
|
||||
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 (!nitroSet.has(`${item.item_name}.nitro`)) {
|
||||
missingNitroClassnames.push(item.item_name);
|
||||
issues.push({
|
||||
|
||||
Reference in new issue
Block a user