xray16 1.4.0 → 1.5.0

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 (49) hide show
  1. package/package.json +1 -1
  2. package/types/xr_ai/xr_action.d.ts +1321 -29
  3. package/types/xr_ai/xr_alife.d.ts +1336 -32
  4. package/types/xr_ai/xr_enemy_evaluation.d.ts +112 -19
  5. package/types/xr_ai/xr_goap.d.ts +450 -3
  6. package/types/xr_ai/xr_graph.d.ts +94 -6
  7. package/types/xr_ai/xr_memory.d.ts +240 -6
  8. package/types/xr_lib/xr_animation.d.ts +185 -14
  9. package/types/xr_lib/xr_bitwise.d.ts +20 -8
  10. package/types/xr_lib/xr_color.d.ts +103 -6
  11. package/types/xr_lib/xr_debug.d.ts +110 -12
  12. package/types/xr_lib/xr_dialog.d.ts +99 -7
  13. package/types/xr_lib/xr_flags.d.ts +78 -15
  14. package/types/xr_lib/xr_fs.d.ts +395 -5
  15. package/types/xr_lib/xr_game.d.ts +101 -0
  16. package/types/xr_lib/xr_hit.d.ts +84 -0
  17. package/types/xr_lib/xr_ini.d.ts +60 -2
  18. package/types/xr_lib/xr_level.d.ts +182 -39
  19. package/types/xr_lib/xr_luabind.d.ts +37 -11
  20. package/types/xr_lib/xr_map.d.ts +137 -6
  21. package/types/xr_lib/xr_math.d.ts +56 -0
  22. package/types/xr_lib/xr_multiplayer.d.ts +729 -1
  23. package/types/xr_lib/xr_profile.d.ts +80 -0
  24. package/types/xr_lib/xr_properties.d.ts +159 -4
  25. package/types/xr_lib/xr_relation.d.ts +147 -0
  26. package/types/xr_lib/xr_render.d.ts +99 -3
  27. package/types/xr_lib/xr_save.d.ts +110 -4
  28. package/types/xr_lib/xr_sound.d.ts +373 -9
  29. package/types/xr_lib/xr_stats.ts +33 -4
  30. package/types/xr_lib/xr_task.d.ts +277 -0
  31. package/types/xr_lib/xr_time.d.ts +11 -0
  32. package/types/xr_object/client/xr_anomaly.d.ts +20 -0
  33. package/types/xr_object/client/xr_artefact.d.ts +57 -2
  34. package/types/xr_object/client/xr_client_object.d.ts +131 -0
  35. package/types/xr_object/client/xr_creature.d.ts +79 -0
  36. package/types/xr_object/client/xr_item.d.ts +108 -2
  37. package/types/xr_object/client/xr_level.d.ts +482 -14
  38. package/types/xr_object/client/xr_physic.d.ts +459 -29
  39. package/types/xr_object/client/xr_zone.d.ts +38 -0
  40. package/types/xr_object/script/xr_script_interface.d.ts +236 -1
  41. package/types/xr_object/script/xr_script_object.d.ts +3402 -82
  42. package/types/xr_object/script/xr_script_trade.d.ts +25 -15
  43. package/types/xr_object/server/xr_server_object.d.ts +707 -15
  44. package/types/xr_ui/xr_ui_asset.d.ts +241 -6
  45. package/types/xr_ui/xr_ui_core.d.ts +327 -9
  46. package/types/xr_ui/xr_ui_event.d.ts +1067 -1
  47. package/types/xr_ui/xr_ui_interface.d.ts +1563 -17
  48. package/types/xr_ui/xr_ui_menu.d.ts +259 -16
  49. package/types/xrf_plugin.d.ts +44 -14
