xray16 1.3.4 → 1.5.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 +1802 -510
  37. package/types/xr_ai/xr_alife.d.ts +1870 -566
  38. package/types/xr_ai/xr_enemy_evaluation.d.ts +134 -41
  39. package/types/xr_ai/xr_goap.d.ts +1116 -668
  40. package/types/xr_ai/xr_graph.d.ts +135 -47
  41. package/types/xr_ai/xr_memory.d.ts +382 -148
  42. package/types/xr_lib/xr_animation.d.ts +252 -81
  43. package/types/xr_lib/xr_bitwise.d.ts +44 -21
  44. package/types/xr_lib/xr_color.d.ts +142 -40
  45. package/types/xr_lib/xr_debug.d.ts +181 -77
  46. package/types/xr_lib/xr_dialog.d.ts +132 -40
  47. package/types/xr_lib/xr_flags.d.ts +592 -148
  48. package/types/xr_lib/xr_fs.d.ts +539 -148
  49. package/types/xr_lib/xr_game.d.ts +362 -158
  50. package/types/xr_lib/xr_hit.d.ts +125 -41
  51. package/types/xr_lib/xr_ini.d.ts +473 -188
  52. package/types/xr_lib/xr_level.d.ts +795 -225
  53. package/types/xr_lib/xr_luabind.d.ts +90 -59
  54. package/types/xr_lib/xr_map.d.ts +192 -61
  55. package/types/xr_lib/xr_math.d.ts +871 -233
  56. package/types/xr_lib/xr_multiplayer.d.ts +1079 -351
  57. package/types/xr_lib/xr_profile.d.ts +272 -160
  58. package/types/xr_lib/xr_properties.d.ts +610 -166
  59. package/types/xr_lib/xr_relation.d.ts +231 -84
  60. package/types/xr_lib/xr_render.d.ts +167 -69
  61. package/types/xr_lib/xr_save.d.ts +833 -223
  62. package/types/xr_lib/xr_sound.d.ts +515 -151
  63. package/types/xr_lib/xr_stats.ts +49 -20
  64. package/types/xr_lib/xr_task.d.ts +388 -111
  65. package/types/xr_lib/xr_time.d.ts +177 -61
  66. package/types/xr_lib/xr_type.d.ts +75 -75
  67. package/types/xr_object/client/xr_anomaly.d.ts +70 -50
  68. package/types/xr_object/client/xr_artefact.d.ts +153 -98
  69. package/types/xr_object/client/xr_client_object.d.ts +207 -76
  70. package/types/xr_object/client/xr_creature.d.ts +243 -164
  71. package/types/xr_object/client/xr_item.d.ts +370 -264
  72. package/types/xr_object/client/xr_level.d.ts +753 -285
  73. package/types/xr_object/client/xr_physic.d.ts +644 -214
  74. package/types/xr_object/client/xr_zone.d.ts +85 -47
  75. package/types/xr_object/script/xr_script_interface.d.ts +819 -584
  76. package/types/xr_object/script/xr_script_object.d.ts +5728 -1390
  77. package/types/xr_object/script/xr_script_trade.d.ts +51 -26
  78. package/types/xr_object/server/xr_server_object.d.ts +1486 -792
  79. package/types/xr_ui/xr_ui_asset.d.ts +364 -123
  80. package/types/xr_ui/xr_ui_core.d.ts +424 -97
  81. package/types/xr_ui/xr_ui_event.d.ts +1449 -381
  82. package/types/xr_ui/xr_ui_interface.d.ts +2447 -903
  83. package/types/xr_ui/xr_ui_menu.d.ts +385 -142
  84. package/types/xrf_plugin.d.ts +89 -51
