feat(共鸣系统): 新增

This commit is contained in:
zhangxk
2023-10-09 15:11:54 +08:00
parent cd87b9e74c
commit 53a0b0f340
18 changed files with 1195 additions and 14 deletions

View File

@@ -0,0 +1,26 @@
import { parseGoodStr, readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
export interface DicResonance {
readonly id: number;
readonly name: string;
readonly openLimit: number;
readonly openConsume: RewardInter[];
}
export const dicResonance = new Map<number, DicResonance>();
export function loadResonance() {
dicResonance.clear();
let arr = readFileAndParse(FILENAME.DIC_RESONANCE);
arr.forEach(o => {
o.openConsume = parseGoodStr(o.openConsume);
dicResonance.set(o.id, o);
});
arr = undefined;
}