@hadoku/game-server 0.1.256 → 0.1.257
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.
- package/dist/room/room-type.d.ts +5 -3
- package/dist/room/room-type.js +11 -9
- package/package.json +5 -5
package/dist/room/room-type.d.ts
CHANGED
|
@@ -217,8 +217,10 @@ export interface HostedRoomSpec {
|
|
|
217
217
|
minTier?: RoomFloorTier;
|
|
218
218
|
}
|
|
219
219
|
/**
|
|
220
|
-
* The room type of a registered game the host does not play itself
|
|
221
|
-
* seats (or the game's `max`, if smaller)
|
|
222
|
-
* `table.seats` (every seat, when the game names no table).
|
|
220
|
+
* The room type of a registered game the host does not play itself. A relay game's room is its match:
|
|
221
|
+
* `plainRoomType`, opened at eight seats (or the game's `max`, if smaller), growing to `max`, its match
|
|
222
|
+
* of `table.seats` (every seat, when the game names no table). A game with no runtime here seats its
|
|
223
|
+
* players on its own server, so its room has no seats: nobody sits, and a stored room's are dropped.
|
|
224
|
+
* The game's tier floor is every room's.
|
|
223
225
|
*/
|
|
224
226
|
export declare function hostedRoomType<I extends RoomCreateInput>(spec: HostedRoomSpec): RoomTypeHooks<PlainGame, I>;
|
package/dist/room/room-type.js
CHANGED
|
@@ -79,15 +79,17 @@ export function plainRoomType(size) {
|
|
|
79
79
|
/** The most seats a hosted room opens with; one whose game seats fewer opens at its game's `max`. */
|
|
80
80
|
const HOSTED_OPENING_SEATS = 8;
|
|
81
81
|
/**
|
|
82
|
-
* The room type of a registered game the host does not play itself
|
|
83
|
-
* seats (or the game's `max`, if smaller)
|
|
84
|
-
* `table.seats` (every seat, when the game names no table).
|
|
82
|
+
* The room type of a registered game the host does not play itself. A relay game's room is its match:
|
|
83
|
+
* `plainRoomType`, opened at eight seats (or the game's `max`, if smaller), growing to `max`, its match
|
|
84
|
+
* of `table.seats` (every seat, when the game names no table). A game with no runtime here seats its
|
|
85
|
+
* players on its own server, so its room has no seats: nobody sits, and a stored room's are dropped.
|
|
86
|
+
* The game's tier floor is every room's.
|
|
85
87
|
*/
|
|
86
88
|
export function hostedRoomType(spec) {
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return spec.minTier === undefined ?
|
|
89
|
+
const relay = spec.runtime === 'relay';
|
|
90
|
+
const plain = plainRoomType(relay ? { seats: Math.min(HOSTED_OPENING_SEATS, spec.seats.max), max: spec.seats.max, relaySeats: spec.table?.seats ?? spec.seats.max } : { seats: 0, max: 0 });
|
|
91
|
+
const hosted = relay
|
|
92
|
+
? plain
|
|
93
|
+
: { ...plain, usesSeats: () => false, decode: (app, version, ctx) => ({ ...plain.decode(app, version, ctx), seats: [] }) };
|
|
94
|
+
return spec.minTier === undefined ? hosted : { ...hosted, minTier: spec.minTier };
|
|
93
95
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/game-server",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.257",
|
|
4
|
+
"gitHead": "200c3dd1e6887b83b9d7572babb84ffbd8f38ec9",
|
|
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.
|
|
20
|
-
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.
|
|
21
|
-
"@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.
|
|
19
|
+
"@wolffm/host-wire": "npm:@hadoku/host-wire@0.1.257",
|
|
20
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.257",
|
|
21
|
+
"@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.290",
|
|
22
22
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.2.4",
|
|
23
23
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.158",
|
|
24
24
|
"@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.158",
|