Add gameVersion to Mocked Game

This commit is contained in:
xsn34kzx 2024-10-12 12:12:03 -04:00
parent a90a9fb773
commit 2406bf6538

View File

@ -23,6 +23,7 @@ import KeyboardPlugin = Phaser.Input.Keyboard.KeyboardPlugin;
import GamepadPlugin = Phaser.Input.Gamepad.GamepadPlugin; import GamepadPlugin = Phaser.Input.Gamepad.GamepadPlugin;
import EventEmitter = Phaser.Events.EventEmitter; import EventEmitter = Phaser.Events.EventEmitter;
import UpdateList = Phaser.GameObjects.UpdateList; import UpdateList = Phaser.GameObjects.UpdateList;
import { version } from "../../../package.json";
Object.defineProperty(window, "localStorage", { Object.defineProperty(window, "localStorage", {
value: mockLocalStorage(), value: mockLocalStorage(),
@ -101,6 +102,7 @@ export default class GameWrapper {
injectMandatory() { injectMandatory() {
this.game.config = { this.game.config = {
seed: ["test"], seed: ["test"],
gameVersion: version
}; };
this.scene.game = this.game; this.scene.game = this.game;
this.game.renderer = { this.game.renderer = {