✨ feat(稷下学宫): ff931afe4到7421822f6
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 挑战关随机配置表
|
||||
*/
|
||||
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicRougeChallengePlan {
|
||||
readonly id: number;
|
||||
readonly planId: number;
|
||||
readonly challengeId: number; // 挑战关卡的id dicRougeChallenge的id
|
||||
readonly weight: number; // 权重
|
||||
}
|
||||
|
||||
export const dicRougeChallengePlan = new Map<number, DicRougeChallengePlan[]>();
|
||||
export function loadRougeChallengePlan() {
|
||||
dicRougeChallengePlan.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_ROUGE_CHALLANGE_PLAN);
|
||||
|
||||
arr.forEach(o => {
|
||||
if (!dicRougeChallengePlan.has(o.planId)) {
|
||||
dicRougeChallengePlan.set(o.planId, []);
|
||||
}
|
||||
dicRougeChallengePlan.get(o.planId).push(o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user