@@ -1,14 +1,35 @@
1
1
  declare module "xray16" {
2
2
  /**
3
+ * Monster movement, animation, and sound constants.
4
+ *
3
5
  * @source C++ class MonsterSpace
4
6
  * @customConstructor MonsterSpace
5
7
  * @group xr_action
8
+ *
9
+ * @remarks
10
+ * These constants are grouped by the original engine namespace, not by TypeScript use site. Some values are used by
11
+ * stalker movement controllers, some by monsters, and head animation values are used by trader sound actions.
6
12
  */
7
13
  export class MonsterSpace {
14
+ /**
15
+ * Engine enum value for `MonsterSpace.head_anim_angry`.
16
+ */
8
17
  public static readonly head_anim_angry: 1;
18
+ /**
19
+ * Engine enum value for `MonsterSpace.head_anim_glad`.
20
+ */
9
21
  public static readonly head_anim_glad: 2;
22
+ /**
23
+ * Engine enum value for `MonsterSpace.head_anim_kind`.
24
+ */
10
25
  public static readonly head_anim_kind: 3;
26
+ /**
27
+ * Engine enum value for `MonsterSpace.head_anim_normal`.
28
+ */
11
29
  public static readonly head_anim_normal: 0;
30
+ /**
31
+ * Engine enum value for `MonsterSpace.sound_script`.
32
+ */
12
33
  public static readonly sound_script: 128;
13
34
  }
14
35
 
@@ -23,86 +44,318 @@ declare module "xray16" {
23
44
  export type TXR_MonsterBodyState = EnumeratedStaticsValues<typeof MonsterSpace>;
24
45
 
25
46
  /**
47
+ * Composite action passed to scripted entities.
48
+ *
26
49
  * @source C++ class entity_action
27
50
  * @customConstructor entity_action
28
51
  * @group xr_action
52
+ *
53
+ * @remarks
54
+ * This is a container for sub-actions. The engine applies only the parts set with `set_action()`, and completion
55
+ * checks read the matching sub-action state. It is meaningful only when passed to a scripted entity controller, such
56
+ * as `game_object.command()`.
29
57
  */
30
58
  export class entity_action extends EngineBinding {
59
+ /**
60
+ * Create an empty entity action.
61
+ */
31
62
  public constructor();
63
+
64
+ /**
65
+ * Copy an existing entity action.
66
+ *
67
+ * @param action - Action to copy.
68
+ */
32
69
  public constructor(action: entity_action);
33
70
 
71
+ /**
72
+ * Set the movement part of this action.
73
+ *
74
+ * @param move - Movement action.
75
+ */
34
76
  public set_action(move: move): void;
35
77
 
78
+ /**
79
+ * Set the look part of this action.
80
+ *
81
+ * @param look - Look action.
82
+ */
36
83
  public set_action(look: look): void;
37
84
 
85
+ /**
86
+ * Set the animation part of this action.
87
+ *
88
+ * @param anim - Animation action.
89
+ */
38
90
  public set_action(anim: anim): void;
39
91
 
92
+ /**
93
+ * Set the sound part of this action.
94
+ *
95
+ * @param sound - Sound action.
96
+ */
40
97
  public set_action(sound: sound): void;
41
98
 
99
+ /**
100
+ * Set the particle part of this action.
101
+ *
102
+ * @param particle - Particle action.
103
+ */
42
104
  public set_action(particle: particle): void;
43
105
 
44
- public set_action(objec: XR_object): void;
106
+ /**
107
+ * Set the object interaction part of this action.
108
+ *
109
+ * @param objectAction - Object action.
110
+ */
111
+ public set_action(objectAction: XR_object): void;
45
112
 
113
+ /**
114
+ * Set the completion condition for this action.
115
+ *
116
+ * @param cond - Completion condition.
117
+ */
46
118
  public set_action(cond: cond): void;
47
119
 
120
+ /**
121
+ * Set a monster global action.
122
+ *
123
+ * @remarks
124
+ * Intended for custom monsters. Stalkers and ordinary inventory objects do not execute monster global actions.
125
+ *
126
+ * @param act - Monster action.
127
+ */
128
+ public set_action(act: act): void;
129
+
130
+ /**
131
+ * Check whether the movement part is complete.
132
+ *
133
+ * @returns Whether movement is complete.
134
+ */
48
135
  public move(): boolean;
49
136
 
137
+ /**
138
+ * Check whether the particle part is complete.
139
+ *
140
+ * @returns Whether particle playback is complete.
141
+ */
50
142
  public particle(): boolean;
51
143
 
144
+ /**
145
+ * Check whether the whole action is complete.
146
+ *
147
+ * @returns Whether all required parts are complete.
148
+ */
52
149
  public completed(): boolean;
53
150
 
151
+ /**
152
+ * Check whether the object interaction part is complete.
153
+ *
154
+ * @returns Whether object interaction is complete.
155
+ */
54
156
  public object(): boolean;
55
157
 
158
+ /**
159
+ * Check whether all action parts are complete.
160
+ *
161
+ * @returns Whether the action is complete.
162
+ */
56
163
  public all(): boolean;
57
164
 
165
+ /**
166
+ * Check whether the action time condition has elapsed.
167
+ *
168
+ * @returns Whether the time condition is complete.
169
+ */
58
170
  public time(): boolean;
59
171
 
172
+ /**
173
+ * Check whether the look part is complete.
174
+ *
175
+ * @returns Whether look handling is complete.
176
+ */
60
177
  public look(): boolean;
61
178
 
179
+ /**
180
+ * Check whether the sound part is complete.
181
+ *
182
+ * @returns Whether sound playback is complete.
183
+ */
62
184
  public sound(): boolean;
63
185
 
186
+ /**
187
+ * Check whether the animation part is complete.
188
+ *
189
+ * @returns Whether animation is complete.
190
+ */
64
191
  public anim(): boolean;
65
192
  }
66
193
 
67
194
  /**
68
195
  * @group xr_action
69
196
  */
70
- export type TXR_entity_action = move | look | anim | sound | particle | XR_object | cond;
197
+ export type TXR_entity_action = move | look | anim | sound | particle | XR_object | cond | act;
71
198
 
72
199
  /**
200
+ * Object interaction action.
201
+ *
73
202
  * @source C++ class object
74
203
  * @customConstructor object
75
204
  * @group xr_action
205
+ *
206
+ * @remarks
207
+ * Object actions are consumed by the object handler of an AI entity. Weapon-oriented actions such as `fire1`,
208
+ * `reload`, or `strap` require the controlled object to have a compatible active item.
76
209
  */
77
210
  export class XR_object extends EngineBinding {
211
+ /**
212
+ * Engine enum value for `XR_object.activate`.
213
+ */
78
214
  public static readonly activate: 16;
215
+ /**
216
+ * Engine enum value for `XR_object.aim1`.
217
+ */
79
218
  public static readonly aim1: 4;
219
+ /**
220
+ * Engine enum value for `XR_object.aim2`.
221
+ */
80
222
  public static readonly aim2: 5;
223
+ /**
224
+ * Engine enum value for `XR_object.deactivate`.
225
+ */
81
226
  public static readonly deactivate: 17;
227
+ /**
228
+ * Engine enum value for `XR_object.drop`.
229
+ */
82
230
  public static readonly drop: 11;
231
+ /**
232
+ * Engine enum value for `XR_object.dummy`.
233
+ */
83
234
  public static readonly dummy: -1;
235
+ /**
236
+ * Engine enum value for `XR_object.fire1`.
237
+ */
84
238
  public static readonly fire1: 6;
239
+ /**
240
+ * Engine enum value for `XR_object.fire2`.
241
+ */
85
242
  public static readonly fire2: 8;
243
+ /**
244
+ * Engine enum value for `XR_object.hide`.
245
+ */
86
246
  public static readonly hide: 22;
247
+ /**
248
+ * Engine enum value for `XR_object.idle`.
249
+ */
87
250
  public static readonly idle: 9;
251
+ /**
252
+ * Engine enum value for `XR_object.reload`.
253
+ */
88
254
  public static readonly reload: 2;
255
+ /**
256
+ * Engine enum value for `XR_object.reload1`.
257
+ */
89
258
  public static readonly reload1: 2;
259
+ /**
260
+ * Engine enum value for `XR_object.reload2`.
261
+ */
90
262
  public static readonly reload2: 3;
263
+ /**
264
+ * Engine enum value for `XR_object.show`.
265
+ */
91
266
  public static readonly show: 21;
267
+ /**
268
+ * Engine enum value for `XR_object.strap`.
269
+ */
92
270
  public static readonly strap: 10;
271
+ /**
272
+ * Engine enum value for `XR_object.switch1`.
273
+ */
93
274
  public static readonly switch1: 0;
275
+ /**
276
+ * Engine enum value for `XR_object.switch2`.
277
+ */
94
278
  public static readonly switch2: 1;
279
+ /**
280
+ * Engine enum value for `XR_object.take`.
281
+ */
95
282
  public static readonly take: 23;
283
+ /**
284
+ * Engine enum value for `XR_object.turn_off`.
285
+ */
96
286
  public static readonly turn_off: 20;
287
+ /**
288
+ * Engine enum value for `XR_object.turn_on`.
289
+ */
97
290
  public static readonly turn_on: 19;
291
+ /**
292
+ * Engine enum value for `XR_object.use`.
293
+ */
98
294
  public static readonly use: 18;
99
295
 
100
- public constructor(value: string);
101
- public constructor(value: string, type: number); /* MonsterSpace::EObjectAction */
102
- public constructor(game_object: game_object);
296
+ /**
297
+ * Create an empty object action.
298
+ */
299
+ public constructor();
103
300
 
104
- public action(space: unknown /** Enum MonsterSpace::EObjectAction */): void;
301
+ /**
302
+ * Create an action for a game object.
303
+ *
304
+ * @param game_object - Target object.
305
+ * @param action - Object action id.
306
+ */
307
+ public constructor(game_object: game_object, action: TXR_object_action);
105
308
 
309
+ /**
310
+ * Create a timed action for a game object.
311
+ *
312
+ * @param game_object - Target object.
313
+ * @param action - Object action id.
314
+ * @param time - Action time limit.
315
+ */
316
+ public constructor(game_object: game_object, action: TXR_object_action, time: u32);
317
+
318
+ /**
319
+ * Create an object action without a target.
320
+ *
321
+ * @param action - Object action id.
322
+ */
323
+ public constructor(action: TXR_object_action);
324
+
325
+ /**
326
+ * Create an action for an object by name.
327
+ *
328
+ * @param object_name - Target object name.
329
+ * @param action - Object action id.
330
+ */
331
+ public constructor(object_name: string, action: TXR_object_action);
332
+
333
+ /**
334
+ * Set the object action mode.
335
+ *
336
+ * @param action - Object action id.
337
+ */
338
+ public action(action: TXR_object_action): void;
339
+
340
+ /**
341
+ * Set target object by name.
342
+ *
343
+ * @param object_name - Target object name.
344
+ */
345
+ public object(object_name: string): void;
346
+
347
+ /**
348
+ * Set target object.
349
+ *
350
+ * @param game_object - Target object.
351
+ */
352
+ public object(game_object: game_object): void;
353
+
354
+ /**
355
+ * Check whether the object action is complete.
356
+ *
357
+ * @returns Whether the action is complete.
358
+ */
106
359
  public completed(): boolean;
107
360
  }
108
361
 
@@ -119,98 +372,435 @@ declare module "xray16" {
119
372
  export const object: typeof XR_object;
120
373
 
121
374
  /**
375
+ * Movement action for stalkers, monsters, and vehicles.
376
+ *
122
377
  * @source C++ class move
123
378
  * @customConstructor move
124
379
  * @group xr_action
380
+ *
381
+ * @remarks
382
+ * The overload family is split between generic movement goals, vehicle input flags, and monster-only movement
383
+ * actions. Use the constructor group that matches the object receiving the resulting `entity_action`.
125
384
  */
126
385
  export class move extends EngineBinding {
127
386
  // Todo: All enums are in one static, probably should declare few parent interfaces / classes with enums
387
+ /**
388
+ * Engine enum value for `move.crouch`.
389
+ */
128
390
  public static readonly crouch: 0;
129
391
 
392
+ /**
393
+ * Engine enum value for `move.back`.
394
+ */
130
395
  public static readonly back: 4;
396
+ /**
397
+ * Engine enum value for `move.criteria`.
398
+ */
131
399
  public static readonly criteria: 2;
132
400
 
401
+ /**
402
+ * Engine enum value for `move.curve`.
403
+ */
133
404
  public static readonly curve: 0;
405
+ /**
406
+ * Engine enum value for `move.curve_criteria`.
407
+ */
134
408
  public static readonly curve_criteria: 2;
135
409
 
410
+ /**
411
+ * Engine enum value for `move.default`.
412
+ */
136
413
  public static readonly default: 0;
414
+ /**
415
+ * Engine enum value for `move.dodge`.
416
+ */
137
417
  public static readonly dodge: 1;
418
+ /**
419
+ * Engine enum value for `move.down`.
420
+ */
138
421
  public static readonly down: 64;
422
+ /**
423
+ * Engine enum value for `move.drag`.
424
+ */
139
425
  public static readonly drag: 3;
426
+ /**
427
+ * Engine enum value for `move.force`.
428
+ */
140
429
  public static readonly force: 1;
430
+ /**
431
+ * Engine enum value for `move.fwd`.
432
+ */
141
433
  public static readonly fwd: 2;
434
+ /**
435
+ * Engine enum value for `move.handbrake`.
436
+ */
142
437
  public static readonly handbrake: 128;
438
+ /**
439
+ * Engine enum value for `move.jump`.
440
+ */
143
441
  public static readonly jump: 4;
442
+ /**
443
+ * Engine enum value for `move.left`.
444
+ */
144
445
  public static readonly left: 8;
145
446
 
447
+ /**
448
+ * Engine enum value for `move.line`.
449
+ */
146
450
  public static readonly line: 0;
451
+ /**
452
+ * Engine enum value for `move.none`.
453
+ */
147
454
  public static readonly none: 1;
455
+ /**
456
+ * Engine enum value for `move.off`.
457
+ */
148
458
  public static readonly off: 512;
459
+ /**
460
+ * Engine enum value for `move.on`.
461
+ */
149
462
  public static readonly on: 256;
463
+ /**
464
+ * Engine enum value for `move.right`.
465
+ */
150
466
  public static readonly right: 16;
151
467
 
152
468
  /**
153
469
  * Fast run movement type, not sprint but generic fast movement.
154
470
  */
155
471
  public static readonly run: 1;
472
+ /**
473
+ * Engine enum value for `move.run_fwd`.
474
+ */
156
475
  public static readonly run_fwd: 2;
476
+ /**
477
+ * Engine enum value for `move.run_with_leader`.
478
+ */
157
479
  public static readonly run_with_leader: 7;
480
+ /**
481
+ * Engine enum value for `move.stand`.
482
+ */
158
483
  public static readonly stand: 2;
484
+ /**
485
+ * Engine enum value for `move.standing`.
486
+ */
159
487
  public static readonly standing: 1;
488
+ /**
489
+ * Engine enum value for `move.steal`.
490
+ */
160
491
  public static readonly steal: 5;
492
+ /**
493
+ * Engine enum value for `move.up`.
494
+ */
161
495
  public static readonly up: 32;
162
496
  /**
163
497
  * Normal walk movement type, generic movement type used in most cases.
164
498
  */
165
499
  public static readonly walk: 0;
166
500
 
501
+ /**
502
+ * Engine enum value for `move.walk_fwd`.
503
+ */
167
504
  public static readonly walk_fwd: 0;
505
+ /**
506
+ * Engine enum value for `move.walk_bkwd`.
507
+ */
168
508
  public static readonly walk_bkwd: 1;
509
+ /**
510
+ * Engine enum value for `move.walk_with_leader`.
511
+ */
169
512
  public static readonly walk_with_leader: 6;
170
513
 
514
+ /**
515
+ * Create an empty movement action.
516
+ */
171
517
  public constructor();
172
- public constructor(action: unknown);
173
- public constructor(action: unknown, value: number);
174
- public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, game_object: game_object);
518
+
519
+ /**
520
+ * Create a vehicle input action.
521
+ *
522
+ * @remarks
523
+ * Uses `move` input-key flags such as `fwd`, `back`, `left`, `right`, `handbrake`, `on`, and `off`.
524
+ *
525
+ * @param action - Input key id.
526
+ */
527
+ public constructor(action: number);
528
+
529
+ /**
530
+ * Create a timed vehicle input action.
531
+ *
532
+ * @remarks
533
+ * Uses `move` input-key flags. The time value limits how long the input action remains active.
534
+ *
535
+ * @param action - Input key id.
536
+ * @param value - Action duration or value.
537
+ */
538
+ public constructor(action: number, value: number);
539
+
540
+ /**
541
+ * Move toward an object with explicit body, movement, and path modes.
542
+ *
543
+ * @param bodyState - Body state id.
544
+ * @param movementType - Movement type id.
545
+ * @param pathType - Detail path type id.
546
+ * @param game_object - Target object.
547
+ */
548
+ public constructor(bodyState: number, movementType: TXR_move, pathType: number, game_object: game_object);
549
+
550
+ /**
551
+ * Move toward an object with a speed value.
552
+ *
553
+ * @param bodyState - Body state id.
554
+ * @param movementType - Movement type id.
555
+ * @param pathType - Detail path type id.
556
+ * @param game_object - Target object.
557
+ * @param value - Speed or distance value.
558
+ */
175
559
  public constructor(
176
560
  bodyState: number,
177
561
  movementType: TXR_move,
178
- pathType: unknown,
562
+ pathType: number,
179
563
  game_object: game_object,
180
564
  value: f32
181
565
  );
182
- public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, patrol: patrol);
183
- public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, patrol: patrol, value: f32);
184
- public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, vector: vector);
185
- public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, vector: vector, value: f32);
566
+
567
+ /**
568
+ * Move along a patrol path.
569
+ *
570
+ * @param bodyState - Body state id.
571
+ * @param movementType - Movement type id.
572
+ * @param pathType - Detail path type id.
573
+ * @param patrol - Patrol path parameters.
574
+ */
575
+ public constructor(bodyState: number, movementType: TXR_move, pathType: number, patrol: patrol);
576
+
577
+ /**
578
+ * Move along a patrol path with a speed value.
579
+ *
580
+ * @param bodyState - Body state id.
581
+ * @param movementType - Movement type id.
582
+ * @param pathType - Detail path type id.
583
+ * @param patrol - Patrol path parameters.
584
+ * @param value - Speed or distance value.
585
+ */
586
+ public constructor(bodyState: number, movementType: TXR_move, pathType: number, patrol: patrol, value: f32);
587
+
588
+ /**
589
+ * Move toward a position.
590
+ *
591
+ * @param bodyState - Body state id.
592
+ * @param movementType - Movement type id.
593
+ * @param pathType - Detail path type id.
594
+ * @param vector - Target position.
595
+ */
596
+ public constructor(bodyState: number, movementType: TXR_move, pathType: number, vector: vector);
597
+
598
+ /**
599
+ * Move toward a position with a speed value.
600
+ *
601
+ * @param bodyState - Body state id.
602
+ * @param movementType - Movement type id.
603
+ * @param pathType - Detail path type id.
604
+ * @param vector - Target position.
605
+ * @param value - Speed or distance value.
606
+ */
607
+ public constructor(bodyState: number, movementType: TXR_move, pathType: number, vector: vector, value: f32);
608
+
609
+ /**
610
+ * Move toward a position with distance.
611
+ *
612
+ * @param vector - Target position.
613
+ * @param value - Distance value.
614
+ */
186
615
  public constructor(vector: vector, value: number);
