xray16 1.5.4 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +6 -0
  2. package/package.json +12 -6
  3. package/plugins/optimize_return_ternary.d.ts +6 -0
  4. package/plugins/optimize_return_ternary.js +65 -0
  5. package/xray16.d.ts +30847 -0
  6. package/types/index.d.ts +0 -55
  7. package/types/xr_ai/xr_action.d.ts +0 -1802
  8. package/types/xr_ai/xr_alife.d.ts +0 -1870
  9. package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
  10. package/types/xr_ai/xr_goap.d.ts +0 -1116
  11. package/types/xr_ai/xr_graph.d.ts +0 -135
  12. package/types/xr_ai/xr_memory.d.ts +0 -382
  13. package/types/xr_lib/xr_animation.d.ts +0 -252
  14. package/types/xr_lib/xr_bitwise.d.ts +0 -44
  15. package/types/xr_lib/xr_color.d.ts +0 -142
  16. package/types/xr_lib/xr_debug.d.ts +0 -181
  17. package/types/xr_lib/xr_dialog.d.ts +0 -132
  18. package/types/xr_lib/xr_flags.d.ts +0 -592
  19. package/types/xr_lib/xr_fs.d.ts +0 -615
  20. package/types/xr_lib/xr_game.d.ts +0 -362
  21. package/types/xr_lib/xr_hit.d.ts +0 -125
  22. package/types/xr_lib/xr_ini.d.ts +0 -473
  23. package/types/xr_lib/xr_level.d.ts +0 -795
  24. package/types/xr_lib/xr_luabind.d.ts +0 -90
  25. package/types/xr_lib/xr_map.d.ts +0 -192
  26. package/types/xr_lib/xr_math.d.ts +0 -871
  27. package/types/xr_lib/xr_multiplayer.d.ts +0 -1079
  28. package/types/xr_lib/xr_profile.d.ts +0 -272
  29. package/types/xr_lib/xr_properties.d.ts +0 -610
  30. package/types/xr_lib/xr_relation.d.ts +0 -231
  31. package/types/xr_lib/xr_render.d.ts +0 -167
  32. package/types/xr_lib/xr_save.d.ts +0 -833
  33. package/types/xr_lib/xr_sound.d.ts +0 -515
  34. package/types/xr_lib/xr_stats.ts +0 -49
  35. package/types/xr_lib/xr_task.d.ts +0 -388
  36. package/types/xr_lib/xr_time.d.ts +0 -177
  37. package/types/xr_lib/xr_type.d.ts +0 -75
  38. package/types/xr_object/client/xr_anomaly.d.ts +0 -70
  39. package/types/xr_object/client/xr_artefact.d.ts +0 -153
  40. package/types/xr_object/client/xr_client_object.d.ts +0 -207
  41. package/types/xr_object/client/xr_creature.d.ts +0 -243
  42. package/types/xr_object/client/xr_item.d.ts +0 -370
  43. package/types/xr_object/client/xr_level.d.ts +0 -753
  44. package/types/xr_object/client/xr_physic.d.ts +0 -644
  45. package/types/xr_object/client/xr_zone.d.ts +0 -85
  46. package/types/xr_object/script/xr_script_interface.d.ts +0 -819
  47. package/types/xr_object/script/xr_script_object.d.ts +0 -5719
  48. package/types/xr_object/script/xr_script_trade.d.ts +0 -51
  49. package/types/xr_object/server/xr_server_object.d.ts +0 -1486
  50. package/types/xr_ui/xr_ui_asset.d.ts +0 -364
  51. package/types/xr_ui/xr_ui_core.d.ts +0 -424
  52. package/types/xr_ui/xr_ui_event.d.ts +0 -1449
  53. package/types/xr_ui/xr_ui_interface.d.ts +0 -2447
  54. package/types/xr_ui/xr_ui_menu.d.ts +0 -385
  55. package/types/xrf_plugin.d.ts +0 -109
