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