implement pause feature,

bugfix: server stops in the beginning if no ticks found
This commit is contained in:
evanpelle
2024-12-25 15:19:35 -08:00
parent 0cce2b3b57
commit 3fe8d28abe
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -188,6 +188,9 @@ export class GameRunner {
} catch (error) {
showErrorModal(error, this.clientID)
this.stop()
const errorText = `Error: ${error.message}\nStack: ${error.stack}`;
consolex.error(errorText)
alert(`Game crashed! client id: ${this.clientID}\n Please paste the following in your bug report in Discord:\n` + errorText);
}
this.renderer.tick()
this.currTurn++
@@ -1,7 +1,7 @@
import { LitElement, html, css } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { Layer } from './Layer';
import { Game, GameType, Player, PlayerType, Relation, Unit, UnitType } from '../../../core/game/Game';
import { Game, GameType, GameType, Player, PlayerType, Relation, Unit, UnitType } from '../../../core/game/Game';
import { ClientID } from '../../../core/Schemas';
import { EventBus } from '../../../core/EventBus';
import { TransformHandler } from '../TransformHandler';