Add stigmata pages

This commit is contained in:
Sakura Knoll
2023-07-11 02:39:32 +09:00 Unverified
parent 4c875ecb8b
commit 95fd4af7cf
17 changed files with 716 additions and 38 deletions
+12
View File
@@ -11,6 +11,9 @@ export const battlesuitCatalogPath = path.join(dataDir, 'battlesuit-catalog.yaml
export const weaponsDir = path.join(dataDir, 'weapons')
export const weaopnCatalogPath = path.join(dataDir, 'weapon-catalog.yaml')
export const stigmataDir = path.join(dataDir, 'stigmata')
export const stigmataCatalogPath = path.join(dataDir, 'stigmata-catalog.yaml')
export function loadBattlesuitCatalog(): BattlesuitCatalogItem[] {
return readYamlFile(battlesuitCatalogPath)
}
@@ -29,6 +32,15 @@ export function loadWeaponData(id: string) {
return readYamlFile(weaponDataPath)
}
export function loadStigmataCatalog(): WeaponCatalogItem[] {
return readYamlFile(stigmataCatalogPath)
}
export function loadStigmaData(id: string) {
const stigmaDataPath = path.join(stigmataDir, `${id}.yaml`)
return readYamlFile(stigmaDataPath)
}
function readYamlFile(pathname: string) {
return YAML.parse(fs.readFileSync(pathname).toString())
}