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.
This commit is contained in:
Walid 2023-04-28 14:35:52 +01:00
parent 1206af1e1d
commit 868e675f8e
Signed by: Walidoux
GPG Key ID: CCF21881FE8BEBAF
2 changed files with 15 additions and 12 deletions

View File

@ -2,7 +2,9 @@ import { downloadDir } from '@tauri-apps/api/path'
import { PROD_VERSION } from './Endpoints' import { PROD_VERSION } from './Endpoints'
const gamedataDir = (await downloadDir()).concat(String(PROD_VERSION)) const outputDir = (await downloadDir()).concat(String(PROD_VERSION))
const gamedataConfigDir = gamedataDir.concat('/config')
export const Convertion = { gamedataDir, gamedataConfigDir } const gamedataDir = outputDir.concat('/gamedata')
const genericDir = outputDir.concat('/generic')
export const Convertion = { outputDir, gamedataDir, genericDir }

View File

@ -24,23 +24,24 @@ await client
export const GAME_ENDPOINTS = (domain: DomainTypes): GameEndPointsTypes => { export const GAME_ENDPOINTS = (domain: DomainTypes): GameEndPointsTypes => {
return [ return [
/* { {
src: `${HABBO_URL(domain)}/gamedata/figuredata/0`, // check src: `${HABBO_URL(domain)}/gamedata/figuredata/0`,
convert: 'XML', convert: 'XML',
fileName: 'FigureData' fileName: 'FigureData'
}, */ },
/* { {
src: `${HABBO_GORDON_URL}/figuremap.xml`, src: `${HABBO_GORDON_URL}/figuremap.xml`,
convert: 'XML', convert: 'XML',
fileName: 'FigureMap' fileName: 'FigureMap'
}, */ },
/* { {
src: `${HABBO_URL(domain)}/gamedata/furnidata_json/0`, // check
fileName: 'FurniData'
}, */ {
src: `${HABBO_GORDON_URL}/effectmap.xml`, src: `${HABBO_GORDON_URL}/effectmap.xml`,
convert: 'XML', convert: 'XML',
fileName: 'EffectMap' fileName: 'EffectMap'
},
{
src: `${HABBO_URL(domain)}/gamedata/furnidata_json/0`,
fileName: 'FurniData'
} }
] ]
} }