xray16 1.6.0 → 1.6.2

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 (53) hide show
  1. package/package.json +12 -6
  2. package/xray16.d.ts +30852 -0
  3. package/types/index.d.ts +0 -55
  4. package/types/internal.d.ts +0 -6
  5. package/types/xr_ai/xr_action.d.ts +0 -1803
  6. package/types/xr_ai/xr_alife.d.ts +0 -1872
  7. package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
  8. package/types/xr_ai/xr_goap.d.ts +0 -1118
  9. package/types/xr_ai/xr_graph.d.ts +0 -135
  10. package/types/xr_ai/xr_memory.d.ts +0 -384
  11. package/types/xr_lib/xr_animation.d.ts +0 -252
  12. package/types/xr_lib/xr_bitwise.d.ts +0 -44
  13. package/types/xr_lib/xr_color.d.ts +0 -142
  14. package/types/xr_lib/xr_debug.d.ts +0 -183
  15. package/types/xr_lib/xr_dialog.d.ts +0 -132
  16. package/types/xr_lib/xr_flags.d.ts +0 -592
  17. package/types/xr_lib/xr_fs.d.ts +0 -617
  18. package/types/xr_lib/xr_game.d.ts +0 -362
  19. package/types/xr_lib/xr_hit.d.ts +0 -127
  20. package/types/xr_lib/xr_ini.d.ts +0 -475
  21. package/types/xr_lib/xr_level.d.ts +0 -797
  22. package/types/xr_lib/xr_luabind.d.ts +0 -90
  23. package/types/xr_lib/xr_map.d.ts +0 -194
  24. package/types/xr_lib/xr_math.d.ts +0 -871
  25. package/types/xr_lib/xr_multiplayer.d.ts +0 -1081
  26. package/types/xr_lib/xr_profile.d.ts +0 -272
  27. package/types/xr_lib/xr_properties.d.ts +0 -612
  28. package/types/xr_lib/xr_relation.d.ts +0 -231
  29. package/types/xr_lib/xr_render.d.ts +0 -167
  30. package/types/xr_lib/xr_save.d.ts +0 -835
  31. package/types/xr_lib/xr_sound.d.ts +0 -517
  32. package/types/xr_lib/xr_stats.ts +0 -51
  33. package/types/xr_lib/xr_task.d.ts +0 -390
  34. package/types/xr_lib/xr_time.d.ts +0 -177
  35. package/types/xr_lib/xr_type.d.ts +0 -70
  36. package/types/xr_object/client/xr_anomaly.d.ts +0 -70
  37. package/types/xr_object/client/xr_artefact.d.ts +0 -153
  38. package/types/xr_object/client/xr_client_object.d.ts +0 -207
  39. package/types/xr_object/client/xr_creature.d.ts +0 -243
  40. package/types/xr_object/client/xr_item.d.ts +0 -370
  41. package/types/xr_object/client/xr_level.d.ts +0 -755
  42. package/types/xr_object/client/xr_physic.d.ts +0 -644
  43. package/types/xr_object/client/xr_zone.d.ts +0 -85
  44. package/types/xr_object/script/xr_script_interface.d.ts +0 -1142
  45. package/types/xr_object/script/xr_script_object.d.ts +0 -5702
  46. package/types/xr_object/script/xr_script_trade.d.ts +0 -51
  47. package/types/xr_object/server/xr_server_object.d.ts +0 -1488
  48. package/types/xr_ui/xr_ui_asset.d.ts +0 -364
  49. package/types/xr_ui/xr_ui_core.d.ts +0 -426
  50. package/types/xr_ui/xr_ui_event.d.ts +0 -1449
  51. package/types/xr_ui/xr_ui_interface.d.ts +0 -2449
  52. package/types/xr_ui/xr_ui_menu.d.ts +0 -401
  53. package/types/xrf_plugin.d.ts +0 -111
