From b8dcbc4f5d36ca96ed701b34eecda4e2fd8bfb6a Mon Sep 17 00:00:00 2001 From: Walidoux Date: Wed, 19 Apr 2023 17:14:55 +0000 Subject: [PATCH] refactor(config-types): clean up --- src/config/ENDPOINTS.ts | 10 +++++----- src/config/GameDownloader.ts | 4 ++-- src/config/REGISTERED_KEYS.ts | 36 ----------------------------------- src/types/Endpoint.d.ts | 8 +++++--- 4 files changed, 12 insertions(+), 46 deletions(-) delete mode 100644 src/config/REGISTERED_KEYS.ts diff --git a/src/config/ENDPOINTS.ts b/src/config/ENDPOINTS.ts index 2ebc202..373d148 100644 --- a/src/config/ENDPOINTS.ts +++ b/src/config/ENDPOINTS.ts @@ -24,14 +24,14 @@ await client return (PROD_VERSION = (data as string).match(PROD_VERSION_REGEX)?.[0]) }) -export const GAME_ENDPOINTS: GameEndPointsTypes = (domain) => { +export const GAME_ENDPOINTS = (domain: DomainTypes): GameEndPointsTypes => { return [ { src: `${HABBO_URL(domain)}/gamedata/figuredata/0`, convert: 'XML', fileName: 'FigureData' - } - /* { + }, + { src: `${HABBO_IMAGES}/figuremap.xml`, convert: 'XML', fileName: 'FigureMap' @@ -50,10 +50,10 @@ export const GAME_ENDPOINTS: GameEndPointsTypes = (domain) => { fileName: 'EffectMap' }, { - src: `${HABBO_URL(domain)}/gamedata/external_variables/0`, + src: `${HABBO_URL(domain)}/gamedata/external_flash_texts/0`, convert: 'TXT', fileName: 'ExternalTexts' - } */ + } ] } diff --git a/src/config/GameDownloader.ts b/src/config/GameDownloader.ts index 7559d82..ecc0c5f 100644 --- a/src/config/GameDownloader.ts +++ b/src/config/GameDownloader.ts @@ -2,7 +2,7 @@ import type { IDownloaderContent } from '../components' export const GameDataDownloader: IDownloaderContent = { title: 'Converts and bundles:', - features: ['XML/TXT to minified JSON files', 'Converts SWF files to JSV'] + features: ['XML/TXT to minified JSON files', 'Converts SWF files to Parquet'] } export const GameAssetsDownloader: IDownloaderContent = { @@ -12,6 +12,6 @@ export const GameAssetsDownloader: IDownloaderContent = { 'Album + Recepetion images', 'Catalogue + Furni icons', 'Habbo Web Promo + Articles', - 'MP3 Sounds machine' + 'MP3 Sounds' ] } diff --git a/src/config/REGISTERED_KEYS.ts b/src/config/REGISTERED_KEYS.ts deleted file mode 100644 index d5d0ba1..0000000 --- a/src/config/REGISTERED_KEYS.ts +++ /dev/null @@ -1,36 +0,0 @@ -// not used, should be removed after figuring out what to do with - -export const REGISTERED_KEYS = [ - 'friendlytime.', - 'navigator.', - 'cancel', - 'catalog.', - '.group', - 'widget.', - 'widgets.', - 'unique.', - 'countdown_clock_unit_', - 'mod.', - 'notifications.', - '.notification', - 'connection.', - 'opening.', - 'login.', - 'maintenance.', - 'achievements.', - 'inventory.', - 'generic.', - 'friendlist.', - 'infostand.', - 'help.', - 'people.', - 'catalog_', - 'roomad.', - 'buy', - 'avatareditor.', - 'campaign.', - 'quests.', - 'room.', - 'messenger.', - 'memenu.' -] diff --git a/src/types/Endpoint.d.ts b/src/types/Endpoint.d.ts index e264969..67f426d 100644 --- a/src/types/Endpoint.d.ts +++ b/src/types/Endpoint.d.ts @@ -1,3 +1,5 @@ -export type GameEndPointsTypes = ( - domain: DomainTypes -) => Array<{ src: string; convert?: 'TXT' | 'XML'; fileName: string }> +export type GameEndPointsTypes = Array<{ + src: string + convert?: 'TXT' | 'XML' + fileName: string +}>