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

+27
View File
@@ -19,6 +19,14 @@ export const HABBO_GAMEDATA_HOTELS = [
export type HabboGamedataHotel =
(typeof HABBO_GAMEDATA_HOTELS)[number]["value"];
export interface FurniImportSource {
hotel: HabboGamedataHotel;
label: string;
host: string;
furnidataUrl: string;
assetCdnHost: "images.habbo.com";
}
export const HABBO_GAMEDATA_HOTEL_SETTING_KEY = "habbo_gamedata_hotel";
export const DEFAULT_HABBO_GAMEDATA_HOTEL: HabboGamedataHotel = "it";
@@ -47,6 +55,25 @@ export function habboFurnidataUrl(hotel: string): string {
return `https://www.habbo.${h}/gamedata/furnidata_json/1`;
}
export function buildFurniImportSource(hotel: string): FurniImportSource {
const normalized = normalizeHabboGamedataHotel(hotel);
return {
hotel: normalized,
label: habboGamedataHotelLabel(normalized),
host: `habbo.${normalized}`,
furnidataUrl: habboFurnidataUrl(normalized),
assetCdnHost: "images.habbo.com",
};
}
export function officialHabboEnrichmentWarning(
hotel: string,
name: string,
): string {
const normalized = normalizeHabboGamedataHotel(hotel);
return `Enriched from habbo.${normalized}: "${name}"`;
}
export function habboExternalTextsUrl(hotel: string): string {
const h = normalizeHabboGamedataHotel(hotel);
return `https://www.habbo.${h}/gamedata/external_flash_texts/1`;