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,151 +1,151 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class sound_params
4
- * @customConstructor sound_params
5
- * @group xr_sound
6
- */
7
- export class sound_params {
8
- public frequency: f32;
9
- public max_distance: f32;
10
- public min_distance: f32;
11
- public position: vector;
12
- public volume: f32;
13
-
14
- private constructor();
15
- }
16
-
17
- /**
18
- * @source C++ class sound_object
19
- * @customConstructor sound_object
20
- * @group xr_sound
21
- */
22
- export class sound_object {
23
- public static s3d: 0;
24
- public static looped: 1;
25
- public static s2d: 2;
26
-
27
- public frequency: f32;
28
- public max_distance: f32;
29
- public min_distance: f32;
30
- public volume: f32;
31
-
32
- /**
33
- * @param sound_path - file path
34
- */
35
- public constructor(sound_path: string);
36
- /**
37
- * @param sound_path - file path
38
- * @param type - default 'no_sound' (0)
39
- */
40
- public constructor(sound_path: string, type: TXR_snd_type);
41
-
42
- public length(): u32;
43
-
44
- public playing(): boolean;
45
-
46
- public get_position(): vector;
47
-
48
- public set_position(vector: vector): void;
49
-
50
- public attach_tail(sound_path: string): void;
51
-
52
- public play(object: game_object | null): void;
53
-
54
- public play(object: game_object | null, delay: f32): void;
55
-
56
- public play(object: game_object | null, delay: f32, type: i32): void;
57
-
58
- public play_at_pos(object: game_object, position: vector): void;
59
-
60
- public play_at_pos(object: game_object, position: vector, delay: f32): void;
61
-
62
- public play_at_pos(object: game_object, position: vector, delay: f32, type: i32): void;
63
-
64
- public play_no_feedback(object: game_object, type: i32, value1: f32, position: vector, value2: f32): void;
65
-
66
- public stop(): void;
67
-
68
- public stop_deffered(): void;
69
- }
70
-
71
- /**
72
- * @group xr_sound
73
- */
74
- export type TXR_sound_object_type = EnumeratedStaticsValues<typeof sound_object>;
75
-
76
- /**
77
- * @source C++ class snd_type
78
- * @customConstructor snd_type
79
- * @group xr_sound
80
- */
81
- export class snd_type {
82
- public static ambient: 128;
83
- public static anomaly: 268435456;
84
- public static anomaly_idle: 268437504;
85
- public static attack: 8192;
86
- public static bullet_hit: 524288;
87
- public static die: 131072;
88
- public static drop: 33554432;
89
- public static eat: 4096;
90
- public static empty: 1048576;
91
- public static hide: 16777216;
92
- public static idle: 2048;
93
- public static injure: 65536;
94
- public static item: 1073741824;
95
- public static item_drop: 1107296256;
96
- public static item_hide: 1090519040;
97
- public static item_pick_up: 1140850688;
98
- public static item_take: 1082130432;
99
- public static item_use: 1077936128;
100
- public static monster: 536870912;
101
- public static monster_attack: 536879104;
102
- public static monster_die: 537001984;
103
- public static monster_eat: 536875008;
104
- public static monster_injure: 536936448;
105
- public static monster_step: 536903680;
106
- public static monster_talk: 536887296;
107
- public static no_sound: 0;
108
- public static object_break: 1024;
109
- public static object_collide: 512;
110
- public static object_explode: 256;
111
- public static pick_up: 67108864;
112
- public static reload: 262144;
113
- public static shoot: 2097152;
114
- public static step: 32768;
115
- public static take: 8388608;
116
- public static talk: 16384;
117
- public static use: 4194304;
118
- public static weapon: -2147483648;
119
- public static weapon_bullet_hit: -2146959360;
120
- public static weapon_empty: -2146435072;
121
- public static weapon_reload: -2147221504;
122
- public static weapon_shoot: -2145386496;
123
- public static world: 134217728;
124
- public static world_ambient: 134217856;
125
- public static world_object_break: 134218752;
126
- public static world_object_collide: 134218240;
127
- public static world_object_explode: 134217984;
128
-
129
- private constructor();
130
- }
131
-
132
- /**
133
- * @group xr_sound
134
- */
135
- export type TXR_snd_type = EnumeratedStaticsValues<typeof snd_type>;
136
-
137
- /**
138
- * @source C++ class SoundInfo
139
- * @customConstructor SoundInfo
140
- * @group xr_sound
141
- */
142
- export class SoundInfo {
143
- public danger: i32;
144
- public position: vector;
145
- public power: f32;
146
- public time: i32;
147
- public who: game_object;
148
-
149
- private constructor();
150
- }
151
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class sound_params
4
+ * @customConstructor sound_params
5
+ * @group xr_sound
6
+ */
7
+ export class sound_params {
8
+ public frequency: f32;
9
+ public max_distance: f32;
10
+ public min_distance: f32;
11
+ public position: vector;
12
+ public volume: f32;
13
+
14
+ private constructor();
15
+ }
16
+
17
+ /**
18
+ * @source C++ class sound_object
19
+ * @customConstructor sound_object
20
+ * @group xr_sound
21
+ */
22
+ export class sound_object {
23
+ public static s3d: 0;
24
+ public static looped: 1;
25
+ public static s2d: 2;
26
+
27
+ public frequency: f32;
28
+ public max_distance: f32;
29
+ public min_distance: f32;
30
+ public volume: f32;
31
+
32
+ /**
33
+ * @param sound_path - File path.
34
+ */
35
+ public constructor(sound_path: string);
36
+ /**
37
+ * @param sound_path - File path.
38
+ * @param type - Default 'no_sound' (0).
39
+ */
40
+ public constructor(sound_path: string, type: TXR_snd_type);
41
+
42
+ public length(): u32;
43
+
44
+ public playing(): boolean;
45
+
46
+ public get_position(): vector;
47
+
48
+ public set_position(vector: vector): void;
49
+
50
+ public attach_tail(sound_path: string): void;
51
+
52
+ public play(object: game_object | null): void;
53
+
54
+ public play(object: game_object | null, delay: f32): void;
55
+
56
+ public play(object: game_object | null, delay: f32, type: i32): void;
57
+
58
+ public play_at_pos(object: game_object, position: vector): void;
59
+
60
+ public play_at_pos(object: game_object, position: vector, delay: f32): void;
61
+
62
+ public play_at_pos(object: game_object, position: vector, delay: f32, type: i32): void;
63
+
64
+ public play_no_feedback(object: game_object, type: i32, value1: f32, position: vector, value2: f32): void;
65
+
66
+ public stop(): void;
67
+
68
+ public stop_deffered(): void;
69
+ }
70
+
71
+ /**
72
+ * @group xr_sound
73
+ */
74
+ export type TXR_sound_object_type = EnumeratedStaticsValues<typeof sound_object>;
75
+
76
+ /**
77
+ * @source C++ class snd_type
78
+ * @customConstructor snd_type
79
+ * @group xr_sound
80
+ */
81
+ export class snd_type {
82
+ public static ambient: 128;
83
+ public static anomaly: 268435456;
84
+ public static anomaly_idle: 268437504;
85
+ public static attack: 8192;
86
+ public static bullet_hit: 524288;
87
+ public static die: 131072;
88
+ public static drop: 33554432;
89
+ public static eat: 4096;
90
+ public static empty: 1048576;
91
+ public static hide: 16777216;
92
+ public static idle: 2048;
93
+ public static injure: 65536;
94
+ public static item: 1073741824;
95
+ public static item_drop: 1107296256;
96
+ public static item_hide: 1090519040;
97
+ public static item_pick_up: 1140850688;
98
+ public static item_take: 1082130432;
99
+ public static item_use: 1077936128;
100
+ public static monster: 536870912;
101
+ public static monster_attack: 536879104;
102
+ public static monster_die: 537001984;
103
+ public static monster_eat: 536875008;
104
+ public static monster_injure: 536936448;
105
+ public static monster_step: 536903680;
106
+ public static monster_talk: 536887296;
107
+ public static no_sound: 0;
108
+ public static object_break: 1024;
109
+ public static object_collide: 512;
110
+ public static object_explode: 256;
111
+ public static pick_up: 67108864;
112
+ public static reload: 262144;
113
+ public static shoot: 2097152;
114
+ public static step: 32768;
115
+ public static take: 8388608;
116
+ public static talk: 16384;
117
+ public static use: 4194304;
118
+ public static weapon: -2147483648;
119
+ public static weapon_bullet_hit: -2146959360;
120
+ public static weapon_empty: -2146435072;
121
+ public static weapon_reload: -2147221504;
122
+ public static weapon_shoot: -2145386496;
123
+ public static world: 134217728;
124
+ public static world_ambient: 134217856;
125
+ public static world_object_break: 134218752;
126
+ public static world_object_collide: 134218240;
127
+ public static world_object_explode: 134217984;
128
+
129
+ private constructor();
130
+ }
131
+
132
+ /**
133
+ * @group xr_sound
134
+ */
135
+ export type TXR_snd_type = EnumeratedStaticsValues<typeof snd_type>;
136
+
137
+ /**
138
+ * @source C++ class SoundInfo
139
+ * @customConstructor SoundInfo
140
+ * @group xr_sound
141
+ */
142
+ export class SoundInfo {
143
+ public danger: i32;
144
+ public position: vector;
145
+ public power: f32;
146
+ public time: i32;
147
+ public who: game_object;
148
+
149
+ private constructor();
150
+ }
151
+ }
@@ -1,20 +1,20 @@
1
- declare module "xray16" {
2
- /**
3
- * @source namespace actor_stats
4
- * @group xr_stats
5
- */
6
- export interface IXR_actor_stats {
7
- add_points_str(this: void, value1: string, value2: string, value3: string): void;
8
-
9
- get_points(this: void, value: string): i32;
10
-
11
- add_points(this: void, value1: string, value2: string, value3: i32, value4: i32): void;
12
-
13
- remove_from_ranking(this: void, object_id: number): void | null;
14
- }
15
-
16
- /**
17
- * @group xr_stats
18
- */
19
- export const actor_stats: IXR_actor_stats;
20
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source namespace actor_stats
4
+ * @group xr_stats
5
+ */
6
+ export interface IXR_actor_stats {
7
+ add_points_str(this: void, value1: string, value2: string, value3: string): void;
8
+
9
+ get_points(this: void, value: string): i32;
10
+
11
+ add_points(this: void, value1: string, value2: string, value3: i32, value4: i32): void;
12
+
13
+ remove_from_ranking(this: void, object_id: number): void | null;
14
+ }
15
+
16
+ /**
17
+ * @group xr_stats
18
+ */
19
+ export const actor_stats: IXR_actor_stats;
20
+ }
@@ -1,111 +1,111 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class task
4
- * @customConstructor task
5
- * @group xr_task
6
- */
7
- export class task {
8
- public static readonly additional: 1;
9
- public static readonly completed: 2;
10
- public static readonly fail: 0;
11
- public static readonly in_progress: 1;
12
- public static readonly storyline: 0;
13
- public static readonly task_dummy: 65535;
14
-
15
- private constructor();
16
- }
17
-
18
- /**
19
- * @group xr_task
20
- */
21
- export type TXR_TaskStateName = EnumeratedStaticsKeys<typeof task>;
22
-
23
- /**
24
- * ETaskState
25
- *
26
- * @group xr_task
27
- */
28
- export type TXR_TaskState = EnumeratedStaticsValues<typeof task>;
29
-
30
- /**
31
- * @source C++ class SGameTaskObjective
32
- * @customConstructor SGameTaskObjective
33
- * @group xr_task
34
- */
35
- export class SGameTaskObjective {
36
- public constructor(task: CGameTask, id: i32);
37
-
38
- public set_icon_name(icon_name: string): void;
39
-
40
- public get_icon_name<T extends string = string>(): T | null;
41
-
42
- public set_description(description: string): void;
43
-
44
- public get_description(): string;
45
-
46
- public set_title(title: string): void;
47
-
48
- public get_title(): string;
49
-
50
- public set_map_location(location: string): void;
51
-
52
- public add_on_complete_func(function_name: string): void;
53
-
54
- public add_complete_info(value: string): void;
55
-
56
- public add_on_fail_info(value: string): void;
57
-
58
- public add_on_fail_func(function_name: string): void;
59
-
60
- public add_on_complete_info(value: string): void;
61
-
62
- public add_complete_func(function_name: string): void;
63
-
64
- public add_fail_func(function_name: string): void;
65
-
66
- public add_fail_info(value: string): void;
67
-
68
- public get_state(): TXR_TaskState;
69
-
70
- public get_type(): number; /* ETaskType */
71
-
72
- public set_type(type: i32 /* ETaskType */): void;
73
-
74
- public set_map_hint(hint: string): void;
75
-
76
- /**
77
- * @returns target map location of task object
78
- */
79
- public get_map_location(): string;
80
-
81
- /**
82
- * @returns target map object ID of task object
83
- */
84
- public get_map_object_id(): u16;
85
-
86
- public change_map_location(new_map_location: string, new_map_object_id: u16): void;
87
-
88
- public remove_map_locations(notify: boolean): void;
89
-
90
- public create_map_location(on_load: boolean): void;
91
-
92
- public set_map_object_id(id: i32): void;
93
- }
94
-
95
- /**
96
- * @source C++ class CGameTask : SGameTaskObjective
97
- * @customConstructor CGameTask
98
- * @group xr_task
99
- */
100
- export class CGameTask extends SGameTaskObjective {
101
- public constructor();
102
-
103
- public get_id(): string;
104
-
105
- public set_priority(priority: i32): void;
106
-
107
- public set_id(id: string): void;
108
-
109
- public get_priority(): u32;
110
- }
111
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class task
4
+ * @customConstructor task
5
+ * @group xr_task
6
+ */
7
+ export class task {
8
+ public static readonly additional: 1;
9
+ public static readonly completed: 2;
10
+ public static readonly fail: 0;
11
+ public static readonly in_progress: 1;
12
+ public static readonly storyline: 0;
13
+ public static readonly task_dummy: 65535;
14
+
15
+ private constructor();
16
+ }
17
+
18
+ /**
19
+ * @group xr_task
20
+ */
21
+ export type TXR_TaskStateName = EnumeratedStaticsKeys<typeof task>;
22
+
23
+ /**
24
+ * ETaskState.
25
+ *
26
+ * @group xr_task
27
+ */
28
+ export type TXR_TaskState = EnumeratedStaticsValues<typeof task>;
29
+
30
+ /**
31
+ * @source C++ class SGameTaskObjective
32
+ * @customConstructor SGameTaskObjective
33
+ * @group xr_task
34
+ */
35
+ export class SGameTaskObjective {
36
+ public constructor(task: CGameTask, id: i32);
37
+
38
+ public set_icon_name(icon_name: string): void;
39
+
40
+ public get_icon_name<T extends string = string>(): T | null;
41
+
42
+ public set_description(description: string): void;
43
+
44
+ public get_description(): string;
45
+
46
+ public set_title(title: string): void;
47
+
48
+ public get_title(): string;
49
+
50
+ public set_map_location(location: string): void;
51
+
52
+ public add_on_complete_func(function_name: string): void;
53
+
54
+ public add_complete_info(value: string): void;
55
+
56
+ public add_on_fail_info(value: string): void;
57
+
58
+ public add_on_fail_func(function_name: string): void;
59
+
60
+ public add_on_complete_info(value: string): void;
61
+
62
+ public add_complete_func(function_name: string): void;
63
+
64
+ public add_fail_func(function_name: string): void;
65
+
66
+ public add_fail_info(value: string): void;
67
+
68
+ public get_state(): TXR_TaskState;
69
+
70
+ public get_type(): number; /* ETaskType */
71
+
72
+ public set_type(type: i32 /* ETaskType */): void;
73
+
74
+ public set_map_hint(hint: string): void;
75
+
76
+ /**
77
+ * @returns Target map location of task object.
78
+ */
79
+ public get_map_location(): string;
80
+
81
+ /**
82
+ * @returns Target map object ID of task object.
83
+ */
84
+ public get_map_object_id(): u16;
85
+
86
+ public change_map_location(new_map_location: string, new_map_object_id: u16): void;
87
+
88
+ public remove_map_locations(notify: boolean): void;
89
+
90
+ public create_map_location(on_load: boolean): void;
91
+
92
+ public set_map_object_id(id: i32): void;
93
+ }
94
+
95
+ /**
96
+ * @source C++ class CGameTask : SGameTaskObjective
97
+ * @customConstructor CGameTask
98
+ * @group xr_task
99
+ */
100
+ export class CGameTask extends SGameTaskObjective {
101
+ public constructor();
102
+
103
+ public get_id(): string;
104
+
105
+ public set_priority(priority: i32): void;
106
+
107
+ public set_id(id: string): void;
108
+
109
+ public get_priority(): u32;
110
+ }
111
+ }