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,285 +1,753 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class CZoneCampfire : CGameObject
4
- * @customConstructor CZoneCampfire
5
- * @group xr_level
6
- */
7
- export class CZoneCampfire extends CGameObject {
8
- public constructor();
9
-
10
- public is_on(): boolean;
11
-
12
- public turn_on(): void;
13
-
14
- public turn_off(): void;
15
- }
16
-
17
- /**
18
- * @source C++ class CPhysicObject : CGameObject
19
- * @customConstructor CPhysicObject
20
- * @group xr_level
21
- */
22
- export class CPhysicObject extends CGameObject {
23
- public set_door_ignore_dynamics(): void;
24
-
25
- public play_bones_sound(): void;
26
-
27
- public run_anim_back(): void;
28
-
29
- public unset_door_ignore_dynamics(): void;
30
-
31
- public run_anim_forward(): void;
32
-
33
- public stop_anim(): boolean;
34
-
35
- public anim_time_get(): f32;
36
-
37
- public anim_time_set(value: f32): void;
38
-
39
- public stop_bones_sound(): void;
40
- }
41
-
42
- /**
43
- * @source C++ class hanging_lamp : CGameObject
44
- * @customConstructor hanging_lamp
45
- * @group xr_level
46
- */
47
- export class hanging_lamp extends CGameObject {
48
- public constructor();
49
-
50
- public turn_on(): void;
51
-
52
- public turn_off(): void;
53
- }
54
-
55
- /**
56
- * @source C++ class CCar : CGameObject, holder
57
- * @customConstructor CCar
58
- * @group xr_level
59
- */
60
- export class CCar extends CGameObject implements holder {
61
- public static eWpnActivate: 3;
62
- public static eWpnAutoFire: 5;
63
- public static eWpnDesiredDir: 1;
64
- public static eWpnDesiredPos: 2;
65
- public static eWpnFire: 4;
66
- public static eWpnToDefaultDir: 6;
67
-
68
- public constructor();
69
-
70
- public SetEnterLocked(is_enabled: boolean): void;
71
-
72
- public SetExitLocked(is_enabled: boolean): void;
73
-
74
- public CanHit(): boolean;
75
-
76
- public CarExplode(): void;
77
-
78
- public ChangefFuel(fule: f32): void;
79
-
80
- public ChangefHealth(value: f32): void;
81
-
82
- public CurrentVel(): vector;
83
-
84
- public ExplodeTime(): u32;
85
-
86
- public FireDirDiff(): f32;
87
-
88
- /**
89
- * @returns amount of fuel in vehicle instance
90
- */
91
- public GetfFuel(): f32;
92
-
93
- /**
94
- * @returns fuel consumption rate of vehicle instance
95
- */
96
- public GetfFuelConsumption(): f32;
97
-
98
- /**
99
- * @returns fuel tank size (max possible amount of fuel at time)
100
- */
101
- public GetfFuelTank(): f32;
102
-
103
- /**
104
- * @returns vehicle health value
105
- */
106
- public GetfHealth(): f32;
107
-
108
- /**
109
- * @returns whether vehicle has mounted weapon
110
- */
111
- public HasWeapon(): boolean;
112
-
113
- public IsObjectVisible(game_object: game_object): boolean;
114
-
115
- public PlayDamageParticles(): void;
116
-
117
- public SetExplodeTime(time: u32): void;
118
-
119
- public SetfFuel(fuel: f32): void;
120
-
121
- public SetfFuelConsumption(consumption: f32): void;
122
-
123
- public SetfFuelTank(fuel: f32): void;
124
-
125
- public SetfHealth(health: f32): void;
126
-
127
- /**
128
- * @returns whether vehicle engine is active at the moment
129
- */
130
- public IsActiveEngine(): boolean;
131
-
132
- /**
133
- * Start vehicle engine.
134
- */
135
- public StartEngine(): void;
136
-
137
- /**
138
- * Stop vehicle engine.
139
- */
140
- public StopEngine(): void;
141
-
142
- /**
143
- * Set vehicle hand break in active state.
144
- */
145
- public HandBreak(): void;
146
-
147
- /**
148
- * Deactivate vehicle hand break.
149
- */
150
- public ReleaseHandBreak(): void;
151
-
152
- /**
153
- * @returns current vehicle RPM value (speed)
154
- */
155
- public GetRPM(): f32;
156
-
157
- /**
158
- * Set current vehicle RPM value (speed).
159
- *
160
- * @param rpm - RPM value to apply
161
- */
162
- public SetRPM(rpm: f32): void;
163
-
164
- public StopDamageParticles(): void;
165
-
166
- public engaged(): boolean;
167
-
168
- public Action(value1: u16, value2: u32): void;
169
-
170
- public SetParam(value: i32, vector: vector): void;
171
-
172
- public SetParam(value: TXR_CCar_weapon_param, vector: vector): void;
173
- }
174
-
175
- /**
176
- * @group xr_level
177
- */
178
- export type TXR_CCar_weapon_param = EnumeratedStaticsValues<typeof CCar>;
179
-
180
- /**
181
- * @source C++ class CHelicopter : CGameObject
182
- * @customConstructor CHelicopter
183
- * @group xr_level
184
- */
185
- export class CHelicopter extends CGameObject {
186
- public static readonly eAlive: 0;
187
- public static readonly eBodyByPath: 0;
188
- public static readonly eBodyToPoint: 1;
189
- public static readonly eDead: 1;
190
- public static readonly eEnemyEntity: 2;
191
- public static readonly eEnemyNone: 0;
192
- public static readonly eEnemyPoint: 1;
193
- public static readonly eMovLanding: 4;
194
- public static readonly eMovNone: 0;
195
- public static readonly eMovPatrolPath: 2;
196
- public static readonly eMovRoundPath: 3;
197
- public static readonly eMovTakeOff: 5;
198
- public static readonly eMovToPoint: 1;
199
-
200
- public readonly m_exploded: boolean;
201
- public readonly m_light_started: boolean;
202
- public readonly m_flame_started: boolean;
203
- public readonly m_dead: boolean;
204
- public m_max_mgun_dist: f32;
205
- public m_max_rocket_dist: f32;
206
- public m_min_mgun_dist: f32;
207
- public m_min_rocket_dist: f32;
208
- public m_syncronize_rocket: boolean;
209
- public m_time_between_rocket_attack: u32;
210
- public m_use_mgun_on_attack: boolean;
211
- public m_use_rocket_on_attack: boolean;
212
-
213
- public constructor();
214
-
215
- public isVisible(game_object: game_object): boolean;
216
-
217
- public GetSafeAltitude(): f32;
218
-
219
- public GetRealAltitude(): f32;
220
-
221
- public GetCurrVelocity(): f32;
222
-
223
- public GetSpeedInDestPoint(value: f32): f32;
224
-
225
- public GetOnPointRangeDist(): f32;
226
-
227
- public GetMaxVelocity(): f32;
228
-
229
- public GetfHealth(): f32;
230
-
231
- public GetMovementState(): i32; /* enum ? */
232
-
233
- public GetBodyState(): i32; /* enum ? */
234
-
235
- public GetCurrVelocityVec(): vector;
236
-
237
- public GetState(): i32;
238
-
239
- public GetDistanceToDestPosition(): f32;
240
-
241
- public GetHuntState(): i32; /* enum ? */
242
-
243
- public SetSpeedInDestPoint(value: f32): unknown;
244
-
245
- public SetLinearAcc(value1: f32, value2: f32): void;
246
-
247
- public SetfHealth(health: f32): f32;
248
-
249
- public SetMaxVelocity(value: f32): void;
250
-
251
- public SetEnemy(game_object: game_object | null): void;
252
-
253
- public SetEnemy(vector: vector): void;
254
-
255
- public SetFireTrailLength(value: f32): void;
256
-
257
- public SetBarrelDirTolerance(value: f32): void;
258
-
259
- public SetDestPosition(vector: vector): void;
260
-
261
- public SetOnPointRangeDist(value: f32): void;
262
-
263
- public LookAtPoint(vector: vector, value: boolean): void;
264
-
265
- public GoPatrolByPatrolPath(value1: string, value2: i32): void;
266
-
267
- public Explode(): void;
268
-
269
- public TurnLighting(value: boolean): void;
270
-
271
- public UseFireTrail(): boolean;
272
-
273
- public UseFireTrail(value: boolean): void;
274
-
275
- public GoPatrolByRoundPath(vector: vector, value1: f32, value2: boolean): void;
276
-
277
- public Die(): void;
278
-
279
- public StartFlame(): void;
280
-
281
- public TurnEngineSound(enabled: boolean): void;
282
-
283
- public ClearEnemy(): void;
284
- }
285
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * Campfire anomaly object.
4
+ *
5
+ * @source C++ class CZoneCampfire : CGameObject
6
+ * @customConstructor CZoneCampfire
7
+ * @group xr_level
8
+ *
9
+ * @remarks
10
+ * Campfire controls require this runtime object. They are not available on generic anomaly zones.
11
+ */
12
+ export class CZoneCampfire extends CGameObject {
13
+ /**
14
+ * Create a campfire object wrapper.
15
+ */
16
+ public constructor();
17
+
18
+ /**
19
+ * @returns Whether the campfire is currently burning.
20
+ */
21
+ public is_on(): boolean;
22
+
23
+ /**
24
+ * Turn the campfire on.
25
+ */
26
+ public turn_on(): void;
27
+
28
+ /**
29
+ * Turn the campfire off.
30
+ */
31
+ public turn_off(): void;
32
+ }
33
+
34
+ /**
35
+ * Animated client physics object.
36
+ *
37
+ * @source C++ class CPhysicObject : CGameObject
38
+ * @customConstructor CPhysicObject
39
+ * @group xr_level
40
+ *
41
+ * @remarks
42
+ * Wrapper for animated physics props, especially door-like objects. Door and bone-sound helpers require this runtime
43
+ * class.
44
+ */
45
+ export class CPhysicObject extends CGameObject {
46
+ /**
47
+ * Ignore dynamic objects while the door-like object is moving.
48
+ */
49
+ public set_door_ignore_dynamics(): void;
50
+
51
+ /**
52
+ * Start sounds attached to animated bones.
53
+ */
54
+ public play_bones_sound(): void;
55
+
56
+ /**
57
+ * Run the object animation backward.
58
+ */
59
+ public run_anim_back(): void;
60
+
61
+ /**
62
+ * Restore normal dynamic-object collision handling.
63
+ */
64
+ public unset_door_ignore_dynamics(): void;
65
+
66
+ /**
67
+ * Run the object animation forward.
68
+ */
69
+ public run_anim_forward(): void;
70
+
71
+ /**
72
+ * Stop the current object animation.
73
+ *
74
+ * @returns Whether animation was stopped.
75
+ */
76
+ public stop_anim(): boolean;
77
+
78
+ /**
79
+ * @returns Current animation time.
80
+ */
81
+ public anim_time_get(): f32;
82
+
83
+ /**
84
+ * Set current animation time.
85
+ *
86
+ * @param time - Animation time.
87
+ */
88
+ public anim_time_set(time: f32): void;
89
+
90
+ /**
91
+ * Stop sounds attached to animated bones.
92
+ */
93
+ public stop_bones_sound(): void;
94
+ }
95
+
96
+ /**
97
+ * Hanging lamp object controlled from scripts.
98
+ *
99
+ * @source C++ class hanging_lamp : CGameObject
100
+ * @customConstructor hanging_lamp
101
+ * @group xr_level
102
+ *
103
+ * @remarks
104
+ * Lamp controls require this runtime object. They do not apply to arbitrary lights or torches.
105
+ */
106
+ export class hanging_lamp extends CGameObject {
107
+ /**
108
+ * Create a hanging lamp object wrapper.
109
+ */
110
+ public constructor();
111
+
112
+ /**
113
+ * Turn the lamp on.
114
+ */
115
+ public turn_on(): void;
116
+
117
+ /**
118
+ * Turn the lamp off.
119
+ */
120
+ public turn_off(): void;
121
+ }
122
+
123
+ /**
124
+ * Driveable car and mounted weapon holder.
125
+ *
126
+ * @source C++ class CCar : CGameObject, holder
127
+ * @customConstructor CCar
128
+ * @group xr_level
129
+ *
130
+ * @remarks
131
+ * Vehicle and mounted-weapon holder APIs require a car object. Use `game_object.get_car()` or holder casts before
132
+ * calling these methods from shared object code.
133
+ */
134
+ export class CCar extends CGameObject implements holder {
135
+ /**
136
+ * Engine enum value for `CCar.eWpnActivate`.
137
+ */
138
+ public static eWpnActivate: 3;
139
+ /**
140
+ * Engine enum value for `CCar.eWpnAutoFire`.
141
+ */
142
+ public static eWpnAutoFire: 5;
143
+ /**
144
+ * Engine enum value for `CCar.eWpnDesiredDir`.
145
+ */
146
+ public static eWpnDesiredDir: 1;
147
+ /**
148
+ * Engine enum value for `CCar.eWpnDesiredPos`.
149
+ */
150
+ public static eWpnDesiredPos: 2;
151
+ /**
152
+ * Engine enum value for `CCar.eWpnFire`.
153
+ */
154
+ public static eWpnFire: 4;
155
+ /**
156
+ * Engine enum value for `CCar.eWpnToDefaultDir`.
157
+ */
158
+ public static eWpnToDefaultDir: 6;
159
+
160
+ /**
161
+ * Create a car object wrapper.
162
+ */
163
+ public constructor();
164
+
165
+ /**
166
+ * Lock or unlock entering the car.
167
+ *
168
+ * @param is_enabled - Whether entering is locked.
169
+ */
170
+ public SetEnterLocked(is_enabled: boolean): void;
171
+
172
+ /**
173
+ * Lock or unlock exiting the car.
174
+ *
175
+ * @param is_enabled - Whether exiting is locked.
176
+ */
177
+ public SetExitLocked(is_enabled: boolean): void;
178
+
179
+ /**
180
+ * @returns Whether the mounted weapon can hit its current target.
181
+ */
182
+ public CanHit(): boolean;
183
+
184
+ /**
185
+ * Trigger car explosion.
186
+ */
187
+ public CarExplode(): void;
188
+
189
+ /**
190
+ * Change fuel by a delta.
191
+ *
192
+ * @param fuel - Fuel delta.
193
+ */
194
+ public ChangefFuel(fuel: f32): void;
195
+
196
+ /**
197
+ * Change vehicle health by a delta.
198
+ *
199
+ * @param value - Health delta.
200
+ */
201
+ public ChangefHealth(value: f32): void;
202
+
203
+ /**
204
+ * @returns Current velocity vector.
205
+ */
206
+ public CurrentVel(): vector;
207
+
208
+ /**
209
+ * @returns Scheduled explosion time.
210
+ */
211
+ public ExplodeTime(): u32;
212
+
213
+ /**
214
+ * @returns Difference between current and desired weapon fire direction.
215
+ */
216
+ public FireDirDiff(): f32;
217
+
218
+ /**
219
+ * @returns Amount of fuel in vehicle instance.
220
+ */
221
+ public GetfFuel(): f32;
222
+
223
+ /**
224
+ * @returns Amount of fuel in vehicle instance.
225
+ */
226
+ public get_fuel(): f32;
227
+
228
+ /**
229
+ * @returns Fuel consumption rate of vehicle instance.
230
+ */
231
+ public GetfFuelConsumption(): f32;
232
+
233
+ /**
234
+ * @returns Fuel consumption rate of vehicle instance.
235
+ */
236
+ public get_fuel_consumption(): f32;
237
+
238
+ /**
239
+ * @returns Fuel tank size (max possible amount of fuel at time).
240
+ */
241
+ public GetfFuelTank(): f32;
242
+
243
+ /**
244
+ * @returns Fuel tank size.
245
+ */
246
+ public get_fuel_tank(): f32;
247
+
248
+ /**
249
+ * @returns Vehicle health value.
250
+ */
251
+ public GetfHealth(): f32;
252
+
253
+ /**
254
+ * @returns Whether vehicle has mounted weapon.
255
+ */
256
+ public HasWeapon(): boolean;
257
+
258
+ /**
259
+ * Check whether an object is visible from the car weapon.
260
+ *
261
+ * @param game_object - Object to test.
262
+ * @returns Whether the object is visible.
263
+ */
264
+ public IsObjectVisible(game_object: game_object): boolean;
265
+
266
+ /**
267
+ * Start car damage particles.
268
+ */
269
+ public PlayDamageParticles(): void;
270
+
271
+ /**
272
+ * Set scheduled explosion time.
273
+ *
274
+ * @param time - Explosion time.
275
+ */
276
+ public SetExplodeTime(time: u32): void;
277
+
278
+ /**
279
+ * Set current fuel amount.
280
+ *
281
+ * @param fuel - Fuel amount.
282
+ */
283
+ public SetfFuel(fuel: f32): void;
284
+
285
+ /**
286
+ * Set current fuel amount.
287
+ *
288
+ * @param fuel - Fuel amount.
289
+ */
290
+ public set_fuel(fuel: f32): void;
291
+
292
+ /**
293
+ * Set fuel consumption rate.
294
+ *
295
+ * @param consumption - Fuel consumption rate.
296
+ */
297
+ public SetfFuelConsumption(consumption: f32): void;
298
+
299
+ /**
300
+ * Set fuel consumption rate.
301
+ *
302
+ * @param consumption - Fuel consumption rate.
303
+ */
304
+ public set_fuel_consumption(consumption: f32): void;
305
+
306
+ /**
307
+ * Set fuel tank capacity.
308
+ *
309
+ * @param fuel - Fuel tank capacity.
310
+ */
311
+ public SetfFuelTank(fuel: f32): void;
312
+
313
+ /**
314
+ * Set fuel tank capacity.
315
+ *
316
+ * @param fuel - Fuel tank capacity.
317
+ */
318
+ public set_fuel_tank(fuel: f32): void;
319
+
320
+ /**
321
+ * Set vehicle health.
322
+ *
323
+ * @param health - New health value.
324
+ */
325
+ public SetfHealth(health: f32): void;
326
+
327
+ /**
328
+ * @returns Whether vehicle engine is active at the moment.
329
+ */
330
+ public IsActiveEngine(): boolean;
331
+
332
+ /**
333
+ * Start vehicle engine.
334
+ */
335
+ public StartEngine(): void;
336
+
337
+ /**
338
+ * Stop vehicle engine.
339
+ */
340
+ public StopEngine(): void;
341
+
342
+ /**
343
+ * Set vehicle hand break in active state.
344
+ */
345
+ public HandBreak(): void;
346
+
347
+ /**
348
+ * Deactivate vehicle hand break.
349
+ */
350
+ public ReleaseHandBreak(): void;
351
+
352
+ /**
353
+ * @returns Current vehicle RPM value (speed).
354
+ */
355
+ public GetRPM(): f32;
356
+
357
+ /**
358
+ * Set current vehicle RPM value (speed).
359
+ *
360
+ * @param rpm - RPM value to apply.
361
+ */
362
+ public SetRPM(rpm: f32): void;
363
+
364
+ /**
365
+ * Stop car damage particles.
366
+ */
367
+ public StopDamageParticles(): void;
368
+
369
+ /**
370
+ * @returns Whether the actor is currently attached to this holder.
371
+ */
372
+ public engaged(): boolean;
373
+
374
+ /**
375
+ * Send a holder or weapon action.
376
+ *
377
+ * @param id - Action id.
378
+ * @param flags - Action flags.
379
+ */
380
+ public Action(id: u16, flags: u32): void;
381
+
382
+ /**
383
+ * Set a mounted weapon vector parameter.
384
+ *
385
+ * @param id - Weapon parameter id.
386
+ * @param vector - Parameter value.
387
+ */
388
+ public SetParam(id: i32, vector: vector): void;
389
+
390
+ /**
391
+ * Set a mounted weapon vector parameter.
392
+ *
393
+ * @param id - Weapon parameter id.
394
+ * @param vector - Parameter value.
395
+ */
396
+ public SetParam(id: TXR_CCar_weapon_param, vector: vector): void;
397
+ }
398
+
399
+ /**
400
+ * @group xr_level
401
+ */
402
+ export type TXR_CCar_weapon_param = EnumeratedStaticsValues<typeof CCar>;
403
+
404
+ /**
405
+ * Script-controlled helicopter object.
406
+ *
407
+ * @source C++ class CHelicopter : CGameObject
408
+ * @customConstructor CHelicopter
409
+ * @group xr_level
410
+ *
411
+ * @remarks
412
+ * Helicopter controls require a helicopter object. Movement, enemy, lighting, and fire-trail setters are direct
413
+ * native control hooks and do not validate scenario logic.
414
+ */
415
+ export class CHelicopter extends CGameObject {
416
+ /**
417
+ * Engine enum value for `CHelicopter.eAlive`.
418
+ */
419
+ public static readonly eAlive: 0;
420
+ /**
421
+ * Engine enum value for `CHelicopter.eBodyByPath`.
422
+ */
423
+ public static readonly eBodyByPath: 0;
424
+ /**
425
+ * Engine enum value for `CHelicopter.eBodyToPoint`.
426
+ */
427
+ public static readonly eBodyToPoint: 1;
428
+ /**
429
+ * Engine enum value for `CHelicopter.eDead`.
430
+ */
431
+ public static readonly eDead: 1;
432
+ /**
433
+ * Engine enum value for `CHelicopter.eEnemyEntity`.
434
+ */
435
+ public static readonly eEnemyEntity: 2;
436
+ /**
437
+ * Engine enum value for `CHelicopter.eEnemyNone`.
438
+ */
439
+ public static readonly eEnemyNone: 0;
440
+ /**
441
+ * Engine enum value for `CHelicopter.eEnemyPoint`.
442
+ */
443
+ public static readonly eEnemyPoint: 1;
444
+ /**
445
+ * Engine enum value for `CHelicopter.eMovLanding`.
446
+ */
447
+ public static readonly eMovLanding: 4;
448
+ /**
449
+ * Engine enum value for `CHelicopter.eMovNone`.
450
+ */
451
+ public static readonly eMovNone: 0;
452
+ /**
453
+ * Engine enum value for `CHelicopter.eMovPatrolPath`.
454
+ */
455
+ public static readonly eMovPatrolPath: 2;
456
+ /**
457
+ * Engine enum value for `CHelicopter.eMovRoundPath`.
458
+ */
459
+ public static readonly eMovRoundPath: 3;
460
+ /**
461
+ * Engine enum value for `CHelicopter.eMovTakeOff`.
462
+ */
463
+ public static readonly eMovTakeOff: 5;
464
+ /**
465
+ * Engine enum value for `CHelicopter.eMovToPoint`.
466
+ */
467
+ public static readonly eMovToPoint: 1;
468
+
469
+ /**
470
+ * Whether the helicopter explosion has already been triggered.
471
+ */
472
+ public readonly m_exploded: boolean;
473
+
474
+ /**
475
+ * Whether helicopter lights are currently started.
476
+ */
477
+ public readonly m_light_started: boolean;
478
+
479
+ /**
480
+ * Whether flame effects are currently started.
481
+ */
482
+ public readonly m_flame_started: boolean;
483
+
484
+ /**
485
+ * Whether the helicopter is marked dead.
486
+ */
487
+ public readonly m_dead: boolean;
488
+
489
+ /**
490
+ * Maximum machine-gun attack distance.
491
+ */
492
+ public m_max_mgun_dist: f32;
493
+
494
+ /**
495
+ * Maximum rocket attack distance.
496
+ */
497
+ public m_max_rocket_dist: f32;
498
+
499
+ /**
500
+ * Minimum machine-gun attack distance.
501
+ */
502
+ public m_min_mgun_dist: f32;
503
+
504
+ /**
505
+ * Minimum rocket attack distance.
506
+ */
507
+ public m_min_rocket_dist: f32;
508
+
509
+ /**
510
+ * Whether rocket firing is synchronized with the helicopter attack logic.
511
+ */
512
+ public m_syncronize_rocket: boolean;
513
+
514
+ /**
515
+ * Delay between rocket attacks.
516
+ */
517
+ public m_time_between_rocket_attack: u32;
518
+
519
+ /**
520
+ * Whether machine-gun attacks are enabled.
521
+ */
522
+ public m_use_mgun_on_attack: boolean;
523
+
524
+ /**
525
+ * Whether rocket attacks are enabled.
526
+ */
527
+ public m_use_rocket_on_attack: boolean;
528
+
529
+ /**
530
+ * Create a helicopter object wrapper.
531
+ */
532
+ public constructor();
533
+
534
+ /**
535
+ * Check whether an object is visible to the helicopter.
536
+ *
537
+ * @param game_object - Object to test.
538
+ * @returns Whether the object is visible.
539
+ */
540
+ public isVisible(game_object: game_object): boolean;
541
+
542
+ /**
543
+ * @returns Safe altitude configured for the movement manager.
544
+ */
545
+ public GetSafeAltitude(): f32;
546
+
547
+ /**
548
+ * @returns Current real altitude above terrain.
549
+ */
550
+ public GetRealAltitude(): f32;
551
+
552
+ /**
553
+ * @returns Current scalar velocity.
554
+ */
555
+ public GetCurrVelocity(): f32;
556
+
557
+ /**
558
+ * Get desired speed near the destination point.
559
+ *
560
+ * @param value - Distance threshold.
561
+ * @returns Speed at that destination distance.
562
+ */
563
+ public GetSpeedInDestPoint(value: f32): f32;
564
+
565
+ /**
566
+ * @returns Distance at which the helicopter treats a point as reached.
567
+ */
568
+ public GetOnPointRangeDist(): f32;
569
+
570
+ /**
571
+ * @returns Maximum movement velocity.
572
+ */
573
+ public GetMaxVelocity(): f32;
574
+
575
+ /**
576
+ * @returns Helicopter health.
577
+ */
578
+ public GetfHealth(): f32;
579
+
580
+ /**
581
+ * @returns Current movement state.
582
+ */
583
+ public GetMovementState(): i32; /* Enum ? */
584
+
585
+ /**
586
+ * @returns Current body aiming state.
587
+ */
588
+ public GetBodyState(): i32; /* Enum ? */
589
+
590
+ /**
591
+ * @returns Current velocity vector.
592
+ */
593
+ public GetCurrVelocityVec(): vector;
594
+
595
+ /**
596
+ * @returns Alive/dead state.
597
+ */
598
+ public GetState(): i32;
599
+
600
+ /**
601
+ * @returns Distance to destination position.
602
+ */
603
+ public GetDistanceToDestPosition(): f32;
604
+
605
+ /**
606
+ * @returns Current enemy tracking state.
607
+ */
608
+ public GetHuntState(): i32; /* Enum ? */
609
+
610
+ /**
611
+ * Set desired speed near the destination point.
612
+ *
613
+ * @param value - Speed value.
614
+ */
615
+ public SetSpeedInDestPoint(value: f32): unknown;
616
+
617
+ /**
618
+ * Set linear acceleration limits.
619
+ *
620
+ * @param min - Minimum acceleration.
621
+ * @param max - Maximum acceleration.
622
+ */
623
+ public SetLinearAcc(min: f32, max: f32): void;
624
+
625
+ /**
626
+ * Set helicopter health.
627
+ *
628
+ * @param health - New health value.
629
+ * @returns Applied health value.
630
+ */
631
+ public SetfHealth(health: f32): f32;
632
+
633
+ /**
634
+ * Set maximum movement velocity.
635
+ *
636
+ * @param value - Maximum velocity.
637
+ */
638
+ public SetMaxVelocity(value: f32): void;
639
+
640
+ /**
641
+ * Track an enemy object.
642
+ *
643
+ * @param game_object - Enemy object, or null to clear.
644
+ */
645
+ public SetEnemy(game_object: game_object | null): void;
646
+
647
+ /**
648
+ * Track an enemy point.
649
+ *
650
+ * @param position - Enemy world position.
651
+ */
652
+ public SetEnemy(position: vector): void;
653
+
654
+ /**
655
+ * Set fire trail length.
656
+ *
657
+ * @param value - Trail length.
658
+ */
659
+ public SetFireTrailLength(value: f32): void;
660
+
661
+ /**
662
+ * Set allowed barrel direction tolerance.
663
+ *
664
+ * @param value - Tolerance value.
665
+ */
666
+ public SetBarrelDirTolerance(value: f32): void;
667
+
668
+ /**
669
+ * Set movement destination.
670
+ *
671
+ * @param position - Destination world position.
672
+ */
673
+ public SetDestPosition(position: vector): void;
674
+
675
+ /**
676
+ * Set point reach distance.
677
+ *
678
+ * @param distance - Reach distance.
679
+ */
680
+ public SetOnPointRangeDist(distance: f32): void;
681
+
682
+ /**
683
+ * Aim the helicopter body at a point.
684
+ *
685
+ * @param position - Point to look at.
686
+ * @param is_smooth - Whether to rotate smoothly.
687
+ */
688
+ public LookAtPoint(position: vector, is_smooth: boolean): void;
689
+
690
+ /**
691
+ * Move by a patrol path.
692
+ *
693
+ * @param path_name - Patrol path name.
694
+ * @param start_point - Starting point index.
695
+ */
696
+ public GoPatrolByPatrolPath(path_name: string, start_point: i32): void;
697
+
698
+ /**
699
+ * Explode the helicopter.
700
+ */
701
+ public Explode(): void;
702
+
703
+ /**
704
+ * Turn helicopter lighting on or off.
705
+ *
706
+ * @param is_enabled - New lighting state.
707
+ */
708
+ public TurnLighting(is_enabled: boolean): void;
709
+
710
+ /**
711
+ * @returns Whether fire trail rendering is enabled.
712
+ */
713
+ public UseFireTrail(): boolean;
714
+
715
+ /**
716
+ * Enable or disable fire trail rendering.
717
+ *
718
+ * @param is_enabled - New fire trail state.
719
+ */
720
+ public UseFireTrail(is_enabled: boolean): void;
721
+
722
+ /**
723
+ * Move around a point by a round patrol path.
724
+ *
725
+ * @param center - Round path center.
726
+ * @param radius - Path radius.
727
+ * @param clockwise - Whether to move clockwise.
728
+ */
729
+ public GoPatrolByRoundPath(center: vector, radius: f32, clockwise: boolean): void;
730
+
731
+ /**
732
+ * Kill the helicopter without running a full explosion command.
733
+ */
734
+ public Die(): void;
735
+
736
+ /**
737
+ * Start flame effects.
738
+ */
739
+ public StartFlame(): void;
740
+
741
+ /**
742
+ * Turn engine sound on or off.
743
+ *
744
+ * @param enabled - New sound state.
745
+ */
746
+ public TurnEngineSound(enabled: boolean): void;
747
+
748
+ /**
749
+ * Clear current enemy target.
750
+ */
751
+ public ClearEnemy(): void;
752
+ }
753
+ }