xray16 1.3.2 → 1.4.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 (85) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +112 -106
  3. package/package.json +45 -42
  4. package/plugins/built_at_info.d.ts +1 -1
  5. package/plugins/from_cast_utils.d.ts +1 -1
  6. package/plugins/global_declarations_transform.d.ts +1 -1
  7. package/plugins/inject_file_meta.d.ts +1 -1
  8. package/plugins/inject_tracy_zones.d.ts +1 -1
  9. package/plugins/inject_tracy_zones.js +4 -4
  10. package/plugins/strip_lua_logger.d.ts +1 -1
  11. package/plugins/strip_lua_logger.js +1 -1
  12. package/plugins/transform_luabind_class/plugin.d.ts +1 -1
  13. package/plugins/transform_luabind_class/transformation/class_declaration.d.ts +3 -3
  14. package/plugins/transform_luabind_class/transformation/decorators.d.ts +5 -2
  15. package/plugins/transform_luabind_class/transformation/decorators.js +3 -0
  16. package/plugins/transform_luabind_class/transformation/members/accessors.d.ts +1 -1
  17. package/plugins/transform_luabind_class/transformation/members/constructor.d.ts +2 -2
  18. package/plugins/transform_luabind_class/transformation/members/constructor.js +2 -2
  19. package/plugins/transform_luabind_class/transformation/members/fields.d.ts +5 -2
  20. package/plugins/transform_luabind_class/transformation/members/fields.js +5 -2
  21. package/plugins/transform_luabind_class/transformation/members/method.d.ts +6 -3
  22. package/plugins/transform_luabind_class/transformation/members/method.js +4 -1
  23. package/plugins/transform_luabind_class/transformation/new.d.ts +7 -3
  24. package/plugins/transform_luabind_class/transformation/new.js +5 -1
  25. package/plugins/transform_luabind_class/transformation/setup.d.ts +9 -3
  26. package/plugins/transform_luabind_class/transformation/setup.js +22 -6
  27. package/plugins/transform_luabind_class/transformation/super.d.ts +19 -3
  28. package/plugins/transform_luabind_class/transformation/super.js +17 -1
  29. package/plugins/transform_luabind_class/transformation/utils.d.ts +27 -4
  30. package/plugins/transform_luabind_class/transformation/utils.js +25 -2
  31. package/plugins/utils/ast.d.ts +1 -1
  32. package/plugins/utils/diagnostics.d.ts +9 -5
  33. package/plugins/utils/diagnostics.js +5 -1
  34. package/plugins/utils/tracy.d.ts +2 -2
  35. package/plugins/utils/tracy.js +2 -5
  36. package/types/index.d.ts +55 -55
  37. package/types/xr_ai/xr_action.d.ts +510 -510
  38. package/types/xr_ai/xr_alife.d.ts +566 -566
  39. package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -41
  40. package/types/xr_ai/xr_goap.d.ts +669 -668
  41. package/types/xr_ai/xr_graph.d.ts +47 -47
  42. package/types/xr_ai/xr_memory.d.ts +148 -148
  43. package/types/xr_lib/xr_animation.d.ts +81 -81
  44. package/types/xr_lib/xr_bitwise.d.ts +32 -21
  45. package/types/xr_lib/xr_color.d.ts +45 -40
  46. package/types/xr_lib/xr_debug.d.ts +83 -77
  47. package/types/xr_lib/xr_dialog.d.ts +40 -40
  48. package/types/xr_lib/xr_flags.d.ts +529 -148
  49. package/types/xr_lib/xr_fs.d.ts +149 -148
  50. package/types/xr_lib/xr_game.d.ts +261 -158
  51. package/types/xr_lib/xr_hit.d.ts +41 -41
  52. package/types/xr_lib/xr_ini.d.ts +415 -188
  53. package/types/xr_lib/xr_level.d.ts +652 -225
  54. package/types/xr_lib/xr_luabind.d.ts +64 -59
  55. package/types/xr_lib/xr_map.d.ts +61 -61
  56. package/types/xr_lib/xr_math.d.ts +815 -233
  57. package/types/xr_lib/xr_multiplayer.d.ts +351 -351
  58. package/types/xr_lib/xr_profile.d.ts +192 -160
  59. package/types/xr_lib/xr_properties.d.ts +455 -166
  60. package/types/xr_lib/xr_relation.d.ts +84 -84
  61. package/types/xr_lib/xr_render.d.ts +71 -69
  62. package/types/xr_lib/xr_save.d.ts +727 -223
  63. package/types/xr_lib/xr_sound.d.ts +151 -151
  64. package/types/xr_lib/xr_stats.ts +20 -20
  65. package/types/xr_lib/xr_task.d.ts +111 -111
  66. package/types/xr_lib/xr_time.d.ts +166 -61
  67. package/types/xr_lib/xr_type.d.ts +75 -75
  68. package/types/xr_object/client/xr_anomaly.d.ts +50 -50
  69. package/types/xr_object/client/xr_artefact.d.ts +98 -98
  70. package/types/xr_object/client/xr_client_object.d.ts +76 -76
  71. package/types/xr_object/client/xr_creature.d.ts +164 -164
  72. package/types/xr_object/client/xr_item.d.ts +264 -264
  73. package/types/xr_object/client/xr_level.d.ts +285 -285
  74. package/types/xr_object/client/xr_physic.d.ts +214 -214
  75. package/types/xr_object/client/xr_zone.d.ts +47 -47
  76. package/types/xr_object/script/xr_script_interface.d.ts +584 -584
  77. package/types/xr_object/script/xr_script_object.d.ts +2408 -1390
  78. package/types/xr_object/script/xr_script_trade.d.ts +41 -26
  79. package/types/xr_object/server/xr_server_object.d.ts +794 -792
  80. package/types/xr_ui/xr_ui_asset.d.ts +129 -123
  81. package/types/xr_ui/xr_ui_core.d.ts +106 -97
  82. package/types/xr_ui/xr_ui_event.d.ts +383 -381
  83. package/types/xr_ui/xr_ui_interface.d.ts +901 -903
  84. package/types/xr_ui/xr_ui_menu.d.ts +142 -142
  85. package/types/xrf_plugin.d.ts +59 -51
