@modlock/modlock 0.1.78 → 0.1.80
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/cast.d.ts +3 -2
- package/heroes.d.ts +8 -0
- package/host.gen.d.ts +45 -0
- package/index.d.ts +41 -3
- package/index.js +2517 -2301
- package/package.json +6 -6
- package/players.d.ts +7 -1
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.
|
|
11
|
-
"@modlock/darwin-x64": "0.1.
|
|
12
|
-
"@modlock/linux-arm64": "0.1.
|
|
13
|
-
"@modlock/linux-x64": "0.1.
|
|
14
|
-
"@modlock/win32-x64": "0.1.
|
|
10
|
+
"@modlock/darwin-arm64": "0.1.80",
|
|
11
|
+
"@modlock/darwin-x64": "0.1.80",
|
|
12
|
+
"@modlock/linux-arm64": "0.1.80",
|
|
13
|
+
"@modlock/linux-x64": "0.1.80",
|
|
14
|
+
"@modlock/win32-x64": "0.1.80"
|
|
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.
|
|
23
|
+
"version": "0.1.80"
|
|
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.
|