mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-20 16:30:38 +00:00
adding persistent id
This commit is contained in:
+3
-1
@@ -224,6 +224,7 @@ export const ClientIntentMessageSchema = ClientBaseMessageSchema.extend({
|
||||
|
||||
export const ClientJoinMessageSchema = ClientBaseMessageSchema.extend({
|
||||
type: z.literal('join'),
|
||||
persistentID: z.string(),
|
||||
lastTurn: z.number() // The last turn the client saw.
|
||||
})
|
||||
|
||||
@@ -236,7 +237,8 @@ export const PlayerRecordSchema = z.object({
|
||||
})
|
||||
|
||||
export const GameRecordSchema = z.object({
|
||||
id: z.string(),
|
||||
id: z.string(), // WARNING: PII
|
||||
persistentID: z.string(), // WARNING: PII
|
||||
gameConfig: GameConfigSchema,
|
||||
players: z.array(PlayerRecordSchema),
|
||||
startTimestampMS: z.number(),
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Cell, Execution, MutableGame, MutablePlayer, Player, PlayerID, PlayerTy
|
||||
import { PseudoRandom } from "../PseudoRandom";
|
||||
import { manhattanDist } from "../Util";
|
||||
import { MessageType } from "../../client/graphics/layers/EventsDisplay";
|
||||
import { renderNumber } from "../../client/graphics/Utils";
|
||||
import { renderNumber } from "../../client/Utils";
|
||||
|
||||
export class AttackExecution implements Execution {
|
||||
private breakAlliance = false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MessageType } from "../../client/graphics/layers/EventsDisplay";
|
||||
import { renderNumber } from "../../client/graphics/Utils";
|
||||
import { renderNumber } from "../../client/Utils";
|
||||
import { AllPlayers, Cell, Execution, MutableGame, MutablePlayer, MutableUnit, Player, PlayerID, Tile, Unit, UnitType } from "../game/Game";
|
||||
import { PathFinder } from "../pathfinding/PathFinding";
|
||||
import { PathFindResultType } from "../pathfinding/AStar";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CellString, GameImpl } from "./GameImpl";
|
||||
import { UnitImpl } from "./UnitImpl";
|
||||
import { TileImpl } from "./TileImpl";
|
||||
import { MessageType } from "../../client/graphics/layers/EventsDisplay";
|
||||
import { renderTroops } from "../../client/graphics/Utils";
|
||||
import { renderTroops } from "../../client/Utils";
|
||||
|
||||
interface Target {
|
||||
tick: Tick
|
||||
|
||||
Reference in New Issue
Block a user