fix(catalog): resolve classname candidates using public_name
This commit is contained in:
1 parent
8c47c3c158
commit
ca6aa97eb2
5 files changed
+305
-211
No files matched your search
@@ -320,9 +320,10 @@ export async function runCatalogAudit(
|
||||
itemId: item.id,
|
||||
message: `"${item.item_name}" (ID ${item.id}) has no catalog_items entry — not purchasable`,
|
||||
});
|
||||
const hasNitro = assetNameCandidates(item.item_name).nitro.some((n) =>
|
||||
nitroSet.has(n),
|
||||
);
|
||||
const hasNitro = assetNameCandidates(
|
||||
item.item_name,
|
||||
item.public_name,
|
||||
).nitro.some((n) => nitroSet.has(n));
|
||||
// Pets ship their assets through the pet pipeline, not as furni
|
||||
// .nitro bundles, so they can get a catalog entry regardless.
|
||||
if (kind === "pet" || hasNitro) {
|
||||
@@ -398,9 +399,10 @@ export async function runCatalogAudit(
|
||||
// Badges, pets, effects, bots and sticky notes never ship a furni
|
||||
// .nitro bundle — skip the asset check for them.
|
||||
if (NO_ASSET_KINDS.has(kindOf(item.item_name))) continue;
|
||||
const hasNitro = assetNameCandidates(item.item_name).nitro.some((n) =>
|
||||
nitroSet.has(n),
|
||||
);
|
||||
const hasNitro = assetNameCandidates(
|
||||
item.item_name,
|
||||
item.public_name,
|
||||
).nitro.some((n) => nitroSet.has(n));
|
||||
if (!hasNitro) {
|
||||
missingNitroClassnames.push(item.item_name);
|
||||
issues.push({
|
||||
@@ -429,9 +431,10 @@ export async function runCatalogAudit(
|
||||
// Badges use album1584 .gif icons; pets, effects, bots and sticky notes
|
||||
// never ship a furni icon file — skip the asset check for them.
|
||||
if (NO_ASSET_KINDS.has(kindOf(item.item_name))) continue;
|
||||
const hasIcon = assetNameCandidates(item.item_name).icon.some((n) =>
|
||||
iconSet.has(n),
|
||||
);
|
||||
const hasIcon = assetNameCandidates(
|
||||
item.item_name,
|
||||
item.public_name,
|
||||
).icon.some((n) => iconSet.has(n));
|
||||
if (!hasIcon) {
|
||||
missingIconClassnames.push(item.item_name);
|
||||
issues.push({
|
||||
@@ -493,9 +496,11 @@ export async function runCatalogAudit(
|
||||
// left over cannot be restored from any source → legacy/broken.
|
||||
const stillMissing: string[] = [];
|
||||
for (const classname of missingIconClassnames) {
|
||||
const hasIcon = assetNameCandidates(classname).icon.some((n) =>
|
||||
iconSet.has(n),
|
||||
);
|
||||
const item = itemByName.get(classname);
|
||||
const hasIcon = assetNameCandidates(
|
||||
classname,
|
||||
item?.public_name,
|
||||
).icon.some((n) => iconSet.has(n));
|
||||
if (!hasIcon) {
|
||||
stillMissing.push(classname);
|
||||
}
|
||||
@@ -566,9 +571,11 @@ export async function runCatalogAudit(
|
||||
// left over cannot be restored from any source → legacy/broken.
|
||||
const stillMissing: string[] = [];
|
||||
for (const classname of missingNitroClassnames) {
|
||||
const hasNitro = assetNameCandidates(classname).nitro.some((n) =>
|
||||
nitroSet.has(n),
|
||||
);
|
||||
const item = itemByName.get(classname);
|
||||
const hasNitro = assetNameCandidates(
|
||||
classname,
|
||||
item?.public_name,
|
||||
).nitro.some((n) => nitroSet.has(n));
|
||||
if (!hasNitro) {
|
||||
stillMissing.push(classname);
|
||||
}
|
||||
@@ -714,9 +721,10 @@ export async function runCatalogAudit(
|
||||
}
|
||||
if (NO_CATALOG_KINDS.has(kind)) continue;
|
||||
if (postCatalogIds.has(item.id)) continue;
|
||||
const hasNitro = assetNameCandidates(item.item_name).nitro.some((n) =>
|
||||
nitroSet.has(n),
|
||||
);
|
||||
const hasNitro = assetNameCandidates(
|
||||
item.item_name,
|
||||
item.public_name,
|
||||
).nitro.some((n) => nitroSet.has(n));
|
||||
if (kind === "pet" || hasNitro) {
|
||||
missingCatalogEntries.push({
|
||||
classname: item.item_name,
|
||||
|
||||
Reference in new issue
Block a user