xray16 1.5.4 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +6 -0
  2. package/package.json +12 -6
  3. package/plugins/optimize_return_ternary.d.ts +6 -0
  4. package/plugins/optimize_return_ternary.js +65 -0
  5. package/xray16.d.ts +30847 -0
  6. package/types/index.d.ts +0 -55
  7. package/types/xr_ai/xr_action.d.ts +0 -1802
  8. package/types/xr_ai/xr_alife.d.ts +0 -1870
  9. package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
  10. package/types/xr_ai/xr_goap.d.ts +0 -1116
  11. package/types/xr_ai/xr_graph.d.ts +0 -135
  12. package/types/xr_ai/xr_memory.d.ts +0 -382
  13. package/types/xr_lib/xr_animation.d.ts +0 -252
  14. package/types/xr_lib/xr_bitwise.d.ts +0 -44
  15. package/types/xr_lib/xr_color.d.ts +0 -142
  16. package/types/xr_lib/xr_debug.d.ts +0 -181
  17. package/types/xr_lib/xr_dialog.d.ts +0 -132
  18. package/types/xr_lib/xr_flags.d.ts +0 -592
  19. package/types/xr_lib/xr_fs.d.ts +0 -615
  20. package/types/xr_lib/xr_game.d.ts +0 -362
  21. package/types/xr_lib/xr_hit.d.ts +0 -125
  22. package/types/xr_lib/xr_ini.d.ts +0 -473
  23. package/types/xr_lib/xr_level.d.ts +0 -795
  24. package/types/xr_lib/xr_luabind.d.ts +0 -90
  25. package/types/xr_lib/xr_map.d.ts +0 -192
  26. package/types/xr_lib/xr_math.d.ts +0 -871
  27. package/types/xr_lib/xr_multiplayer.d.ts +0 -1079
  28. package/types/xr_lib/xr_profile.d.ts +0 -272
  29. package/types/xr_lib/xr_properties.d.ts +0 -610
  30. package/types/xr_lib/xr_relation.d.ts +0 -231
  31. package/types/xr_lib/xr_render.d.ts +0 -167
  32. package/types/xr_lib/xr_save.d.ts +0 -833
  33. package/types/xr_lib/xr_sound.d.ts +0 -515
  34. package/types/xr_lib/xr_stats.ts +0 -49
  35. package/types/xr_lib/xr_task.d.ts +0 -388
  36. package/types/xr_lib/xr_time.d.ts +0 -177
  37. package/types/xr_lib/xr_type.d.ts +0 -75
  38. package/types/xr_object/client/xr_anomaly.d.ts +0 -70
  39. package/types/xr_object/client/xr_artefact.d.ts +0 -153
  40. package/types/xr_object/client/xr_client_object.d.ts +0 -207
  41. package/types/xr_object/client/xr_creature.d.ts +0 -243
  42. package/types/xr_object/client/xr_item.d.ts +0 -370
  43. package/types/xr_object/client/xr_level.d.ts +0 -753
  44. package/types/xr_object/client/xr_physic.d.ts +0 -644
  45. package/types/xr_object/client/xr_zone.d.ts +0 -85
  46. package/types/xr_object/script/xr_script_interface.d.ts +0 -819
  47. package/types/xr_object/script/xr_script_object.d.ts +0 -5719
  48. package/types/xr_object/script/xr_script_trade.d.ts +0 -51
  49. package/types/xr_object/server/xr_server_object.d.ts +0 -1486
  50. package/types/xr_ui/xr_ui_asset.d.ts +0 -364
  51. package/types/xr_ui/xr_ui_core.d.ts +0 -424
  52. package/types/xr_ui/xr_ui_event.d.ts +0 -1449
  53. package/types/xr_ui/xr_ui_interface.d.ts +0 -2447
  54. package/types/xr_ui/xr_ui_menu.d.ts +0 -385
  55. package/types/xrf_plugin.d.ts +0 -109
