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,84 +1,84 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class FactionState
4
- * @customConstructor FactionState
5
- * @group xr_relation
6
- */
7
- export class FactionState {
8
- public actor_goodwill: i32;
9
- public bonus: i32;
10
- public faction_id: string;
11
- public icon: string;
12
- public icon_big: string;
13
- public location: string;
14
- public member_count: i32;
15
- public name: string;
16
- public power: f32;
17
- public resource: f32;
18
- public target: string;
19
- public target_desc: string;
20
- public war_state1: string;
21
- public war_state2: string;
22
- public war_state3: string;
23
- public war_state4: string;
24
- public war_state5: string;
25
- public war_state_hint1: string;
26
- public war_state_hint2: string;
27
- public war_state_hint3: string;
28
- public war_state_hint4: string;
29
- public war_state_hint5: string;
30
-
31
- protected constructor();
32
- }
33
-
34
- /**
35
- * @source namespace relation_registry
36
- * @group xr_relation
37
- */
38
- export interface IXR_relation_registry {
39
- /**
40
- * Change relation from community to object by `delta_goodwill`.
41
- */
42
- change_community_goodwill(this: void, from_community: string, to_object_id: i32, delta_goodwill: i32): void;
43
-
44
- community_goodwill(this: void, from_community: string, to_object_id: i32): i32;
45
-
46
- /**
47
- * @returns relation points between communities, usually between `-5000` and `5000`
48
- */
49
- community_relation(this: void, from_community: string, to_community: string): i32;
50
-
51
- /**
52
- * Get relation from object to actor.
53
- * Return formula looks like `personal_goodwill + community_to_obj_goodwill + community_to_community_goodwill`.
54
- *
55
- * @param from_object_id - object from
56
- * @param to_object_id - object to
57
- * @returns general goodwill from object to another object based on personal and community goodwill
58
- */
59
- get_general_goodwill_between(this: void, from_object_id: u16, to_object_id: u16): i32;
60
-
61
- set_community_goodwill(this: void, from_community: string, to_object_id: i32, goodwill: i32): void;
62
-
63
- set_community_relation(this: void, from_community: string, to_community: string, goodwill: i32): void;
64
- }
65
-
66
- /**
67
- * @group xr_relation
68
- */
69
- export const relation_registry: IXR_relation_registry;
70
-
71
- /**
72
- * Enumeration of relations.
73
- *
74
- * eRelationTypeFriend - 0
75
- * eRelationTypeNeutral - 1
76
- * eRelationTypeEnemy - 2
77
- * eRelationTypeWorstEnemy - 3
78
- * eRelationTypeLast - 4
79
- * eRelationTypeDummy - -1
80
- *
81
- * @group xr_relation
82
- */
83
- export type TXR_relation = 0 | 1 | 2 | 3;
84
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class FactionState
4
+ * @customConstructor FactionState
5
+ * @group xr_relation
6
+ */
7
+ export class FactionState {
8
+ public actor_goodwill: i32;
9
+ public bonus: i32;
10
+ public faction_id: string;
11
+ public icon: string;
12
+ public icon_big: string;
13
+ public location: string;
14
+ public member_count: i32;
15
+ public name: string;
16
+ public power: f32;
17
+ public resource: f32;
18
+ public target: string;
19
+ public target_desc: string;
20
+ public war_state1: string;
21
+ public war_state2: string;
22
+ public war_state3: string;
23
+ public war_state4: string;
24
+ public war_state5: string;
25
+ public war_state_hint1: string;
26
+ public war_state_hint2: string;
27
+ public war_state_hint3: string;
28
+ public war_state_hint4: string;
29
+ public war_state_hint5: string;
30
+
31
+ protected constructor();
32
+ }
33
+
34
+ /**
35
+ * @source namespace relation_registry
36
+ * @group xr_relation
37
+ */
38
+ export interface IXR_relation_registry {
39
+ /**
40
+ * Change relation from community to object by `delta_goodwill`.
41
+ */
42
+ change_community_goodwill(this: void, from_community: string, to_object_id: i32, delta_goodwill: i32): void;
43
+
44
+ community_goodwill(this: void, from_community: string, to_object_id: i32): i32;
45
+
46
+ /**
47
+ * @returns Relation points between communities, usually between `-5000` and `5000`.
48
+ */
49
+ community_relation(this: void, from_community: string, to_community: string): i32;
50
+
51
+ /**
52
+ * Get relation from object to actor.
53
+ * Return formula looks like `personal_goodwill + community_to_obj_goodwill + community_to_community_goodwill`.
54
+ *
55
+ * @param from_object_id - Object from.
56
+ * @param to_object_id - Object to.
57
+ * @returns General goodwill from object to another object based on personal and community goodwill.
58
+ */
59
+ get_general_goodwill_between(this: void, from_object_id: u16, to_object_id: u16): i32;
60
+
61
+ set_community_goodwill(this: void, from_community: string, to_object_id: i32, goodwill: i32): void;
62
+
63
+ set_community_relation(this: void, from_community: string, to_community: string, goodwill: i32): void;
64
+ }
65
+
66
+ /**
67
+ * @group xr_relation
68
+ */
69
+ export const relation_registry: IXR_relation_registry;
70
+
71
+ /**
72
+ * Enumeration of relations.
73
+ *
74
+ * ERelationTypeFriend - 0
75
+ * eRelationTypeNeutral - 1
76
+ * eRelationTypeEnemy - 2
77
+ * eRelationTypeWorstEnemy - 3
78
+ * eRelationTypeLast - 4
79
+ * eRelationTypeDummy - -1.
80
+ *
81
+ * @group xr_relation
82
+ */
83
+ export type TXR_relation = 0 | 1 | 2 | 3;
84
+ }
@@ -1,69 +1,71 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class render_device
4
- * @customConstructor render_device
5
- * @group xr_render
6
- */
7
- export class render_device {
8
- private constructor();
9
-
10
- public readonly cam_dir: vector;
11
- public readonly cam_pos: vector;
12
- public readonly cam_right: vector;
13
- public readonly cam_top: vector;
14
- public readonly aspect_ratio: f32;
15
- public readonly fov: f32;
16
- public readonly precache_frame: u32;
17
- public readonly frame: u32;
18
- public readonly height: u32;
19
- public readonly time_delta: u32;
20
- public readonly f_time_delta: f32;
21
- public readonly width: u32;
22
-
23
- /**
24
- * Get current game timestamp.
25
- *
26
- * @example `29319`,`46297`
27
- * @returns milliseconds from game start
28
- */
29
- public time_global(): u32;
30
-
31
- /**
32
- * @returns whether game is paused
33
- */
34
- public is_paused(): boolean;
35
-
36
- /**
37
- * Change game pause state.
38
- *
39
- * @param paused - whether game should be paused
40
- */
41
- public pause(paused: boolean): void;
42
- }
43
-
44
- /**
45
- * @group xr_render
46
- */
47
- export function device(this: void): render_device;
48
-
49
- /**
50
- * @group xr_render
51
- */
52
- export function app_ready(this: void): boolean;
53
-
54
- /**
55
- * @group xr_render
56
- */
57
- export function xrRender_test_r2_hw(this: void): boolean;
58
-
59
- /**
60
- * @group xr_render
61
- */
62
- export function render_get_dx_level(this: void): number;
63
-
64
- /**
65
- * @group xr_global_declaration
66
- * @returns whether renderer setting can be changed
67
- */
68
- export function renderer_allow_override(this: void): boolean;
69
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class render_device
4
+ * @customConstructor render_device
5
+ * @group xr_render
6
+ */
7
+ export class render_device {
8
+ private constructor();
9
+
10
+ public readonly cam_dir: vector;
11
+ public readonly cam_pos: vector;
12
+ public readonly cam_right: vector;
13
+ public readonly cam_top: vector;
14
+ public readonly aspect_ratio: f32;
15
+ public readonly fov: f32;
16
+ public readonly precache_frame: u32;
17
+ public readonly frame: u32;
18
+ public readonly height: u32;
19
+ public readonly time_delta: u32;
20
+ public readonly f_time_delta: f32;
21
+ public readonly width: u32;
22
+
23
+ /**
24
+ * Get current game timestamp.
25
+ *
26
+ * @example `29319`,`46297`
27
+ *
28
+ * @returns Milliseconds from game start.
29
+ */
30
+ public time_global(): u32;
31
+
32
+ /**
33
+ * @returns Whether game is paused.
34
+ */
35
+ public is_paused(): boolean;
36
+
37
+ /**
38
+ * Change game pause state.
39
+ *
40
+ * @param paused - Whether game should be paused.
41
+ */
42
+ public pause(paused: boolean): void;
43
+ }
44
+
45
+ /**
46
+ * @group xr_render
47
+ */
48
+ export function device(this: void): render_device;
49
+
50
+ /**
51
+ * @group xr_render
52
+ */
53
+ export function app_ready(this: void): boolean;
54
+
55
+ /**
56
+ * @group xr_render
57
+ */
58
+ export function xrRender_test_r2_hw(this: void): boolean;
59
+
60
+ /**
61
+ * @group xr_render
62
+ */
63
+ export function render_get_dx_level(this: void): number;
64
+
65
+ /**
66
+ * @group xr_global_declaration
67
+ *
68
+ * @returns Whether renderer setting can be changed.
69
+ */
70
+ export function renderer_allow_override(this: void): boolean;
71
+ }