后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 藏宝图合成表
|
||||
import { readJsonFile } from '../util'
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicBlueprtCompose {
|
||||
@@ -15,10 +15,12 @@ export interface DicBlueprtCompose {
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_BLUEPRT_COMPOSE);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicBlueprtCompose = new Map<number, DicBlueprtCompose>();
|
||||
arr.forEach(o => {
|
||||
dicBlueprtCompose.set(o.quality, o);
|
||||
});
|
||||
export function loadBlueprtCompose() {
|
||||
let arr = readFileAndParse(FILENAME.DIC_BLUEPRT_COMPOSE);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicBlueprtCompose.set(o.quality, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user