@@ -1,252 +0,0 @@
1
- declare module "xray16" {
2
- /**
3
- * Post-process double-vision offsets.
4
- *
5
- * @source C++ class duality
6
- * @customConstructor duality
7
- * @group xr_animation
8
- *
9
- * @remarks
10
- * These values are accumulated when several post-process effectors are active.
11
- */
12
- export class duality {
13
- /**
14
- * Vertical duality amount.
15
- */
16
- public v: f32;
17
-
18
- /**
19
- * Horizontal duality amount.
20
- */
21
- public h: f32;
22
-
23
- /**
24
- * Create zeroed duality settings.
25
- */
26
- public constructor();
27
-
28
- /**
29
- * Create duality settings with both offsets.
30
- *
31
- * @param h - Horizontal duality amount.
32
- * @param v - Vertical duality amount.
33
- */
34
- public constructor(h: f32, v: f32);
35
-
36
- /**
37
- * Set both duality values.
38
- *
39
- * @param h - Horizontal duality amount.
40
- * @param v - Vertical duality amount.
41
- * @returns This object for chained setup.
42
- */
43
- public set(h: f32, v: f32): duality;
44
- }
45
-
46
- /**
47
- * Post-process noise settings.
48
- *
49
- * @source C++ class noise
50
- * @customConstructor noise
51
- * @group xr_animation
52
- *
53
- * @remarks
54
- * Combined effectors keep the maximum intensity, grain, and FPS values.
55
- */
56
- export class noise {
57
- /**
58
- * Noise frame rate.
59
- */
60
- public fps: f32;
61
-
62
- /**
63
- * Noise grain size.
64
- */
65
- public grain: f32;
66
-
67
- /**
68
- * Noise intensity.
69
- */
70
- public intensity: f32;
71
-
72
- /**
73
- * Create default noise settings.
74
- *
75
- * @remarks
76
- * Defaults are intensity 0, grain 1, and 10 FPS.
77
- */
78
- public constructor();
79
-
80
- /**
81
- * Create noise settings with all values.
82
- *
83
- * @param intensity - Noise intensity.
84
- * @param grain - Noise grain size.
85
- * @param fps - Noise frame rate.
86
- */
87
- public constructor(intensity: f32, grain: f32, fps: f32);
88
-
89
- /**
90
- * Set all noise values.
91
- *
92
- * @param intensity - Noise intensity.
93
- * @param grain - Noise grain size.
94
- * @param fps - Noise frame rate.
95
- * @returns This object for chained setup.
96
- */
97
- public set(intensity: f32, grain: f32, fps: f32): noise;
98
- }
99
-
100
- /**
101
- * Script-controlled post-process effector.
102
- *
103
- * @source C++ class effector
104
- * @customConstructor effector
105
- * @group xr_animation
106
- *
107
- * @remarks
108
- * Subclass it from script and override {@link process}. The effector is tied to the actor camera stack.
109
- */
110
- export class effector extends EngineBinding {
111
- /**
112
- * @remarks
113
- * Use a stable custom type id. {@link finish} removes the active effector by this type.
114
- *
115
- * @param type - Unique post-process effector type id.
116
- * @param time - Effector lifetime in seconds.
117
- */
118
- public constructor(type: i32, time: f32);
119
-
120
- /**
121
- * Add the effector to the actor camera stack.
122
- *
123
- * @remarks
124
- * Requires an active actor. This is intended for in-game actor post-processing, not menu/editor code.
125
- */
126
- public start(): void;
127
-
128
- /**
129
- * Update post-process parameters for the current frame.
130
- *
131
- * @remarks
132
- * Override this in script. Mutate `params` for the current frame and return `false` to stop the effector.
133
- *
134
- * @param params - Mutable post-process parameters.
135
- * @returns Whether the effector should continue running.
136
- */
137
- public process(params: effector_params): boolean;
138
-
139
- /**
140
- * Remove the effector from the actor camera stack.
141
- *
142
- * @remarks
143
- * Removes by effector type, so sharing a type id with another active effector can remove the wrong effect.
144
- */
145
- public finish(): void;
146
- }
147
-
148
- /**
149
- * Mutable post-process state passed to effectors.
150
- *
151
- * @source C++ class effector_params
152
- * @customConstructor effector_params
153
- * @group xr_animation
154
- *
155
- * @remarks
156
- * Defaults match the neutral post-process state: no blur, gray, duality, or noise intensity.
157
- */
158
- export class effector_params extends EngineBinding {
159
- /**
160
- * Additive color applied over the frame.
161
- */
162
- public color_add: color;
163
-
164
- /**
165
- * Base color tint.
166
- */
167
- public color_base: color;
168
-
169
- /**
170
- * Grayscale color tint.
171
- */
172
- public color_gray: color;
173
-
174
- /**
175
- * Double-vision settings.
176
- */
177
- public dual: duality;
178
-
179
- /**
180
- * Blur amount.
181
- */
182
- public blur: f32;
183
-
184
- /**
185
- * Grayscale amount.
186
- */
187
- public gray: f32;
188
-
189
- /**
190
- * Noise settings.
191
- */
192
- public noise: noise;
193
-
194
- /**
195
- * Create default post-process parameters.
196
- */
197
- public constructor();
198
-
199
- /**
200
- * Copy all post-process values from another params object.
201
- *
202
- * @remarks
203
- * Copies the current values. Later changes to `params` are not linked back to this object.
204
- *
205
- * @param params - Source values.
206
- */
207
- public assign(params: effector_params): void;
208
- }
209
-
210
- /**
211
- * Evaluate a color animation by time.
212
- *
213
- * @source C++ class color_animator
214
- * @customConstructor color_animator
215
- * @group xr_animation
216
- *
217
- * @remarks
218
- * Animations are looked up in the loaded light-animation library (`lanims.xr`).
219
- */
220
- export class color_animator extends EngineBinding {
221
- /**
222
- * @param name - Color animation name.
223
- */
224
- public constructor(name: string);
225
-
226
- /**
227
- * @returns Animation length in milliseconds.
228
- */
229
- public length(): u32;
230
-
231
- /**
232
- * Load another color animation.
233
- *
234
- * @remarks
235
- * The native binding asserts when the animation name is missing or unknown.
236
- *
237
- * @param name - Color animation name.
238
- */
239
- public load(name: string): void;
240
-
241
- /**
242
- * Sample the animation.
243
- *
244
- * @remarks
245
- * Time wraps over the animation length.
246
- *
247
- * @param time - Animation time in seconds.
248
- * @returns Color at the requested time.
249
- */
250
- public calculate(time: f32): fcolor;
251
- }
252
- }
@@ -1,44 +0,0 @@
1
- declare module "xray16" {
2
- /**
3
- * Apply bitwise AND to two signed integers.
4
- *
5
- * @group xr_bitwise
6
- *
7
- * @param left - Left operand.
8
- * @param right - Right operand.
9
- * @returns Result of `left & right`.
10
- */
11
- export function bit_and(this: void, left: i32, right: i32): i32;
12
-
13
- /**
14
- * Apply bitwise OR to two signed integers.
15
- *
16
- * @group xr_bitwise
17
- *
18
- * @param left - Left operand.
19
- * @param right - Right operand.
20
- * @returns Result of `left | right`.
21
- */
22
- export function bit_or(this: void, left: i32, right: i32): i32;
23
-
24
- /**
25
- * Invert all bits in a signed integer.
26
- *
27
- * @group xr_bitwise
28
- *
29
- * @param value - Value to invert.
30
- * @returns Result of `~value`.
31
- */
32
- export function bit_not(this: void, value: i32): i32;
33
-
34
- /**
35
- * Apply bitwise XOR to two signed integers.
36
- *
37
- * @group xr_bitwise
38
- *
39
- * @param left - Left operand.
40
- * @param right - Right operand.
41
- * @returns Result of `left ^ right`.
42
- */
43
- export function bit_xor(this: void, left: i32, right: i32): i32;
44
- }
@@ -1,142 +0,0 @@
1
- declare module "xray16" {
2
- /**
3
- * Mutable RGBA color with float components.
4
- *
5
- * Components are exposed as `r`, `g`, `b`, and `a`.
6
- *
7
- * @source C++ class fcolor
8
- * @customConstructor fcolor
9
- * @group xr_color
10
- *
11
- * @remarks
12
- * Float components are normally used in the `0..1` range. `set()` mutates this color and returns it.
13
- */
14
- export class fcolor extends EngineBinding {
15
- /**
16
- * Alpha component.
17
- */
18
- public a: f32;
19
-
20
- /**
21
- * Blue component.
22
- */
23
- public b: f32;
24
-
25
- /**
26
- * Green component.
27
- */
28
- public g: f32;
29
-
30
- /**
31
- * Red component.
32
- */
33
- public r: f32;
34
-
35
- /**
36
- * Create an empty color.
37
- *
38
- * @remarks
39
- * Call `set()` before reading components when you need a known value.
40
- */
41
- public constructor();
42
-
43
- /**
44
- * Set RGBA components.
45
- *
46
- * @param r - Red component.
47
- * @param g - Green component.
48
- * @param b - Blue component.
49
- * @param a - Alpha component.
50
- * @returns This color.
51
- */
52
- public set(r: f32, g: f32, b: f32, a: f32): fcolor;
53
-
54
- /**
55
- * Copy another float color.
56
- *
57
- * @param color - Source color.
58
- * @returns This color.
59
- */
60
- public set(color: fcolor): fcolor;
61
-
62
- /**
63
- * Decode packed ARGB color into float components.
64
- *
65
- * @remarks
66
- * Channels are decoded from 8-bit ARGB into normalized float components.
67
- *
68
- * @param value - Packed ARGB value.
69
- * @returns This color.
70
- */
71
- public set(value: u32): fcolor;
72
- }
73
-
74
- /**
75
- * Mutable RGB color with float components.
76
- *
77
- * @source C++ class color
78
- * @customConstructor color
79
- * @group xr_color
80
- *
81
- * @remarks
82
- * This is the postprocess RGB color helper used by effector parameters. It has no alpha channel.
83
- */
84
- export class color {
85
- /**
86
- * Blue component.
87
- */
88
- public b: f32;
89
-
90
- /**
91
- * Green component.
92
- */
93
- public g: f32;
94
-
95
- /**
96
- * Red component.
97
- */
98
- public r: f32;
99
-
100
- /**
101
- * Create a black color.
102
- *
103
- * @remarks
104
- * Use the RGB constructor or `set()` when you need explicit component values.
105
- */
106
- public constructor();
107
-
108
- /**
109
- * Create color from RGB components.
110
- *
111
- * @param r - Red component.
112
- * @param g - Green component.
113
- * @param b - Blue component.
114
- */
115
- public constructor(r: f32, g: f32, b: f32);
116
-
117
- /**
118
- * Set RGB components.
119
- *
120
- * @param r - Red component.
121
- * @param g - Green component.
122
- * @param b - Blue component.
123
- */
124
- public set(r: f32, g: f32, b: f32): void;
125
- }
126
-
127
- /**
128
- * Pack alpha, red, green, and blue channels into an engine color value.
129
- *
130
- * @group xr_color
131
- *
132
- * @remarks
133
- * Channels are packed as 8-bit ARGB. Values outside `0..255` keep only their low 8 bits.
134
- *
135
- * @param a - Alpha channel.
136
- * @param r - Red channel.
137
- * @param g - Green channel.
138
- * @param b - Blue channel.
139
- * @returns Packed ARGB color.
140
- */
141
- export function GetARGB(this: void, a: u16, r: u16, g: u16, b: u16): i32;
142
- }
@@ -1,183 +0,0 @@
1
- import type { Nullable } from "../internal";
2
-
3
- declare module "xray16" {
4
- /**
5
- * Engine console interface.
6
- *
7
- * @source C++ class CConsole
8
- * @customConstructor CConsole
9
- * @group xr_debug
10
- *
11
- * @remarks
12
- * Use `get_console()` to access the engine-owned console. Scripts do not create console instances.
13
- */
14
- export class CConsole extends EngineBinding {
15
- /**
16
- * Engine-owned console singleton.
17
- */
18
- private constructor();
19
-
20
- /**
21
- * Execute console command immediately.
22
- *
23
- * @remarks
24
- * Executes without adding the command to console history.
25
- *
26
- * @param command - Console command.
27
- */
28
- public execute(command: string): void;
29
-
30
- /**
31
- * Queue console command for deferred execution.
32
- *
33
- * @remarks
34
- * Schedules a `KERNEL:console` event, so the command runs later on the engine event queue.
35
- *
36
- * @param command - Console command.
37
- */
38
- public execute_deferred(command: string): void;
39
-
40
- /**
41
- * Execute a config file through the console.
42
- *
43
- * @remarks
44
- * The binding prepends `cfg_load` to the provided path.
45
- *
46
- * @param script - Config file path.
47
- */
48
- public execute_script(script: string): void;
49
-
50
- /**
51
- * Show the console window.
52
- */
53
- public show(): void;
54
-
55
- /**
56
- * Hide the console window.
57
- */
58
- public hide(): void;
59
-
60
- /**
61
- * Read console variable as boolean.
62
- *
63
- * @remarks
64
- * Returns `false` when the command is missing or is not a boolean-compatible mask/integer command.
65
- *
66
- * @param key - Console variable name.
67
- * @returns Boolean value.
68
- */
69
- public get_bool(key: string): boolean;
70
-
71
- /**
72
- * Read console variable as float.
73
- *
74
- * @remarks
75
- * Returns `0` when the command is missing or is not a float command.
76
- *
77
- * @param key - Console variable name.
78
- * @returns Float value.
79
- */
80
- public get_float(key: string): f32;
81
-
82
- /**
83
- * Read console variable as integer.
84
- *
85
- * @remarks
86
- * Mask commands are returned as `0` or `1`. Missing or incompatible commands return `0`.
87
- *
88
- * @param key - Console variable name.
89
- * @returns Integer value.
90
- */
91
- public get_integer(key: string): i32;
92
-
93
- /**
94
- * Read console variable as string.
95
- *
96
- * @remarks
97
- * Returns `null` when the command does not exist.
98
- *
99
- * @param key - Console variable name.
100
- * @returns String value.
101
- */
102
- public get_string(key: string): Nullable<string>;
103
-
104
- /**
105
- * Read console variable token text.
106
- *
107
- * @remarks
108
- * Uses the same engine path as `get_string`, so missing commands return `null`.
109
- *
110
- * @param key - Console variable name.
111
- * @returns Token text.
112
- */
113
- public get_token(key: string): Nullable<string>;
114
- }
115
-
116
- /**
117
- * Log a message through the script log channel.
118
- *
119
- * @group xr_debug
120
- *
121
- * @remarks
122
- * In non-master builds the message is sent to `CScriptEngine::script_log`.
123
- *
124
- * @param text - Message to print.
125
- */
126
- export function log(this: void, text: string): void;
127
-
128
- /**
129
- * Log an error message and print the current script stack.
130
- *
131
- * @group xr_debug
132
- *
133
- * @remarks
134
- * The C++ binding asserts after logging the message.
135
- *
136
- * @param text - Error message.
137
- */
138
- export function error_log(this: void, text: string): void;
139
-
140
- /**
141
- * Print the current script stack to the log.
142
- *
143
- * @group xr_debug
144
- */
145
- export function print_stack(this: void): void;
146
-
147
- /**
148
- * Flush pending script log output in debug builds.
149
- *
150
- * @group xr_debug
151
- */
152
- export function flush(this: void): void;
153
-
154
- /**
155
- * Get console object reference.
156
- *
157
- * @group xr_debug
158
- *
159
- * @remarks
160
- * Returns the global engine console pointer.
161
- *
162
- * @returns Console object reference.
163
- */
164
- export function get_console(this: void): CConsole;
165
-
166
- /**
167
- * Get process command-line parameters.
168
- *
169
- * @group xr_debug
170
- *
171
- * @returns Engine command-line string.
172
- */
173
- export function command_line(this: void): string;
174
-
175
- /**
176
- * Load and compile a script before continuing execution.
177
- *
178
- * @group xr_global_declaration
179
- *
180
- * @param path - Script file path.
181
- */
182
- export function prefetch(this: void, path: string): void;
183
- }