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.
- package/package.json +12 -6
- package/xray16.d.ts +30852 -0
- package/types/index.d.ts +0 -55
- package/types/internal.d.ts +0 -6
- package/types/xr_ai/xr_action.d.ts +0 -1803
- package/types/xr_ai/xr_alife.d.ts +0 -1872
- package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
- package/types/xr_ai/xr_goap.d.ts +0 -1118
- package/types/xr_ai/xr_graph.d.ts +0 -135
- package/types/xr_ai/xr_memory.d.ts +0 -384
- package/types/xr_lib/xr_animation.d.ts +0 -252
- package/types/xr_lib/xr_bitwise.d.ts +0 -44
- package/types/xr_lib/xr_color.d.ts +0 -142
- package/types/xr_lib/xr_debug.d.ts +0 -183
- package/types/xr_lib/xr_dialog.d.ts +0 -132
- package/types/xr_lib/xr_flags.d.ts +0 -592
- package/types/xr_lib/xr_fs.d.ts +0 -617
- package/types/xr_lib/xr_game.d.ts +0 -362
- package/types/xr_lib/xr_hit.d.ts +0 -127
- package/types/xr_lib/xr_ini.d.ts +0 -475
- package/types/xr_lib/xr_level.d.ts +0 -797
- package/types/xr_lib/xr_luabind.d.ts +0 -90
- package/types/xr_lib/xr_map.d.ts +0 -194
- package/types/xr_lib/xr_math.d.ts +0 -871
- package/types/xr_lib/xr_multiplayer.d.ts +0 -1081
- package/types/xr_lib/xr_profile.d.ts +0 -272
- package/types/xr_lib/xr_properties.d.ts +0 -612
- package/types/xr_lib/xr_relation.d.ts +0 -231
- package/types/xr_lib/xr_render.d.ts +0 -167
- package/types/xr_lib/xr_save.d.ts +0 -835
- package/types/xr_lib/xr_sound.d.ts +0 -517
- package/types/xr_lib/xr_stats.ts +0 -51
- package/types/xr_lib/xr_task.d.ts +0 -390
- package/types/xr_lib/xr_time.d.ts +0 -177
- package/types/xr_lib/xr_type.d.ts +0 -70
- package/types/xr_object/client/xr_anomaly.d.ts +0 -70
- package/types/xr_object/client/xr_artefact.d.ts +0 -153
- package/types/xr_object/client/xr_client_object.d.ts +0 -207
- package/types/xr_object/client/xr_creature.d.ts +0 -243
- package/types/xr_object/client/xr_item.d.ts +0 -370
- package/types/xr_object/client/xr_level.d.ts +0 -755
- package/types/xr_object/client/xr_physic.d.ts +0 -644
- package/types/xr_object/client/xr_zone.d.ts +0 -85
- package/types/xr_object/script/xr_script_interface.d.ts +0 -1142
- package/types/xr_object/script/xr_script_object.d.ts +0 -5702
- package/types/xr_object/script/xr_script_trade.d.ts +0 -51
- package/types/xr_object/server/xr_server_object.d.ts +0 -1488
- package/types/xr_ui/xr_ui_asset.d.ts +0 -364
- package/types/xr_ui/xr_ui_core.d.ts +0 -426
- package/types/xr_ui/xr_ui_event.d.ts +0 -1449
- package/types/xr_ui/xr_ui_interface.d.ts +0 -2449
- package/types/xr_ui/xr_ui_menu.d.ts +0 -401
- package/types/xrf_plugin.d.ts +0 -111
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
import type { Nullable } from "../internal";
|
|
2
|
-
|
|
3
|
-
declare module "xray16" {
|
|
4
|
-
/**
|
|
5
|
-
* Task state and task type constants.
|
|
6
|
-
*
|
|
7
|
-
* @source C++ class task
|
|
8
|
-
* @customConstructor task
|
|
9
|
-
* @group xr_task
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* State and type constants share one native export. Use the matching subset for each API.
|
|
13
|
-
*/
|
|
14
|
-
export class task {
|
|
15
|
-
/**
|
|
16
|
-
* Engine enum value for `task.additional`.
|
|
17
|
-
*/
|
|
18
|
-
public static readonly additional: 1;
|
|
19
|
-
/**
|
|
20
|
-
* Engine enum value for `task.completed`.
|
|
21
|
-
*/
|
|
22
|
-
public static readonly completed: 2;
|
|
23
|
-
/**
|
|
24
|
-
* Engine enum value for `task.fail`.
|
|
25
|
-
*/
|
|
26
|
-
public static readonly fail: 0;
|
|
27
|
-
/**
|
|
28
|
-
* Engine enum value for `task.in_progress`.
|
|
29
|
-
*/
|
|
30
|
-
public static readonly in_progress: 1;
|
|
31
|
-
/**
|
|
32
|
-
* Engine enum value for `task.insignificant`.
|
|
33
|
-
*/
|
|
34
|
-
public static readonly insignificant: 2;
|
|
35
|
-
/**
|
|
36
|
-
* Engine enum value for `task.storyline`.
|
|
37
|
-
*/
|
|
38
|
-
public static readonly storyline: 0;
|
|
39
|
-
/**
|
|
40
|
-
* Engine enum value for `task.task_dummy`.
|
|
41
|
-
*/
|
|
42
|
-
public static readonly task_dummy: 65535;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Engine-owned task constants.
|
|
46
|
-
*/
|
|
47
|
-
private constructor();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @group xr_task
|
|
52
|
-
*/
|
|
53
|
-
export type TXR_TaskStateName = EnumeratedStaticsKeys<typeof task>;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* ETaskState.
|
|
57
|
-
*
|
|
58
|
-
* @group xr_task
|
|
59
|
-
*/
|
|
60
|
-
export type TXR_TaskState = EnumeratedStaticsValues<typeof task>;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* One objective inside a game task.
|
|
64
|
-
*
|
|
65
|
-
* @source C++ class SGameTaskObjective
|
|
66
|
-
* @customConstructor SGameTaskObjective
|
|
67
|
-
* @group xr_task
|
|
68
|
-
*
|
|
69
|
-
* @remarks
|
|
70
|
-
* Objective `0` is the task root objective. Additional objectives start at `1`.
|
|
71
|
-
*/
|
|
72
|
-
export class SGameTaskObjective {
|
|
73
|
-
/**
|
|
74
|
-
* Whether the default map location should be visible for this objective.
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* This mirrors the native `def_ml_enabled` field used by loaded task objectives.
|
|
78
|
-
*/
|
|
79
|
-
public def_ml_enabled: boolean;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @remarks
|
|
83
|
-
* The objective stores a pointer to `task`; keep the parent task alive while using this objective.
|
|
84
|
-
*
|
|
85
|
-
* @param task - Parent task.
|
|
86
|
-
* @param id - Objective index.
|
|
87
|
-
*/
|
|
88
|
-
public constructor(task: CGameTask, id: i32);
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Get objective index inside the parent task.
|
|
92
|
-
*
|
|
93
|
-
* @returns Objective index.
|
|
94
|
-
*/
|
|
95
|
-
public get_idx(): u16;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Set objective icon texture.
|
|
99
|
-
*
|
|
100
|
-
* @param icon_name - Icon texture or string table id.
|
|
101
|
-
*/
|
|
102
|
-
public set_icon_name(icon_name: string): void;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* @returns Objective icon name, or null when none is set.
|
|
106
|
-
*/
|
|
107
|
-
public get_icon_name<T extends string = string>(): Nullable<T>;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Set objective description text.
|
|
111
|
-
*
|
|
112
|
-
* @param description - Description text or string table id.
|
|
113
|
-
*/
|
|
114
|
-
public set_description(description: string): void;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @returns Objective description text or string table id.
|
|
118
|
-
*/
|
|
119
|
-
public get_description(): string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Set objective title.
|
|
123
|
-
*
|
|
124
|
-
* @param title - Title text or string table id.
|
|
125
|
-
*/
|
|
126
|
-
public set_title(title: string): void;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @returns Objective title.
|
|
130
|
-
*/
|
|
131
|
-
public get_title(): string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Set encyclopedia article id unlocked with this objective.
|
|
135
|
-
*
|
|
136
|
-
* @param id - Encyclopedia article id.
|
|
137
|
-
*/
|
|
138
|
-
public set_article_id(id: string): void;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Set encyclopedia article key for this objective.
|
|
142
|
-
*
|
|
143
|
-
* @param key - Article key.
|
|
144
|
-
*/
|
|
145
|
-
public set_article_key(key: string): void;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Set map spot type used by this objective.
|
|
149
|
-
*
|
|
150
|
-
* @param location - Map location type.
|
|
151
|
-
*/
|
|
152
|
-
public set_map_location(location: string): void;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Add a script function called after objective completion.
|
|
156
|
-
*
|
|
157
|
-
* @remarks
|
|
158
|
-
* Function names are resolved when a script-created objective is added to a task. Missing functions are logged and
|
|
159
|
-
* then skipped by the engine.
|
|
160
|
-
*
|
|
161
|
-
* @param function_name - Script function name.
|
|
162
|
-
*/
|
|
163
|
-
public add_on_complete_func(function_name: string): void;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Require an info portion for objective completion.
|
|
167
|
-
*
|
|
168
|
-
* @param value - Info portion id.
|
|
169
|
-
*/
|
|
170
|
-
public add_complete_info(value: string): void;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Give an info portion when objective fails.
|
|
174
|
-
*
|
|
175
|
-
* @param value - Info portion id.
|
|
176
|
-
*/
|
|
177
|
-
public add_on_fail_info(value: string): void;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Add a script function called after objective failure.
|
|
181
|
-
*
|
|
182
|
-
* @remarks
|
|
183
|
-
* Function names are resolved when a script-created objective is added to a task. Missing functions are logged and
|
|
184
|
-
* then skipped by the engine.
|
|
185
|
-
*
|
|
186
|
-
* @param function_name - Script function name.
|
|
187
|
-
*/
|
|
188
|
-
public add_on_fail_func(function_name: string): void;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Give an info portion when objective completes.
|
|
192
|
-
*
|
|
193
|
-
* @param value - Info portion id.
|
|
194
|
-
*/
|
|
195
|
-
public add_on_complete_info(value: string): void;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Add a script predicate used to decide objective completion.
|
|
199
|
-
*
|
|
200
|
-
* @remarks
|
|
201
|
-
* Function names are resolved when a script-created objective is added to a task. Missing functions are logged and
|
|
202
|
-
* then skipped by the engine.
|
|
203
|
-
*
|
|
204
|
-
* @param function_name - Script function name.
|
|
205
|
-
*/
|
|
206
|
-
public add_complete_func(function_name: string): void;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Add a script predicate used to decide objective failure.
|
|
210
|
-
*
|
|
211
|
-
* @remarks
|
|
212
|
-
* Function names are resolved when a script-created objective is added to a task. Missing functions are logged and
|
|
213
|
-
* then skipped by the engine.
|
|
214
|
-
*
|
|
215
|
-
* @param function_name - Script function name.
|
|
216
|
-
*/
|
|
217
|
-
public add_fail_func(function_name: string): void;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Require an info portion for objective failure.
|
|
221
|
-
*
|
|
222
|
-
* @param value - Info portion id.
|
|
223
|
-
*/
|
|
224
|
-
public add_fail_info(value: string): void;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* @returns Current objective state.
|
|
228
|
-
*/
|
|
229
|
-
public get_state(): TXR_TaskState;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @returns Task type, such as `task.storyline` or `task.additional`.
|
|
233
|
-
*/
|
|
234
|
-
public get_type(): number; /* ETaskType */
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Set task type.
|
|
238
|
-
*
|
|
239
|
-
* @param type - Task type, such as `task.storyline` or `task.additional`.
|
|
240
|
-
*/
|
|
241
|
-
public set_type(type: i32 /* ETaskType */): void;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Set hint text for the linked map location.
|
|
245
|
-
*
|
|
246
|
-
* @param hint - Hint text or string table id.
|
|
247
|
-
*/
|
|
248
|
-
public set_map_hint(hint: string): void;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @returns Target map location of task object.
|
|
252
|
-
*/
|
|
253
|
-
public get_map_location(): string;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* @returns Target map object ID of task object.
|
|
257
|
-
*/
|
|
258
|
-
public get_map_object_id(): u16;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Replace linked map location data and recreate the spot.
|
|
262
|
-
*
|
|
263
|
-
* @remarks
|
|
264
|
-
* Removes the current linked spot, sets the objective back to `task.in_progress`, then creates a new map spot.
|
|
265
|
-
*
|
|
266
|
-
* @param new_map_location - New map location type.
|
|
267
|
-
* @param new_map_object_id - New target object id.
|
|
268
|
-
*/
|
|
269
|
-
public change_map_location(new_map_location: string, new_map_object_id: u16): void;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Remove linked map locations.
|
|
273
|
-
*
|
|
274
|
-
* @remarks
|
|
275
|
-
* When `notify` is `false`, the linked map location is removed from the level map manager. The objective then clears
|
|
276
|
-
* its stored location type and object id.
|
|
277
|
-
*
|
|
278
|
-
* @param notify - Whether to notify task manager that the location was released.
|
|
279
|
-
*/
|
|
280
|
-
public remove_map_locations(notify: boolean): void;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Create the linked map location if the objective has a spot type and object id.
|
|
284
|
-
*
|
|
285
|
-
* @remarks
|
|
286
|
-
* During load, the objective tries to reattach to an existing serializable spot owned by the task. During normal
|
|
287
|
-
* creation, it creates a new serializable spot and disables its pointer. The objective must already have a map
|
|
288
|
-
* location type and a valid game object id.
|
|
289
|
-
*
|
|
290
|
-
* @param on_load - Whether creation happens during save loading.
|
|
291
|
-
*/
|
|
292
|
-
public create_map_location(on_load: boolean): void;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Set object id tracked by the objective map spot.
|
|
296
|
-
*
|
|
297
|
-
* @param id - Game object id.
|
|
298
|
-
*/
|
|
299
|
-
public set_map_object_id(id: i32): void;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Shadow of Chernobyl alias for `set_map_object_id`.
|
|
303
|
-
*
|
|
304
|
-
* @param id - Game object id.
|
|
305
|
-
*/
|
|
306
|
-
public set_object_id(id: i32): void;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Game task with one or more objectives.
|
|
311
|
-
*
|
|
312
|
-
* @source C++ class CGameTask : SGameTaskObjective
|
|
313
|
-
* @customConstructor CGameTask
|
|
314
|
-
* @group xr_task
|
|
315
|
-
*
|
|
316
|
-
* @remarks
|
|
317
|
-
* A task is also its root objective. Methods inherited from `SGameTaskObjective` operate on that root objective.
|
|
318
|
-
*/
|
|
319
|
-
export class CGameTask extends SGameTaskObjective {
|
|
320
|
-
/**
|
|
321
|
-
* Create an empty game task.
|
|
322
|
-
*/
|
|
323
|
-
public constructor();
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Load task data from configs.
|
|
327
|
-
*
|
|
328
|
-
* @remarks
|
|
329
|
-
* Reads from `gameplay/game_tasks.xml`. Task XML function names are resolved immediately.
|
|
330
|
-
*
|
|
331
|
-
* @throws If the task id is missing from `game_tasks.xml` or a referenced task function cannot be resolved.
|
|
332
|
-
*
|
|
333
|
-
* @param id - Task id.
|
|
334
|
-
*/
|
|
335
|
-
public load(id: string): void;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @returns Task id.
|
|
339
|
-
*/
|
|
340
|
-
public get_id(): string;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Set task priority used by task UI ordering.
|
|
344
|
-
*
|
|
345
|
-
* @param priority - New priority.
|
|
346
|
-
*/
|
|
347
|
-
public set_priority(priority: i32): void;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Set task id.
|
|
351
|
-
*
|
|
352
|
-
* @param id - Task id.
|
|
353
|
-
*/
|
|
354
|
-
public set_id(id: string): void;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* @returns Task priority.
|
|
358
|
-
*/
|
|
359
|
-
public get_priority(): u32;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Add an objective to this task.
|
|
363
|
-
*
|
|
364
|
-
* @remarks
|
|
365
|
-
* The native binding adopts the objective and copies its current data into the task objective list. Mutating the
|
|
366
|
-
* original objective after this call does not update the stored copy.
|
|
367
|
-
*
|
|
368
|
-
* @param objective - Objective to adopt into the task.
|
|
369
|
-
*/
|
|
370
|
-
public add_objective(objective: SGameTaskObjective): void;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Get objective by index.
|
|
374
|
-
*
|
|
375
|
-
* @remarks
|
|
376
|
-
* Index `0` returns the root objective. Other indices access native storage without a bounds check.
|
|
377
|
-
*
|
|
378
|
-
* @param objective_id - Objective index.
|
|
379
|
-
* @returns Objective instance.
|
|
380
|
-
*/
|
|
381
|
-
public get_objective(objective_id: i32): SGameTaskObjective;
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Count task objectives including the root objective.
|
|
385
|
-
*
|
|
386
|
-
* @returns Objective count.
|
|
387
|
-
*/
|
|
388
|
-
public get_objectives_cnt(): u32;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* Mutable game calendar/time value.
|
|
4
|
-
*
|
|
5
|
-
* Use `game.get_game_time()` for the current in-game time and `time_global()` for real elapsed milliseconds.
|
|
6
|
-
*
|
|
7
|
-
* @source C++ class CTime
|
|
8
|
-
* @customConstructor CTime
|
|
9
|
-
* @group xr_time
|
|
10
|
-
* @remarks
|
|
11
|
-
* Methods such as `add`, `sub`, `set`, and `setHMS` mutate the current instance.
|
|
12
|
-
*/
|
|
13
|
-
export class CTime extends EngineBinding {
|
|
14
|
-
/**
|
|
15
|
-
* Date formatting mode: day.
|
|
16
|
-
*/
|
|
17
|
-
public static DateToDay: 0;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Date formatting mode: month.
|
|
21
|
-
*/
|
|
22
|
-
public static DateToMonth: 1;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Date formatting mode: year.
|
|
26
|
-
*/
|
|
27
|
-
public static DateToYear: 2;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Time formatting mode: hours.
|
|
31
|
-
*/
|
|
32
|
-
public static TimeToHours: 0;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Time formatting mode: milliseconds.
|
|
36
|
-
*/
|
|
37
|
-
public static TimeToMilisecs: 3;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Time formatting mode: minutes.
|
|
41
|
-
*/
|
|
42
|
-
public static TimeToMinutes: 1;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Time formatting mode: seconds.
|
|
46
|
-
*/
|
|
47
|
-
public static TimeToSeconds: 2;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Create an empty time value.
|
|
51
|
-
*/
|
|
52
|
-
public constructor();
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Copy another time value.
|
|
56
|
-
*
|
|
57
|
-
* @param time - Time value to copy.
|
|
58
|
-
*/
|
|
59
|
-
public constructor(time: CTime);
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Add another time value to this one.
|
|
63
|
-
*
|
|
64
|
-
* @param time - Time span to add.
|
|
65
|
-
*/
|
|
66
|
-
public add(time: CTime): void;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Format one date component as text.
|
|
70
|
-
*
|
|
71
|
-
* @param mode - One of `CTime.DateTo*` formatting constants.
|
|
72
|
-
* @returns Requested date component.
|
|
73
|
-
*/
|
|
74
|
-
public dateToString(mode: i32): string;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Get difference from another game time in seconds.
|
|
78
|
-
*
|
|
79
|
-
* @param time - Time to compare with.
|
|
80
|
-
* @returns Difference in seconds.
|
|
81
|
-
*/
|
|
82
|
-
public diffSec(time: CTime): f32;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Read all date and time components.
|
|
86
|
-
*
|
|
87
|
-
* The input values are placeholders for Lua out parameters.
|
|
88
|
-
*
|
|
89
|
-
* @returns Year, month, day, hour, minute, second, and millisecond.
|
|
90
|
-
*/
|
|
91
|
-
public get(
|
|
92
|
-
y: u32,
|
|
93
|
-
m: u32,
|
|
94
|
-
d: u32,
|
|
95
|
-
h: u32,
|
|
96
|
-
min: u32,
|
|
97
|
-
sec: u32,
|
|
98
|
-
ms: u32
|
|
99
|
-
): LuaMultiReturn<[u32, u32, u32, u32, u32, u32, u32]>;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Replace all date and time components.
|
|
103
|
-
*
|
|
104
|
-
* @param y - Year.
|
|
105
|
-
* @param m - Month.
|
|
106
|
-
* @param d - Day.
|
|
107
|
-
* @param h - Hour.
|
|
108
|
-
* @param min - Minute.
|
|
109
|
-
* @param sec - Second.
|
|
110
|
-
* @param ms - Millisecond.
|
|
111
|
-
*/
|
|
112
|
-
public set(y: i32, m: i32, d: i32, h: i32, min: i32, sec: i32, ms: i32): void;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Replace time of day.
|
|
116
|
-
*
|
|
117
|
-
* @param h - Hour.
|
|
118
|
-
* @param m - Minute.
|
|
119
|
-
* @param s - Second.
|
|
120
|
-
*/
|
|
121
|
-
public setHMS(h: i32, m: i32, s: i32): void;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Replace time of day including milliseconds.
|
|
125
|
-
*
|
|
126
|
-
* @param h - Hour.
|
|
127
|
-
* @param m - Minute.
|
|
128
|
-
* @param s - Second.
|
|
129
|
-
* @param ms - Millisecond.
|
|
130
|
-
*/
|
|
131
|
-
public setHMSms(h: i32, m: i32, s: i32, ms: i32): void;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Subtract another time value from this one.
|
|
135
|
-
*
|
|
136
|
-
* @remarks
|
|
137
|
-
* The result is clamped at zero when `time` is greater than the current value.
|
|
138
|
-
*
|
|
139
|
-
* @param time - Time span to subtract.
|
|
140
|
-
*/
|
|
141
|
-
public sub(time: CTime): void;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Format one time component as text.
|
|
145
|
-
*
|
|
146
|
-
* @param mode - One of `CTime.TimeTo*` formatting constants.
|
|
147
|
-
* @returns Requested time component.
|
|
148
|
-
*/
|
|
149
|
-
public timeToString(mode: i32): string;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Get main-thread engine time in milliseconds since executable start.
|
|
154
|
-
*
|
|
155
|
-
* @group xr_time
|
|
156
|
-
*
|
|
157
|
-
* @remarks
|
|
158
|
-
* Reads `Device.dwTimeGlobal`, the frame-updated engine clock.
|
|
159
|
-
*
|
|
160
|
-
* @example 0, 1000, 60000
|
|
161
|
-
*
|
|
162
|
-
* @returns Milliseconds from game executable start.
|
|
163
|
-
*/
|
|
164
|
-
export function time_global(this: void): u32;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Get asynchronous engine time in milliseconds since executable start.
|
|
168
|
-
*
|
|
169
|
-
* @group xr_time
|
|
170
|
-
*
|
|
171
|
-
* @remarks
|
|
172
|
-
* Reads the asynchronous multimedia timer, so it can advance outside the frame-updated `time_global` value.
|
|
173
|
-
*
|
|
174
|
-
* @returns Milliseconds from game executable start.
|
|
175
|
-
*/
|
|
176
|
-
export function time_global_async(this: void): u32;
|
|
177
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List of types that are all cast to similar number type in lua / ts.
|
|
3
|
-
* Main purpose is to indicate what is used with C++ side for better documentation.
|
|
4
|
-
*/
|
|
5
|
-
declare module "xray16" {
|
|
6
|
-
/**
|
|
7
|
-
* @group xr_type
|
|
8
|
-
*/
|
|
9
|
-
type i8 = number;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @group xr_type
|
|
13
|
-
*/
|
|
14
|
-
type u8 = number;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @group xr_type
|
|
18
|
-
*/
|
|
19
|
-
type i16 = number;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @group xr_type
|
|
23
|
-
*/
|
|
24
|
-
type u16 = number;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @group xr_type
|
|
28
|
-
*/
|
|
29
|
-
type f32 = number;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @group xr_type
|
|
33
|
-
*/
|
|
34
|
-
type i32 = number;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @group xr_type
|
|
38
|
-
*/
|
|
39
|
-
type u32 = number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @group xr_type
|
|
43
|
-
*/
|
|
44
|
-
type f64 = number;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @group xr_type
|
|
48
|
-
*/
|
|
49
|
-
type i64 = number;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @group xr_type
|
|
53
|
-
*/
|
|
54
|
-
type u64 = number;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @group xr_type
|
|
58
|
-
*/
|
|
59
|
-
type AnyObject = Record<string, any>;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @group xr_type
|
|
63
|
-
*/
|
|
64
|
-
type EnumeratedStaticsKeys<T> = Exclude<keyof T, "constructor" | TEngineBindingStaticMethods>;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @group xr_type
|
|
68
|
-
*/
|
|
69
|
-
type EnumeratedStaticsValues<T> = T[Exclude<keyof T, "constructor" | TEngineBindingStaticMethods>];
|
|
70
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* Client object binding for `CMosquitoBald` anomaly objects.
|
|
4
|
-
*
|
|
5
|
-
* @source C++ class CMosquitoBald : CGameObject
|
|
6
|
-
* @customConstructor CMosquitoBald
|
|
7
|
-
* @group xr_anomaly
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Concrete anomaly wrapper. Generic anomaly helpers are usually available through `CCustomZone`/`game_object`.
|
|
11
|
-
*/
|
|
12
|
-
export class CMosquitoBald extends CGameObject {}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Client object binding for torch items.
|
|
16
|
-
*
|
|
17
|
-
* @source C++ class CTorch : CGameObject
|
|
18
|
-
* @customConstructor CTorch
|
|
19
|
-
* @group xr_anomaly
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
* Torch-specific night-vision helpers on `game_object` require this runtime object.
|
|
23
|
-
*/
|
|
24
|
-
export class CTorch extends CGameObject {}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Client object binding for `CTorridZone` anomaly objects.
|
|
28
|
-
*
|
|
29
|
-
* @source C++ class CTorridZone : CGameObject
|
|
30
|
-
* @customConstructor CTorridZone
|
|
31
|
-
* @group xr_anomaly
|
|
32
|
-
*/
|
|
33
|
-
export class CTorridZone extends CGameObject {}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Client object binding for `CRadioactiveZone` anomaly objects.
|
|
37
|
-
*
|
|
38
|
-
* @source C++ class CRadioactiveZone : CGameObject
|
|
39
|
-
* @customConstructor CRadioactiveZone
|
|
40
|
-
* @group xr_anomaly
|
|
41
|
-
*/
|
|
42
|
-
export class CRadioactiveZone extends CGameObject {}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Client object binding for `CMincer` anomaly objects.
|
|
46
|
-
*
|
|
47
|
-
* @source C++ class CMincer : CGameObject
|
|
48
|
-
* @customConstructor CMincer
|
|
49
|
-
* @group xr_anomaly
|
|
50
|
-
*/
|
|
51
|
-
export class CMincer extends CGameObject {}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Client object binding for `CFracture` anomaly objects.
|
|
55
|
-
*
|
|
56
|
-
* @source C++ class CFracture : CGameObject
|
|
57
|
-
* @customConstructor CFracture
|
|
58
|
-
* @group xr_anomaly
|
|
59
|
-
*/
|
|
60
|
-
export class CFracture extends CGameObject {}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Client object binding for `CHairsZone` anomaly objects.
|
|
64
|
-
*
|
|
65
|
-
* @source C++ class CHairsZone : CGameObject
|
|
66
|
-
* @customConstructor CHairsZone
|
|
67
|
-
* @group xr_anomaly
|
|
68
|
-
*/
|
|
69
|
-
export class CHairsZone extends CGameObject {}
|
|
70
|
-
}
|