mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 12:16:28 +00:00
fixed string | null
This commit is contained in:
+2
-2
@@ -374,7 +374,7 @@ export const PlayerSchema = z.object({
|
||||
clientID: ID,
|
||||
username: SafeString,
|
||||
flag: SafeString.optional(),
|
||||
pattern: SafeString.nullable().optional(),
|
||||
pattern: SafeString.nullable(),
|
||||
});
|
||||
|
||||
export const GameStartInfoSchema = z.object({
|
||||
@@ -446,7 +446,7 @@ export const ClientJoinMessageSchema = z.object({
|
||||
lastTurn: z.number(), // The last turn the client saw.
|
||||
username: SafeString,
|
||||
flag: SafeString.nullable(),
|
||||
pattern: SafeString.nullable().optional(),
|
||||
pattern: SafeString.nullable(),
|
||||
});
|
||||
|
||||
export const ClientMessageSchema = z.union([
|
||||
|
||||
@@ -304,7 +304,7 @@ export class PlayerInfo {
|
||||
public readonly clan: string | null;
|
||||
|
||||
constructor(
|
||||
public readonly pattern: string | null | undefined,
|
||||
public readonly pattern: string | null,
|
||||
public readonly flag: string | undefined,
|
||||
public readonly name: string,
|
||||
public readonly playerType: PlayerType,
|
||||
|
||||
@@ -93,7 +93,7 @@ export interface PlayerUpdate {
|
||||
type: GameUpdateType.Player;
|
||||
nameViewData?: NameViewData;
|
||||
clientID: ClientID | null;
|
||||
pattern: string | undefined | null;
|
||||
pattern: string | null;
|
||||
flag: string | undefined;
|
||||
name: string;
|
||||
displayName: string;
|
||||
|
||||
@@ -172,7 +172,7 @@ export class PlayerView {
|
||||
return this.data.flag;
|
||||
}
|
||||
|
||||
pattern(): string | undefined | null {
|
||||
pattern(): string | null {
|
||||
return this.data.pattern;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ export class PlayerImpl implements Player {
|
||||
public _units: Unit[] = [];
|
||||
public _tiles: Set<TileRef> = new Set();
|
||||
|
||||
private _pattern: string | undefined | null;
|
||||
private _pattern: string | null;
|
||||
private _flag: string | undefined;
|
||||
private _name: string;
|
||||
private _displayName: string;
|
||||
@@ -180,7 +180,7 @@ export class PlayerImpl implements Player {
|
||||
return this._smallID;
|
||||
}
|
||||
|
||||
pattern(): string | undefined | null {
|
||||
pattern(): string | null {
|
||||
return this._pattern;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,6 @@ export class Client {
|
||||
public readonly username: string,
|
||||
public readonly ws: WebSocket,
|
||||
public readonly flag: string | null,
|
||||
public readonly pattern: string | undefined | null,
|
||||
public readonly pattern: string | null,
|
||||
) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user