refactor typescript wiring

This commit is contained in:
seavor 2026-04-15 15:46:17 -05:00
parent cea9ae62d8
commit c62c336a11
286 changed files with 2999 additions and 3053 deletions

View file

@ -1,11 +1,11 @@
import { create } from '@bufbuild/protobuf';
import webClient from '../../WebClient';
import { Command_JoinGame_ext, Command_JoinGameSchema } from 'generated/proto/room_commands_pb';
import { RoomPersistence } from '../../persistence';
import { JoinGameParams } from 'types';
export function joinGame(roomId: number, joinGameParams: JoinGameParams): void {
webClient.protobuf.sendRoomCommand(roomId, Command_JoinGame_ext, create(Command_JoinGameSchema, joinGameParams), {
import { RoomPersistence } from '../../persistence';
import { Data } from '@app/types';
export function joinGame(roomId: number, joinGameParams: Data.JoinGameParams): void {
webClient.protobuf.sendRoomCommand(roomId, Data.Command_JoinGame_ext, create(Data.Command_JoinGameSchema, joinGameParams), {
onSuccess: () => {
RoomPersistence.joinedGame(roomId, joinGameParams.gameId);
},