Skip to content

Commit 8c288ca

Browse files
committed
games: Refactor autoStart to always start when full
1 parent 0df4c4f commit 8c288ca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/ps/games/game.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ export class BaseGame<State extends BaseState> {
341341
}
342342
if (this.meta.players === 'single' || (Array.isArray(availableSlots) && availableSlots.length === 1) || availableSlots === 1) {
343343
// Join was successful and game is now full
344-
if (this.meta.players === 'single' || this.meta.autostart) this.start();
344+
if (this.meta.players === 'single') this.start();
345345
this.onAfterAddPlayer?.(newPlayer);
346346
this.backup();
347347
return { success: true, data: { started: true, as: newPlayer.turn } };

src/ps/games/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type Meta = Readonly<
2525

2626
mods?: Readonly<{ list: ModEnum<string>; data: ModData<string> }>;
2727

28-
/** @default Assume true */
28+
/** Whether the game will only start automatically. */
2929
autostart?: boolean;
3030
timer?: number | false;
3131
pokeTimer?: number | false | undefined;

0 commit comments

Comments
 (0)