fix: use configured furni source and catalog assets
This commit is contained in:
1 parent
aed70db81f
commit
c78f8812ad
25 files changed
+368
-129
No files matched your search
@@ -7,7 +7,7 @@
|
||||
|
||||
import { logger } from "@/lib/logger";
|
||||
import type { FurniListResult, HabboFurniItem } from "@/types/furni";
|
||||
import { getHabboItFurnidata } from "./habbo-furnidata-cache";
|
||||
import { getOfficialHabboFurnidata } from "./habbo-furnidata-cache";
|
||||
|
||||
export type { FurniListResult, HabboFurniItem };
|
||||
|
||||
@@ -40,7 +40,7 @@ export async function listFurniture(
|
||||
const importedSet = options.importedSet;
|
||||
|
||||
try {
|
||||
const map = await getHabboItFurnidata();
|
||||
const map = await getOfficialHabboFurnidata();
|
||||
if (map.size === 0) return empty;
|
||||
|
||||
// Convert to array and optionally filter by search
|
||||
@@ -108,12 +108,12 @@ export async function searchFurniture(
|
||||
|
||||
/**
|
||||
* Get a single furniture item by classname.
|
||||
* Uses the cached habbo.it furnidata.
|
||||
* Uses cached furnidata from the configured official Habbo hotel.
|
||||
*/
|
||||
export async function getFurnitureByClassname(
|
||||
classname: string,
|
||||
): Promise<HabboFurniItem | null> {
|
||||
const map = await getHabboItFurnidata();
|
||||
const map = await getOfficialHabboFurnidata();
|
||||
|
||||
// Try exact match
|
||||
let entry = map.get(classname);
|
||||
|
||||
Reference in new issue
Block a user