616
+
617
+ /**
618
+ * Create a monster movement action toward a position.
619
+ *
620
+ * @remarks
621
+ * Monster-only overload using `MonsterSpace::EScriptMonsterMoveAction` values exposed on `move`.
622
+ *
623
+ * @param moveAction - Monster movement action id.
624
+ * @param vector - Target position.
625
+ */
187
626
  public constructor(moveAction: TXR_move, vector: vector);
627
+
628
+ /**
629
+ * Create a monster movement action along a patrol path.
630
+ *
631
+ * @remarks
632
+ * Monster-only overload using `MonsterSpace::EScriptMonsterMoveAction` values exposed on `move`.
633
+ *
634
+ * @param moveAction - Monster movement action id.
635
+ * @param patrol - Patrol path parameters.
636
+ */
188
637
  public constructor(moveAction: TXR_move, patrol: patrol);
638
+
639
+ /**
640
+ * Create a monster movement action toward an object.
641
+ *
642
+ * @remarks
643
+ * Monster-only overload using `MonsterSpace::EScriptMonsterMoveAction` values exposed on `move`.
644
+ *
645
+ * @param moveAction - Monster movement action id.
646
+ * @param game_object - Target object.
647
+ */
189
648
  public constructor(moveAction: TXR_move, game_object: game_object);
