xray16 1.4.0 → 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/package.json +1 -1
- package/types/xr_ai/xr_action.d.ts +1321 -29
- package/types/xr_ai/xr_alife.d.ts +1336 -32
- package/types/xr_ai/xr_enemy_evaluation.d.ts +112 -19
- package/types/xr_ai/xr_goap.d.ts +450 -3
- package/types/xr_ai/xr_graph.d.ts +94 -6
- package/types/xr_ai/xr_memory.d.ts +240 -6
- package/types/xr_lib/xr_animation.d.ts +185 -14
- package/types/xr_lib/xr_bitwise.d.ts +20 -8
- package/types/xr_lib/xr_color.d.ts +103 -6
- package/types/xr_lib/xr_debug.d.ts +110 -12
- package/types/xr_lib/xr_dialog.d.ts +99 -7
- package/types/xr_lib/xr_flags.d.ts +78 -15
- package/types/xr_lib/xr_fs.d.ts +395 -5
- package/types/xr_lib/xr_game.d.ts +101 -0
- package/types/xr_lib/xr_hit.d.ts +84 -0
- package/types/xr_lib/xr_ini.d.ts +60 -2
- package/types/xr_lib/xr_level.d.ts +182 -39
- package/types/xr_lib/xr_luabind.d.ts +37 -11
- package/types/xr_lib/xr_map.d.ts +137 -6
- package/types/xr_lib/xr_math.d.ts +56 -0
- package/types/xr_lib/xr_multiplayer.d.ts +729 -1
- package/types/xr_lib/xr_profile.d.ts +80 -0
- package/types/xr_lib/xr_properties.d.ts +159 -4
- package/types/xr_lib/xr_relation.d.ts +147 -0
- package/types/xr_lib/xr_render.d.ts +99 -3
- package/types/xr_lib/xr_save.d.ts +110 -4
- package/types/xr_lib/xr_sound.d.ts +373 -9
- package/types/xr_lib/xr_stats.ts +33 -4
- package/types/xr_lib/xr_task.d.ts +277 -0
- package/types/xr_lib/xr_time.d.ts +11 -0
- package/types/xr_object/client/xr_anomaly.d.ts +20 -0
- package/types/xr_object/client/xr_artefact.d.ts +57 -2
- package/types/xr_object/client/xr_client_object.d.ts +131 -0
- package/types/xr_object/client/xr_creature.d.ts +79 -0
- package/types/xr_object/client/xr_item.d.ts +108 -2
- package/types/xr_object/client/xr_level.d.ts +482 -14
- package/types/xr_object/client/xr_physic.d.ts +459 -29
- package/types/xr_object/client/xr_zone.d.ts +38 -0
- package/types/xr_object/script/xr_script_interface.d.ts +236 -1
- package/types/xr_object/script/xr_script_object.d.ts +3402 -82
- package/types/xr_object/script/xr_script_trade.d.ts +25 -15
- package/types/xr_object/server/xr_server_object.d.ts +707 -15
- package/types/xr_ui/xr_ui_asset.d.ts +241 -6
- package/types/xr_ui/xr_ui_core.d.ts +327 -9
- package/types/xr_ui/xr_ui_event.d.ts +1067 -1
- package/types/xr_ui/xr_ui_interface.d.ts +1563 -17
- package/types/xr_ui/xr_ui_menu.d.ts +259 -16
- package/types/xrf_plugin.d.ts +44 -14
package/types/xr_lib/xr_map.d.ts
CHANGED
|
@@ -1,61 +1,192 @@
|
|
|
1
1
|
declare module "xray16" {
|
|
2
2
|
/**
|
|
3
|
+
* Manages active PDA/minimap locations.
|
|
4
|
+
*
|
|
3
5
|
* @source C++ class CMapManager
|
|
4
6
|
* @customConstructor CMapManager
|
|
5
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.
|
|
6
12
|
*/
|
|
7
13
|
export class CMapManager {
|
|
14
|
+
/**
|
|
15
|
+
* Create a map manager wrapper.
|
|
16
|
+
*/
|
|
8
17
|
public constructor();
|
|
9
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
|
+
*/
|
|
10
28
|
public RemoveMapLocationByObjectID(id: u16): void;
|
|
11
29
|
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
*/
|
|
14
47
|
public DisableAllPointers(): void;
|
|
15
48
|
}
|
|
16
49
|
|
|
17
50
|
/**
|
|
51
|
+
* A single PDA/minimap spot attached to an object or user position.
|
|
52
|
+
*
|
|
18
53
|
* @source C++ class CMapLocation
|
|
19
54
|
* @customConstructor CMapLocation
|
|
20
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.
|
|
21
60
|
*/
|
|
22
61
|
export class CMapLocation {
|
|
23
|
-
|
|
24
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Engine-created map location.
|
|
64
|
+
*/
|
|
65
|
+
protected constructor();
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @returns Whether the map spot participates in UI collision.
|
|
69
|
+
*/
|
|
25
70
|
public Collidable(): boolean;
|
|
26
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Hide the off-screen pointer arrow.
|
|
74
|
+
*/
|
|
27
75
|
public DisablePointer(): void;
|
|
28
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Hide the map spot.
|
|
79
|
+
*/
|
|
29
80
|
public DisableSpot(): void;
|
|
30
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Show the off-screen pointer arrow.
|
|
84
|
+
*/
|
|
31
85
|
public EnablePointer(): void;
|
|
32
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Show the map spot.
|
|
89
|
+
*/
|
|
33
90
|
public EnableSpot(): void;
|
|
34
91
|
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
*/
|
|
37
106
|
public GetLastPosition(): vector2;
|
|
38
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
|
+
*/
|
|
39
114
|
public GetLevelName(): string;
|
|
40
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
|
+
*/
|
|
41
122
|
public GetPosition(): vector2;
|
|
42
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
|
+
*/
|
|
43
134
|
public HighlightSpot(state: boolean, color: fcolor): void;
|
|
44
135
|
|
|
136
|
+
/**
|
|
137
|
+
* @returns Whether a hint can be shown for the spot.
|
|
138
|
+
*/
|
|
45
139
|
public HintEnabled(): boolean;
|
|
46
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @returns Whether this is a user-created spot.
|
|
143
|
+
*/
|
|
47
144
|
public IsUserDefined(): boolean;
|
|
48
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @returns Object id this spot tracks.
|
|
148
|
+
*/
|
|
49
149
|
public ObjectID(): u16;
|
|
50
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
|
+
*/
|
|
51
157
|
public PointerEnabled(): boolean;
|
|
52
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
|
+
*/
|
|
53
167
|
public SetHint(hint: string): void;
|
|
54
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Mark the spot as user-created or engine-owned.
|
|
171
|
+
*
|
|
172
|
+
* @param state - User-defined flag.
|
|
173
|
+
*/
|
|
55
174
|
public SetUserDefinedFlag(state: boolean): void;
|
|
56
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @remarks
|
|
178
|
+
* Disabling a spot also makes `PointerEnabled()` return `false`.
|
|
179
|
+
*
|
|
180
|
+
* @returns Whether the map spot is enabled.
|
|
181
|
+
*/
|
|
57
182
|
public SpotEnabled(): boolean;
|
|
58
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
|
+
*/
|
|
59
190
|
public SpotSize(): vector2;
|
|
60
191
|
}
|
|
61
192
|
}
|
|
@@ -5,6 +5,9 @@ declare module "xray16" {
|
|
|
5
5
|
* @source C++ class Frect
|
|
6
6
|
* @customConstructor Frect
|
|
7
7
|
* @group xr_math
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Used by UI bindings for window and texture rectangles. `set()` mutates this rectangle.
|
|
8
11
|
*/
|
|
9
12
|
export class Frect extends EngineBinding {
|
|
10
13
|
/**
|
|
@@ -60,6 +63,9 @@ declare module "xray16" {
|
|
|
60
63
|
* @source C++ class Fbox
|
|
61
64
|
* @customConstructor Fbox
|
|
62
65
|
* @group xr_math
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* Bounds are stored as mutable `min` and `max` vectors.
|
|
63
69
|
*/
|
|
64
70
|
export class Fbox {
|
|
65
71
|
/**
|
|
@@ -103,6 +109,9 @@ declare module "xray16" {
|
|
|
103
109
|
* @source C++ class vector2
|
|
104
110
|
* @customConstructor vector2
|
|
105
111
|
* @group xr_math
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* `set()` mutates the receiver and returns it for chaining.
|
|
106
115
|
*/
|
|
107
116
|
export class vector2 {
|
|
108
117
|
/**
|
|
@@ -146,6 +155,9 @@ declare module "xray16" {
|
|
|
146
155
|
* @source C++ class XR_vector
|
|
147
156
|
* @customConstructor vector
|
|
148
157
|
* @group xr_math
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
* Use `set()` first when you need a known value; script-created native vectors expose their fields directly.
|
|
149
161
|
*/
|
|
150
162
|
export class vector {
|
|
151
163
|
/**
|
|
@@ -287,6 +299,9 @@ declare module "xray16" {
|
|
|
287
299
|
/**
|
|
288
300
|
* Divide every component by a scalar.
|
|
289
301
|
*
|
|
302
|
+
* @remarks
|
|
303
|
+
* The binding performs raw division. Pass a non-zero divisor.
|
|
304
|
+
*
|
|
290
305
|
* @param value - Scalar divisor.
|
|
291
306
|
* @returns This vector.
|
|
292
307
|
*/
|
|
@@ -295,6 +310,9 @@ declare module "xray16" {
|
|
|
295
310
|
/**
|
|
296
311
|
* Set this vector to component-wise `left / right`.
|
|
297
312
|
*
|
|
313
|
+
* @remarks
|
|
314
|
+
* The binding performs raw component division. Divisor components must be non-zero.
|
|
315
|
+
*
|
|
298
316
|
* @param left - Left vector.
|
|
299
317
|
* @param right - Right vector.
|
|
300
318
|
* @returns This vector.
|
|
@@ -304,6 +322,9 @@ declare module "xray16" {
|
|
|
304
322
|
/**
|
|
305
323
|
* Divide this vector component-wise by another vector.
|
|
306
324
|
*
|
|
325
|
+
* @remarks
|
|
326
|
+
* The binding performs raw component division. Divisor components must be non-zero.
|
|
327
|
+
*
|
|
307
328
|
* @param vector - Divisor vector.
|
|
308
329
|
* @returns This vector.
|
|
309
330
|
*/
|
|
@@ -312,6 +333,9 @@ declare module "xray16" {
|
|
|
312
333
|
/**
|
|
313
334
|
* Set this vector to `vector / value`.
|
|
314
335
|
*
|
|
336
|
+
* @remarks
|
|
337
|
+
* The binding performs raw division. Pass a non-zero divisor.
|
|
338
|
+
*
|
|
315
339
|
* @param vector - Source vector.
|
|
316
340
|
* @param value - Scalar divisor.
|
|
317
341
|
* @returns This vector.
|
|
@@ -329,6 +353,9 @@ declare module "xray16" {
|
|
|
329
353
|
/**
|
|
330
354
|
* Get heading angle for this direction vector.
|
|
331
355
|
*
|
|
356
|
+
* @remarks
|
|
357
|
+
* Intended for direction vectors. For arbitrary points, the result is just the angle of that vector from origin.
|
|
358
|
+
*
|
|
332
359
|
* @returns Heading angle in radians.
|
|
333
360
|
*/
|
|
334
361
|
public getH(): f32;
|
|
@@ -336,6 +363,9 @@ declare module "xray16" {
|
|
|
336
363
|
/**
|
|
337
364
|
* Get pitch angle for this direction vector.
|
|
338
365
|
*
|
|
366
|
+
* @remarks
|
|
367
|
+
* Intended for direction vectors. For arbitrary points, the result is just the angle of that vector from origin.
|
|
368
|
+
*
|
|
339
369
|
* @returns Pitch angle in radians.
|
|
340
370
|
*/
|
|
341
371
|
public getP(): f32;
|
|
@@ -490,6 +520,9 @@ declare module "xray16" {
|
|
|
490
520
|
/**
|
|
491
521
|
* Normalize this vector safely.
|
|
492
522
|
*
|
|
523
|
+
* @remarks
|
|
524
|
+
* The script binding routes `normalize()` through the same safe native path as `normalize_safe()`.
|
|
525
|
+
*
|
|
493
526
|
* @returns This vector.
|
|
494
527
|
*/
|
|
495
528
|
public normalize(): vector;
|
|
@@ -497,6 +530,9 @@ declare module "xray16" {
|
|
|
497
530
|
/**
|
|
498
531
|
* Set this vector to normalized source vector safely.
|
|
499
532
|
*
|
|
533
|
+
* @remarks
|
|
534
|
+
* The script binding routes `normalize(vector)` through the same safe native path as `normalize_safe(vector)`.
|
|
535
|
+
*
|
|
500
536
|
* @param vector - Source vector.
|
|
501
537
|
* @returns This vector.
|
|
502
538
|
*/
|
|
@@ -556,6 +592,9 @@ declare module "xray16" {
|
|
|
556
592
|
/**
|
|
557
593
|
* Change vector length while keeping direction.
|
|
558
594
|
*
|
|
595
|
+
* @remarks
|
|
596
|
+
* Use on a vector that already has a meaningful direction.
|
|
597
|
+
*
|
|
559
598
|
* @param value - New length.
|
|
560
599
|
* @returns This vector.
|
|
561
600
|
*/
|
|
@@ -620,6 +659,9 @@ declare module "xray16" {
|
|
|
620
659
|
* @source C++ class RPoint
|
|
621
660
|
* @customConstructor RPoint
|
|
622
661
|
* @group xr_math
|
|
662
|
+
*
|
|
663
|
+
* @remarks
|
|
664
|
+
* `P` stores position, `A` stores orientation data used by patrol graph points.
|
|
623
665
|
*/
|
|
624
666
|
export class RPoint {
|
|
625
667
|
/**
|
|
@@ -646,6 +688,10 @@ declare module "xray16" {
|
|
|
646
688
|
* @source C++ class matrix
|
|
647
689
|
* @customConstructor matrix
|
|
648
690
|
* @group xr_math
|
|
691
|
+
*
|
|
692
|
+
* @remarks
|
|
693
|
+
* Script-exposed mutators return this matrix for chaining. Call `identity()` or `set()` before composing transforms
|
|
694
|
+
* when you need a known starting value.
|
|
649
695
|
*/
|
|
650
696
|
export class matrix {
|
|
651
697
|
/**
|
|
@@ -724,6 +770,9 @@ declare module "xray16" {
|
|
|
724
770
|
/**
|
|
725
771
|
* Set this matrix to `value / divisor`.
|
|
726
772
|
*
|
|
773
|
+
* @remarks
|
|
774
|
+
* The binding performs raw scalar division. Pass a non-zero divisor.
|
|
775
|
+
*
|
|
727
776
|
* @param value - Source matrix.
|
|
728
777
|
* @param divisor - Scalar divisor.
|
|
729
778
|
* @returns This matrix.
|
|
@@ -733,6 +782,9 @@ declare module "xray16" {
|
|
|
733
782
|
/**
|
|
734
783
|
* Divide this matrix by a scalar.
|
|
735
784
|
*
|
|
785
|
+
* @remarks
|
|
786
|
+
* The binding performs raw scalar division. Pass a non-zero divisor.
|
|
787
|
+
*
|
|
736
788
|
* @param divisor - Scalar divisor.
|
|
737
789
|
* @returns This matrix.
|
|
738
790
|
*/
|
|
@@ -768,6 +820,10 @@ declare module "xray16" {
|
|
|
768
820
|
/**
|
|
769
821
|
* Get heading, pitch, and bank from this matrix.
|
|
770
822
|
*
|
|
823
|
+
* @remarks
|
|
824
|
+
* Native Lua uses pointer-style output parameters for `heading`, `pitch`, and `bank`; the declaration keeps the
|
|
825
|
+
* legacy shape for compatibility.
|
|
826
|
+
*
|
|
771
827
|
* @param value - Placeholder kept for existing declaration compatibility.
|
|
772
828
|
* @param heading - Heading output placeholder.
|
|
773
829
|
* @param pitch - Pitch output placeholder.
|