captainbattle 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +14 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -62,6 +62,20 @@ function initCfg(file) {
62
62
  }
63
63
  function initJsonCfg(obj) {
64
64
  cfgReady = true;
65
+ for (const key in obj) {
66
+ if (!Cfg_1.Cfg.hasOwnProperty("_" + key)) {
67
+ console.warn("Cfg.initByMergeJson null, " + key);
68
+ continue;
69
+ }
70
+ let reader = Cfg_1.Cfg["_" + key];
71
+ const jsonObj = obj[key];
72
+ if (Array.isArray(jsonObj)) {
73
+ reader.initByArray(jsonObj);
74
+ }
75
+ else {
76
+ reader.initByMap(jsonObj);
77
+ }
78
+ }
65
79
  Cfg_1.Cfg.initByConfig(obj);
66
80
  }
67
81
  function makeFileName(prefix) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "captainbattle",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "水上大乱斗后端战斗模拟",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",