mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-18 09:14:09 +00:00
Remove clientID, persistentID, gameID from ClientBaseMessageSchema, TurnSchema (#666)
## Description: Remove the devils `clientID`, `persistentID`, and `gameID` from `ClientBaseMessageSchema`, as well as `gameID` from `TurnSchema`. These values are already known through the `Client` object that is hoisted into the relevant handler. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --------- Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
co-authored by
Scott Anderson
parent
a62bbbc6b1
commit
cb9b5a7a17
@@ -290,7 +290,6 @@ const IntentSchema = z.union([
|
||||
|
||||
export const TurnSchema = z.object({
|
||||
turnNumber: z.number(),
|
||||
gameID: ID,
|
||||
intents: z.array(IntentSchema),
|
||||
// The hash of the game state at the end of the turn.
|
||||
hash: z.number().nullable().optional(),
|
||||
@@ -357,9 +356,6 @@ export const ServerMessageSchema = z.union([
|
||||
|
||||
const ClientBaseMessageSchema = z.object({
|
||||
type: z.enum(["winner", "join", "intent", "ping", "log", "hash"]),
|
||||
clientID: ID,
|
||||
persistentID: SafeString.nullable(), // WARNING: persistent id is private.
|
||||
gameID: ID,
|
||||
});
|
||||
|
||||
export const ClientSendWinnerSchema = ClientBaseMessageSchema.extend({
|
||||
|
||||
Reference in New Issue
Block a user