@wwawing/engine 3.13.0-acorn-statement.based-on.3.12.3.p.6 → 3.13.0-acorn-statement.based-on.3.12.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.
- package/LICENSE +1 -1
- package/debug/make-debug-pages.ts +2 -1
- package/lib/json_api_client/index.d.ts +5 -5
- package/lib/wwa.js +1 -1
- package/lib/wwa_data.d.ts +7 -5
- package/lib/wwa_expression/__tests__/value-assign-operation.d.ts +1 -0
- package/lib/wwa_expression/typedef.d.ts +11 -11
- package/lib/wwa_expression/value-assign-operation.d.ts +1 -1
- package/lib/wwa_expression2/wwa.d.ts +2 -2
- package/lib/wwa_main.d.ts +2 -1
- package/lib/wwa_message.d.ts +5 -4
- package/lib/wwa_save/WWASaveDataDBList.d.ts +1 -1
- package/lib/wwa_save/common/definitions.d.ts +3 -3
- package/lib/wwa_sound.d.ts +3 -1
- package/package.json +22 -16
package/lib/wwa_data.d.ts
CHANGED
|
@@ -255,12 +255,13 @@ export declare enum MacroType {
|
|
|
255
255
|
MAP2 = 61,
|
|
256
256
|
SHOW_STR2 = 62,
|
|
257
257
|
CONSOLE_LOG2 = 63,
|
|
258
|
+
DELAYBGM = 64,
|
|
258
259
|
GAMEPAD_BUTTON = 100,
|
|
259
260
|
OLDMOVE = 101,
|
|
260
261
|
LEGACY_IF = 10050
|
|
261
262
|
}
|
|
262
|
-
export
|
|
263
|
-
export
|
|
263
|
+
export type ConditionalExecuteMacroType = MacroType.IF | MacroType.ELSE_IF | MacroType.ELSE | MacroType.END_IF;
|
|
264
|
+
export type PreprocessMacroType = ConditionalExecuteMacroType | MacroType.SHOW_STR | MacroType.SHOW_STR2;
|
|
264
265
|
export declare var macrotable: {
|
|
265
266
|
"": number;
|
|
266
267
|
$imgplayer: number;
|
|
@@ -324,6 +325,7 @@ export declare var macrotable: {
|
|
|
324
325
|
$map2: number;
|
|
325
326
|
$show_str2: number;
|
|
326
327
|
$console_log2: number;
|
|
328
|
+
$delaybgm: number;
|
|
327
329
|
$gamepad_button: number;
|
|
328
330
|
$oldmove: number;
|
|
329
331
|
};
|
|
@@ -352,7 +354,7 @@ export declare enum SystemSound {
|
|
|
352
354
|
export declare const speedList: number[];
|
|
353
355
|
export declare const speedNameList: string[];
|
|
354
356
|
export declare const StatusKind: readonly ["energy", "strength", "defence", "gold"];
|
|
355
|
-
export
|
|
357
|
+
export type StatusKind = typeof StatusKind[number];
|
|
356
358
|
export declare class WWAConsts {
|
|
357
359
|
static WWA_HOME: string;
|
|
358
360
|
static ITEMBOX_SIZE: number;
|
|
@@ -567,8 +569,8 @@ export declare enum IDTable {
|
|
|
567
569
|
BITSHIFT = 16,
|
|
568
570
|
BITMASK = 65535
|
|
569
571
|
}
|
|
570
|
-
export
|
|
571
|
-
export
|
|
572
|
+
export type StatusSolutionKind = "all" | "bare" | "equipment";
|
|
573
|
+
export type UserVarNameListRequestErrorKind = JsonResponseErrorKind | "notObject" | "noFileSpecified";
|
|
572
574
|
export interface ScoreOptions {
|
|
573
575
|
rates: ScoreRates;
|
|
574
576
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { EquipmentStatus, Status, Coord, PartsType, Direction } from "../wwa_data";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
2
|
+
export type SetMacroType = 'VARIABLE' | 'MAP' | 'OBJECT' | 'ITEM' | 'NUMBER' | 'HP' | 'HPMAX' | 'AT' | 'AT_TOTAL' | 'AT_ITEMS' | 'DF' | 'DF_TOTAL' | 'DF_ITEMS' | 'GD' | 'TIME' | 'STEP' | 'X' | 'Y' | 'PX' | 'PY' | 'PDIR' | 'ID' | 'TYPE' | 'ITEM_COUNT_ALL' | 'RAND' | 'ITEM_COUNT';
|
|
3
|
+
export type CNumberKind = "NUMBER";
|
|
4
|
+
export type CVariableKind = "VARIABLE";
|
|
5
|
+
export type CPartsKind = "MAP" | "OBJECT";
|
|
6
|
+
export type CItemKind = "ITEM";
|
|
7
|
+
export type CEnvKind = "HP" | "HPMAX" | "AT" | "AT_TOTAL" | "AT_ITEMS" | "DF" | "DF_TOTAL" | "DF_ITEMS" | "GD" | "STEP" | "TIME" | "X" | "Y" | "PX" | "PY" | "PDIR" | "ID" | "TYPE" | "ITEM_COUNT_ALL";
|
|
8
|
+
export type CFunctionKind = "RAND" | "ITEM_COUNT";
|
|
9
9
|
export interface CNumber {
|
|
10
10
|
type: CNumberKind;
|
|
11
11
|
rawValue: number;
|
|
@@ -30,10 +30,10 @@ export interface CFunction {
|
|
|
30
30
|
type: CFunctionKind;
|
|
31
31
|
argument: CValue;
|
|
32
32
|
}
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
33
|
+
export type CValue = CNumber | CVariable | CParts | CItem | CEnv;
|
|
34
|
+
export type Comparable = CValue | CFunction;
|
|
35
|
+
export type ComparisionOperatorKind = "<" | ">" | "<=" | ">=" | "==" | "!=";
|
|
36
|
+
export type Descriminant = boolean | {
|
|
37
37
|
left: Comparable;
|
|
38
38
|
right: Comparable;
|
|
39
39
|
operator: ComparisionOperatorKind;
|
|
@@ -18,5 +18,5 @@ export interface NoExtraArgumentValueeAssignOperation {
|
|
|
18
18
|
assignee: "energy" | "energyMax" | "strength" | "defence" | "gold" | "moveCount" | "playerDirection";
|
|
19
19
|
rawValue: number;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type ValueAssignOperation = VariableAssignOperation | CoordAssignOperation | ItemAssignOperation | NoExtraArgumentValueeAssignOperation;
|
|
22
22
|
export declare function generateValueAssignOperation(calcResult: number, assigneeExpression: string): ValueAssignOperation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Calcurable = Array1D | Array2D | Number | Symbol | UnaryOperation | BinaryOperation;
|
|
2
2
|
export declare function isCalcurable(node: WWANode): node is Calcurable;
|
|
3
3
|
export interface PartsAssignment {
|
|
4
4
|
type: "PartsAssignment";
|
|
@@ -110,4 +110,4 @@ export interface UpdateExpression {
|
|
|
110
110
|
operator: string;
|
|
111
111
|
argument: WWANode;
|
|
112
112
|
}
|
|
113
|
-
export
|
|
113
|
+
export type WWANode = PartsAssignment | ItemAssignment | UserVariableAssignment | SpecialParameterAssignment | UnaryOperation | BinaryOperation | Array1D | Array2D | Number | Symbol | Random | Jumpgate | Msg | IfStatement | BlockStatement | AnyFunction | DefinedFunction | CallDefinedFunction | ForStatement | AnyFunction | Break | Continue | UpdateExpression;
|
package/lib/wwa_main.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare class WWA {
|
|
|
116
116
|
checkAllSoundLoaded(): void;
|
|
117
117
|
private _setSoundLoadedCheckTimer;
|
|
118
118
|
private _clearSoundLoadedCheckTimer;
|
|
119
|
-
playSound(id: number): void;
|
|
119
|
+
playSound(id: number, bgmDelayDurationMs?: number): void;
|
|
120
120
|
openGameWindow(): void;
|
|
121
121
|
mainCaller: () => void;
|
|
122
122
|
soundCheckCaller: () => void;
|
|
@@ -265,6 +265,7 @@ export declare class WWA {
|
|
|
265
265
|
updateItemEffectEnabled(isEnabled: boolean): void;
|
|
266
266
|
setOldMove(flag: boolean): void;
|
|
267
267
|
setGameOverPolicy(gameOverPolicy: number): void;
|
|
268
|
+
setBgmDelay(delayMs: number): void;
|
|
268
269
|
private _stylePos;
|
|
269
270
|
private _styleElm;
|
|
270
271
|
private _sheet;
|
package/lib/wwa_message.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { Monster } from "./wwa_monster";
|
|
|
4
4
|
import { WWAData } from "./wwa_data";
|
|
5
5
|
import { WWASave } from "./wwa_save";
|
|
6
6
|
import { type TokenValues, type Descriminant } from "./wwa_expression";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type LazyEvaluateValue = () => number;
|
|
8
|
+
export type MessageSegments = (string | LazyEvaluateValue)[];
|
|
9
9
|
export declare class Page {
|
|
10
10
|
firstNode?: Node;
|
|
11
11
|
isLastPage?: boolean;
|
|
@@ -55,9 +55,9 @@ export declare function isEmptyMessageTree(node: Node | undefined): boolean;
|
|
|
55
55
|
export declare function getLastMessage(node: undefined): undefined;
|
|
56
56
|
export declare function getLastMessage(node: Node): Node;
|
|
57
57
|
export declare function concatMessage(node1: Node | undefined, node2: Node | undefined): Node | undefined;
|
|
58
|
-
export
|
|
58
|
+
export type MessageLineType = PreprocessMacroType | "text" | "normalMacro";
|
|
59
59
|
export declare const messagLineIsText: (lineType: MessageLineType) => boolean;
|
|
60
|
-
export
|
|
60
|
+
export type MessageLine = ({
|
|
61
61
|
type: PreprocessMacroType;
|
|
62
62
|
text: string;
|
|
63
63
|
macro: Macro;
|
|
@@ -141,6 +141,7 @@ export declare class Macro {
|
|
|
141
141
|
private _executeOldMoveMacro;
|
|
142
142
|
private _executeNoGameOverMacro;
|
|
143
143
|
private _executeSetMacro;
|
|
144
|
+
private _executeDelayBgmMacro;
|
|
144
145
|
}
|
|
145
146
|
export declare function parseMacro(wwa: WWA, partsID: number, partsType: PartsType, position: Coord, macroStr: string): Macro;
|
|
146
147
|
export declare class TextWindow {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WWAData } from "../wwa_data";
|
|
2
2
|
import WWASaveDataList from "./WWASaveDataList";
|
|
3
3
|
import { OnCheckLoadingSaveDataFunction, OnCompleteLoadingSaveDataFunction } from "./common";
|
|
4
|
-
|
|
4
|
+
type WWASaveDataItem = {
|
|
5
5
|
url?: string;
|
|
6
6
|
id: number;
|
|
7
7
|
hash: string;
|
|
@@ -4,8 +4,8 @@ export declare enum LoadErrorCode {
|
|
|
4
4
|
UNMATCHED_WORLD_PASS_NUMBER = "UNMATCHED_WORLD_PASS_NUMBER",
|
|
5
5
|
DISALLOW_OLD_REVISION_WORLD_SAVE_DATA = "DISALLOW_OLD_REVISION_WORLD_SAVE_DATA"
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
7
|
+
export type OnCompleteLoadingSaveDataFunction = (hasFailedLoadingSaveData: LoadErrorCode[]) => void;
|
|
8
|
+
export type OnCheckLoadingSaveDataFunction = (saveDataWorldName: string | undefined, saveDataHash: string, mapDataRevisionKey: string | undefined) => LoadErrorCode | null;
|
|
9
|
+
export type WWADataWithWorldNameStatus = [WWAData, {
|
|
10
10
|
isWorldNameEmpty: boolean;
|
|
11
11
|
}];
|
package/lib/wwa_sound.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class Sound {
|
|
|
7
7
|
private bufferSources;
|
|
8
8
|
private isLoaded;
|
|
9
9
|
private isExceededMaxRetryCount?;
|
|
10
|
+
private delayBgmTimeoutId;
|
|
10
11
|
constructor(id: number, fileName: string, audioContext: AudioContext, audioGain: GainNode);
|
|
11
12
|
private fetchSoundFile;
|
|
12
13
|
private getArrayBuffer;
|
|
@@ -14,10 +15,11 @@ export declare class Sound {
|
|
|
14
15
|
private retry;
|
|
15
16
|
private setData;
|
|
16
17
|
private cancelLoad;
|
|
17
|
-
play(): void;
|
|
18
|
+
play(delayDurationMs?: number): void;
|
|
18
19
|
pause(): void;
|
|
19
20
|
isBgm(): boolean;
|
|
20
21
|
hasData(): boolean;
|
|
22
|
+
isPlaying(): boolean;
|
|
21
23
|
isLoading(): boolean;
|
|
22
24
|
isError(): boolean;
|
|
23
25
|
private disposeBufferSource;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "3.13.0-acorn-statement.based-on.3.12.
|
|
3
|
+
"version": "3.13.0-acorn-statement.based-on.3.12.4",
|
|
4
4
|
"description": "World Wide Adventure: an RPG Engine.",
|
|
5
5
|
"main": "./lib/wwa.js",
|
|
6
6
|
"files": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"scripts": {
|
|
12
|
-
"test": "
|
|
12
|
+
"test": "jest",
|
|
13
13
|
"start": "run-p build:dev deploy:dev server",
|
|
14
14
|
"build": "npm-run-all clean build:prod",
|
|
15
15
|
"build:prod": "webpack --config webpack.config.prod.ts",
|
|
@@ -41,29 +41,35 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/WWAWing/WWAWing#readme",
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@swc/core": "^1.3.59",
|
|
45
|
+
"@swc/jest": "^0.2.26",
|
|
44
46
|
"@types/crypto-js": "^4.1.1",
|
|
47
|
+
"@types/jest": "^29.5.1",
|
|
45
48
|
"@types/pug": "^2.0.6",
|
|
46
49
|
"@types/terser-webpack-plugin": "^5.2.0",
|
|
47
50
|
"@types/webpack": "^5.28.0",
|
|
48
|
-
"@wwawing/assets": "^3.13.0-acorn-statement.based-on.3.12.
|
|
49
|
-
"@wwawing/common-interface": "^3.13.0-acorn-statement.based-on.3.12.
|
|
50
|
-
"@wwawing/debug-server": "^3.13.0-acorn-statement.based-on.3.12.
|
|
51
|
-
"@wwawing/event-emitter": "^3.13.0-acorn-statement.based-on.3.12.
|
|
52
|
-
"@wwawing/loader": "^3.13.0-acorn-statement.based-on.3.12.
|
|
53
|
-
"@wwawing/page-generator": "^3.13.0-acorn-statement.based-on.3.12.
|
|
54
|
-
"@wwawing/styles": "^3.13.0-acorn-statement.based-on.3.12.
|
|
55
|
-
"@wwawing/virtual-pad": "^3.13.0-acorn-statement.based-on.3.12.
|
|
51
|
+
"@wwawing/assets": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
52
|
+
"@wwawing/common-interface": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
53
|
+
"@wwawing/debug-server": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
54
|
+
"@wwawing/event-emitter": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
55
|
+
"@wwawing/loader": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
56
|
+
"@wwawing/page-generator": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
57
|
+
"@wwawing/styles": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
58
|
+
"@wwawing/virtual-pad": "^3.13.0-acorn-statement.based-on.3.12.4",
|
|
56
59
|
"crypto-js": "^4.1.1",
|
|
60
|
+
"jest": "^29.5.0",
|
|
61
|
+
"jest-cli": "^29.5.0",
|
|
62
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
57
63
|
"npm-run-all": "^4.1.5",
|
|
58
64
|
"pug": "^3.0.2",
|
|
59
65
|
"shelljs": "^0.8.5",
|
|
60
66
|
"shx": "^0.3.4",
|
|
61
|
-
"terser-webpack-plugin": "^5.3.
|
|
62
|
-
"ts-loader": "^9.4.
|
|
67
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
68
|
+
"ts-loader": "^9.4.3",
|
|
63
69
|
"ts-node": "^10.9.1",
|
|
64
|
-
"typescript": "^
|
|
65
|
-
"webpack": "^5.
|
|
66
|
-
"webpack-cli": "^
|
|
70
|
+
"typescript": "^5.0.4",
|
|
71
|
+
"webpack": "^5.83.1",
|
|
72
|
+
"webpack-cli": "^5.1.1"
|
|
67
73
|
},
|
|
68
74
|
"publishConfig": {
|
|
69
75
|
"access": "public"
|
|
@@ -72,5 +78,5 @@
|
|
|
72
78
|
"node": ">=18",
|
|
73
79
|
"npm": ">=8"
|
|
74
80
|
},
|
|
75
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "b24896485130d7174bb5199c5c44bf769184d427"
|
|
76
82
|
}
|