Files
ZYZ/shared/pubUtils/dictionary/DicRougePassiveCollect.ts
2023-08-30 11:02:52 +08:00

27 lines
719 B
TypeScript

/**
* 特性卡
*/
import { parseGoodStr, readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
export interface DicRougePassiveCollect {
readonly id: number;
readonly num: number; // 收集数量
readonly collectReward: RewardInter[]; // 奖励
}
export const dicRougePassiveCollect = new Map<number, DicRougePassiveCollect>();
export function loadRougePassiveCollect() {
dicRougePassiveCollect.clear();
let arr = readFileAndParse(FILENAME.DIC_ROUGE_PASSIVE_COLLECT);
arr.forEach(o => {
o.collectReward = parseGoodStr(o.reward);
dicRougePassiveCollect.set(o.id, o);
});
arr = undefined;
}