@@ -1,610 +0,0 @@
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
- /**
21
- * Engine-created token.
22
- */
23
- private constructor();
24
- }
25
-
26
- /**
27
- * Ordered list of string tokens for runtime-selectable editor values.
28
- *
29
- * @source C++ class rtoken_list
30
- * @customConstructor rtoken_list
31
- * @group xr_properties
32
- *
33
- * @remarks
34
- * Used by editor property rows that need a list of strings computed at runtime.
35
- */
36
- export class rtoken_list {
37
- /**
38
- * Create an empty token list.
39
- */
40
- public constructor();
41
-
42
- /**
43
- * Remove token by zero-based index.
44
- *
45
- * @remarks
46
- * Out-of-range indexes are ignored.
47
- *
48
- * @param index - Token index.
49
- */
50
- public remove(index: u32): void;
51
-
52
- /**
53
- * Get token text by zero-based index.
54
- *
55
- * @param index - Token index.
56
- * @returns Token text, or `null` from native code when index is out of range.
57
- */
58
- public get(index: u32): string | null;
59
-
60
- /**
61
- * Get number of tokens in the list.
62
- *
63
- * @returns Token count.
64
- */
65
- public count(): u32;
66
-
67
- /**
68
- * Append a token.
69
- *
70
- * @param token - Token text.
71
- */
72
- public add(token: string): void;
73
-
74
- /**
75
- * Remove all tokens.
76
- */
77
- public clear(): void;
78
- }
79
-
80
- /**
81
- * Name-to-id token list for editor dropdown values.
82
- *
83
- * @source C++ class token_list
84
- * @customConstructor token_list
85
- * @group xr_properties
86
- *
87
- * @remarks
88
- * The native list keeps a trailing sentinel entry for editor APIs; script code only works with named entries.
89
- */
90
- export class token_list {
91
- /**
92
- * Create an empty token list.
93
- */
94
- public constructor();
95
-
96
- /**
97
- * Remove token by text.
98
- *
99
- * @remarks
100
- * Missing tokens are logged and otherwise ignored.
101
- *
102
- * @param token - Token text.
103
- */
104
- public remove(token: string): void;
105
-
106
- /**
107
- * Find numeric id for a token.
108
- *
109
- * @remarks
110
- * The token must exist. Native code verifies the lookup result.
111
- *
112
- * @param token - Token text.
113
- * @returns Token id.
114
- */
115
- public id(token: string): i32;
116
-
117
- /**
118
- * Find token text by numeric id.
119
- *
120
- * @remarks
121
- * The id must exist. Native code verifies the lookup result.
122
- *
123
- * @param id - Token id.
124
- * @returns Token text.
125
- */
126
- public name(id: i32): string;
127
-
128
- /**
129
- * Add a token/id pair.
130
- *
131
- * @remarks
132
- * Both token text and id must be unique in the list.
133
- *
134
- * @param token - Token text.
135
- * @param id - Numeric token id.
136
- */
137
- public add(token: string, id: i32): void;
138
-
139
- /**
140
- * Remove all tokens.
141
- */
142
- public clear(): void;
143
- }
144
-
145
- /**
146
- * Helper for building editor property rows for spawned objects.
147
- *
148
- * @source C++ class properties_list_helper
149
- * @customConstructor properties_list_helper
150
- * @group xr_properties
151
- *
152
- * @remarks
153
- * This is an editor bridge. Most methods require a real editor property item list and a server object that owns
154
- * the wrapped field; they are not useful in ordinary gameplay scripts.
155
- */
156
- export class properties_list_helper extends EngineBinding {
157
- /**
158
- * Create a 3-axis angle property.
159
- *
160
- * @remarks
161
- * Bound object field must be an `Fvector`.
162
- *
163
- * @returns Engine property value handle.
164
- */
165
- public create_vangle(): unknown;
166
-
167
- /**
168
- * Create an angle property.
169
- *
170
- * @remarks
171
- * Bound object field must be a float.
172
- *
173
- * @returns Engine property value handle.
174
- */
175
- public create_angle(): unknown;
176
-
177
- /**
178
- * Create a time property.
179
- *
180
- * @remarks
181
- * Bound object field must be a float.
182
- *
183
- * @returns Engine property value handle.
184
- */
185
- public create_time(): unknown;
186
-
187
- /**
188
- * Create a color property.
189
- *
190
- * @remarks
191
- * Bound object field must be a 32-bit color value.
192
- *
193
- * @returns Engine property value handle.
194
- */
195
- public create_color(): unknown;
196
-
197
- /**
198
- * Create a vector color property.
199
- *
200
- * @remarks
201
- * Bound object field must be an `Fvector`.
202
- *
203
- * @returns Engine property value handle.
204
- */
205
- public create_vcolor(): unknown;
206
-
207
- /**
208
- * Create a float color property.
209
- *
210
- * @remarks
211
- * Bound object field must be an `Fcolor`.
212
- *
213
- * @returns Engine property value handle.
214
- */
215
- public create_fcolor(): unknown;
216
-
217
- /**
218
- * Create a runtime token list property.
219
- *
220
- * @remarks
221
- * Requires an `rtoken_list`; keep it alive while the editor property uses it.
222
- *
223
- * @returns Engine property value handle.
224
- */
225
- public create_list(): unknown;
226
-
227
- /**
228
- * Create an 8-bit token property.
229
- *
230
- * @remarks
231
- * Requires a `token_list`; ids must fit into an unsigned 8-bit value.
232
- *
233
- * @returns Engine property value handle.
234
- */
235
- public create_token8(): unknown;
236
-
237
- /**
238
- * Create a 16-bit token property.
239
- *
240
- * @remarks
241
- * Requires a `token_list`; ids must fit into an unsigned 16-bit value.
242
- *
243
- * @returns Engine property value handle.
244
- */
245
- public create_token16(): unknown;
246
-
247
- /**
248
- * Create a 32-bit token property.
249
- *
250
- * @remarks
251
- * Requires a `token_list`; ids are stored as unsigned 32-bit values.
252
- *
253
- * @returns Engine property value handle.
254
- */
255
- public create_token32(): unknown;
256
-
257
- /**
258
- * Create an 8-bit flag property.
259
- *
260
- * @remarks
261
- * Binds individual bit toggles to an unsigned 8-bit integer field.
262
- *
263
- * @returns Engine property value handle.
264
- */
265
- public create_flag8(): unknown;
266
-
267
- /**
268
- * Create a 16-bit flag property.
269
- *
270
- * @remarks
271
- * Binds individual bit toggles to an unsigned 16-bit integer field.
272
- *
273
- * @returns Engine property value handle.
274
- */
275
- public create_flag16(): unknown;
276
-
277
- /**
278
- * Create a 32-bit flag property.
279
- *
280
- * @remarks
281
- * Binds individual bit toggles to an unsigned 32-bit integer field.
282
- *
283
- * @returns Engine property value handle.
284
- */
285
- public create_flag32(): unknown;
286
-
287
- /**
288
- * Create a vector property.
289
- *
290
- * @remarks
291
- * Bound object field must be an `Fvector`.
292
- *
293
- * @returns Engine property value handle.
294
- */
295
- public create_vector(): unknown;
296
-
297
- /**
298
- * Create a boolean property bound to an object field.
299
- *
300
- * @remarks
301
- * The native helper wraps `value[id]` and attaches the wrapper to `object`, so `object` must be a server object.
302
- *
303
- * @param items - Property item list to append to.
304
- * @param path - Property path or caption.
305
- * @param object - Spawn object owning the property.
306
- * @param value - Property storage descriptor.
307
- * @param id - Field identifier used by the editor bridge.
308
- * @returns Whether the property was created.
309
- */
310
- public create_bool(
311
- items: LuaTable<number>,
312
- path: string,
313
- object: cse_abstract,
314
- value: unknown,
315
- id: number | string
316
- ): boolean;
317
-
318
- /**
319
- * Create a float property.
320
- *
321
- * @remarks
322
- * Bound object field must be a float. Native overloads may also carry min/max/default editor values.
323
- *
324
- * @returns Engine property value handle.
325
- */
326
- public create_float(): unknown;
327
-
328
- /**
329
- * Create an unsigned 8-bit integer property.
330
- *
331
- * @remarks
332
- * Bound object field must fit into an unsigned 8-bit value.
333
- *
334
- * @returns Engine property value handle.
335
- */
336
- public create_u8(): unknown;
337
-
338
- /**
339
- * Create an unsigned 16-bit integer property.
340
- *
341
- * @remarks
342
- * Bound object field must fit into an unsigned 16-bit value.
343
- *
344
- * @returns Engine property value handle.
345
- */
346
- public create_u16(): unknown;
347
-
348
- /**
349
- * Create an unsigned 32-bit integer property.
350
- *
351
- * @remarks
352
- * Bound object field must fit into an unsigned 32-bit value.
353
- *
354
- * @returns Engine property value handle.
355
- */
356
- public create_u32(): unknown;
357
-
358
- /**
359
- * Create a signed 32-bit integer property.
360
- *
361
- * @remarks
362
- * Bound object field must fit into a signed 32-bit value.
363
- *
364
- * @returns Engine property value handle.
365
- */
366
- public create_s32(): unknown;
367
-
368
- /**
369
- * Create a signed 16-bit integer property.
370
- *
371
- * @remarks
372
- * Bound object field must fit into a signed 16-bit value.
373
- *
374
- * @returns Engine property value handle.
375
- */
376
- public create_s16(): unknown;
377
-
378
- /**
379
- * Create an asset/object chooser property.
380
- *
381
- * @remarks
382
- * Requires a chooser mode and a string-like field that receives the selected section, asset, or path.
383
- *
384
- * @returns Engine property value handle.
385
- */
386
- public create_choose(): unknown;
387
-
388
- /**
389
- * Create a button property.
390
- *
391
- * @remarks
392
- * Editor-only command row. Use it to expose an action callback, not persistent object data.
393
- *
394
- * @returns Engine property value handle.
395
- */
396
- public create_button(): unknown;
397
-
398
- /**
399
- * Create a custom canvas property.
400
- *
401
- * @remarks
402
- * Editor-only drawing surface for custom property UI.
403
- *
404
- * @returns Engine property value handle.
405
- */
406
- public create_canvas(): unknown;
407
-
408
- /**
409
- * Create a read-only caption row.
410
- *
411
- * @remarks
412
- * Editor-only label row used to group or explain nearby properties.
413
- *
414
- * @returns Engine property value handle.
415
- */
416
- public create_caption(): unknown;
417
-
418
- /**
419
- * Callback used after editing a float property.
420
- *
421
- * @remarks
422
- * Editor bridge callback. Native code passes the edited value through an output argument.
423
- *
424
- * @returns Engine callback result.
425
- */
426
- public float_on_after_edit(): unknown;
427
-
428
- /**
429
- * Callback used before editing a float property.
430
- *
431
- * @remarks
432
- * Editor bridge callback. Native code passes the current value through an output argument.
433
- *
434
- * @returns Engine callback result.
435
- */
436
- public float_on_before_edit(): unknown;
437
-
438
- /**
439
- * Callback used after editing an object name.
440
- *
441
- * @remarks
442
- * Editor bridge callback. Native code passes the edited name through an output argument.
443
- *
444
- * @returns Engine callback result.
445
- */
446
- public name_after_edit(): unknown;
447
-
448
- /**
449
- * Callback used before editing an object name.
450
- *
451
- * @remarks
452
- * Editor bridge callback. Native code passes the current name through an output argument.
453
- *
454
- * @returns Engine callback result.
455
- */
456
- public name_before_edit(): unknown;
457
-
458
- /**
459
- * Callback used before editing a vector property.
460
- *
461
- * @remarks
462
- * Editor bridge callback for vector rows, usually used to prepare a value before the editor opens.
463
- *
464
- * @returns Engine callback result.
465
- */
466
- public vector_on_before_edit(): unknown;
467
-
468
- /**
469
- * Callback used after editing a vector property.
470
- *
471
- * @remarks
472
- * Editor bridge callback for vector rows, usually used to accept or normalize the edited value.
473
- *
474
- * @returns Engine callback result.
475
- */
476
- public vector_on_after_edit(): unknown;
477
- }
478
-
479
- /**
480
- * Global editor properties helper.
481
- *
482
- * @source C++ class properties_helper
483
- * @customConstructor properties_helper
484
- * @group xr_properties
485
- *
486
- * @remarks
487
- * Only available when the editor property helper library is loaded. Outside that context the native accessor logs
488
- * an error and returns no usable helper.
489
- */
490
- export class properties_helper extends properties_list_helper {}
491
-
492
- /**
493
- * Base editor property value wrapper.
494
- *
495
- * @source C++ class prop_value
496
- * @customConstructor prop_value
497
- * @group xr_properties
498
- *
499
- * @remarks
500
- * These helpers are downcasts to concrete editor property value types. Use only when the property was created as
501
- * that matching kind.
502
- */
503
- export class prop_value {
504
- /**
505
- * Treat this property value as a 16-bit token value.
506
- *
507
- * @remarks
508
- * Use only for properties originally created as 16-bit token values.
509
- *
510
- * @returns Engine property value handle.
511
- */
512
- public token16_value(): unknown;
513
-
514
- /**
515
- * Treat this property value as a 32-bit flag value.
516
- *
517
- * @remarks
518
- * Use only for properties originally created as 32-bit flag values.
519
- *
520
- * @returns Engine property value handle.
521
- */
522
- public flag32_value(): unknown;
523
-
524
- /**
525
- * Treat this property value as text.
526
- *
527
- * @remarks
528
- * Use only for properties originally created as text values.
529
- *
530
- * @returns Engine property value handle.
531
- */
532
- public text_value(): unknown;
533
-
534
- /**
535
- * Treat this property value as a boolean.
536
- *
537
- * @remarks
538
- * Use only for properties originally created as boolean values.
539
- *
540
- * @returns Engine property value handle.
541
- */
542
- public bool_value(): unknown;
543
-
544
- /**
545
- * Treat this property value as an unsigned 16-bit integer.
546
- *
547
- * @remarks
548
- * Use only for properties originally created as unsigned 16-bit values.
549
- *
550
- * @returns Engine property value handle.
551
- */
552
- public u16_value(): unknown;
553
-
554
- /**
555
- * Treat this property value as a signed 16-bit integer.
556
- *
557
- * @remarks
558
- * Use only for properties originally created as signed 16-bit values.
559
- *
560
- * @returns Engine property value handle.
561
- */
562
- public s16_value(): unknown;
563
-
564
- /**
565
- * Treat this property value as a button.
566
- *
567
- * @remarks
568
- * Use only for properties originally created as button rows.
569
- *
570
- * @returns Engine property value handle.
571
- */
572
- public button_value(): unknown;
573
-
574
- /**
575
- * Treat this property value as a caption.
576
- *
577
- * @remarks
578
- * Use only for properties originally created as caption rows.
579
- *
580
- * @returns Engine property value handle.
581
- */
582
- public caption_value(): unknown;
583
- }
584
-
585
- /**
586
- * Texture atlas entry exposed by UI texture metadata.
587
- *
588
- * @source C++ class TEX_INFO
589
- * @customConstructor TEX_INFO
590
- * @group xr_properties
591
- *
592
- * @remarks
593
- * Metadata is borrowed from the engine UI texture atlas; use it for inspection, not ownership.
594
- */
595
- export class TEX_INFO {
596
- /**
597
- * Get rectangle occupied by this texture in the atlas.
598
- *
599
- * @returns Texture rectangle.
600
- */
601
- public get_rect(): Frect;
602
-
603
- /**
604
- * Get source texture file name.
605
- *
606
- * @returns Texture file name.
607
- */
608
- public get_file_name(): string;
609
- }
610
- }