Skip to content

Commit b6e02df

Browse files
committed
games: Upload seed in logs
1 parent cb646e0 commit b6e02df

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/database/games.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const schema = new mongoose.Schema({
2828
type: String,
2929
required: true,
3030
},
31+
seed: Number,
3132
players: {
3233
type: Map,
3334
of: {
@@ -68,6 +69,7 @@ export interface GameModel {
6869
game: string;
6970
mod?: string | null | undefined;
7071
room: string;
72+
seed?: number | null;
7173
players: Map<string, Player>;
7274
created: Date;
7375
started: Date | null;

src/ps/games/game.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ export class BaseGame<State extends BaseState> {
554554
game: this.meta.id,
555555
mod: this.mod,
556556
room: this.roomid,
557+
seed: this.seed,
557558
players: new Map(Object.entries(this.players)),
558559
log: this.log.map(entry => JSON.stringify(entry)),
559560
created: this.createdAt,

0 commit comments

Comments
 (0)