xray16 1.6.0 → 1.6.1

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.
Files changed (53) hide show
  1. package/package.json +12 -6
  2. package/xray16.d.ts +30847 -0
  3. package/types/index.d.ts +0 -55
  4. package/types/internal.d.ts +0 -6
  5. package/types/xr_ai/xr_action.d.ts +0 -1803
  6. package/types/xr_ai/xr_alife.d.ts +0 -1872
  7. package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
  8. package/types/xr_ai/xr_goap.d.ts +0 -1118
  9. package/types/xr_ai/xr_graph.d.ts +0 -135
  10. package/types/xr_ai/xr_memory.d.ts +0 -384
  11. package/types/xr_lib/xr_animation.d.ts +0 -252
  12. package/types/xr_lib/xr_bitwise.d.ts +0 -44
  13. package/types/xr_lib/xr_color.d.ts +0 -142
  14. package/types/xr_lib/xr_debug.d.ts +0 -183
  15. package/types/xr_lib/xr_dialog.d.ts +0 -132
  16. package/types/xr_lib/xr_flags.d.ts +0 -592
  17. package/types/xr_lib/xr_fs.d.ts +0 -617
  18. package/types/xr_lib/xr_game.d.ts +0 -362
  19. package/types/xr_lib/xr_hit.d.ts +0 -127
  20. package/types/xr_lib/xr_ini.d.ts +0 -475
  21. package/types/xr_lib/xr_level.d.ts +0 -797
  22. package/types/xr_lib/xr_luabind.d.ts +0 -90
  23. package/types/xr_lib/xr_map.d.ts +0 -194
  24. package/types/xr_lib/xr_math.d.ts +0 -871
  25. package/types/xr_lib/xr_multiplayer.d.ts +0 -1081
  26. package/types/xr_lib/xr_profile.d.ts +0 -272
  27. package/types/xr_lib/xr_properties.d.ts +0 -612
  28. package/types/xr_lib/xr_relation.d.ts +0 -231
  29. package/types/xr_lib/xr_render.d.ts +0 -167
  30. package/types/xr_lib/xr_save.d.ts +0 -835
  31. package/types/xr_lib/xr_sound.d.ts +0 -517
  32. package/types/xr_lib/xr_stats.ts +0 -51
  33. package/types/xr_lib/xr_task.d.ts +0 -390
  34. package/types/xr_lib/xr_time.d.ts +0 -177
  35. package/types/xr_lib/xr_type.d.ts +0 -70
  36. package/types/xr_object/client/xr_anomaly.d.ts +0 -70
  37. package/types/xr_object/client/xr_artefact.d.ts +0 -153
  38. package/types/xr_object/client/xr_client_object.d.ts +0 -207
  39. package/types/xr_object/client/xr_creature.d.ts +0 -243
  40. package/types/xr_object/client/xr_item.d.ts +0 -370
  41. package/types/xr_object/client/xr_level.d.ts +0 -755
  42. package/types/xr_object/client/xr_physic.d.ts +0 -644
  43. package/types/xr_object/client/xr_zone.d.ts +0 -85
  44. package/types/xr_object/script/xr_script_interface.d.ts +0 -1142
  45. package/types/xr_object/script/xr_script_object.d.ts +0 -5702
  46. package/types/xr_object/script/xr_script_trade.d.ts +0 -51
  47. package/types/xr_object/server/xr_server_object.d.ts +0 -1488
  48. package/types/xr_ui/xr_ui_asset.d.ts +0 -364
  49. package/types/xr_ui/xr_ui_core.d.ts +0 -426
  50. package/types/xr_ui/xr_ui_event.d.ts +0 -1449
  51. package/types/xr_ui/xr_ui_interface.d.ts +0 -2449
  52. package/types/xr_ui/xr_ui_menu.d.ts +0 -401
  53. package/types/xrf_plugin.d.ts +0 -111
