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.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/types/xr_ai/xr_action.d.ts +1321 -29
  3. package/types/xr_ai/xr_alife.d.ts +1336 -32
  4. package/types/xr_ai/xr_enemy_evaluation.d.ts +112 -19
  5. package/types/xr_ai/xr_goap.d.ts +450 -3
  6. package/types/xr_ai/xr_graph.d.ts +94 -6
  7. package/types/xr_ai/xr_memory.d.ts +240 -6
  8. package/types/xr_lib/xr_animation.d.ts +185 -14
  9. package/types/xr_lib/xr_bitwise.d.ts +20 -8
  10. package/types/xr_lib/xr_color.d.ts +103 -6
  11. package/types/xr_lib/xr_debug.d.ts +110 -12
  12. package/types/xr_lib/xr_dialog.d.ts +99 -7
  13. package/types/xr_lib/xr_flags.d.ts +78 -15
  14. package/types/xr_lib/xr_fs.d.ts +395 -5
  15. package/types/xr_lib/xr_game.d.ts +101 -0
  16. package/types/xr_lib/xr_hit.d.ts +84 -0
  17. package/types/xr_lib/xr_ini.d.ts +60 -2
  18. package/types/xr_lib/xr_level.d.ts +182 -39
  19. package/types/xr_lib/xr_luabind.d.ts +37 -11
  20. package/types/xr_lib/xr_map.d.ts +137 -6
  21. package/types/xr_lib/xr_math.d.ts +56 -0
  22. package/types/xr_lib/xr_multiplayer.d.ts +729 -1
  23. package/types/xr_lib/xr_profile.d.ts +80 -0
  24. package/types/xr_lib/xr_properties.d.ts +159 -4
  25. package/types/xr_lib/xr_relation.d.ts +147 -0
  26. package/types/xr_lib/xr_render.d.ts +99 -3
  27. package/types/xr_lib/xr_save.d.ts +110 -4
  28. package/types/xr_lib/xr_sound.d.ts +373 -9
  29. package/types/xr_lib/xr_stats.ts +33 -4
  30. package/types/xr_lib/xr_task.d.ts +277 -0
  31. package/types/xr_lib/xr_time.d.ts +11 -0
  32. package/types/xr_object/client/xr_anomaly.d.ts +20 -0
  33. package/types/xr_object/client/xr_artefact.d.ts +57 -2
  34. package/types/xr_object/client/xr_client_object.d.ts +131 -0
  35. package/types/xr_object/client/xr_creature.d.ts +79 -0
  36. package/types/xr_object/client/xr_item.d.ts +108 -2
  37. package/types/xr_object/client/xr_level.d.ts +482 -14
  38. package/types/xr_object/client/xr_physic.d.ts +459 -29
  39. package/types/xr_object/client/xr_zone.d.ts +38 -0
  40. package/types/xr_object/script/xr_script_interface.d.ts +236 -1
  41. package/types/xr_object/script/xr_script_object.d.ts +3402 -82
  42. package/types/xr_object/script/xr_script_trade.d.ts +25 -15
  43. package/types/xr_object/server/xr_server_object.d.ts +707 -15
  44. package/types/xr_ui/xr_ui_asset.d.ts +241 -6
  45. package/types/xr_ui/xr_ui_core.d.ts +327 -9
  46. package/types/xr_ui/xr_ui_event.d.ts +1067 -1
  47. package/types/xr_ui/xr_ui_interface.d.ts +1563 -17
  48. package/types/xr_ui/xr_ui_menu.d.ts +259 -16
  49. package/types/xrf_plugin.d.ts +44 -14
