mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 00:51:56 +00:00
b71acdc993
## Description: This is meant to give players more customization options. Permission handling hasn’t really been implemented yet. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [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 ## Please put your Discord username so you can be contacted if a bug or regression is found: aotumuri
25 lines
774 B
TypeScript
25 lines
774 B
TypeScript
import WebSocket from "ws";
|
|
import { TokenPayload } from "../core/ApiSchemas";
|
|
import { Tick } from "../core/game/Game";
|
|
import { ClientID } from "../core/Schemas";
|
|
|
|
export class Client {
|
|
public lastPing: number = Date.now();
|
|
public isDisconnected: boolean = false;
|
|
|
|
public hashes: Map<Tick, number> = new Map();
|
|
|
|
constructor(
|
|
public readonly clientID: ClientID,
|
|
public readonly persistentID: string,
|
|
public readonly claims: TokenPayload | null,
|
|
public readonly roles: string[] | undefined,
|
|
public readonly flares: string[] | undefined,
|
|
public readonly ip: string,
|
|
public readonly username: string,
|
|
public readonly ws: WebSocket,
|
|
public readonly flag: string | undefined,
|
|
public readonly pattern: string | undefined,
|
|
) {}
|
|
}
|