@@ -1,47 +1,135 @@
1
- declare module "xray16" {
2
- /**
3
- * @source C++ class GameGraph__CVertex
4
- * @customConstructor GameGraph__CVertex
5
- * @group xr_graph
6
- */
7
- export class GameGraph__CVertex extends EngineBinding {
8
- protected constructor();
9
-
10
- public level_vertex_id(): u32;
11
-
12
- public level_id(): u8;
13
-
14
- public game_point(): vector;
15
-
16
- public level_point(): vector;
17
- }
18
-
19
- /**
20
- * @source C++ class CGameGraph
21
- * @customConstructor CGameGraph
22
- * @group xr_graph
23
- */
24
- export class CGameGraph {
25
- public valid_vertex_id(value: u32): boolean;
26
-
27
- public vertex(vertexId: u32): GameGraph__CVertex;
28
-
29
- public vertex_id(graph: CGameGraph): u16;
30
-
31
- public accessible(value: u32): boolean;
32
-
33
- public accessible(value1: u32, value2: boolean): void;
34
-
35
- /**
36
- * Method to iterate over game levels registered in `all.spawn`.
37
- *
38
- * @returns level abstract object with every iteration
39
- */
40
- public levels(): LuaIterable<cse_abstract>;
41
- }
42
-
43
- /**
44
- * @group xr_graph
45
- */
46
- export function game_graph(this: void): CGameGraph;
47
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * Game graph vertex binding.
4
+ *
5
+ * @source C++ class GameGraph__CVertex
6
+ * @customConstructor GameGraph__CVertex
7
+ * @group xr_graph
8
+ *
9
+ * @remarks
10
+ * Engine-owned descriptor returned by {@link CGameGraph.vertex}. Keep it as a short-lived view of graph data,
11
+ * not as persistent game state.
12
+ */
13
+ export class GameGraph__CVertex extends EngineBinding {
14
+ /**
15
+ * Engine-created game-graph vertex descriptor.
16
+ */
17
+ protected constructor();
18
+
19
+ /**
20
+ * Get the level-graph vertex this game-graph point maps to.
21
+ *
22
+ * @returns Level vertex id inside the owning level.
23
+ */
24
+ public level_vertex_id(): u32;
25
+
26
+ /**
27
+ * Get the id of the level that owns this graph point.
28
+ *
29
+ * @returns Level id.
30
+ */
31
+ public level_id(): u8;
32
+
33
+ /**
34
+ * Get this point position in global game space.
35
+ *
36
+ * @returns Game-space position.
37
+ */
38
+ public game_point(): vector;
39
+
40
+ /**
41
+ * Get this point position in its level.
42
+ *
43
+ * @returns Level-space position.
44
+ */
45
+ public level_point(): vector;
46
+ }
47
+
48
+ /**
49
+ * Game graph access binding.
50
+ *
51
+ * @source C++ class CGameGraph
52
+ * @customConstructor CGameGraph
53
+ * @group xr_graph
54
+ *
55
+ * @remarks
56
+ * Represents the global AI game graph. Validate ids before resolving vertices, and restore accessibility changes
57
+ * when they are only needed temporarily.
58
+ */
59
+ export class CGameGraph {
60
+ /**
61
+ * Check whether a game-graph vertex id exists.
62
+ *
63
+ * @param vertexId - Game-graph vertex id.
64
+ * @returns Whether the id can be used with graph methods.
65
+ */
66
+ public valid_vertex_id(vertexId: u32): boolean;
67
+
68
+ /**
69
+ * Get a game-graph vertex by id.
70
+ *
71
+ * @remarks
72
+ * Call {@link CGameGraph.valid_vertex_id} first. Native code expects a valid id and can fail hard on invalid
73
+ * graph references.
74
+ *
75
+ * @param vertexId - Game-graph vertex id.
76
+ * @returns Graph vertex descriptor.
77
+ */
78
+ public vertex(vertexId: u32): GameGraph__CVertex;
79
+
80
+ /**
81
+ * Resolve a graph vertex back to its id.
82
+ *
83
+ * @remarks
84
+ * Pass only vertices returned by this graph instance.
85
+ *
86
+ * @param vertex - Vertex returned by {@link CGameGraph.vertex}.
87
+ * @returns Game-graph vertex id.
88
+ */
89
+ public vertex_id(vertex: GameGraph__CVertex): u16;
90
+
91
+ /**
92
+ * Check whether a game-graph vertex can be used for AI travel.
93
+ *
94
+ * @remarks
95
+ * This is pathing accessibility, not whether the vertex exists.
96
+ *
97
+ * @param vertexId - Game-graph vertex id.
98
+ * @returns Whether the vertex is currently accessible.
99
+ */
100
+ public accessible(vertexId: u32): boolean;
101
+
102
+ /**
103
+ * Mark a game-graph vertex as accessible or blocked.
104
+ *
105
+ * @remarks
106
+ * Blocking vertices affects AI travel through the game graph. Prefer narrow, reversible changes.
107
+ *
108
+ * @param vertexId - Game-graph vertex id.
109
+ * @param value - New accessibility state.
110
+ */
111
+ public accessible(vertexId: u32, value: boolean): void;
112
+
113
+ /**
114
+ * Iterate over game levels registered in `all.spawn`.
115
+ *
116
+ * @remarks
117
+ * Iterates graph-level descriptors, not currently loaded level objects.
118
+ *
119
+ * @returns Level object on every iteration.
120
+ */
121
+ public levels(): LuaIterable<cse_abstract>;
122
+ }
123
+
124
+ /**
125
+ * Get the global game graph used by AI navigation.
126
+ *
127
+ * @group xr_graph
128
+ *
129
+ * @remarks
130
+ * Available after the engine has loaded AI graph data.
131
+ *
132
+ * @returns Game graph singleton.
133
+ */
134
+ export function game_graph(this: void): CGameGraph;
135
+ }