// 开启功能表 import { readFileAndParse } from '../util'; import { FILENAME } from '../../consts'; export interface DicFuncSwitch { // 功能id readonly id: number; // 描述 readonly desc: string; // 条件 readonly conditionType: number; // 参数 readonly param: number; // 客户端指令 readonly script: string; } export const dicFuncSwitch = new Map(); export function loadFuncSwitch() { dicFuncSwitch.clear(); let arr = readFileAndParse(FILENAME.DIC_FUNC_SWITCH); arr.forEach(o => { dicFuncSwitch.set(o.id, o); }); arr = undefined; }