@@ -1,61 +1,218 @@
1
1
  declare module "xray16" {
2
2
  /**
3
+ * Access point for ALife simulation objects and registries.
4
+ *
3
5
  * @source C++ class alife_simulator
4
6
  * @customConstructor alife_simulator
5
7
  * @group xr_alife
8
+ *
9
+ * @remarks
10
+ * This is the active single-player ALife simulator. Most methods expect ids that are already registered in ALife.
6
11
  */
7
12
  export class alife_simulator {
13
+ /**
14
+ * Get the ALife actor server object.
15
+ *
16
+ * @throws If no active ALife simulator exists.
17
+ *
18
+ * @returns Actor object registered in the ALife graph.
19
+ */
8
20
  public actor<T extends cse_alife_creature_actor>(): T;
9
21
 
10
- public add_in_restriction(monster: cse_alife_monster_abstract, value: u16): void;
22
+ /**
23
+ * Add an inside-space restriction to an offline monster.
24
+ *
25
+ * @remarks
26
+ * `monster` must be a registered monster server object. `restrictorId` should point to a space restrictor.
27
+ *
28
+ * @param monster - Monster server object to restrict.
29
+ * @param restrictorId - Restrictor object id.
30
+ */
31
+ public add_in_restriction(monster: cse_alife_monster_abstract, restrictorId: u16): void;
11
32
 
12
- public add_out_restriction(monster: cse_alife_monster_abstract, value: u16): void;
33
+ /**
34
+ * Add an outside-space restriction to an offline monster.
35
+ *
36
+ * @remarks
37
+ * `monster` must be a registered monster server object. `restrictorId` should point to a space restrictor.
38
+ *
39
+ * @param monster - Monster server object to restrict.
40
+ * @param restrictorId - Restrictor object id.
41
+ */
42
+ public add_out_restriction(monster: cse_alife_monster_abstract, restrictorId: u16): void;
13
43
 
44
+ /**
45
+ * Spawn ammo with a custom amount left in the box.
46
+ *
47
+ * @remarks
48
+ * The section must spawn a server ammo object, and `count` must not exceed the ammo box size.
49
+ *
50
+ * @throws If the spawned section is not ammo, or if `count` is larger than the box size.
51
+ *
52
+ * @param section - Ammo section name.
53
+ * @param position - Spawn position.
54
+ * @param level_vertex_id - Level vertex id at the spawn position.
55
+ * @param game_vertex_id - Game graph vertex id at the spawn position.
56
+ * @param parent_object_id - Parent inventory or container id, or `65535` for no parent.
57
+ * @param count - Amount of ammo in the spawned box.
58
+ * @returns Spawned server object, or `null` when a non-empty parent id is invalid.
59
+ */
14
60
  public create_ammo(
15
61
  section: string,
16
- vector: vector,
62
+ position: vector,
17
63
  level_vertex_id: u32,
18
64
  game_vertex_id: u16,
19
65
  parent_object_id: u16,
20
66
  count: i32
21
67
  ): cse_abstract;
22
68
 
69
+ /**
70
+ * Check that an object does not know an info portion.
71
+ *
72
+ * @param object_id - ALife object id.
73
+ * @param info_id - Info portion id.
74
+ * @returns Whether the object does not have the info portion.
75
+ */
23
76
  public dont_has_info(object_id: u16, info_id: string): boolean;
24
77
 
78
+ /**
79
+ * Check that an object knows an info portion.
80
+ *
81
+ * @param object_id - ALife object id.
82
+ * @param info_id - Info portion id.
83
+ * @returns Whether the object has the info portion.
84
+ */
25
85
  public has_info(object_id: u16, info_id: string): boolean;
26
86
 
87
+ /**
88
+ * Iterate over registered ALife objects until the callback returns `true`.
89
+ *
90
+ * @remarks
91
+ * Returning `true` from the callback stops iteration early.
92
+ *
93
+ * @param cb - Callback called for every server object.
94
+ */
27
95
  public iterate_objects(cb: (this: void, object: cse_alife_object) => boolean | void): void;
28
96
 
97
+ /**
98
+ * Get the current level id from the active ALife graph.
99
+ *
100
+ * @returns Current level id.
101
+ */
29
102
  public level_id(): u32;
30
103
 
31
104
  /**
32
105
  * Method to get level name based on level ID.
33
106
  * Easy way to get level is to get it by game vertex ID graph or iterate over all levels in graphs.
34
107
  *
108
+ * @throws If `level_id` is not present in the game graph header.
109
+ *
35
110
  * @param level_id - ID of the level.
36
111
  * @returns Level name based on level ID provided.
37
112
  */
38
113
  public level_name<T extends string = string>(level_id: i32): T;
39
114
 
40
- public release(cse_abstract: cse_alife_object | null, flag: boolean): void;
115
+ /**
116
+ * Release an ALife object from the simulator.
117
+ *
118
+ * @remarks
119
+ * Online objects are destroyed through a network event. Offline objects are removed from ALife immediately.
120
+ *
121
+ * @throws If `object` is `null` or is not an ALife object.
122
+ *
123
+ * @param object - Object to remove.
124
+ * @param flag - Compatibility flag accepted by the engine binding.
125
+ */
126
+ public release(object: cse_alife_object | null, flag: boolean): void;
41
127
 
42
- public remove_all_restrictions(value: u16, type: i32 /* Enum RestrictionSpace::ERestrictorTypes */): void;
128
+ /**
129
+ * Remove all restrictions of one type from an object.
130
+ *
131
+ * @remarks
132
+ * `objectId` must resolve to an ALife object that has restriction storage.
133
+ *
134
+ * @param objectId - Restricted object id.
135
+ * @param type - Restriction type.
136
+ */
137
+ public remove_all_restrictions(objectId: u16, type: i32 /* Enum RestrictionSpace::ERestrictorTypes */): void;
43
138
 
44
- public remove_in_restriction(monster: cse_alife_monster_abstract, value: u16): void;
139
+ /**
140
+ * Remove an inside-space restriction from an offline monster.
141
+ *
142
+ * @remarks
143
+ * `monster` must be a registered monster server object.
144
+ *
145
+ * @param monster - Monster server object to update.
146
+ * @param restrictorId - Restrictor object id.
147
+ */
148
+ public remove_in_restriction(monster: cse_alife_monster_abstract, restrictorId: u16): void;
45
149
 
46
- public remove_out_restriction(monster: cse_alife_monster_abstract, value: u16): void;
150
+ /**
151
+ * Remove an outside-space restriction from an offline monster.
152
+ *
153
+ * @remarks
154
+ * `monster` must be a registered monster server object.
155
+ *
156
+ * @param monster - Monster server object to update.
157
+ * @param restrictorId - Restrictor object id.
158
+ */
159
+ public remove_out_restriction(monster: cse_alife_monster_abstract, restrictorId: u16): void;
47
160
 
48
- public set_interactive(value1: u16, value2: boolean): void;
161
+ /**
162
+ * Enable or disable interaction for an ALife object.
163
+ *
164
+ * @remarks
165
+ * `objectId` must resolve to a registered ALife object.
166
+ *
167
+ * @param objectId - ALife object id.
168
+ * @param enabled - New interaction state.
169
+ */
170
+ public set_interactive(objectId: u16, enabled: boolean): void;
49
171
 
172
+ /**
173
+ * Set the online/offline switch distance.
174
+ *
175
+ * @param distance - Switch distance in meters.
176
+ */
50
177
  public set_switch_distance(distance: f32): void;
51
178
 
52
- public set_switch_offline(value1: u16, value2: boolean): void;
179
+ /**
180
+ * Allow or forbid switching an ALife object offline.
181
+ *
182
+ * @remarks
183
+ * `objectId` must resolve to a registered ALife object.
184
+ *
185
+ * @param objectId - ALife object id.
186
+ * @param enabled - New offline switching state.
187
+ */
188
+ public set_switch_offline(objectId: u16, enabled: boolean): void;
53
189
 
54
- public set_switch_online(value1: u16, value2: boolean): void;
190
+ /**
191
+ * Allow or forbid switching an ALife object online.
192
+ *
193
+ * @remarks
194
+ * `objectId` must resolve to a registered ALife object.
195
+ *
196
+ * @param objectId - ALife object id.
197
+ * @param enabled - New online switching state.
198
+ */
199
+ public set_switch_online(objectId: u16, enabled: boolean): void;
55
200
 
56
- public spawn_id(value: u32): u16;
201
+ /**
202
+ * Resolve a spawn story id to a spawn graph id.
203
+ *
204
+ * @param spawnStoryId - Spawn story id.
205
+ * @returns Spawn graph id.
206
+ */
207
+ public spawn_id(spawnStoryId: u32): u16;
57
208
 
58
- public story_object(value: u32): cse_alife_object | null;
209
+ /**
210
+ * Get a server object by story id.
211
+ *
212
+ * @param storyId - Story id.
213
+ * @returns Matching server object, or `null` when it is not registered.
214
+ */
215
+ public story_object(storyId: u32): cse_alife_object | null;
59
216
 
60
217
  /**
61
218
  * @returns Alife server-client switch distance.
@@ -72,23 +229,97 @@ declare module "xray16" {
72
229
  /**
73
230
  * Set count of object updated in alife per one tick.
74
231
  *
232
+ * @since OpenXRay 2022-06-29, 09598fe7, PR #1033
233
+ *
75
234
  * @param count - Count of objects to update per tick.
76
235
  */
77
236
  public set_objects_per_update(count: u16): void;
78
237
 
79
- public teleport_object(level_vertex_id: u16, game_vertex_id: u16, int: u32, vector: vector): void;
238
+ /**
239
+ * Move a server object to another graph and level vertex.
240
+ *
241
+ * @since OpenXRay 2014-12-27, c82669625
242
+ *
243
+ * @param object_id - Object id to teleport.
244
+ * @param game_vertex_id - Destination game graph vertex id.
245
+ * @param level_vertex_id - Destination level vertex id.
246
+ * @param position - Destination position.
247
+ */
248
+ public teleport_object(object_id: u16, game_vertex_id: u16, level_vertex_id: u32, position: vector): void;
80
249
 
81
- public valid_object_id(value: u16): boolean;
250
+ /**
251
+ * Check whether an object id is usable.
252
+ *
253
+ * @remarks
254
+ * This only checks the engine invalid id value. It does not prove that an object with this id is registered.
255
+ *
256
+ * @param object_id - ALife object id.
257
+ * @returns Whether the id is not the engine invalid id.
258
+ */
259
+ public valid_object_id(object_id: u16): boolean;
82
260
 
261
+ /**
262
+ * Kill an offline monster.
263
+ *
264
+ * @remarks
265
+ * Use only for monster server objects registered in ALife.
266
+ *
267
+ * @throws If `monster` is not a valid ALife monster object.
268
+ *
269
+ * @param monster - Monster server object.
270
+ * @param graph_id - Optional game graph vertex id used as death location.
271
+ * @param schedulable - Optional killer or source object.
272
+ */
83
273
  public kill_entity(
84
274
  monster: cse_alife_monster_abstract,
85
275
  graph_id?: u16,
86
276
  schedulable?: cse_alife_monster_abstract
87
277
  ): void;
88
278
 
279
+ /**
280
+ * Get a server object by id.
281
+ *
282
+ * @remarks
283
+ * With the default id overload, an invalid id is logged and returns `null`. Pass `no_assert` to use the raw
284
+ * engine lookup mode.
285
+ *
286
+ * @param object_id - ALife object id.
287
+ * @param no_assert - Return `null` instead of asserting when the object is missing.
288
+ * @returns Matching server object, or `null`.
289
+ */
89
290
  public object<T extends cse_alife_object = cse_alife_object>(object_id: u16, no_assert?: boolean): T | null;
90
291
 
91
- public create<T extends cse_alife_object = cse_alife_object>(object_id: u16): T;
292
+ /**
293
+ * Get a server object by its engine replacement name.
294
+ *
295
+ * @param name - Server object replacement name.
296
+ * @returns Matching server object, or `null`.
297
+ */
298
+ public object<T extends cse_alife_object = cse_alife_object>(name: string): T | null;
299
+
300
+ /**
301
+ * Create an object from a spawn graph id.
302
+ *
303
+ * @throws If `spawn_id` does not exist or does not resolve to a dynamic ALife object.
304
+ *
305
+ * @param spawn_id - Spawn graph id.
306
+ * @returns Created server object.
307
+ */
308
+ public create<T extends cse_alife_object = cse_alife_object>(spawn_id: u16): T;
309
+
310
+ /**
311
+ * Spawn a server object by section.
312
+ *
313
+ * @remarks
314
+ * If a non-empty parent id is invalid, the engine logs the error and returns `null`.
315
+ *
316
+ * @param section - Object section name.
317
+ * @param position - Spawn position.
318
+ * @param level_vertex_id - Level vertex id at the spawn position.
319
+ * @param game_vertex_id - Game graph vertex id at the spawn position.
320
+ * @param parent_object_id - Optional parent inventory or container id.
321
+ * @returns Created server object, or `null` when a non-empty parent id is invalid.
322
+ */
92
323
  public create<T extends cse_alife_object = cse_alife_object>(
93
324
  section: string,
94
325
  position: vector,
@@ -96,8 +327,22 @@ declare module "xray16" {
96
327
  game_vertex_id: u32,
97
328
  parent_object_id?: u16
98
329
  ): T;
99
- // Alundaio: Allows to call alife():register(se_obj) manually afterward,editing
100
- // Alundaio: so that packet can be done safely when spawning object with a parent.
330
+
331
+ /**
332
+ * Spawn a server object and optionally defer network registration.
333
+ *
334
+ * @remarks
335
+ * Passing `reg = false` returns the unregistered server object so scripts can edit its packet before registering
336
+ * it manually. If a non-empty parent id is invalid, the engine logs the error and returns `null`.
337
+ *
338
+ * @param section - Object section name.
339
+ * @param position - Spawn position.
340
+ * @param level_vertex_id - Level vertex id at the spawn position.
341
+ * @param game_vertex_id - Game graph vertex id at the spawn position.
342
+ * @param parent_object_id - Parent inventory or container id.
343
+ * @param reg - Whether to register the object immediately.
344
+ * @returns Created server object, or `null` when a non-empty parent id is invalid.
345
+ */
101
346
  public create<T extends cse_alife_object = cse_alife_object>(
102
347
  section: string,
103
348
  position: vector,
@@ -109,425 +354,1457 @@ declare module "xray16" {
109
354
  }
110
355
 
111
356
  /**
357
+ * ALife smart-terrain task binding.
358
+ *
112
359
  * @source C++ class CALifeSmartTerrainTask
113
360
  * @customConstructor CALifeSmartTerrainTask
114
361
  * @group xr_alife
362
+ *
363
+ * @remarks
364
+ * Tasks are resolved against patrol paths and graph vertices immediately. Invalid paths or vertices assert in the
365
+ * engine.
115
366
  */
116
367
  export class CALifeSmartTerrainTask {
368
+ /**
369
+ * Create a task from a patrol path.
370
+ *
371
+ * @throws If the patrol path or requested patrol point does not exist.
372
+ *
373
+ * @param patrol_path_name - Patrol path name.
374
+ * @param patrol_point_index - Optional patrol point index.
375
+ */
117
376
  public constructor(patrol_path_name: string, patrol_point_index?: u32);
377
+
378
+ /**
379
+ * Create a task from graph vertices.
380
+ *
381
+ * @throws If `game_vertex_id` is not valid in the game graph.
382
+ *
383
+ * @param game_vertex_id - Target game graph vertex id.
384
+ * @param level_vertex_id - Target level vertex id.
385
+ */
118
386
  public constructor(game_vertex_id: u16, level_vertex_id: u32);
119
387
 
388
+ /**
389
+ * Get the target level vertex.
390
+ *
391
+ * @throws If the task points to an invalid graph vertex.
392
+ *
393
+ * @returns Level vertex id.
394
+ */
120
395
  public level_vertex_id(): u16;
121
396
 
397
+ /**
398
+ * Get the target game graph vertex.
399
+ *
400
+ * @throws If the task points to an invalid graph vertex.
401
+ *
402
+ * @returns Game graph vertex id.
403
+ */
122
404
  public game_vertex_id(): u16;
123
405
 
406
+ /**
407
+ * Get the target position.
408
+ *
409
+ * @returns Task position.
410
+ */
124
411
  public position(): vector;
125
412
  }
126
413
 
127
414
  /**
415
+ * Offline ALife brain for monster server objects.
416
+ *
128
417
  * @source C++ class CALifeMonsterBrain
129
418
  * @customConstructor CALifeMonsterBrain
130
419
  * @group xr_alife
420
+ *
421
+ * @remarks
422
+ * Belongs to an offline monster server object. Do not use it with client-side `game_object` instances.
131
423
  */
132
424
  export class CAILifeMonsterBrain {
133
- public constructor(object: unknown);
425
+ /**
426
+ * Create a brain for a monster server object.
427
+ *
428
+ * @param object - Monster server object.
429
+ */
430
+ public constructor(object: cse_alife_monster_abstract);
134
431
 
432
+ /**
433
+ * Select the next ALife task.
434
+ *
435
+ * @param forced - Whether task selection should ignore regular throttling.
436
+ */
135
437
  public select_task(forced?: boolean): void;
136
438
 
439
+ /**
440
+ * Process the currently selected ALife task.
441
+ */
137
442
  public process_task(): void;
138
443
 
444
+ /**
445
+ * Reset the brain to default no-path behavior.
446
+ */
139
447
  public default_behaviour(): void;
140
448
 
449
+ /**
450
+ * @returns Whether this brain may choose ALife tasks.
451
+ */
141
452
  public can_choose_alife_tasks(): boolean;
142
453
 
454
+ /**
455
+ * Enable or disable ALife task selection.
456
+ *
457
+ * @param value - New task-selection state.
458
+ */
143
459
  public can_choose_alife_tasks(value: boolean): void;
144
460
 
461
+ /**
462
+ * Write brain state to a network packet.
463
+ *
464
+ * @param packet - Target network packet.
465
+ */
145
466
  public on_state_write(packet: net_packet): void;
146
467
 
468
+ /**
469
+ * Read brain state from a network packet.
470
+ *
471
+ * @param packet - Source network packet.
472
+ */
147
473
  public on_state_read(packet: net_packet): void;
148
474
 
475
+ /**
476
+ * Called when the owning monster is registered.
477
+ */
149
478
  public on_register(): void;
150
479
 
480
+ /**
481
+ * Called when the owning monster is unregistered.
482
+ */
151
483
  public on_unregister(): void;
152
484
 
485
+ /**
486
+ * Called when the owning monster changes graph location.
487
+ */
153
488
  public on_location_change(): void;
154
489
 
490
+ /**
491
+ * Called when the owning monster switches online.
492
+ */
155
493
  public on_switch_online(): void;
156
494
 
495
+ /**
496
+ * Called when the owning monster switches offline.
497
+ */
157
498
  public on_switch_offline(): void;
158
499
 
500
+ /**
501
+ * Update offline planning.
502
+ *
503
+ * @param forced - Whether the update should ignore regular throttling.
504
+ */
159
505
  public update(forced?: boolean): void;
160
506
 
507
+ /**
508
+ * Script-facing update hook.
509
+ */
161
510
  public update_script(): void;
162
511
 
512
+ /**
513
+ * Try to perform an offline attack.
514
+ *
515
+ * @returns Whether an attack was performed.
516
+ */
163
517
  public perform_attack(): boolean;
164
518
 
165
- public action_type(tpALifeSchedulable: unknown, index: number, mutual_detection: boolean): unknown;
519
+ /**
520
+ * Get the meet action type for another ALife object.
521
+ *
522
+ * @param object - Other ALife schedulable object.
523
+ * @param index - Relation index.
524
+ * @param mutual_detection - Whether both objects detected each other.
525
+ * @returns Meet action type id.
526
+ */
527
+ public action_type(object: IXR_cse_alife_schedulable, index: number, mutual_detection: boolean): number;
166
528
 
167
- public object(): unknown;
529
+ /**
530
+ * @returns Owning monster server object.
531
+ */
532
+ public object(): cse_alife_monster_abstract;
168
533
 
169
- public movement(): unknown;
534
+ /**
535
+ * @returns Offline movement manager.
536
+ */
537
+ public movement(): CALifeMonsterMovementManager;
170
538
 
171
- public smart_terrain(): unknown;
539
+ /**
540
+ * @returns Smart terrain assigned to the owner.
541
+ */
542
+ public smart_terrain(): cse_alife_smart_zone;
172
543
  }
173
544
 
174
545
  /**
546
+ * ALife monster brain binding.
547
+ *
175
548
  * @source C++ class CALifeMonsterBrain
176
549
  * @customConstructor CALifeMonsterBrain
177
550
  * @group xr_alife
551
+ *
552
+ * @remarks
553
+ * Script-visible subset of the offline monster brain. `update()` is bound as a forced update.
178
554
  */
179
555
  export class CALifeMonsterBrain {
556
+ /**
557
+ * Get the offline movement manager.
558
+ *
559
+ * @returns Monster movement manager.
560
+ */
180
561
  public movement(): CALifeMonsterMovementManager;
181
562
 
563
+ /**
564
+ * Update offline ALife planning for the monster.
565
+ */
182
566
  public update(): void;
183
567
 
568
+ /**
569
+ * Check whether this brain may choose ALife tasks.
570
+ *
571
+ * @returns Whether ALife task selection is enabled.
572
+ */
184
573
  public can_choose_alife_tasks(): boolean;
185
574
 
575
+ /**
576
+ * Enable or disable ALife task selection.
577
+ *
578
+ * @param can_choose - New task-selection state.
579
+ */
186
580
  public can_choose_alife_tasks(can_choose: boolean): void;
187
581
  }
188
582
 
189
583
  /**
584
+ * ALife human brain binding.
585
+ *
190
586
  * @source C++ class CALifeHumanBrain : CALifeMonsterBrain
191
587
  * @customConstructor CALifeHumanBrain
192
588
  * @group xr_alife
589
+ *
590
+ * @remarks
591
+ * Human ALife brain with the same script-visible surface as `CALifeMonsterBrain`.
193
592
  */
194
593
  export class CALifeHumanBrain extends CALifeMonsterBrain {}
195
594
 
196
595
  /**
596
+ * ALife monster detail-path manager binding.
597
+ *
197
598
  * @source C++ class CALifeMonsterDetailPathManager
198
599
  * @customConstructor CALifeMonsterDetailPathManager
199
600
  * @group xr_alife
601
+ *
602
+ * @remarks
603
+ * Owned by an offline monster brain. Targets are validated against the game graph and current level graph.
200
604
  */
201
605
  export class CALifeMonsterDetailPathManager {
606
+ /**
607
+ * Check whether the detail path reached its target.
608
+ *
609
+ * @returns Whether detail movement is complete.
610
+ */
202
611
  public completed(): boolean;
203
612
 
204
- public target(a: number, b: number, vector: vector): void;
613
+ /**
614
+ * Set a target by graph vertex, level vertex, and position.
615
+ *
616
+ * @throws If the graph vertex is invalid or does not match the level vertex and position on the current level.
617
+ *
618
+ * @param game_vertex_id - Target game graph vertex id.
619
+ * @param level_vertex_id - Target level vertex id.
620
+ * @param position - Target position.
621
+ */
622
+ public target(game_vertex_id: number, level_vertex_id: number, position: vector): void;
205
623
 
206
- public target(task_id: number): void;
624
+ /**
625
+ * Set a target by game graph vertex.
626
+ *
627
+ * @throws If `game_vertex_id` is not valid.
628
+ *
629
+ * @param game_vertex_id - Target game graph vertex id.
630
+ */
631
+ public target(game_vertex_id: number): void;
207
632
 
633
+ /**
634
+ * Set a target from a smart-terrain task.
635
+ *
636
+ * @remarks
637
+ * The task is resolved to graph vertex, level vertex, and position before assigning the target.
638
+ *
639
+ * @param task - Smart-terrain task.
640
+ */
208
641
  public target(task: CALifeSmartTerrainTask): void;
209
642
 
643
+ /**
644
+ * Check whether the last path build failed.
645
+ *
646
+ * @returns Whether detail movement failed.
647
+ */
210
648
  public failed(): boolean;
211
649
 
212
- public speed(number: f32): f32;
650
+ /**
651
+ * Set detail movement speed.
652
+ *
653
+ * @param speed - New movement speed.
654
+ */
655
+ public speed(speed: f32): void;
213
656
 
657
+ /**
658
+ * Get detail movement speed.
659
+ *
660
+ * @returns Current movement speed.
661
+ */
214
662
  public speed(): f32;
215
663
 
664
+ /**
665
+ * Check whether the current detail path still matches the target.
666
+ *
667
+ * @returns Whether the path is actual.
668
+ */
216
669
  public actual(): boolean;
217
670
  }
218
671
 
219
672
  /**
673
+ * ALife monster movement manager binding.
674
+ *
220
675
  * @source C++ class CALifeMonsterMovementManager
221
676
  * @customConstructor CALifeMonsterMovementManager
222
677
  * @group xr_alife
678
+ *
679
+ * @remarks
680
+ * Owned by an offline monster brain. The returned detail and patrol managers are engine-owned.
223
681
  */
224
682
  export class CALifeMonsterMovementManager {
683
+ /**
684
+ * Check whether offline movement has completed.
685
+ *
686
+ * @returns Whether movement is complete.
687
+ */
225
688
  public completed(): boolean;
226
689
 
690
+ /**
691
+ * Get the patrol path manager.
692
+ *
693
+ * @returns Patrol path manager.
694
+ */
227
695
  public patrol(): CALifeMonsterPatrolPathManager;
228
696
 
697
+ /**
698
+ * Check whether the movement target is still actual.
699
+ *
700
+ * @returns Whether movement is actual.
701
+ */
229
702
  public actual(): boolean;
230
703
 
704
+ /**
705
+ * Get the active offline path type.
706
+ *
707
+ * @returns Movement path type.
708
+ */
231
709
  public path_type(): number; /* EPathType */
232
710
 
711
+ /**
712
+ * Get the detail path manager.
713
+ *
714
+ * @returns Detail path manager.
715
+ */
233
716
  public detail(): CALifeMonsterDetailPathManager;
234
717
  }
235
718
 
236
719
  /**
720
+ * ALife monster patrol-path manager binding.
721
+ *
237
722
  * @source C++ class CALifeMonsterPatrolPathManager
238
723
  * @customConstructor CALifeMonsterPatrolPathManager
239
724
  * @group xr_alife
725
+ *
726
+ * @remarks
727
+ * Patrol target getters require a patrol path and a selected current patrol vertex.
240
728
  */
241
729
  export class CALifeMonsterPatrolPathManager {
242
- public path(string: string): void;
730
+ /**
731
+ * Set the patrol path by name.
732
+ *
733
+ * @throws If `path_name` is not a registered patrol path.
734
+ *
735
+ * @param path_name - Patrol path name.
736
+ */
737
+ public path(path_name: string): void;
243
738
 
739
+ /**
740
+ * Get the current patrol target game vertex.
741
+ *
742
+ * @throws If no patrol path is assigned or the current vertex is not selected.
743
+ *
744
+ * @returns Target game graph vertex id.
745
+ */
244
746
  public target_game_vertex_id(): u16;
245
747
 
748
+ /**
749
+ * Get the current patrol target level vertex.
750
+ *
751
+ * @throws If no patrol path is assigned or the current vertex is not selected.
752
+ *
753
+ * @returns Target level vertex id.
754
+ */
246
755
  public target_level_vertex_id(): u16;
247
756
 
757
+ /**
758
+ * Get the current patrol target position.
759
+ *
760
+ * @throws If no patrol path is assigned or the current vertex is not selected.
761
+ *
762
+ * @returns Target position.
763
+ */
248
764
  public target_position(): vector;
249
765
 
766
+ /**
767
+ * Check whether patrol movement reached the target.
768
+ *
769
+ * @returns Whether patrol movement is complete.
770
+ */
250
771
  public completed(): boolean;
251
772
 
252
- public route_type(type: u32 /* Const enum PatrolPathManager::EPatrolRouteType */): u32;
773
+ /**
774
+ * Set patrol route behavior.
775
+ *
776
+ * @param type - Patrol route type.
777
+ */
778
+ public route_type(type: u32 /* Const enum PatrolPathManager::EPatrolRouteType */): void;
253
779
 
780
+ /**
781
+ * Get patrol route behavior.
782
+ *
783
+ * @returns Patrol route type.
784
+ */
254
785
  public route_type(): u32;
255
786
 
256
- public use_randomness(enabled: boolean): boolean;
787
+ /**
788
+ * Enable or disable random patrol point selection.
789
+ *
790
+ * @param enabled - New randomness state.
791
+ */
792
+ public use_randomness(enabled: boolean): void;
257
793
 
794
+ /**
795
+ * Check whether random patrol point selection is enabled.
796
+ *
797
+ * @returns Whether randomness is enabled.
798
+ */
258
799
  public use_randomness(): boolean;
259
800
 
260
- public start_type(type: u32 /* Const enum PatrolPathManager::EPatrolStartType */): u32;
801
+ /**
802
+ * Set how the patrol path starts.
803
+ *
804
+ * @param type - Patrol start type.
805
+ */
806
+ public start_type(type: u32 /* Const enum PatrolPathManager::EPatrolStartType */): void;
261
807
 
808
+ /**
809
+ * Get how the patrol path starts.
810
+ *
811
+ * @returns Patrol start type.
812
+ */
262
813
  public start_type(): u32;
263
814
 
815
+ /**
816
+ * Set the starting patrol point.
817
+ *
818
+ * @remarks
819
+ * Used when start type is the explicit point mode. The index must exist in the current patrol path.
820
+ *
821
+ * @param index - Patrol point index.
822
+ */
264
823
  public start_vertex_index(index: u32): void;
265
824
 
825
+ /**
826
+ * Check whether the patrol target is still actual.
827
+ *
828
+ * @returns Whether the patrol path is actual.
829
+ */
266
830
  public actual(): boolean;
267
831
  }
268
832
  /**
833
+ * Story id constants used by spawned objects.
834
+ *
269
835
  * @source C++ class spawn_story_ids
270
836
  * @customConstructor spawn_story_ids
271
837
  * @group xr_alife
272
838
  */
273
839
  export class spawn_story_ids {
840
+ /**
841
+ * Engine enum value for `spawn_story_ids.INVALID_SPAWN_STORY_ID`.
842
+ */
274
843
  public static readonly INVALID_SPAWN_STORY_ID: -1;
275
844
 
845
+ /**
846
+ * Engine-owned spawn story id constants.
847
+ */
276
848
  private constructor();
277
849
  }
278
850
 
279
851
  /**
852
+ * Story id constants used by scripts.
853
+ *
280
854
  * @source C++ class story_ids
281
855
  * @customConstructor story_ids
282
856
  * @group xr_alife
283
857
  */
284
858
  export class story_ids {
859
+ /**
860
+ * Engine enum value for `story_ids.INVALID_STORY_ID`.
861
+ */
285
862
  public static readonly INVALID_STORY_ID: -1;
863
+ /**
864
+ * Engine enum value for `story_ids.Invalid`.
865
+ */
286
866
  public static readonly Invalid: 65535;
867
+ /**
868
+ * Engine enum value for `story_ids.test_01`.
869
+ */
287
870
  public static readonly test_01: 65000;
871
+ /**
872
+ * Engine enum value for `story_ids.test_02`.
873
+ */
288
874
  public static readonly test_02: 65001;
875
+ /**
876
+ * Engine enum value for `story_ids.test_03`.
877
+ */
289
878
  public static readonly test_03: 65002;
879
+ /**
880
+ * Engine enum value for `story_ids.test_04`.
881
+ */
290
882
  public static readonly test_04: 65003;
883
+ /**
884
+ * Engine enum value for `story_ids.test_05`.
885
+ */
291
886
  public static readonly test_05: 65004;
292
887
  }
293
888
 
294
889
  /**
890
+ * Client-side spawn manager binding.
891
+ *
295
892
  * @source C++ class client_spawn_manager
296
893
  * @customConstructor client_spawn_manager
297
894
  * @group xr_alife
298
895
  */
299
896
  export class client_spawn_manager {
300
- public remove(number1: u16, number2: u16): void;
897
+ /**
898
+ * Remove a delayed spawn callback.
899
+ *
900
+ * @param parent_id - Parent object id.
901
+ * @param object_id - Delayed object id.
902
+ */
903
+ public remove(parent_id: u16, object_id: u16): void;
301
904
 
302
- public add(number1: u16, number2: u16, cb: (this: void) => void): void;
905
+ /**
906
+ * Register a callback for a delayed client spawn.
907
+ *
908
+ * @param parent_id - Parent object id.
909
+ * @param object_id - Object id waiting for spawn.
910
+ * @param cb - Callback called when the object is available.
911
+ */
912
+ public add(parent_id: u16, object_id: u16, cb: (this: void) => void): void;
303
913
 
304
- public add(number1: u16, number2: u16, cb: (this: void) => void, object: XR_object): void;
914
+ /**
915
+ * Register a callback with user data for a delayed client spawn.
916
+ *
917
+ * @param parent_id - Parent object id.
918
+ * @param object_id - Object id waiting for spawn.
919
+ * @param cb - Callback called when the object is available.
920
+ * @param object - Extra Lua object passed through the callback registry.
921
+ */
922
+ public add(parent_id: u16, object_id: u16, cb: (this: void) => void, object: XR_object): void;
305
923
  }
306
924
 
307
925
  /**
926
+ * Engine class id constants.
927
+ *
308
928
  * @source C++ class clsid
309
929
  * @customConstructor clsid
310
930
  * @group xr_alife
311
931
  */
312
932
  export class clsid {
933
+ /**
934
+ * Engine enum value for `clsid.actor`.
935
+ */
313
936
  public static readonly actor: 90;
937
+ /**
938
+ * Engine enum value for `clsid.art_bast_artefact`.
939
+ */
314
940
  public static readonly art_bast_artefact: 0;
941
+ /**
942
+ * Engine enum value for `clsid.art_black_drops`.
943
+ */
315
944
  public static readonly art_black_drops: 1;
945
+ /**
946
+ * Engine enum value for `clsid.art_cta`.
947
+ */
316
948
  public static readonly art_cta: 3;
949
+ /**
950
+ * Engine enum value for `clsid.art_dummy`.
951
+ */
317
952
  public static readonly art_dummy: 4;
953
+ /**
954
+ * Engine enum value for `clsid.art_electric_ball`.
955
+ */
318
956
  public static readonly art_electric_ball: 5;
957
+ /**
958
+ * Engine enum value for `clsid.art_faded_ball`.
959
+ */
319
960
  public static readonly art_faded_ball: 6;
961
+ /**
962
+ * Engine enum value for `clsid.art_galantine`.
963
+ */
320
964
  public static readonly art_galantine: 7;
965
+ /**
966
+ * Engine enum value for `clsid.art_gravi`.
967
+ */
321
968
  public static readonly art_gravi: 8;
969
+ /**
970
+ * Engine enum value for `clsid.art_gravi_black`.
971
+ */
322
972
  public static readonly art_gravi_black: 2;
973
+ /**
974
+ * Engine enum value for `clsid.art_mercury_ball`.
975
+ */
323
976
  public static readonly art_mercury_ball: 9;
977
+ /**
978
+ * Engine enum value for `clsid.art_needles`.
979
+ */
324
980
  public static readonly art_needles: 10;
981
+ /**
982
+ * Engine enum value for `clsid.art_rusty_hair`.
983
+ */
325
984
  public static readonly art_rusty_hair: 11;
985
+ /**
986
+ * Engine enum value for `clsid.art_thorn`.
987
+ */
326
988
  public static readonly art_thorn: 12;
989
+ /**
990
+ * Engine enum value for `clsid.art_zuda`.
991
+ */
327
992
  public static readonly art_zuda: 13;
993
+ /**
994
+ * Engine enum value for `clsid.artefact`.
995
+ */
328
996
  public static readonly artefact: 41;
997
+ /**
998
+ * Engine enum value for `clsid.artefact_s`.
999
+ */
329
1000
  public static readonly artefact_s: 102;
1001
+ /**
1002
+ * Engine enum value for `clsid.bloodsucker`.
1003
+ */
330
1004
  public static readonly bloodsucker: 14;
1005
+ /**
1006
+ * Engine enum value for `clsid.bloodsucker_s`.
1007
+ */
331
1008
  public static readonly bloodsucker_s: 108;
1009
+ /**
1010
+ * Engine enum value for `clsid.boar`.
1011
+ */
332
1012
  public static readonly boar: 15;
1013
+ /**
1014
+ * Engine enum value for `clsid.boar_s`.
1015
+ */
333
1016
  public static readonly boar_s: 109;
1017
+ /**
1018
+ * Engine enum value for `clsid.burer`.
1019
+ */
334
1020
  public static readonly burer: 16;
1021
+ /**
1022
+ * Engine enum value for `clsid.burer_s`.
1023
+ */
335
1024
  public static readonly burer_s: 110;
1025
+ /**
1026
+ * Engine enum value for `clsid.car`.
1027
+ */
336
1028
  public static readonly car: 52;
1029
+ /**
1030
+ * Engine enum value for `clsid.cat`.
1031
+ */
337
1032
  public static readonly cat: 17;
1033
+ /**
1034
+ * Engine enum value for `clsid.cat_s`.
1035
+ */
338
1036
  public static readonly cat_s: 111;
1037
+ /**
1038
+ * Engine enum value for `clsid.chimera`.
1039
+ */
339
1040
  public static readonly chimera: 29;
1041
+ /**
1042
+ * Engine enum value for `clsid.chimera_s`.
1043
+ */
340
1044
  public static readonly chimera_s: 112;
1045
+ /**
1046
+ * Engine enum value for `clsid.controller`.
1047
+ */
341
1048
  public static readonly controller: 18;
1049
+ /**
1050
+ * Engine enum value for `clsid.controller_s`.
1051
+ */
342
1052
  public static readonly controller_s: 113;
1053
+ /**
1054
+ * Engine enum value for `clsid.crow`.
1055
+ */
343
1056
  public static readonly crow: 19;
1057
+ /**
1058
+ * Engine enum value for `clsid.destrphys_s`.
1059
+ */
344
1060
  public static readonly destrphys_s: 93;
1061
+ /**
1062
+ * Engine enum value for `clsid.device_detector_advanced`.
1063
+ */
345
1064
  public static readonly device_detector_advanced: 53;
1065
+ /**
1066
+ * Engine enum value for `clsid.device_detector_elite`.
1067
+ */
346
1068
  public static readonly device_detector_elite: 54;
1069
+ /**
1070
+ * Engine enum value for `clsid.device_detector_scientific`.
1071
+ */
347
1072
  public static readonly device_detector_scientific: 57;
1073
+ /**
1074
+ * Engine enum value for `clsid.detector_scientific_s`.
1075
+ */
348
1076
  public static readonly detector_scientific_s: -1;
1077
+ /**
1078
+ * Engine enum value for `clsid.device_detector_simple`.
1079
+ */
349
1080
  public static readonly device_detector_simple: 58;
1081
+ /**
1082
+ * Engine enum value for `clsid.device_flare`.
1083
+ */
350
1084
  public static readonly device_flare: 55;
1085
+ /**
1086
+ * Engine enum value for `clsid.device_pda`.
1087
+ */
351
1088
  public static readonly device_pda: 56;
1089
+ /**
1090
+ * Engine enum value for `clsid.device_torch`.
1091
+ */
352
1092
  public static readonly device_torch: 59;
1093
+ /**
1094
+ * Engine enum value for `clsid.device_torch_s`.
1095
+ */
353
1096
  public static readonly device_torch_s: 146;
1097
+ /**
1098
+ * Engine enum value for `clsid.dog_black`.
1099
+ */
354
1100
  public static readonly dog_black: 20;
1101
+ /**
1102
+ * Engine enum value for `clsid.dog_red`.
1103
+ */
355
1104
  public static readonly dog_red: 23;
1105
+ /**
1106
+ * Engine enum value for `clsid.dog_s`.
1107
+ */
356
1108
  public static readonly dog_s: 116;
1109
+ /**
1110
+ * Engine enum value for `clsid.equ_exo`.
1111
+ */
357
1112
  public static readonly equ_exo: 60;
1113
+ /**
1114
+ * Engine enum value for `clsid.equ_military`.
1115
+ */
358
1116
  public static readonly equ_military: 61;
1117
+ /**
1118
+ * Engine enum value for `clsid.equ_scientific`.
1119
+ */
359
1120
  public static readonly equ_scientific: 62;
1121
+ /**
1122
+ * Engine enum value for `clsid.equ_stalker`.
1123
+ */
360
1124
  public static readonly equ_stalker: 63;
1125
+ /**
1126
+ * Engine enum value for `clsid.equ_stalker_s`.
1127
+ */
361
1128
  public static readonly equ_stalker_s: 65;
1129
+ /**
1130
+ * Engine enum value for `clsid.equ_helmet_s`.
1131
+ */
362
1132
  public static readonly equ_helmet_s: 70;
1133
+ /**
1134
+ * Engine enum value for `clsid.flesh`.
1135
+ */
363
1136
  public static readonly flesh: 24;
1137
+ /**
1138
+ * Engine enum value for `clsid.flesh_group`.
1139
+ */
364
1140
  public static readonly flesh_group: 25;
1141
+ /**
1142
+ * Engine enum value for `clsid.flesh_s`.
1143
+ */
365
1144
  public static readonly flesh_s: 117;
1145
+ /**
1146
+ * Engine enum value for `clsid.fracture`.
1147
+ */
366
1148
  public static readonly fracture: 26;
1149
+ /**
1150
+ * Engine enum value for `clsid.fracture_s`.
1151
+ */
367
1152
  public static readonly fracture_s: 119;
1153
+ /**
1154
+ * Engine enum value for `clsid.game`.
1155
+ */
368
1156
  public static readonly game: 70;
1157
+ /**
1158
+ * Engine enum value for `clsid.game_cl_artefact_hunt`.
1159
+ */
369
1160
  public static readonly game_cl_artefact_hunt: 45;
1161
+ /**
1162
+ * Engine enum value for `clsid.game_cl_capture_the_artefact`.
1163
+ */
370
1164
  public static readonly game_cl_capture_the_artefact: 46;
1165
+ /**
1166
+ * Engine enum value for `clsid.game_cl_deathmatch`.
1167
+ */
371
1168
  public static readonly game_cl_deathmatch: 47;
1169
+ /**
1170
+ * Engine enum value for `clsid.game_cl_single`.
1171
+ */
372
1172
  public static readonly game_cl_single: 48;
1173
+ /**
1174
+ * Engine enum value for `clsid.game_cl_team_deathmatch`.
1175
+ */
373
1176
  public static readonly game_cl_team_deathmatch: 49;
1177
+ /**
1178
+ * Engine enum value for `clsid.game_sv_artefact_hunt`.
1179
+ */
374
1180
  public static readonly game_sv_artefact_hunt: 129;
1181
+ /**
1182
+ * Engine enum value for `clsid.game_sv_capture_the_artefact`.
1183
+ */
375
1184
  public static readonly game_sv_capture_the_artefact: 130;
1185
+ /**
1186
+ * Engine enum value for `clsid.game_sv_deathmatch`.
1187
+ */
376
1188
  public static readonly game_sv_deathmatch: 131;
1189
+ /**
1190
+ * Engine enum value for `clsid.game_sv_single`.
1191
+ */
377
1192
  public static readonly game_sv_single: 132;
1193
+ /**
1194
+ * Engine enum value for `clsid.game_sv_team_deathmatch`.
1195
+ */
378
1196
  public static readonly game_sv_team_deathmatch: 133;
1197
+ /**
1198
+ * Engine enum value for `clsid.game_ui_artefact_hunt`.
1199
+ */
379
1200
  public static readonly game_ui_artefact_hunt: 147;
1201
+ /**
1202
+ * Engine enum value for `clsid.game_ui_capture_the_artefact`.
1203
+ */
380
1204
  public static readonly game_ui_capture_the_artefact: 148;
1205
+ /**
1206
+ * Engine enum value for `clsid.game_ui_deathmatch`.
1207
+ */
381
1208
  public static readonly game_ui_deathmatch: 149;
1209
+ /**
1210
+ * Engine enum value for `clsid.game_ui_single`.
1211
+ */
382
1212
  public static readonly game_ui_single: 150;
1213
+ /**
1214
+ * Engine enum value for `clsid.game_ui_team_deathmatch`.
1215
+ */
383
1216
  public static readonly game_ui_team_deathmatch: 151;
1217
+ /**
1218
+ * Engine enum value for `clsid.gigant_s`.
1219
+ */
384
1220
  public static readonly gigant_s: 118;
1221
+ /**
1222
+ * Engine enum value for `clsid.graph_point`.
1223
+ */
385
1224
  public static readonly graph_point: 28;
1225
+ /**
1226
+ * Engine enum value for `clsid.hanging_lamp`.
1227
+ */
386
1228
  public static readonly hanging_lamp: 94;
1229
+ /**
1230
+ * Engine enum value for `clsid.helicopter`.
1231
+ */
387
1232
  public static readonly helicopter: 50;
1233
+ /**
1234
+ * Engine enum value for `clsid.helmet`.
1235
+ */
388
1236
  public static readonly helmet: 64;
1237
+ /**
1238
+ * Engine enum value for `clsid.hlamp_s`.
1239
+ */
389
1240
  public static readonly hlamp_s: 125;
1241
+ /**
1242
+ * Engine enum value for `clsid.hud_manager`.
1243
+ */
390
1244
  public static readonly hud_manager: 74;
1245
+ /**
1246
+ * Engine enum value for `clsid.inventory_box`.
1247
+ */
391
1248
  public static readonly inventory_box: 95;
1249
+ /**
1250
+ * Engine enum value for `clsid.inventory_box_s`.
1251
+ */
392
1252
  public static readonly inventory_box_s: 140;
1253
+ /**
1254
+ * Engine enum value for `clsid.level`.
1255
+ */
393
1256
  public static readonly level: 69;
1257
+ /**
1258
+ * Engine enum value for `clsid.level_changer`.
1259
+ */
394
1260
  public static readonly level_changer: 84;
1261
+ /**
1262
+ * Engine enum value for `clsid.level_changer_s`.
1263
+ */
395
1264
  public static readonly level_changer_s: 85;
1265
+ /**
1266
+ * Engine enum value for `clsid.main_menu`.
1267
+ */
396
1268
  public static readonly main_menu: 86;
1269
+ /**
1270
+ * Engine enum value for `clsid.mp_players_bag`.
1271
+ */
397
1272
  public static readonly mp_players_bag: 87;
1273
+ /**
1274
+ * Engine enum value for `clsid.nogravity_zone`.
1275
+ */
398
1276
  public static readonly nogravity_zone: 211;
1277
+ /**
1278
+ * Engine enum value for `clsid.obj_antirad`.
1279
+ */
399
1280
  public static readonly obj_antirad: 75;
1281
+ /**
1282
+ * Engine enum value for `clsid.obj_antirad_s`.
1283
+ */
400
1284
  public static readonly obj_antirad_s: 135;
1285
+ /**
1286
+ * Engine enum value for `clsid.obj_attachable`.
1287
+ */
401
1288
  public static readonly obj_attachable: 76;
1289
+ /**
1290
+ * Engine enum value for `clsid.obj_bandage`.
1291
+ */
402
1292
  public static readonly obj_bandage: 77;
1293
+ /**
1294
+ * Engine enum value for `clsid.obj_bandage_s`.
1295
+ */
403
1296
  public static readonly obj_bandage_s: 136;
1297
+ /**
1298
+ * Engine enum value for `clsid.obj_bolt`.
1299
+ */
404
1300
  public static readonly obj_bolt: 78;
1301
+ /**
1302
+ * Engine enum value for `clsid.obj_bottle`.
1303
+ */
405
1304
  public static readonly obj_bottle: 79;
1305
+ /**
1306
+ * Engine enum value for `clsid.obj_bottle_s`.
1307
+ */
406
1308
  public static readonly obj_bottle_s: 137;
1309
+ /**
1310
+ * Engine enum value for `clsid.obj_breakable`.
1311
+ */
407
1312
  public static readonly obj_breakable: 91;
1313
+ /**
1314
+ * Engine enum value for `clsid.obj_climable`.
1315
+ */
408
1316
  public static readonly obj_climable: 92;
1317
+ /**
1318
+ * Engine enum value for `clsid.obj_document`.
1319
+ */
409
1320
  public static readonly obj_document: 80;
1321
+ /**
1322
+ * Engine enum value for `clsid.obj_explosive`.
1323
+ */
410
1324
  public static readonly obj_explosive: 81;
1325
+ /**
1326
+ * Engine enum value for `clsid.obj_explosive_s`.
1327
+ */
411
1328
  public static readonly obj_explosive_s: 138;
1329
+ /**
1330
+ * Engine enum value for `clsid.obj_food`.
1331
+ */
412
1332
  public static readonly obj_food: 82;
1333
+ /**
1334
+ * Engine enum value for `clsid.obj_food_s`.
1335
+ */
413
1336
  public static readonly obj_food_s: 139;
1337
+ /**
1338
+ * Engine enum value for `clsid.obj_medkit`.
1339
+ */
414
1340
  public static readonly obj_medkit: 83;
1341
+ /**
1342
+ * Engine enum value for `clsid.obj_medkit_s`.
1343
+ */
415
1344
  public static readonly obj_medkit_s: 142;
1345
+ /**
1346
+ * Engine enum value for `clsid.obj_pda_s`.
1347
+ */
416
1348
  public static readonly obj_pda_s: 144;
1349
+ /**
1350
+ * Engine enum value for `clsid.obj_phskeleton`.
1351
+ */
417
1352
  public static readonly obj_phskeleton: 100;
1353
+ /**
1354
+ * Engine enum value for `clsid.obj_phys_destroyable`.
1355
+ */
418
1356
  public static readonly obj_phys_destroyable: 99;
1357
+ /**
1358
+ * Engine enum value for `clsid.obj_physic`.
1359
+ */
419
1360
  public static readonly obj_physic: 96;
1361
+ /**
1362
+ * Engine enum value for `clsid.online_offline_group`.
1363
+ */
420
1364
  public static readonly online_offline_group: 88;
1365
+ /**
1366
+ * Engine enum value for `clsid.online_offline_group_s`.
1367
+ */
421
1368
  public static readonly online_offline_group_s: 89;
1369
+ /**
1370
+ * Engine enum value for `clsid.phantom`.
1371
+ */
422
1372
  public static readonly phantom: 30;
1373
+ /**
1374
+ * Engine enum value for `clsid.poltergeist`.
1375
+ */
423
1376
  public static readonly poltergeist: 31;
1377
+ /**
1378
+ * Engine enum value for `clsid.poltergeist_s`.
1379
+ */
424
1380
  public static readonly poltergeist_s: 120;
1381
+ /**
1382
+ * Engine enum value for `clsid.projector`.
1383
+ */
425
1384
  public static readonly projector: 98;
1385
+ /**
1386
+ * Engine enum value for `clsid.pseudo_gigant`.
1387
+ */
426
1388
  public static readonly pseudo_gigant: 27;
1389
+ /**
1390
+ * Engine enum value for `clsid.pseudodog_s`.
1391
+ */
427
1392
  public static readonly pseudodog_s: 121;
1393
+ /**
1394
+ * Engine enum value for `clsid.psy_dog`.
1395
+ */
428
1396
  public static readonly psy_dog: 22;
1397
+ /**
1398
+ * Engine enum value for `clsid.psy_dog_phantom`.
1399
+ */
429
1400
  public static readonly psy_dog_phantom: 21;
1401
+ /**
1402
+ * Engine enum value for `clsid.psy_dog_phantom_s`.
1403
+ */
430
1404
  public static readonly psy_dog_phantom_s: 114;
1405
+ /**
1406
+ * Engine enum value for `clsid.psy_dog_s`.
1407
+ */
431
1408
  public static readonly psy_dog_s: 115;
1409
+ /**
1410
+ * Engine enum value for `clsid.rat`.
1411
+ */
432
1412
  public static readonly rat: 32;
1413
+ /**
1414
+ * Engine enum value for `clsid.script_actor`.
1415
+ */
433
1416
  public static readonly script_actor: 134;
1417
+ /**
1418
+ * Engine enum value for `clsid.script_heli`.
1419
+ */
434
1420
  public static readonly script_heli: 51;
1421
+ /**
1422
+ * Engine enum value for `clsid.script_object`.
1423
+ */
435
1424
  public static readonly script_object: 103;
1425
+ /**
1426
+ * Engine enum value for `clsid.script_phys`.
1427
+ */
436
1428
  public static readonly script_phys: 97;
1429
+ /**
1430
+ * Engine enum value for `clsid.script_restr`.
1431
+ */
437
1432
  public static readonly script_restr: 127;
1433
+ /**
1434
+ * Engine enum value for `clsid.script_stalker`.
1435
+ */
438
1436
  public static readonly script_stalker: 35;
1437
+ /**
1438
+ * Engine enum value for `clsid.script_zone`.
1439
+ */
439
1440
  public static readonly script_zone: 101;
1441
+ /**
1442
+ * Engine enum value for `clsid.smart_cover`.
1443
+ */
440
1444
  public static readonly smart_cover: 104;
1445
+ /**
1446
+ * Engine enum value for `clsid.smart_terrain`.
1447
+ */
441
1448
  public static readonly smart_terrain: 105;
1449
+ /**
1450
+ * Engine enum value for `clsid.smart_zone`.
1451
+ */
442
1452
  public static readonly smart_zone: 106;
1453
+ /**
1454
+ * Engine enum value for `clsid.smartcover_s`.
1455
+ */
443
1456
  public static readonly smartcover_s: 107;
1457
+ /**
1458
+ * Engine enum value for `clsid.snork`.
1459
+ */
444
1460
  public static readonly snork: 33;
1461
+ /**
1462
+ * Engine enum value for `clsid.snork_s`.
1463
+ */
445
1464
  public static readonly snork_s: 122;
1465
+ /**
1466
+ * Engine enum value for `clsid.space_restrictor`.
1467
+ */
446
1468
  public static readonly space_restrictor: 126;
1469
+ /**
1470
+ * Engine enum value for `clsid.spectator`.
1471
+ */
447
1472
  public static readonly spectator: 128;
1473
+ /**
1474
+ * Engine enum value for `clsid.stalker`.
1475
+ */
448
1476
  public static readonly stalker: 34;
1477
+ /**
1478
+ * Engine enum value for `clsid.team_base_zone`.
1479
+ */
449
1480
  public static readonly team_base_zone: 214;
1481
+ /**
1482
+ * Engine enum value for `clsid.torrid_zone`.
1483
+ */
450
1484
  public static readonly torrid_zone: 215;
1485
+ /**
1486
+ * Engine enum value for `clsid.trader`.
1487
+ */
451
1488
  public static readonly trader: 36;
1489
+ /**
1490
+ * Engine enum value for `clsid.tushkano`.
1491
+ */
452
1492
  public static readonly tushkano: 37;
1493
+ /**
1494
+ * Engine enum value for `clsid.tushkano_s`.
1495
+ */
453
1496
  public static readonly tushkano_s: 123;
1497
+ /**
1498
+ * Engine enum value for `clsid.wpn_ak74`.
1499
+ */
454
1500
  public static readonly wpn_ak74: 173;
1501
+ /**
1502
+ * Engine enum value for `clsid.wpn_ak74_s`.
1503
+ */
455
1504
  public static readonly wpn_ak74_s: 152;
1505
+ /**
1506
+ * Engine enum value for `clsid.wpn_ammo`.
1507
+ */
456
1508
  public static readonly wpn_ammo: 39;
1509
+ /**
1510
+ * Engine enum value for `clsid.wpn_ammo_m209`.
1511
+ */
457
1512
  public static readonly wpn_ammo_m209: 42;
1513
+ /**
1514
+ * Engine enum value for `clsid.wpn_ammo_m209_s`.
1515
+ */
458
1516
  public static readonly wpn_ammo_m209_s: 141;
1517
+ /**
1518
+ * Engine enum value for `clsid.wpn_ammo_og7b`.
1519
+ */
459
1520
  public static readonly wpn_ammo_og7b: 43;
1521
+ /**
1522
+ * Engine enum value for `clsid.wpn_ammo_og7b_s`.
1523
+ */
460
1524
  public static readonly wpn_ammo_og7b_s: 143;
1525
+ /**
1526
+ * Engine enum value for `clsid.wpn_ammo_s`.
1527
+ */
461
1528
  public static readonly wpn_ammo_s: 40;
1529
+ /**
1530
+ * Engine enum value for `clsid.wpn_ammo_vog25`.
1531
+ */
462
1532
  public static readonly wpn_ammo_vog25: 44;
1533
+ /**
1534
+ * Engine enum value for `clsid.wpn_ammo_vog25_s`.
1535
+ */
463
1536
  public static readonly wpn_ammo_vog25_s: 145;
1537
+ /**
1538
+ * Engine enum value for `clsid.wpn_auto_shotgun_s`.
1539
+ */
464
1540
  public static readonly wpn_auto_shotgun_s: 153;
1541
+ /**
1542
+ * Engine enum value for `clsid.wpn_binocular`.
1543
+ */
465
1544
  public static readonly wpn_binocular: 174;
1545
+ /**
1546
+ * Engine enum value for `clsid.wpn_binocular_s`.
1547
+ */
466
1548
  public static readonly wpn_binocular_s: 154;
1549
+ /**
1550
+ * Engine enum value for `clsid.wpn_bm16`.
1551
+ */
467
1552
  public static readonly wpn_bm16: 175;
1553
+ /**
1554
+ * Engine enum value for `clsid.wpn_bm16_s`.
1555
+ */
468
1556
  public static readonly wpn_bm16_s: 155;
1557
+ /**
1558
+ * Engine enum value for `clsid.wpn_fn2000`.
1559
+ */
469
1560
  public static readonly wpn_fn2000: 176;
1561
+ /**
1562
+ * Engine enum value for `clsid.wpn_fort`.
1563
+ */
470
1564
  public static readonly wpn_fort: 177;
1565
+ /**
1566
+ * Engine enum value for `clsid.wpn_grenade_f1`.
1567
+ */
471
1568
  public static readonly wpn_grenade_f1: 66;
1569
+ /**
1570
+ * Engine enum value for `clsid.wpn_grenade_f1_s`.
1571
+ */
472
1572
  public static readonly wpn_grenade_f1_s: 67;
1573
+ /**
1574
+ * Engine enum value for `clsid.wpn_grenade_fake`.
1575
+ */
473
1576
  public static readonly wpn_grenade_fake: 68;
1577
+ /**
1578
+ * Engine enum value for `clsid.wpn_grenade_launcher`.
1579
+ */
474
1580
  public static readonly wpn_grenade_launcher: 178;
1581
+ /**
1582
+ * Engine enum value for `clsid.wpn_grenade_launcher_s`.
1583
+ */
475
1584
  public static readonly wpn_grenade_launcher_s: 156;
1585
+ /**
1586
+ * Engine enum value for `clsid.wpn_grenade_rgd5`.
1587
+ */
476
1588
  public static readonly wpn_grenade_rgd5: 71;
1589
+ /**
1590
+ * Engine enum value for `clsid.wpn_grenade_rgd5_s`.
1591
+ */
477
1592
  public static readonly wpn_grenade_rgd5_s: 72;
1593
+ /**
1594
+ * Engine enum value for `clsid.wpn_grenade_rpg7`.
1595
+ */
478
1596
  public static readonly wpn_grenade_rpg7: 73;
1597
+ /**
1598
+ * Engine enum value for `clsid.wpn_groza`.
1599
+ */
479
1600
  public static readonly wpn_groza: 179;
1601
+ /**
1602
+ * Engine enum value for `clsid.wpn_groza_s`.
1603
+ */
480
1604
  public static readonly wpn_groza_s: 157;
1605
+ /**
1606
+ * Engine enum value for `clsid.wpn_hpsa`.
1607
+ */
481
1608
  public static readonly wpn_hpsa: 180;
1609
+ /**
1610
+ * Engine enum value for `clsid.wpn_hpsa_s`.
1611
+ */
482
1612
  public static readonly wpn_hpsa_s: 158;
1613
+ /**
1614
+ * Engine enum value for `clsid.wpn_knife`.
1615
+ */
483
1616
  public static readonly wpn_knife: 181;
1617
+ /**
1618
+ * Engine enum value for `clsid.wpn_knife_s`.
1619
+ */
484
1620
  public static readonly wpn_knife_s: 159;
1621
+ /**
1622
+ * Engine enum value for `clsid.wpn_lr300`.
1623
+ */
485
1624
  public static readonly wpn_lr300: 182;
1625
+ /**
1626
+ * Engine enum value for `clsid.wpn_lr300_s`.
1627
+ */
486
1628
  public static readonly wpn_lr300_s: 160;
1629
+ /**
1630
+ * Engine enum value for `clsid.wpn_pm`.
1631
+ */
487
1632
  public static readonly wpn_pm: 183;
1633
+ /**
1634
+ * Engine enum value for `clsid.wpn_pm_s`.
1635
+ */
488
1636
  public static readonly wpn_pm_s: 161;
1637
+ /**
1638
+ * Engine enum value for `clsid.wpn_rg6`.
1639
+ */
489
1640
  public static readonly wpn_rg6: 184;
1641
+ /**
1642
+ * Engine enum value for `clsid.wpn_rg6_s`.
1643
+ */
490
1644
  public static readonly wpn_rg6_s: 162;
1645
+ /**
1646
+ * Engine enum value for `clsid.wpn_rpg7`.
1647
+ */
491
1648
  public static readonly wpn_rpg7: 185;
1649
+ /**
1650
+ * Engine enum value for `clsid.wpn_rpg7_s`.
1651
+ */
492
1652
  public static readonly wpn_rpg7_s: 163;
1653
+ /**
1654
+ * Engine enum value for `clsid.wpn_scope`.
1655
+ */
493
1656
  public static readonly wpn_scope: 186;
1657
+ /**
1658
+ * Engine enum value for `clsid.wpn_scope_s`.
1659
+ */
494
1660
  public static readonly wpn_scope_s: 164;
1661
+ /**
1662
+ * Engine enum value for `clsid.wpn_shotgun`.
1663
+ */
495
1664
  public static readonly wpn_shotgun: 187;
1665
+ /**
1666
+ * Engine enum value for `clsid.wpn_shotgun_s`.
1667
+ */
496
1668
  public static readonly wpn_shotgun_s: 165;
1669
+ /**
1670
+ * Engine enum value for `clsid.wpn_silencer`.
1671
+ */
497
1672
  public static readonly wpn_silencer: 188;
1673
+ /**
1674
+ * Engine enum value for `clsid.wpn_silencer_s`.
1675
+ */
498
1676
  public static readonly wpn_silencer_s: 166;
1677
+ /**
1678
+ * Engine enum value for `clsid.wpn_stat_mgun`.
1679
+ */
499
1680
  public static readonly wpn_stat_mgun: 189;
1681
+ /**
1682
+ * Engine enum value for `clsid.wpn_svd`.
1683
+ */
500
1684
  public static readonly wpn_svd: 190;
1685
+ /**
1686
+ * Engine enum value for `clsid.wpn_svd_s`.
1687
+ */
501
1688
  public static readonly wpn_svd_s: 167;
1689
+ /**
1690
+ * Engine enum value for `clsid.wpn_svu`.
1691
+ */
502
1692
  public static readonly wpn_svu: 191;
1693
+ /**
1694
+ * Engine enum value for `clsid.wpn_svu_s`.
1695
+ */
503
1696
  public static readonly wpn_svu_s: 168;
1697
+ /**
1698
+ * Engine enum value for `clsid.wpn_usp45`.
1699
+ */
504
1700
  public static readonly wpn_usp45: 192;
1701
+ /**
1702
+ * Engine enum value for `clsid.wpn_usp45_s`.
1703
+ */
505
1704
  public static readonly wpn_usp45_s: 169;
1705
+ /**
1706
+ * Engine enum value for `clsid.wpn_val`.
1707
+ */
506
1708
  public static readonly wpn_val: 193;
1709
+ /**
1710
+ * Engine enum value for `clsid.wpn_val_s`.
1711
+ */
507
1712
  public static readonly wpn_val_s: 170;
1713
+ /**
1714
+ * Engine enum value for `clsid.wpn_vintorez`.
1715
+ */
508
1716
  public static readonly wpn_vintorez: 194;
1717
+ /**
1718
+ * Engine enum value for `clsid.wpn_vintorez_s`.
1719
+ */
509
1720
  public static readonly wpn_vintorez_s: 171;
1721
+ /**
1722
+ * Engine enum value for `clsid.wpn_walther`.
1723
+ */
510
1724
  public static readonly wpn_walther: 195;
1725
+ /**
1726
+ * Engine enum value for `clsid.wpn_walther_s`.
1727
+ */
511
1728
  public static readonly wpn_walther_s: 172;
1729
+ /**
1730
+ * Engine enum value for `clsid.wpn_wmagaz`.
1731
+ */
512
1732
  public static readonly wpn_wmagaz: 196;
1733
+ /**
1734
+ * Engine enum value for `clsid.wpn_wmaggl`.
1735
+ */
513
1736
  public static readonly wpn_wmaggl: 197;
1737
+ /**
1738
+ * Engine enum value for `clsid.zombie`.
1739
+ */
514
1740
  public static readonly zombie: 38;
1741
+ /**
1742
+ * Engine enum value for `clsid.zombie_s`.
1743
+ */
515
1744
  public static readonly zombie_s: 124;
1745
+ /**
1746
+ * Engine enum value for `clsid.zone`.
1747
+ */
516
1748
  public static readonly zone: 216;
1749
+ /**
1750
+ * Engine enum value for `clsid.zone_acid_fog`.
1751
+ */
517
1752
  public static readonly zone_acid_fog: 204;
1753
+ /**
1754
+ * Engine enum value for `clsid.zone_bfuzz`.
1755
+ */
518
1756
  public static readonly zone_bfuzz: 205;
1757
+ /**
1758
+ * Engine enum value for `clsid.zone_bfuzz_s`.
1759
+ */
519
1760
  public static readonly zone_bfuzz_s: 198;
1761
+ /**
1762
+ * Engine enum value for `clsid.zone_campfire`.
1763
+ */
520
1764
  public static readonly zone_campfire: 206;
1765
+ /**
1766
+ * Engine enum value for `clsid.zone_dead`.
1767
+ */
521
1768
  public static readonly zone_dead: 207;
1769
+ /**
1770
+ * Engine enum value for `clsid.zone_galant_s`.
1771
+ */
522
1772
  public static readonly zone_galant_s: 199;
1773
+ /**
1774
+ * Engine enum value for `clsid.zone_galantine`.
1775
+ */
523
1776
  public static readonly zone_galantine: 208;
1777
+ /**
1778
+ * Engine enum value for `clsid.zone_mbald_s`.
1779
+ */
524
1780
  public static readonly zone_mbald_s: 200;
1781
+ /**
1782
+ * Engine enum value for `clsid.zone_mincer`.
1783
+ */
525
1784
  public static readonly zone_mincer: 210;
1785
+ /**
1786
+ * Engine enum value for `clsid.zone_mincer_s`.
1787
+ */
526
1788
  public static readonly zone_mincer_s: 201;
1789
+ /**
1790
+ * Engine enum value for `clsid.zone_mosquito_bald`.
1791
+ */
527
1792
  public static readonly zone_mosquito_bald: 209;
1793
+ /**
1794
+ * Engine enum value for `clsid.zone_radio_s`.
1795
+ */
528
1796
  public static readonly zone_radio_s: 202;
1797
+ /**
1798
+ * Engine enum value for `clsid.zone_radioactive`.
1799
+ */
529
1800
  public static readonly zone_radioactive: 212;
1801
+ /**
1802
+ * Engine enum value for `clsid.zone_rusty_hair`.
1803
+ */
530
1804
  public static readonly zone_rusty_hair: 213;
1805
+ /**
1806
+ * Engine enum value for `clsid.zone_torrid_s`.
1807
+ */
531
1808
  public static readonly zone_torrid_s: 203;
532
1809
  }
533
1810
 
@@ -542,13 +1819,29 @@ declare module "xray16" {
542
1819
  type TXR_class_id = EnumeratedStaticsValues<typeof clsid>;
543
1820
 
544
1821
  /**
1822
+ * Factory for ALife server object bindings.
1823
+ *
545
1824
  * @source C++ class global
546
1825
  * @customConstructor object_factory
547
1826
  * @group xr_alife
1827
+ *
1828
+ * @remarks
1829
+ * Registers Lua script classes for engine class ids. Missing Lua class constructors are logged and skipped.
548
1830
  */
549
1831
  export class object_factory {
1832
+ /**
1833
+ * Engine-owned object factory.
1834
+ */
550
1835
  protected constructor();
551
1836
 
1837
+ /**
1838
+ * Register a script class pair for an engine class id.
1839
+ *
1840
+ * @param client_object_class - Lua client-side class name.
1841
+ * @param server_object_class - Lua server-side class name.
1842
+ * @param clsid - Engine class id name.
1843
+ * @param script_clsid - Script class id exported by `clsid`.
1844
+ */
552
1845
  public register(
553
1846
  client_object_class: string,
554
1847
  server_object_class: string,
@@ -556,11 +1849,22 @@ declare module "xray16" {
556
1849
  script_clsid: TXR_class_key
557
1850
  ): void;
558
1851
 
1852
+ /**
1853
+ * Register a single script class for an engine class id.
1854
+ *
1855
+ * @param client_object_class - Lua class name.
1856
+ * @param clsid - Engine class id name.
1857
+ * @param script_clsid - Script class id exported by `clsid`.
1858
+ */
559
1859
  public register(client_object_class: string, clsid: string, script_clsid: TXR_class_key): void;
560
1860
  }
561
1861
 
562
1862
  /**
1863
+ * Get the active ALife simulator.
1864
+ *
563
1865
  * @group xr_alife
1866
+ *
1867
+ * @returns ALife simulator singleton.
564
1868
  */
565
1869
  export function alife(this: void): alife_simulator;
566
1870
  }