xray16 1.6.0 → 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.
- package/package.json +12 -6
- package/xray16.d.ts +30847 -0
- package/types/index.d.ts +0 -55
- package/types/internal.d.ts +0 -6
- package/types/xr_ai/xr_action.d.ts +0 -1803
- package/types/xr_ai/xr_alife.d.ts +0 -1872
- package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
- package/types/xr_ai/xr_goap.d.ts +0 -1118
- package/types/xr_ai/xr_graph.d.ts +0 -135
- package/types/xr_ai/xr_memory.d.ts +0 -384
- package/types/xr_lib/xr_animation.d.ts +0 -252
- package/types/xr_lib/xr_bitwise.d.ts +0 -44
- package/types/xr_lib/xr_color.d.ts +0 -142
- package/types/xr_lib/xr_debug.d.ts +0 -183
- package/types/xr_lib/xr_dialog.d.ts +0 -132
- package/types/xr_lib/xr_flags.d.ts +0 -592
- package/types/xr_lib/xr_fs.d.ts +0 -617
- package/types/xr_lib/xr_game.d.ts +0 -362
- package/types/xr_lib/xr_hit.d.ts +0 -127
- package/types/xr_lib/xr_ini.d.ts +0 -475
- package/types/xr_lib/xr_level.d.ts +0 -797
- package/types/xr_lib/xr_luabind.d.ts +0 -90
- package/types/xr_lib/xr_map.d.ts +0 -194
- package/types/xr_lib/xr_math.d.ts +0 -871
- package/types/xr_lib/xr_multiplayer.d.ts +0 -1081
- package/types/xr_lib/xr_profile.d.ts +0 -272
- package/types/xr_lib/xr_properties.d.ts +0 -612
- package/types/xr_lib/xr_relation.d.ts +0 -231
- package/types/xr_lib/xr_render.d.ts +0 -167
- package/types/xr_lib/xr_save.d.ts +0 -835
- package/types/xr_lib/xr_sound.d.ts +0 -517
- package/types/xr_lib/xr_stats.ts +0 -51
- package/types/xr_lib/xr_task.d.ts +0 -390
- package/types/xr_lib/xr_time.d.ts +0 -177
- package/types/xr_lib/xr_type.d.ts +0 -70
- package/types/xr_object/client/xr_anomaly.d.ts +0 -70
- package/types/xr_object/client/xr_artefact.d.ts +0 -153
- package/types/xr_object/client/xr_client_object.d.ts +0 -207
- package/types/xr_object/client/xr_creature.d.ts +0 -243
- package/types/xr_object/client/xr_item.d.ts +0 -370
- package/types/xr_object/client/xr_level.d.ts +0 -755
- package/types/xr_object/client/xr_physic.d.ts +0 -644
- package/types/xr_object/client/xr_zone.d.ts +0 -85
- package/types/xr_object/script/xr_script_interface.d.ts +0 -1142
- package/types/xr_object/script/xr_script_object.d.ts +0 -5702
- package/types/xr_object/script/xr_script_trade.d.ts +0 -51
- package/types/xr_object/server/xr_server_object.d.ts +0 -1488
- package/types/xr_ui/xr_ui_asset.d.ts +0 -364
- package/types/xr_ui/xr_ui_core.d.ts +0 -426
- package/types/xr_ui/xr_ui_event.d.ts +0 -1449
- package/types/xr_ui/xr_ui_interface.d.ts +0 -2449
- package/types/xr_ui/xr_ui_menu.d.ts +0 -401
- package/types/xrf_plugin.d.ts +0 -111
|
@@ -1,644 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* One rigid body element inside a physics shell.
|
|
4
|
-
*
|
|
5
|
-
* @source C++ class physics_element
|
|
6
|
-
* @customConstructor physics_element
|
|
7
|
-
* @group xr_physic
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Scripts normally receive elements from a `physics_shell`; they are live engine objects, not standalone values. Keep
|
|
11
|
-
* them only while the owning shell and object are alive.
|
|
12
|
-
*/
|
|
13
|
-
export class physics_element {
|
|
14
|
-
/**
|
|
15
|
-
* Apply force to the element.
|
|
16
|
-
*
|
|
17
|
-
* @param x - Force x component.
|
|
18
|
-
* @param y - Force y component.
|
|
19
|
-
* @param z - Force z component.
|
|
20
|
-
*/
|
|
21
|
-
public apply_force(x: f32, y: f32, z: f32): void;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Fix the element in place.
|
|
25
|
-
*/
|
|
26
|
-
public fix(): void;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Write current angular velocity into a vector.
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
* The passed vector is overwritten.
|
|
33
|
-
*
|
|
34
|
-
* @param velocity - Output vector.
|
|
35
|
-
*/
|
|
36
|
-
public get_angular_vel(velocity: vector): void;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @returns Element density.
|
|
40
|
-
*/
|
|
41
|
-
public get_density(): f32;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Write current linear velocity into a vector.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* The passed vector is overwritten.
|
|
48
|
-
*
|
|
49
|
-
* @param velocity - Output vector.
|
|
50
|
-
*/
|
|
51
|
-
public get_linear_vel(velocity: vector): void;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @returns Element mass.
|
|
55
|
-
*/
|
|
56
|
-
public get_mass(): f32;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @returns Element volume.
|
|
60
|
-
*/
|
|
61
|
-
public get_volume(): f32;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @returns Current global transform.
|
|
65
|
-
*/
|
|
66
|
-
public global_transform(): matrix;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @returns Whether the element can break.
|
|
70
|
-
*/
|
|
71
|
-
public is_breakable(): boolean;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @returns Whether the element is fixed.
|
|
75
|
-
*/
|
|
76
|
-
public is_fixed(): boolean;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Release a fixed element.
|
|
80
|
-
*/
|
|
81
|
-
public release_fixed(): void;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Script-controlled particle system.
|
|
86
|
-
*
|
|
87
|
-
* @source C++ class particles_object
|
|
88
|
-
* @customConstructor particles_object
|
|
89
|
-
* @group xr_physic
|
|
90
|
-
*
|
|
91
|
-
* @remarks
|
|
92
|
-
* Path playback methods require a path loaded with `load_path()` first.
|
|
93
|
-
*/
|
|
94
|
-
export class particles_object {
|
|
95
|
-
/**
|
|
96
|
-
* @param name - Particle resource name.
|
|
97
|
-
*/
|
|
98
|
-
public constructor(name: string);
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Pause or resume the loaded particle path.
|
|
102
|
-
*
|
|
103
|
-
* @remarks
|
|
104
|
-
* Requires `load_path()` to have created the internal animator.
|
|
105
|
-
*
|
|
106
|
-
* @param is_paused - Whether path playback is paused.
|
|
107
|
-
*/
|
|
108
|
-
public pause_path(is_paused: boolean): void;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Play particles at a world position.
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* Updates the particle transform and starts non-looped playback.
|
|
115
|
-
*
|
|
116
|
-
* @param position - World position.
|
|
117
|
-
*/
|
|
118
|
-
public play_at_pos(position: vector): void;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Move particles and provide velocity for interpolation.
|
|
122
|
-
*
|
|
123
|
-
* @remarks
|
|
124
|
-
* Use this while an effect is already playing to keep its parent transform current.
|
|
125
|
-
*
|
|
126
|
-
* @param position - New world position.
|
|
127
|
-
* @param velocity - Current movement velocity.
|
|
128
|
-
*/
|
|
129
|
-
public move_to(position: vector, velocity: vector): void;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @returns Whether the particle system is looped.
|
|
133
|
-
*/
|
|
134
|
-
public looped(): boolean;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Load an object animator path for the particle system.
|
|
138
|
-
*
|
|
139
|
-
* @remarks
|
|
140
|
-
* Reuses the current animator when the same path is already loaded.
|
|
141
|
-
*
|
|
142
|
-
* @param path - Path name.
|
|
143
|
-
*/
|
|
144
|
-
public load_path(path: string): void;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Start moving along the loaded path.
|
|
148
|
-
*
|
|
149
|
-
* @remarks
|
|
150
|
-
* Requires `load_path()` first.
|
|
151
|
-
*
|
|
152
|
-
* @param is_looped - Whether path playback loops.
|
|
153
|
-
*/
|
|
154
|
-
public start_path(is_looped: boolean): void;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Stop particles immediately.
|
|
158
|
-
*/
|
|
159
|
-
public stop(): void;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Stop path playback.
|
|
163
|
-
*
|
|
164
|
-
* @remarks
|
|
165
|
-
* Requires `load_path()` first.
|
|
166
|
-
*/
|
|
167
|
-
public stop_path(): void;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Stop particles after existing particles finish.
|
|
171
|
-
*/
|
|
172
|
-
public stop_deffered(): void;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Start particle playback at the current transform.
|
|
176
|
-
*/
|
|
177
|
-
public play(): void;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* @returns Whether particles are currently playing.
|
|
181
|
-
*/
|
|
182
|
-
public playing(): boolean;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* @returns Last particle position.
|
|
186
|
-
*/
|
|
187
|
-
public last_position(): vector;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Set particle forward direction.
|
|
191
|
-
*
|
|
192
|
-
* @remarks
|
|
193
|
-
* Pass a meaningful direction vector; the engine builds the remaining basis vectors from it.
|
|
194
|
-
*
|
|
195
|
-
* @param direction - New normalized direction.
|
|
196
|
-
*/
|
|
197
|
-
public set_direction(direction: vector): void;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Set particle orientation.
|
|
201
|
-
*
|
|
202
|
-
* @param yaw - Yaw angle.
|
|
203
|
-
* @param pitch - Pitch angle.
|
|
204
|
-
* @param roll - Roll angle.
|
|
205
|
-
*/
|
|
206
|
-
public set_orientation(yaw: f32, pitch: f32, roll: f32): void;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Stop particles after existing particles finish.
|
|
210
|
-
*/
|
|
211
|
-
public stop_deferred(): void;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Joint connecting two physics elements.
|
|
216
|
-
*
|
|
217
|
-
* @source C++ class physics_joint
|
|
218
|
-
* @customConstructor physics_joint
|
|
219
|
-
* @group xr_physic
|
|
220
|
-
*
|
|
221
|
-
* @remarks
|
|
222
|
-
* Joint handles come from a `physics_shell`. Axis methods expect an axis supported by this joint; check
|
|
223
|
-
* `get_axes_number()` before using indexed axis methods. Keep them only while the owning shell and object are alive.
|
|
224
|
-
*/
|
|
225
|
-
export class physics_joint {
|
|
226
|
-
/**
|
|
227
|
-
* Write the joint anchor into a vector.
|
|
228
|
-
*
|
|
229
|
-
* @remarks
|
|
230
|
-
* The passed vector is overwritten. Slider joints do not have a defined anchor and trip a native assertion.
|
|
231
|
-
*
|
|
232
|
-
* @param anchor - Output anchor vector.
|
|
233
|
-
*/
|
|
234
|
-
public get_anchor(anchor: vector): void;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* @returns Number of controlled axes.
|
|
238
|
-
*/
|
|
239
|
-
public get_axes_number(): u16;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Get current angle for an axis.
|
|
243
|
-
*
|
|
244
|
-
* @remarks
|
|
245
|
-
* Use an axis index lower than `get_axes_number()`.
|
|
246
|
-
*
|
|
247
|
-
* @param axis - Axis index.
|
|
248
|
-
* @returns Axis angle.
|
|
249
|
-
*/
|
|
250
|
-
public get_axis_angle(axis: i32): f32;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Write axis direction into a vector.
|
|
254
|
-
*
|
|
255
|
-
* @remarks
|
|
256
|
-
* The passed vector is overwritten. Ball joints have no axis direction to write.
|
|
257
|
-
*
|
|
258
|
-
* @param axis - Axis index.
|
|
259
|
-
* @param direction - Output direction vector.
|
|
260
|
-
*/
|
|
261
|
-
public get_axis_dir(axis: i32, direction: vector): void;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* @returns Bone id associated with this joint.
|
|
265
|
-
*/
|
|
266
|
-
public get_bone_id(): u16;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* @returns First connected physics element.
|
|
270
|
-
*/
|
|
271
|
-
public get_first_element(): physics_element;
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Get angle limits for an axis.
|
|
275
|
-
*
|
|
276
|
-
* @remarks
|
|
277
|
-
* The first two parameters are Lua output placeholders; use the returned tuple in TypeScript.
|
|
278
|
-
*
|
|
279
|
-
* @param min - Output lower limit placeholder.
|
|
280
|
-
* @param max - Output upper limit placeholder.
|
|
281
|
-
* @param axis - Axis index.
|
|
282
|
-
* @returns Lower and upper limits.
|
|
283
|
-
*/
|
|
284
|
-
public get_limits(min: f32, max: f32, axis: i32): LuaMultiReturn<[number, number]>;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Get force and velocity limits for an axis.
|
|
288
|
-
*
|
|
289
|
-
* @remarks
|
|
290
|
-
* Native Lua writes through the first two parameters. In TypeScript, pass placeholders only for declaration
|
|
291
|
-
* compatibility.
|
|
292
|
-
*
|
|
293
|
-
* @param force - Output force placeholder.
|
|
294
|
-
* @param velocity - Output velocity placeholder.
|
|
295
|
-
* @param axis - Axis index.
|
|
296
|
-
*/
|
|
297
|
-
public get_max_force_and_velocity(force: f32, velocity: f32, axis: i32): void;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* @returns Second connected physics element.
|
|
301
|
-
*/
|
|
302
|
-
public get_stcond_element(): physics_element;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* @returns Whether the joint can break.
|
|
306
|
-
*/
|
|
307
|
-
public is_breakable(): boolean;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Set anchor in world space.
|
|
311
|
-
*
|
|
312
|
-
* @remarks
|
|
313
|
-
* The coordinates are interpreted in the shell's global frame.
|
|
314
|
-
*/
|
|
315
|
-
public set_anchor_global(x: f32, y: f32, z: f32): void;
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Set anchor relative to the first element.
|
|
319
|
-
*
|
|
320
|
-
* @remarks
|
|
321
|
-
* The coordinates are interpreted in the first element's local frame.
|
|
322
|
-
*/
|
|
323
|
-
public set_anchor_vs_first_element(x: f32, y: f32, z: f32): void;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Set anchor relative to the second element.
|
|
327
|
-
*
|
|
328
|
-
* @remarks
|
|
329
|
-
* The coordinates are interpreted in the second element's local frame.
|
|
330
|
-
*/
|
|
331
|
-
public set_anchor_vs_second_element(x: f32, y: f32, z: f32): void;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Set axis direction in world space.
|
|
335
|
-
*
|
|
336
|
-
* @remarks
|
|
337
|
-
* Use an axis index lower than `get_axes_number()`.
|
|
338
|
-
*/
|
|
339
|
-
public set_axis_dir_global(x: f32, y: f32, z: f32, axis: i32): void;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Set axis direction relative to the first element.
|
|
343
|
-
*
|
|
344
|
-
* @remarks
|
|
345
|
-
* Use an axis index lower than `get_axes_number()`.
|
|
346
|
-
*/
|
|
347
|
-
public set_axis_dir_vs_first_element(x: f32, y: f32, z: f32, axis: i32): void;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Set axis direction relative to the second element.
|
|
351
|
-
*
|
|
352
|
-
* @remarks
|
|
353
|
-
* Use an axis index lower than `get_axes_number()`.
|
|
354
|
-
*/
|
|
355
|
-
public set_axis_dir_vs_second_element(x: f32, y: f32, z: f32, axis: i32): void;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Set spring and damping factors for an axis.
|
|
359
|
-
*
|
|
360
|
-
* @remarks
|
|
361
|
-
* Use an axis index lower than `get_axes_number()`.
|
|
362
|
-
*/
|
|
363
|
-
public set_axis_spring_dumping_factors(spring: f32, damping: f32, axis: i32): void;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Set spring and damping factors for the whole joint.
|
|
367
|
-
*/
|
|
368
|
-
public set_joint_spring_dumping_factors(spring: f32, damping: f32): void;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Set angle limits for an axis.
|
|
372
|
-
*
|
|
373
|
-
* @remarks
|
|
374
|
-
* Limits are angles in radians for rotational axes. Use an axis index lower than `get_axes_number()`.
|
|
375
|
-
*/
|
|
376
|
-
public set_limits(min: f32, max: f32, axis: i32): void;
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Set force and velocity limits for an axis.
|
|
380
|
-
*
|
|
381
|
-
* @remarks
|
|
382
|
-
* Use an axis index lower than `get_axes_number()`.
|
|
383
|
-
*/
|
|
384
|
-
public set_max_force_and_velocity(force: f32, velocity: f32, axis: i32): void;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Physics shell made of elements and joints.
|
|
389
|
-
*
|
|
390
|
-
* @source C++ class physics_shell
|
|
391
|
-
* @customConstructor physics_shell
|
|
392
|
-
* @group xr_physic
|
|
393
|
-
*
|
|
394
|
-
* @remarks
|
|
395
|
-
* Shells are engine-owned. Store-order lookups require an index lower than the corresponding count method.
|
|
396
|
-
*/
|
|
397
|
-
export class physics_shell {
|
|
398
|
-
/**
|
|
399
|
-
* Engine-created physics shell.
|
|
400
|
-
*/
|
|
401
|
-
private constructor();
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* Apply force to the shell.
|
|
405
|
-
*
|
|
406
|
-
* @param x - Force x component.
|
|
407
|
-
* @param y - Force y component.
|
|
408
|
-
* @param z - Force z component.
|
|
409
|
-
*/
|
|
410
|
-
public apply_force(x: f32, y: f32, z: f32): void;
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Prevent shell elements and joints from breaking.
|
|
414
|
-
*/
|
|
415
|
-
public block_breaking(): void;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Write current angular velocity into a vector.
|
|
419
|
-
*
|
|
420
|
-
* @remarks
|
|
421
|
-
* The passed vector is overwritten with the root element's angular velocity.
|
|
422
|
-
*
|
|
423
|
-
* @param velocity - Output vector.
|
|
424
|
-
*/
|
|
425
|
-
public get_angular_vel(velocity: vector): void;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Get an element by model bone id.
|
|
429
|
-
*
|
|
430
|
-
* @remarks
|
|
431
|
-
* Returns the element attached to the bone, if the shell has one for that id. Invalid ids can trip native
|
|
432
|
-
* assertions in debug builds.
|
|
433
|
-
*
|
|
434
|
-
* @param id - Bone id.
|
|
435
|
-
* @returns Matching physics element.
|
|
436
|
-
*/
|
|
437
|
-
public get_element_by_bone_id(id: u16): physics_element;
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Get an element by model bone name.
|
|
441
|
-
*
|
|
442
|
-
* @remarks
|
|
443
|
-
* The bone name must exist in the shell's kinematics. Invalid names can trip native assertions in debug builds.
|
|
444
|
-
*
|
|
445
|
-
* @param bone_name - Bone name.
|
|
446
|
-
* @returns Matching physics element.
|
|
447
|
-
*/
|
|
448
|
-
public get_element_by_bone_name(bone_name: string): physics_element;
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Get an element by shell storage order.
|
|
452
|
-
*
|
|
453
|
-
* @remarks
|
|
454
|
-
* `order` must be lower than `get_elements_number()`; invalid values trip a native assertion.
|
|
455
|
-
*
|
|
456
|
-
* @param order - Element order.
|
|
457
|
-
* @returns Matching physics element.
|
|
458
|
-
*/
|
|
459
|
-
public get_element_by_order(order: u16): physics_element;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* @returns Number of elements in the shell.
|
|
463
|
-
*/
|
|
464
|
-
public get_elements_number(): u16;
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Get a joint by model bone id.
|
|
468
|
-
*
|
|
469
|
-
* @remarks
|
|
470
|
-
* Returns the joint attached to the bone, if the shell has one for that id. Invalid ids can trip native assertions
|
|
471
|
-
* in debug builds.
|
|
472
|
-
*
|
|
473
|
-
* @param id - Bone id.
|
|
474
|
-
* @returns Matching physics joint.
|
|
475
|
-
*/
|
|
476
|
-
public get_joint_by_bone_id(id: u16): physics_joint;
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Get a joint by model bone name.
|
|
480
|
-
*
|
|
481
|
-
* @remarks
|
|
482
|
-
* The bone name must exist in the shell's kinematics. Invalid names can trip native assertions in debug builds.
|
|
483
|
-
*
|
|
484
|
-
* @param name - Bone name.
|
|
485
|
-
* @returns Matching physics joint.
|
|
486
|
-
*/
|
|
487
|
-
public get_joint_by_bone_name(name: string): physics_joint;
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Get a joint by shell storage order.
|
|
491
|
-
*
|
|
492
|
-
* @remarks
|
|
493
|
-
* `order` must be lower than `get_joints_number()`; invalid values trip a native assertion.
|
|
494
|
-
*
|
|
495
|
-
* @param order - Joint order.
|
|
496
|
-
* @returns Matching physics joint.
|
|
497
|
-
*/
|
|
498
|
-
public get_joint_by_order(order: u16): physics_joint;
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* @returns Number of joints in the shell.
|
|
502
|
-
*/
|
|
503
|
-
public get_joints_number(): u16;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Write current linear velocity into a vector.
|
|
507
|
-
*
|
|
508
|
-
* @remarks
|
|
509
|
-
* The passed vector is overwritten with the root element's linear velocity.
|
|
510
|
-
*
|
|
511
|
-
* @param velocity - Output vector.
|
|
512
|
-
*/
|
|
513
|
-
public get_linear_vel(velocity: vector): void;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* @returns Whether the shell can break.
|
|
517
|
-
*/
|
|
518
|
-
public is_breakable(): boolean;
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* @returns Whether breaking is currently blocked.
|
|
522
|
-
*/
|
|
523
|
-
public is_breaking_blocked(): boolean;
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* Allow shell elements and joints to break again.
|
|
527
|
-
*/
|
|
528
|
-
public unblock_breaking(): void;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* Global physics world controls.
|
|
533
|
-
*
|
|
534
|
-
* @source C++ class physics_world
|
|
535
|
-
* @customConstructor physics_world
|
|
536
|
-
* @group xr_physic
|
|
537
|
-
*
|
|
538
|
-
* @remarks
|
|
539
|
-
* Obtain the live world through `level.physics_world()`. Gravity changes affect the whole level.
|
|
540
|
-
*/
|
|
541
|
-
export class physics_world {
|
|
542
|
-
/**
|
|
543
|
-
* Set world gravity.
|
|
544
|
-
*
|
|
545
|
-
* @param value - Gravity value.
|
|
546
|
-
*/
|
|
547
|
-
public set_gravity(value: f32): void;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* @returns Current world gravity.
|
|
551
|
-
*/
|
|
552
|
-
public gravity(): f32;
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* Add a physics condition/action callback pair.
|
|
556
|
-
*
|
|
557
|
-
* @remarks
|
|
558
|
-
* This binding expects native `CPHCondition` and `CPHAction` objects; ordinary scripts rarely call it directly.
|
|
559
|
-
*/
|
|
560
|
-
public add_call(/* Class CPHCondition*, class CPHAction */): void;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Animated model kinematics.
|
|
565
|
-
*
|
|
566
|
-
* @source C++ class IKinematicsAnimated
|
|
567
|
-
* @customConstructor IKinematicsAnimated
|
|
568
|
-
* @group xr_physic
|
|
569
|
-
*/
|
|
570
|
-
export class IKinematicsAnimated {
|
|
571
|
-
/**
|
|
572
|
-
* Play an animation cycle by name.
|
|
573
|
-
*
|
|
574
|
-
* @param name - Animation name.
|
|
575
|
-
*/
|
|
576
|
-
public PlayCycle(name: string): void;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Client object that owns a physics shell.
|
|
581
|
-
*
|
|
582
|
-
* @source C++ class CPhysicsShellHolder : public CGameObject, CParticlesPlayer,
|
|
583
|
-
* IObjectPhysicsCollision, IPhysicsShellHolder
|
|
584
|
-
* @customConstructor CPhysicsShellHolder
|
|
585
|
-
* @group xr_physic
|
|
586
|
-
*
|
|
587
|
-
* @remarks
|
|
588
|
-
* This is a native owner of physics shell state. Scripts usually reach it through `game_object.cast_PhysicsShellHolder()`
|
|
589
|
-
* or `game_object.get_physics_shell()`.
|
|
590
|
-
*/
|
|
591
|
-
export class CPhysicsShellHolder extends EngineBinding {
|
|
592
|
-
/**
|
|
593
|
-
* Engine-created physics shell holder.
|
|
594
|
-
*/
|
|
595
|
-
protected constructor();
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Holder object that the actor can engage with.
|
|
600
|
-
*
|
|
601
|
-
* @source C++ class holder
|
|
602
|
-
* @customConstructor holder
|
|
603
|
-
* @group xr_physic
|
|
604
|
-
*
|
|
605
|
-
* @remarks
|
|
606
|
-
* Returned only for objects that implement holder controls, such as mounted weapons or vehicles.
|
|
607
|
-
*/
|
|
608
|
-
export class holder {
|
|
609
|
-
/**
|
|
610
|
-
* @returns Whether the actor is currently attached to the holder.
|
|
611
|
-
*/
|
|
612
|
-
public engaged(): boolean;
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* Send holder action flags.
|
|
616
|
-
*
|
|
617
|
-
* @param id - Action id.
|
|
618
|
-
* @param flags - Action flags.
|
|
619
|
-
*/
|
|
620
|
-
public Action(id: u16, flags: u32): void;
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Set holder vector parameter.
|
|
624
|
-
*
|
|
625
|
-
* @param id - Parameter id.
|
|
626
|
-
* @param value - Parameter value.
|
|
627
|
-
*/
|
|
628
|
-
public SetParam(id: i32, value: vector): void;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Set holder object enter state.
|
|
632
|
-
*
|
|
633
|
-
* @param is_enabled - Whether entering the holder is locked.
|
|
634
|
-
*/
|
|
635
|
-
public SetEnterLocked(is_enabled: boolean): void;
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Set holder object exit state.
|
|
639
|
-
*
|
|
640
|
-
* @param is_enabled - Whether exiting the holder is locked.
|
|
641
|
-
*/
|
|
642
|
-
public SetExitLocked(is_enabled: boolean): void;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* Client object binding for `CSpaceRestrictor` zones.
|
|
4
|
-
*
|
|
5
|
-
* @source C++ class CSpaceRestrictor : CGameObject
|
|
6
|
-
* @customConstructor CSpaceRestrictor
|
|
7
|
-
* @group xr_zone
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Restrictor wrappers represent level volumes used by AI and script logic. They are not inventory items or alive
|
|
11
|
-
* entities.
|
|
12
|
-
*/
|
|
13
|
-
export class CSpaceRestrictor extends CGameObject {}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Client object binding for `CCustomZone` zones.
|
|
17
|
-
*
|
|
18
|
-
* @source C++ class CCustomZone : public CSpaceRestrictor, public Feel::Touch
|
|
19
|
-
* @customConstructor CCustomZone
|
|
20
|
-
* @group xr_zone
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* Anomaly power and activation helpers on `game_object` require this family.
|
|
24
|
-
*/
|
|
25
|
-
export class CCustomZone extends CSpaceRestrictor {}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Client object binding for `CLevelChanger` zones.
|
|
29
|
-
*
|
|
30
|
-
* @source C++ class CLevelChanger : CGameObject
|
|
31
|
-
* @customConstructor CLevelChanger
|
|
32
|
-
* @group xr_zone
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* Level-changer enable and invitation helpers require this runtime class.
|
|
36
|
-
*/
|
|
37
|
-
export class CLevelChanger extends CGameObject {}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Client object binding for `smart_cover_object` zones.
|
|
41
|
-
*
|
|
42
|
-
* @source C++ class smart_cover_object : CGameObject
|
|
43
|
-
* @customConstructor smart_cover_object
|
|
44
|
-
* @group xr_zone
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* Smart-cover suitability and loophole checks require this kind of object as the cover target.
|
|
48
|
-
*/
|
|
49
|
-
export class smart_cover_object extends CGameObject {}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Client object binding for `ce_script_zone` zones.
|
|
53
|
-
*
|
|
54
|
-
* @source C++ class ce_script_zone : DLL_Pure
|
|
55
|
-
* @customConstructor ce_script_zone
|
|
56
|
-
* @group xr_zone
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* Server-side zone entity wrapper used by engine internals and spawn data. Gameplay scripts usually interact with
|
|
60
|
-
* the client `CSpaceRestrictor` or `CCustomZone` wrapper instead.
|
|
61
|
-
*/
|
|
62
|
-
export class ce_script_zone extends DLL_Pure {
|
|
63
|
-
/**
|
|
64
|
-
* Engine-created script zone server entity.
|
|
65
|
-
*/
|
|
66
|
-
protected constructor();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Client object binding for `ce_smart_zone` zones.
|
|
71
|
-
*
|
|
72
|
-
* @source C++ class ce_smart_zone : DLL_Pure
|
|
73
|
-
* @customConstructor ce_smart_zone
|
|
74
|
-
* @group xr_zone
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* Server-side smart-zone entity wrapper. Use client smart-cover objects for runtime cover checks.
|
|
78
|
-
*/
|
|
79
|
-
export class ce_smart_zone extends DLL_Pure {
|
|
80
|
-
/**
|
|
81
|
-
* Engine-created smart zone server entity.
|
|
82
|
-
*/
|
|
83
|
-
protected constructor();
|
|
84
|
-
}
|
|
85
|
-
}
|