@hadoku/game-server 0.1.226 → 0.1.227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -503,8 +503,6 @@ export declare class RoomLobby<V extends PlatformRoomView, I extends RoomCreateI
503
503
  * does is checked against its lock, and the first lock that holds refuses the whole patch.
504
504
  */
505
505
  setSettings(roomId: string, callerId: string, patch: Record<string, unknown>): SetSettingsResult<V>;
506
- /** `setSettings` on a room in hand. `write` stands in for the type's own (a game with more to move when a setting does). */
507
- protected changeSettings(room: LobbyRoom, callerId: string, patch: Record<string, unknown>, write?: (room: LobbyRoom, next: Record<string, unknown>) => void): SetSettingsResult<V>;
508
506
  /** Idempotent for an existing member, who needs no password again. */
509
507
  join(roomId: string, caller: Caller, password?: string): JoinResult<V>;
510
508
  /**
@@ -519,10 +519,6 @@ export class RoomLobby {
519
519
  const room = this.#rooms.get(roomId);
520
520
  if (room === undefined)
521
521
  return { ok: false, reason: 'no-room' };
522
- return this.changeSettings(room, callerId, patch);
523
- }
524
- /** `setSettings` on a room in hand. `write` stands in for the type's own (a game with more to move when a setting does). */
525
- changeSettings(room, callerId, patch, write) {
526
522
  const settings = this.hooksOf(room).settings;
527
523
  if (settings === undefined)
528
524
  return { ok: false, reason: 'no-settings' };
@@ -533,7 +529,7 @@ export class RoomLobby {
533
529
  return { ok: false, reason: result.reason };
534
530
  if (result.changed.length === 0)
535
531
  return { ok: true, room: this.view(room) };
536
- (write ?? settings.write)(room, result.next);
532
+ settings.write(room, result.next);
537
533
  this.persist(room);
538
534
  this.log({ event: 'room-settings', roomId: room.id, settings: result.next });
539
535
  return { ok: true, room: this.view(room) };
@@ -7,7 +7,7 @@
7
7
  * offered while dealing; a pod room's default idle window and its post-deal
8
8
  * grace are a tournament's own), reached through `RoomBusyHook` rather than
9
9
  * this file importing pods or drafts itself — the same hook pattern
10
- * `useGameType`/`onRelayRoomOpened` already use. A non-Magic room (bomberman's)
10
+ * `onRelayRoomOpened` already uses. A non-Magic room (bomberman's)
11
11
  * that wires no hook gets `NO_BUSY_HOOK`'s plain rule: no extra reason to stay
12
12
  * offered past staleness, the casual idle window, never spared.
13
13
  *
@@ -7,7 +7,7 @@
7
7
  * offered while dealing; a pod room's default idle window and its post-deal
8
8
  * grace are a tournament's own), reached through `RoomBusyHook` rather than
9
9
  * this file importing pods or drafts itself — the same hook pattern
10
- * `useGameType`/`onRelayRoomOpened` already use. A non-Magic room (bomberman's)
10
+ * `onRelayRoomOpened` already uses. A non-Magic room (bomberman's)
11
11
  * that wires no hook gets `NO_BUSY_HOOK`'s plain rule: no extra reason to stay
12
12
  * offered past staleness, the casual idle window, never spared.
13
13
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/game-server",
3
- "version": "0.1.226",
4
- "gitHead": "569c405b4e6df7e49cc58f0e83286bb8df530a16",
3
+ "version": "0.1.227",
4
+ "gitHead": "690af2bdc6a23f2433a551e990fb52614ce330b9",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "The server parts any hosted game shares, above the kernel: the app config and edge auth, the room core (identity, seats, sessions, membership, the room list, the generic room routes), match hosting (the host contract, local and remote JVMs, placement, the start queue, recordings, the in-process and relay runtimes), streams, erase, telemetry and usage. Knows no game; Magic plugs in from apps/server. MIT; imports only node built-ins, express, socket.io, @wolffm/* and the platform packages.",
@@ -16,9 +16,9 @@
16
16
  "play/remote/"
17
17
  ],
18
18
  "dependencies": {
19
- "@wolffm/host-wire": "npm:@hadoku/host-wire@0.1.226",
20
- "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.226",
21
- "@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.259",
19
+ "@wolffm/host-wire": "npm:@hadoku/host-wire@0.1.227",
20
+ "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.227",
21
+ "@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.260",
22
22
  "@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.2.3",
23
23
  "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.152",
24
24
  "@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.152",