649
+
650
+ /**
651
+ * Create a monster movement action toward a position with distance.
652
+ *
653
+ * @remarks
654
+ * Monster-only overload. The distance is the stop distance from the target.
655
+ *
656
+ * @param moveAction - Monster movement action id.
657
+ * @param vector - Target position.
658
+ * @param value - Distance value.
659
+ */
190
660
  public constructor(moveAction: TXR_move, vector: vector, value: number);
661
+
662
+ /**
663
+ * Create a monster movement action toward a position from a node id.
664
+ *
665
+ * @remarks
666
+ * Monster-only overload. The node id lets the engine build the movement goal from a known level graph point.
667
+ *
668
+ * @param moveAction - Monster movement action id.
669
+ * @param value - Node or point id.
670
+ * @param vector - Target position.
671
+ */
191
672
  public constructor(moveAction: TXR_move, value: number, vector: vector);
673
+
674
+ /**
675
+ * Create a monster movement action toward a position from a node id with distance.
676
+ *
677
+ * @remarks
678
+ * Monster-only overload. The final value is the stop distance from the target.
679
+ *
680
+ * @param moveAction - Monster movement action id.
681
+ * @param value - Node or point id.
682
+ * @param vector - Target position.
683
+ * @param value2 - Distance value.
684
+ */
192
685
  public constructor(moveAction: TXR_move, value: number, vector: vector, value2: number);
686
+
687
+ /**
688
+ * Create a monster movement action along a patrol path with distance.
689
+ *
690
+ * @remarks
691
+ * Monster-only overload. The distance is the stop distance from the patrol target.
692
+ *
693
+ * @param moveAction - Monster movement action id.
694
+ * @param patrol - Patrol path parameters.
695
+ * @param value - Distance value.
696
+ */
193
697
  public constructor(moveAction: TXR_move, patrol: patrol, value: number);
698
+
699
+ /**
700
+ * Create a monster movement action toward an object with distance.
701
+ *
702
+ * @remarks
703
+ * Monster-only overload. The distance is the stop distance from the target object.
704
+ *
705
+ * @param moveAction - Monster movement action id.
706
+ * @param game_object - Target object.
707
+ * @param value - Distance value.
708
+ */
194
709
  public constructor(moveAction: TXR_move, game_object: game_object, value: f32);
710
+
711
+ /**
712
+ * Create a monster movement action toward a position with speed mode.
713
+ *
714
+ * @remarks
715
+ * Monster-only overload. `speedParam` is a `MonsterSpace::EScriptMonsterSpeedParam` value.
716
+ *
717
+ * @param moveAction - Monster movement action id.
718
+ * @param vector - Target position.
719
+ * @param value - Distance value.
720
+ * @param speedParam - Speed parameter id.
721
+ */
195
722
  public constructor(moveAction: TXR_move, vector: vector, value: f32, speedParam: number);
723
+
724
+ /**
725
+ * Create a monster movement action along a patrol path with speed mode.
726
+ *
727
+ * @remarks
728
+ * Monster-only overload. `speedParam` is a `MonsterSpace::EScriptMonsterSpeedParam` value.
729
+ *
730
+ * @param moveAction - Monster movement action id.
731
+ * @param patrol - Patrol path parameters.
732
+ * @param value - Distance value.
733
+ * @param speedParam - Speed parameter id.
734
+ */
196
735
  public constructor(moveAction: TXR_move, patrol: patrol, value: f32, speedParam: number);
197
- public constructor(moveAction: TXR_move, game_object: game_object, value: number, speedParam: unknown);
198
736
 
737
+ /**
738
+ * Create a monster movement action toward an object with speed mode.
739
+ *
740
+ * @remarks
741
+ * Monster-only overload. `speedParam` is a `MonsterSpace::EScriptMonsterSpeedParam` value.
742
+ *
743
+ * @param moveAction - Monster movement action id.
744
+ * @param game_object - Target object.
745
+ * @param value - Distance value.
746
+ * @param speedParam - Speed parameter id.
747
+ */
748
+ public constructor(moveAction: TXR_move, game_object: game_object, value: number, speedParam: number);
749
+
750
+ /**
751
+ * @returns Whether the movement action is complete.
752
+ */
199
753
  public completed(): boolean;
200
754
 
201
- public path(EDetailPathType: number): void;
755
+ /**
756
+ * Set detail path type.
757
+ *
758
+ * @param pathType - Detail path type id.
759
+ */
760
+ public path(pathType: number): void;
202
761
 
203
- public move(EMovementType: number): void;
762
+ /**
763
+ * Set movement type.
764
+ *
765
+ * @param movementType - Movement type id.
766
+ */
767
+ public move(movementType: number): void;
204
768
 
769
+ /**
770
+ * Set target position.
771
+ *
772
+ * @param vector - Target position.
773
+ */
205
774
  public position(vector: vector): void;
206
775
 
207
- public input(EInputKeys: number): void;
776
+ /**
777
+ * Set input key action.
778
+ *
779
+ * @param inputKey - Input key id.
780
+ */
781
+ public input(inputKey: number): void;
208
782
 
209
- public patrol(patrolPath: unknown, shared_str: string): void;
783
+ /**
784
+ * Set patrol path.
785
+ *
786
+ * @param patrolPath - Patrol path object.
787
+ * @param path_name - Patrol path name.
788
+ */
789
+ public patrol(patrolPath: unknown, path_name: string): void;
210
790
 
791
+ /**
792
+ * Set target object.
793
+ *
794
+ * @param game_object - Target object.
795
+ */
211
796
  public object(game_object: game_object): void;
212
797
 
213
- public body(EBodyState: number): void;
798
+ /**
799
+ * Set body state.
800
+ *
801
+ * @param bodyState - Body state id.
802
+ */
803
+ public body(bodyState: number): void;
214
804
  }
215
805
 
216
806
  /**
@@ -219,23 +809,53 @@ declare module "xray16" {
219
809
  export type TXR_move = EnumeratedStaticsValues<typeof move>;
220
810
 
221
811
  /**
812
+ * Patrol path parameters used by movement actions.
813
+ *
222
814
  * @source C++ class patrol
223
815
  * @customConstructor patrol
224
816
  * @group xr_action
225
817
  */
