feat(catalog): repair missing furniture components with verified status
CI / check (push) Successful in 1m33s
CI / deploy (push) Successful in 1m22s
CI / e2e (push) Successful in 24s

This commit is contained in:
Simo committed 2026-09-05 18:12:34 +02:00
1 parent 3c24df9b1d
commit 570f3dde44
13 files changed
+438 -164

No files matched your search

+34
View File
@@ -68,3 +68,37 @@ export function compareFurniture(
: "present";
return { state, fields } as const;
}
export function furnitureHealth(local: FurnitureInspection) {
const missing: string[] = [];
if (local.nitro.exists === false) missing.push("Nitro");
if (local.icon.exists === false) missing.push("Icon");
if (local.furnidataReadable && !local.furnidata.length)
missing.push("Furnidata");
if (!local.sql.length) missing.push("SQL item");
if (!local.catalog.length) missing.push("Catalog offer");
const sql = local.sql[0],
fd = local.furnidata[0];
const conflict =
local.sql.length > 1 ||
local.furnidata.length > 1 ||
!!(
sql &&
fd &&
(sql.spriteId !== fd.id ||
(sql.type === "i" ? "wallitem" : "flooritem") !== fd.type)
);
const unknown =
!local.furnidataReadable ||
local.nitro.exists === null ||
local.icon.exists === null;
const state = conflict
? "conflict"
: unknown
? "unknown"
: !missing.length
? "complete"
: missing.length === 5
? "new"
: "incomplete";
return { state, missing } as const;
}