@kingdomsconnected/types 1.6.5 → 1.6.7
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/generated/client-api.d.ts +18 -0
- package/generated/server-api.d.ts +119 -0
- package/package.json +1 -1
|
@@ -794,6 +794,11 @@ declare global {
|
|
|
794
794
|
*/
|
|
795
795
|
readonly disguise: string | null;
|
|
796
796
|
|
|
797
|
+
/**
|
|
798
|
+
* Whether this player's body is drawn at all -- itself, what it wears and what it carries. True for everybody until something hides them. Published by their own client, so it follows `setVisible` once they have actually stopped drawing. A hidden player is only invisible: they still stand where they stand, still collide, can still be hit, and NPCs still see them.
|
|
799
|
+
*/
|
|
800
|
+
readonly visible: boolean;
|
|
801
|
+
|
|
797
802
|
/**
|
|
798
803
|
* Whether this player's body has both a pose and a soul, which is what everyone else waits for before spawning a puppet for them. False for the first moments of a connection.
|
|
799
804
|
*/
|
|
@@ -3615,6 +3620,19 @@ declare global {
|
|
|
3615
3620
|
* @returns Control names, in a fixed order.
|
|
3616
3621
|
*/
|
|
3617
3622
|
keys(): string[];
|
|
3623
|
+
|
|
3624
|
+
/**
|
|
3625
|
+
* Whether the HUD is drawing a hint on that control right now, the game's own hints and interaction prompts included, whoever put it up. Lets a script keep its own UI off a key a hint is waiting on.
|
|
3626
|
+
* @param key A control, such as `use` or `jump`; any of the game's, not only `keys()`.
|
|
3627
|
+
* @returns True while a drawn hint is on the control, as of the game's last hint refresh, at most a frame old.
|
|
3628
|
+
*/
|
|
3629
|
+
isKeyInUse(key: string): boolean;
|
|
3630
|
+
|
|
3631
|
+
/**
|
|
3632
|
+
* Every control a drawn hint is on right now, interaction prompts included, whoever put it up.
|
|
3633
|
+
* @returns Control names, each once; empty while no hints are drawn.
|
|
3634
|
+
*/
|
|
3635
|
+
shownKeys(): string[];
|
|
3618
3636
|
};
|
|
3619
3637
|
|
|
3620
3638
|
/**
|
|
@@ -261,6 +261,26 @@ declare global {
|
|
|
261
261
|
*/
|
|
262
262
|
playerPickpocketCaught: [thief: Player, victim: Player];
|
|
263
263
|
|
|
264
|
+
/**
|
|
265
|
+
* A new turn begins, including turns after automatic busts.
|
|
266
|
+
*/
|
|
267
|
+
diceTurnStart: [event: DiceProgressEvent];
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The server dealt a roll. Includes all six face values and the mask rolled this time.
|
|
271
|
+
*/
|
|
272
|
+
diceRoll: [event: DiceProgressEvent];
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The server accepted Continue or Pass. Invalid or repeated requests emit nothing.
|
|
276
|
+
*/
|
|
277
|
+
diceMove: [event: DiceProgressEvent];
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* A turn ended by banking, busting, winning, or a match ending. A round means one player's turn.
|
|
281
|
+
*/
|
|
282
|
+
diceTurnEnd: [event: DiceProgressEvent];
|
|
283
|
+
|
|
264
284
|
/**
|
|
265
285
|
* Dispatched once a match has started and both players have been sent to the table. Which of them throws first is drawn at random.
|
|
266
286
|
*/
|
|
@@ -2916,6 +2936,86 @@ declare global {
|
|
|
2916
2936
|
* The score that wins, banked at the end of a turn. 2000 when omitted, at most 100000.
|
|
2917
2937
|
*/
|
|
2918
2938
|
targetScore?: number | undefined;
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* First seat's scoreboard label, up to 64 UTF-8 bytes without control characters. Empty or omitted uses the native label.
|
|
2942
|
+
*/
|
|
2943
|
+
firstName?: string | undefined;
|
|
2944
|
+
|
|
2945
|
+
/**
|
|
2946
|
+
* Second seat's scoreboard label. Each client maps the seat to its local or opponent column.
|
|
2947
|
+
*/
|
|
2948
|
+
secondName?: string | undefined;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
/**
|
|
2952
|
+
* An accepted server dice action. Notifications describe server decisions, which can precede the native animation. Seats and die-mask bits start at zero; turns and rolls start at one.
|
|
2953
|
+
*/
|
|
2954
|
+
interface DiceProgressEvent {
|
|
2955
|
+
/**
|
|
2956
|
+
* Match ID.
|
|
2957
|
+
*/
|
|
2958
|
+
match: number;
|
|
2959
|
+
|
|
2960
|
+
/**
|
|
2961
|
+
* Network ID of the acting player.
|
|
2962
|
+
*/
|
|
2963
|
+
player: number;
|
|
2964
|
+
|
|
2965
|
+
/**
|
|
2966
|
+
* Acting seat: 0 for first, 1 for second.
|
|
2967
|
+
*/
|
|
2968
|
+
seat: number;
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* Turn number across both seats, starting at 1.
|
|
2972
|
+
*/
|
|
2973
|
+
turn: number;
|
|
2974
|
+
|
|
2975
|
+
/**
|
|
2976
|
+
* Roll within the turn; 0 before its first roll.
|
|
2977
|
+
*/
|
|
2978
|
+
roll: number;
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* Number of accepted moves so far.
|
|
2982
|
+
*/
|
|
2983
|
+
moveIndex: number;
|
|
2984
|
+
|
|
2985
|
+
/**
|
|
2986
|
+
* Unbanked points in this turn, before they are lost on a bust or banked on a pass.
|
|
2987
|
+
*/
|
|
2988
|
+
turnScore: number;
|
|
2989
|
+
|
|
2990
|
+
/**
|
|
2991
|
+
* This seat's banked score.
|
|
2992
|
+
*/
|
|
2993
|
+
totalScore: number;
|
|
2994
|
+
|
|
2995
|
+
/**
|
|
2996
|
+
* Six pip values (1 through 6) in die-index order on diceRoll; empty on other events. rolledMask identifies the dice rolled this time.
|
|
2997
|
+
*/
|
|
2998
|
+
faces: number[];
|
|
2999
|
+
|
|
3000
|
+
/**
|
|
3001
|
+
* Bit mask of dice rolled, on diceRoll; zero otherwise.
|
|
3002
|
+
*/
|
|
3003
|
+
rolledMask: number;
|
|
3004
|
+
|
|
3005
|
+
/**
|
|
3006
|
+
* Bit mask of dice selected in the accepted move; zero otherwise.
|
|
3007
|
+
*/
|
|
3008
|
+
heldMask: number;
|
|
3009
|
+
|
|
3010
|
+
/**
|
|
3011
|
+
* Points added by diceMove or banked by a passed diceTurnEnd; zero otherwise.
|
|
3012
|
+
*/
|
|
3013
|
+
points: number;
|
|
3014
|
+
|
|
3015
|
+
/**
|
|
3016
|
+
* continue or pass on diceMove; bust or rolled on diceRoll; pass, bust, won, gaveUp, left, timedOut, failed, or stopped on diceTurnEnd; empty on diceTurnStart.
|
|
3017
|
+
*/
|
|
3018
|
+
reason: string;
|
|
2919
3019
|
}
|
|
2920
3020
|
|
|
2921
3021
|
/**
|
|
@@ -2939,6 +3039,15 @@ declare global {
|
|
|
2939
3039
|
*/
|
|
2940
3040
|
start(first: number, second: number, options?: DiceMatchOptions): number;
|
|
2941
3041
|
|
|
3042
|
+
/**
|
|
3043
|
+
* Changes both scoreboard labels on the next native scoreboard refresh. Empty restores a native label. Names allow at most 64 UTF-8 bytes and no control characters.
|
|
3044
|
+
* @param match Match ID.
|
|
3045
|
+
* @param first First seat label.
|
|
3046
|
+
* @param second Second seat label.
|
|
3047
|
+
* @returns False if the match has ended.
|
|
3048
|
+
*/
|
|
3049
|
+
setNames(match: number, first: string, second: string): boolean;
|
|
3050
|
+
|
|
2942
3051
|
/**
|
|
2943
3052
|
* Ends a match with nobody winning; both tables close.
|
|
2944
3053
|
* @param match The match to end.
|
|
@@ -6172,6 +6281,11 @@ declare global {
|
|
|
6172
6281
|
*/
|
|
6173
6282
|
virtualWorld?: number | undefined;
|
|
6174
6283
|
|
|
6284
|
+
/**
|
|
6285
|
+
* Invisible boundary collision from both sides; false when omitted. Polygons need a simple outline and positive height. Walls are 0.2 m thick; spheres use a tessellated boundary.
|
|
6286
|
+
*/
|
|
6287
|
+
collision?: boolean | undefined;
|
|
6288
|
+
|
|
6175
6289
|
/**
|
|
6176
6290
|
* Whether it starts enabled; true when omitted.
|
|
6177
6291
|
*/
|
|
@@ -6246,6 +6360,11 @@ declare global {
|
|
|
6246
6360
|
*/
|
|
6247
6361
|
metadata: Record<string, unknown>;
|
|
6248
6362
|
|
|
6363
|
+
/**
|
|
6364
|
+
* Invisible boundary walls block both directions while enabled, leaving the interior empty. Authored areas only; invalid collision shapes throw.
|
|
6365
|
+
*/
|
|
6366
|
+
collision: boolean;
|
|
6367
|
+
|
|
6249
6368
|
/**
|
|
6250
6369
|
* Whether crossings are raised and the lookups find it. Switching it off raises `areaExit` for everyone inside on the next tick; switching it on, `areaEnter`. Works on level areas too.
|
|
6251
6370
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingdomsconnected/types",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"description": "TypeScript declarations for the Kingdoms Connected scripting API, one entry per side: @kingdomsconnected/types/server and @kingdomsconnected/types/client",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"keywords": [
|