xray16 1.3.4 → 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 (84) 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 +2 -2
  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 +1 -1
  35. package/types/index.d.ts +55 -55
  36. package/types/xr_ai/xr_action.d.ts +510 -510
  37. package/types/xr_ai/xr_alife.d.ts +566 -566
  38. package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -41
  39. package/types/xr_ai/xr_goap.d.ts +669 -668
  40. package/types/xr_ai/xr_graph.d.ts +47 -47
  41. package/types/xr_ai/xr_memory.d.ts +148 -148
  42. package/types/xr_lib/xr_animation.d.ts +81 -81
  43. package/types/xr_lib/xr_bitwise.d.ts +32 -21
  44. package/types/xr_lib/xr_color.d.ts +45 -40
  45. package/types/xr_lib/xr_debug.d.ts +83 -77
  46. package/types/xr_lib/xr_dialog.d.ts +40 -40
  47. package/types/xr_lib/xr_flags.d.ts +529 -148
  48. package/types/xr_lib/xr_fs.d.ts +149 -148
  49. package/types/xr_lib/xr_game.d.ts +261 -158
  50. package/types/xr_lib/xr_hit.d.ts +41 -41
  51. package/types/xr_lib/xr_ini.d.ts +415 -188
  52. package/types/xr_lib/xr_level.d.ts +652 -225
  53. package/types/xr_lib/xr_luabind.d.ts +64 -59
  54. package/types/xr_lib/xr_map.d.ts +61 -61
  55. package/types/xr_lib/xr_math.d.ts +815 -233
  56. package/types/xr_lib/xr_multiplayer.d.ts +351 -351
  57. package/types/xr_lib/xr_profile.d.ts +192 -160
  58. package/types/xr_lib/xr_properties.d.ts +455 -166
  59. package/types/xr_lib/xr_relation.d.ts +84 -84
  60. package/types/xr_lib/xr_render.d.ts +71 -69
  61. package/types/xr_lib/xr_save.d.ts +727 -223
  62. package/types/xr_lib/xr_sound.d.ts +151 -151
  63. package/types/xr_lib/xr_stats.ts +20 -20
  64. package/types/xr_lib/xr_task.d.ts +111 -111
  65. package/types/xr_lib/xr_time.d.ts +166 -61
  66. package/types/xr_lib/xr_type.d.ts +75 -75
  67. package/types/xr_object/client/xr_anomaly.d.ts +50 -50
  68. package/types/xr_object/client/xr_artefact.d.ts +98 -98
  69. package/types/xr_object/client/xr_client_object.d.ts +76 -76
  70. package/types/xr_object/client/xr_creature.d.ts +164 -164
  71. package/types/xr_object/client/xr_item.d.ts +264 -264
  72. package/types/xr_object/client/xr_level.d.ts +285 -285
  73. package/types/xr_object/client/xr_physic.d.ts +214 -214
  74. package/types/xr_object/client/xr_zone.d.ts +47 -47
  75. package/types/xr_object/script/xr_script_interface.d.ts +584 -584
  76. package/types/xr_object/script/xr_script_object.d.ts +2408 -1390
  77. package/types/xr_object/script/xr_script_trade.d.ts +41 -26
  78. package/types/xr_object/server/xr_server_object.d.ts +794 -792
  79. package/types/xr_ui/xr_ui_asset.d.ts +129 -123
  80. package/types/xr_ui/xr_ui_core.d.ts +106 -97
  81. package/types/xr_ui/xr_ui_event.d.ts +383 -381
  82. package/types/xr_ui/xr_ui_interface.d.ts +901 -903
  83. package/types/xr_ui/xr_ui_menu.d.ts +142 -142
  84. package/types/xrf_plugin.d.ts +59 -51
@@ -1,142 +1,142 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class COptionsManager
4
- * @customConstructor COptionsManager
5
- * @group xr_ui_menu
6
- */
7
- export class COptionsManager {
8
- public constructor();
9
-
10
- public SendMessage2Group(group: string, message: string): void;
11
-
12
- public UndoGroup(group: string): void;
13
-
14
- public SaveBackupValues(group: string): void;
15
-
16
- public IsGroupChanged(group: string): boolean;
17
-
18
- public SaveValues(group: string): void;
19
-
20
- public SetCurrentValues(group: string): void;
21
-
22
- public NeedSystemRestart(): boolean;
23
-
24
- public NeedVidRestart(): boolean;
25
-
26
- public OptionsPostAccept(): void;
27
- }
28
-
29
- /**
30
- * @source C++ class CMainMenu
31
- * @customConstructor CMainMenu
32
- * @group xr_ui_menu
33
- */
34
- export class CMainMenu {
35
- public GetCDKey(): string;
36
-
37
- public GetAccountMngr(): account_manager;
38
-
39
- public GetDemoInfo(fileName: string): demo_info | null;
40
-
41
- public GetPatchProgress(): Patch_Dawnload_Progress;
42
-
43
- public GetProfileStore(): profile_store;
44
-
45
- public GetGSVer(): string;
46
-
47
- public GetLoginMngr(): login_manager;
48
-
49
- public GetPlayerName(): string;
50
-
51
- public CancelDownload(): void;
52
-
53
- public ValidateCDKey(): boolean;
54
- }
55
-
56
- /**
57
- * @source C++ class CUIGameCustom
58
- * @customConstructor CUIGameCustom
59
- * @group xr_ui_menu
60
- */
61
- export class CUIGameCustom {
62
- public AddCustomStatic(id: string, b: boolean): StaticDrawableWrapper;
63
-
64
- public AddCustomStatic(id: string, b: boolean, n: f32): StaticDrawableWrapper;
65
-
66
- public AddDialogToRender(window: CUIWindow): void;
67
-
68
- public CurrentItemAtCell(): game_object;
69
-
70
- public GetCustomStatic(value: string): StaticDrawableWrapper | null;
71
-
72
- public HideActorMenu(): void;
73
-
74
- public ShowActorMenu(): boolean;
75
-
76
- public HidePdaMenu(): void;
77
-
78
- public RemoveCustomStatic(id: string): void;
79
-
80
- public RemoveDialogToRender(window: CUIWindow): void;
81
-
82
- public UpdateActorMenu(): void;
83
-
84
- public enable_fake_indicators(enabled: boolean): void;
85
-
86
- public hide_messages(): void;
87
-
88
- public show_messages(): void;
89
-
90
- public update_fake_indicators(u8: number, enabled: boolean): void;
91
-
92
- public update_fake_indicators(u8: number, value: f32): void;
93
- }
94
-
95
- /**
96
- * @source namespace main_menu
97
- * @group xr_ui_menu
98
- */
99
- export interface IXR_main_menu {
100
- /**
101
- * @returns main game menu c++ controller singleton
102
- */
103
- get_main_menu(this: void): CMainMenu;
104
- }
105
-
106
- /**
107
- * @source namespace ActorMenu
108
- * @group xr_ui_menu
109
- */
110
- export interface IXR_ActorMenu {
111
- get_pda_menu(this: void): CUIPdaWnd;
112
- get_actor_menu(this: void): CUIActorMenu;
113
-
114
- /**
115
- * enum EMenuMode
116
- * {
117
- * mmUndefined,
118
- * mmInventory,
119
- * mmTrade,
120
- * mmUpgrade,
121
- * mmDeadBodySearch,
122
- * };
123
- */
124
- get_menu_mode(this: void): number;
125
- // get_maingame(this: void): unknown; // CUIMainIngameWnd - not registered, throws exception
126
- }
127
-
128
- /**
129
- * @group xr_ui_menu
130
- */
131
- export const ActorMenu: IXR_ActorMenu;
132
-
133
- /**
134
- * @group xr_ui_menu
135
- */
136
- export const main_menu: IXR_main_menu;
137
-
138
- /**
139
- * @group xr_ui_menu
140
- */
141
- export function get_hud(this: void): CUIGameCustom;
142
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class COptionsManager
4
+ * @customConstructor COptionsManager
5
+ * @group xr_ui_menu
6
+ */
7
+ export class COptionsManager {
8
+ public constructor();
9
+
10
+ public SendMessage2Group(group: string, message: string): void;
11
+
12
+ public UndoGroup(group: string): void;
13
+
14
+ public SaveBackupValues(group: string): void;
15
+
16
+ public IsGroupChanged(group: string): boolean;
17
+
18
+ public SaveValues(group: string): void;
19
+
20
+ public SetCurrentValues(group: string): void;
21
+
22
+ public NeedSystemRestart(): boolean;
23
+
24
+ public NeedVidRestart(): boolean;
25
+
26
+ public OptionsPostAccept(): void;
27
+ }
28
+
29
+ /**
30
+ * @source C++ class CMainMenu
31
+ * @customConstructor CMainMenu
32
+ * @group xr_ui_menu
33
+ */
34
+ export class CMainMenu {
35
+ public GetCDKey(): string;
36
+
37
+ public GetAccountMngr(): account_manager;
38
+
39
+ public GetDemoInfo(fileName: string): demo_info | null;
40
+
41
+ public GetPatchProgress(): Patch_Dawnload_Progress;
42
+
43
+ public GetProfileStore(): profile_store;
44
+
45
+ public GetGSVer(): string;
46
+
47
+ public GetLoginMngr(): login_manager;
48
+
49
+ public GetPlayerName(): string;
50
+
51
+ public CancelDownload(): void;
52
+
53
+ public ValidateCDKey(): boolean;
54
+ }
55
+
56
+ /**
57
+ * @source C++ class CUIGameCustom
58
+ * @customConstructor CUIGameCustom
59
+ * @group xr_ui_menu
60
+ */
61
+ export class CUIGameCustom {
62
+ public AddCustomStatic(id: string, b: boolean): StaticDrawableWrapper;
63
+
64
+ public AddCustomStatic(id: string, b: boolean, n: f32): StaticDrawableWrapper;
65
+
66
+ public AddDialogToRender(window: CUIWindow): void;
67
+
68
+ public CurrentItemAtCell(): game_object;
69
+
70
+ public GetCustomStatic(value: string): StaticDrawableWrapper | null;
71
+
72
+ public HideActorMenu(): void;
73
+
74
+ public ShowActorMenu(): boolean;
75
+
76
+ public HidePdaMenu(): void;
77
+
78
+ public RemoveCustomStatic(id: string): void;
79
+
80
+ public RemoveDialogToRender(window: CUIWindow): void;
81
+
82
+ public UpdateActorMenu(): void;
83
+
84
+ public enable_fake_indicators(enabled: boolean): void;
85
+
86
+ public hide_messages(): void;
87
+
88
+ public show_messages(): void;
89
+
90
+ public update_fake_indicators(u8: number, enabled: boolean): void;
91
+
92
+ public update_fake_indicators(u8: number, value: f32): void;
93
+ }
94
+
95
+ /**
96
+ * @source namespace main_menu
97
+ * @group xr_ui_menu
98
+ */
99
+ export interface IXR_main_menu {
100
+ /**
101
+ * @returns Main game menu c++ controller singleton.
102
+ */
103
+ get_main_menu(this: void): CMainMenu;
104
+ }
105
+
106
+ /**
107
+ * @source namespace ActorMenu
108
+ * @group xr_ui_menu
109
+ */
110
+ export interface IXR_ActorMenu {
111
+ get_pda_menu(this: void): CUIPdaWnd;
112
+ get_actor_menu(this: void): CUIActorMenu;
113
+
114
+ /**
115
+ * Enum EMenuMode
116
+ * {
117
+ * mmUndefined,
118
+ * mmInventory,
119
+ * mmTrade,
120
+ * mmUpgrade,
121
+ * mmDeadBodySearch,
122
+ * }.
123
+ */
124
+ get_menu_mode(this: void): number;
125
+ // Get_maingame(this: void): unknown; // CUIMainIngameWnd - not registered, throws exception
126
+ }
127
+
128
+ /**
129
+ * @group xr_ui_menu
130
+ */
131
+ export const ActorMenu: IXR_ActorMenu;
132
+
133
+ /**
134
+ * @group xr_ui_menu
135
+ */
136
+ export const main_menu: IXR_main_menu;
137
+
138
+ /**
139
+ * @group xr_ui_menu
140
+ */
141
+ export function get_hud(this: void): CUIGameCustom;
142
+ }
@@ -1,51 +1,59 @@
1
- declare global {
2
- /**
3
- * Utility to get current file name as inline value during transpiling, similar to __filename in node.
4
- *
5
- * @group xrf_plugin
6
- */
7
- const $filename: string;
8
-
9
- /**
10
- * Utility to get current directory name as inline value during transpiling, similar to __dirname in node.
11
- *
12
- * @group xrf_plugin
13
- */
14
- const $dirname: string;
15
-
16
- /**
17
- * Utility to transform TS provided array to a lua one.
18
- * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
19
- *
20
- * @group xrf_plugin
21
- */
22
- function $fromArray<T>(array: Array<T>): LuaTable<number, T>;
23
-
24
- /**
25
- * Utility to transform LUA array to JS array.
26
- * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
27
- *
28
- * @group xrf_plugin
29
- */
30
- function $fromLuaArray<T>(array: LuaTable<number, T>): Array<T>;
31
-
32
- /**
33
- * Utility to transform TS provided object to a lua table.
34
- * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
35
- *
36
- * @group xrf_plugin
37
- */
38
- function $fromObject<K extends string | number, T>(object: Record<K, T>): LuaTable<K, T>;
39
- function $fromObject<D>(object: D): LuaTable<keyof D, D[keyof D]>;
40
-
41
- /**
42
- * Utility to transform LUA provided table to a TS one.
43
- * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
44
- *
45
- * @group xrf_plugin
46
- */
47
- function $fromLuaTable<K extends string | number, T>(object: LuaTable<K, T>): Record<K, T>;
48
- function $fromLuaTable<D>(object: LuaTable<keyof D, D[keyof D]>): D;
49
- }
50
-
51
- export {};
1
+ declare global {
2
+ /**
3
+ * Utility to get current file name as inline value during transpiling, similar to __filename in node.
4
+ *
5
+ * @group xrf_plugin
6
+ */
7
+ const $filename: string;
8
+
9
+ /**
10
+ * Utility to get current directory name as inline value during transpiling, similar to __dirname in node.
11
+ *
12
+ * @group xrf_plugin
13
+ */
14
+ const $dirname: string;
15
+
16
+ /**
17
+ * Utility to transform TS provided array to a lua one.
18
+ * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
19
+ *
20
+ * @group xrf_plugin
21
+ *
22
+ * @param array
23
+ */
24
+ function $fromArray<T>(array: Array<T>): LuaTable<number, T>;
25
+
26
+ /**
27
+ * Utility to transform LUA array to JS array.
28
+ * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
29
+ *
30
+ * @group xrf_plugin
31
+ *
32
+ * @param array
33
+ */
34
+ function $fromLuaArray<T>(array: LuaTable<number, T>): Array<T>;
35
+
36
+ /**
37
+ * Utility to transform TS provided object to a lua table.
38
+ * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
39
+ *
40
+ * @group xrf_plugin
41
+ *
42
+ * @param object
43
+ */
44
+ function $fromObject<K extends string | number, T>(object: Record<K, T>): LuaTable<K, T>;
45
+ function $fromObject<D>(object: D): LuaTable<keyof D, D[keyof D]>;
46
+
47
+ /**
48
+ * Utility to transform LUA provided table to a TS one.
49
+ * Just wrapper that is stripped compile time, but simplifies unit testing with TS.
50
+ *
51
+ * @group xrf_plugin
52
+ *
53
+ * @param object
54
+ */
55
+ function $fromLuaTable<K extends string | number, T>(object: LuaTable<K, T>): Record<K, T>;
56
+ function $fromLuaTable<D>(object: LuaTable<keyof D, D[keyof D]>): D;
57
+ }
58
+
59
+ export {};