xray16 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/xr_ai/xr_action.d.ts +1321 -29
- package/types/xr_ai/xr_alife.d.ts +1336 -32
- package/types/xr_ai/xr_enemy_evaluation.d.ts +112 -19
- package/types/xr_ai/xr_goap.d.ts +450 -3
- package/types/xr_ai/xr_graph.d.ts +94 -6
- package/types/xr_ai/xr_memory.d.ts +240 -6
- package/types/xr_lib/xr_animation.d.ts +185 -14
- package/types/xr_lib/xr_bitwise.d.ts +20 -8
- package/types/xr_lib/xr_color.d.ts +103 -6
- package/types/xr_lib/xr_debug.d.ts +110 -12
- package/types/xr_lib/xr_dialog.d.ts +99 -7
- package/types/xr_lib/xr_flags.d.ts +78 -15
- package/types/xr_lib/xr_fs.d.ts +395 -5
- package/types/xr_lib/xr_game.d.ts +101 -0
- package/types/xr_lib/xr_hit.d.ts +84 -0
- package/types/xr_lib/xr_ini.d.ts +60 -2
- package/types/xr_lib/xr_level.d.ts +182 -39
- package/types/xr_lib/xr_luabind.d.ts +37 -11
- package/types/xr_lib/xr_map.d.ts +137 -6
- package/types/xr_lib/xr_math.d.ts +56 -0
- package/types/xr_lib/xr_multiplayer.d.ts +729 -1
- package/types/xr_lib/xr_profile.d.ts +80 -0
- package/types/xr_lib/xr_properties.d.ts +159 -4
- package/types/xr_lib/xr_relation.d.ts +147 -0
- package/types/xr_lib/xr_render.d.ts +99 -3
- package/types/xr_lib/xr_save.d.ts +110 -4
- package/types/xr_lib/xr_sound.d.ts +373 -9
- package/types/xr_lib/xr_stats.ts +33 -4
- package/types/xr_lib/xr_task.d.ts +277 -0
- package/types/xr_lib/xr_time.d.ts +11 -0
- package/types/xr_object/client/xr_anomaly.d.ts +20 -0
- package/types/xr_object/client/xr_artefact.d.ts +57 -2
- package/types/xr_object/client/xr_client_object.d.ts +131 -0
- package/types/xr_object/client/xr_creature.d.ts +79 -0
- package/types/xr_object/client/xr_item.d.ts +108 -2
- package/types/xr_object/client/xr_level.d.ts +482 -14
- package/types/xr_object/client/xr_physic.d.ts +459 -29
- package/types/xr_object/client/xr_zone.d.ts +38 -0
- package/types/xr_object/script/xr_script_interface.d.ts +236 -1
- package/types/xr_object/script/xr_script_object.d.ts +3402 -82
- package/types/xr_object/script/xr_script_trade.d.ts +25 -15
- package/types/xr_object/server/xr_server_object.d.ts +707 -15
- package/types/xr_ui/xr_ui_asset.d.ts +241 -6
- package/types/xr_ui/xr_ui_core.d.ts +327 -9
- package/types/xr_ui/xr_ui_event.d.ts +1067 -1
- package/types/xr_ui/xr_ui_interface.d.ts +1563 -17
- package/types/xr_ui/xr_ui_menu.d.ts +259 -16
- package/types/xrf_plugin.d.ts +44 -14
|
@@ -1,71 +1,268 @@
|
|
|
1
1
|
declare module "xray16" {
|
|
2
2
|
/**
|
|
3
|
+
* Current playback parameters for a launched sound.
|
|
4
|
+
*
|
|
3
5
|
* @source C++ class sound_params
|
|
4
6
|
* @customConstructor sound_params
|
|
5
7
|
* @group xr_sound
|
|
6
8
|
*/
|
|
7
9
|
export class sound_params {
|
|
10
|
+
/**
|
|
11
|
+
* Playback frequency multiplier.
|
|
12
|
+
*/
|
|
8
13
|
public frequency: f32;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Maximum audible distance in meters.
|
|
17
|
+
*/
|
|
9
18
|
public max_distance: f32;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Minimum distance before attenuation starts.
|
|
22
|
+
*/
|
|
10
23
|
public min_distance: f32;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Current sound position.
|
|
27
|
+
*/
|
|
11
28
|
public position: vector;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Playback volume.
|
|
32
|
+
*/
|
|
12
33
|
public volume: f32;
|
|
13
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Engine-created playback parameters.
|
|
37
|
+
*/
|
|
14
38
|
private constructor();
|
|
15
39
|
}
|
|
16
40
|
|
|
17
41
|
/**
|
|
42
|
+
* Play an engine sound resource from scripts.
|
|
43
|
+
*
|
|
18
44
|
* @source C++ class sound_object
|
|
19
45
|
* @customConstructor sound_object
|
|
20
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.
|
|
21
51
|
*/
|
|
22
52
|
export class sound_object {
|
|
53
|
+
/**
|
|
54
|
+
* Spatial 3D playback.
|
|
55
|
+
*/
|
|
23
56
|
public static s3d: 0;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Keep playing until stopped.
|
|
60
|
+
*/
|
|
24
61
|
public static looped: 1;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Screen-space 2D playback.
|
|
65
|
+
*/
|
|
25
66
|
public static s2d: 2;
|
|
26
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Playback frequency multiplier.
|
|
70
|
+
*/
|
|
27
71
|
public frequency: f32;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Maximum audible distance in meters.
|
|
75
|
+
*/
|
|
28
76
|
public max_distance: f32;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Minimum distance before attenuation starts.
|
|
80
|
+
*/
|
|
29
81
|
public min_distance: f32;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Playback volume.
|
|
85
|
+
*/
|
|
30
86
|
public volume: f32;
|
|
31
87
|
|
|
32
88
|
/**
|
|
33
|
-
*
|
|
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.
|
|
34
96
|
*/
|
|
35
97
|
public constructor(sound_path: string);
|
|
98
|
+
|
|
36
99
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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.
|
|
39
108
|
*/
|
|
40
109
|
public constructor(sound_path: string, type: TXR_snd_type);
|
|
41
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
|
+
*/
|
|
42
119
|
public length(): u32;
|
|
43
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
|
+
*/
|
|
44
129
|
public playing(): boolean;
|
|
45
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
|
+
*/
|
|
46
139
|
public get_position(): vector;
|
|
47
140
|
|
|
48
|
-
|
|
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;
|
|
49
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
|
+
*/
|
|
50
158
|
public attach_tail(sound_path: string): void;
|
|
51
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
|
+
*/
|
|
52
167
|
public play(object: game_object | null): void;
|
|
53
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
|
+
*/
|
|
54
177
|
public play(object: game_object | null, delay: f32): void;
|
|
55
178
|
|
|
56
|
-
|
|
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;
|
|
57
189
|
|
|
58
|
-
|
|
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;
|
|
59
199
|
|
|
60
|
-
|
|
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;
|
|
61
210
|
|
|
62
|
-
|
|
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;
|
|
63
222
|
|
|
64
|
-
|
|
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;
|
|
65
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Stop playback immediately.
|
|
242
|
+
*
|
|
243
|
+
* @throws If the sound handle was not created.
|
|
244
|
+
*/
|
|
66
245
|
public stop(): void;
|
|
67
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
|
+
*/
|
|
68
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;
|
|
69
266
|
}
|
|
70
267
|
|
|
71
268
|
/**
|
|
@@ -74,58 +271,201 @@ declare module "xray16" {
|
|
|
74
271
|
export type TXR_sound_object_type = EnumeratedStaticsValues<typeof sound_object>;
|
|
75
272
|
|
|
76
273
|
/**
|
|
274
|
+
* Sound category constants used by AI sound memory and sound playback.
|
|
275
|
+
*
|
|
77
276
|
* @source C++ class snd_type
|
|
78
277
|
* @customConstructor snd_type
|
|
79
278
|
* @group xr_sound
|
|
80
279
|
*/
|
|
81
280
|
export class snd_type {
|
|
281
|
+
/**
|
|
282
|
+
* Engine enum value for `snd_type.ambient`.
|
|
283
|
+
*/
|
|
82
284
|
public static ambient: 128;
|
|
285
|
+
/**
|
|
286
|
+
* Engine enum value for `snd_type.anomaly`.
|
|
287
|
+
*/
|
|
83
288
|
public static anomaly: 268435456;
|
|
289
|
+
/**
|
|
290
|
+
* Engine enum value for `snd_type.anomaly_idle`.
|
|
291
|
+
*/
|
|
84
292
|
public static anomaly_idle: 268437504;
|
|
293
|
+
/**
|
|
294
|
+
* Engine enum value for `snd_type.attack`.
|
|
295
|
+
*/
|
|
85
296
|
public static attack: 8192;
|
|
297
|
+
/**
|
|
298
|
+
* Engine enum value for `snd_type.bullet_hit`.
|
|
299
|
+
*/
|
|
86
300
|
public static bullet_hit: 524288;
|
|
301
|
+
/**
|
|
302
|
+
* Engine enum value for `snd_type.die`.
|
|
303
|
+
*/
|
|
87
304
|
public static die: 131072;
|
|
305
|
+
/**
|
|
306
|
+
* Engine enum value for `snd_type.drop`.
|
|
307
|
+
*/
|
|
88
308
|
public static drop: 33554432;
|
|
309
|
+
/**
|
|
310
|
+
* Engine enum value for `snd_type.eat`.
|
|
311
|
+
*/
|
|
89
312
|
public static eat: 4096;
|
|
313
|
+
/**
|
|
314
|
+
* Engine enum value for `snd_type.empty`.
|
|
315
|
+
*/
|
|
90
316
|
public static empty: 1048576;
|
|
317
|
+
/**
|
|
318
|
+
* Engine enum value for `snd_type.hide`.
|
|
319
|
+
*/
|
|
91
320
|
public static hide: 16777216;
|
|
321
|
+
/**
|
|
322
|
+
* Engine enum value for `snd_type.idle`.
|
|
323
|
+
*/
|
|
92
324
|
public static idle: 2048;
|
|
325
|
+
/**
|
|
326
|
+
* Engine enum value for `snd_type.injure`.
|
|
327
|
+
*/
|
|
93
328
|
public static injure: 65536;
|
|
329
|
+
/**
|
|
330
|
+
* Engine enum value for `snd_type.item`.
|
|
331
|
+
*/
|
|
94
332
|
public static item: 1073741824;
|
|
333
|
+
/**
|
|
334
|
+
* Engine enum value for `snd_type.item_drop`.
|
|
335
|
+
*/
|
|
95
336
|
public static item_drop: 1107296256;
|
|
337
|
+
/**
|
|
338
|
+
* Engine enum value for `snd_type.item_hide`.
|
|
339
|
+
*/
|
|
96
340
|
public static item_hide: 1090519040;
|
|
341
|
+
/**
|
|
342
|
+
* Engine enum value for `snd_type.item_pick_up`.
|
|
343
|
+
*/
|
|
97
344
|
public static item_pick_up: 1140850688;
|
|
345
|
+
/**
|
|
346
|
+
* Engine enum value for `snd_type.item_take`.
|
|
347
|
+
*/
|
|
98
348
|
public static item_take: 1082130432;
|
|
349
|
+
/**
|
|
350
|
+
* Engine enum value for `snd_type.item_use`.
|
|
351
|
+
*/
|
|
99
352
|
public static item_use: 1077936128;
|
|
353
|
+
/**
|
|
354
|
+
* Engine enum value for `snd_type.monster`.
|
|
355
|
+
*/
|
|
100
356
|
public static monster: 536870912;
|
|
357
|
+
/**
|
|
358
|
+
* Engine enum value for `snd_type.monster_attack`.
|
|
359
|
+
*/
|
|
101
360
|
public static monster_attack: 536879104;
|
|
361
|
+
/**
|
|
362
|
+
* Engine enum value for `snd_type.monster_die`.
|
|
363
|
+
*/
|
|
102
364
|
public static monster_die: 537001984;
|
|
365
|
+
/**
|
|
366
|
+
* Engine enum value for `snd_type.monster_eat`.
|
|
367
|
+
*/
|
|
103
368
|
public static monster_eat: 536875008;
|
|
369
|
+
/**
|
|
370
|
+
* Engine enum value for `snd_type.monster_injure`.
|
|
371
|
+
*/
|
|
104
372
|
public static monster_injure: 536936448;
|
|
373
|
+
/**
|
|
374
|
+
* Engine enum value for `snd_type.monster_step`.
|
|
375
|
+
*/
|
|
105
376
|
public static monster_step: 536903680;
|
|
377
|
+
/**
|
|
378
|
+
* Engine enum value for `snd_type.monster_talk`.
|
|
379
|
+
*/
|
|
106
380
|
public static monster_talk: 536887296;
|
|
381
|
+
/**
|
|
382
|
+
* Engine enum value for `snd_type.no_sound`.
|
|
383
|
+
*/
|
|
107
384
|
public static no_sound: 0;
|
|
385
|
+
/**
|
|
386
|
+
* Engine enum value for `snd_type.object_break`.
|
|
387
|
+
*/
|
|
108
388
|
public static object_break: 1024;
|
|
389
|
+
/**
|
|
390
|
+
* Engine enum value for `snd_type.object_collide`.
|
|
391
|
+
*/
|
|
109
392
|
public static object_collide: 512;
|
|
393
|
+
/**
|
|
394
|
+
* Engine enum value for `snd_type.object_explode`.
|
|
395
|
+
*/
|
|
110
396
|
public static object_explode: 256;
|
|
397
|
+
/**
|
|
398
|
+
* Engine enum value for `snd_type.pick_up`.
|
|
399
|
+
*/
|
|
111
400
|
public static pick_up: 67108864;
|
|
401
|
+
/**
|
|
402
|
+
* Engine enum value for `snd_type.reload`.
|
|
403
|
+
*/
|
|
112
404
|
public static reload: 262144;
|
|
405
|
+
/**
|
|
406
|
+
* Engine enum value for `snd_type.shoot`.
|
|
407
|
+
*/
|
|
113
408
|
public static shoot: 2097152;
|
|
409
|
+
/**
|
|
410
|
+
* Engine enum value for `snd_type.step`.
|
|
411
|
+
*/
|
|
114
412
|
public static step: 32768;
|
|
413
|
+
/**
|
|
414
|
+
* Engine enum value for `snd_type.take`.
|
|
415
|
+
*/
|
|
115
416
|
public static take: 8388608;
|
|
417
|
+
/**
|
|
418
|
+
* Engine enum value for `snd_type.talk`.
|
|
419
|
+
*/
|
|
116
420
|
public static talk: 16384;
|
|
421
|
+
/**
|
|
422
|
+
* Engine enum value for `snd_type.use`.
|
|
423
|
+
*/
|
|
117
424
|
public static use: 4194304;
|
|
425
|
+
/**
|
|
426
|
+
* Engine enum value for `snd_type.weapon`.
|
|
427
|
+
*/
|
|
118
428
|
public static weapon: -2147483648;
|
|
429
|
+
/**
|
|
430
|
+
* Engine enum value for `snd_type.weapon_bullet_hit`.
|
|
431
|
+
*/
|
|
119
432
|
public static weapon_bullet_hit: -2146959360;
|
|
433
|
+
/**
|
|
434
|
+
* Engine enum value for `snd_type.weapon_empty`.
|
|
435
|
+
*/
|
|
120
436
|
public static weapon_empty: -2146435072;
|
|
437
|
+
/**
|
|
438
|
+
* Engine enum value for `snd_type.weapon_reload`.
|
|
439
|
+
*/
|
|
121
440
|
public static weapon_reload: -2147221504;
|
|
441
|
+
/**
|
|
442
|
+
* Engine enum value for `snd_type.weapon_shoot`.
|
|
443
|
+
*/
|
|
122
444
|
public static weapon_shoot: -2145386496;
|
|
445
|
+
/**
|
|
446
|
+
* Engine enum value for `snd_type.world`.
|
|
447
|
+
*/
|
|
123
448
|
public static world: 134217728;
|
|
449
|
+
/**
|
|
450
|
+
* Engine enum value for `snd_type.world_ambient`.
|
|
451
|
+
*/
|
|
124
452
|
public static world_ambient: 134217856;
|
|
453
|
+
/**
|
|
454
|
+
* Engine enum value for `snd_type.world_object_break`.
|
|
455
|
+
*/
|
|
125
456
|
public static world_object_break: 134218752;
|
|
457
|
+
/**
|
|
458
|
+
* Engine enum value for `snd_type.world_object_collide`.
|
|
459
|
+
*/
|
|
126
460
|
public static world_object_collide: 134218240;
|
|
461
|
+
/**
|
|
462
|
+
* Engine enum value for `snd_type.world_object_explode`.
|
|
463
|
+
*/
|
|
127
464
|
public static world_object_explode: 134217984;
|
|
128
465
|
|
|
466
|
+
/**
|
|
467
|
+
* Engine-owned sound category constants.
|
|
468
|
+
*/
|
|
129
469
|
private constructor();
|
|
130
470
|
}
|
|
131
471
|
|
|
@@ -135,17 +475,41 @@ declare module "xray16" {
|
|
|
135
475
|
export type TXR_snd_type = EnumeratedStaticsValues<typeof snd_type>;
|
|
136
476
|
|
|
137
477
|
/**
|
|
478
|
+
* Last sound perceived by an object.
|
|
479
|
+
*
|
|
138
480
|
* @source C++ class SoundInfo
|
|
139
481
|
* @customConstructor SoundInfo
|
|
140
482
|
* @group xr_sound
|
|
141
483
|
*/
|
|
142
484
|
export class SoundInfo {
|
|
485
|
+
/**
|
|
486
|
+
* Whether the sound is considered dangerous.
|
|
487
|
+
*/
|
|
143
488
|
public danger: i32;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Sound origin position.
|
|
492
|
+
*/
|
|
144
493
|
public position: vector;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Perceived sound power.
|
|
497
|
+
*/
|
|
145
498
|
public power: f32;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Level time when the sound was perceived.
|
|
502
|
+
*/
|
|
146
503
|
public time: i32;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Object that produced the sound.
|
|
507
|
+
*/
|
|
147
508
|
public who: game_object;
|
|
148
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Engine-created perceived sound info.
|
|
512
|
+
*/
|
|
149
513
|
private constructor();
|
|
150
514
|
}
|
|
151
515
|
}
|
package/types/xr_lib/xr_stats.ts
CHANGED
|
@@ -1,19 +1,48 @@
|
|
|
1
1
|
declare module "xray16" {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Actor statistics helpers exposed through the `actor_stats` namespace.
|
|
4
|
+
*
|
|
4
5
|
* @group xr_stats
|
|
5
6
|
*/
|
|
6
7
|
export interface IXR_actor_stats {
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Add actor statistic points with a string value.
|
|
10
|
+
*
|
|
11
|
+
* @param section - Statistic section id.
|
|
12
|
+
* @param detail_key - Detail key inside the section.
|
|
13
|
+
* @param value - String value to add.
|
|
14
|
+
*/
|
|
15
|
+
add_points_str(this: void, section: string, detail_key: string, value: string): void;
|
|
8
16
|
|
|
9
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Get total actor points for a statistic section.
|
|
19
|
+
*
|
|
20
|
+
* @param section - Statistic section id.
|
|
21
|
+
* @returns Section points.
|
|
22
|
+
*/
|
|
23
|
+
get_points(this: void, section: string): i32;
|
|
10
24
|
|
|
11
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Add actor statistic points with count and score.
|
|
27
|
+
*
|
|
28
|
+
* @param section - Statistic section id.
|
|
29
|
+
* @param detail_key - Detail key inside the section.
|
|
30
|
+
* @param count - Count to add.
|
|
31
|
+
* @param points - Points to add.
|
|
32
|
+
*/
|
|
33
|
+
add_points(this: void, section: string, detail_key: string, count: i32, points: i32): void;
|
|
12
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Remove an object from actor ranking when this optional binding exists.
|
|
37
|
+
*
|
|
38
|
+
* @param object_id - Object id to remove.
|
|
39
|
+
*/
|
|
13
40
|
remove_from_ranking(this: void, object_id: number): void | null;
|
|
14
41
|
}
|
|
15
42
|
|
|
16
43
|
/**
|
|
44
|
+
* Actor statistics namespace.
|
|
45
|
+
*
|
|
17
46
|
* @group xr_stats
|
|
18
47
|
*/
|
|
19
48
|
export const actor_stats: IXR_actor_stats;
|