226
818
  export class patrol extends EngineBinding {
227
- // EPatrolRouteType:
819
+ /**
820
+ * Engine enum value for `patrol.stop`.
821
+ */
228
822
  public static readonly stop: 0;
229
823
  // Public static readonly stop: 1;
230
824
 
231
- // EPatrolStartType:
825
+ /**
826
+ * Engine enum value for `patrol.start`.
827
+ */
232
828
  public static readonly start: 0;
829
+ /**
830
+ * Engine enum value for `patrol.continue`.
831
+ */
233
832
  public static readonly continue: 1;
833
+ /**
834
+ * Engine enum value for `patrol.nearest`.
835
+ */
234
836
  public static readonly nearest: 2;
837
+ /**
838
+ * Engine enum value for `patrol.custom`.
839
+ */
235
840
  public static readonly custom: 3;
841
+ /**
842
+ * Engine enum value for `patrol.next`.
843
+ */
236
844
  public static readonly next: 4;
845
+ /**
846
+ * Engine enum value for `patrol.dummy`.
847
+ */
237
848
  public static readonly dummy: -1;
238
849
 
850
+ /**
851
+ * Create patrol path parameters.
852
+ *
853
+ * @param name - Patrol path name.
854
+ * @param startType - Patrol start type.
855
+ * @param routeType - Patrol route type.
856
+ * @param bool - Whether random point selection is enabled.
857
+ * @param int - Custom start point index.
858
+ */
239
859
  public constructor(
240
860
  name?: string,
241
861
  startType?: TXR_patrol_type,
@@ -244,16 +864,91 @@ declare module "xray16" {
244
864
  int?: u32
245
865
  );
246
866
 
867
+ /**
868
+ * @returns Number of points in the patrol path.
869
+ */
247
870
  public count(): u32;
871
+
872
+ /**
873
+ * Check a patrol point flag by numeric index.
874
+ *
875
+ * @param value1 - Patrol point index.
876
+ * @param value2 - Flag index.
877
+ * @returns Whether the flag is set.
878
+ */
248
879
  public flag(value1: u32, value2: u8): boolean;
880
+
881
+ /**
882
+ * Check a patrol point flag by name.
883
+ *
884
+ * @param value1 - Patrol point index.
885
+ * @param value2 - Flag name.
886
+ * @returns Whether the flag is set.
887
+ */
249
888
  public flag(value1: u32, value2: string): boolean;
889
+
890
+ /**
891
+ * Get all flags for a patrol point.
892
+ *
893
+ * @param point_index - Patrol point index.
894
+ * @returns Point flags.
895
+ */
250
896
  public flags(point_index: u32): flags32;
897
+
898
+ /**
899
+ * Get game graph vertex id for a patrol point.
900
+ *
901
+ * @param value - Patrol point index.
902
+ * @returns Game graph vertex id.
903
+ */
251
904
  public game_vertex_id(value: u32): u16;
905
+
906
+ /**
907
+ * Find nearest patrol point to a position.
908
+ *
909
+ * @param vector - Position to test.
910
+ * @returns Patrol point index.
911
+ */
252
912
  public get_nearest(vector: vector): u32;
913
+
914
+ /**
915
+ * Find patrol point index by name.
916
+ *
917
+ * @param value - Patrol point name.
918
+ * @returns Patrol point index.
919
+ */
253
920
  public index(value: string): u32;
921
+
922
+ /**
923
+ * Get level vertex id for a patrol point.
924
+ *
925
+ * @param value - Patrol point index.
926
+ * @returns Level vertex id.
927
+ */
254
928
  public level_vertex_id(value: u32): u32;
929
+
930
+ /**
931
+ * Get patrol point name.
932
+ *
933
+ * @param point_index - Patrol point index.
934
+ * @returns Point name.
935
+ */
255
936
  public name(point_index: u32): string;
937
+
938
+ /**
939
+ * Get patrol point position.
940
+ *
941
+ * @param index - Patrol point index.
942
+ * @returns Point position.
943
+ */
256
944
  public point(index: u32): vector;
945
+
946
+ /**
947
+ * Check whether a patrol point is terminal.
948
+ *
949
+ * @param point_index - Patrol point index.
950
+ * @returns Whether the point ends the route.
951
+ */
257
952
  public terminal(point_index: u32): boolean;
258
953
  }
259
954
 
@@ -263,29 +958,84 @@ declare module "xray16" {
263
958
  export type TXR_patrol_type = EnumeratedStaticsValues<typeof patrol>;
264
959
 
265
960
  /**
961
+ * Sight target snapshot.
962
+ *
266
963
  * @source C++ class CSightParams
267
964
  * @customConstructor XR_CSightParams
268
965
  * @group xr_action
269
966
  */
270
967
  export class CSightParams {
968
+ /**
969
+ * Engine enum value for `CSightParams.eSightTypeDummy`.
970
+ */
271
971
  public static readonly eSightTypeDummy: -1;
972
+ /**
973
+ * Engine enum value for `CSightParams.eSightTypeCurrentDirection`.
974
+ */
272
975
  public static readonly eSightTypeCurrentDirection: 0;
976
+ /**
977
+ * Engine enum value for `CSightParams.eSightTypePathDirection`.
978
+ */
273
979
  public static readonly eSightTypePathDirection: 1;
980
+ /**
981
+ * Engine enum value for `CSightParams.eSightTypeDirection`.
982
+ */
274
983
  public static readonly eSightTypeDirection: 2;
984
+ /**
985
+ * Engine enum value for `CSightParams.eSightTypePosition`.
986
+ */
275
987
  public static readonly eSightTypePosition: 3;
988
+ /**
989
+ * Engine enum value for `CSightParams.eSightTypeObject`.
990
+ */
276
991
  public static readonly eSightTypeObject: 4;
992
+ /**
993
+ * Engine enum value for `CSightParams.eSightTypeCover`.
994
+ */
277
995
  public static readonly eSightTypeCover: 5;
996
+ /**
997
+ * Engine enum value for `CSightParams.eSightTypeSearch`.
998
+ */
278
999
  public static readonly eSightTypeSearch: 6;
1000
+ /**
1001
+ * Engine enum value for `CSightParams.eSightTypeLookOver`.
1002
+ */
279
1003
  public static readonly eSightTypeLookOver: 7;
1004
+ /**
1005
+ * Engine enum value for `CSightParams.eSightTypeCoverLookOver`.
1006
+ */
280
1007
  public static readonly eSightTypeCoverLookOver: 8;
1008
+ /**
1009
+ * Engine enum value for `CSightParams.eSightTypeFireObject`.
1010
+ */
281
1011
  public static readonly eSightTypeFireObject: 9;
1012
+ /**
1013
+ * Engine enum value for `CSightParams.eSightTypeFirePosition`.
1014
+ */
282
1015
  public static readonly eSightTypeFirePosition: 10;
1016
+ /**
1017
+ * Engine enum value for `CSightParams.eSightTypeAnimationDirection`.
1018
+ */
283
1019
  public static readonly eSightTypeAnimationDirection: 11;
284
1020
 
1021
+ /**
1022
+ * Object target for object-based sight modes.
1023
+ */
285
1024
  public readonly m_object: game_object;
1025
+
1026
+ /**
1027
+ * Active sight mode.
1028
+ */
286
1029
  public readonly m_sight_type: TXR_SightType;
1030
+
1031
+ /**
1032
+ * Position or direction target for vector-based sight modes.
1033
+ */
287
1034
  public readonly m_vector: vector;
288
1035
 
1036
+ /**
1037
+ * Create default sight parameters.
1038
+ */
289
1039
  public constructor();
290
1040
  }
291
1041
 
@@ -295,31 +1045,132 @@ declare module "xray16" {
295
1045
  export type TXR_SightType = EnumeratedStaticsValues<typeof CSightParams>;
296
1046
 
297
1047
  /**
1048
+ * Look action for setting where an object should watch.
1049
+ *
298
1050
  * @source C++ class look
299
1051
  * @customConstructor look
300
1052
  * @group xr_action
1053
+ *
1054
+ * @remarks
1055
+ * Look actions are consumed by AI sight managers and searchlight-like objects. Bone-target overloads require the
1056
+ * target object to have the named bone in its visual.
301
1057
  */
302
1058
  export class look extends EngineBinding {
1059
+ /**
1060
+ * Engine enum value for `look.cur_dir`.
1061
+ */
303
1062
  public static readonly cur_dir: 0;
1063
+ /**
1064
+ * Engine enum value for `look.danger`.
1065
+ */
304
1066
  public static readonly danger: 5;
1067
+ /**
1068
+ * Engine enum value for `look.direction`.
1069
+ */
305
1070
  public static readonly direction: 2;
1071
+ /**
1072
+ * Engine enum value for `look.fire_point`.
1073
+ */
306
1074
  public static readonly fire_point: 10;
1075
+ /**
1076
+ * Engine enum value for `look.path_dir`.
1077
+ */
307
1078
  public static readonly path_dir: 1;
1079
+ /**
1080
+ * Engine enum value for `look.point`.
1081
+ */
308
1082
  public static readonly point: 3;
1083
+ /**
1084
+ * Engine enum value for `look.search`.
1085
+ */
309
1086
  public static readonly search: 6;
310
1087
 
1088
+ /**
1089
+ * Create an empty look action.
1090
+ */
311
1091
  public constructor();
1092
+
1093
+ /**
1094
+ * Create a look action by sight type.
1095
+ *
1096
+ * @param sight_type - Sight type id.
1097
+ */
312
1098
  public constructor(sight_type: TXR_SightType);
1099
+
1100
+ /**
1101
+ * Look at a position or direction.
1102
+ *
1103
+ * @param sight_type - Sight type id.
1104
+ * @param vector - Target vector.
1105
+ */
313
1106
  public constructor(sight_type: TXR_SightType, vector: vector);
1107
+
1108
+ /**
1109
+ * Look at an object.
1110
+ *
1111
+ * @param sight_type - Sight type id.
1112
+ * @param game_object - Target object.
1113
+ */
314
1114
  public constructor(sight_type: TXR_SightType, game_object: game_object);
1115
+
1116
+ /**
1117
+ * Look at an object bone.
1118
+ *
1119
+ * @param sight_type - Sight type id.
1120
+ * @param game_object - Target object.
1121
+ * @param value - Bone name.
1122
+ */
315
1123
  public constructor(sight_type: TXR_SightType, game_object: game_object, value: string);
1124
+
1125
+ /**
1126
+ * Create a searchlight-style look action from a vector.
1127
+ *
1128
+ * @param vector - Target vector.
1129
+ * @param value1 - First angle.
1130
+ * @param value2 - Second angle.
1131
+ */
316
1132
  public constructor(vector: vector, value1: f32, value2: f32);
1133
+
1134
+ /**
1135
+ * Create a searchlight-style look action from an object.
1136
+ *
1137
+ * @param game_object - Target object.
1138
+ * @param value1 - First angle.
1139
+ * @param value2 - Second angle.
1140
+ */
317
1141
  public constructor(game_object: game_object, value1: f32, value2: f32);
318
1142
 
1143
+ /**
1144
+ * @returns Whether the look action is complete.
1145
+ */
319
1146
  public completed(): boolean;
1147
+
1148
+ /**
1149
+ * Set sight type.
1150
+ *
1151
+ * @param sight_type - Sight type id.
1152
+ */
320
1153
  public type(sight_type: TXR_SightType): void;
1154
+
1155
+ /**
1156
+ * Set watched object.
1157
+ *
1158
+ * @param game_object - Target object.
1159
+ */
321
1160
  public object(game_object: game_object): void;
322
- public bone(bode_id: string): void;
1161
+
1162
+ /**
1163
+ * Set watched bone.
1164
+ *
1165
+ * @param bone_id - Bone name.
1166
+ */
1167
+ public bone(bone_id: string): void;
1168
+
1169
+ /**
1170
+ * Set watched direction.
1171
+ *
1172
+ * @param vector - Direction vector.
1173
+ */
323
1174
  public direct(vector: Readonly<vector>): void;
324
1175
  }
325
1176
 
@@ -329,36 +1180,128 @@ declare module "xray16" {
329
1180
  export type TXR_look = EnumeratedStaticsValues<typeof look>;
330
1181
 
331
1182
  /**
1183
+ * Animation action.
1184
+ *
332
1185
  * @source C++ class anim
333
1186
  * @customConstructor anim
334
1187
  * @group xr_action
1188
+ *
1189
+ * @remarks
1190
+ * String animation overloads play a named script animation. Numeric one-argument overloads set an AI mental state.
1191
+ * Numeric two-argument overloads are monster animation actions.
335
1192
  */
336
1193
  export class anim extends EngineBinding {
337
1194
  // Mental state:
1195
+ /**
1196
+ * Engine enum value for `anim.danger`.
1197
+ */
338
1198
  public static readonly danger: 0;
1199
+ /**
1200
+ * Engine enum value for `anim.free`.
1201
+ */
339
1202
  public static readonly free: 1;
1203
+ /**
1204
+ * Engine enum value for `anim.panic`.
1205
+ */
340
1206
  public static readonly panic: 2;
341
1207
 
342
1208
  // Animation state:
1209
+ /**
1210
+ * Engine enum value for `anim.stand_idle`.
1211
+ */
343
1212
  public static readonly stand_idle: 0;
1213
+ /**
1214
+ * Engine enum value for `anim.capture_prepare`.
1215
+ */
344
1216
  public static readonly capture_prepare: 1;
1217
+ /**
1218
+ * Engine enum value for `anim.sit_idle`.
1219
+ */
345
1220
  public static readonly sit_idle: 2;
1221
+ /**
1222
+ * Engine enum value for `anim.lie_idle`.
1223
+ */
346
1224
  public static readonly lie_idle: 3;
1225
+ /**
1226
+ * Engine enum value for `anim.eat`.
1227
+ */
347
1228
  public static readonly eat: 4;
1229
+ /**
1230
+ * Engine enum value for `anim.sleep`.
1231
+ */
348
1232
  public static readonly sleep: 5;
1233
+ /**
1234
+ * Engine enum value for `anim.rest`.
1235
+ */
349
1236
  public static readonly rest: 6;
1237
+ /**
1238
+ * Engine enum value for `anim.attack`.
1239
+ */
350
1240
  public static readonly attack: 7;
1241
+ /**
1242
+ * Engine enum value for `anim.look_around`.
1243
+ */
351
1244
  public static readonly look_around: 8;
1245
+ /**
1246
+ * Engine enum value for `anim.turn`.
1247
+ */
352
1248
  public static readonly turn: 9;
353
1249
 
1250
+ /**
1251
+ * Create an empty animation action.
1252
+ */
354
1253
  public constructor();
1254
+
1255
+ /**
1256
+ * Play an animation by name.
1257
+ *
1258
+ * @param value - Animation name.
1259
+ */
355
1260
  public constructor(value: string);
1261
+
1262
+ /**
1263
+ * Play an animation by name.
1264
+ *
1265
+ * @param value1 - Animation name.
1266
+ * @param value2 - Whether the animation should loop.
1267
+ */
356
1268
  public constructor(value1: string, value2: boolean);
1269
+
1270
+ /**
1271
+ * Set AI mental state.
1272
+ *
1273
+ * @param state - Mental state id.
1274
+ */
357
1275
  public constructor(state: number); /* Enum MonsterSpace::EMentalState */
358
- public constructor(state: number /* Enum MonsterSpace::EMentalState */, value: i32);
359
1276
 
1277
+ /**
1278
+ * Set monster animation action and extra value.
1279
+ *
1280
+ * @remarks
1281
+ * Monster-only overload using `MonsterSpace::EScriptMonsterAnimAction` values exposed on `anim`.
1282
+ *
1283
+ * @param state - Monster animation action id.
1284
+ * @param value - Extra action value.
1285
+ */
1286
+ public constructor(state: number /* Enum MonsterSpace::EScriptMonsterAnimAction */, value: i32);
1287
+
1288
+ /**
1289
+ * @returns Whether the animation action is complete.
1290
+ */
360
1291
  public completed(): boolean;
1292
+
1293
+ /**
1294
+ * Set mental state.
1295
+ *
1296
+ * @param state - Mental state id.
1297
+ */
361
1298
  public type(state: number /* Enum MonsterSpace::EMentalState */): void;
1299
+
1300
+ /**
1301
+ * Set animation name.
1302
+ *
1303
+ * @param value - Animation name.
1304
+ */
362
1305
  public anim(value: string): void;
363
1306
  }
364
1307
 
@@ -373,51 +1316,259 @@ declare module "xray16" {
373
1316
  export type TXR_animation = EnumeratedStaticsValues<typeof anim>;
374
1317
 
375
1318
  /**
1319
+ * Sound action for scripted AI behavior.
1320
+ *
376
1321
  * @source C++ class sound
377
1322
  * @customConstructor sound
378
1323
  * @group xr_action
1324
+ *
1325
+ * @remarks
1326
+ * String and `sound_object` overloads play regular script sounds. Numeric overloads use monster sound categories.
1327
+ * The head-animation overload is intended for trader-style talking animations.
379
1328
  */
380
1329
  export class sound extends EngineBinding {
1330
+ /**
1331
+ * Engine enum value for `sound.attack`.
1332
+ */
381
1333
  public static readonly attack: 3;
1334
+ /**
1335
+ * Engine enum value for `sound.attack_hit`.
1336
+ */
382
1337
  public static readonly attack_hit: 4;
1338
+ /**
1339
+ * Engine enum value for `sound.die`.
1340
+ */
383
1341
  public static readonly die: 7;
1342
+ /**
1343
+ * Engine enum value for `sound.eat`.
1344
+ */
384
1345
  public static readonly eat: 2;
1346
+ /**
1347
+ * Engine enum value for `sound.idle`.
1348
+ */
385
1349
  public static readonly idle: 1;
1350
+ /**
1351
+ * Engine enum value for `sound.panic`.
1352
+ */
386
1353
  public static readonly panic: 11;
1354
+ /**
1355
+ * Engine enum value for `sound.steal`.
1356
+ */
387
1357
  public static readonly steal: 10;
1358
+ /**
1359
+ * Engine enum value for `sound.take_damage`.
1360
+ */
388
1361
  public static readonly take_damage: 5;
1362
+ /**
1363
+ * Engine enum value for `sound.threaten`.
1364
+ */
389
1365
  public static readonly threaten: 9;
390
1366
 
1367
+ /**
1368
+ * Create an empty sound action.
1369
+ */
391
1370
  public constructor();
1371
+
1372
+ /**
1373
+ * Play a sound by prefix and name.
1374
+ *
1375
+ * @param value1 - Sound prefix or collection.
1376
+ * @param value2 - Sound name.
1377
+ */
392
1378
  public constructor(value1: string, value2: string);
1379
+
1380
+ /**
1381
+ * Play a sound at a position.
1382
+ *
1383
+ * @param value1 - Sound prefix or collection.
1384
+ * @param value2 - Sound name.
1385
+ * @param vector - Position.
1386
+ */
393
1387
  public constructor(value1: string, value2: string, vector: vector);
1388
+
1389
+ /**
1390
+ * Play a sound at a position with angles.
1391
+ *
1392
+ * @param value1 - Sound prefix or collection.
1393
+ * @param value2 - Sound name.
1394
+ * @param vector - Position.
1395
+ * @param vector2 - Angles.
1396
+ */
394
1397
  public constructor(value1: string, value2: string, vector: vector, vector2: vector);
1398
+
1399
+ /**
1400
+ * Play a sound at a position with angles and loop flag.
1401
+ *
1402
+ * @param value1 - Sound prefix or collection.
1403
+ * @param value2 - Sound name.
1404
+ * @param vector - Position.
1405
+ * @param vector2 - Angles.
1406
+ * @param value3 - Whether playback should loop.
1407
+ */
395
1408
  public constructor(value1: string, value2: string, vector: vector, vector2: vector, value3: boolean);
1409
+
1410
+ /**
1411
+ * Play a sound by name at a position.
1412
+ *
1413
+ * @param value1 - Sound name.
1414
+ * @param vector - Position.
1415
+ */
396
1416
  public constructor(value1: string, vector: vector);
1417
+
1418
+ /**
1419
+ * Play a sound by name at a position with angles.
1420
+ *
1421
+ * @param value1 - Sound name.
1422
+ * @param vector - Position.
1423
+ * @param vector2 - Angles.
1424
+ */
397
1425
  public constructor(value1: string, vector: vector, vector2: vector);
1426
+
1427
+ /**
1428
+ * Play a sound by name at a position with angles and loop flag.
1429
+ *
1430
+ * @param value1 - Sound name.
1431
+ * @param vector - Position.
1432
+ * @param vector2 - Angles.
1433
+ * @param value3 - Whether playback should loop.
1434
+ */
398
1435
  public constructor(value1: string, vector: vector, vector2: vector, value3: boolean);
1436
+
1437
+ /**
1438
+ * Play a `sound_object` with a bone at a position.
1439
+ *
1440
+ * @param sound_object - Sound object.
1441
+ * @param value1 - Bone name.
1442
+ * @param vector - Position.
1443
+ */
399
1444
  public constructor(sound_object: sound_object, value1: string, vector: vector);
1445
+
1446
+ /**
1447
+ * Play a `sound_object` with a bone, position, and angles.
1448
+ *
1449
+ * @param sound_object - Sound object.
1450
+ * @param value1 - Bone name.
1451
+ * @param vector - Position.
1452
+ * @param vector2 - Angles.
1453
+ */
400
1454
  public constructor(sound_object: sound_object, value1: string, vector: vector, vector2: vector);
1455
+
1456
+ /**
1457
+ * Play a `sound_object` with a bone, position, angles, and loop flag.
1458
+ *
1459
+ * @param sound_object - Sound object.
1460
+ * @param value1 - Bone name.
1461
+ * @param vector - Position.
1462
+ * @param vector2 - Angles.
1463
+ * @param value - Whether playback should loop.
1464
+ */
401
1465
  public constructor(sound_object: sound_object, value1: string, vector: vector, vector2: vector, value: boolean);
1466
+
1467
+ /**
1468
+ * Play a `sound_object` at a position.
1469
+ *
1470
+ * @param sound_object - Sound object.
1471
+ * @param vector1 - Position.
1472
+ */
402
1473
  public constructor(sound_object: sound_object, vector1: vector);
1474
+
1475
+ /**
1476
+ * Play a `sound_object` at a position with angles.
1477
+ *
1478
+ * @param sound_object - Sound object.
1479
+ * @param vector1 - Position.
1480
+ * @param vector2 - Angles.
1481
+ */
403
1482
  public constructor(sound_object: sound_object, vector1: vector, vector2: vector);
1483
+
1484
+ /**
1485
+ * Play a `sound_object` at a position with angles and loop flag.
1486
+ *
1487
+ * @param sound_object - Sound object.
1488
+ * @param vector1 - Position.
1489
+ * @param vector2 - Angles.
1490
+ * @param value - Whether playback should loop.
1491
+ */
404
1492
  public constructor(sound_object: sound_object, vector1: vector, vector2: vector, value: boolean);
405
- public constructor(type: unknown); /* MonsterSound::EType */
406
- public constructor(type: unknown /* Enum MonsterSound::EType*/, value: number);
1493
+
1494
+ /**
1495
+ * Play a monster sound by type.
1496
+ *
1497
+ * @remarks
1498
+ * Monster-only overload using `MonsterSound::EType` values exposed on `sound`.
1499
+ *
1500
+ * @param type - Monster sound type id.
1501
+ */
1502
+ public constructor(type: TXR_sound_type); /* MonsterSound::EType */
1503
+
1504
+ /**
1505
+ * Play a monster sound by type with extra value.
1506
+ *
1507
+ * @remarks
1508
+ * Monster-only overload. The value is the engine delay passed to the monster sound action.
1509
+ *
1510
+ * @param type - Monster sound type id.
1511
+ * @param value - Extra sound value.
1512
+ */
1513
+ public constructor(type: TXR_sound_type /* Enum MonsterSound::EType*/, value: number);
1514
+
1515
+ /**
1516
+ * Play a trader sound with a head animation.
1517
+ *
1518
+ * @remarks
1519
+ * Trader-specific overload. The head animation is one of `MonsterSpace.head_anim_*`.
1520
+ *
1521
+ * @param value1 - Sound prefix or collection.
1522
+ * @param value2 - Sound name.
1523
+ * @param type - Monster head animation type.
1524
+ */
407
1525
  public constructor(value1: string, value2: string, type: unknown); /* Enum MonsterSpace::EMonsterHeadAnimType */
408
1526
 
1527
+ /**
1528
+ * Set sound by name.
1529
+ *
1530
+ * @param value - Sound name.
1531
+ */
409
1532
  public set_sound(value: string): void;
410
1533
 
1534
+ /**
1535
+ * Set sound object.
1536
+ *
1537
+ * @param sound_object - Sound object.
1538
+ */
411
1539
  public set_sound(sound_object: sound_object): void;
412
1540
 
1541
+ /**
1542
+ * Set sound position.
1543
+ *
1544
+ * @param vector - Position.
1545
+ */
413
1546
  public set_position(vector: vector): void;
414
1547
 
1548
+ /**
1549
+ * Set sound bone.
1550
+ *
1551
+ * @param value - Bone name.
1552
+ */
415
1553
  public set_bone(value: string): void;
416
1554
 
1555
+ /**
1556
+ * Set sound angles.
1557
+ *
1558
+ * @param vector - Angles.
1559
+ */
417
1560
  public set_angles(vector: vector): void;
418
1561
 
419
- public set_sound_type(type: unknown /* ESoundTypes */): void;
1562
+ /**
1563
+ * Set sound type.
1564
+ *
1565
+ * @param type - Sound type id.
1566
+ */
1567
+ public set_sound_type(type: number /* ESoundTypes */): void;
420
1568
 
1569
+ /**
1570
+ * @returns Whether sound playback is complete.
1571
+ */
421
1572
  public completed(): boolean;
422
1573
  }
423
1574
 
@@ -432,21 +1583,64 @@ declare module "xray16" {
432
1583
  export type TXR_sound_type = EnumeratedStaticsValues<typeof sound>;
433
1584
 
434
1585
  /**
1586
+ * Completion condition for a composed entity action.
1587
+ *
435
1588
  * @source C++ class cond
436
1589
  * @customConstructor cond
437
1590
  * @group xr_action
1591
+ *
1592
+ * @remarks
1593
+ * Conditions choose which sub-action completions should finish the composed `entity_action`. Combine flags when the
1594
+ * action should wait for several parts.
438
1595
  */
439
1596
  export class cond extends EngineBinding {
1597
+ /**
1598
+ * Engine enum value for `cond.move_end`.
1599
+ */
440
1600
  public static readonly move_end: 1;
1601
+ /**
1602
+ * Engine enum value for `cond.look_end`.
1603
+ */
441
1604
  public static readonly look_end: 2;
1605
+ /**
1606
+ * Engine enum value for `cond.anim_end`.
1607
+ */
442
1608
  public static readonly anim_end: 4;
1609
+ /**
1610
+ * Engine enum value for `cond.sound_end`.
1611
+ */
443
1612
  public static readonly sound_end: 8;
1613
+ /**
1614
+ * Engine enum value for `cond.object_end`.
1615
+ */
444
1616
  public static readonly object_end: 32;
1617
+ /**
1618
+ * Engine enum value for `cond.time_end`.
1619
+ */
445
1620
  public static readonly time_end: 64;
1621
+ /**
1622
+ * Engine enum value for `cond.act_end`.
1623
+ */
446
1624
  public static readonly act_end: 128;
447
1625
 
1626
+ /**
1627
+ * Create an empty completion condition.
1628
+ */
448
1629
  public constructor();
1630
+
1631
+ /**
1632
+ * Create a completion condition from flags.
1633
+ *
1634
+ * @param value - Condition flags.
1635
+ */
449
1636
  public constructor(value: u32);
1637
+
1638
+ /**
1639
+ * Create a completion condition from flags and a time limit.
1640
+ *
1641
+ * @param value1 - Condition flags.
1642
+ * @param value2 - Time limit.
1643
+ */
450
1644
  public constructor(value1: u32, value2: f64);
451
1645
  }
452
1646
 
@@ -456,38 +1650,107 @@ declare module "xray16" {
456
1650
  export type TXR_cond = EnumeratedStaticsValues<typeof cond>;
457
1651
 
458
1652
  /**
1653
+ * Global monster action.
1654
+ *
459
1655
  * @source C++ class act
460
1656
  * @customConstructor act
461
1657
  * @group xr_action
1658
+ *
1659
+ * @remarks
1660
+ * Monster global actions are consumed by custom monster controllers. They are not a generic command system for
1661
+ * stalkers, items, or vehicles.
462
1662
  */
463
1663
  export class act {
1664
+ /**
1665
+ * Engine enum value for `act.attack`.
1666
+ */
464
1667
  public static readonly attack: 2;
1668
+ /**
1669
+ * Engine enum value for `act.eat`.
1670
+ */
465
1671
  public static readonly eat: 1;
1672
+ /**
1673
+ * Engine enum value for `act.panic`.
1674
+ */
466
1675
  public static readonly panic: 3;
1676
+ /**
1677
+ * Engine enum value for `act.rest`.
1678
+ */
467
1679
  public static readonly rest: 0;
468
1680
 
1681
+ /**
1682
+ * Create an empty global monster action.
1683
+ */
469
1684
  public constructor();
470
- public constructor(EScriptMonsterGlobalAction: number);
471
- public constructor(EScriptMonsterGlobalAction: number, game_object: game_object);
1685
+
1686
+ /**
1687
+ * Create a global monster action.
1688
+ *
1689
+ * @param action - Global monster action id.
1690
+ */
1691
+ public constructor(action: number);
1692
+
1693
+ /**
1694
+ * Create a global monster action with a target object.
1695
+ *
1696
+ * @param action - Global monster action id.
1697
+ * @param game_object - Target object.
1698
+ */
1699
+ public constructor(action: number, game_object: game_object);
472
1700
  }
473
1701
 
474
1702
  /**
1703
+ * Particle action transform parameters.
1704
+ *
475
1705
  * @source C++ class particle_params
476
1706
  * @customConstructor particle_params
477
1707
  * @group xr_action
478
1708
  */
479
1709
  export class particle_params {
1710
+ /**
1711
+ * Create empty particle parameters.
1712
+ */
480
1713
  public constructor();
1714
+
1715
+ /**
1716
+ * Create particle parameters from vectors.
1717
+ *
1718
+ * @param first - Position vector.
1719
+ * @param second - Angle vector.
1720
+ * @param third - Velocity vector.
1721
+ */
481
1722
  public constructor(first?: vector, second?: vector, third?: vector);
482
1723
  }
483
1724
 
484
1725
  /**
1726
+ * Particle playback action.
1727
+ *
485
1728
  * @source C++ class particle
486
1729
  * @customConstructor particle
487
1730
  * @group xr_action
1731
+ *
1732
+ * @remarks
1733
+ * Bone-attached particles require the controlled object visual to contain the requested bone. Position-only
1734
+ * particles use world coordinates.
488
1735
  */
489
1736
  export class particle extends EngineBinding {
1737
+ /**
1738
+ * Create a particle action.
1739
+ *
1740
+ * @param particle_to_run - Particle effect name.
1741
+ * @param particle_params - Optional transform parameters.
1742
+ * @param auto_remove - Whether the particle should be removed after playback.
1743
+ */
490
1744
  public constructor(particle_to_run: string, particle_params?: particle_params, auto_remove?: boolean);
1745
+
1746
+ /**
1747
+ * Create a particle action attached to a bone.
1748
+ *
1749
+ * @param particle_to_run - Particle effect name.
1750
+ * @param bone_name - Bone name.
1751
+ * @param particle_params - Transform parameters.
1752
+ * @param auto_remove - Whether the particle should be removed after playback.
1753
+ */
491
1754
  public constructor(
492
1755
  particle_to_run: string,
493
1756
  bone_name: string,
@@ -495,16 +1758,45 @@ declare module "xray16" {
495
1758
  auto_remove: boolean
496
1759
  );
497
1760
 
1761
+ /**
1762
+ * @returns Whether particle playback is complete.
1763
+ */
498
1764
  public completed(): boolean;
499
1765
 
1766
+ /**
1767
+ * Set particle angles.
1768
+ *
1769
+ * @param vector - Angles.
1770
+ */
500
1771
  public set_angles(vector: vector): void;
501
1772
 
1773
+ /**
1774
+ * Set attached bone.
1775
+ *
1776
+ * @param bone_id - Bone name.
1777
+ */
502
1778
  public set_bone(bone_id: string): void;
503
1779
 
1780
+ /**
1781
+ * Set particle effect and auto-remove flag.
1782
+ *
1783
+ * @param value1 - Particle effect name.
1784
+ * @param value2 - Whether the particle should be removed after playback.
1785
+ */
504
1786
  public set_particle(value1: string, value2: boolean): void;
505
1787
 
1788
+ /**
1789
+ * Set particle position.
1790
+ *
1791
+ * @param vector - Position.
1792
+ */
506
1793
  public set_position(vector: vector): void;
507
1794
 
1795
+ /**
1796
+ * Set particle velocity.
1797
+ *
1798
+ * @param vector - Velocity.
1799
+ */
508
1800
  public set_velocity(vector: vector): void;
509
1801
  }
510
1802
  }