Fixes #4; Show game stats instead of UUIDs in lobby
release-tag / release-image (push) Successful in 57s
release-tag / release-image (push) Successful in 57s
This commit is contained in:
+4
-4
@@ -7,15 +7,15 @@ export interface LobbyNetcode extends GameObjectNetcode {
|
||||
}
|
||||
|
||||
|
||||
export type Lobby = LobbyNetcode & {
|
||||
export type Lobby = Omit<LobbyNetcode, 'games'> & {
|
||||
games: Array<Game>
|
||||
}
|
||||
export function create_lobby(input: LobbyNetcode, register: GameObjectRegister) {
|
||||
return new Proxy<any>(input, {
|
||||
get(target: LobbyNetcode, prop, reciever) {
|
||||
// if (prop == "games") {
|
||||
// return target.games.map(e => register.games.get(e))
|
||||
// }
|
||||
if (prop == "games") {
|
||||
return target.games.map(e => register.games.get(e))
|
||||
}
|
||||
return Reflect.get(target, prop, reciever);
|
||||
},
|
||||
set(target, prop, val, receiver) {
|
||||
|
||||
Reference in New Issue
Block a user