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
@@ -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`;
|
||||
|
||||
Reference in new issue
Block a user