@wwawing/loader 4.0.0 → 4.0.2
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.
- package/LICENSE +2 -2
- package/lib/core/map-data-client/NodeLocalMapDataClient.js +2 -2
- package/lib/core/text-loader/index.js +2 -1
- package/lib/infra/index.js +1 -0
- package/module/core/map-data-client/NodeLocalMapDataClient.js +1 -1
- package/module/core/text-loader/index.js +2 -1
- package/module/infra/index.js +1 -0
- package/package.json +11 -15
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 1996-
|
|
4
|
-
Copyright (c) 2015-
|
|
3
|
+
Copyright (c) 1996-2026 NAO
|
|
4
|
+
Copyright (c) 2015-2026 WWA Wing Team
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NodeLocalMapDataClient = void 0;
|
|
7
|
-
const
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
8
|
const BaseMapDataClient_1 = require("./BaseMapDataClient");
|
|
9
9
|
class NodeLocalMapDataClient extends BaseMapDataClient_1.BaseMapDataClient {
|
|
10
10
|
constructor(fileName) {
|
|
@@ -13,7 +13,7 @@ class NodeLocalMapDataClient extends BaseMapDataClient_1.BaseMapDataClient {
|
|
|
13
13
|
}
|
|
14
14
|
async request() {
|
|
15
15
|
return new Promise((resolve, reject) => {
|
|
16
|
-
|
|
16
|
+
node_fs_1.default.readFile(this.fileName, (error, data) => {
|
|
17
17
|
if (error) {
|
|
18
18
|
reject(error);
|
|
19
19
|
}
|
|
@@ -117,7 +117,7 @@ class TextLoader {
|
|
|
117
117
|
wwaData.gameSpeedIndex = infra_1.WWAConsts.DEFAULT_SPEED_INDEX;
|
|
118
118
|
wwaData.permitChangeGameSpeed = true;
|
|
119
119
|
wwaData.userVar = Array.from({ length: infra_1.WWAConsts.USER_VAR_NUM }).map(() => 0);
|
|
120
|
-
wwaData.userNamedVar =
|
|
120
|
+
wwaData.userNamedVar = new Map();
|
|
121
121
|
wwaData.playTime = 0;
|
|
122
122
|
wwaData.isVisibleStatusEnergy = true;
|
|
123
123
|
wwaData.isVisibleStatusStrength = true;
|
|
@@ -125,6 +125,7 @@ class TextLoader {
|
|
|
125
125
|
wwaData.isVisibleStatusGold = true;
|
|
126
126
|
wwaData.gameOverPolicy = "default";
|
|
127
127
|
wwaData.bgmDelayDurationMs = 0;
|
|
128
|
+
wwaData.pictureRegistry = [];
|
|
128
129
|
return wwaData;
|
|
129
130
|
}
|
|
130
131
|
getMessageFromData() {
|
package/lib/infra/index.js
CHANGED
|
@@ -114,7 +114,7 @@ export class TextLoader {
|
|
|
114
114
|
wwaData.gameSpeedIndex = WWAConsts.DEFAULT_SPEED_INDEX;
|
|
115
115
|
wwaData.permitChangeGameSpeed = true;
|
|
116
116
|
wwaData.userVar = Array.from({ length: WWAConsts.USER_VAR_NUM }).map(() => 0);
|
|
117
|
-
wwaData.userNamedVar =
|
|
117
|
+
wwaData.userNamedVar = new Map();
|
|
118
118
|
wwaData.playTime = 0;
|
|
119
119
|
wwaData.isVisibleStatusEnergy = true;
|
|
120
120
|
wwaData.isVisibleStatusStrength = true;
|
|
@@ -122,6 +122,7 @@ export class TextLoader {
|
|
|
122
122
|
wwaData.isVisibleStatusGold = true;
|
|
123
123
|
wwaData.gameOverPolicy = "default";
|
|
124
124
|
wwaData.bgmDelayDurationMs = 0;
|
|
125
|
+
wwaData.pictureRegistry = [];
|
|
125
126
|
return wwaData;
|
|
126
127
|
}
|
|
127
128
|
getMessageFromData() {
|
package/module/infra/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/loader",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "a World Wide Adventure mapdata loader for client-side web applications",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./module/index.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"build:lib": "npm run clean:lib && tsc -p .",
|
|
19
19
|
"build:module": "npm run clean:module && tsc -p ./tsconfig.module.json",
|
|
20
20
|
"start": "run-s start:browser",
|
|
21
|
-
"start:browser": "
|
|
21
|
+
"start:browser": "vite",
|
|
22
22
|
"start:node": "run-s debug:build:node debug:start:node",
|
|
23
23
|
"debug:build": "run-p debug:build:*",
|
|
24
|
-
"debug:build:browser": "run-s clean:debug:browser &&
|
|
24
|
+
"debug:build:browser": "run-s clean:debug:browser && vite build && shx cp ./src/___debug-resources___/wwamap.dat ./debug/browser",
|
|
25
25
|
"debug:build:node": "run-s clean:debug:node && tsc -p tsconfig-debug-for-node.json && shx cp ./src/___debug-resources___/wwamap.dat ./debug/node/___debug-resources___/",
|
|
26
26
|
"debug:start:browser": "http-server ./debug/browser -o",
|
|
27
27
|
"debug:start:node": "node ./debug/node/___debug-resources___/demo-node.js",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"clean:debug": "shx rm -rf debug",
|
|
32
32
|
"clean:debug:browser": "shx rm -rf debug/browser",
|
|
33
33
|
"clean:debug:node": "shx rm -rf debug/node",
|
|
34
|
-
"test": "echo \"no test specified\""
|
|
34
|
+
"test": "echo \"no test specified\"",
|
|
35
|
+
"type-check": "tsc -p . --watch --noEmit"
|
|
35
36
|
},
|
|
36
37
|
"repository": {
|
|
37
38
|
"type": "git",
|
|
@@ -45,29 +46,24 @@
|
|
|
45
46
|
},
|
|
46
47
|
"homepage": "https://github.com/WWAWing/WWALoader#readme",
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@wwawing/event-emitter": "^4.0.
|
|
49
|
+
"@wwawing/event-emitter": "^4.0.2"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@wwawing/common-interface": "^4.0.
|
|
52
|
-
"cross-env": "^7.0.3",
|
|
53
|
-
"html-loader": "^5.1.0",
|
|
54
|
-
"html-webpack-plugin": "^5.5.0",
|
|
52
|
+
"@wwawing/common-interface": "^4.0.2",
|
|
55
53
|
"http-server": "^14.1.1",
|
|
56
54
|
"npm-run-all2": "^8.0.1",
|
|
57
|
-
"shelljs": "^0.
|
|
55
|
+
"shelljs": "^0.10.0",
|
|
58
56
|
"shx": "^0.4.0",
|
|
59
|
-
"ts-loader": "^9.5.2",
|
|
60
57
|
"ts-node": "^10.9.2",
|
|
61
58
|
"typescript": "^5.8.3",
|
|
62
|
-
"
|
|
63
|
-
"webpack-cli": "^5.1.1"
|
|
59
|
+
"vite": "^6.3.7"
|
|
64
60
|
},
|
|
65
61
|
"publishConfig": {
|
|
66
62
|
"access": "public"
|
|
67
63
|
},
|
|
68
64
|
"engines": {
|
|
69
|
-
"node": ">=
|
|
65
|
+
"node": ">=24",
|
|
70
66
|
"npm": ">=11"
|
|
71
67
|
},
|
|
72
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "86e576667cba53fbd81af94aea4a5efb58c2e0c6"
|
|
73
69
|
}
|