后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 强化消耗表
|
||||
import {readJsonFile} from '../util'
|
||||
import {readFileAndParse} from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicStrengthenCost {
|
||||
@@ -9,11 +9,12 @@ export interface DicStrengthenCost {
|
||||
readonly costCoin: number;
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_STRENGTHEN_COST);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicStrengthenCost = new Map<number, number>();
|
||||
export function loadStrengthenCost() {
|
||||
let arr = readFileAndParse(FILENAME.DIC_STRENGTHEN_COST);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicStrengthenCost.set(o.level, o.costCoin);
|
||||
});
|
||||
arr.forEach(o => {
|
||||
dicStrengthenCost.set(o.level, o.costCoin);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user