@@ -1,401 +0,0 @@
1
- import type { Nullable } from "../internal";
2
-
3
- declare module "xray16" {
4
- /**
5
- * Main-menu options manager binding.
6
- *
7
- * @source C++ class COptionsManager
8
- * @customConstructor COptionsManager
9
- * @group xr_ui_menu
10
- *
11
- * @remarks
12
- * Operates on option item groups registered by the options UI.
13
- */
14
- export class COptionsManager {
15
- /**
16
- * Create an options manager script proxy.
17
- */
18
- public constructor();
19
-
20
- /**
21
- * Send a UI options message to every option item in a group.
22
- *
23
- * @param group - Options group name.
24
- * @param message - Message name.
25
- */
26
- public SendMessage2Group(group: string, message: string): void;
27
-
28
- /**
29
- * Restore options in a group from their backup values.
30
- *
31
- * @param group - Options group name.
32
- */
33
- public UndoGroup(group: string): void;
34
-
35
- /**
36
- * Save current option values as the backup for a group.
37
- *
38
- * @param group - Options group name.
39
- */
40
- public SaveBackupValues(group: string): void;
41
-
42
- /**
43
- * Persist current option values for a group.
44
- *
45
- * @param group - Options group name.
46
- */
47
- public SaveValues(group: string): void;
48
-
49
- /**
50
- * Apply current engine option values to controls in a group.
51
- *
52
- * @param group - Options group name.
53
- */
54
- public SetCurrentValues(group: string): void;
55
-
56
- /**
57
- * Check whether accepted options require a system restart.
58
- *
59
- * @returns Whether a system restart is needed.
60
- */
61
- public NeedSystemRestart(): boolean;
62
-
63
- /**
64
- * Check whether accepted options require a video restart.
65
- *
66
- * @returns Whether a video restart is needed.
67
- */
68
- public NeedVidRestart(): boolean;
69
-
70
- /**
71
- * Run post-accept handling after options are saved.
72
- */
73
- public OptionsPostAccept(): void;
74
- }
75
-
76
- /**
77
- * Main menu binding.
78
- *
79
- * @source C++ class CMainMenu
80
- * @customConstructor CMainMenu
81
- * @group xr_ui_menu
82
- *
83
- * @remarks
84
- * Engine-owned singleton returned by `main_menu.get_main_menu()`.
85
- */
86
- export class CMainMenu {
87
- /**
88
- * Get the CD key stored by the game.
89
- *
90
- * @returns CD key string.
91
- */
92
- public GetCDKey(): string;
93
-
94
- /**
95
- * Get the multiplayer account manager.
96
- *
97
- * @returns Account manager.
98
- */
99
- public GetAccountMngr(): account_manager;
100
-
101
- /**
102
- * Read metadata for a recorded demo file.
103
- *
104
- * @param fileName - Demo file name.
105
- * @returns Demo info, or `null` when it cannot be read.
106
- */
107
- public GetDemoInfo(fileName: string): Nullable<demo_info>;
108
-
109
- /**
110
- * Get patch download progress.
111
- *
112
- * @returns Patch progress object.
113
- */
114
- public GetPatchProgress(): Patch_Dawnload_Progress;
115
-
116
- /**
117
- * Get the multiplayer profile store.
118
- *
119
- * @returns Profile store.
120
- */
121
- public GetProfileStore(): profile_store;
122
-
123
- /**
124
- * Get GameSpy protocol version string.
125
- *
126
- * @returns GameSpy version.
127
- */
128
- public GetGSVer(): string;
129
-
130
- /**
131
- * Get the multiplayer login manager.
132
- *
133
- * @returns Login manager.
134
- */
135
- public GetLoginMngr(): login_manager;
136
-
137
- /**
138
- * Get the current player name.
139
- *
140
- * @returns Player name.
141
- */
142
- public GetPlayerName(): string;
143
-
144
- /**
145
- * Cancel the active multiplayer map download.
146
- */
147
- public CancelDownload(): void;
148
-
149
- /**
150
- * Validate the stored CD key.
151
- *
152
- * @returns Whether the CD key is valid.
153
- */
154
- public ValidateCDKey(): boolean;
155
- }
156
-
157
- /**
158
- * In-game UI root binding.
159
- *
160
- * @source C++ class CUIGameCustom
161
- * @customConstructor CUIGameCustom
162
- * @group xr_ui_menu
163
- *
164
- * @remarks
165
- * Current in-game HUD UI. Global helpers dereference the current game UI, so call them only while a level UI exists.
166
- */
167
- export class CUIGameCustom {
168
- /**
169
- * Add a custom HUD static by XML id.
170
- *
171
- * @remarks
172
- * If `singleInstance` is true and an active static with this id already exists, that wrapper is returned.
173
- *
174
- * @param id - Static descriptor id.
175
- * @param singleInstance - Whether an existing static with the same id should be reused.
176
- * @returns Drawable wrapper for the static.
177
- */
178
- public AddCustomStatic(id: string, singleInstance: boolean): StaticDrawableWrapper;
179
-
180
- /**
181
- * Add a custom HUD static by XML id and lifetime.
182
- *
183
- * @remarks
184
- * The static is initialized from `ui_custom_msgs.xml`. Positive lifetime values remove it automatically after
185
- * that many seconds unless the XML entry overrides `ttl`.
186
- *
187
- * @param id - Static descriptor id.
188
- * @param singleInstance - Whether an existing static with the same id should be reused.
189
- * @param lifetime - Time before the static is removed.
190
- * @returns Drawable wrapper for the static.
191
- */
192
- public AddCustomStatic(id: string, singleInstance: boolean, lifetime: f32): StaticDrawableWrapper;
193
-
194
- /**
195
- * Add a dialog window to the HUD render list.
196
- *
197
- * @remarks
198
- * Adds the window to the HUD dialog holder. It shows the window but does not take ownership of it.
199
- *
200
- * @param window - Dialog window.
201
- */
202
- public AddDialogToRender(window: CUIWindow): void;
203
-
204
- /**
205
- * Get the inventory item currently under the actor menu cursor.
206
- *
207
- * @since OpenXRay 2015-07-07, 6e703b4c
208
- *
209
- * @remarks
210
- * Requires the actor menu to have a current inventory cell.
211
- *
212
- * @returns Game object for the item, or `null` when the cell has no item.
213
- */
214
- public CurrentItemAtCell(): Nullable<game_object>;
215
-
216
- /**
217
- * Get an active custom HUD static by id.
218
- *
219
- * @param id - Static descriptor id.
220
- * @returns Drawable wrapper, or `null` when missing.
221
- */
222
- public GetCustomStatic(id: string): Nullable<StaticDrawableWrapper>;
223
-
224
- /**
225
- * Hide the actor inventory menu.
226
- *
227
- * @remarks
228
- * No-op when the actor menu is already hidden.
229
- */
230
- public HideActorMenu(): void;
231
-
232
- /**
233
- * Show the actor inventory menu.
234
- *
235
- * @remarks
236
- * Toggles the actor menu. If it is already shown, the call hides it instead.
237
- *
238
- * @returns `true` after handling the toggle.
239
- */
240
- public ShowActorMenu(): boolean;
241
-
242
- /**
243
- * Hide the PDA menu.
244
- *
245
- * @remarks
246
- * No-op when the PDA menu is already hidden.
247
- */
248
- public HidePdaMenu(): void;
249
-
250
- /**
251
- * Remove a custom HUD static.
252
- *
253
- * @remarks
254
- * Destroys the matching HUD-owned wrapper when it exists.
255
- *
256
- * @param id - Static descriptor id.
257
- */
258
- public RemoveCustomStatic(id: string): void;
259
-
260
- /**
261
- * Remove a dialog window from the HUD render list.
262
- *
263
- * @remarks
264
- * Hides and disables the window in the HUD dialog holder. It does not destroy the window.
265
- *
266
- * @param window - Dialog window.
267
- */
268
- public RemoveDialogToRender(window: CUIWindow): void;
269
-
270
- /**
271
- * Refresh actor menu state.
272
- *
273
- * @since OpenXRay 2015-07-07, 6e703b4c
274
- *
275
- * @remarks
276
- * Updates the actor menu only when it is currently shown.
277
- */
278
- public UpdateActorMenu(): void;
279
-
280
- /**
281
- * Enable or disable fake HUD indicators.
282
- *
283
- * @param enabled - New fake-indicator state.
284
- */
285
- public enable_fake_indicators(enabled: boolean): void;
286
-
287
- /**
288
- * Hide HUD messages.
289
- */
290
- public hide_messages(): void;
291
-
292
- /**
293
- * Show HUD messages.
294
- */
295
- public show_messages(): void;
296
-
297
- /**
298
- * Update fake indicator visibility.
299
- *
300
- * @param indicator - Indicator id.
301
- * @param enabled - New indicator state.
302
- */
303
- public update_fake_indicators(indicator: number, enabled: boolean): void;
304
-
305
- /**
306
- * Update fake indicator value.
307
- *
308
- * @param indicator - Indicator id.
309
- * @param value - New indicator value.
310
- */
311
- public update_fake_indicators(indicator: number, value: f32): void;
312
- }
313
-
314
- /**
315
- * Main menu namespace exposed to scripts.
316
- *
317
- * @source namespace main_menu
318
- * @group xr_ui_menu
319
- */
320
- export interface IXR_main_menu {
321
- /**
322
- * @returns Main game menu c++ controller singleton.
323
- */
324
- get_main_menu(this: void): CMainMenu;
325
- }
326
-
327
- /**
328
- * Actor/PDA menu namespace exposed to scripts.
329
- *
330
- * @source namespace ActorMenu
331
- * @group xr_ui_menu
332
- *
333
- * @remarks
334
- * These helpers dereference `CurrentGameUI()` directly. Use them only in-game after the HUD UI has been created.
335
- */
336
- export interface IXR_ActorMenu {
337
- /**
338
- * Get the current PDA menu window.
339
- *
340
- * @throws When called without an active current game UI.
341
- *
342
- * @returns PDA menu window.
343
- */
344
- get_pda_menu(this: void): CUIPdaWnd;
345
-
346
- /**
347
- * Get the current actor menu window.
348
- *
349
- * @throws When called without an active current game UI.
350
- *
351
- * @returns Actor menu window.
352
- */
353
- get_actor_menu(this: void): CUIActorMenu;
354
-
355
- /**
356
- * Get current actor menu mode.
357
- *
358
- * @throws When called without an active current game UI.
359
- *
360
- * @returns Numeric `EMenuMode` value.
361
- */
362
- get_menu_mode(this: void): number;
363
-
364
- /**
365
- * Get the current main in-game HUD window.
366
- *
367
- * @source `src/xrGame/ui/UIActorMenu_script.cpp`, `ActorMenu.get_maingame`.
368
- *
369
- * @remarks
370
- * The concrete `CUIMainIngameWnd` class is not declared as a Lua binding, so the returned pointer is typed as
371
- * `unknown`.
372
- *
373
- * @throws When called without an active current game UI.
374
- *
375
- * @returns Main in-game HUD window pointer.
376
- */
377
- get_maingame(this: void): unknown;
378
- }
379
-
380
- /**
381
- * @group xr_ui_menu
382
- */
383
- export const ActorMenu: IXR_ActorMenu;
384
-
385
- /**
386
- * @group xr_ui_menu
387
- */
388
- export const main_menu: IXR_main_menu;
389
-
390
- /**
391
- * Get the current game HUD UI.
392
- *
393
- * @group xr_ui_menu
394
- *
395
- * @remarks
396
- * The binding returns `CurrentGameUI()`. Call it only while a level HUD exists.
397
- *
398
- * @returns Current HUD UI controller.
399
- */
400
- export function get_hud(this: void): CUIGameCustom;
401
- }
@@ -1,111 +0,0 @@
1
- import type { Nillable, Nullable } from "./internal";
2
-
3
- declare global {
4
- /**
5
- * Current source file name injected at transpile time.
6
- *
7
- * @group xrf_plugin
8
- */
9
- const $filename: string;
10
-
11
- /**
12
- * Current source directory name injected at transpile time.
13
- *
14
- * @group xrf_plugin
15
- */
16
- const $dirname: string;
17
-
18
- /**
19
- * Check whether a value is nil-compatible in Lua and Jest runtimes.
20
- *
21
- * @group xrf_plugin
22
- *
23
- * @param value - Value to check.
24
- * @returns Whether value is `null` or `undefined`.
25
- */
26
- function $isNil(value: unknown): value is Nillable<never>;
27
-
28
- /**
29
- * Check whether a value is not nil-compatible in Lua and Jest runtimes.
30
- *
31
- * @group xrf_plugin
32
- *
33
- * @param value - Value to check.
34
- * @returns Whether value is neither `null` nor `undefined`.
35
- */
36
- function $isNotNil<T>(value: T): value is NonNullable<T>;
37
-
38
- /**
39
- * Treat a TypeScript array as a Lua array.
40
- *
41
- * The transformer removes this call and emits its argument.
42
- *
43
- * @group xrf_plugin
44
- *
45
- * @param array - TypeScript array.
46
- * @returns Same value typed as a Lua array.
47
- */
48
- function $fromArray<T>(array: Array<T>): LuaTable<number, T>;
49
-
50
- /**
51
- * Treat a Lua array as a TypeScript array.
52
- *
53
- * The transformer removes this call and emits its argument.
54
- *
55
- * @group xrf_plugin
56
- *
57
- * @param array - Lua array.
58
- * @returns Same value typed as a TypeScript array.
59
- */
60
- function $fromLuaArray<T>(array: LuaTable<number, T>): Array<T>;
61
-
62
- /**
63
- * Treat a TypeScript object as a Lua table.
64
- *
65
- * The transformer removes this call and emits its argument.
66
- *
67
- * @group xrf_plugin
68
- *
69
- * @param object - TypeScript object.
70
- * @returns Same value typed as a Lua table.
71
- */
72
- function $fromObject<K extends string | number, T>(object: Record<K, T>): LuaTable<K, T>;
73
-
74
- /**
75
- * Treat a TypeScript object as a Lua table.
76
- *
77
- * The transformer removes this call and emits its argument.
78
- *
79
- * @group xrf_plugin
80
- *
81
- * @param object - TypeScript object.
82
- * @returns Same value typed as a Lua table.
83
- */
84
- function $fromObject<D>(object: D): LuaTable<keyof D, D[keyof D]>;
85
-
86
- /**
87
- * Treat a Lua table as a TypeScript object.
88
- *
89
- * The transformer removes this call and emits its argument.
90
- *
91
- * @group xrf_plugin
92
- *
93
- * @param object - Lua table.
94
- * @returns Same value typed as a TypeScript object.
95
- */
96
- function $fromLuaTable<K extends string | number, T>(object: LuaTable<K, T>): Record<K, T>;
97
-
98
- /**
99
- * Treat a Lua table as a TypeScript object.
100
- *
101
- * The transformer removes this call and emits its argument.
102
- *
103
- * @group xrf_plugin
104
- *
105
- * @param object - Lua table.
106
- * @returns Same value typed as a TypeScript object.
107
- */
108
- function $fromLuaTable<D>(object: LuaTable<keyof D, D[keyof D]>): D;
109
- }
110
-
111
- export {};