添加字典表解析

This commit is contained in:
luying
2020-12-15 15:00:41 +08:00
parent 2a268b2158
commit 87cdd7a80f
33 changed files with 1462 additions and 47 deletions
@@ -0,0 +1,21 @@
// 远征点数奖励表
import { parseReward, readJsonFile } from '../util';
import { FILENAME } from '../../consts/consts';
import { RewardInter } from '../interface';
export interface DicExpeditionPoint {
// 远征点数
readonly point: number;
// 奖励
readonly reward: Array<RewardInter>;
}
const str = readJsonFile(FILENAME.DIC_EXPEDITION_POINT);
let arr = JSON.parse(str);
export const dicExpeditionPoint = new Map<number, DicExpeditionPoint>();
arr.forEach(o => {
o.reward = parseReward(o.reward);
dicExpeditionPoint.set(o.id, o);
});