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,40 +1,45 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class fcolor
4
- * @customConstructor fcolor
5
- * @group xr_color
6
- */
7
- export class fcolor extends EngineBinding {
8
- public a: f32;
9
- public b: f32;
10
- public g: f32;
11
- public r: f32;
12
-
13
- public set(a: f32, b: f32, c: f32, d: f32): fcolor;
14
-
15
- public set(it: fcolor): fcolor;
16
-
17
- public set(value: u32): fcolor;
18
- }
19
-
20
- /**
21
- * @source C++ class color
22
- * @customConstructor color
23
- * @group xr_color
24
- */
25
- export class color {
26
- public b: f32;
27
- public g: f32;
28
- public r: f32;
29
-
30
- public constructor();
31
- public constructor(r: f32, g: f32, b: f32);
32
-
33
- public set(r: f32, g: f32, b: f32): void;
34
- }
35
-
36
- /**
37
- * @group xr_color
38
- */
39
- export function GetARGB(this: void, a: u16, r: u16, g: u16, b: u16): i32;
40
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class fcolor
4
+ * @customConstructor fcolor
5
+ * @group xr_color
6
+ */
7
+ export class fcolor extends EngineBinding {
8
+ public a: f32;
9
+ public b: f32;
10
+ public g: f32;
11
+ public r: f32;
12
+
13
+ public set(a: f32, b: f32, c: f32, d: f32): fcolor;
14
+
15
+ public set(it: fcolor): fcolor;
16
+
17
+ public set(value: u32): fcolor;
18
+ }
19
+
20
+ /**
21
+ * @source C++ class color
22
+ * @customConstructor color
23
+ * @group xr_color
24
+ */
25
+ export class color {
26
+ public b: f32;
27
+ public g: f32;
28
+ public r: f32;
29
+
30
+ public constructor();
31
+ public constructor(r: f32, g: f32, b: f32);
32
+
33
+ public set(r: f32, g: f32, b: f32): void;
34
+ }
35
+
36
+ /**
37
+ * @group xr_color
38
+ *
39
+ * @param a
40
+ * @param r
41
+ * @param g
42
+ * @param b
43
+ */
44
+ export function GetARGB(this: void, a: u16, r: u16, g: u16, b: u16): i32;
45
+ }
@@ -1,77 +1,83 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class CConsole
4
- * @customConstructor CConsole
5
- * @group xr_debug
6
- */
7
- export class CConsole extends EngineBinding {
8
- private constructor();
9
-
10
- public execute(command: string): void;
11
-
12
- public execute_deferred(command: string): void;
13
-
14
- public execute_script(script: string): void;
15
-
16
- public show(): void;
17
-
18
- public hide(): void;
19
-
20
- public get_bool(key: string): boolean;
21
-
22
- public get_float(key: string): f32;
23
-
24
- public get_integer(key: string): i32;
25
-
26
- public get_string(key: string): string;
27
-
28
- public get_token(key: string): string;
29
- }
30
-
31
- /**
32
- * Log formatted message in game console and log file.
33
- * Resulting message looks like "[LUA] %s", where message is provided text parameter.
34
- *
35
- * Note: text length is limited and supplying too long value will crash the game. todo: check exact limit.
36
- *
37
- * @group xr_debug
38
- * @param text - string to print
39
- */
40
- export function log(this: void, text: string): void;
41
-
42
- /**
43
- * @group xr_debug
44
- */
45
- export function error_log(this: void, text: string): void;
46
-
47
- /**
48
- * @group xr_debug
49
- */
50
- export function print_stack(this: void): void;
51
-
52
- /**
53
- * @group xr_debug
54
- */
55
- export function flush(this: void): void;
56
-
57
- /**
58
- * Get console object reference.
59
- * Allows flushing logs / executing commands / getting global engine variables.
60
- *
61
- * @group xr_debug
62
- * @returns console object reference
63
- */
64
- export function get_console(this: void): CConsole;
65
-
66
- /**
67
- * @group xr_debug
68
- */
69
- export function command_line(this: void): string;
70
-
71
- /**
72
- * Prefetch provided script before executing next lines.
73
- *
74
- * @group xr_global_declaration
75
- */
76
- export function prefetch(this: void, path: string): void;
77
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class CConsole
4
+ * @customConstructor CConsole
5
+ * @group xr_debug
6
+ */
7
+ export class CConsole extends EngineBinding {
8
+ private constructor();
9
+
10
+ public execute(command: string): void;
11
+
12
+ public execute_deferred(command: string): void;
13
+
14
+ public execute_script(script: string): void;
15
+
16
+ public show(): void;
17
+
18
+ public hide(): void;
19
+
20
+ public get_bool(key: string): boolean;
21
+
22
+ public get_float(key: string): f32;
23
+
24
+ public get_integer(key: string): i32;
25
+
26
+ public get_string(key: string): string;
27
+
28
+ public get_token(key: string): string;
29
+ }
30
+
31
+ /**
32
+ * Log formatted message in game console and log file.
33
+ * Resulting message looks like "[LUA] %s", where message is provided text parameter.
34
+ *
35
+ * Note: text length is limited and supplying too long value will crash the game. Todo: check exact limit..
36
+ *
37
+ * @group xr_debug
38
+ *
39
+ * @param text - String to print.
40
+ */
41
+ export function log(this: void, text: string): void;
42
+
43
+ /**
44
+ * @group xr_debug
45
+ *
46
+ * @param text
47
+ */
48
+ export function error_log(this: void, text: string): void;
49
+
50
+ /**
51
+ * @group xr_debug
52
+ */
53
+ export function print_stack(this: void): void;
54
+
55
+ /**
56
+ * @group xr_debug
57
+ */
58
+ export function flush(this: void): void;
59
+
60
+ /**
61
+ * Get console object reference.
62
+ * Allows flushing logs / executing commands / getting global engine variables.
63
+ *
64
+ * @group xr_debug
65
+ *
66
+ * @returns Console object reference.
67
+ */
68
+ export function get_console(this: void): CConsole;
69
+
70
+ /**
71
+ * @group xr_debug
72
+ */
73
+ export function command_line(this: void): string;
74
+
75
+ /**
76
+ * Prefetch provided script before executing next lines.
77
+ *
78
+ * @group xr_global_declaration
79
+ *
80
+ * @param path
81
+ */
82
+ export function prefetch(this: void, path: string): void;
83
+ }
@@ -1,40 +1,40 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class CPhraseScript
4
- * @customConstructor CPhraseScript
5
- * @group xr_dialog
6
- */
7
- export class CPhraseScript {
8
- public AddAction(value: string): void;
9
-
10
- public AddDisableInfo(value: string): void;
11
-
12
- public AddDontHasInfo(value: string): void;
13
-
14
- public AddGiveInfo(value: string): void;
15
-
16
- public AddHasInfo(value: string): void;
17
-
18
- public AddPrecondition(value: string): void;
19
-
20
- public SetScriptText(value: string): void;
21
- }
22
-
23
- /**
24
- * @source C++ class CPhrase
25
- * @customConstructor CPhrase
26
- * @group xr_dialog
27
- */
28
- export class CPhrase {
29
- public GetPhraseScript(): CPhraseScript;
30
- }
31
-
32
- /**
33
- * @source C++ class CPhraseDialog
34
- * @customConstructor CPhraseDialog
35
- * @group xr_dialog
36
- */
37
- export class CPhraseDialog {
38
- public AddPhrase(text: string, phrase_id: string, prev_phrase_id: string, goodwill_level: i32): CPhrase;
39
- }
40
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class CPhraseScript
4
+ * @customConstructor CPhraseScript
5
+ * @group xr_dialog
6
+ */
7
+ export class CPhraseScript {
8
+ public AddAction(value: string): void;
9
+
10
+ public AddDisableInfo(value: string): void;
11
+
12
+ public AddDontHasInfo(value: string): void;
13
+
14
+ public AddGiveInfo(value: string): void;
15
+
16
+ public AddHasInfo(value: string): void;
17
+
18
+ public AddPrecondition(value: string): void;
19
+
20
+ public SetScriptText(value: string): void;
21
+ }
22
+
23
+ /**
24
+ * @source C++ class CPhrase
25
+ * @customConstructor CPhrase
26
+ * @group xr_dialog
27
+ */
28
+ export class CPhrase {
29
+ public GetPhraseScript(): CPhraseScript;
30
+ }
31
+
32
+ /**
33
+ * @source C++ class CPhraseDialog
34
+ * @customConstructor CPhraseDialog
35
+ * @group xr_dialog
36
+ */
37
+ export class CPhraseDialog {
38
+ public AddPhrase(text: string, phrase_id: string, prev_phrase_id: string, goodwill_level: i32): CPhrase;
39
+ }
40
+ }