@falloutmp/types 0.2.4 → 0.2.5

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.
@@ -286,6 +286,16 @@ declare global {
286
286
  */
287
287
  isMenuOpen(name: string): boolean;
288
288
 
289
+ /**
290
+ * Holds the game's loading screen up until hideLoadingScreen. Called as this resource starts it takes over the join's loading screen, which otherwise goes once the server's world is in, so the player goes from it straight to whatever the resource shows first; in a session it shows the loading screen. The hold ends when this resource stops, and after a minute regardless.
291
+ */
292
+ showLoadingScreen(): void;
293
+
294
+ /**
295
+ * Ends this resource's hold on the loading screen; it goes as soon as the join no longer needs it, which in a session is at once.
296
+ */
297
+ hideLoadingScreen(): void;
298
+
289
299
  /**
290
300
  * Queues one of the game's message boxes; they show one at a time. False when the game refused it: too many queued, or a duplicate under `unique`.
291
301
  * @param options The text, an optional title, one to ten button labels (default ["$OK"]; localisation keys are resolved; a blank label is left out but keeps its index), and whether to skip it while a box with the same body is queued.
@@ -2201,7 +2211,7 @@ declare global {
2201
2211
  getLabel(key: string): string;
2202
2212
 
2203
2213
  /**
2204
- * Binds a resource-owned handler that fires while the game has foreground input and no UI is capturing it.
2214
+ * Binds a resource-owned handler that fires while the game has foreground input and no UI is capturing it. Each wheelup/wheeldown notch fires down, then up.
2205
2215
  * @param key Case-insensitive supported keyboard or mouse key name.
2206
2216
  * @param stateOrHandler Trigger state, or the handler itself to use the default down state.
2207
2217
  * @param handler Handler required when an explicit trigger state is provided.
@@ -2221,7 +2231,7 @@ declare global {
2221
2231
  /**
2222
2232
  * Queries live physical key state using the same foreground and UI-input gate as binding dispatch.
2223
2233
  * @param key Case-insensitive supported key name.
2224
- * @returns False when the key is up, the game is backgrounded, UI owns input, or the key name is invalid.
2234
+ * @returns False when the key is up, the game is backgrounded, UI owns input, or the key name is invalid. Always false for the wheel, which is never held.
2225
2235
  */
2226
2236
  isDown(key: string): boolean;
2227
2237
  };
@@ -2492,7 +2502,7 @@ declare global {
2492
2502
  getTier(): number;
2493
2503
 
2494
2504
  /**
2495
- * Rebinds push-to-talk. Unknown key names throw.
2505
+ * Rebinds push-to-talk. Unknown key names and the wheel, which is never held, throw.
2496
2506
  * @param key Case-insensitive key name, using the same names as Key.bind.
2497
2507
  */
2498
2508
  setPushToTalkKey(key: string): void;
@@ -500,9 +500,10 @@ declare global {
500
500
  * @param position Where to, in the space the player goes to.
501
501
  * @param heading Facing in radians; the current one when left out.
502
502
  * @param space Another worldspace or an interior cell, exactly one of the two; the one the player is in when left out.
503
+ * @param options loadScreen: whether the player's game may show its loading screen when the destination is not loaded (default true). With false the destination streams in with no loading screen, as the game's own "No Load Screen" doors do: their game stalls for the load instead, so fade the screen first (`Hud.fade`).
503
504
  * @returns True when sent; false when the player is gone, or the interior has no reference to land at. Throws for a position that is not a finite Vector3.
504
505
  */
505
- teleport(position: Vector3, heading?: number, space?: { worldSpace?: number | string; interiorCell?: number | string }): boolean;
506
+ teleport(position: Vector3, heading?: number, space?: { worldSpace?: number | string; interiorCell?: number | string }, options?: { loadScreen?: boolean }): boolean;
506
507
 
507
508
  /**
508
509
  * Brings a dead player back at full health. Nothing respawns a player on its own: call this from `playerDeath`, at once or later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@falloutmp/types",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "TypeScript declarations for the Fallout Multiplayer scripting API: @falloutmp/types/server and @falloutmp/types/client",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {