xray16 1.3.4 → 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 (84) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +112 -106
  3. package/package.json +45 -42
  4. package/plugins/built_at_info.d.ts +1 -1
  5. package/plugins/from_cast_utils.d.ts +1 -1
  6. package/plugins/global_declarations_transform.d.ts +1 -1
  7. package/plugins/inject_file_meta.d.ts +1 -1
  8. package/plugins/inject_tracy_zones.d.ts +1 -1
  9. package/plugins/inject_tracy_zones.js +2 -2
  10. package/plugins/strip_lua_logger.d.ts +1 -1
  11. package/plugins/strip_lua_logger.js +1 -1
  12. package/plugins/transform_luabind_class/plugin.d.ts +1 -1
  13. package/plugins/transform_luabind_class/transformation/class_declaration.d.ts +3 -3
  14. package/plugins/transform_luabind_class/transformation/decorators.d.ts +5 -2
  15. package/plugins/transform_luabind_class/transformation/decorators.js +3 -0
  16. package/plugins/transform_luabind_class/transformation/members/accessors.d.ts +1 -1
  17. package/plugins/transform_luabind_class/transformation/members/constructor.d.ts +2 -2
  18. package/plugins/transform_luabind_class/transformation/members/constructor.js +2 -2
  19. package/plugins/transform_luabind_class/transformation/members/fields.d.ts +5 -2
  20. package/plugins/transform_luabind_class/transformation/members/fields.js +5 -2
  21. package/plugins/transform_luabind_class/transformation/members/method.d.ts +6 -3
  22. package/plugins/transform_luabind_class/transformation/members/method.js +4 -1
  23. package/plugins/transform_luabind_class/transformation/new.d.ts +7 -3
  24. package/plugins/transform_luabind_class/transformation/new.js +5 -1
  25. package/plugins/transform_luabind_class/transformation/setup.d.ts +9 -3
  26. package/plugins/transform_luabind_class/transformation/setup.js +22 -6
  27. package/plugins/transform_luabind_class/transformation/super.d.ts +19 -3
  28. package/plugins/transform_luabind_class/transformation/super.js +17 -1
  29. package/plugins/transform_luabind_class/transformation/utils.d.ts +27 -4
  30. package/plugins/transform_luabind_class/transformation/utils.js +25 -2
  31. package/plugins/utils/ast.d.ts +1 -1
  32. package/plugins/utils/diagnostics.d.ts +9 -5
  33. package/plugins/utils/diagnostics.js +5 -1
  34. package/plugins/utils/tracy.d.ts +1 -1
  35. package/types/index.d.ts +55 -55
  36. package/types/xr_ai/xr_action.d.ts +1802 -510
  37. package/types/xr_ai/xr_alife.d.ts +1870 -566
  38. package/types/xr_ai/xr_enemy_evaluation.d.ts +134 -41
  39. package/types/xr_ai/xr_goap.d.ts +1116 -668
  40. package/types/xr_ai/xr_graph.d.ts +135 -47
  41. package/types/xr_ai/xr_memory.d.ts +382 -148
  42. package/types/xr_lib/xr_animation.d.ts +252 -81
  43. package/types/xr_lib/xr_bitwise.d.ts +44 -21
  44. package/types/xr_lib/xr_color.d.ts +142 -40
  45. package/types/xr_lib/xr_debug.d.ts +181 -77
  46. package/types/xr_lib/xr_dialog.d.ts +132 -40
  47. package/types/xr_lib/xr_flags.d.ts +592 -148
  48. package/types/xr_lib/xr_fs.d.ts +539 -148
  49. package/types/xr_lib/xr_game.d.ts +362 -158
  50. package/types/xr_lib/xr_hit.d.ts +125 -41
  51. package/types/xr_lib/xr_ini.d.ts +473 -188
  52. package/types/xr_lib/xr_level.d.ts +795 -225
  53. package/types/xr_lib/xr_luabind.d.ts +90 -59
  54. package/types/xr_lib/xr_map.d.ts +192 -61
  55. package/types/xr_lib/xr_math.d.ts +871 -233
  56. package/types/xr_lib/xr_multiplayer.d.ts +1079 -351
  57. package/types/xr_lib/xr_profile.d.ts +272 -160
  58. package/types/xr_lib/xr_properties.d.ts +610 -166
  59. package/types/xr_lib/xr_relation.d.ts +231 -84
  60. package/types/xr_lib/xr_render.d.ts +167 -69
  61. package/types/xr_lib/xr_save.d.ts +833 -223
  62. package/types/xr_lib/xr_sound.d.ts +515 -151
  63. package/types/xr_lib/xr_stats.ts +49 -20
  64. package/types/xr_lib/xr_task.d.ts +388 -111
  65. package/types/xr_lib/xr_time.d.ts +177 -61
  66. package/types/xr_lib/xr_type.d.ts +75 -75
  67. package/types/xr_object/client/xr_anomaly.d.ts +70 -50
  68. package/types/xr_object/client/xr_artefact.d.ts +153 -98
  69. package/types/xr_object/client/xr_client_object.d.ts +207 -76
  70. package/types/xr_object/client/xr_creature.d.ts +243 -164
  71. package/types/xr_object/client/xr_item.d.ts +370 -264
  72. package/types/xr_object/client/xr_level.d.ts +753 -285
  73. package/types/xr_object/client/xr_physic.d.ts +644 -214
  74. package/types/xr_object/client/xr_zone.d.ts +85 -47
  75. package/types/xr_object/script/xr_script_interface.d.ts +819 -584
  76. package/types/xr_object/script/xr_script_object.d.ts +5728 -1390
  77. package/types/xr_object/script/xr_script_trade.d.ts +51 -26
  78. package/types/xr_object/server/xr_server_object.d.ts +1486 -792
  79. package/types/xr_ui/xr_ui_asset.d.ts +364 -123
  80. package/types/xr_ui/xr_ui_core.d.ts +424 -97
  81. package/types/xr_ui/xr_ui_event.d.ts +1449 -381
  82. package/types/xr_ui/xr_ui_interface.d.ts +2447 -903
  83. package/types/xr_ui/xr_ui_menu.d.ts +385 -142
  84. package/types/xrf_plugin.d.ts +89 -51
@@ -1,510 +1,1802 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class MonsterSpace
4
- * @customConstructor MonsterSpace
5
- * @group xr_action
6
- */
7
- export class MonsterSpace {
8
- public static readonly head_anim_angry: 1;
9
- public static readonly head_anim_glad: 2;
10
- public static readonly head_anim_kind: 3;
11
- public static readonly head_anim_normal: 0;
12
- public static readonly sound_script: 128;
13
- }
14
-
15
- /**
16
- * @group xr_action
17
- */
18
- export type TXR_MonsterBodyStateKey = EnumeratedStaticsKeys<typeof MonsterSpace>;
19
-
20
- /**
21
- * @group xr_action
22
- */
23
- export type TXR_MonsterBodyState = EnumeratedStaticsValues<typeof MonsterSpace>;
24
-
25
- /**
26
- * @source C++ class entity_action
27
- * @customConstructor entity_action
28
- * @group xr_action
29
- */
30
- export class entity_action extends EngineBinding {
31
- public constructor();
32
- public constructor(action: entity_action);
33
-
34
- public set_action(move: move): void;
35
-
36
- public set_action(look: look): void;
37
-
38
- public set_action(anim: anim): void;
39
-
40
- public set_action(sound: sound): void;
41
-
42
- public set_action(particle: particle): void;
43
-
44
- public set_action(objec: XR_object): void;
45
-
46
- public set_action(cond: cond): void;
47
-
48
- public move(): boolean;
49
-
50
- public particle(): boolean;
51
-
52
- public completed(): boolean;
53
-
54
- public object(): boolean;
55
-
56
- public all(): boolean;
57
-
58
- public time(): boolean;
59
-
60
- public look(): boolean;
61
-
62
- public sound(): boolean;
63
-
64
- public anim(): boolean;
65
- }
66
-
67
- /**
68
- * @group xr_action
69
- */
70
- export type TXR_entity_action = move | look | anim | sound | particle | XR_object | cond;
71
-
72
- /**
73
- * @source C++ class object
74
- * @customConstructor object
75
- * @group xr_action
76
- */
77
- export class XR_object extends EngineBinding {
78
- public static readonly activate: 16;
79
- public static readonly aim1: 4;
80
- public static readonly aim2: 5;
81
- public static readonly deactivate: 17;
82
- public static readonly drop: 11;
83
- public static readonly dummy: -1;
84
- public static readonly fire1: 6;
85
- public static readonly fire2: 8;
86
- public static readonly hide: 22;
87
- public static readonly idle: 9;
88
- public static readonly reload: 2;
89
- public static readonly reload1: 2;
90
- public static readonly reload2: 3;
91
- public static readonly show: 21;
92
- public static readonly strap: 10;
93
- public static readonly switch1: 0;
94
- public static readonly switch2: 1;
95
- public static readonly take: 23;
96
- public static readonly turn_off: 20;
97
- public static readonly turn_on: 19;
98
- public static readonly use: 18;
99
-
100
- public constructor(value: string);
101
- public constructor(value: string, type: number /* MonsterSpace::EObjectAction */);
102
- public constructor(game_object: game_object);
103
-
104
- public action(space: unknown /** enum MonsterSpace::EObjectAction */): void;
105
-
106
- public completed(): boolean;
107
- }
108
-
109
- /**
110
- * @group xr_action
111
- */
112
- export type TXR_object_action = EnumeratedStaticsValues<typeof XR_object>;
113
-
114
- /**
115
- * Note: typescript workaround since global type `object` is reserved.
116
- *
117
- * @group xr_global_declaration
118
- */
119
- export const object: typeof XR_object;
120
-
121
- /**
122
- * @source C++ class move
123
- * @customConstructor move
124
- * @group xr_action
125
- */
126
- export class move extends EngineBinding {
127
- // todo: All enums are in one static, probably should declare few parent interfaces / classes with enums
128
- public static readonly crouch: 0;
129
-
130
- public static readonly back: 4;
131
- public static readonly criteria: 2;
132
-
133
- public static readonly curve: 0;
134
- public static readonly curve_criteria: 2;
135
-
136
- public static readonly default: 0;
137
- public static readonly dodge: 1;
138
- public static readonly down: 64;
139
- public static readonly drag: 3;
140
- public static readonly force: 1;
141
- public static readonly fwd: 2;
142
- public static readonly handbrake: 128;
143
- public static readonly jump: 4;
144
- public static readonly left: 8;
145
-
146
- public static readonly line: 0;
147
- public static readonly none: 1;
148
- public static readonly off: 512;
149
- public static readonly on: 256;
150
- public static readonly right: 16;
151
-
152
- /**
153
- * Fast run movement type, not sprint but generic fast movement.
154
- */
155
- public static readonly run: 1;
156
- public static readonly run_fwd: 2;
157
- public static readonly run_with_leader: 7;
158
- public static readonly stand: 2;
159
- public static readonly standing: 1;
160
- public static readonly steal: 5;
161
- public static readonly up: 32;
162
- /**
163
- * Normal walk movement type, generic movement type used in most cases.
164
- */
165
- public static readonly walk: 0;
166
-
167
- public static readonly walk_fwd: 0;
168
- public static readonly walk_bkwd: 1;
169
- public static readonly walk_with_leader: 6;
170
-
171
- 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);
175
- public constructor(
176
- bodyState: number,
177
- movementType: TXR_move,
178
- pathType: unknown,
179
- game_object: game_object,
180
- value: f32
181
- );
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);
186
- public constructor(vector: vector, value: number);
187
- public constructor(moveAction: TXR_move, vector: vector);
188
- public constructor(moveAction: TXR_move, patrol: patrol);
189
- public constructor(moveAction: TXR_move, game_object: game_object);
190
- public constructor(moveAction: TXR_move, vector: vector, value: number);
191
- public constructor(moveAction: TXR_move, value: number, vector: vector);
192
- public constructor(moveAction: TXR_move, value: number, vector: vector, value2: number);
193
- public constructor(moveAction: TXR_move, patrol: patrol, value: number);
194
- public constructor(moveAction: TXR_move, game_object: game_object, value: f32);
195
- public constructor(moveAction: TXR_move, vector: vector, value: f32, speedParam: number);
196
- 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
-
199
- public completed(): boolean;
200
-
201
- public path(EDetailPathType: number): void;
202
-
203
- public move(EMovementType: number): void;
204
-
205
- public position(vector: vector): void;
206
-
207
- public input(EInputKeys: number): void;
208
-
209
- public patrol(patrolPath: unknown, shared_str: string): void;
210
-
211
- public object(game_object: game_object): void;
212
-
213
- public body(EBodyState: number): void;
214
- }
215
-
216
- /**
217
- * @group xr_action
218
- */
219
- export type TXR_move = EnumeratedStaticsValues<typeof move>;
220
-
221
- /**
222
- * @source C++ class patrol
223
- * @customConstructor patrol
224
- * @group xr_action
225
- */
226
- export class patrol extends EngineBinding {
227
- // EPatrolRouteType:
228
- public static readonly stop: 0;
229
- // public static readonly stop: 1;
230
-
231
- // EPatrolStartType:
232
- public static readonly start: 0;
233
- public static readonly continue: 1;
234
- public static readonly nearest: 2;
235
- public static readonly custom: 3;
236
- public static readonly next: 4;
237
- public static readonly dummy: -1;
238
-
239
- public constructor(
240
- name?: string,
241
- startType?: TXR_patrol_type,
242
- routeType?: TXR_patrol_type,
243
- bool?: boolean,
244
- int?: u32
245
- );
246
-
247
- public count(): u32;
248
- public flag(value1: u32, value2: u8): boolean;
249
- public flag(value1: u32, value2: string): boolean;
250
- public flags(point_index: u32): flags32;
251
- public game_vertex_id(value: u32): u16;
252
- public get_nearest(vector: vector): u32;
253
- public index(value: string): u32;
254
- public level_vertex_id(value: u32): u32;
255
- public name(point_index: u32): string;
256
- public point(index: u32): vector;
257
- public terminal(point_index: u32): boolean;
258
- }
259
-
260
- /**
261
- * @group xr_action
262
- */
263
- export type TXR_patrol_type = EnumeratedStaticsValues<typeof patrol>;
264
-
265
- /**
266
- * @source C++ class CSightParams
267
- * @customConstructor XR_CSightParams
268
- * @group xr_action
269
- */
270
- export class CSightParams {
271
- public static readonly eSightTypeDummy: -1;
272
- public static readonly eSightTypeCurrentDirection: 0;
273
- public static readonly eSightTypePathDirection: 1;
274
- public static readonly eSightTypeDirection: 2;
275
- public static readonly eSightTypePosition: 3;
276
- public static readonly eSightTypeObject: 4;
277
- public static readonly eSightTypeCover: 5;
278
- public static readonly eSightTypeSearch: 6;
279
- public static readonly eSightTypeLookOver: 7;
280
- public static readonly eSightTypeCoverLookOver: 8;
281
- public static readonly eSightTypeFireObject: 9;
282
- public static readonly eSightTypeFirePosition: 10;
283
- public static readonly eSightTypeAnimationDirection: 11;
284
-
285
- public readonly m_object: game_object;
286
- public readonly m_sight_type: TXR_SightType;
287
- public readonly m_vector: vector;
288
-
289
- public constructor();
290
- }
291
-
292
- /**
293
- * @group xr_action
294
- */
295
- export type TXR_SightType = EnumeratedStaticsValues<typeof CSightParams>;
296
-
297
- /**
298
- * @source C++ class look
299
- * @customConstructor look
300
- * @group xr_action
301
- */
302
- export class look extends EngineBinding {
303
- public static readonly cur_dir: 0;
304
- public static readonly danger: 5;
305
- public static readonly direction: 2;
306
- public static readonly fire_point: 10;
307
- public static readonly path_dir: 1;
308
- public static readonly point: 3;
309
- public static readonly search: 6;
310
-
311
- public constructor();
312
- public constructor(sight_type: TXR_SightType);
313
- public constructor(sight_type: TXR_SightType, vector: vector);
314
- public constructor(sight_type: TXR_SightType, game_object: game_object);
315
- public constructor(sight_type: TXR_SightType, game_object: game_object, value: string);
316
- public constructor(vector: vector, value1: f32, value2: f32);
317
- public constructor(game_object: game_object, value1: f32, value2: f32);
318
-
319
- public completed(): boolean;
320
- public type(sight_type: TXR_SightType): void;
321
- public object(game_object: game_object): void;
322
- public bone(bode_id: string): void;
323
- public direct(vector: Readonly<vector>): void;
324
- }
325
-
326
- /**
327
- * @group xr_action
328
- */
329
- export type TXR_look = EnumeratedStaticsValues<typeof look>;
330
-
331
- /**
332
- * @source C++ class anim
333
- * @customConstructor anim
334
- * @group xr_action
335
- */
336
- export class anim extends EngineBinding {
337
- // Mental state:
338
- public static readonly danger: 0;
339
- public static readonly free: 1;
340
- public static readonly panic: 2;
341
-
342
- // Animation state:
343
- public static readonly stand_idle: 0;
344
- public static readonly capture_prepare: 1;
345
- public static readonly sit_idle: 2;
346
- public static readonly lie_idle: 3;
347
- public static readonly eat: 4;
348
- public static readonly sleep: 5;
349
- public static readonly rest: 6;
350
- public static readonly attack: 7;
351
- public static readonly look_around: 8;
352
- public static readonly turn: 9;
353
-
354
- public constructor();
355
- public constructor(value: string);
356
- public constructor(value1: string, value2: boolean);
357
- public constructor(state: number /* enum MonsterSpace::EMentalState */);
358
- public constructor(state: number /* enum MonsterSpace::EMentalState */, value: i32);
359
-
360
- public completed(): boolean;
361
- public type(state: number /* enum MonsterSpace::EMentalState */): void;
362
- public anim(value: string): void;
363
- }
364
-
365
- /**
366
- * @group xr_action
367
- */
368
- export type TXR_animation_key = EnumeratedStaticsKeys<typeof anim>;
369
-
370
- /**
371
- * @group xr_action
372
- */
373
- export type TXR_animation = EnumeratedStaticsValues<typeof anim>;
374
-
375
- /**
376
- * @source C++ class sound
377
- * @customConstructor sound
378
- * @group xr_action
379
- */
380
- export class sound extends EngineBinding {
381
- public static readonly attack: 3;
382
- public static readonly attack_hit: 4;
383
- public static readonly die: 7;
384
- public static readonly eat: 2;
385
- public static readonly idle: 1;
386
- public static readonly panic: 11;
387
- public static readonly steal: 10;
388
- public static readonly take_damage: 5;
389
- public static readonly threaten: 9;
390
-
391
- public constructor();
392
- public constructor(value1: string, value2: string);
393
- public constructor(value1: string, value2: string, vector: vector);
394
- public constructor(value1: string, value2: string, vector: vector, vector2: vector);
395
- public constructor(value1: string, value2: string, vector: vector, vector2: vector, value3: boolean);
396
- public constructor(value1: string, vector: vector);
397
- public constructor(value1: string, vector: vector, vector2: vector);
398
- public constructor(value1: string, vector: vector, vector2: vector, value3: boolean);
399
- public constructor(sound_object: sound_object, value1: string, vector: vector);
400
- public constructor(sound_object: sound_object, value1: string, vector: vector, vector2: vector);
401
- public constructor(sound_object: sound_object, value1: string, vector: vector, vector2: vector, value: boolean);
402
- public constructor(sound_object: sound_object, vector1: vector);
403
- public constructor(sound_object: sound_object, vector1: vector, vector2: vector);
404
- 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);
407
- public constructor(value1: string, value2: string, type: unknown /* enum MonsterSpace::EMonsterHeadAnimType */);
408
-
409
- public set_sound(value: string): void;
410
-
411
- public set_sound(sound_object: sound_object): void;
412
-
413
- public set_position(vector: vector): void;
414
-
415
- public set_bone(value: string): void;
416
-
417
- public set_angles(vector: vector): void;
418
-
419
- public set_sound_type(type: unknown /* ESoundTypes */): void;
420
-
421
- public completed(): boolean;
422
- }
423
-
424
- /**
425
- * @group xr_action
426
- */
427
- export type TXR_sound_key = EnumeratedStaticsKeys<typeof sound>;
428
-
429
- /**
430
- * @group xr_action
431
- */
432
- export type TXR_sound_type = EnumeratedStaticsValues<typeof sound>;
433
-
434
- /**
435
- * @source C++ class cond
436
- * @customConstructor cond
437
- * @group xr_action
438
- */
439
- export class cond extends EngineBinding {
440
- public static readonly move_end: 1;
441
- public static readonly look_end: 2;
442
- public static readonly anim_end: 4;
443
- public static readonly sound_end: 8;
444
- public static readonly object_end: 32;
445
- public static readonly time_end: 64;
446
- public static readonly act_end: 128;
447
-
448
- public constructor();
449
- public constructor(value: u32);
450
- public constructor(value1: u32, value2: f64);
451
- }
452
-
453
- /**
454
- * @group xr_action
455
- */
456
- export type TXR_cond = EnumeratedStaticsValues<typeof cond>;
457
-
458
- /**
459
- * @source C++ class act
460
- * @customConstructor act
461
- * @group xr_action
462
- */
463
- export class act {
464
- public static readonly attack: 2;
465
- public static readonly eat: 1;
466
- public static readonly panic: 3;
467
- public static readonly rest: 0;
468
-
469
- public constructor();
470
- public constructor(EScriptMonsterGlobalAction: number);
471
- public constructor(EScriptMonsterGlobalAction: number, game_object: game_object);
472
- }
473
-
474
- /**
475
- * @source C++ class particle_params
476
- * @customConstructor particle_params
477
- * @group xr_action
478
- */
479
- export class particle_params {
480
- public constructor();
481
- public constructor(first?: vector, second?: vector, third?: vector);
482
- }
483
-
484
- /**
485
- * @source C++ class particle
486
- * @customConstructor particle
487
- * @group xr_action
488
- */
489
- export class particle extends EngineBinding {
490
- public constructor(particle_to_run: string, particle_params?: particle_params, auto_remove?: boolean);
491
- public constructor(
492
- particle_to_run: string,
493
- bone_name: string,
494
- particle_params: particle_params,
495
- auto_remove: boolean
496
- );
497
-
498
- public completed(): boolean;
499
-
500
- public set_angles(vector: vector): void;
501
-
502
- public set_bone(bone_id: string): void;
503
-
504
- public set_particle(value1: string, value2: boolean): void;
505
-
506
- public set_position(vector: vector): void;
507
-
508
- public set_velocity(vector: vector): void;
509
- }
510
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * Monster movement, animation, and sound constants.
4
+ *
5
+ * @source C++ class MonsterSpace
6
+ * @customConstructor MonsterSpace
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.
12
+ */
13
+ export class MonsterSpace {
14
+ /**
15
+ * Engine enum value for `MonsterSpace.head_anim_angry`.
16
+ */
17
+ public static readonly head_anim_angry: 1;
18
+ /**
19
+ * Engine enum value for `MonsterSpace.head_anim_glad`.
20
+ */
21
+ public static readonly head_anim_glad: 2;
22
+ /**
23
+ * Engine enum value for `MonsterSpace.head_anim_kind`.
24
+ */
25
+ public static readonly head_anim_kind: 3;
26
+ /**
27
+ * Engine enum value for `MonsterSpace.head_anim_normal`.
28
+ */
29
+ public static readonly head_anim_normal: 0;
30
+ /**
31
+ * Engine enum value for `MonsterSpace.sound_script`.
32
+ */
33
+ public static readonly sound_script: 128;
34
+ }
35
+
36
+ /**
37
+ * @group xr_action
38
+ */
39
+ export type TXR_MonsterBodyStateKey = EnumeratedStaticsKeys<typeof MonsterSpace>;
40
+
41
+ /**
42
+ * @group xr_action
43
+ */
44
+ export type TXR_MonsterBodyState = EnumeratedStaticsValues<typeof MonsterSpace>;
45
+
46
+ /**
47
+ * Composite action passed to scripted entities.
48
+ *
49
+ * @source C++ class entity_action
50
+ * @customConstructor entity_action
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()`.
57
+ */
58
+ export class entity_action extends EngineBinding {
59
+ /**
60
+ * Create an empty entity action.
61
+ */
62
+ public constructor();
63
+
64
+ /**
65
+ * Copy an existing entity action.
66
+ *
67
+ * @param action - Action to copy.
68
+ */
69
+ public constructor(action: entity_action);
70
+
71
+ /**
72
+ * Set the movement part of this action.
73
+ *
74
+ * @param move - Movement action.
75
+ */
76
+ public set_action(move: move): void;
77
+
78
+ /**
79
+ * Set the look part of this action.
80
+ *
81
+ * @param look - Look action.
82
+ */
83
+ public set_action(look: look): void;
84
+
85
+ /**
86
+ * Set the animation part of this action.
87
+ *
88
+ * @param anim - Animation action.
89
+ */
90
+ public set_action(anim: anim): void;
91
+
92
+ /**
93
+ * Set the sound part of this action.
94
+ *
95
+ * @param sound - Sound action.
96
+ */
97
+ public set_action(sound: sound): void;
98
+
99
+ /**
100
+ * Set the particle part of this action.
101
+ *
102
+ * @param particle - Particle action.
103
+ */
104
+ public set_action(particle: particle): void;
105
+
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;
112
+
113
+ /**
114
+ * Set the completion condition for this action.
115
+ *
116
+ * @param cond - Completion condition.
117
+ */
118
+ public set_action(cond: cond): void;
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
+ */
135
+ public move(): boolean;
136
+
137
+ /**
138
+ * Check whether the particle part is complete.
139
+ *
140
+ * @returns Whether particle playback is complete.
141
+ */
142
+ public particle(): boolean;
143
+
144
+ /**
145
+ * Check whether the whole action is complete.
146
+ *
147
+ * @returns Whether all required parts are complete.
148
+ */
149
+ public completed(): boolean;
150
+
151
+ /**
152
+ * Check whether the object interaction part is complete.
153
+ *
154
+ * @returns Whether object interaction is complete.
155
+ */
156
+ public object(): boolean;
157
+
158
+ /**
159
+ * Check whether all action parts are complete.
160
+ *
161
+ * @returns Whether the action is complete.
162
+ */
163
+ public all(): boolean;
164
+
165
+ /**
166
+ * Check whether the action time condition has elapsed.
167
+ *
168
+ * @returns Whether the time condition is complete.
169
+ */
170
+ public time(): boolean;
171
+
172
+ /**
173
+ * Check whether the look part is complete.
174
+ *
175
+ * @returns Whether look handling is complete.
176
+ */
177
+ public look(): boolean;
178
+
179
+ /**
180
+ * Check whether the sound part is complete.
181
+ *
182
+ * @returns Whether sound playback is complete.
183
+ */
184
+ public sound(): boolean;
185
+
186
+ /**
187
+ * Check whether the animation part is complete.
188
+ *
189
+ * @returns Whether animation is complete.
190
+ */
191
+ public anim(): boolean;
192
+ }
193
+
194
+ /**
195
+ * @group xr_action
196
+ */
197
+ export type TXR_entity_action = move | look | anim | sound | particle | XR_object | cond | act;
198
+
199
+ /**
200
+ * Object interaction action.
201
+ *
202
+ * @source C++ class object
203
+ * @customConstructor object
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.
209
+ */
210
+ export class XR_object extends EngineBinding {
211
+ /**
212
+ * Engine enum value for `XR_object.activate`.
213
+ */
214
+ public static readonly activate: 16;
215
+ /**
216
+ * Engine enum value for `XR_object.aim1`.
217
+ */
218
+ public static readonly aim1: 4;
219
+ /**
220
+ * Engine enum value for `XR_object.aim2`.
221
+ */
222
+ public static readonly aim2: 5;
223
+ /**
224
+ * Engine enum value for `XR_object.deactivate`.
225
+ */
226
+ public static readonly deactivate: 17;
227
+ /**
228
+ * Engine enum value for `XR_object.drop`.
229
+ */
230
+ public static readonly drop: 11;
231
+ /**
232
+ * Engine enum value for `XR_object.dummy`.
233
+ */
234
+ public static readonly dummy: -1;
235
+ /**
236
+ * Engine enum value for `XR_object.fire1`.
237
+ */
238
+ public static readonly fire1: 6;
239
+ /**
240
+ * Engine enum value for `XR_object.fire2`.
241
+ */
242
+ public static readonly fire2: 8;
243
+ /**
244
+ * Engine enum value for `XR_object.hide`.
245
+ */
246
+ public static readonly hide: 22;
247
+ /**
248
+ * Engine enum value for `XR_object.idle`.
249
+ */
250
+ public static readonly idle: 9;
251
+ /**
252
+ * Engine enum value for `XR_object.reload`.
253
+ */
254
+ public static readonly reload: 2;
255
+ /**
256
+ * Engine enum value for `XR_object.reload1`.
257
+ */
258
+ public static readonly reload1: 2;
259
+ /**
260
+ * Engine enum value for `XR_object.reload2`.
261
+ */
262
+ public static readonly reload2: 3;
263
+ /**
264
+ * Engine enum value for `XR_object.show`.
265
+ */
266
+ public static readonly show: 21;
267
+ /**
268
+ * Engine enum value for `XR_object.strap`.
269
+ */
270
+ public static readonly strap: 10;
271
+ /**
272
+ * Engine enum value for `XR_object.switch1`.
273
+ */
274
+ public static readonly switch1: 0;
275
+ /**
276
+ * Engine enum value for `XR_object.switch2`.
277
+ */
278
+ public static readonly switch2: 1;
279
+ /**
280
+ * Engine enum value for `XR_object.take`.
281
+ */
282
+ public static readonly take: 23;
283
+ /**
284
+ * Engine enum value for `XR_object.turn_off`.
285
+ */
286
+ public static readonly turn_off: 20;
287
+ /**
288
+ * Engine enum value for `XR_object.turn_on`.
289
+ */
290
+ public static readonly turn_on: 19;
291
+ /**
292
+ * Engine enum value for `XR_object.use`.
293
+ */
294
+ public static readonly use: 18;
295
+
296
+ /**
297
+ * Create an empty object action.
298
+ */
299
+ public constructor();
300
+
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);
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
+ */
359
+ public completed(): boolean;
360
+ }
361
+
362
+ /**
363
+ * @group xr_action
364
+ */
365
+ export type TXR_object_action = EnumeratedStaticsValues<typeof XR_object>;
366
+
367
+ /**
368
+ * Note: typescript workaround since global type `object` is reserved.
369
+ *
370
+ * @group xr_global_declaration
371
+ */
372
+ export const object: typeof XR_object;
373
+
374
+ /**
375
+ * Movement action for stalkers, monsters, and vehicles.
376
+ *
377
+ * @source C++ class move
378
+ * @customConstructor move
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`.
384
+ */
385
+ export class move extends EngineBinding {
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
+ */
390
+ public static readonly crouch: 0;
391
+
392
+ /**
393
+ * Engine enum value for `move.back`.
394
+ */
395
+ public static readonly back: 4;
396
+ /**
397
+ * Engine enum value for `move.criteria`.
398
+ */
399
+ public static readonly criteria: 2;
400
+
401
+ /**
402
+ * Engine enum value for `move.curve`.
403
+ */
404
+ public static readonly curve: 0;
405
+ /**
406
+ * Engine enum value for `move.curve_criteria`.
407
+ */
408
+ public static readonly curve_criteria: 2;
409
+
410
+ /**
411
+ * Engine enum value for `move.default`.
412
+ */
413
+ public static readonly default: 0;
414
+ /**
415
+ * Engine enum value for `move.dodge`.
416
+ */
417
+ public static readonly dodge: 1;
418
+ /**
419
+ * Engine enum value for `move.down`.
420
+ */
421
+ public static readonly down: 64;
422
+ /**
423
+ * Engine enum value for `move.drag`.
424
+ */
425
+ public static readonly drag: 3;
426
+ /**
427
+ * Engine enum value for `move.force`.
428
+ */
429
+ public static readonly force: 1;
430
+ /**
431
+ * Engine enum value for `move.fwd`.
432
+ */
433
+ public static readonly fwd: 2;
434
+ /**
435
+ * Engine enum value for `move.handbrake`.
436
+ */
437
+ public static readonly handbrake: 128;
438
+ /**
439
+ * Engine enum value for `move.jump`.
440
+ */
441
+ public static readonly jump: 4;
442
+ /**
443
+ * Engine enum value for `move.left`.
444
+ */
445
+ public static readonly left: 8;
446
+
447
+ /**
448
+ * Engine enum value for `move.line`.
449
+ */
450
+ public static readonly line: 0;
451
+ /**
452
+ * Engine enum value for `move.none`.
453
+ */
454
+ public static readonly none: 1;
455
+ /**
456
+ * Engine enum value for `move.off`.
457
+ */
458
+ public static readonly off: 512;
459
+ /**
460
+ * Engine enum value for `move.on`.
461
+ */
462
+ public static readonly on: 256;
463
+ /**
464
+ * Engine enum value for `move.right`.
465
+ */
466
+ public static readonly right: 16;
467
+
468
+ /**
469
+ * Fast run movement type, not sprint but generic fast movement.
470
+ */
471
+ public static readonly run: 1;
472
+ /**
473
+ * Engine enum value for `move.run_fwd`.
474
+ */
475
+ public static readonly run_fwd: 2;
476
+ /**
477
+ * Engine enum value for `move.run_with_leader`.
478
+ */
479
+ public static readonly run_with_leader: 7;
480
+ /**
481
+ * Engine enum value for `move.stand`.
482
+ */
483
+ public static readonly stand: 2;
484
+ /**
485
+ * Engine enum value for `move.standing`.
486
+ */
487
+ public static readonly standing: 1;
488
+ /**
489
+ * Engine enum value for `move.steal`.
490
+ */
491
+ public static readonly steal: 5;
492
+ /**
493
+ * Engine enum value for `move.up`.
494
+ */
495
+ public static readonly up: 32;
496
+ /**
497
+ * Normal walk movement type, generic movement type used in most cases.
498
+ */
499
+ public static readonly walk: 0;
500
+
501
+ /**
502
+ * Engine enum value for `move.walk_fwd`.
503
+ */
504
+ public static readonly walk_fwd: 0;
505
+ /**
506
+ * Engine enum value for `move.walk_bkwd`.
507
+ */
508
+ public static readonly walk_bkwd: 1;
509
+ /**
510
+ * Engine enum value for `move.walk_with_leader`.
511
+ */
512
+ public static readonly walk_with_leader: 6;
513
+
514
+ /**
515
+ * Create an empty movement action.
516
+ */
517
+ public constructor();
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
+ */
559
+ public constructor(
560
+ bodyState: number,
561
+ movementType: TXR_move,
562
+ pathType: number,
563
+ game_object: game_object,
564
+ value: f32
565
+ );
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
735
+ public constructor(moveAction: TXR_move, patrol: patrol, value: f32, speedParam: number);
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
+ */
753
+ public completed(): boolean;
754
+
755
+ /**
756
+ * Set detail path type.
757
+ *
758
+ * @param pathType - Detail path type id.
759
+ */
760
+ public path(pathType: number): void;
761
+
762
+ /**
763
+ * Set movement type.
764
+ *
765
+ * @param movementType - Movement type id.
766
+ */
767
+ public move(movementType: number): void;
768
+
769
+ /**
770
+ * Set target position.
771
+ *
772
+ * @param vector - Target position.
773
+ */
774
+ public position(vector: vector): void;
775
+
776
+ /**
777
+ * Set input key action.
778
+ *
779
+ * @param inputKey - Input key id.
780
+ */
781
+ public input(inputKey: number): void;
782
+
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;
790
+
791
+ /**
792
+ * Set target object.
793
+ *
794
+ * @param game_object - Target object.
795
+ */
796
+ public object(game_object: game_object): void;
797
+
798
+ /**
799
+ * Set body state.
800
+ *
801
+ * @param bodyState - Body state id.
802
+ */
803
+ public body(bodyState: number): void;
804
+ }
805
+
806
+ /**
807
+ * @group xr_action
808
+ */
809
+ export type TXR_move = EnumeratedStaticsValues<typeof move>;
810
+
811
+ /**
812
+ * Patrol path parameters used by movement actions.
813
+ *
814
+ * @source C++ class patrol
815
+ * @customConstructor patrol
816
+ * @group xr_action
817
+ */
818
+ export class patrol extends EngineBinding {
819
+ /**
820
+ * Engine enum value for `patrol.stop`.
821
+ */
822
+ public static readonly stop: 0;
823
+ // Public static readonly stop: 1;
824
+
825
+ /**
826
+ * Engine enum value for `patrol.start`.
827
+ */
828
+ public static readonly start: 0;
829
+ /**
830
+ * Engine enum value for `patrol.continue`.
831
+ */
832
+ public static readonly continue: 1;
833
+ /**
834
+ * Engine enum value for `patrol.nearest`.
835
+ */
836
+ public static readonly nearest: 2;
837
+ /**
838
+ * Engine enum value for `patrol.custom`.
839
+ */
840
+ public static readonly custom: 3;
841
+ /**
842
+ * Engine enum value for `patrol.next`.
843
+ */
844
+ public static readonly next: 4;
845
+ /**
846
+ * Engine enum value for `patrol.dummy`.
847
+ */
848
+ public static readonly dummy: -1;
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
+ */
859
+ public constructor(
860
+ name?: string,
861
+ startType?: TXR_patrol_type,
862
+ routeType?: TXR_patrol_type,
863
+ bool?: boolean,
864
+ int?: u32
865
+ );
866
+
867
+ /**
868
+ * @returns Number of points in the patrol path.
869
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
952
+ public terminal(point_index: u32): boolean;
953
+ }
954
+
955
+ /**
956
+ * @group xr_action
957
+ */
958
+ export type TXR_patrol_type = EnumeratedStaticsValues<typeof patrol>;
959
+
960
+ /**
961
+ * Sight target snapshot.
962
+ *
963
+ * @source C++ class CSightParams
964
+ * @customConstructor XR_CSightParams
965
+ * @group xr_action
966
+ */
967
+ export class CSightParams {
968
+ /**
969
+ * Engine enum value for `CSightParams.eSightTypeDummy`.
970
+ */
971
+ public static readonly eSightTypeDummy: -1;
972
+ /**
973
+ * Engine enum value for `CSightParams.eSightTypeCurrentDirection`.
974
+ */
975
+ public static readonly eSightTypeCurrentDirection: 0;
976
+ /**
977
+ * Engine enum value for `CSightParams.eSightTypePathDirection`.
978
+ */
979
+ public static readonly eSightTypePathDirection: 1;
980
+ /**
981
+ * Engine enum value for `CSightParams.eSightTypeDirection`.
982
+ */
983
+ public static readonly eSightTypeDirection: 2;
984
+ /**
985
+ * Engine enum value for `CSightParams.eSightTypePosition`.
986
+ */
987
+ public static readonly eSightTypePosition: 3;
988
+ /**
989
+ * Engine enum value for `CSightParams.eSightTypeObject`.
990
+ */
991
+ public static readonly eSightTypeObject: 4;
992
+ /**
993
+ * Engine enum value for `CSightParams.eSightTypeCover`.
994
+ */
995
+ public static readonly eSightTypeCover: 5;
996
+ /**
997
+ * Engine enum value for `CSightParams.eSightTypeSearch`.
998
+ */
999
+ public static readonly eSightTypeSearch: 6;
1000
+ /**
1001
+ * Engine enum value for `CSightParams.eSightTypeLookOver`.
1002
+ */
1003
+ public static readonly eSightTypeLookOver: 7;
1004
+ /**
1005
+ * Engine enum value for `CSightParams.eSightTypeCoverLookOver`.
1006
+ */
1007
+ public static readonly eSightTypeCoverLookOver: 8;
1008
+ /**
1009
+ * Engine enum value for `CSightParams.eSightTypeFireObject`.
1010
+ */
1011
+ public static readonly eSightTypeFireObject: 9;
1012
+ /**
1013
+ * Engine enum value for `CSightParams.eSightTypeFirePosition`.
1014
+ */
1015
+ public static readonly eSightTypeFirePosition: 10;
1016
+ /**
1017
+ * Engine enum value for `CSightParams.eSightTypeAnimationDirection`.
1018
+ */
1019
+ public static readonly eSightTypeAnimationDirection: 11;
1020
+
1021
+ /**
1022
+ * Object target for object-based sight modes.
1023
+ */
1024
+ public readonly m_object: game_object;
1025
+
1026
+ /**
1027
+ * Active sight mode.
1028
+ */
1029
+ public readonly m_sight_type: TXR_SightType;
1030
+
1031
+ /**
1032
+ * Position or direction target for vector-based sight modes.
1033
+ */
1034
+ public readonly m_vector: vector;
1035
+
1036
+ /**
1037
+ * Create default sight parameters.
1038
+ */
1039
+ public constructor();
1040
+ }
1041
+
1042
+ /**
1043
+ * @group xr_action
1044
+ */
1045
+ export type TXR_SightType = EnumeratedStaticsValues<typeof CSightParams>;
1046
+
1047
+ /**
1048
+ * Look action for setting where an object should watch.
1049
+ *
1050
+ * @source C++ class look
1051
+ * @customConstructor look
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.
1057
+ */
1058
+ export class look extends EngineBinding {
1059
+ /**
1060
+ * Engine enum value for `look.cur_dir`.
1061
+ */
1062
+ public static readonly cur_dir: 0;
1063
+ /**
1064
+ * Engine enum value for `look.danger`.
1065
+ */
1066
+ public static readonly danger: 5;
1067
+ /**
1068
+ * Engine enum value for `look.direction`.
1069
+ */
1070
+ public static readonly direction: 2;
1071
+ /**
1072
+ * Engine enum value for `look.fire_point`.
1073
+ */
1074
+ public static readonly fire_point: 10;
1075
+ /**
1076
+ * Engine enum value for `look.path_dir`.
1077
+ */
1078
+ public static readonly path_dir: 1;
1079
+ /**
1080
+ * Engine enum value for `look.point`.
1081
+ */
1082
+ public static readonly point: 3;
1083
+ /**
1084
+ * Engine enum value for `look.search`.
1085
+ */
1086
+ public static readonly search: 6;
1087
+
1088
+ /**
1089
+ * Create an empty look action.
1090
+ */
1091
+ public constructor();
1092
+
1093
+ /**
1094
+ * Create a look action by sight type.
1095
+ *
1096
+ * @param sight_type - Sight type id.
1097
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
1141
+ public constructor(game_object: game_object, value1: f32, value2: f32);
1142
+
1143
+ /**
1144
+ * @returns Whether the look action is complete.
1145
+ */
1146
+ public completed(): boolean;
1147
+
1148
+ /**
1149
+ * Set sight type.
1150
+ *
1151
+ * @param sight_type - Sight type id.
1152
+ */
1153
+ public type(sight_type: TXR_SightType): void;
1154
+
1155
+ /**
1156
+ * Set watched object.
1157
+ *
1158
+ * @param game_object - Target object.
1159
+ */
1160
+ public object(game_object: game_object): 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
+ */
1174
+ public direct(vector: Readonly<vector>): void;
1175
+ }
1176
+
1177
+ /**
1178
+ * @group xr_action
1179
+ */
1180
+ export type TXR_look = EnumeratedStaticsValues<typeof look>;
1181
+
1182
+ /**
1183
+ * Animation action.
1184
+ *
1185
+ * @source C++ class anim
1186
+ * @customConstructor anim
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.
1192
+ */
1193
+ export class anim extends EngineBinding {
1194
+ // Mental state:
1195
+ /**
1196
+ * Engine enum value for `anim.danger`.
1197
+ */
1198
+ public static readonly danger: 0;
1199
+ /**
1200
+ * Engine enum value for `anim.free`.
1201
+ */
1202
+ public static readonly free: 1;
1203
+ /**
1204
+ * Engine enum value for `anim.panic`.
1205
+ */
1206
+ public static readonly panic: 2;
1207
+
1208
+ // Animation state:
1209
+ /**
1210
+ * Engine enum value for `anim.stand_idle`.
1211
+ */
1212
+ public static readonly stand_idle: 0;
1213
+ /**
1214
+ * Engine enum value for `anim.capture_prepare`.
1215
+ */
1216
+ public static readonly capture_prepare: 1;
1217
+ /**
1218
+ * Engine enum value for `anim.sit_idle`.
1219
+ */
1220
+ public static readonly sit_idle: 2;
1221
+ /**
1222
+ * Engine enum value for `anim.lie_idle`.
1223
+ */
1224
+ public static readonly lie_idle: 3;
1225
+ /**
1226
+ * Engine enum value for `anim.eat`.
1227
+ */
1228
+ public static readonly eat: 4;
1229
+ /**
1230
+ * Engine enum value for `anim.sleep`.
1231
+ */
1232
+ public static readonly sleep: 5;
1233
+ /**
1234
+ * Engine enum value for `anim.rest`.
1235
+ */
1236
+ public static readonly rest: 6;
1237
+ /**
1238
+ * Engine enum value for `anim.attack`.
1239
+ */
1240
+ public static readonly attack: 7;
1241
+ /**
1242
+ * Engine enum value for `anim.look_around`.
1243
+ */
1244
+ public static readonly look_around: 8;
1245
+ /**
1246
+ * Engine enum value for `anim.turn`.
1247
+ */
1248
+ public static readonly turn: 9;
1249
+
1250
+ /**
1251
+ * Create an empty animation action.
1252
+ */
1253
+ public constructor();
1254
+
1255
+ /**
1256
+ * Play an animation by name.
1257
+ *
1258
+ * @param value - Animation name.
1259
+ */
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
+ */
1268
+ public constructor(value1: string, value2: boolean);
1269
+
1270
+ /**
1271
+ * Set AI mental state.
1272
+ *
1273
+ * @param state - Mental state id.
1274
+ */
1275
+ public constructor(state: number); /* Enum MonsterSpace::EMentalState */
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
+ */
1291
+ public completed(): boolean;
1292
+
1293
+ /**
1294
+ * Set mental state.
1295
+ *
1296
+ * @param state - Mental state id.
1297
+ */
1298
+ public type(state: number /* Enum MonsterSpace::EMentalState */): void;
1299
+
1300
+ /**
1301
+ * Set animation name.
1302
+ *
1303
+ * @param value - Animation name.
1304
+ */
1305
+ public anim(value: string): void;
1306
+ }
1307
+
1308
+ /**
1309
+ * @group xr_action
1310
+ */
1311
+ export type TXR_animation_key = EnumeratedStaticsKeys<typeof anim>;
1312
+
1313
+ /**
1314
+ * @group xr_action
1315
+ */
1316
+ export type TXR_animation = EnumeratedStaticsValues<typeof anim>;
1317
+
1318
+ /**
1319
+ * Sound action for scripted AI behavior.
1320
+ *
1321
+ * @source C++ class sound
1322
+ * @customConstructor sound
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.
1328
+ */
1329
+ export class sound extends EngineBinding {
1330
+ /**
1331
+ * Engine enum value for `sound.attack`.
1332
+ */
1333
+ public static readonly attack: 3;
1334
+ /**
1335
+ * Engine enum value for `sound.attack_hit`.
1336
+ */
1337
+ public static readonly attack_hit: 4;
1338
+ /**
1339
+ * Engine enum value for `sound.die`.
1340
+ */
1341
+ public static readonly die: 7;
1342
+ /**
1343
+ * Engine enum value for `sound.eat`.
1344
+ */
1345
+ public static readonly eat: 2;
1346
+ /**
1347
+ * Engine enum value for `sound.idle`.
1348
+ */
1349
+ public static readonly idle: 1;
1350
+ /**
1351
+ * Engine enum value for `sound.panic`.
1352
+ */
1353
+ public static readonly panic: 11;
1354
+ /**
1355
+ * Engine enum value for `sound.steal`.
1356
+ */
1357
+ public static readonly steal: 10;
1358
+ /**
1359
+ * Engine enum value for `sound.take_damage`.
1360
+ */
1361
+ public static readonly take_damage: 5;
1362
+ /**
1363
+ * Engine enum value for `sound.threaten`.
1364
+ */
1365
+ public static readonly threaten: 9;
1366
+
1367
+ /**
1368
+ * Create an empty sound action.
1369
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
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
+ */
1492
+ public constructor(sound_object: sound_object, vector1: vector, vector2: vector, value: boolean);
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
+ */
1525
+ public constructor(value1: string, value2: string, type: unknown); /* Enum MonsterSpace::EMonsterHeadAnimType */
1526
+
1527
+ /**
1528
+ * Set sound by name.
1529
+ *
1530
+ * @param value - Sound name.
1531
+ */
1532
+ public set_sound(value: string): void;
1533
+
1534
+ /**
1535
+ * Set sound object.
1536
+ *
1537
+ * @param sound_object - Sound object.
1538
+ */
1539
+ public set_sound(sound_object: sound_object): void;
1540
+
1541
+ /**
1542
+ * Set sound position.
1543
+ *
1544
+ * @param vector - Position.
1545
+ */
1546
+ public set_position(vector: vector): void;
1547
+
1548
+ /**
1549
+ * Set sound bone.
1550
+ *
1551
+ * @param value - Bone name.
1552
+ */
1553
+ public set_bone(value: string): void;
1554
+
1555
+ /**
1556
+ * Set sound angles.
1557
+ *
1558
+ * @param vector - Angles.
1559
+ */
1560
+ public set_angles(vector: vector): void;
1561
+
1562
+ /**
1563
+ * Set sound type.
1564
+ *
1565
+ * @param type - Sound type id.
1566
+ */
1567
+ public set_sound_type(type: number /* ESoundTypes */): void;
1568
+
1569
+ /**
1570
+ * @returns Whether sound playback is complete.
1571
+ */
1572
+ public completed(): boolean;
1573
+ }
1574
+
1575
+ /**
1576
+ * @group xr_action
1577
+ */
1578
+ export type TXR_sound_key = EnumeratedStaticsKeys<typeof sound>;
1579
+
1580
+ /**
1581
+ * @group xr_action
1582
+ */
1583
+ export type TXR_sound_type = EnumeratedStaticsValues<typeof sound>;
1584
+
1585
+ /**
1586
+ * Completion condition for a composed entity action.
1587
+ *
1588
+ * @source C++ class cond
1589
+ * @customConstructor cond
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.
1595
+ */
1596
+ export class cond extends EngineBinding {
1597
+ /**
1598
+ * Engine enum value for `cond.move_end`.
1599
+ */
1600
+ public static readonly move_end: 1;
1601
+ /**
1602
+ * Engine enum value for `cond.look_end`.
1603
+ */
1604
+ public static readonly look_end: 2;
1605
+ /**
1606
+ * Engine enum value for `cond.anim_end`.
1607
+ */
1608
+ public static readonly anim_end: 4;
1609
+ /**
1610
+ * Engine enum value for `cond.sound_end`.
1611
+ */
1612
+ public static readonly sound_end: 8;
1613
+ /**
1614
+ * Engine enum value for `cond.object_end`.
1615
+ */
1616
+ public static readonly object_end: 32;
1617
+ /**
1618
+ * Engine enum value for `cond.time_end`.
1619
+ */
1620
+ public static readonly time_end: 64;
1621
+ /**
1622
+ * Engine enum value for `cond.act_end`.
1623
+ */
1624
+ public static readonly act_end: 128;
1625
+
1626
+ /**
1627
+ * Create an empty completion condition.
1628
+ */
1629
+ public constructor();
1630
+
1631
+ /**
1632
+ * Create a completion condition from flags.
1633
+ *
1634
+ * @param value - Condition flags.
1635
+ */
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
+ */
1644
+ public constructor(value1: u32, value2: f64);
1645
+ }
1646
+
1647
+ /**
1648
+ * @group xr_action
1649
+ */
1650
+ export type TXR_cond = EnumeratedStaticsValues<typeof cond>;
1651
+
1652
+ /**
1653
+ * Global monster action.
1654
+ *
1655
+ * @source C++ class act
1656
+ * @customConstructor act
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.
1662
+ */
1663
+ export class act {
1664
+ /**
1665
+ * Engine enum value for `act.attack`.
1666
+ */
1667
+ public static readonly attack: 2;
1668
+ /**
1669
+ * Engine enum value for `act.eat`.
1670
+ */
1671
+ public static readonly eat: 1;
1672
+ /**
1673
+ * Engine enum value for `act.panic`.
1674
+ */
1675
+ public static readonly panic: 3;
1676
+ /**
1677
+ * Engine enum value for `act.rest`.
1678
+ */
1679
+ public static readonly rest: 0;
1680
+
1681
+ /**
1682
+ * Create an empty global monster action.
1683
+ */
1684
+ public constructor();
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);
1700
+ }
1701
+
1702
+ /**
1703
+ * Particle action transform parameters.
1704
+ *
1705
+ * @source C++ class particle_params
1706
+ * @customConstructor particle_params
1707
+ * @group xr_action
1708
+ */
1709
+ export class particle_params {
1710
+ /**
1711
+ * Create empty particle parameters.
1712
+ */
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
+ */
1722
+ public constructor(first?: vector, second?: vector, third?: vector);
1723
+ }
1724
+
1725
+ /**
1726
+ * Particle playback action.
1727
+ *
1728
+ * @source C++ class particle
1729
+ * @customConstructor particle
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.
1735
+ */
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
+ */
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
+ */
1754
+ public constructor(
1755
+ particle_to_run: string,
1756
+ bone_name: string,
1757
+ particle_params: particle_params,
1758
+ auto_remove: boolean
1759
+ );
1760
+
1761
+ /**
1762
+ * @returns Whether particle playback is complete.
1763
+ */
1764
+ public completed(): boolean;
1765
+
1766
+ /**
1767
+ * Set particle angles.
1768
+ *
1769
+ * @param vector - Angles.
1770
+ */
1771
+ public set_angles(vector: vector): void;
1772
+
1773
+ /**
1774
+ * Set attached bone.
1775
+ *
1776
+ * @param bone_id - Bone name.
1777
+ */
1778
+ public set_bone(bone_id: string): void;
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
+ */
1786
+ public set_particle(value1: string, value2: boolean): void;
1787
+
1788
+ /**
1789
+ * Set particle position.
1790
+ *
1791
+ * @param vector - Position.
1792
+ */
1793
+ public set_position(vector: vector): void;
1794
+
1795
+ /**
1796
+ * Set particle velocity.
1797
+ *
1798
+ * @param vector - Velocity.
1799
+ */
1800
+ public set_velocity(vector: vector): void;
1801
+ }
1802
+ }