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.
- package/LICENSE +21 -21
- package/README.md +112 -106
- package/package.json +45 -42
- package/plugins/built_at_info.d.ts +1 -1
- package/plugins/from_cast_utils.d.ts +1 -1
- package/plugins/global_declarations_transform.d.ts +1 -1
- package/plugins/inject_file_meta.d.ts +1 -1
- package/plugins/inject_tracy_zones.d.ts +1 -1
- package/plugins/inject_tracy_zones.js +2 -2
- package/plugins/strip_lua_logger.d.ts +1 -1
- package/plugins/strip_lua_logger.js +1 -1
- package/plugins/transform_luabind_class/plugin.d.ts +1 -1
- package/plugins/transform_luabind_class/transformation/class_declaration.d.ts +3 -3
- package/plugins/transform_luabind_class/transformation/decorators.d.ts +5 -2
- package/plugins/transform_luabind_class/transformation/decorators.js +3 -0
- package/plugins/transform_luabind_class/transformation/members/accessors.d.ts +1 -1
- package/plugins/transform_luabind_class/transformation/members/constructor.d.ts +2 -2
- package/plugins/transform_luabind_class/transformation/members/constructor.js +2 -2
- package/plugins/transform_luabind_class/transformation/members/fields.d.ts +5 -2
- package/plugins/transform_luabind_class/transformation/members/fields.js +5 -2
- package/plugins/transform_luabind_class/transformation/members/method.d.ts +6 -3
- package/plugins/transform_luabind_class/transformation/members/method.js +4 -1
- package/plugins/transform_luabind_class/transformation/new.d.ts +7 -3
- package/plugins/transform_luabind_class/transformation/new.js +5 -1
- package/plugins/transform_luabind_class/transformation/setup.d.ts +9 -3
- package/plugins/transform_luabind_class/transformation/setup.js +22 -6
- package/plugins/transform_luabind_class/transformation/super.d.ts +19 -3
- package/plugins/transform_luabind_class/transformation/super.js +17 -1
- package/plugins/transform_luabind_class/transformation/utils.d.ts +27 -4
- package/plugins/transform_luabind_class/transformation/utils.js +25 -2
- package/plugins/utils/ast.d.ts +1 -1
- package/plugins/utils/diagnostics.d.ts +9 -5
- package/plugins/utils/diagnostics.js +5 -1
- package/plugins/utils/tracy.d.ts +1 -1
- package/types/index.d.ts +55 -55
- package/types/xr_ai/xr_action.d.ts +1802 -510
- package/types/xr_ai/xr_alife.d.ts +1870 -566
- package/types/xr_ai/xr_enemy_evaluation.d.ts +134 -41
- package/types/xr_ai/xr_goap.d.ts +1116 -668
- package/types/xr_ai/xr_graph.d.ts +135 -47
- package/types/xr_ai/xr_memory.d.ts +382 -148
- package/types/xr_lib/xr_animation.d.ts +252 -81
- package/types/xr_lib/xr_bitwise.d.ts +44 -21
- package/types/xr_lib/xr_color.d.ts +142 -40
- package/types/xr_lib/xr_debug.d.ts +181 -77
- package/types/xr_lib/xr_dialog.d.ts +132 -40
- package/types/xr_lib/xr_flags.d.ts +592 -148
- package/types/xr_lib/xr_fs.d.ts +539 -148
- package/types/xr_lib/xr_game.d.ts +362 -158
- package/types/xr_lib/xr_hit.d.ts +125 -41
- package/types/xr_lib/xr_ini.d.ts +473 -188
- package/types/xr_lib/xr_level.d.ts +795 -225
- package/types/xr_lib/xr_luabind.d.ts +90 -59
- package/types/xr_lib/xr_map.d.ts +192 -61
- package/types/xr_lib/xr_math.d.ts +871 -233
- package/types/xr_lib/xr_multiplayer.d.ts +1079 -351
- package/types/xr_lib/xr_profile.d.ts +272 -160
- package/types/xr_lib/xr_properties.d.ts +610 -166
- package/types/xr_lib/xr_relation.d.ts +231 -84
- package/types/xr_lib/xr_render.d.ts +167 -69
- package/types/xr_lib/xr_save.d.ts +833 -223
- package/types/xr_lib/xr_sound.d.ts +515 -151
- package/types/xr_lib/xr_stats.ts +49 -20
- package/types/xr_lib/xr_task.d.ts +388 -111
- package/types/xr_lib/xr_time.d.ts +177 -61
- package/types/xr_lib/xr_type.d.ts +75 -75
- package/types/xr_object/client/xr_anomaly.d.ts +70 -50
- package/types/xr_object/client/xr_artefact.d.ts +153 -98
- package/types/xr_object/client/xr_client_object.d.ts +207 -76
- package/types/xr_object/client/xr_creature.d.ts +243 -164
- package/types/xr_object/client/xr_item.d.ts +370 -264
- package/types/xr_object/client/xr_level.d.ts +753 -285
- package/types/xr_object/client/xr_physic.d.ts +644 -214
- package/types/xr_object/client/xr_zone.d.ts +85 -47
- package/types/xr_object/script/xr_script_interface.d.ts +819 -584
- package/types/xr_object/script/xr_script_object.d.ts +5728 -1390
- package/types/xr_object/script/xr_script_trade.d.ts +51 -26
- package/types/xr_object/server/xr_server_object.d.ts +1486 -792
- package/types/xr_ui/xr_ui_asset.d.ts +364 -123
- package/types/xr_ui/xr_ui_core.d.ts +424 -97
- package/types/xr_ui/xr_ui_event.d.ts +1449 -381
- package/types/xr_ui/xr_ui_interface.d.ts +2447 -903
- package/types/xr_ui/xr_ui_menu.d.ts +385 -142
- package/types/xrf_plugin.d.ts +89 -51
|
@@ -1,59 +1,90 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* Base for
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* @
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Base class for LuaBind-backed engine objects.
|
|
4
|
+
*
|
|
5
|
+
* Engine classes expose `__name` through the TypeScriptToLua LuaBind plugin so subclasses can be emitted as LuaBind
|
|
6
|
+
* classes instead of regular Lua tables.
|
|
7
|
+
*
|
|
8
|
+
* @source luabind
|
|
9
|
+
* @group xr_luabind
|
|
10
|
+
*/
|
|
11
|
+
export class EngineBinding {
|
|
12
|
+
/**
|
|
13
|
+
* LuaBind class constructor name.
|
|
14
|
+
*/
|
|
15
|
+
public static readonly __name: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* LuaBind instance constructor name.
|
|
19
|
+
*/
|
|
20
|
+
public readonly __name: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Static members owned by `EngineBinding` and excluded from exported engine enum values.
|
|
25
|
+
*
|
|
26
|
+
* @group xr_luabind
|
|
27
|
+
*/
|
|
28
|
+
type TEngineBindingStaticMethods = keyof typeof EngineBinding;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Mark a TypeScript class for LuaBind class transformation.
|
|
32
|
+
*
|
|
33
|
+
* Use this on classes that extend engine bindings and need LuaBind-compatible constructors, inheritance, or virtual
|
|
34
|
+
* methods in emitted Lua.
|
|
35
|
+
*
|
|
36
|
+
* @group xr_luabind
|
|
37
|
+
*
|
|
38
|
+
* @returns Class decorator.
|
|
39
|
+
*/
|
|
40
|
+
export function LuabindClass(): ClassDecorator;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Runtime metadata for a LuaBind class.
|
|
44
|
+
*
|
|
45
|
+
* @source C++ class class_info_data
|
|
46
|
+
* @customConstructor class_info_data
|
|
47
|
+
* @group xr_luabind
|
|
48
|
+
*/
|
|
49
|
+
export class class_info_data extends EngineBinding {
|
|
50
|
+
/**
|
|
51
|
+
* Methods exposed by the LuaBind class.
|
|
52
|
+
*/
|
|
53
|
+
public readonly methods: LuaTable<string, (...args: Array<unknown>) => unknown>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Attribute names exposed by the LuaBind class.
|
|
57
|
+
*/
|
|
58
|
+
public readonly attributes: LuaTable<number, string>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* LuaBind class name.
|
|
62
|
+
*/
|
|
63
|
+
public readonly name: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Engine-created LuaBind metadata.
|
|
67
|
+
*/
|
|
68
|
+
private constructor();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get names of LuaBind classes registered in a Lua state.
|
|
73
|
+
*
|
|
74
|
+
* @group xr_luabind
|
|
75
|
+
*
|
|
76
|
+
* @param lua_state - Lua state to inspect.
|
|
77
|
+
* @returns Registered class names.
|
|
78
|
+
*/
|
|
79
|
+
export function class_names(this: void, lua_state: unknown /* Lua_State*/): LuaTable<number, string>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Get LuaBind metadata for an object or class.
|
|
83
|
+
*
|
|
84
|
+
* @group xr_luabind
|
|
85
|
+
*
|
|
86
|
+
* @param target - Object or class to inspect.
|
|
87
|
+
* @returns LuaBind class metadata.
|
|
88
|
+
*/
|
|
89
|
+
export function class_info(this: void, target: unknown): class_info_data;
|
|
90
|
+
}
|
package/types/xr_lib/xr_map.d.ts
CHANGED
|
@@ -1,61 +1,192 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
public
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
public
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Manages active PDA/minimap locations.
|
|
4
|
+
*
|
|
5
|
+
* @source C++ class CMapManager
|
|
6
|
+
* @customConstructor CMapManager
|
|
7
|
+
* @group xr_map
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Level scripts usually work with the level-owned map manager through map spot helpers instead of creating wrappers.
|
|
11
|
+
* Removed locations are queued for deferred destruction and should not be reused from script.
|
|
12
|
+
*/
|
|
13
|
+
export class CMapManager {
|
|
14
|
+
/**
|
|
15
|
+
* Create a map manager wrapper.
|
|
16
|
+
*/
|
|
17
|
+
public constructor();
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Remove all map locations attached to an object id.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* In single-player this also releases linked game-task map locations. Native location objects are destroyed on the
|
|
24
|
+
* manager's deferred destroy queue, so any old `CMapLocation` references become unsafe to use.
|
|
25
|
+
*
|
|
26
|
+
* @param id - Game object id.
|
|
27
|
+
*/
|
|
28
|
+
public RemoveMapLocationByObjectID(id: u16): void;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Remove a specific map location.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* In single-player this also releases linked game-task map locations. Native location objects are destroyed on the
|
|
35
|
+
* manager's deferred destroy queue, so do not call methods on `location` after removal.
|
|
36
|
+
*
|
|
37
|
+
* @param location - Location object to remove.
|
|
38
|
+
*/
|
|
39
|
+
public RemoveMapLocation(location: CMapLocation): void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Hide pointers for all map locations.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Only pointer arrows are disabled. The map spots themselves remain enabled.
|
|
46
|
+
*/
|
|
47
|
+
public DisableAllPointers(): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A single PDA/minimap spot attached to an object or user position.
|
|
52
|
+
*
|
|
53
|
+
* @source C++ class CMapLocation
|
|
54
|
+
* @customConstructor CMapLocation
|
|
55
|
+
* @group xr_map
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* Map locations are created by the engine or map manager. The native binding does not expose a script constructor.
|
|
59
|
+
* A location can also expire or be removed by object lifetime, TTL, or task cleanup.
|
|
60
|
+
*/
|
|
61
|
+
export class CMapLocation {
|
|
62
|
+
/**
|
|
63
|
+
* Engine-created map location.
|
|
64
|
+
*/
|
|
65
|
+
protected constructor();
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @returns Whether the map spot participates in UI collision.
|
|
69
|
+
*/
|
|
70
|
+
public Collidable(): boolean;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Hide the off-screen pointer arrow.
|
|
74
|
+
*/
|
|
75
|
+
public DisablePointer(): void;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Hide the map spot.
|
|
79
|
+
*/
|
|
80
|
+
public DisableSpot(): void;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Show the off-screen pointer arrow.
|
|
84
|
+
*/
|
|
85
|
+
public EnablePointer(): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Show the map spot.
|
|
89
|
+
*/
|
|
90
|
+
public EnableSpot(): void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @remarks
|
|
94
|
+
* Returns `null` when hints are disabled for this spot.
|
|
95
|
+
*
|
|
96
|
+
* @returns Hint text shown for the spot.
|
|
97
|
+
*/
|
|
98
|
+
public GetHint(): string | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @remarks
|
|
102
|
+
* This is a cached value updated by the map manager.
|
|
103
|
+
*
|
|
104
|
+
* @returns Last calculated spot position.
|
|
105
|
+
*/
|
|
106
|
+
public GetLastPosition(): vector2;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @remarks
|
|
110
|
+
* This is a cached value updated by the map manager.
|
|
111
|
+
*
|
|
112
|
+
* @returns Level name where the spot is located.
|
|
113
|
+
*/
|
|
114
|
+
public GetLevelName(): string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @remarks
|
|
118
|
+
* This is a cached value updated by the map manager.
|
|
119
|
+
*
|
|
120
|
+
* @returns Current spot position on the map.
|
|
121
|
+
*/
|
|
122
|
+
public GetPosition(): vector2;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Highlight or clear the spot highlight.
|
|
126
|
+
*
|
|
127
|
+
* @remarks
|
|
128
|
+
* Requires a location type with a level-map spot. Types that only define minimap or complex-map visuals are not good
|
|
129
|
+
* candidates for this helper.
|
|
130
|
+
*
|
|
131
|
+
* @param state - Whether highlighting is enabled.
|
|
132
|
+
* @param color - Highlight color.
|
|
133
|
+
*/
|
|
134
|
+
public HighlightSpot(state: boolean, color: fcolor): void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @returns Whether a hint can be shown for the spot.
|
|
138
|
+
*/
|
|
139
|
+
public HintEnabled(): boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @returns Whether this is a user-created spot.
|
|
143
|
+
*/
|
|
144
|
+
public IsUserDefined(): boolean;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @returns Object id this spot tracks.
|
|
148
|
+
*/
|
|
149
|
+
public ObjectID(): u16;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @remarks
|
|
153
|
+
* Pointer state also depends on `SpotEnabled()`. A disabled spot reports its pointer as disabled.
|
|
154
|
+
*
|
|
155
|
+
* @returns Whether the off-screen pointer arrow is enabled.
|
|
156
|
+
*/
|
|
157
|
+
public PointerEnabled(): boolean;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Set hint text shown for the spot.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* Passing `disable_hint` disables hints and clears the stored hint.
|
|
164
|
+
*
|
|
165
|
+
* @param hint - Hint text or string table id.
|
|
166
|
+
*/
|
|
167
|
+
public SetHint(hint: string): void;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Mark the spot as user-created or engine-owned.
|
|
171
|
+
*
|
|
172
|
+
* @param state - User-defined flag.
|
|
173
|
+
*/
|
|
174
|
+
public SetUserDefinedFlag(state: boolean): void;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @remarks
|
|
178
|
+
* Disabling a spot also makes `PointerEnabled()` return `false`.
|
|
179
|
+
*
|
|
180
|
+
* @returns Whether the map spot is enabled.
|
|
181
|
+
*/
|
|
182
|
+
public SpotEnabled(): boolean;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @remarks
|
|
186
|
+
* Reads the level-map spot size. Use only for location types that define a level-map spot in `map_spots.xml`.
|
|
187
|
+
*
|
|
188
|
+
* @returns Spot size on the map.
|
|
189
|
+
*/
|
|
190
|
+
public SpotSize(): vector2;
|
|
191
|
+
}
|
|
192
|
+
}
|