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,41 +1,110 @@
1
1
  declare module "xray16" {
2
2
  /**
3
+ * Base engine object exposed for compatibility with script binders.
4
+ *
3
5
  * @source C++ class DLL_Pure
4
6
  * @customConstructor DLL_Pure
5
7
  * @group xr_core
8
+ *
9
+ * @remarks
10
+ * Base for engine-owned client objects. Scripts normally receive derived objects from xray callbacks or casts.
6
11
  */
7
12
  export class DLL_Pure extends EngineBinding {
13
+ /**
14
+ * Engine-created base object.
15
+ */
8
16
  protected constructor();
9
17
  }
10
18
 
11
19
  /**
20
+ * Render visual handle for client objects.
21
+ *
12
22
  * @source C++ class IRender_Visual
13
23
  * @group xr_client_object
24
+ *
25
+ * @remarks
26
+ * Visual handles are owned by the object. Treat returned cast interfaces as borrowed engine references.
14
27
  */
15
28
  export interface IXR_IRender_Visual {
29
+ /**
30
+ * Cast the visual to animated kinematics when supported.
31
+ *
32
+ * @remarks
33
+ * Runtime can return `null` when the visual is not animated even though older declarations expose a non-null type.
34
+ *
35
+ * @returns Animated kinematics interface.
36
+ */
16
37
  dcast_PKinematicsAnimated(): IKinematicsAnimated;
17
38
  }
18
39
 
19
40
  /**
41
+ * Base client-side game object.
42
+ *
20
43
  * @source C++ class CGameObject : DLL_Pure, ISheduled, ICollidable, IRenderable
21
44
  * @customConstructor CGameObject
22
45
  * @group xr_client_object
46
+ *
47
+ * @remarks
48
+ * Client-side object state is engine-owned. Use this wrapper for low-level engine callbacks; gameplay scripts usually
49
+ * work with `game_object` instead.
23
50
  */
24
51
  export class CGameObject extends DLL_Pure {
52
+ /**
53
+ * @returns Render visual assigned to the object.
54
+ */
25
55
  public Visual(): IXR_IRender_Visual;
26
56
 
57
+ /**
58
+ * @returns Whether the object is enabled in the client object loop.
59
+ */
27
60
  public getEnabled(): boolean;
28
61
 
62
+ /**
63
+ * Construct engine-side object state.
64
+ *
65
+ * @remarks
66
+ * Lifecycle hook used by the engine. Calling it from gameplay scripts can reinitialize native state unexpectedly.
67
+ *
68
+ * @returns Constructed base object.
69
+ */
29
70
  public _construct(): DLL_Pure;
30
71
 
72
+ /**
73
+ * Import network state from a packet.
74
+ *
75
+ * @param net_packet - Source network packet.
76
+ */
31
77
  public net_Import(net_packet: net_packet): void;
32
78
 
79
+ /**
80
+ * @returns Whether the object is visible.
81
+ */
33
82
  public getVisible(): boolean;
34
83
 
84
+ /**
85
+ * Export network state to a packet.
86
+ *
87
+ * @param net_packet - Destination network packet.
88
+ */
35
89
  public net_Export(net_packet: net_packet): void;
36
90
 
91
+ /**
92
+ * Spawn the client object from its server object.
93
+ *
94
+ * @remarks
95
+ * Lifecycle hook used during network spawn. Return `false` to reject spawn in custom subclasses.
96
+ *
97
+ * @param cse_abstract - Server object used for spawn data.
98
+ * @returns Whether spawn succeeded.
99
+ */
37
100
  public net_Spawn(cse_abstract: cse_abstract): boolean;
38
101
 
102
+ /**
103
+ * Use another object through the engine interaction path.
104
+ *
105
+ * @param object - Object being used.
106
+ * @returns Whether the use action was handled.
107
+ */
39
108
  public use(object: CGameObject): boolean;
40
109
  }
41
110
 
@@ -45,32 +114,94 @@ declare module "xray16" {
45
114
  * @source C++ class object_binder
46
115
  * @customConstructor object_binder
47
116
  * @group xr_client_object
117
+ *
118
+ * @remarks
119
+ * Script binders are callbacks attached to a `game_object`. The engine calls lifecycle methods; scripts usually
120
+ * override them in subclasses instead of invoking them directly.
48
121
  */
49
122
  export class object_binder<T = game_object> extends EngineBinding {
123
+ /**
124
+ * Script game object controlled by this binder.
125
+ */
50
126
  public readonly object: T;
51
127
 
128
+ /**
129
+ * @param object - Script game object controlled by this binder.
130
+ */
52
131
  public constructor(object: T);
53
132
 
133
+ /**
134
+ * Save binder state.
135
+ *
136
+ * @param packet - Destination save packet.
137
+ */
54
138
  public save(packet: net_packet): void;
55
139
 
140
+ /**
141
+ * Load binder state.
142
+ *
143
+ * @param reader - Source save reader.
144
+ */
56
145
  public load(reader: reader): void;
57
146
 
147
+ /**
148
+ * Update binder logic.
149
+ *
150
+ * @param delta - Time since last update in milliseconds.
151
+ */
58
152
  public update(delta: u32): void;
59
153
 
154
+ /**
155
+ * Reload binder configuration.
156
+ *
157
+ * @param section - Object config section.
158
+ */
60
159
  public reload(section: string): void;
61
160
 
161
+ /**
162
+ * Reinitialize binder runtime state.
163
+ */
62
164
  public reinit(): void;
63
165
 
166
+ /**
167
+ * Export binder network state.
168
+ *
169
+ * @param net_packet - Destination network packet.
170
+ */
64
171
  public net_export(net_packet: net_packet): void;
65
172
 
173
+ /**
174
+ * Decide whether binder state should be saved over the network.
175
+ *
176
+ * @returns Whether the state is relevant for network save.
177
+ */
66
178
  public net_save_relevant(): boolean;
67
179
 
180
+ /**
181
+ * Handle client object destruction.
182
+ */
68
183
  public net_destroy(): void;
69
184
 
185
+ /**
186
+ * Release references to a game object.
187
+ *
188
+ * @param object - Object being released.
189
+ */
70
190
  public net_Relcase(object: T): void;
71
191
 
192
+ /**
193
+ * Handle network spawn.
194
+ *
195
+ * @param object - Server object used for spawn data.
196
+ * @returns Whether spawn succeeded.
197
+ */
72
198
  public net_spawn(object: cse_alife_object): boolean;
73
199
 
200
+ /**
201
+ * Import binder network state.
202
+ *
203
+ * @param net_packet - Source network packet.
204
+ */
74
205
  public net_import(net_packet: net_packet): void;
75
206
  }
76
207
  }
@@ -1,40 +1,71 @@
1
1
  declare module "xray16" {
2
2
  /**
3
+ * Client object binding for `CEntityAlive`.
4
+ *
3
5
  * @source C++ class CEntityAlive : public CEntity
4
6
  * @customConstructor CEntityAlive
5
7
  * @group xr_creature
8
+ *
9
+ * @remarks
10
+ * Base wrapper for alive objects. Use `game_object.is_entity_alive()` or a narrower predicate before calling
11
+ * alive-object methods from the shared `game_object` surface.
6
12
  */
7
13
  export class CEntityAlive extends CGameObject {}
8
14
 
9
15
  /**
16
+ * Client object binding for `CActor`.
17
+ *
10
18
  * @source C++ class CActor : CGameObject
11
19
  * @customConstructor CActor
12
20
  * @group xr_creature
21
+ *
22
+ * @remarks
23
+ * Actor-only APIs on `game_object` require the current object to be the player actor, not just any alive entity.
13
24
  */
14
25
  export class CActor extends CGameObject {}
15
26
 
16
27
  /**
28
+ * Client object binding for `CCustomMonster`.
29
+ *
17
30
  * @source C++ class CCustomMonster : CGameObject
18
31
  * @customConstructor CCustomMonster
19
32
  * @group xr_creature
33
+ *
34
+ * @remarks
35
+ * Base wrapper for custom monsters. Monster sound, range, memory, home, and enemy-transfer helpers require this
36
+ * family or one of its subclasses.
20
37
  */
21
38
  export class CCustomMonster extends CGameObject {}
22
39
 
23
40
  /**
41
+ * Client object binding for `CInventoryOwner`.
42
+ *
24
43
  * @source C++ class CInventoryOwner : CGameObject
25
44
  * @customConstructor CInventoryOwner
26
45
  * @group xr_creature
46
+ *
47
+ * @remarks
48
+ * Inventory-owner APIs cover NPCs, traders, corpses, boxes, and the actor depending on runtime class. Check the
49
+ * object kind before assuming dialog, trade, belt, or inventory-box behavior exists.
27
50
  */
28
51
  export class CInventoryOwner extends CGameObject {}
29
52
 
30
53
  /**
54
+ * Client object binding for `CInventoryItem`.
55
+ *
31
56
  * @source C++ class CInventoryItem : CGameObject
32
57
  * @customConstructor CInventoryItem
33
58
  * @group xr_creature
59
+ *
60
+ * @remarks
61
+ * Base wrapper for inventory items. Item condition, cost, upgrades, and slot behavior depend on the concrete item
62
+ * class.
34
63
  */
35
64
  export class CInventoryItem extends CGameObject {}
36
65
 
37
66
  /**
67
+ * Client object binding for `CZombie`.
68
+ *
38
69
  * @source C++ class CZombie : CGameObject
39
70
  * @customConstructor CZombie
40
71
  * @group xr_creature
@@ -42,6 +73,8 @@ declare module "xray16" {
42
73
  export class CZombie extends CGameObject {}
43
74
 
44
75
  /**
76
+ * Client object binding for `CController`.
77
+ *
45
78
  * @source C++ class CController : CGameObject
46
79
  * @customConstructor CController
47
80
  * @group xr_creature
@@ -49,6 +82,8 @@ declare module "xray16" {
49
82
  export class CController extends CGameObject {}
50
83
 
51
84
  /**
85
+ * Client object binding for `CTushkano`.
86
+ *
52
87
  * @source C++ class CTushkano : CGameObject
53
88
  * @customConstructor CTushkano
54
89
  * @group xr_creature
@@ -56,6 +91,8 @@ declare module "xray16" {
56
91
  export class CTushkano extends CGameObject {}
57
92
 
58
93
  /**
94
+ * Client object binding for `CBurer`.
95
+ *
59
96
  * @source C++ class CBurer : CGameObject
60
97
  * @customConstructor CBurer
61
98
  * @group xr_creature
@@ -63,6 +100,8 @@ declare module "xray16" {
63
100
  export class CBurer extends CGameObject {}
64
101
 
65
102
  /**
103
+ * Client object binding for `CCat`.
104
+ *
66
105
  * @source C++ class CCat : CGameObject
67
106
  * @customConstructor CCat
68
107
  * @group xr_creature
@@ -70,6 +109,8 @@ declare module "xray16" {
70
109
  export class CCat extends CGameObject {}
71
110
 
72
111
  /**
112
+ * Client object binding for `CChimera`.
113
+ *
73
114
  * @source C++ class CChimera : CGameObject
74
115
  * @customConstructor CChimera
75
116
  * @group xr_creature
@@ -77,6 +118,8 @@ declare module "xray16" {
77
118
  export class CChimera extends CGameObject {}
78
119
 
79
120
  /**
121
+ * Client object binding for `CPoltergeist`.
122
+ *
80
123
  * @source C++ class CPoltergeist : CGameObject
81
124
  * @customConstructor CPoltergeist
82
125
  * @group xr_creature
@@ -84,6 +127,8 @@ declare module "xray16" {
84
127
  export class CPoltergeist extends CGameObject {}
85
128
 
86
129
  /**
130
+ * Client object binding for `CPseudoGigant`.
131
+ *
87
132
  * @source C++ class CPseudoGigant : CGameObject
88
133
  * @customConstructor CPseudoGigant
89
134
  * @group xr_creature
@@ -91,6 +136,8 @@ declare module "xray16" {
91
136
  export class CPseudoGigant extends CGameObject {}
92
137
 
93
138
  /**
139
+ * Client object binding for `CPsyDog`.
140
+ *
94
141
  * @source C++ class CPsyDog : CGameObject
95
142
  * @customConstructor CPsyDog
96
143
  * @group xr_creature
@@ -98,6 +145,8 @@ declare module "xray16" {
98
145
  export class CPsyDog extends CGameObject {}
99
146
 
100
147
  /**
148
+ * Client object binding for `CPsyDogPhantom`.
149
+ *
101
150
  * @source C++ class CPsyDogPhantom : CGameObject
102
151
  * @customConstructor CPsyDogPhantom
103
152
  * @group xr_creature
@@ -105,15 +154,27 @@ declare module "xray16" {
105
154
  export class CPsyDogPhantom extends CGameObject {}
106
155
 
107
156
  /**
157
+ * Client object binding for `CAI_Bloodsucker`.
158
+ *
108
159
  * @source C++ class CAI_Bloodsucker : CGameObject
109
160
  * @customConstructor CAI_Bloodsucker
110
161
  * @group xr_creature
162
+ *
163
+ * @remarks
164
+ * Bloodsucker-specific visibility helpers are not valid for other custom monsters.
111
165
  */
112
166
  export class CAI_Bloodsucker extends CGameObject {
167
+ /**
168
+ * Override the bloodsucker visibility state.
169
+ *
170
+ * @param value - Visibility state id used by the monster implementation.
171
+ */
113
172
  public force_visibility_state(value: i32): void;
114
173
  }
115
174
 
116
175
  /**
176
+ * Client object binding for `CAI_Boar`.
177
+ *
117
178
  * @source C++ class CAI_Boar : CGameObject
118
179
  * @customConstructor CAI_Boar
119
180
  * @group xr_creature
@@ -121,6 +182,8 @@ declare module "xray16" {
121
182
  export class CAI_Boar extends CGameObject {}
122
183
 
123
184
  /**
185
+ * Client object binding for `CAI_Dog`.
186
+ *
124
187
  * @source C++ class CAI_Dog : CGameObject
125
188
  * @customConstructor CAI_Dog
126
189
  * @group xr_creature
@@ -128,6 +191,8 @@ declare module "xray16" {
128
191
  export class CAI_Dog extends CGameObject {}
129
192
 
130
193
  /**
194
+ * Client object binding for `CAI_Flesh`.
195
+ *
131
196
  * @source C++ class CAI_Flesh : CGameObject
132
197
  * @customConstructor CAI_Flesh
133
198
  * @group xr_creature
@@ -135,6 +200,8 @@ declare module "xray16" {
135
200
  export class CAI_Flesh extends CGameObject {}
136
201
 
137
202
  /**
203
+ * Client object binding for `CAI_PseudoDog`.
204
+ *
138
205
  * @source C++ class CAI_PseudoDog : CGameObject
139
206
  * @customConstructor CAI_PseudoDog
140
207
  * @group xr_creature
@@ -142,20 +209,32 @@ declare module "xray16" {
142
209
  export class CAI_PseudoDog extends CGameObject {}
143
210
 
144
211
  /**
212
+ * Client object binding for `CAI_Stalker`.
213
+ *
145
214
  * @source C++ class CAI_Stalker : CGameObject
146
215
  * @customConstructor CAI_Stalker
147
216
  * @group xr_creature
217
+ *
218
+ * @remarks
219
+ * Stalker movement, smart-cover, planner, weapon-selection, and dialog helpers require this runtime family.
148
220
  */
149
221
  export class CAI_Stalker extends CGameObject {}
150
222
 
151
223
  /**
224
+ * Client object binding for `CAI_Trader`.
225
+ *
152
226
  * @source C++ class CAI_Trader : CGameObject
153
227
  * @customConstructor CAI_Trader
154
228
  * @group xr_creature
229
+ *
230
+ * @remarks
231
+ * Trader wrappers are inventory owners with trader-specific animation and sound hooks.
155
232
  */
156
233
  export class CAI_Trader extends CGameObject {}
157
234
 
158
235
  /**
236
+ * Client object binding for `CSnork`.
237
+ *
159
238
  * @source C++ class CSnork : CGameObject
160
239
  * @customConstructor CSnork
161
240
  * @group xr_creature