Archived
Formatting
This commit is contained in:
+4
-4
@@ -1,6 +1,6 @@
|
||||
export enum ContainerVisibility {
|
||||
NONE = "none",
|
||||
ONLY_LAST = "only_last",
|
||||
ALL = "all",
|
||||
PROTECTED = "protected"
|
||||
NONE = "none",
|
||||
ONLY_LAST = "only_last",
|
||||
ALL = "all",
|
||||
PROTECTED = "protected",
|
||||
}
|
||||
|
||||
@@ -1,60 +1,47 @@
|
||||
export interface ClientMessage {
|
||||
uuid: string
|
||||
target: string
|
||||
method: string
|
||||
args: { [key: string]: string }
|
||||
uuid: string;
|
||||
target: string;
|
||||
method: string;
|
||||
args: { [key: string]: string };
|
||||
}
|
||||
|
||||
export interface LobbyEvents {
|
||||
'newGame': (author: IUser, game: IGameListing) => void;
|
||||
newGame: (author: IUser, game: IGameListing) => void;
|
||||
}
|
||||
|
||||
|
||||
|
||||
type TeamEvents = {
|
||||
team_addPlayer: { gameObject: string, data: IPlayer },
|
||||
test: { bite: number, data: IPlayer }
|
||||
}
|
||||
team_addPlayer: { gameObject: string; data: IPlayer };
|
||||
};
|
||||
|
||||
type TE = {
|
||||
[T in keyof TeamEvents]: { event: T } & TeamEvents[T]
|
||||
}
|
||||
[T in keyof TeamEvents]: { event: T } & TeamEvents[T];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
type ChildEvents = TE
|
||||
type ChildEvents = TE;
|
||||
|
||||
export interface GameEvents {
|
||||
"createTeam": (author: IUser, team: ITeam) => void
|
||||
"removeTeam": (author: IUser, team: ITeam) => void
|
||||
"createPlayer": (author: IUser, player: IPlayer) => void
|
||||
"removePlayer": (author: IUser, player: IPlayer, reason: string) => void
|
||||
"childEvent": (event: ChildEvents[keyof ChildEvents]) => void
|
||||
createTeam: (author: IUser, team: ITeam) => void;
|
||||
removeTeam: (author: IUser, team: ITeam) => void;
|
||||
createPlayer: (author: IUser, player: IPlayer) => void;
|
||||
removePlayer: (author: IUser, player: IPlayer, reason: string) => void;
|
||||
childEvent: (event: ChildEvents[keyof ChildEvents]) => void;
|
||||
}
|
||||
|
||||
|
||||
export interface IGameObject {
|
||||
readonly uuid: string
|
||||
readonly uuid: string;
|
||||
}
|
||||
|
||||
export interface IUser {
|
||||
readonly username: string
|
||||
readonly image: string
|
||||
readonly username: string;
|
||||
readonly image: string;
|
||||
}
|
||||
|
||||
export interface IPlayer extends IGameObject {
|
||||
export interface IPlayer extends IGameObject {}
|
||||
|
||||
}
|
||||
|
||||
export interface ITeam extends IGameObject {
|
||||
|
||||
}
|
||||
export interface ITeam extends IGameObject {}
|
||||
export interface IGameListing extends IGameObject {
|
||||
readonly players: IUser[]
|
||||
readonly started: boolean
|
||||
readonly owner: string
|
||||
readonly rules: {}
|
||||
}
|
||||
readonly players: IUser[];
|
||||
readonly started: boolean;
|
||||
readonly owner: string;
|
||||
readonly rules: {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user