@@ -1,166 +1,455 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class token
4
- * @customConstructor token
5
- * @group xr_properties
6
- */
7
- export class token {
8
- public id: i32;
9
- public name: string;
10
-
11
- private constructor();
12
- }
13
-
14
- /**
15
- * @source C++ class rtoken_list
16
- * @customConstructor rtoken_list
17
- * @group xr_properties
18
- */
19
- export class rtoken_list {
20
- public constructor();
21
-
22
- public remove(index: u32): void;
23
-
24
- public get(index: u32): string;
25
-
26
- public count(): u32;
27
-
28
- public add(token: string): void;
29
-
30
- public clear(): void;
31
- }
32
-
33
- /**
34
- * @source C++ class token_list
35
- * @customConstructor token_list
36
- * @group xr_properties
37
- */
38
- export class token_list {
39
- public constructor();
40
-
41
- public remove(token: string): void;
42
-
43
- public id(token: string): i32;
44
-
45
- public name(int: i32): string;
46
-
47
- public add(token: string, index: i32): void;
48
-
49
- public clear(): void;
50
- }
51
-
52
- /**
53
- * @source C++ class properties_list_helper
54
- * @customConstructor properties_list_helper
55
- * @group xr_properties
56
- */
57
- export class properties_list_helper extends EngineBinding {
58
- public create_vangle(): unknown;
59
-
60
- public create_angle(): unknown;
61
-
62
- public create_time(): unknown;
63
-
64
- public create_color(): unknown;
65
-
66
- public create_vcolor(): unknown;
67
-
68
- public create_fcolor(): unknown;
69
-
70
- public create_list(): unknown;
71
-
72
- public create_token8(): unknown;
73
-
74
- public create_token16(): unknown;
75
-
76
- public create_token32(): unknown;
77
-
78
- public create_flag8(): unknown;
79
-
80
- public create_flag16(): unknown;
81
-
82
- public create_flag32(): unknown;
83
-
84
- public create_vector(): unknown;
85
-
86
- public create_bool(
87
- items: LuaTable<number>,
88
- path: string,
89
- object: cse_abstract,
90
- value: unknown,
91
- id: number | string
92
- ): boolean;
93
-
94
- public create_float(): unknown;
95
-
96
- public create_u8(): unknown;
97
-
98
- public create_u16(): unknown;
99
-
100
- public create_u32(): unknown;
101
-
102
- public create_s32(): unknown;
103
-
104
- public create_s16(): unknown;
105
-
106
- public create_choose(): unknown;
107
-
108
- public create_button(): unknown;
109
-
110
- public create_canvas(): unknown;
111
-
112
- public create_caption(): unknown;
113
-
114
- public float_on_after_edit(): unknown;
115
-
116
- public float_on_before_edit(): unknown;
117
-
118
- public name_after_edit(): unknown;
119
-
120
- public name_before_edit(): unknown;
121
-
122
- public vector_on_before_edit(): unknown;
123
-
124
- public vector_on_after_edit(): unknown;
125
- }
126
-
127
- /**
128
- * @source C++ class properties_helper
129
- * @customConstructor properties_helper
130
- * @group xr_properties
131
- */
132
- export class properties_helper extends properties_list_helper {}
133
-
134
- /**
135
- * @source C++ class prop_value
136
- * @customConstructor prop_value
137
- * @group xr_properties
138
- */
139
- export class prop_value {
140
- public token16_value(): unknown;
141
-
142
- public flag32_value(): unknown;
143
-
144
- public text_value(): unknown;
145
-
146
- public bool_value(): unknown;
147
-
148
- public u16_value(): unknown;
149
-
150
- public s16_value(): unknown;
151
- public button_value(): unknown;
152
-
153
- public caption_value(): unknown;
154
- }
155
-
156
- /**
157
- * @source C++ class TEX_INFO
158
- * @customConstructor TEX_INFO
159
- * @group xr_properties
160
- */
161
- export class TEX_INFO {
162
- public get_rect(): Frect;
163
-
164
- public get_file_name(): string;
165
- }
166
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * Named integer token used by editor property lists.
4
+ *
5
+ * @source C++ class token
6
+ * @customConstructor token
7
+ * @group xr_properties
8
+ */
9
+ export class token {
10
+ /**
11
+ * Numeric value stored for this token.
12
+ */
13
+ public id: i32;
14
+
15
+ /**
16
+ * Display name used in editor lists.
17
+ */
18
+ public name: string;
19
+
20
+ private constructor();
21
+ }
22
+
23
+ /**
24
+ * Ordered list of string tokens for runtime-selectable editor values.
25
+ *
26
+ * @source C++ class rtoken_list
27
+ * @customConstructor rtoken_list
28
+ * @group xr_properties
29
+ */
30
+ export class rtoken_list {
31
+ /**
32
+ * Create an empty token list.
33
+ */
34
+ public constructor();
35
+
36
+ /**
37
+ * Remove token by zero-based index.
38
+ *
39
+ * @param index - Token index.
40
+ */
41
+ public remove(index: u32): void;
42
+
43
+ /**
44
+ * Get token text by zero-based index.
45
+ *
46
+ * @param index - Token index.
47
+ * @returns Token text.
48
+ */
49
+ public get(index: u32): string;
50
+
51
+ /**
52
+ * Get number of tokens in the list.
53
+ *
54
+ * @returns Token count.
55
+ */
56
+ public count(): u32;
57
+
58
+ /**
59
+ * Append a token.
60
+ *
61
+ * @param token - Token text.
62
+ */
63
+ public add(token: string): void;
64
+
65
+ /**
66
+ * Remove all tokens.
67
+ */
68
+ public clear(): void;
69
+ }
70
+
71
+ /**
72
+ * Name-to-id token list for editor dropdown values.
73
+ *
74
+ * @source C++ class token_list
75
+ * @customConstructor token_list
76
+ * @group xr_properties
77
+ */
78
+ export class token_list {
79
+ /**
80
+ * Create an empty token list.
81
+ */
82
+ public constructor();
83
+
84
+ /**
85
+ * Remove token by text.
86
+ *
87
+ * @param token - Token text.
88
+ */
89
+ public remove(token: string): void;
90
+
91
+ /**
92
+ * Find numeric id for a token.
93
+ *
94
+ * @param token - Token text.
95
+ * @returns Token id, or engine-defined missing value.
96
+ */
97
+ public id(token: string): i32;
98
+
99
+ /**
100
+ * Find token text by numeric id.
101
+ *
102
+ * @param id - Token id.
103
+ * @returns Token text.
104
+ */
105
+ public name(id: i32): string;
106
+
107
+ /**
108
+ * Add a token/id pair.
109
+ *
110
+ * @param token - Token text.
111
+ * @param id - Numeric token id.
112
+ */
113
+ public add(token: string, id: i32): void;
114
+
115
+ /**
116
+ * Remove all tokens.
117
+ */
118
+ public clear(): void;
119
+ }
120
+
121
+ /**
122
+ * Helper for building editor property rows for spawned objects.
123
+ *
124
+ * @source C++ class properties_list_helper
125
+ * @customConstructor properties_list_helper
126
+ * @group xr_properties
127
+ */
128
+ export class properties_list_helper extends EngineBinding {
129
+ /**
130
+ * Create a 3-axis angle property.
131
+ *
132
+ * @returns Engine property value handle.
133
+ */
134
+ public create_vangle(): unknown;
135
+
136
+ /**
137
+ * Create an angle property.
138
+ *
139
+ * @returns Engine property value handle.
140
+ */
141
+ public create_angle(): unknown;
142
+
143
+ /**
144
+ * Create a time property.
145
+ *
146
+ * @returns Engine property value handle.
147
+ */
148
+ public create_time(): unknown;
149
+
150
+ /**
151
+ * Create a color property.
152
+ *
153
+ * @returns Engine property value handle.
154
+ */
155
+ public create_color(): unknown;
156
+
157
+ /**
158
+ * Create a vector color property.
159
+ *
160
+ * @returns Engine property value handle.
161
+ */
162
+ public create_vcolor(): unknown;
163
+
164
+ /**
165
+ * Create a float color property.
166
+ *
167
+ * @returns Engine property value handle.
168
+ */
169
+ public create_fcolor(): unknown;
170
+
171
+ /**
172
+ * Create a runtime token list property.
173
+ *
174
+ * @returns Engine property value handle.
175
+ */
176
+ public create_list(): unknown;
177
+
178
+ /**
179
+ * Create an 8-bit token property.
180
+ *
181
+ * @returns Engine property value handle.
182
+ */
183
+ public create_token8(): unknown;
184
+
185
+ /**
186
+ * Create a 16-bit token property.
187
+ *
188
+ * @returns Engine property value handle.
189
+ */
190
+ public create_token16(): unknown;
191
+
192
+ /**
193
+ * Create a 32-bit token property.
194
+ *
195
+ * @returns Engine property value handle.
196
+ */
197
+ public create_token32(): unknown;
198
+
199
+ /**
200
+ * Create an 8-bit flag property.
201
+ *
202
+ * @returns Engine property value handle.
203
+ */
204
+ public create_flag8(): unknown;
205
+
206
+ /**
207
+ * Create a 16-bit flag property.
208
+ *
209
+ * @returns Engine property value handle.
210
+ */
211
+ public create_flag16(): unknown;
212
+
213
+ /**
214
+ * Create a 32-bit flag property.
215
+ *
216
+ * @returns Engine property value handle.
217
+ */
218
+ public create_flag32(): unknown;
219
+
220
+ /**
221
+ * Create a vector property.
222
+ *
223
+ * @returns Engine property value handle.
224
+ */
225
+ public create_vector(): unknown;
226
+
227
+ /**
228
+ * Create a boolean property bound to an object field.
229
+ *
230
+ * @param items - Property item list to append to.
231
+ * @param path - Property path or caption.
232
+ * @param object - Spawn object owning the property.
233
+ * @param value - Property storage descriptor.
234
+ * @param id - Field identifier used by the editor bridge.
235
+ * @returns Whether the property was created.
236
+ */
237
+ public create_bool(
238
+ items: LuaTable<number>,
239
+ path: string,
240
+ object: cse_abstract,
241
+ value: unknown,
242
+ id: number | string
243
+ ): boolean;
244
+
245
+ /**
246
+ * Create a float property.
247
+ *
248
+ * @returns Engine property value handle.
249
+ */
250
+ public create_float(): unknown;
251
+
252
+ /**
253
+ * Create an unsigned 8-bit integer property.
254
+ *
255
+ * @returns Engine property value handle.
256
+ */
257
+ public create_u8(): unknown;
258
+
259
+ /**
260
+ * Create an unsigned 16-bit integer property.
261
+ *
262
+ * @returns Engine property value handle.
263
+ */
264
+ public create_u16(): unknown;
265
+
266
+ /**
267
+ * Create an unsigned 32-bit integer property.
268
+ *
269
+ * @returns Engine property value handle.
270
+ */
271
+ public create_u32(): unknown;
272
+
273
+ /**
274
+ * Create a signed 32-bit integer property.
275
+ *
276
+ * @returns Engine property value handle.
277
+ */
278
+ public create_s32(): unknown;
279
+
280
+ /**
281
+ * Create a signed 16-bit integer property.
282
+ *
283
+ * @returns Engine property value handle.
284
+ */
285
+ public create_s16(): unknown;
286
+
287
+ /**
288
+ * Create an asset/object chooser property.
289
+ *
290
+ * @returns Engine property value handle.
291
+ */
292
+ public create_choose(): unknown;
293
+
294
+ /**
295
+ * Create a button property.
296
+ *
297
+ * @returns Engine property value handle.
298
+ */
299
+ public create_button(): unknown;
300
+
301
+ /**
302
+ * Create a custom canvas property.
303
+ *
304
+ * @returns Engine property value handle.
305
+ */
306
+ public create_canvas(): unknown;
307
+
308
+ /**
309
+ * Create a read-only caption row.
310
+ *
311
+ * @returns Engine property value handle.
312
+ */
313
+ public create_caption(): unknown;
314
+
315
+ /**
316
+ * Callback used after editing a float property.
317
+ *
318
+ * @returns Engine callback result.
319
+ */
320
+ public float_on_after_edit(): unknown;
321
+
322
+ /**
323
+ * Callback used before editing a float property.
324
+ *
325
+ * @returns Engine callback result.
326
+ */
327
+ public float_on_before_edit(): unknown;
328
+
329
+ /**
330
+ * Callback used after editing an object name.
331
+ *
332
+ * @returns Engine callback result.
333
+ */
334
+ public name_after_edit(): unknown;
335
+
336
+ /**
337
+ * Callback used before editing an object name.
338
+ *
339
+ * @returns Engine callback result.
340
+ */
341
+ public name_before_edit(): unknown;
342
+
343
+ /**
344
+ * Callback used before editing a vector property.
345
+ *
346
+ * @returns Engine callback result.
347
+ */
348
+ public vector_on_before_edit(): unknown;
349
+
350
+ /**
351
+ * Callback used after editing a vector property.
352
+ *
353
+ * @returns Engine callback result.
354
+ */
355
+ public vector_on_after_edit(): unknown;
356
+ }
357
+
358
+ /**
359
+ * Global editor properties helper.
360
+ *
361
+ * @source C++ class properties_helper
362
+ * @customConstructor properties_helper
363
+ * @group xr_properties
364
+ * @remarks Only available when the editor property helper library is loaded.
365
+ */
366
+ export class properties_helper extends properties_list_helper {}
367
+
368
+ /**
369
+ * Base editor property value wrapper.
370
+ *
371
+ * @source C++ class prop_value
372
+ * @customConstructor prop_value
373
+ * @group xr_properties
374
+ */
375
+ export class prop_value {
376
+ /**
377
+ * Treat this property value as a 16-bit token value.
378
+ *
379
+ * @returns Engine property value handle.
380
+ */
381
+ public token16_value(): unknown;
382
+
383
+ /**
384
+ * Treat this property value as a 32-bit flag value.
385
+ *
386
+ * @returns Engine property value handle.
387
+ */
388
+ public flag32_value(): unknown;
389
+
390
+ /**
391
+ * Treat this property value as text.
392
+ *
393
+ * @returns Engine property value handle.
394
+ */
395
+ public text_value(): unknown;
396
+
397
+ /**
398
+ * Treat this property value as a boolean.
399
+ *
400
+ * @returns Engine property value handle.
401
+ */
402
+ public bool_value(): unknown;
403
+
404
+ /**
405
+ * Treat this property value as an unsigned 16-bit integer.
406
+ *
407
+ * @returns Engine property value handle.
408
+ */
409
+ public u16_value(): unknown;
410
+
411
+ /**
412
+ * Treat this property value as a signed 16-bit integer.
413
+ *
414
+ * @returns Engine property value handle.
415
+ */
416
+ public s16_value(): unknown;
417
+
418
+ /**
419
+ * Treat this property value as a button.
420
+ *
421
+ * @returns Engine property value handle.
422
+ */
423
+ public button_value(): unknown;
424
+
425
+ /**
426
+ * Treat this property value as a caption.
427
+ *
428
+ * @returns Engine property value handle.
429
+ */
430
+ public caption_value(): unknown;
431
+ }
432
+
433
+ /**
434
+ * Texture atlas entry exposed by UI texture metadata.
435
+ *
436
+ * @source C++ class TEX_INFO
437
+ * @customConstructor TEX_INFO
438
+ * @group xr_properties
439
+ */
440
+ export class TEX_INFO {
441
+ /**
442
+ * Get rectangle occupied by this texture in the atlas.
443
+ *
444
+ * @returns Texture rectangle.
445
+ */
446
+ public get_rect(): Frect;
447
+
448
+ /**
449
+ * Get source texture file name.
450
+ *
451
+ * @returns Texture file name.
452
+ */
453
+ public get_file_name(): string;
454
+ }
455
+ }