From 868e675f8ed2c3f9c2a2dde0718170f06a953d3f Mon Sep 17 00:00:00 2001 From: Walidoux Date: Fri, 28 Apr 2023 14:35:52 +0100 Subject: [PATCH] refactor(config): organization/naming conventions - Modified Convertion.ts to simplify directory configuration into outputDir, gamedataDir, and genericDir for versioned folders, and removed gamedataConfigDir. - Updated Endpoints.ts to include furniture data source from Habbo using JSON format. --- src/config/Convertion.ts | 8 +++++--- src/config/Endpoints.ts | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/config/Convertion.ts b/src/config/Convertion.ts index d58d6af..269df52 100644 --- a/src/config/Convertion.ts +++ b/src/config/Convertion.ts @@ -2,7 +2,9 @@ import { downloadDir } from '@tauri-apps/api/path' import { PROD_VERSION } from './Endpoints' -const gamedataDir = (await downloadDir()).concat(String(PROD_VERSION)) -const gamedataConfigDir = gamedataDir.concat('/config') +const outputDir = (await downloadDir()).concat(String(PROD_VERSION)) -export const Convertion = { gamedataDir, gamedataConfigDir } +const gamedataDir = outputDir.concat('/gamedata') +const genericDir = outputDir.concat('/generic') + +export const Convertion = { outputDir, gamedataDir, genericDir } diff --git a/src/config/Endpoints.ts b/src/config/Endpoints.ts index 5027973..dd2d68e 100644 --- a/src/config/Endpoints.ts +++ b/src/config/Endpoints.ts @@ -24,23 +24,24 @@ await client export const GAME_ENDPOINTS = (domain: DomainTypes): GameEndPointsTypes => { return [ - /* { - src: `${HABBO_URL(domain)}/gamedata/figuredata/0`, // check + { + src: `${HABBO_URL(domain)}/gamedata/figuredata/0`, convert: 'XML', fileName: 'FigureData' - }, */ - /* { + }, + { src: `${HABBO_GORDON_URL}/figuremap.xml`, convert: 'XML', fileName: 'FigureMap' - }, */ - /* { - src: `${HABBO_URL(domain)}/gamedata/furnidata_json/0`, // check - fileName: 'FurniData' - }, */ { + }, + { src: `${HABBO_GORDON_URL}/effectmap.xml`, convert: 'XML', fileName: 'EffectMap' + }, + { + src: `${HABBO_URL(domain)}/gamedata/furnidata_json/0`, + fileName: 'FurniData' } ] }