@@ -1,819 +0,0 @@
1
- declare module "xray16" {
2
- /**
3
- * Cover point returned by cover search helpers.
4
- *
5
- * @source C++ class cover_point
6
- * @customConstructor cover_point
7
- * @group xr_script_interface
8
- */
9
- export class cover_point {
10
- /**
11
- * Engine-created cover point descriptor.
12
- */
13
- private constructor();
14
-
15
- /**
16
- * Get the level vertex occupied by this cover.
17
- *
18
- * @returns Level vertex id.
19
- */
20
- public level_vertex_id(): u32;
21
-
22
- /**
23
- * Check whether this cover point comes from a smart cover.
24
- *
25
- * @returns Whether it is a smart cover.
26
- */
27
- public is_smart_cover(): boolean;
28
-
29
- /**
30
- * Get cover position.
31
- *
32
- * @returns Cover position.
33
- */
34
- public position(): vector;
35
- }
36
-
37
- /**
38
- * Hit context passed to monster combat callbacks.
39
- *
40
- * @source C++ class MonsterHitInfo
41
- * @customConstructor MonsterHitInfo
42
- * @group xr_script_interface
43
- */
44
- export class MonsterHitInfo extends EngineBinding {
45
- /**
46
- * Engine-created monster hit descriptor.
47
- */
48
- private constructor();
49
-
50
- /**
51
- * Hit direction.
52
- */
53
- public direction: vector;
54
-
55
- /**
56
- * Hit time.
57
- */
58
- public time: i32;
59
-
60
- /**
61
- * Object that caused the hit.
62
- */
63
- public who: game_object;
64
- }
65
-
66
- /**
67
- * Visibility state of bloodsucker.
68
- * Possible values are:
69
- * - unset = -1,
70
- * - no_visibility = 0,
71
- * - partial_visibility = 1,
72
- * - full_visibility = 2.
73
- *
74
- * @source C++ enum visibility_t
75
- * @group xr_script_interface
76
- */
77
- export type TXR_bloodsucker_visibility_state = -1 | 0 | 1 | 2;
78
-
79
- /**
80
- * @source C++ enum visibility_t
81
- * @group xr_script_interface
82
- */
83
- export type TXR_game_object_path = 0 | 1 | 2 | 3 | number;
84
-
85
- /**
86
- * Engine callback id registry.
87
- *
88
- * @source C++ class callback
89
- * @customConstructor callback
90
- * @group xr_script_interface
91
- */
92
- export class callback {
93
- /**
94
- * Default x-ray 16 callbacks.
95
- */
96
- public static readonly trade_start: 0;
97
- /**
98
- * Engine enum value for `callback.trade_stop`.
99
- */
100
- public static readonly trade_stop: 1;
101
- /**
102
- * Engine enum value for `callback.trade_sell_buy_item`.
103
- */
104
- public static readonly trade_sell_buy_item: 2;
105
- /**
106
- * Engine enum value for `callback.trade_perform_operation`.
107
- */
108
- public static readonly trade_perform_operation: 3;
109
- /**
110
- * Engine enum value for `callback.zone_enter`.
111
- */
112
- public static readonly zone_enter: 4;
113
- /**
114
- * Engine enum value for `callback.zone_exit`.
115
- */
116
- public static readonly zone_exit: 5;
117
- /**
118
- * Engine enum value for `callback.level_border_exit`.
119
- */
120
- public static readonly level_border_exit: 6;
121
- /**
122
- * Engine enum value for `callback.level_border_enter`.
123
- */
124
- public static readonly level_border_enter: 7;
125
- /**
126
- * Engine enum value for `callback.death`.
127
- */
128
- public static readonly death: 8;
129
- /**
130
- * Engine enum value for `callback.patrol_path_in_point`.
131
- */
132
- public static readonly patrol_path_in_point: 9;
133
- /**
134
- * Engine enum value for `callback.inventory_pda`.
135
- */
136
- public static readonly inventory_pda: 10;
137
- /**
138
- * Engine enum value for `callback.inventory_info`.
139
- */
140
- public static readonly inventory_info: 11;
141
- /**
142
- * Engine enum value for `callback.article_info`.
143
- */
144
- public static readonly article_info: 12;
145
- /**
146
- * Engine enum value for `callback.task_state`.
147
- */
148
- public static readonly task_state: 13;
149
- /**
150
- * Engine enum value for `callback.map_location_added`.
151
- */
152
- public static readonly map_location_added: 14;
153
- /**
154
- * Engine enum value for `callback.use_object`.
155
- */
156
- public static readonly use_object: 15;
157
- /**
158
- * Engine enum value for `callback.hit`.
159
- */
160
- public static readonly hit: 16;
161
- /**
162
- * Engine enum value for `callback.sound`.
163
- */
164
- public static readonly sound: 17;
165
- /**
166
- * Engine enum value for `callback.action_movement`.
167
- */
168
- public static readonly action_movement: 18;
169
- /**
170
- * Engine enum value for `callback.action_watch`.
171
- */
172
- public static readonly action_watch: 19;
173
- /**
174
- * Engine enum value for `callback.action_removed`.
175
- */
176
- public static readonly action_removed: 20;
177
- /**
178
- * Engine enum value for `callback.action_animation`.
179
- */
180
- public static readonly action_animation: 21;
181
- /**
182
- * Engine enum value for `callback.action_sound`.
183
- */
184
- public static readonly action_sound: 22;
185
- /**
186
- * Engine enum value for `callback.action_particle`.
187
- */
188
- public static readonly action_particle: 23;
189
- /**
190
- * Engine enum value for `callback.action_object`.
191
- */
192
- public static readonly action_object: 24;
193
- /**
194
- * Engine enum value for `callback.actor_sleep`.
195
- */
196
- public static readonly actor_sleep: 25;
197
- /**
198
- * Engine enum value for `callback.helicopter_on_point`.
199
- */
200
- public static readonly helicopter_on_point: 26;
201
- /**
202
- * Engine enum value for `callback.helicopter_on_hit`.
203
- */
204
- public static readonly helicopter_on_hit: 27;
205
- /**
206
- * Engine enum value for `callback.on_item_take`.
207
- */
208
- public static readonly on_item_take: 28;
209
- /**
210
- * Engine enum value for `callback.on_item_drop`.
211
- */
212
- public static readonly on_item_drop: 29;
213
- /**
214
- * Engine enum value for `callback.script_animation`.
215
- */
216
- public static readonly script_animation: 30;
217
- /**
218
- * Engine enum value for `callback.trader_global_anim_request`.
219
- */
220
- public static readonly trader_global_anim_request: 31;
221
- /**
222
- * Engine enum value for `callback.trader_head_anim_request`.
223
- */
224
- public static readonly trader_head_anim_request: 32;
225
- /**
226
- * Engine enum value for `callback.trader_sound_end`.
227
- */
228
- public static readonly trader_sound_end: 33;
229
- /**
230
- * Engine enum value for `callback.take_item_from_box`.
231
- */
232
- public static readonly take_item_from_box: 34;
233
- /**
234
- * Engine enum value for `callback.weapon_no_ammo`.
235
- */
236
- public static readonly weapon_no_ammo: 35;
237
- /**
238
- * Engine enum value for `callback.hud_animation_end`.
239
- */
240
- public static readonly hud_animation_end: 36;
241
-
242
- /**
243
- * Engine enum value for `callback.key_press`.
244
- */
245
- public static readonly key_press: 37;
246
- /**
247
- * Engine enum value for `callback.key_release`.
248
- */
249
- public static readonly key_release: 38;
250
- /**
251
- * Engine enum value for `callback.key_hold`.
252
- */
253
- public static readonly key_hold: 39;
254
- /**
255
- * Engine enum value for `callback.mouse_move`.
256
- */
257
- public static readonly mouse_move: 40;
258
- /**
259
- * Engine enum value for `callback.mouse_wheel`.
260
- */
261
- public static readonly mouse_wheel: 41;
262
- /**
263
- * Engine enum value for `callback.controller_press`.
264
- */
265
- public static readonly controller_press: 42;
266
- /**
267
- * Engine enum value for `callback.controller_release`.
268
- */
269
- public static readonly controller_release: 43;
270
- /**
271
- * Engine enum value for `callback.controller_hold`.
272
- */
273
- public static readonly controller_hold: 44;
274
- // Public static readonly controller_attitude_change: 45;
275
-
276
- /**
277
- * Engine enum value for `callback.item_to_belt`.
278
- */
279
- public static readonly item_to_belt: 46;
280
- /**
281
- * Engine enum value for `callback.item_to_slot`.
282
- */
283
- public static readonly item_to_slot: 47;
284
- /**
285
- * Engine enum value for `callback.item_to_ruck`.
286
- */
287
- public static readonly item_to_ruck: 48;
288
-
289
- /**
290
- * Engine enum value for `callback.weapon_zoom_in`.
291
- */
292
- public static readonly weapon_zoom_in: 49;
293
- /**
294
- * Engine enum value for `callback.weapon_zoom_out`.
295
- */
296
- public static readonly weapon_zoom_out: 50;
297
- /**
298
- * Engine enum value for `callback.weapon_jammed`.
299
- */
300
- public static readonly weapon_jammed: 51;
301
- /**
302
- * Engine enum value for `callback.weapon_magazine_empty`.
303
- */
304
- public static readonly weapon_magazine_empty: 52;
305
-
306
- /**
307
- * Engine enum value for `callback.actor_before_death`.
308
- */
309
- public static readonly actor_before_death: 53;
310
- /**
311
- * Engine enum value for `callback.on_attach_vehicle`.
312
- */
313
- public static readonly on_attach_vehicle: 54;
314
- /**
315
- * Engine enum value for `callback.on_detach_vehicle`.
316
- */
317
- public static readonly on_detach_vehicle: 55;
318
- /**
319
- * Engine enum value for `callback.on_use_vehicle`.
320
- */
321
- public static readonly on_use_vehicle: 56;
322
- }
323
-
324
- /**
325
- * @group xr_script_interface
326
- */
327
- export type TXR_callbacks = typeof callback;
328
-
329
- /**
330
- * @group xr_script_interface
331
- */
332
- export type TXR_callback = EnumeratedStaticsValues<TXR_callbacks>;
333
-
334
- /**
335
- * Custom extension.
336
- * For reference: src/xrGame/script_game_object_script.cpp.
337
- *
338
- * @group xr_script_interface
339
- */
340
- class game_object_callbacks_implementation_base {
341
- /**
342
- * Remove callback.
343
- *
344
- * @param type - Type of callback.
345
- * @param cb - Null to reset.
346
- */
347
- public set_callback(type: TXR_callback, cb: null): void;
348
-
349
- /**
350
- * 0 todo;.
351
- */
352
- public set_callback<T extends AnyObject>(
353
- type: TXR_callbacks["trade_start"],
354
- cb?: ((this: void) => void) | null,
355
- object?: Maybe<T>
356
- ): void;
357
-
358
- /**
359
- * 1 todo;.
360
- */
361
- public set_callback<T extends AnyObject>(
362
- type: TXR_callbacks["trade_stop"],
363
- cb?: ((this: void) => void) | null,
364
- object?: Maybe<T>
365
- ): void;
366
-
367
- /**
368
- * 2 todo;.
369
- */
370
- public set_callback<T extends AnyObject>(
371
- type: TXR_callbacks["trade_sell_buy_item"],
372
- cb?: ((this: void, item: game_object, money_direction: boolean, money: number) => void) | null,
373
- object?: Maybe<T>
374
- ): void;
375
-
376
- /**
377
- * 3 todo;.
378
- */
379
- public set_callback<T extends AnyObject>(
380
- type: TXR_callbacks["trade_perform_operation"],
381
- cb?: ((this: void, money_get: u32, money_put: u32) => void) | null,
382
- object?: Maybe<T>
383
- ): void;
384
-
385
- /**
386
- * 4 todo;
387
- *
388
- * Works with script_zone objects.
389
- */
390
- public set_callback<T extends AnyObject>(
391
- type: TXR_callbacks["zone_enter"],
392
- cb?: ((this: void, zone: game_object, object: game_object) => void) | null,
393
- object?: Maybe<T>
394
- ): void;
395
-
396
- /**
397
- * 5 todo;
398
- *
399
- * Works with script_zone objects.
400
- */
401
- public set_callback<T extends AnyObject>(
402
- type: TXR_callbacks["zone_exit"],
403
- cb?: ((this: void, zone: game_object, object: game_object) => void) | null,
404
- object?: Maybe<T>
405
- ): void;
406
-
407
- /**
408
- * 6 todo;.
409
- */
410
- public set_callback<T extends AnyObject>(
411
- type: TXR_callbacks["level_border_exit"],
412
- cb?: ((this: void, xobject: game_object) => void) | null,
413
- object?: Maybe<T>
414
- ): void;
415
-
416
- /**
417
- * 7 todo;.
418
- */
419
- public set_callback<T extends AnyObject>(
420
- type: TXR_callbacks["level_border_enter"],
421
- cb?: ((this: void, xobject: game_object) => void) | null,
422
- object?: Maybe<T>
423
- ): void;
424
-
425
- /**
426
- * 8 todo;.
427
- */
428
- public set_callback<T extends AnyObject>(
429
- type: TXR_callbacks["death"],
430
- cb?: (this: void, target: game_object, killer: game_object) => void,
431
- object?: Maybe<T>
432
- ): void;
433
-
434
- /**
435
- * 9 todo;.
436
- */
437
- public set_callback<T extends AnyObject>(
438
- type: TXR_callbacks["patrol_path_in_point"],
439
- cb?: ((this: void, object: game_object, action_type: number, point_index: number) => void) | null,
440
- object?: Maybe<T>
441
- ): void;
442
-
443
- // 10 todo: inventory_pda -> implement in game engine
444
-
445
- /**
446
- * Callback executed when an NPC receives an info portion.
447
- */
448
- public set_callback<T extends AnyObject>(
449
- type: TXR_callbacks["inventory_info"],
450
- cb?: ((this: void, npc: game_object, info_id: string) => void) | null,
451
- object?: Maybe<T>
452
- ): void;
453
-
454
- // 12 todo: article_info -> implement in game engine
455
-
456
- /**
457
- * 13 todo;.
458
- */
459
- public set_callback<T extends AnyObject>(
460
- type: TXR_callbacks["task_state"],
461
- cb?: ((this: void, task: CGameTask, state: TXR_TaskState) => void) | null,
462
- object?: Maybe<T>
463
- ): void;
464
-
465
- /**
466
- * 14 todo;.
467
- */
468
- public set_callback<T extends AnyObject>(
469
- type: TXR_callbacks["map_location_added"],
470
- cb?: ((this: void, spot_type: string, id: u16) => void) | null,
471
- object?: Maybe<T>
472
- ): void;
473
-
474
- /**
475
- * 15 Use some object.
476
- */
477
- public set_callback<T extends AnyObject>(
478
- type: TXR_callbacks["use_object"],
479
- cb?: ((this: void, object: game_object) => void) | null,
480
- object?: Maybe<T>
481
- ): void;
482
-
483
- /**
484
- * 15 Use some object with explicit user object.
485
- */
486
- public set_callback<T extends AnyObject>(
487
- type: TXR_callbacks["use_object"],
488
- cb?: ((this: void, object: game_object, who: game_object) => void) | null,
489
- object?: Maybe<T>
490
- ): void;
491
-
492
- /**
493
- * 16 Entity got hit.
494
- */
495
- public set_callback<T extends AnyObject>(
496
- type: TXR_callbacks["hit"],
497
- cb?:
498
- | ((
499
- this: void,
500
- object: game_object,
501
- damage: number,
502
- direction: vector,
503
- who: game_object,
504
- bone_id: number
505
- ) => void)
506
- | null,
507
- object?: Maybe<T>
508
- ): void;
509
-
510
- /**
511
- * 17 todo;.
512
- */
513
- public set_callback<T extends AnyObject>(
514
- type: TXR_callbacks["sound"],
515
- cb?:
516
- | ((
517
- this: void,
518
- object: game_object,
519
- source_id: number,
520
- sound_type: TXR_snd_type,
521
- position: vector,
522
- sound_power: number
523
- ) => void)
524
- | null,
525
- object?: Maybe<T>
526
- ): void;
527
-
528
- /**
529
- * 18 todo;.
530
- */
531
- public set_callback<T extends AnyObject>(
532
- type: TXR_callbacks["action_movement"],
533
- cb?: ((this: void, object: game_object, movement_type: u32 /* EMovementType */, unknown: -1) => void) | null,
534
- object?: Maybe<T>
535
- ): void;
536
-
537
- // 19 todo: action_watch
538
-
539
- // 20 todo: action_removed
540
-
541
- // 21 todo: action_animation
542
-
543
- // 22 todo: action_sound
544
-
545
- // 23 todo: action_particle
546
-
547
- // 24 todo: action_object
548
-
549
- // 25 todo: actor_sleep -> implement in game engine
550
-
551
- /**
552
- * 26 todo;.
553
- */
554
- public set_callback<T extends AnyObject>(
555
- type: TXR_callbacks["helicopter_on_point"],
556
- cb?: ((this: void, distance: number, current_position: vector, vertex_id: number) => void) | null,
557
- object?: Maybe<T>
558
- ): void;
559
-
560
- /**
561
- * 27 todo;.
562
- */
563
- public set_callback<T extends AnyObject>(
564
- type: TXR_callbacks["helicopter_on_hit"],
565
- cb?: ((this: void, damage: number, impulse: number, hit_type: number, who_id: number) => void) | null,
566
- object?: Maybe<T>
567
- ): void;
568
-
569
- /**
570
- * 28 todo;.
571
- */
572
- public set_callback<T extends AnyObject>(
573
- type: TXR_callbacks["on_item_take"],
574
- cb?: ((this: void, object: game_object, item: game_object) => void) | null,
575
- object?: Maybe<T>
576
- ): void;
577
-
578
- /**
579
- * 29 todo;.
580
- */
581
- public set_callback<T extends AnyObject>(
582
- type: TXR_callbacks["on_item_drop"],
583
- cb?: ((this: void, object: game_object, item: game_object) => void) | null,
584
- object?: Maybe<T>
585
- ): void;
586
-
587
- /**
588
- * 30 todo;.
589
- */
590
- public set_callback<T extends AnyObject>(
591
- type: TXR_callbacks["script_animation"],
592
- cb?: ((this: void, skip_multi_anim_check?: boolean) => void) | null,
593
- object?: object | null
594
- ): void;
595
-
596
- /**
597
- * 31 todo;.
598
- */
599
- public set_callback<T extends AnyObject>(
600
- type: TXR_callbacks["trader_global_anim_request"],
601
- cb?: ((this: void) => void) | null,
602
- object?: Maybe<T>
603
- ): void;
604
-
605
- /**
606
- * 32 todo;.
607
- */
608
- public set_callback<T extends AnyObject>(
609
- type: TXR_callbacks["trader_head_anim_request"],
610
- cb?: ((this: void) => void) | null,
611
- object?: Maybe<T>
612
- ): void;
613
-
614
- /**
615
- * 33 todo;.
616
- */
617
- public set_callback<T extends AnyObject>(
618
- type: TXR_callbacks["trader_sound_end"],
619
- cb?: ((this: void) => void) | null,
620
- object?: Maybe<T>
621
- ): void;
622
-
623
- /**
624
- * 34 todo;.
625
- */
626
- public set_callback<T extends AnyObject>(
627
- type: TXR_callbacks["take_item_from_box"],
628
- cb?: ((this: void, object: game_object, box: game_object, item: game_object) => void) | null,
629
- object?: Maybe<T>
630
- ): void;
631
-
632
- /**
633
- * 35 Callback executed when weapon has no ammo to fire.
634
- */
635
- public set_callback<T extends AnyObject>(
636
- type: TXR_callbacks["weapon_no_ammo"],
637
- cb?: ((this: void, object: game_object, suitable_ammo_total: i32) => void) | null,
638
- object?: Maybe<T>
639
- ): void;
640
-
641
- /**
642
- * 36 Callback executed on hud animation stop.
643
- * Called from CHudItem class internals.
644
- */
645
- public set_callback<T extends AnyObject>(
646
- type: TXR_callbacks["hud_animation_end"],
647
- cb?:
648
- | ((
649
- this: void,
650
- object: game_object,
651
- hud_section: string,
652
- current_motion: string,
653
- state: u32,
654
- animation_slot: u32
655
- ) => void)
656
- | null,
657
- object?: Maybe<T>
658
- ): void;
659
-
660
- /**
661
- * 37 todo;.
662
- */
663
- public set_callback<T extends AnyObject>(
664
- type: TXR_callbacks["key_press"],
665
- cb?: ((this: void, key: i32) => void) | null,
666
- object?: Maybe<T>
667
- ): void;
668
-
669
- /**
670
- * 38 todo;.
671
- */
672
- public set_callback<T extends AnyObject>(
673
- type: TXR_callbacks["key_release"],
674
- cb?: ((this: void, key: i32) => void) | null,
675
- object?: Maybe<T>
676
- ): void;
677
-
678
- /**
679
- * 39 todo;.
680
- */
681
- public set_callback<T extends AnyObject>(
682
- type: TXR_callbacks["key_hold"],
683
- cb?: ((this: void, key: i32) => void) | null,
684
- object?: Maybe<T>
685
- ): void;
686
-
687
- // 40 todo: mouse_move
688
-
689
- // 41 todo: mouse_wheel
690
-
691
- // 42 todo: controller_press
692
-
693
- // 43 todo: controller_release
694
-
695
- // 44 todo: controller_hold
696
-
697
- // 45 todo: controller_attitude_change
698
-
699
- /**
700
- * 46 todo: item_to_belt.
701
- */
702
- public set_callback<T extends AnyObject>(
703
- type: TXR_callbacks["item_to_belt"],
704
- cb?: ((this: void, object: game_object) => void) | null,
705
- object?: Maybe<T>
706
- ): void;
707
-
708
- /**
709
- * 47 todo: item_to_slot.
710
- */
711
- public set_callback<T extends AnyObject>(
712
- type: TXR_callbacks["item_to_slot"],
713
- cb?: ((this: void, object: game_object) => void) | null,
714
- object?: Maybe<T>
715
- ): void;
716
-
717
- /**
718
- * 48 todo: item_to_ruck.
719
- */
720
- public set_callback<T extends AnyObject>(
721
- type: TXR_callbacks["item_to_ruck"],
722
- cb?: ((this: void, object: game_object) => void) | null,
723
- object?: Maybe<T>
724
- ): void;
725
-
726
- /**
727
- * 49 Callback executed when weapon is zoomed in.
728
- */
729
- public set_callback<T extends AnyObject>(
730
- type: TXR_callbacks["weapon_zoom_in"],
731
- cb?: ((this: void, owner: game_object, weapon: game_object) => void) | null,
732
- object?: Maybe<T>
733
- ): void;
734
-
735
- /**
736
- * 50 Callback executed when weapon is zoomed out.
737
- */
738
- public set_callback<T extends AnyObject>(
739
- type: TXR_callbacks["weapon_zoom_out"],
740
- cb?: ((this: void, owner: game_object, weapon: game_object) => void) | null,
741
- object?: Maybe<T>
742
- ): void;
743
-
744
- /**
745
- * 51 Callback executed when magazine ammo is elapsed and empty.
746
- */
747
- public set_callback<T extends AnyObject>(
748
- type: TXR_callbacks["weapon_jammed"],
749
- cb?: ((this: void, owner: game_object, weapon: game_object) => void) | null,
750
- object?: Maybe<T>
751
- ): void;
752
-
753
- /**
754
- * 52 Callback executed when magazine ammo is elapsed and empty.
755
- */
756
- public set_callback<T extends AnyObject>(
757
- type: TXR_callbacks["weapon_magazine_empty"],
758
- cb?: ((this: void, object: game_object, suitable_ammo_total: i32) => void) | null,
759
- object?: Maybe<T>
760
- ): void;
761
-
762
- /**
763
- * 53 todo: actor_before_death.
764
- */
765
- public set_callback<T extends AnyObject>(
766
- type: TXR_callbacks["actor_before_death"],
767
- cb?: ((this: void, killer_id: u16) => void) | null,
768
- object?: Maybe<T>
769
- ): void;
770
-
771
- // 54 todo: on_attach_vehicle
772
-
773
- // 55 todo: on_detach_vehicle
774
-
775
- // 56 todo: on_use_vehicle
776
-
777
- /**
778
- * Clear all callbacks registered on this object.
779
- */
780
- public clear_callbacks(): void;
781
-
782
- /**
783
- * Clear the custom enemy selector callback.
784
- */
785
- public set_enemy_callback(cb: null): void;
786
-
787
- /**
788
- * Set a custom enemy selector callback.
789
- *
790
- * @param cb - Callback that receives this object and a candidate enemy.
791
- * @param object - Lua context used as callback `this`.
792
- */
793
- public set_enemy_callback<T>(cb: (this: T, object: game_object, enemy: game_object) => boolean, object: T): void;
794
-
795
- /**
796
- * Set a fast update callback for this object.
797
- *
798
- * @param cb - Callback called from the object's fast update path.
799
- * @param context - Lua context used as callback `this`.
800
- */
801
- public set_fastcall<T>(cb: (this: T) => boolean, context: T): void;
802
-
803
- /**
804
- * Set or clear the patrol extrapolation callback.
805
- *
806
- * @param cb - Callback called with current patrol point index.
807
- * @param object - Optional Lua context.
808
- */
809
- public set_patrol_extrapolate_callback(cb?: ((cur_pt: number) => boolean) | null, object?: object): void;
810
-
811
- /**
812
- * Set or clear smart-cover target selection callback.
813
- *
814
- * @param cb - Callback that receives this object when a smart-cover target is selected.
815
- * @param object - Optional Lua context.
816
- */
817
- public set_smart_cover_target_selector(cb?: ((object: game_object) => void) | null, object?: object | null): void;
818
- }
819
- }