@modlock/modlock 0.1.78 → 0.1.79

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/package.json CHANGED
@@ -7,11 +7,11 @@
7
7
  "license": "MIT",
8
8
  "name": "@modlock/modlock",
9
9
  "optionalDependencies": {
10
- "@modlock/darwin-arm64": "0.1.78",
11
- "@modlock/darwin-x64": "0.1.78",
12
- "@modlock/linux-arm64": "0.1.78",
13
- "@modlock/linux-x64": "0.1.78",
14
- "@modlock/win32-x64": "0.1.78"
10
+ "@modlock/darwin-arm64": "0.1.79",
11
+ "@modlock/darwin-x64": "0.1.79",
12
+ "@modlock/linux-arm64": "0.1.79",
13
+ "@modlock/linux-x64": "0.1.79",
14
+ "@modlock/win32-x64": "0.1.79"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
@@ -20,5 +20,5 @@
20
20
  "sideEffects": false,
21
21
  "type": "module",
22
22
  "types": "index.d.ts",
23
- "version": "0.1.78"
23
+ "version": "0.1.79"
24
24
  }
package/players.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Connection } from './host.gen.js';
1
+ import { type Connection, Player } from './host.gen.js';
2
2
  /** keepPlayers keeps the player list the host reported and tells the watchers. */
3
3
  export declare function keepPlayers(players: Connection[]): void;
4
4
  /**
@@ -6,6 +6,12 @@ export declare function keepPlayers(players: Connection[]): void;
6
6
  * once with the last one when a report already arrived.
7
7
  */
8
8
  export declare function watchPlayers(watcher: (players: readonly Connection[]) => void): void;
9
+ /**
10
+ * connection returns the connection of one player, given the player or
11
+ * their slot: their name, Steam ID, whether they are a bot and whether they
12
+ * finished joining. It returns undefined when nobody holds the slot.
13
+ */
14
+ export declare function connection(player: Player | number): Connection | undefined;
9
15
  /**
10
16
  * players lists the occupied player slots in slot order. It answers from the
11
17
  * roster the host last reported, and asks the host until a report arrives.