xray16 1.0.7 → 1.0.9
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/README.md +4 -1
- package/package.json +4 -3
- package/types/index.d.ts +46 -22
- package/types/{xr_object → xr_ai}/xr_action.d.ts +163 -135
- package/types/xr_ai/xr_alife.d.ts +552 -0
- package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -0
- package/types/xr_ai/xr_goap.d.ts +668 -0
- package/types/xr_ai/xr_graph.d.ts +47 -0
- package/types/xr_ai/xr_memory.d.ts +148 -0
- package/types/xr_lib/xr_animation.d.ts +81 -0
- package/types/xr_lib/xr_bitwise.d.ts +21 -0
- package/types/xr_lib/xr_color.d.ts +40 -0
- package/types/xr_lib/xr_debug.d.ts +100 -0
- package/types/{xr_object → xr_lib}/xr_dialog.d.ts +7 -1
- package/types/xr_lib/xr_flags.d.ts +148 -0
- package/types/xr_lib/xr_fs.d.ts +37 -233
- package/types/xr_lib/xr_game.d.ts +159 -0
- package/types/xr_lib/xr_hit.d.ts +41 -0
- package/types/xr_lib/xr_ini.d.ts +176 -0
- package/types/xr_lib/xr_level.d.ts +225 -0
- package/types/xr_lib/xr_luabind.d.ts +59 -0
- package/types/{xr_map → xr_lib}/xr_map.d.ts +19 -0
- package/types/xr_lib/xr_math.d.ts +65 -0
- package/types/{xr_online → xr_lib}/xr_multiplayer.d.ts +52 -0
- package/types/xr_lib/xr_properties.d.ts +166 -0
- package/types/xr_lib/xr_relation.d.ts +84 -0
- package/types/xr_lib/xr_render.d.ts +70 -0
- package/types/xr_lib/xr_save.d.ts +223 -0
- package/types/{xr_sound → xr_lib}/xr_sound.d.ts +10 -12
- package/types/xr_lib/xr_stats.ts +20 -0
- package/types/{xr_object/xr_quest.d.ts → xr_lib/xr_task.d.ts} +54 -2
- package/types/xr_lib/xr_time.d.ts +61 -0
- package/types/{xr_type → xr_lib}/xr_type.d.ts +18 -13
- package/types/xr_object/client/xr_client_object.d.ts +76 -0
- package/types/xr_object/{xr_level.d.ts → client/xr_level.d.ts} +69 -0
- package/types/xr_object/{xr_physic.d.ts → client/xr_physic.d.ts} +58 -0
- package/types/xr_object/client/xr_zone.d.ts +40 -0
- package/types/xr_object/script/xr_script_interface.d.ts +429 -0
- package/types/xr_object/{xr_client_object.d.ts → script/xr_script_object.d.ts} +425 -518
- package/types/xr_object/script/xr_script_trade.d.ts +26 -0
- package/types/xr_object/{xr_server_object.d.ts → server/xr_server_object.d.ts} +151 -72
- package/types/xr_ui/xr_ui_asset.d.ts +123 -0
- package/types/xr_ui/xr_ui_core.d.ts +33 -123
- package/types/xr_ui/xr_ui_event.d.ts +382 -0
- package/types/xr_ui/xr_ui_interface.d.ts +213 -0
- package/types/xr_ui/xr_ui_menu.d.ts +142 -0
- package/types/xr_constant.d.ts +0 -996
- package/types/xr_core.d.ts +0 -347
- package/types/xr_global.d.ts +0 -663
- package/types/xr_lib/xr_utils.d.ts +0 -412
- package/types/xr_luabind.d.ts +0 -34
- package/types/xr_object/xr_alife.d.ts +0 -213
- package/types/xr_type/xr_enums.d.ts +0 -17
- package/types/xr_ui/README.md +0 -277
- package/types/xr_ui/demo/CServerList.png +0 -0
- package/types/xr_ui/demo/CUI3tButton.png +0 -0
- package/types/xr_ui/demo/CUICheckButton.png +0 -0
- package/types/xr_ui/demo/CUIComboBox.png +0 -0
- package/types/xr_ui/demo/CUICustomEdit.png +0 -0
- package/types/xr_ui/demo/CUIStatic.png +0 -0
- package/types/xr_ui/demo/CUITrackBar.png +0 -0
- /package/types/xr_object/{xr_anomaly.d.ts → client/xr_anomaly.d.ts} +0 -0
- /package/types/xr_object/{xr_artefact.d.ts → client/xr_artefact.d.ts} +0 -0
- /package/types/xr_object/{xr_creature.d.ts → client/xr_creature.d.ts} +0 -0
- /package/types/xr_object/{xr_item.d.ts → client/xr_item.d.ts} +0 -0
package/types/xr_lib/xr_fs.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ declare module "xray16" {
|
|
|
6
6
|
*/
|
|
7
7
|
export class FS_file_list {
|
|
8
8
|
public Free(): void;
|
|
9
|
+
|
|
9
10
|
public GetAt(number: u32): FS_item;
|
|
11
|
+
|
|
10
12
|
public Size(): u32;
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -17,7 +19,9 @@ declare module "xray16" {
|
|
|
17
19
|
*/
|
|
18
20
|
export class FS_file_list_ex {
|
|
19
21
|
public Sort(number: u32): void;
|
|
22
|
+
|
|
20
23
|
public GetAt(index: u32): FS_item;
|
|
24
|
+
|
|
21
25
|
public Size(): u32;
|
|
22
26
|
}
|
|
23
27
|
|
|
@@ -28,24 +32,14 @@ declare module "xray16" {
|
|
|
28
32
|
*/
|
|
29
33
|
export class FS_item {
|
|
30
34
|
public Modif(): string;
|
|
35
|
+
|
|
31
36
|
public NameFull(): string;
|
|
37
|
+
|
|
32
38
|
public NameShort(): string;
|
|
33
|
-
public ModifDigitOnly(): string;
|
|
34
|
-
public Size(): u32;
|
|
35
|
-
}
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
* @source C++ class CSavedGameWrapper
|
|
39
|
-
* @customConstructor CSavedGameWrapper
|
|
40
|
-
* @group xr_fs
|
|
41
|
-
*/
|
|
42
|
-
export class CSavedGameWrapper extends EngineBinding {
|
|
43
|
-
public constructor(name: string);
|
|
40
|
+
public ModifDigitOnly(): string;
|
|
44
41
|
|
|
45
|
-
public
|
|
46
|
-
public level_id(): u8;
|
|
47
|
-
public game_time(): CTime;
|
|
48
|
-
public actor_health(): f32;
|
|
42
|
+
public Size(): u32;
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
/**
|
|
@@ -79,34 +73,58 @@ declare module "xray16" {
|
|
|
79
73
|
public static FS_sort_by_size_up: 2;
|
|
80
74
|
|
|
81
75
|
public append_path(a: string, b: string, c: string, d: number): unknown /* FS_Path */;
|
|
76
|
+
|
|
82
77
|
public dir_delete(fs: FS, a: string, b: string, c: number): void;
|
|
78
|
+
|
|
83
79
|
public dir_delete(fs: FS, a: string, c: number): void;
|
|
80
|
+
|
|
84
81
|
public exist(folderAlias: string, filename: string, fs_type: TXR_fs_type): i32 | null;
|
|
82
|
+
|
|
85
83
|
public exist(folderAlias: string, filename: string): i32 | null;
|
|
84
|
+
|
|
86
85
|
public exist(path: string): i32 | null;
|
|
86
|
+
|
|
87
87
|
public file_copy(a: string, b: string): void;
|
|
88
|
+
|
|
88
89
|
public file_length(a: string): i32;
|
|
90
|
+
|
|
89
91
|
public file_list_open(a: string, b: string, c: u32): FS_file_list;
|
|
92
|
+
|
|
90
93
|
public file_list_open(a: string, b: u32): FS_file_list;
|
|
94
|
+
|
|
91
95
|
public file_list_open_ex(a: string, b: u32, c: string): FS_file_list_ex;
|
|
96
|
+
|
|
92
97
|
public file_rename(a: string, b: string, c: boolean): void;
|
|
98
|
+
|
|
93
99
|
public get_file_age(a: string): u32;
|
|
100
|
+
|
|
94
101
|
public get_file_age_str(fs: FS, a: string): u32;
|
|
102
|
+
|
|
95
103
|
public path_exist(a: string): boolean;
|
|
104
|
+
|
|
96
105
|
public r_close(reader: reader): void;
|
|
106
|
+
|
|
97
107
|
public r_open(a: string): reader;
|
|
108
|
+
|
|
98
109
|
public r_open(a: string, b: string): reader;
|
|
110
|
+
|
|
99
111
|
public update_path(alias: string, addition: string): string;
|
|
112
|
+
|
|
100
113
|
public w_close(writer: unknown /* IWriter */): void;
|
|
114
|
+
|
|
101
115
|
public rescan_path(path: string): void;
|
|
102
116
|
|
|
103
117
|
/**
|
|
104
118
|
* Not registered in LUA, will throw.
|
|
105
119
|
*/
|
|
106
120
|
public get_path(alias: string): unknown;
|
|
121
|
+
|
|
107
122
|
public file_delete(a: string, b: string): void;
|
|
123
|
+
|
|
108
124
|
public file_delete(fs: string): void;
|
|
125
|
+
|
|
109
126
|
public w_open(a: string, b: string): unknown /* IWriter */;
|
|
127
|
+
|
|
110
128
|
public w_open(a: string): unknown /* IWriter */;
|
|
111
129
|
}
|
|
112
130
|
|
|
@@ -116,229 +134,15 @@ declare module "xray16" {
|
|
|
116
134
|
export type TXR_fs_type = EnumeratedStaticsValues<typeof FS>;
|
|
117
135
|
|
|
118
136
|
/**
|
|
119
|
-
* @source C++ class ini_file
|
|
120
|
-
* @customConstructor ini_file
|
|
121
|
-
* @group xr_fs
|
|
122
|
-
*/
|
|
123
|
-
export class ini_file {
|
|
124
|
-
public constructor();
|
|
125
|
-
/**
|
|
126
|
-
* Create ini file representation based on file name.
|
|
127
|
-
* Full path is limited to 520 chars.
|
|
128
|
-
*
|
|
129
|
-
* @param path - file name and relative path to gamedata configs folder
|
|
130
|
-
*/
|
|
131
|
-
public constructor(path: string);
|
|
132
|
-
/**
|
|
133
|
-
* Create ini file representation based on file name.
|
|
134
|
-
* Full path is limited to 520 chars.
|
|
135
|
-
*
|
|
136
|
-
* @param initial - base to count relative path from, `$game_data$` is an example
|
|
137
|
-
* @param path - file name and relative path from initial entrypoint
|
|
138
|
-
*/
|
|
139
|
-
public constructor(initial: string, path: string);
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* @param section - target section to check lines count
|
|
143
|
-
* @returns count of lines for provided section
|
|
144
|
-
*/
|
|
145
|
-
public line_count(section: string): u32;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @returns sections count for ini file
|
|
149
|
-
*/
|
|
150
|
-
public section_count(): u32;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Remove ini file section field.
|
|
154
|
-
*
|
|
155
|
-
* @param section - target section to modify
|
|
156
|
-
* @param field - target section field to remove
|
|
157
|
-
*/
|
|
158
|
-
public remove_line(section: string, field: string): void;
|
|
159
|
-
|
|
160
|
-
public r_bool(section: string, field: string): boolean;
|
|
161
|
-
public section_exist(section: string | null): boolean;
|
|
162
|
-
public r_float(section: string, field: string): f32;
|
|
163
|
-
public r_clsid(section: string, field: string): i32;
|
|
164
|
-
public r_s32(section: string, field: string): i32;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Read text line from ini config file.
|
|
168
|
-
*
|
|
169
|
-
* @returns tuple with three elements, where first is success status, second is key, third is value.
|
|
170
|
-
*/
|
|
171
|
-
public r_line<T extends string = string, P extends string = string>(
|
|
172
|
-
section: string,
|
|
173
|
-
line_number: i32,
|
|
174
|
-
c: string,
|
|
175
|
-
d: string
|
|
176
|
-
): LuaMultiReturn<[boolean, T, P]>;
|
|
177
|
-
public r_token(section: string, field: string, list: token_list): i32;
|
|
178
|
-
public r_vector(section: string, field: string): vector;
|
|
179
|
-
public r_u32(section: string, field: string): u32;
|
|
180
|
-
public r_string_wq(section: string, field: string): string;
|
|
181
|
-
public r_string(section: string, field: string): string;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @param section - target section to check
|
|
185
|
-
* @param field - section field to check
|
|
186
|
-
* @returns whether line exists
|
|
187
|
-
*/
|
|
188
|
-
public line_exist(section: string | null, field: string): boolean;
|
|
189
|
-
|
|
190
|
-
public w_fvector2(section: string, field: string, vector: vector2, comment?: string): void;
|
|
191
|
-
public w_fvector3(section: string, field: string, vector: vector, comment?: string): void;
|
|
192
|
-
public w_fvector4(section: string, field: string, vector: never, comment?: string): void; // struct _vector4<float>
|
|
193
|
-
public w_fcolor(section: string, field: string, color: fcolor, comment?: string): void;
|
|
194
|
-
public w_color(section: string, field: string, color: u32, comment?: string): void;
|
|
195
|
-
|
|
196
|
-
public w_bool(section: string, field: string, bool: boolean, comment?: string): void;
|
|
197
|
-
public w_s8(section: string, field: string, uchar: u8, comment?: string): void;
|
|
198
|
-
public w_u8(section: string, field: string, uchar: u8, comment?: string): void;
|
|
199
|
-
public w_s16(section: string, field: string, sshort: i16, comment?: string): void;
|
|
200
|
-
public w_u16(section: string, field: string, ushort: u16, comment?: string): void;
|
|
201
|
-
public w_s32(section: string, field: string, sint: i32, comment?: string): void;
|
|
202
|
-
public w_u32(section: string, field: string, uint: u32, comment?: string): void;
|
|
203
|
-
public w_s64(section: string, field: string, sint: i64, comment?: string): void;
|
|
204
|
-
public w_u64(section: string, field: string, uint: u64, comment?: string): void;
|
|
205
|
-
public w_float(section: string, field: string, float: f32, comment?: string): void;
|
|
206
|
-
public w_string(section: string, field: string, string: string, comment?: string): void;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Get file name and path of ini file.
|
|
210
|
-
*
|
|
211
|
-
* @example `f:\applications\steam\steamapps\common\stalker call of pripyat\gamedata\configs\misc\task_manager.ltx`
|
|
212
|
-
*
|
|
213
|
-
* @returns full path to ini file
|
|
214
|
-
*/
|
|
215
|
-
public fname(): string;
|
|
216
|
-
public set_readonly(is_readonly: boolean): void;
|
|
217
|
-
public set_override_names(override: boolean): void;
|
|
218
|
-
public save_as(path: string): boolean;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Adjust saving on file closing/destructor calls.
|
|
222
|
-
*
|
|
223
|
-
* @param should_save - whether ini file should be saved when destructor is called
|
|
224
|
-
*/
|
|
225
|
-
public save_at_end(should_save: boolean): void;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Iterate over ini file sections.
|
|
229
|
-
* Calls provided callback for each ini section in file.
|
|
230
|
-
*
|
|
231
|
-
* @param cb - callback to call on each ini file section, where name is section name
|
|
232
|
-
*/
|
|
233
|
-
public section_for_each(cb: (this: void, name: string) => void): void;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* @source C++ class net_packet
|
|
238
|
-
* @customConstructor net_packet
|
|
239
137
|
* @group xr_fs
|
|
240
138
|
*/
|
|
241
|
-
export
|
|
242
|
-
public r_advance(value: u32): void;
|
|
243
|
-
public r_angle16(value: f32): void;
|
|
244
|
-
public r_angle8(value: f32): void;
|
|
245
|
-
public r_begin(value: u16): u32;
|
|
246
|
-
public r_bool(): boolean;
|
|
247
|
-
public r_clientID(): ClientID;
|
|
248
|
-
public r_dir(vector: vector): void;
|
|
249
|
-
public r_elapsed(): u32;
|
|
250
|
-
public r_eof(): boolean;
|
|
251
|
-
public r_float(): f32;
|
|
252
|
-
public r_float(value: f32): f32;
|
|
253
|
-
public r_float_q16(value1: f32, value2: f32, value3: f32): f32;
|
|
254
|
-
public r_float_q8(value1: f32, value2: f32, value3: f32): f32;
|
|
255
|
-
public r_matrix(matrix: matrix): matrix;
|
|
256
|
-
public r_s16(): i16;
|
|
257
|
-
public r_s16(value: u16): u16;
|
|
258
|
-
public r_s32(): i32;
|
|
259
|
-
public r_s32(value: i32): i32;
|
|
260
|
-
public r_s64(): i64;
|
|
261
|
-
public r_s64(value: i64): i64;
|
|
262
|
-
public r_s8(): i8;
|
|
263
|
-
public r_s8(value: i8): i8;
|
|
264
|
-
public r_sdir(vector: vector): void;
|
|
265
|
-
public r_seek(value: u32): void;
|
|
266
|
-
public r_stringZ<T extends string>(): T;
|
|
267
|
-
public r_tell(): u32;
|
|
268
|
-
public r_u16(): u16;
|
|
269
|
-
public r_u16(value: u16): u16;
|
|
270
|
-
public r_u32(): u32;
|
|
271
|
-
public r_u32(value: u32): u32;
|
|
272
|
-
public r_u64(): u64;
|
|
273
|
-
public r_u64(value: u64): u64;
|
|
274
|
-
public r_u8(): u8;
|
|
275
|
-
public r_u8(value: u8): u8;
|
|
276
|
-
public r_vec3(vector: vector): void;
|
|
277
|
-
public w_angle16(value: f32): void;
|
|
278
|
-
public w_angle8(value: f32): void;
|
|
279
|
-
public w_begin(value: u16): void;
|
|
280
|
-
public w_bool(value: boolean): void;
|
|
281
|
-
public w_chunk_close16(value: u32): void;
|
|
282
|
-
public w_chunk_close8(value: u32): void;
|
|
283
|
-
public w_chunk_open16(value: u32): void;
|
|
284
|
-
public w_chunk_open8(value: u32): void;
|
|
285
|
-
public w_clientID(ClientID: ClientID): void;
|
|
286
|
-
public w_dir(vector: vector): void;
|
|
287
|
-
public w_float(value: f32): void;
|
|
288
|
-
public w_float_q16(value1: f32, value2: f32, value3: f32): void;
|
|
289
|
-
public w_float_q8(value1: f32, value2: f32, value3: f32): void;
|
|
290
|
-
public w_matrix(matrix: matrix): void;
|
|
291
|
-
public w_s16(value: i16): void;
|
|
292
|
-
public w_s32(value: i32): void;
|
|
293
|
-
public w_s64(value: i64): void;
|
|
294
|
-
public w_sdir(vector: vector): void;
|
|
295
|
-
public w_stringZ(value: string | null): void;
|
|
296
|
-
public w_tell(): u32;
|
|
297
|
-
public w_u16(value: u16): void;
|
|
298
|
-
public w_u32(value: u32): void;
|
|
299
|
-
public w_u64(value: u64): void;
|
|
300
|
-
public w_u8(value: u8): void;
|
|
301
|
-
public w_vec3(vector: vector): void;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* @source C++ class reader
|
|
306
|
-
* @customConstructor reader
|
|
307
|
-
* @group xr_fs
|
|
308
|
-
*/
|
|
309
|
-
export class reader {
|
|
310
|
-
public r_advance(value: u64): void;
|
|
311
|
-
public r_elapsed(): i64;
|
|
312
|
-
public r_eof(): boolean;
|
|
313
|
-
public r_sdir(vector: vector): void;
|
|
314
|
-
public r_seek(value: u64): void;
|
|
315
|
-
public r_tell(): u64;
|
|
316
|
-
|
|
317
|
-
public r_dir(vector: vector): void;
|
|
318
|
-
public r_vec3(vector: vector): void;
|
|
319
|
-
public r_angle16(): f32;
|
|
320
|
-
public r_angle8(): f32;
|
|
321
|
-
|
|
322
|
-
public r_bool(): boolean;
|
|
323
|
-
public r_stringZ<T extends string>(): T;
|
|
324
|
-
|
|
325
|
-
public r_float<T extends f32>(value?: T): T;
|
|
326
|
-
public r_float_q16<T extends f32>(value1: T, value2: T): T;
|
|
327
|
-
public r_float_q8<T extends f32>(value1: T, value2: T): T;
|
|
328
|
-
|
|
329
|
-
public r_s16<T extends i16 = i16>(value?: T): T;
|
|
330
|
-
public r_s32<T extends i32 = i32>(value?: T): T;
|
|
331
|
-
public r_s64<T extends i64 = i64>(value?: T): T;
|
|
332
|
-
public r_s8<T extends i8 = i8>(value?: T): T;
|
|
333
|
-
|
|
334
|
-
public r_u16<T extends u16 = u16>(value?: T): T;
|
|
335
|
-
public r_u32<T extends u32 = u32>(value?: T): T;
|
|
336
|
-
public r_u64<T extends u64 = u64>(value?: T): T;
|
|
337
|
-
public r_u8<T extends u8 = u8>(value?: T): T;
|
|
338
|
-
}
|
|
139
|
+
export function getFS(this: void): FS;
|
|
339
140
|
|
|
340
141
|
/**
|
|
142
|
+
* Get operating system active username.
|
|
143
|
+
*
|
|
341
144
|
* @group xr_fs
|
|
145
|
+
* @returns username string
|
|
342
146
|
*/
|
|
343
|
-
export
|
|
147
|
+
export function user_name(this: void): string;
|
|
344
148
|
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Enumeration with possible game types:
|
|
5
|
+
* - eGameIDNoGame = u32(0),
|
|
6
|
+
* - eGameIDSingle = u32(1) << 0,
|
|
7
|
+
* - eGameIDDeathmatch = u32(1) << 1,
|
|
8
|
+
* - eGameIDTeamDeathmatch = u32(1) << 2,
|
|
9
|
+
* - eGameIDArtefactHunt = u32(1) << 3,
|
|
10
|
+
* - eGameIDCaptureTheArtefact = u32(1) << 4,
|
|
11
|
+
* - eGameIDDominationZone = u32(1) << 5,
|
|
12
|
+
* - eGameIDTeamDominationZone = u32(1) << 6,
|
|
13
|
+
*
|
|
14
|
+
* @source C++ enum EGameIDs
|
|
15
|
+
* @group xr_game
|
|
16
|
+
*/
|
|
17
|
+
export type TXR_EGameID = 0 | 1 | 2 | 8 | 16 | 32 | 64;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @source C++ class GAME_TYPE
|
|
21
|
+
* @customConstructor GAME_TYPE
|
|
22
|
+
* @group xr_game
|
|
23
|
+
*/
|
|
24
|
+
export class GAME_TYPE {
|
|
25
|
+
public static readonly eGameIDArtefactHunt: 8;
|
|
26
|
+
public static readonly eGameIDCaptureTheArtefact: 16;
|
|
27
|
+
public static readonly eGameIDDeathmatch: 2;
|
|
28
|
+
public static readonly eGameIDTeamDeathmatch: 4;
|
|
29
|
+
|
|
30
|
+
public static readonly GAME_UNKNOWN: -1;
|
|
31
|
+
public static readonly GAME_ANY: 0;
|
|
32
|
+
public static readonly GAME_SINGLE: 1;
|
|
33
|
+
public static readonly GAME_DEATHMATCH: 2;
|
|
34
|
+
// GAME_CTF = 3,
|
|
35
|
+
// GAME_ASSAULT = 4, // Team1 - assaulting, Team0 - Defending
|
|
36
|
+
public static readonly GAME_CS: 5;
|
|
37
|
+
public static readonly GAME_TEAMDEATHMATCH: 6;
|
|
38
|
+
public static readonly GAME_ARTEFACTHUNT: 7;
|
|
39
|
+
public static readonly GAME_CAPTURETHEARTEFACT: 8;
|
|
40
|
+
// identifiers in range [100...254] are registered for script game type
|
|
41
|
+
public static readonly GAME_DUMMY: 255; // temporary g
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @group xr_game
|
|
46
|
+
*/
|
|
47
|
+
type TXR_GAME_TYPE = EnumeratedStaticsValues<typeof GAME_TYPE>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @source C++ class game_difficulty
|
|
51
|
+
* @customConstructor game_difficulty
|
|
52
|
+
* @group xr_game
|
|
53
|
+
*/
|
|
54
|
+
export class game_difficulty {
|
|
55
|
+
public static readonly novice: 0;
|
|
56
|
+
public static readonly stalker: 1;
|
|
57
|
+
public static readonly veteran: 2;
|
|
58
|
+
public static readonly master: 3;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @group xr_game
|
|
63
|
+
*/
|
|
64
|
+
export type TXR_game_difficulty_name = EnumeratedStaticsKeys<typeof game_difficulty>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @group xr_game
|
|
68
|
+
*/
|
|
69
|
+
export type TXR_game_difficulty = EnumeratedStaticsValues<typeof game_difficulty>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @source namespace game
|
|
73
|
+
* @group xr_game
|
|
74
|
+
*/
|
|
75
|
+
export interface IXR_game {
|
|
76
|
+
CTime: (this: void) => CTime;
|
|
77
|
+
|
|
78
|
+
translate_string(this: void, translation_key: string): string;
|
|
79
|
+
|
|
80
|
+
time(this: void): u32;
|
|
81
|
+
|
|
82
|
+
reload_language(this: void): void;
|
|
83
|
+
|
|
84
|
+
get_game_time(this: void): CTime;
|
|
85
|
+
|
|
86
|
+
log_stack_trace(this: void): void;
|
|
87
|
+
|
|
88
|
+
jump_to_level(this: void, level_name: string): void;
|
|
89
|
+
|
|
90
|
+
jump_to_level(this: void, position: vector, lvi: u32, gvi: u16): void;
|
|
91
|
+
|
|
92
|
+
jump_to_level(this: void, position: vector, lvi: u32, gvi: u16, direction: vector): void;
|
|
93
|
+
|
|
94
|
+
start_tutorial(this: void, tutorial_id: string): void;
|
|
95
|
+
|
|
96
|
+
has_active_tutorial(this: void): boolean;
|
|
97
|
+
|
|
98
|
+
active_tutorial_name(this: void): string;
|
|
99
|
+
|
|
100
|
+
stop_tutorial(this: void): void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @group xr_game
|
|
105
|
+
*/
|
|
106
|
+
export const game: IXR_game;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Check whether dynamic music setting is enabled.
|
|
110
|
+
* Dynamic music starts playing different kind of ambient sounds in actor combat.
|
|
111
|
+
*
|
|
112
|
+
* @group xr_game
|
|
113
|
+
* @returns is dynamic music allowed in game settings.
|
|
114
|
+
*/
|
|
115
|
+
export function IsDynamicMusic(this: void): boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Whether auto-save on important checkpoints option is turned on.
|
|
119
|
+
*
|
|
120
|
+
* @group xr_game
|
|
121
|
+
*/
|
|
122
|
+
export function IsImportantSave(this: void): boolean;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @group xr_game
|
|
126
|
+
*/
|
|
127
|
+
export function IsGameTypeSingle(this: void): boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @group xr_game
|
|
131
|
+
* @returns is dev editor tool enabled currently used.
|
|
132
|
+
*/
|
|
133
|
+
export function editor(this: void): boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @group xr_game
|
|
137
|
+
*/
|
|
138
|
+
export function set_start_position(position: vector): void;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @group xr_game
|
|
142
|
+
*/
|
|
143
|
+
export function set_start_game_vertex_id(gvid: i32): void;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @group xr_game
|
|
147
|
+
*/
|
|
148
|
+
export function is_enough_address_space_available(this: void): boolean;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @group xr_game
|
|
152
|
+
*/
|
|
153
|
+
export function verify_if_thread_is_running(this: void): void;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @group xr_game
|
|
157
|
+
*/
|
|
158
|
+
export function script_server_object_version(this: void): u16;
|
|
159
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* @source C++ class hit
|
|
4
|
+
* @customConstructor hit
|
|
5
|
+
* @group xr_hit
|
|
6
|
+
*/
|
|
7
|
+
export class hit {
|
|
8
|
+
public static readonly burn = 0;
|
|
9
|
+
public static readonly chemical_burn = 2;
|
|
10
|
+
public static readonly dummy = 12;
|
|
11
|
+
public static readonly explosion = 7;
|
|
12
|
+
public static readonly fire_wound = 8;
|
|
13
|
+
public static readonly light_burn = 11;
|
|
14
|
+
public static readonly radiation = 3;
|
|
15
|
+
public static readonly shock = 1;
|
|
16
|
+
public static readonly strike = 5;
|
|
17
|
+
public static readonly telepatic = 4;
|
|
18
|
+
public static readonly wound = 6;
|
|
19
|
+
|
|
20
|
+
public direction: vector;
|
|
21
|
+
public draftsman: game_object | null;
|
|
22
|
+
public impulse: f32;
|
|
23
|
+
public power: f32;
|
|
24
|
+
public type: TXR_hit_type;
|
|
25
|
+
|
|
26
|
+
public constructor();
|
|
27
|
+
public constructor(hit: hit);
|
|
28
|
+
|
|
29
|
+
public bone(bone: string): void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @group xr_hit
|
|
34
|
+
*/
|
|
35
|
+
export type TXR_hit_types = typeof hit;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @group xr_hit
|
|
39
|
+
*/
|
|
40
|
+
export type TXR_hit_type = EnumeratedStaticsValues<TXR_hit_types>;
|
|
41
|
+
}
|