xray16 1.3.2 → 1.4.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 +4 -4
- 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 +2 -2
- package/plugins/utils/tracy.js +2 -5
- package/types/index.d.ts +55 -55
- package/types/xr_ai/xr_action.d.ts +510 -510
- package/types/xr_ai/xr_alife.d.ts +566 -566
- package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -41
- package/types/xr_ai/xr_goap.d.ts +669 -668
- package/types/xr_ai/xr_graph.d.ts +47 -47
- package/types/xr_ai/xr_memory.d.ts +148 -148
- package/types/xr_lib/xr_animation.d.ts +81 -81
- package/types/xr_lib/xr_bitwise.d.ts +32 -21
- package/types/xr_lib/xr_color.d.ts +45 -40
- package/types/xr_lib/xr_debug.d.ts +83 -77
- package/types/xr_lib/xr_dialog.d.ts +40 -40
- package/types/xr_lib/xr_flags.d.ts +529 -148
- package/types/xr_lib/xr_fs.d.ts +149 -148
- package/types/xr_lib/xr_game.d.ts +261 -158
- package/types/xr_lib/xr_hit.d.ts +41 -41
- package/types/xr_lib/xr_ini.d.ts +415 -188
- package/types/xr_lib/xr_level.d.ts +652 -225
- package/types/xr_lib/xr_luabind.d.ts +64 -59
- package/types/xr_lib/xr_map.d.ts +61 -61
- package/types/xr_lib/xr_math.d.ts +815 -233
- package/types/xr_lib/xr_multiplayer.d.ts +351 -351
- package/types/xr_lib/xr_profile.d.ts +192 -160
- package/types/xr_lib/xr_properties.d.ts +455 -166
- package/types/xr_lib/xr_relation.d.ts +84 -84
- package/types/xr_lib/xr_render.d.ts +71 -69
- package/types/xr_lib/xr_save.d.ts +727 -223
- package/types/xr_lib/xr_sound.d.ts +151 -151
- package/types/xr_lib/xr_stats.ts +20 -20
- package/types/xr_lib/xr_task.d.ts +111 -111
- package/types/xr_lib/xr_time.d.ts +166 -61
- package/types/xr_lib/xr_type.d.ts +75 -75
- package/types/xr_object/client/xr_anomaly.d.ts +50 -50
- package/types/xr_object/client/xr_artefact.d.ts +98 -98
- package/types/xr_object/client/xr_client_object.d.ts +76 -76
- package/types/xr_object/client/xr_creature.d.ts +164 -164
- package/types/xr_object/client/xr_item.d.ts +264 -264
- package/types/xr_object/client/xr_level.d.ts +285 -285
- package/types/xr_object/client/xr_physic.d.ts +214 -214
- package/types/xr_object/client/xr_zone.d.ts +47 -47
- package/types/xr_object/script/xr_script_interface.d.ts +584 -584
- package/types/xr_object/script/xr_script_object.d.ts +2408 -1390
- package/types/xr_object/script/xr_script_trade.d.ts +41 -26
- package/types/xr_object/server/xr_server_object.d.ts +794 -792
- package/types/xr_ui/xr_ui_asset.d.ts +129 -123
- package/types/xr_ui/xr_ui_core.d.ts +106 -97
- package/types/xr_ui/xr_ui_event.d.ts +383 -381
- package/types/xr_ui/xr_ui_interface.d.ts +901 -903
- package/types/xr_ui/xr_ui_menu.d.ts +142 -142
- package/types/xrf_plugin.d.ts +59 -51
package/types/xr_lib/xr_ini.d.ts
CHANGED
|
@@ -1,188 +1,415 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @source C++ class ini_file
|
|
9
|
-
* @customConstructor ini_file
|
|
10
|
-
* @group xr_ini
|
|
11
|
-
*/
|
|
12
|
-
export class ini_file {
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*
|
|
81
|
-
* @param
|
|
82
|
-
* @
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
public
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
public
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* @
|
|
153
|
-
*/
|
|
154
|
-
public
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* LTX/INI file reader and writer.
|
|
4
|
+
*
|
|
5
|
+
* Use it to read config sections and fields from game data, or to create small script-owned config files.
|
|
6
|
+
* Engine configs support section inheritance and `#include` statements.
|
|
7
|
+
*
|
|
8
|
+
* @source C++ class ini_file
|
|
9
|
+
* @customConstructor ini_file
|
|
10
|
+
* @group xr_ini
|
|
11
|
+
*/
|
|
12
|
+
export class ini_file {
|
|
13
|
+
/**
|
|
14
|
+
* Create an empty ini file.
|
|
15
|
+
*/
|
|
16
|
+
public constructor();
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Open an ini file from a game path.
|
|
20
|
+
*
|
|
21
|
+
* @param path - File name or path relative to game data.
|
|
22
|
+
*/
|
|
23
|
+
public constructor(path: string);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Open an ini file from a filesystem alias and relative path.
|
|
27
|
+
*
|
|
28
|
+
* @param initial - Filesystem alias, for example `$game_config$`.
|
|
29
|
+
* @param path - File name or path relative to the alias.
|
|
30
|
+
*/
|
|
31
|
+
public constructor(initial: string, path: string);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param section - Target section to check lines count.
|
|
35
|
+
* @returns Count of lines for provided section.
|
|
36
|
+
*/
|
|
37
|
+
public line_count(section: string): u32;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @returns Number of sections in this file.
|
|
41
|
+
*/
|
|
42
|
+
public section_count(): u32;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Remove ini file section field.
|
|
46
|
+
*
|
|
47
|
+
* @param section - Target section to modify.
|
|
48
|
+
* @param field - Target section field to remove.
|
|
49
|
+
*/
|
|
50
|
+
public remove_line(section: string, field: string): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Read a boolean value.
|
|
54
|
+
*
|
|
55
|
+
* @param section - Section name.
|
|
56
|
+
* @param field - Field name.
|
|
57
|
+
* @returns Parsed boolean value.
|
|
58
|
+
*/
|
|
59
|
+
public r_bool(section: string, field: string): boolean;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Check whether a section exists.
|
|
63
|
+
*
|
|
64
|
+
* @param section - Section name.
|
|
65
|
+
* @returns Whether the section exists.
|
|
66
|
+
*/
|
|
67
|
+
public section_exist(section: string | null): boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Read a floating-point value.
|
|
71
|
+
*
|
|
72
|
+
* @param section - Section name.
|
|
73
|
+
* @param field - Field name.
|
|
74
|
+
* @returns Parsed number.
|
|
75
|
+
*/
|
|
76
|
+
public r_float(section: string, field: string): f32;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Read a class identifier value.
|
|
80
|
+
*
|
|
81
|
+
* @param section - Section name.
|
|
82
|
+
* @param field - Field name.
|
|
83
|
+
* @returns Parsed class identifier.
|
|
84
|
+
*/
|
|
85
|
+
public r_clsid(section: string, field: string): i32;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Read a signed 32-bit integer.
|
|
89
|
+
*
|
|
90
|
+
* @param section - Section name.
|
|
91
|
+
* @param field - Field name.
|
|
92
|
+
* @returns Parsed integer.
|
|
93
|
+
*/
|
|
94
|
+
public r_s32(section: string, field: string): i32;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Read text line from ini config file.
|
|
98
|
+
*
|
|
99
|
+
* @param section - Section name.
|
|
100
|
+
* @param line_number - Zero-based line index inside the section.
|
|
101
|
+
* @param key - Placeholder for Lua out parameter.
|
|
102
|
+
* @param value - Placeholder for Lua out parameter.
|
|
103
|
+
* @returns Success flag, key, and value.
|
|
104
|
+
*/
|
|
105
|
+
public r_line<T extends string = string, P extends string = string>(
|
|
106
|
+
section: string,
|
|
107
|
+
line_number: i32,
|
|
108
|
+
key: string,
|
|
109
|
+
value: string
|
|
110
|
+
): LuaMultiReturn<[boolean, T, P]>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Read a token value using a token list.
|
|
114
|
+
*
|
|
115
|
+
* @param section - Section name.
|
|
116
|
+
* @param field - Field name.
|
|
117
|
+
* @param list - Token list used for lookup.
|
|
118
|
+
* @returns Token id.
|
|
119
|
+
*/
|
|
120
|
+
public r_token(section: string, field: string, list: token_list): i32;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Read a 3D vector.
|
|
124
|
+
*
|
|
125
|
+
* @param section - Section name.
|
|
126
|
+
* @param field - Field name.
|
|
127
|
+
* @returns Parsed vector.
|
|
128
|
+
*/
|
|
129
|
+
public r_vector(section: string, field: string): vector;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Read an unsigned 32-bit integer.
|
|
133
|
+
*
|
|
134
|
+
* @param section - Section name.
|
|
135
|
+
* @param field - Field name.
|
|
136
|
+
* @returns Parsed integer.
|
|
137
|
+
*/
|
|
138
|
+
public r_u32(section: string, field: string): u32;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Read a quoted string value.
|
|
142
|
+
*
|
|
143
|
+
* @param section - Section name.
|
|
144
|
+
* @param field - Field name.
|
|
145
|
+
* @returns Parsed string.
|
|
146
|
+
*/
|
|
147
|
+
public r_string_wq(section: string, field: string): string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @param section - Ini file section.
|
|
151
|
+
* @param field - Ini section field.
|
|
152
|
+
* @returns If quoted, parsed string data inside quotes including spaces, else is same data as with r_string.
|
|
153
|
+
*/
|
|
154
|
+
public r_string_wb(section: string, field: string): string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @param section - Ini file section.
|
|
158
|
+
* @param field - Ini section field.
|
|
159
|
+
* @returns Raw string from ltx file without spaces in it.
|
|
160
|
+
*/
|
|
161
|
+
public r_string(section: string, field: string): string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Check if line exists in the file by section and field.
|
|
165
|
+
*
|
|
166
|
+
* @param section - Target section to check.
|
|
167
|
+
* @param field - Section field to check.
|
|
168
|
+
* @returns Whether line exists.
|
|
169
|
+
*/
|
|
170
|
+
public line_exist(section: string | null, field: string): boolean;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Write a 2D vector value.
|
|
174
|
+
*
|
|
175
|
+
* @param section - Section name.
|
|
176
|
+
* @param field - Field name.
|
|
177
|
+
* @param vector - Value to write.
|
|
178
|
+
* @param comment - Optional line comment.
|
|
179
|
+
*/
|
|
180
|
+
public w_fvector2(section: string, field: string, vector: vector2, comment?: string): void;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Write a 3D vector value.
|
|
184
|
+
*
|
|
185
|
+
* @param section - Section name.
|
|
186
|
+
* @param field - Field name.
|
|
187
|
+
* @param vector - Value to write.
|
|
188
|
+
* @param comment - Optional line comment.
|
|
189
|
+
*/
|
|
190
|
+
public w_fvector3(section: string, field: string, vector: vector, comment?: string): void;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Write a 4D vector value.
|
|
194
|
+
*
|
|
195
|
+
* @param section - Section name.
|
|
196
|
+
* @param field - Field name.
|
|
197
|
+
* @param vector - Value to write.
|
|
198
|
+
* @param comment - Optional line comment.
|
|
199
|
+
*/
|
|
200
|
+
public w_fvector4(section: string, field: string, vector: never, comment?: string): void; // Struct _vector4<float>
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Write a floating-point color value.
|
|
204
|
+
*
|
|
205
|
+
* @param section - Section name.
|
|
206
|
+
* @param field - Field name.
|
|
207
|
+
* @param color - Value to write.
|
|
208
|
+
* @param comment - Optional line comment.
|
|
209
|
+
*/
|
|
210
|
+
public w_fcolor(section: string, field: string, color: fcolor, comment?: string): void;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Write a packed color value.
|
|
214
|
+
*
|
|
215
|
+
* @param section - Section name.
|
|
216
|
+
* @param field - Field name.
|
|
217
|
+
* @param color - Value to write.
|
|
218
|
+
* @param comment - Optional line comment.
|
|
219
|
+
*/
|
|
220
|
+
public w_color(section: string, field: string, color: u32, comment?: string): void;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Write a boolean value.
|
|
224
|
+
*
|
|
225
|
+
* @param section - Section name.
|
|
226
|
+
* @param field - Field name.
|
|
227
|
+
* @param value - Value to write.
|
|
228
|
+
* @param comment - Optional line comment.
|
|
229
|
+
*/
|
|
230
|
+
public w_bool(section: string, field: string, value: boolean, comment?: string): void;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Write a signed 8-bit integer.
|
|
234
|
+
*
|
|
235
|
+
* @param section - Section name.
|
|
236
|
+
* @param field - Field name.
|
|
237
|
+
* @param value - Value to write.
|
|
238
|
+
* @param comment - Optional line comment.
|
|
239
|
+
*/
|
|
240
|
+
public w_s8(section: string, field: string, value: u8, comment?: string): void;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Write an unsigned 8-bit integer.
|
|
244
|
+
*
|
|
245
|
+
* @param section - Section name.
|
|
246
|
+
* @param field - Field name.
|
|
247
|
+
* @param value - Value to write.
|
|
248
|
+
* @param comment - Optional line comment.
|
|
249
|
+
*/
|
|
250
|
+
public w_u8(section: string, field: string, value: u8, comment?: string): void;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Write a signed 16-bit integer.
|
|
254
|
+
*
|
|
255
|
+
* @param section - Section name.
|
|
256
|
+
* @param field - Field name.
|
|
257
|
+
* @param value - Value to write.
|
|
258
|
+
* @param comment - Optional line comment.
|
|
259
|
+
*/
|
|
260
|
+
public w_s16(section: string, field: string, value: i16, comment?: string): void;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Write an unsigned 16-bit integer.
|
|
264
|
+
*
|
|
265
|
+
* @param section - Section name.
|
|
266
|
+
* @param field - Field name.
|
|
267
|
+
* @param value - Value to write.
|
|
268
|
+
* @param comment - Optional line comment.
|
|
269
|
+
*/
|
|
270
|
+
public w_u16(section: string, field: string, value: u16, comment?: string): void;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Write a signed 32-bit integer.
|
|
274
|
+
*
|
|
275
|
+
* @param section - Section name.
|
|
276
|
+
* @param field - Field name.
|
|
277
|
+
* @param value - Value to write.
|
|
278
|
+
* @param comment - Optional line comment.
|
|
279
|
+
*/
|
|
280
|
+
public w_s32(section: string, field: string, value: i32, comment?: string): void;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Write an unsigned 32-bit integer.
|
|
284
|
+
*
|
|
285
|
+
* @param section - Section name.
|
|
286
|
+
* @param field - Field name.
|
|
287
|
+
* @param value - Value to write.
|
|
288
|
+
* @param comment - Optional line comment.
|
|
289
|
+
*/
|
|
290
|
+
public w_u32(section: string, field: string, value: u32, comment?: string): void;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Write a signed 64-bit integer.
|
|
294
|
+
*
|
|
295
|
+
* @param section - Section name.
|
|
296
|
+
* @param field - Field name.
|
|
297
|
+
* @param value - Value to write.
|
|
298
|
+
* @param comment - Optional line comment.
|
|
299
|
+
*/
|
|
300
|
+
public w_s64(section: string, field: string, value: i64, comment?: string): void;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Write an unsigned 64-bit integer.
|
|
304
|
+
*
|
|
305
|
+
* @param section - Section name.
|
|
306
|
+
* @param field - Field name.
|
|
307
|
+
* @param value - Value to write.
|
|
308
|
+
* @param comment - Optional line comment.
|
|
309
|
+
*/
|
|
310
|
+
public w_u64(section: string, field: string, value: u64, comment?: string): void;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Write a floating-point number.
|
|
314
|
+
*
|
|
315
|
+
* @param section - Section name.
|
|
316
|
+
* @param field - Field name.
|
|
317
|
+
* @param value - Value to write.
|
|
318
|
+
* @param comment - Optional line comment.
|
|
319
|
+
*/
|
|
320
|
+
public w_float(section: string, field: string, value: f32, comment?: string): void;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Write a string value.
|
|
324
|
+
*
|
|
325
|
+
* @param section - Section name.
|
|
326
|
+
* @param field - Field name.
|
|
327
|
+
* @param value - Value to write.
|
|
328
|
+
* @param comment - Optional line comment.
|
|
329
|
+
*/
|
|
330
|
+
public w_string(section: string, field: string, value: string, comment?: string): void;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Get file name and path of ini file.
|
|
334
|
+
*
|
|
335
|
+
* @example `f:\applications\steam\steamapps\common\stalker call of pripyat\gamedata\configs\misc\task_manager.ltx`
|
|
336
|
+
*
|
|
337
|
+
* @returns Full path to ini file.
|
|
338
|
+
*/
|
|
339
|
+
public fname(): string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Switch the file into readonly or writable mode.
|
|
343
|
+
*
|
|
344
|
+
* @param is_readonly - Whether writes should be disabled.
|
|
345
|
+
*/
|
|
346
|
+
public set_readonly(is_readonly: boolean): void;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Enable or disable section override name handling.
|
|
350
|
+
*
|
|
351
|
+
* @param override - Whether override names should be used.
|
|
352
|
+
*/
|
|
353
|
+
public set_override_names(override: boolean): void;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Save this ini file to a path.
|
|
357
|
+
*
|
|
358
|
+
* @param path - Destination path.
|
|
359
|
+
* @returns Whether saving succeeded.
|
|
360
|
+
*/
|
|
361
|
+
public save_as(path: string): boolean;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Adjust saving on file closing/destructor calls.
|
|
365
|
+
*
|
|
366
|
+
* @param should_save - Whether ini file should be saved when destructor is called.
|
|
367
|
+
*/
|
|
368
|
+
public save_at_end(should_save: boolean): void;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Iterate over ini file sections.
|
|
372
|
+
* Calls provided callback for each ini section in file.
|
|
373
|
+
*
|
|
374
|
+
* @param cb - Callback to call on each ini file section, where name is section name.
|
|
375
|
+
*/
|
|
376
|
+
public section_for_each(cb: (this: void, name: string) => void): void;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Create ini file instance based on provided string content.
|
|
381
|
+
*
|
|
382
|
+
* @group xr_ini
|
|
383
|
+
*
|
|
384
|
+
* @param content - String value to be read as ini file.
|
|
385
|
+
* @returns New ini file instance based on provided content.
|
|
386
|
+
*/
|
|
387
|
+
export function create_ini_file(this: void, content: string): ini_file;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Get the loaded game ini.
|
|
391
|
+
*
|
|
392
|
+
* @group xr_ini
|
|
393
|
+
*
|
|
394
|
+
* @returns Current game ini file.
|
|
395
|
+
*/
|
|
396
|
+
export function game_ini(this: void): ini_file;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Get the loaded system ini.
|
|
400
|
+
*
|
|
401
|
+
* @group xr_ini
|
|
402
|
+
*
|
|
403
|
+
* @returns Current system ini file.
|
|
404
|
+
*/
|
|
405
|
+
export function system_ini(this: void): ini_file;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Reload and return the system ini.
|
|
409
|
+
*
|
|
410
|
+
* @group xr_ini
|
|
411
|
+
*
|
|
412
|
+
* @returns Reloaded system ini file.
|
|
413
|
+
*/
|
|
414
|
+
export function reload_system_ini(this: void): ini_file;
|
|
415
|
+
}
|