@wwawing/engine 3.6.12 → 3.7.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/lib/wwa_data.d.ts CHANGED
@@ -255,6 +255,7 @@ export declare enum MacroType {
255
255
  HIDE_STATUS = 53,
256
256
  VAR_MAP = 54,
257
257
  VAR_MOD = 55,
258
+ NO_GAMEOVER = 56,
258
259
  GAMEPAD_BUTTON = 100,
259
260
  OLDMOVE = 101
260
261
  }
@@ -313,6 +314,7 @@ export declare var macrotable: {
313
314
  $hide_status: number;
314
315
  $var_map: number;
315
316
  $var_mod: number;
317
+ $no_gameover: number;
316
318
  $gamepad_button: number;
317
319
  $oldmove: number;
318
320
  };
@@ -473,6 +475,7 @@ export declare class WWAConsts {
473
475
  static USER_VAR_NUM_MAX_VALUE: number;
474
476
  static USET_VAR_NUM_MIN_VALUE: number;
475
477
  static CONTROLL_WAIT_FRAME: number;
478
+ static INLINE_USER_VAR_VIEWER_DISPLAY_NUM: number;
476
479
  }
477
480
  export declare class WWASaveConsts {
478
481
  static QUICK_SAVE_MAX: number;
@@ -556,3 +559,9 @@ export declare enum IDTable {
556
559
  BITMASK = 65535
557
560
  }
558
561
  export declare type StatusSolutionKind = "all" | "bare" | "equipment";
562
+ export declare type JsonRequestErrorKind = "brokenJson" | "httpError";
563
+ export declare type UserVarNameListRequestErrorKind = JsonRequestErrorKind | "notObject" | "noFileSpecified";
564
+ export declare type JsonRequestError<ErrorKind = JsonRequestErrorKind> = {
565
+ kind: ErrorKind;
566
+ detail: string;
567
+ };
@@ -28,6 +28,7 @@ export declare enum KeyCode {
28
28
  KEY_P = 80,
29
29
  KEY_Q = 81,
30
30
  KEY_S = 83,
31
+ KEY_V = 86,
31
32
  KEY_W = 87,
32
33
  KEY_X = 88,
33
34
  KEY_Y = 89,
@@ -41,6 +42,7 @@ export declare enum KeyCode {
41
42
  KEY_F7 = 118,
42
43
  KEY_F8 = 119,
43
44
  KEY_F9 = 120,
45
+ KEY_F10 = 121,
44
46
  KEY_F12 = 123
45
47
  }
46
48
  export declare class KeyStore {
package/lib/wwa_main.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind } from "./wwa_data";
1
+ import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind, JsonRequestError } from "./wwa_data";
2
2
  import { MessageWindow, ParsedMessage } from "./wwa_message";
3
3
  import { ItemMenu } from "./wwa_item_menu";
4
4
  import { WWACompress } from "./wwa_save";
@@ -68,6 +68,10 @@ export declare class WWA {
68
68
  private _useSuspend;
69
69
  private _useLookingAround;
70
70
  private _isDisallowLoadOldSave;
71
+ private _inlineUserVarViewer;
72
+ private _userVarNameList;
73
+ private _userVarNameListRequestError;
74
+ private _canDisplayUserVars;
71
75
  private _isActive;
72
76
  private _mapIDTable;
73
77
  private _mapObjectIDTable;
@@ -83,7 +87,8 @@ export declare class WWA {
83
87
  private soundLoadedCheckTimer;
84
88
  private _startTime;
85
89
  private _dumpElement;
86
- constructor(mapFileName: string, urlgateEnabled: boolean, titleImgName: string, classicModeEnabled: boolean, itemEffectEnabled: boolean, useGoToWWA: boolean, audioDirectory?: string, disallowLoadOldSave?: boolean, dumpElm?: HTMLElement);
90
+ constructor(mapFileName: string, urlgateEnabled: boolean, titleImgName: string, classicModeEnabled: boolean, itemEffectEnabled: boolean, useGoToWWA: boolean, audioDirectory: string, disallowLoadOldSave: boolean, dumpElm: HTMLElement, userVarNamesFile: string | null, canDisplayUserVars: boolean);
91
+ private convertUserVariableNameListToArray;
87
92
  private _setProgressBar;
88
93
  private _setLoadingMessage;
89
94
  private _setErrorMessage;
@@ -188,6 +193,7 @@ export declare class WWA {
188
193
  launchBattleEstimateWindow(): boolean;
189
194
  hideBattleEstimateWindow(): void;
190
195
  hidePasswordWindow(isCancel?: boolean): void;
196
+ private _displayUserVars;
191
197
  private _displayHelp;
192
198
  _setNextMessage(displayCenter?: boolean): void;
193
199
  private _hideMessageWindow;
@@ -207,7 +213,8 @@ export declare class WWA {
207
213
  setOldMap(flag: boolean): boolean;
208
214
  setObjectNotCollapseOnPartsOnPlayer(flag: boolean): boolean;
209
215
  setGameOverPosition(pos: Coord): Coord;
210
- setPlayerStatus(type: MacroStatusIndex, value: number): void;
216
+ private toValidStatusValue;
217
+ setPlayerStatus(type: MacroStatusIndex, value: number, isCalledByMacro: boolean): void;
211
218
  setDelPlayer(flag: boolean): boolean;
212
219
  setPlayerGetItem(pos: number, id: number): void;
213
220
  setStatusIconCoord(type: MacroImgFrameIndex, coord: Coord): Coord;
@@ -223,6 +230,7 @@ export declare class WWA {
223
230
  clearFaces(): void;
224
231
  updateItemEffectEnabled(isEnabled: boolean): void;
225
232
  setOldMove(flag: boolean): void;
233
+ setGameOverPolicy(gameOverPolicy: number): void;
226
234
  private _stylePos;
227
235
  private _styleElm;
228
236
  private _sheet;
@@ -246,8 +254,7 @@ export declare class WWA {
246
254
  setUserVarAT(num: number, kind: StatusSolutionKind): void;
247
255
  setUserVarDF(num: number, kind: StatusSolutionKind): void;
248
256
  setUserVarMONEY(num: number): void;
249
- private toValidStatusValue;
250
- setHPUserVar(index: number): void;
257
+ setHPUserVar(index: number, isCalledByMacro: boolean): void;
251
258
  setHPMAXUserVar(index: number): void;
252
259
  setATUserVar(index: number): void;
253
260
  setDFUserVar(index: number): void;
@@ -279,4 +286,9 @@ export declare class WWA {
279
286
  private _checkSaveDataCompatibility;
280
287
  isVisibleStatus(statusKind: StatusKind): boolean;
281
288
  private _changeStatusVisibility;
289
+ private _updateVarDumpInformationArea;
290
+ shouldApplyGameOver({ isCalledByMacro }: {
291
+ isCalledByMacro: boolean;
292
+ }): boolean;
282
293
  }
294
+ export declare const getJSONFile: (fileName: string, callback: (error: JsonRequestError, result: unknown) => void) => void;
@@ -53,8 +53,8 @@ export declare class Macro {
53
53
  private _executeIfMacro;
54
54
  private _executeSetSpeedMacro;
55
55
  private _executeCopyTimeToMacro;
56
- private _hideStatusMacro;
57
- private _varMapMacro;
56
+ private _executeHideStatusMacro;
57
+ private _executeVarMapMacro;
58
58
  private _executeImgPlayerMacro;
59
59
  private _executeImgYesNoMacro;
60
60
  private _executeHPMaxMacro;
@@ -80,6 +80,7 @@ export declare class Macro {
80
80
  private _executeSoundMacro;
81
81
  private _executeGamePadButtonMacro;
82
82
  private _executeOldMoveMacro;
83
+ private _executeNoGameOverMacro;
83
84
  }
84
85
  export declare function parseMacro(wwa: WWA, partsID: number, partsType: PartsType, position: Coord, macroStr: string): Macro;
85
86
  export declare class TextWindow {
@@ -149,6 +150,7 @@ export declare class MessageWindow {
149
150
  setPositionByPlayerPosition(existsFaces: boolean, existsScoreWindow: boolean, displayCenter: boolean, playerPos: Position, cameraPos: Position): void;
150
151
  setPositionEasy(pos: Positioning): void;
151
152
  setParsedMessage(message: ParsedMessage): void;
153
+ clear(): void;
152
154
  setYesNoChoice(isYesNo: boolean): boolean;
153
155
  isYesNoChoice(): boolean;
154
156
  isSaveChoice(): boolean;
@@ -2,4 +2,5 @@ import WWACompress from './WWACompress';
2
2
  import WWASave from './WWASave';
3
3
  import WWASaveData from './WWASaveData';
4
4
  export * from "./common";
5
+ export * as Migrators from "./migrators";
5
6
  export { WWACompress, WWASave, WWASaveData, };
@@ -0,0 +1,2 @@
1
+ import { WWAData } from "../../wwa_data";
2
+ export declare const applyAllMigrators: (wwaData: WWAData) => WWAData;
@@ -0,0 +1,2 @@
1
+ import { WWAData } from "../../wwa_data";
2
+ export declare const migrateGameOverPolicy: (oldWWAData: WWAData) => WWAData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwawing/engine",
3
- "version": "3.6.12",
3
+ "version": "3.7.2",
4
4
  "description": "World Wide Adventure: an RPG Engine.",
5
5
  "main": "./lib/wwa.js",
6
6
  "files": [
@@ -19,6 +19,7 @@
19
19
  "deploy:common:audio": "shx cp -R ../../node_modules/@wwawing/assets/audio lib/",
20
20
  "deploy:common:images": "shx cp ../../node_modules/@wwawing/assets/images/*.* lib/",
21
21
  "deploy:common:mapdata": "shx cp ../../node_modules/@wwawing/assets/mapdata/*.* lib/",
22
+ "deploy:common:vars": "shx cp ../../node_modules/@wwawing/assets/vars/*.* lib/",
22
23
  "deploy:common:style": "shx cp ../../node_modules/@wwawing/styles/output/*.* lib/ && shx cp ../../node_modules/@wwawing/assets/style/*.* lib/",
23
24
  "deploy:prod:html": "ts-node ./debug/make-debug-pages",
24
25
  "deploy:dev:html": "ts-node ./debug/make-debug-pages dev",
@@ -44,13 +45,13 @@
44
45
  "@types/pug": "^2.0.4",
45
46
  "@types/terser-webpack-plugin": "^5.0.3",
46
47
  "@types/webpack": "^5.28.0",
47
- "@wwawing/assets": "^3.6.12",
48
- "@wwawing/common-interface": "^3.6.12",
49
- "@wwawing/debug-server": "^3.6.12",
50
- "@wwawing/event-emitter": "^3.6.12",
51
- "@wwawing/loader": "^3.6.12",
52
- "@wwawing/page-generator": "^3.6.12",
53
- "@wwawing/styles": "^3.6.12",
48
+ "@wwawing/assets": "^3.7.2",
49
+ "@wwawing/common-interface": "^3.7.2",
50
+ "@wwawing/debug-server": "^3.7.2",
51
+ "@wwawing/event-emitter": "^3.7.2",
52
+ "@wwawing/loader": "^3.7.2",
53
+ "@wwawing/page-generator": "^3.7.2",
54
+ "@wwawing/styles": "^3.7.2",
54
55
  "crypto-js": "4.0.0",
55
56
  "npm-run-all": "^4.1.5",
56
57
  "pug": "^3.0.2",
@@ -67,8 +68,8 @@
67
68
  "access": "public"
68
69
  },
69
70
  "engines": {
70
- "node": ">=14",
71
+ "node": ">=16",
71
72
  "npm": ">=8"
72
73
  },
73
- "gitHead": "c2dc2390145ed99deebbdaab3ca87d5410da184b"
74
+ "gitHead": "7061ccf10b3c472d753afd7dbec9c70172dd20dc"
74
75
  }