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

30 lines
916 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 试炼难度配置表
*/
import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
export interface DicRougeLayerNodePlan {
readonly id: number;
readonly nodePlanId: number; // 随机方案dicRougeLayer的nodePlan引用
readonly nodeId: number; // 节点的类型,引用的是 dicRougeNode 表的nodeId
readonly weight: number;
}
// export const dicRougeLayerNodePlan = new Map<string, DicRougeLayerNodePlan>();
export const dicRougeLayerNodePlan = new Map<number, DicRougeLayerNodePlan[]>();
export function loadRougeLayerNodePlan() {
dicRougeLayerNodePlan.clear();
let arr = readFileAndParse(FILENAME.DIC_ROUGE_LAYER_NODE_PLAN);
arr.forEach(o => {
if (!dicRougeLayerNodePlan.get(o.nodePlanId)) dicRougeLayerNodePlan.set(o.nodePlanId, []);
dicRougeLayerNodePlan.get(o.nodePlanId).push(o);
});
arr = undefined;
}