mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 01:02:29 +00:00
send game hash to server each second
This commit is contained in:
@@ -63,7 +63,7 @@ export class EventsDisplay extends LitElement implements Layer {
|
||||
],
|
||||
[GameUpdateType.BrokeAlliance, (u) => this.onBrokeAllianceEvent(u)],
|
||||
[GameUpdateType.TargetPlayer, (u) => this.onTargetPlayerEvent(u)],
|
||||
[GameUpdateType.EmojiUpdate, (u) => this.onEmojiMessageEvent(u)],
|
||||
[GameUpdateType.Emoji, (u) => this.onEmojiMessageEvent(u)],
|
||||
]);
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -107,7 +107,7 @@ export class OptionsMenu extends LitElement implements Layer {
|
||||
tick() {
|
||||
this.hasWinner =
|
||||
this.hasWinner ||
|
||||
this.game.updatesSinceLastTick()[GameUpdateType.WinUpdate].length > 0;
|
||||
this.game.updatesSinceLastTick()[GameUpdateType.Win].length > 0;
|
||||
if (this.game.inSpawnPhase()) {
|
||||
this.timer = 0;
|
||||
} else if (!this.hasWinner && this.game.ticks() % 10 == 0) {
|
||||
|
||||
@@ -208,7 +208,7 @@ export class WinModal extends LitElement implements Layer {
|
||||
}
|
||||
this.show();
|
||||
}
|
||||
this.game.updatesSinceLastTick()[GameUpdateType.WinUpdate].forEach((wu) => {
|
||||
this.game.updatesSinceLastTick()[GameUpdateType.Win].forEach((wu) => {
|
||||
const winner = this.game.playerBySmallID(wu.winnerID) as PlayerView;
|
||||
this.eventBus.emit(new SendWinnerEvent(winner.clientID()));
|
||||
if (winner == this.game.myPlayer()) {
|
||||
|
||||
Reference in New Issue
Block a user