fix: use configured furni source and catalog assets

This commit is contained in:
Simo committed 2026-08-02 14:22:05 +02:00
1 parent aed70db81f
commit c78f8812ad
25 files changed
+368 -129

No files matched your search

@@ -10,7 +10,7 @@ import {
getFurnitureDataPath,
readFurniData,
} from "@/lib/services/furni-data";
import { lookupHabboIt } from "@/lib/services/habbo-furnidata-cache";
import { lookupOfficialHabboFurni } from "@/lib/services/habbo-furnidata-cache";
import { rcon } from "@/lib/services/rcon";
/**
@@ -86,9 +86,9 @@ export const POST = withAdmin(
for (const row of rows) {
try {
const classname = row.itemName;
let habboIt = null;
let officialHabbo = null;
try {
habboIt = await lookupHabboIt(classname);
officialHabbo = await lookupOfficialHabboFurni(classname);
} catch {
/* optional */
}
@@ -96,10 +96,10 @@ export const POST = withAdmin(
const entry = buildFurniEntry({
id: row.id,
classname,
revision: habboIt?.revision ?? 0,
category: habboIt?.category || "unknown",
name: row.publicName || habboIt?.name || classname,
description: habboIt?.description || "",
revision: officialHabbo?.revision ?? 0,
category: officialHabbo?.category || "unknown",
name: row.publicName || officialHabbo?.name || classname,
description: officialHabbo?.description || "",
spriteId: row.spriteId,
dims: {
x: row.width,
@@ -107,7 +107,7 @@ export const POST = withAdmin(
z: Math.round(Number(row.stackHeight)),
},
metadata: null,
habboIt,
officialHabbo,
});
entries.push({ entry, itemType: row.type === "i" ? "i" : "s" });