Files
ZYZ/shared/pubUtils/dictionary/DicShopList.ts
2021-05-12 18:56:47 +08:00

26 lines
688 B
TypeScript

// 商店表
import { readFileAndParse, parseNumberList } from '../util'
import { FILENAME } from '../../consts'
export interface DicShopList {
// 商店id
readonly shopid: number;
// 商店名
readonly shopname: number;
// 商店内标签,小分类
readonly type: number[];
// 使用的货币
readonly money: number[];
}
export const dicShopList = new Map<number, DicShopList>();
export function loadShopList() {
let arr = readFileAndParse(FILENAME.DIC_SHOP_LIST);
arr.forEach(o => {
o.type = parseNumberList(o.typeid);
o.money = parseNumberList(o.moneyid);
dicShopList.set(o.shopid, o);
});
arr = undefined;
}