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,517 +0,0 @@
1
- import type { Nillable } from "../internal";
2
-
3
- declare module "xray16" {
4
- /**
5
- * Current playback parameters for a launched sound.
6
- *
7
- * @source C++ class sound_params
8
- * @customConstructor sound_params
9
- * @group xr_sound
10
- */
11
- export class sound_params {
12
- /**
13
- * Playback frequency multiplier.
14
- */
15
- public frequency: f32;
16
-
17
- /**
18
- * Maximum audible distance in meters.
19
- */
20
- public max_distance: f32;
21
-
22
- /**
23
- * Minimum distance before attenuation starts.
24
- */
25
- public min_distance: f32;
26
-
27
- /**
28
- * Current sound position.
29
- */
30
- public position: vector;
31
-
32
- /**
33
- * Playback volume.
34
- */
35
- public volume: f32;
36
-
37
- /**
38
- * Engine-created playback parameters.
39
- */
40
- private constructor();
41
- }
42
-
43
- /**
44
- * Play an engine sound resource from scripts.
45
- *
46
- * @source C++ class sound_object
47
- * @customConstructor sound_object
48
- * @group xr_sound
49
- *
50
- * @remarks
51
- * Most playback and parameter APIs require the sound resource to exist, unless the engine is running with sound
52
- * disabled. Missing files are logged at construction and fail later when playback starts.
53
- */
54
- export class sound_object {
55
- /**
56
- * Spatial 3D playback.
57
- */
58
- public static s3d: 0;
59
-
60
- /**
61
- * Keep playing until stopped.
62
- */
63
- public static looped: 1;
64
-
65
- /**
66
- * Screen-space 2D playback.
67
- */
68
- public static s2d: 2;
69
-
70
- /**
71
- * Playback frequency multiplier.
72
- */
73
- public frequency: f32;
74
-
75
- /**
76
- * Maximum audible distance in meters.
77
- */
78
- public max_distance: f32;
79
-
80
- /**
81
- * Minimum distance before attenuation starts.
82
- */
83
- public min_distance: f32;
84
-
85
- /**
86
- * Playback volume.
87
- */
88
- public volume: f32;
89
-
90
- /**
91
- * Create a sound from `$game_sounds$/<sound_path>.ogg`.
92
- *
93
- * @remarks
94
- * Missing sound files are logged during construction. Playback methods will throw later if the sound handle was
95
- * not created.
96
- *
97
- * @param sound_path - Sound resource path without extension.
98
- */
99
- public constructor(sound_path: string);
100
-
101
- /**
102
- * Create a typed sound from `$game_sounds$/<sound_path>.ogg`.
103
- *
104
- * @remarks
105
- * Missing sound files are logged during construction. Playback methods will throw later if the sound handle was
106
- * not created.
107
- *
108
- * @param sound_path - Sound resource path without extension.
109
- * @param type - Sound category used by AI sound memory.
110
- */
111
- public constructor(sound_path: string, type: TXR_snd_type);
112
-
113
- /**
114
- * Get sound length in milliseconds.
115
- *
116
- * @remarks
117
- * Reads the engine sound handle. Do not use it as a file-existence check after construction logged a missing file.
118
- *
119
- * @returns Sound duration.
120
- */
121
- public length(): u32;
122
-
123
- /**
124
- * Check whether the sound has active playback feedback.
125
- *
126
- * @remarks
127
- * Sounds started with `play_no_feedback` are intentionally not tracked by feedback.
128
- *
129
- * @returns Whether the sound is currently playing.
130
- */
131
- public playing(): boolean;
132
-
133
- /**
134
- * Get the current playback position.
135
- *
136
- * @remarks
137
- * Logs an engine script error and returns a zero vector if the sound was not launched.
138
- *
139
- * @returns Current sound position.
140
- */
141
- public get_position(): vector;
142
-
143
- /**
144
- * Move the sound emitter.
145
- *
146
- * @throws If the sound handle was not created.
147
- *
148
- * @param position - New world position.
149
- */
150
- public set_position(position: vector): void;
151
-
152
- /**
153
- * Append a tail sound played after this sound ends.
154
- *
155
- * @remarks
156
- * The tail path is passed to the engine sound handle as-is. Use a game sound resource path without extension.
157
- *
158
- * @param sound_path - Sound resource path without extension.
159
- */
160
- public attach_tail(sound_path: string): void;
161
-
162
- /**
163
- * Play the sound attached to an object, or globally when `object` is null.
164
- *
165
- * @throws If the sound handle was not created.
166
- *
167
- * @param object - Object used as sound owner.
168
- */
169
- public play(object: Nillable<game_object>): void;
170
-
171
- /**
172
- * Play the sound after a delay.
173
- *
174
- * @throws If the sound handle was not created.
175
- *
176
- * @param object - Object used as sound owner.
177
- * @param delay - Delay in seconds.
178
- */
179
- public play(object: Nillable<game_object>, delay: f32): void;
180
-
181
- /**
182
- * Play the sound with engine sound flags.
183
- *
184
- * @throws If the sound handle was not created.
185
- *
186
- * @param object - Object used as sound owner.
187
- * @param delay - Delay in seconds.
188
- * @param flags - Playback flags such as `sound_object.looped` or `sound_object.s2d`.
189
- */
190
- public play(object: Nillable<game_object>, delay: f32, flags: i32): void;
191
-
192
- /**
193
- * Play the sound at a fixed world position.
194
- *
195
- * @throws If the sound handle was not created.
196
- *
197
- * @param object - Optional object used as sound owner.
198
- * @param position - World position for playback.
199
- */
200
- public play_at_pos(object: Nillable<game_object>, position: vector): void;
201
-
202
- /**
203
- * Play the sound at a fixed world position after a delay.
204
- *
205
- * @throws If the sound handle was not created.
206
- *
207
- * @param object - Optional object used as sound owner.
208
- * @param position - World position for playback.
209
- * @param delay - Delay in seconds.
210
- */
211
- public play_at_pos(object: Nillable<game_object>, position: vector, delay: f32): void;
212
-
213
- /**
214
- * Play the sound at a fixed world position with engine sound flags.
215
- *
216
- * @throws If the sound handle was not created.
217
- *
218
- * @param object - Optional object used as sound owner.
219
- * @param position - World position for playback.
220
- * @param delay - Delay in seconds.
221
- * @param flags - Playback flags such as `sound_object.looped` or `sound_object.s2d`.
222
- */
223
- public play_at_pos(object: Nillable<game_object>, position: vector, delay: f32, flags: i32): void;
224
-
225
- /**
226
- * Play without tracking feedback.
227
- *
228
- * @remarks
229
- * This starts playback without storing feedback on the `sound_object`, so `playing()` will not describe this
230
- * playback instance.
231
- *
232
- * @throws If the sound handle was not created.
233
- *
234
- * @param object - Optional object used as sound owner.
235
- * @param flags - Playback flags.
236
- * @param delay - Delay in seconds.
237
- * @param position - Optional playback position.
238
- * @param volume - Optional playback volume.
239
- */
240
- public play_no_feedback(object: Nillable<game_object>, flags: i32, delay: f32, position: vector, volume: f32): void;
241
-
242
- /**
243
- * Stop playback immediately.
244
- *
245
- * @throws If the sound handle was not created.
246
- */
247
- public stop(): void;
248
-
249
- /**
250
- * Stop playback through the engine deferred-stop path.
251
- *
252
- * @remarks
253
- * Legacy misspelled alias for `stop_deferred`.
254
- *
255
- * @throws If the sound handle was not created.
256
- */
257
- public stop_deffered(): void;
258
-
259
- /**
260
- * Stop playback through the engine deferred-stop path.
261
- *
262
- * @remarks
263
- * Preferred spelling. `stop_deffered` is kept for script compatibility.
264
- *
265
- * @throws If the sound handle was not created.
266
- */
267
- public stop_deferred(): void;
268
- }
269
-
270
- /**
271
- * @group xr_sound
272
- */
273
- export type TXR_sound_object_type = EnumeratedStaticsValues<typeof sound_object>;
274
-
275
- /**
276
- * Sound category constants used by AI sound memory and sound playback.
277
- *
278
- * @source C++ class snd_type
279
- * @customConstructor snd_type
280
- * @group xr_sound
281
- */
282
- export class snd_type {
283
- /**
284
- * Engine enum value for `snd_type.ambient`.
285
- */
286
- public static ambient: 128;
287
- /**
288
- * Engine enum value for `snd_type.anomaly`.
289
- */
290
- public static anomaly: 268435456;
291
- /**
292
- * Engine enum value for `snd_type.anomaly_idle`.
293
- */
294
- public static anomaly_idle: 268437504;
295
- /**
296
- * Engine enum value for `snd_type.attack`.
297
- */
298
- public static attack: 8192;
299
- /**
300
- * Engine enum value for `snd_type.bullet_hit`.
301
- */
302
- public static bullet_hit: 524288;
303
- /**
304
- * Engine enum value for `snd_type.die`.
305
- */
306
- public static die: 131072;
307
- /**
308
- * Engine enum value for `snd_type.drop`.
309
- */
310
- public static drop: 33554432;
311
- /**
312
- * Engine enum value for `snd_type.eat`.
313
- */
314
- public static eat: 4096;
315
- /**
316
- * Engine enum value for `snd_type.empty`.
317
- */
318
- public static empty: 1048576;
319
- /**
320
- * Engine enum value for `snd_type.hide`.
321
- */
322
- public static hide: 16777216;
323
- /**
324
- * Engine enum value for `snd_type.idle`.
325
- */
326
- public static idle: 2048;
327
- /**
328
- * Engine enum value for `snd_type.injure`.
329
- */
330
- public static injure: 65536;
331
- /**
332
- * Engine enum value for `snd_type.item`.
333
- */
334
- public static item: 1073741824;
335
- /**
336
- * Engine enum value for `snd_type.item_drop`.
337
- */
338
- public static item_drop: 1107296256;
339
- /**
340
- * Engine enum value for `snd_type.item_hide`.
341
- */
342
- public static item_hide: 1090519040;
343
- /**
344
- * Engine enum value for `snd_type.item_pick_up`.
345
- */
346
- public static item_pick_up: 1140850688;
347
- /**
348
- * Engine enum value for `snd_type.item_take`.
349
- */
350
- public static item_take: 1082130432;
351
- /**
352
- * Engine enum value for `snd_type.item_use`.
353
- */
354
- public static item_use: 1077936128;
355
- /**
356
- * Engine enum value for `snd_type.monster`.
357
- */
358
- public static monster: 536870912;
359
- /**
360
- * Engine enum value for `snd_type.monster_attack`.
361
- */
362
- public static monster_attack: 536879104;
363
- /**
364
- * Engine enum value for `snd_type.monster_die`.
365
- */
366
- public static monster_die: 537001984;
367
- /**
368
- * Engine enum value for `snd_type.monster_eat`.
369
- */
370
- public static monster_eat: 536875008;
371
- /**
372
- * Engine enum value for `snd_type.monster_injure`.
373
- */
374
- public static monster_injure: 536936448;
375
- /**
376
- * Engine enum value for `snd_type.monster_step`.
377
- */
378
- public static monster_step: 536903680;
379
- /**
380
- * Engine enum value for `snd_type.monster_talk`.
381
- */
382
- public static monster_talk: 536887296;
383
- /**
384
- * Engine enum value for `snd_type.no_sound`.
385
- */
386
- public static no_sound: 0;
387
- /**
388
- * Engine enum value for `snd_type.object_break`.
389
- */
390
- public static object_break: 1024;
391
- /**
392
- * Engine enum value for `snd_type.object_collide`.
393
- */
394
- public static object_collide: 512;
395
- /**
396
- * Engine enum value for `snd_type.object_explode`.
397
- */
398
- public static object_explode: 256;
399
- /**
400
- * Engine enum value for `snd_type.pick_up`.
401
- */
402
- public static pick_up: 67108864;
403
- /**
404
- * Engine enum value for `snd_type.reload`.
405
- */
406
- public static reload: 262144;
407
- /**
408
- * Engine enum value for `snd_type.shoot`.
409
- */
410
- public static shoot: 2097152;
411
- /**
412
- * Engine enum value for `snd_type.step`.
413
- */
414
- public static step: 32768;
415
- /**
416
- * Engine enum value for `snd_type.take`.
417
- */
418
- public static take: 8388608;
419
- /**
420
- * Engine enum value for `snd_type.talk`.
421
- */
422
- public static talk: 16384;
423
- /**
424
- * Engine enum value for `snd_type.use`.
425
- */
426
- public static use: 4194304;
427
- /**
428
- * Engine enum value for `snd_type.weapon`.
429
- */
430
- public static weapon: -2147483648;
431
- /**
432
- * Engine enum value for `snd_type.weapon_bullet_hit`.
433
- */
434
- public static weapon_bullet_hit: -2146959360;
435
- /**
436
- * Engine enum value for `snd_type.weapon_empty`.
437
- */
438
- public static weapon_empty: -2146435072;
439
- /**
440
- * Engine enum value for `snd_type.weapon_reload`.
441
- */
442
- public static weapon_reload: -2147221504;
443
- /**
444
- * Engine enum value for `snd_type.weapon_shoot`.
445
- */
446
- public static weapon_shoot: -2145386496;
447
- /**
448
- * Engine enum value for `snd_type.world`.
449
- */
450
- public static world: 134217728;
451
- /**
452
- * Engine enum value for `snd_type.world_ambient`.
453
- */
454
- public static world_ambient: 134217856;
455
- /**
456
- * Engine enum value for `snd_type.world_object_break`.
457
- */
458
- public static world_object_break: 134218752;
459
- /**
460
- * Engine enum value for `snd_type.world_object_collide`.
461
- */
462
- public static world_object_collide: 134218240;
463
- /**
464
- * Engine enum value for `snd_type.world_object_explode`.
465
- */
466
- public static world_object_explode: 134217984;
467
-
468
- /**
469
- * Engine-owned sound category constants.
470
- */
471
- private constructor();
472
- }
473
-
474
- /**
475
- * @group xr_sound
476
- */
477
- export type TXR_snd_type = EnumeratedStaticsValues<typeof snd_type>;
478
-
479
- /**
480
- * Last sound perceived by an object.
481
- *
482
- * @source C++ class SoundInfo
483
- * @customConstructor SoundInfo
484
- * @group xr_sound
485
- */
486
- export class SoundInfo {
487
- /**
488
- * Whether the sound is considered dangerous.
489
- */
490
- public danger: i32;
491
-
492
- /**
493
- * Sound origin position.
494
- */
495
- public position: vector;
496
-
497
- /**
498
- * Perceived sound power.
499
- */
500
- public power: f32;
501
-
502
- /**
503
- * Level time when the sound was perceived.
504
- */
505
- public time: i32;
506
-
507
- /**
508
- * Object that produced the sound.
509
- */
510
- public who: game_object;
511
-
512
- /**
513
- * Engine-created perceived sound info.
514
- */
515
- private constructor();
516
- }
517
- }
@@ -1,51 +0,0 @@
1
- import type { Nullable } from "../internal";
2
-
3
- declare module "xray16" {
4
- /**
5
- * Actor statistics helpers exposed through the `actor_stats` namespace.
6
- *
7
- * @group xr_stats
8
- */
9
- export interface IXR_actor_stats {
10
- /**
11
- * Add actor statistic points with a string value.
12
- *
13
- * @param section - Statistic section id.
14
- * @param detail_key - Detail key inside the section.
15
- * @param value - String value to add.
16
- */
17
- add_points_str(this: void, section: string, detail_key: string, value: string): void;
18
-
19
- /**
20
- * Get total actor points for a statistic section.
21
- *
22
- * @param section - Statistic section id.
23
- * @returns Section points.
24
- */
25
- get_points(this: void, section: string): i32;
26
-
27
- /**
28
- * Add actor statistic points with count and score.
29
- *
30
- * @param section - Statistic section id.
31
- * @param detail_key - Detail key inside the section.
32
- * @param count - Count to add.
33
- * @param points - Points to add.
34
- */
35
- add_points(this: void, section: string, detail_key: string, count: i32, points: i32): void;
36
-
37
- /**
38
- * Remove an object from actor ranking when this optional binding exists.
39
- *
40
- * @param object_id - Object id to remove.
41
- */
42
- remove_from_ranking(this: void, object_id: number): Nullable<void>;
43
- }
44
-
45
- /**
46
- * Actor statistics namespace.
47
- *
48
- * @group xr_stats
49
- */
50
- export const actor_stats: IXR_actor_stats;
51
- }