xray16 1.0.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 -0
- package/README.md +57 -0
- package/package.json +38 -0
- package/plugins/built_at_info.ts +18 -0
- package/plugins/from_cast_utils.ts +34 -0
- package/plugins/global_declarations_transform.ts +24 -0
- package/plugins/inject_filename.ts +22 -0
- package/plugins/strip_lua_logger.ts +73 -0
- package/plugins/transform_luabind_class/plugin.ts +51 -0
- package/plugins/transform_luabind_class/transformation/class_declaration.ts +226 -0
- package/plugins/transform_luabind_class/transformation/constants.ts +4 -0
- package/plugins/transform_luabind_class/transformation/decorators.ts +16 -0
- package/plugins/transform_luabind_class/transformation/errors.ts +31 -0
- package/plugins/transform_luabind_class/transformation/index.ts +5 -0
- package/plugins/transform_luabind_class/transformation/members/accessors.ts +48 -0
- package/plugins/transform_luabind_class/transformation/members/constructor.ts +107 -0
- package/plugins/transform_luabind_class/transformation/members/fields.ts +53 -0
- package/plugins/transform_luabind_class/transformation/members/method.ts +70 -0
- package/plugins/transform_luabind_class/transformation/new.ts +14 -0
- package/plugins/transform_luabind_class/transformation/setup.ts +128 -0
- package/plugins/transform_luabind_class/transformation/super.ts +92 -0
- package/plugins/transform_luabind_class/transformation/utils.ts +90 -0
- package/plugins/utils/diagnostics.ts +24 -0
- package/src/index.d.ts +63 -0
- package/src/xr_constant.d.ts +976 -0
- package/src/xr_core.d.ts +347 -0
- package/src/xr_global.d.ts +613 -0
- package/src/xr_lib/xr_fs.d.ts +333 -0
- package/src/xr_lib/xr_math.d.ts +165 -0
- package/src/xr_lib/xr_utils.d.ts +407 -0
- package/src/xr_luabind.d.ts +34 -0
- package/src/xr_map/xr_map.d.ts +42 -0
- package/src/xr_object/xr_action.d.ts +482 -0
- package/src/xr_object/xr_alife.d.ts +206 -0
- package/src/xr_object/xr_anomaly.d.ts +50 -0
- package/src/xr_object/xr_artefact.d.ts +98 -0
- package/src/xr_object/xr_client_object.d.ts +1255 -0
- package/src/xr_object/xr_creature.d.ts +157 -0
- package/src/xr_object/xr_dialog.d.ts +34 -0
- package/src/xr_object/xr_item.d.ts +239 -0
- package/src/xr_object/xr_level.d.ts +166 -0
- package/src/xr_object/xr_physic.d.ts +119 -0
- package/src/xr_object/xr_quest.d.ts +47 -0
- package/src/xr_object/xr_server_object.d.ts +686 -0
- package/src/xr_online/xr_multiplayer.d.ts +299 -0
- package/src/xr_sound/xr_sound.d.ts +153 -0
- package/src/xr_type/xr_enums.d.ts +17 -0
- package/src/xr_type/xr_type.d.ts +70 -0
- package/src/xr_ui/README.md +277 -0
- package/src/xr_ui/demo/CServerList.png +0 -0
- package/src/xr_ui/demo/CUI3tButton.png +0 -0
- package/src/xr_ui/demo/CUICheckButton.png +0 -0
- package/src/xr_ui/demo/CUIComboBox.png +0 -0
- package/src/xr_ui/demo/CUICustomEdit.png +0 -0
- package/src/xr_ui/demo/CUIStatic.png +0 -0
- package/src/xr_ui/demo/CUITrackBar.png +0 -0
- package/src/xr_ui/xr_ui_core.d.ts +185 -0
- package/src/xr_ui/xr_ui_interface.d.ts +666 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* @source C++ class world_state
|
|
4
|
+
* @customConstructor world_state
|
|
5
|
+
* @group xr_action
|
|
6
|
+
*/
|
|
7
|
+
export class world_state extends EngineBinding {
|
|
8
|
+
public constructor();
|
|
9
|
+
public constructor(world_state: world_state);
|
|
10
|
+
|
|
11
|
+
public add_property(world_property: world_property): void;
|
|
12
|
+
public clear(): void;
|
|
13
|
+
public includes(world_state: world_state): boolean;
|
|
14
|
+
public property(value: u32): world_property;
|
|
15
|
+
public remove_property(value: u32): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @source C++ class entity_action
|
|
20
|
+
* @customConstructor entity_action
|
|
21
|
+
* @group xr_action
|
|
22
|
+
*/
|
|
23
|
+
export class entity_action extends EngineBinding {
|
|
24
|
+
public constructor();
|
|
25
|
+
public constructor(entity: entity_action);
|
|
26
|
+
|
|
27
|
+
public set_action(move: move): void;
|
|
28
|
+
public set_action(look: look): void;
|
|
29
|
+
public set_action(anim: anim): void;
|
|
30
|
+
public set_action(sound: sound): void;
|
|
31
|
+
public set_action(particle: particle): void;
|
|
32
|
+
public set_action(objec: XR_object): void;
|
|
33
|
+
public set_action(cond: cond): void;
|
|
34
|
+
|
|
35
|
+
public move(): boolean;
|
|
36
|
+
public particle(): boolean;
|
|
37
|
+
public completed(): boolean;
|
|
38
|
+
public object(): boolean;
|
|
39
|
+
public all(): boolean;
|
|
40
|
+
public time(): boolean;
|
|
41
|
+
public look(): boolean;
|
|
42
|
+
public sound(): boolean;
|
|
43
|
+
public anim(): boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @group xr_action
|
|
48
|
+
*/
|
|
49
|
+
export type TXR_entity_action = move | look | anim | sound | particle | XR_object | cond;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @source C++ class move
|
|
53
|
+
* @customConstructor move
|
|
54
|
+
* @group xr_action
|
|
55
|
+
*/
|
|
56
|
+
export class move extends EngineBinding {
|
|
57
|
+
// todo: All enums are in one static, probably should declare few parent interfaces / classes with enums
|
|
58
|
+
public static readonly crouch: 0;
|
|
59
|
+
|
|
60
|
+
public static readonly back: 4;
|
|
61
|
+
public static readonly criteria: 2;
|
|
62
|
+
|
|
63
|
+
public static readonly curve: 0;
|
|
64
|
+
public static readonly curve_criteria: 2;
|
|
65
|
+
|
|
66
|
+
public static readonly default: 0;
|
|
67
|
+
public static readonly dodge: 1;
|
|
68
|
+
public static readonly down: 64;
|
|
69
|
+
public static readonly drag: 3;
|
|
70
|
+
public static readonly force: 1;
|
|
71
|
+
public static readonly fwd: 2;
|
|
72
|
+
public static readonly handbrake: 128;
|
|
73
|
+
public static readonly jump: 4;
|
|
74
|
+
public static readonly left: 8;
|
|
75
|
+
|
|
76
|
+
public static readonly line: 0;
|
|
77
|
+
public static readonly none: 1;
|
|
78
|
+
public static readonly off: 512;
|
|
79
|
+
public static readonly on: 256;
|
|
80
|
+
public static readonly right: 16;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Fast run movement type, not sprint but generic fast movement.
|
|
84
|
+
*/
|
|
85
|
+
public static readonly run: 1;
|
|
86
|
+
public static readonly run_fwd: 2;
|
|
87
|
+
public static readonly run_with_leader: 7;
|
|
88
|
+
public static readonly stand: 2;
|
|
89
|
+
public static readonly standing: 1;
|
|
90
|
+
public static readonly steal: 5;
|
|
91
|
+
public static readonly up: 32;
|
|
92
|
+
/**
|
|
93
|
+
* Normal walk movement type, generic movement type used in most cases.
|
|
94
|
+
*/
|
|
95
|
+
public static readonly walk: 0;
|
|
96
|
+
|
|
97
|
+
public static readonly walk_fwd: 0;
|
|
98
|
+
public static readonly walk_bkwd: 1;
|
|
99
|
+
public static readonly walk_with_leader: 6;
|
|
100
|
+
|
|
101
|
+
public constructor();
|
|
102
|
+
public constructor(action: unknown);
|
|
103
|
+
public constructor(action: unknown, value: number);
|
|
104
|
+
public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, game_object: game_object);
|
|
105
|
+
public constructor(
|
|
106
|
+
bodyState: number,
|
|
107
|
+
movementType: TXR_move,
|
|
108
|
+
pathType: unknown,
|
|
109
|
+
game_object: game_object,
|
|
110
|
+
value: f32
|
|
111
|
+
);
|
|
112
|
+
public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, patrol: patrol);
|
|
113
|
+
public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, patrol: patrol, value: f32);
|
|
114
|
+
public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, vector: vector);
|
|
115
|
+
public constructor(bodyState: number, movementType: TXR_move, pathType: unknown, vector: vector, value: f32);
|
|
116
|
+
public constructor(vector: vector, value: number);
|
|
117
|
+
public constructor(moveAction: TXR_move, vector: vector);
|
|
118
|
+
public constructor(moveAction: TXR_move, patrol: patrol);
|
|
119
|
+
public constructor(moveAction: TXR_move, game_object: game_object);
|
|
120
|
+
public constructor(moveAction: TXR_move, vector: vector, value: number);
|
|
121
|
+
public constructor(moveAction: TXR_move, value: number, vector: vector);
|
|
122
|
+
public constructor(moveAction: TXR_move, value: number, vector: vector, value2: number);
|
|
123
|
+
public constructor(moveAction: TXR_move, patrol: patrol, value: number);
|
|
124
|
+
public constructor(moveAction: TXR_move, game_object: game_object, value: f32);
|
|
125
|
+
public constructor(moveAction: TXR_move, vector: vector, value: f32, speedParam: number);
|
|
126
|
+
public constructor(moveAction: TXR_move, patrol: patrol, value: f32, speedParam: number);
|
|
127
|
+
public constructor(moveAction: TXR_move, game_object: game_object, value: number, speedParam: unknown);
|
|
128
|
+
|
|
129
|
+
public completed(): boolean;
|
|
130
|
+
public path(EDetailPathType: number): void;
|
|
131
|
+
public move(EMovementType: number): void;
|
|
132
|
+
public position(vector: vector): void;
|
|
133
|
+
public input(EInputKeys: number): void;
|
|
134
|
+
public patrol(patrolPath: unknown, shared_str: string): void;
|
|
135
|
+
public object(game_object: game_object): void;
|
|
136
|
+
public body(EBodyState: number): void;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @group xr_action
|
|
141
|
+
*/
|
|
142
|
+
export type TXR_move = EnumeratedStaticsValues<typeof move>;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @source C++ class patrol
|
|
146
|
+
* @customConstructor patrol
|
|
147
|
+
* @group xr_action
|
|
148
|
+
*/
|
|
149
|
+
export class patrol extends EngineBinding {
|
|
150
|
+
// EPatrolRouteType:
|
|
151
|
+
public static readonly stop: 0;
|
|
152
|
+
// public static readonly stop: 1;
|
|
153
|
+
|
|
154
|
+
// EPatrolStartType:
|
|
155
|
+
public static readonly start: 0;
|
|
156
|
+
public static readonly continue: 1;
|
|
157
|
+
public static readonly nearest: 2;
|
|
158
|
+
public static readonly custom: 3;
|
|
159
|
+
public static readonly next: 4;
|
|
160
|
+
public static readonly dummy: -1;
|
|
161
|
+
|
|
162
|
+
public constructor(name: string);
|
|
163
|
+
public constructor(name: string);
|
|
164
|
+
public constructor(name: string, startType: TXR_patrol_type);
|
|
165
|
+
public constructor(name: string, startType: TXR_patrol_type, routeType: TXR_patrol_type);
|
|
166
|
+
public constructor(name: string, startType: TXR_patrol_type, routeType: TXR_patrol_type, bool: boolean);
|
|
167
|
+
public constructor(name: string, startType: TXR_patrol_type, routeType: TXR_patrol_type, bool: boolean, int: u32);
|
|
168
|
+
|
|
169
|
+
public count(): u32;
|
|
170
|
+
public flag(value1: u32, value2: u8): boolean;
|
|
171
|
+
public flag(value1: u32, value2: string): boolean;
|
|
172
|
+
public flags(point_index: u32): flags32;
|
|
173
|
+
public game_vertex_id(value: u32): u16;
|
|
174
|
+
public get_nearest(vector: vector): u32;
|
|
175
|
+
public index(value: string): u32;
|
|
176
|
+
public level_vertex_id(value: u32): u32;
|
|
177
|
+
public name(point_index: u32): string;
|
|
178
|
+
public point(index: u32): vector;
|
|
179
|
+
public terminal(point_index: u32): boolean;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @group xr_action
|
|
184
|
+
*/
|
|
185
|
+
export type TXR_patrol_type = EnumeratedStaticsValues<typeof patrol>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @source C++ class look
|
|
189
|
+
* @customConstructor look
|
|
190
|
+
* @group xr_action
|
|
191
|
+
*/
|
|
192
|
+
export class look extends EngineBinding {
|
|
193
|
+
public static readonly cur_dir: 0;
|
|
194
|
+
public static readonly danger: 5;
|
|
195
|
+
public static readonly direction: 2;
|
|
196
|
+
public static readonly fire_point: 10;
|
|
197
|
+
public static readonly path_dir: 1;
|
|
198
|
+
public static readonly point: 3;
|
|
199
|
+
public static readonly search: 6;
|
|
200
|
+
|
|
201
|
+
public constructor();
|
|
202
|
+
public constructor(sight_type: TXR_SightType);
|
|
203
|
+
public constructor(sight_type: TXR_SightType, vector: vector);
|
|
204
|
+
public constructor(sight_type: TXR_SightType, game_object: game_object);
|
|
205
|
+
public constructor(sight_type: TXR_SightType, game_object: game_object, value: string);
|
|
206
|
+
public constructor(vector: vector, value1: f32, value2: f32);
|
|
207
|
+
public constructor(game_object: game_object, value1: f32, value2: f32);
|
|
208
|
+
|
|
209
|
+
public completed(): boolean;
|
|
210
|
+
public type(sight_type: TXR_SightType): void;
|
|
211
|
+
public object(game_object: game_object): void;
|
|
212
|
+
public bone(bode_id: string): void;
|
|
213
|
+
public direct(vector: Readonly<vector>): void;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @group xr_action
|
|
218
|
+
*/
|
|
219
|
+
export type TXR_look = EnumeratedStaticsValues<typeof look>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @source C++ class anim
|
|
223
|
+
* @customConstructor anim
|
|
224
|
+
* @group xr_action
|
|
225
|
+
*/
|
|
226
|
+
export class anim extends EngineBinding {
|
|
227
|
+
// Mental state:
|
|
228
|
+
public static readonly danger: 0;
|
|
229
|
+
public static readonly free: 1;
|
|
230
|
+
public static readonly panic: 2;
|
|
231
|
+
|
|
232
|
+
// Animation state:
|
|
233
|
+
public static readonly stand_idle: 0;
|
|
234
|
+
public static readonly capture_prepare: 1;
|
|
235
|
+
public static readonly sit_idle: 2;
|
|
236
|
+
public static readonly lie_idle: 3;
|
|
237
|
+
public static readonly eat: 4;
|
|
238
|
+
public static readonly sleep: 5;
|
|
239
|
+
public static readonly rest: 6;
|
|
240
|
+
public static readonly attack: 7;
|
|
241
|
+
public static readonly look_around: 8;
|
|
242
|
+
public static readonly turn: 9;
|
|
243
|
+
|
|
244
|
+
public constructor();
|
|
245
|
+
public constructor(value: string);
|
|
246
|
+
public constructor(value1: string, value2: boolean);
|
|
247
|
+
public constructor(state: number /* enum MonsterSpace::EMentalState */);
|
|
248
|
+
public constructor(state: number /* enum MonsterSpace::EMentalState */, value: i32);
|
|
249
|
+
|
|
250
|
+
public completed(): boolean;
|
|
251
|
+
public type(state: number /* enum MonsterSpace::EMentalState */): void;
|
|
252
|
+
public anim(value: string): void;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @group xr_action
|
|
257
|
+
*/
|
|
258
|
+
export type TXR_animation_key = EnumeratedStaticsKeys<typeof anim>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @group xr_action
|
|
262
|
+
*/
|
|
263
|
+
export type TXR_animation = EnumeratedStaticsValues<typeof anim>;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @source C++ class sound
|
|
267
|
+
* @customConstructor sound
|
|
268
|
+
* @group xr_action
|
|
269
|
+
*/
|
|
270
|
+
export class sound extends EngineBinding {
|
|
271
|
+
public static readonly attack: 3;
|
|
272
|
+
public static readonly attack_hit: 4;
|
|
273
|
+
public static readonly die: 7;
|
|
274
|
+
public static readonly eat: 2;
|
|
275
|
+
public static readonly idle: 1;
|
|
276
|
+
public static readonly panic: 11;
|
|
277
|
+
public static readonly steal: 10;
|
|
278
|
+
public static readonly take_damage: 5;
|
|
279
|
+
public static readonly threaten: 9;
|
|
280
|
+
|
|
281
|
+
public constructor();
|
|
282
|
+
public constructor(value1: string, value2: string);
|
|
283
|
+
public constructor(value1: string, value2: string, vector: vector);
|
|
284
|
+
public constructor(value1: string, value2: string, vector: vector, vector2: vector);
|
|
285
|
+
public constructor(value1: string, value2: string, vector: vector, vector2: vector, value3: boolean);
|
|
286
|
+
public constructor(value1: string, vector: vector);
|
|
287
|
+
public constructor(value1: string, vector: vector, vector2: vector);
|
|
288
|
+
public constructor(value1: string, vector: vector, vector2: vector, value3: boolean);
|
|
289
|
+
public constructor(sound_object: sound_object, value1: string, vector: vector);
|
|
290
|
+
public constructor(sound_object: sound_object, value1: string, vector: vector, vector2: vector);
|
|
291
|
+
public constructor(sound_object: sound_object, value1: string, vector: vector, vector2: vector, value: boolean);
|
|
292
|
+
public constructor(sound_object: sound_object, vector1: vector);
|
|
293
|
+
public constructor(sound_object: sound_object, vector1: vector, vector2: vector);
|
|
294
|
+
public constructor(sound_object: sound_object, vector1: vector, vector2: vector, value: boolean);
|
|
295
|
+
public constructor(type: unknown /* MonsterSound::EType */);
|
|
296
|
+
public constructor(type: unknown /* enum MonsterSound::EType*/, value: number);
|
|
297
|
+
public constructor(value1: string, value2: string, type: unknown /* enum MonsterSpace::EMonsterHeadAnimType */);
|
|
298
|
+
|
|
299
|
+
public set_sound(value: string): void;
|
|
300
|
+
public set_sound(sound_object: sound_object): void;
|
|
301
|
+
public set_position(vector: vector): void;
|
|
302
|
+
public set_bone(value: string): void;
|
|
303
|
+
public set_angles(vector: vector): void;
|
|
304
|
+
public set_sound_type(type: unknown /* ESoundTypes */): void;
|
|
305
|
+
public completed(): boolean;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @group xr_action
|
|
310
|
+
*/
|
|
311
|
+
export type TXR_sound_key = EnumeratedStaticsKeys<typeof sound>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* @group xr_action
|
|
315
|
+
*/
|
|
316
|
+
export type TXR_sound_type = EnumeratedStaticsValues<typeof sound>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @source C++ class cond
|
|
320
|
+
* @customConstructor cond
|
|
321
|
+
* @group xr_action
|
|
322
|
+
*/
|
|
323
|
+
export class cond extends EngineBinding {
|
|
324
|
+
public static readonly move_end: 1;
|
|
325
|
+
public static readonly look_end: 2;
|
|
326
|
+
public static readonly anim_end: 4;
|
|
327
|
+
public static readonly sound_end: 8;
|
|
328
|
+
public static readonly object_end: 32;
|
|
329
|
+
public static readonly time_end: 64;
|
|
330
|
+
public static readonly act_end: 128;
|
|
331
|
+
|
|
332
|
+
public constructor();
|
|
333
|
+
public constructor(value: u32);
|
|
334
|
+
public constructor(value1: u32, value2: f64);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* @group xr_action
|
|
339
|
+
*/
|
|
340
|
+
export type TXR_cond = EnumeratedStaticsValues<typeof cond>;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @source C++ class action_base
|
|
344
|
+
* @customConstructor action_base
|
|
345
|
+
* @group xr_action
|
|
346
|
+
*/
|
|
347
|
+
export class action_base extends EngineBinding {
|
|
348
|
+
public readonly object: game_object;
|
|
349
|
+
public readonly storage: property_storage;
|
|
350
|
+
|
|
351
|
+
public constructor();
|
|
352
|
+
public constructor(object: game_object | null);
|
|
353
|
+
public constructor(object: game_object | null, value: string);
|
|
354
|
+
|
|
355
|
+
public finalize(): void;
|
|
356
|
+
public add_precondition(world_property: world_property): void;
|
|
357
|
+
public execute(): void;
|
|
358
|
+
public remove_precondition(id: u32): void;
|
|
359
|
+
public setup(object: game_object, property_storage: property_storage): void;
|
|
360
|
+
public set_weight(weight: u16): void;
|
|
361
|
+
public add_effect(world_property: world_property): void;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* With mixed / debug build allows investigation of evaluators and actions matches.
|
|
365
|
+
* Helps to debug custom actions and actions pre-conditions with state printing in log files.
|
|
366
|
+
*
|
|
367
|
+
* Note: Available only in mixed / debug engine builds, not for direct usage from lua.
|
|
368
|
+
*/
|
|
369
|
+
public show(value?: string): void;
|
|
370
|
+
public initialize(): void;
|
|
371
|
+
public remove_effect(id: u32): void;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @source C++ class action_planner
|
|
376
|
+
* @customConstructor action_planner
|
|
377
|
+
* @group xr_action
|
|
378
|
+
*/
|
|
379
|
+
export class action_planner extends EngineBinding {
|
|
380
|
+
public readonly object: game_object;
|
|
381
|
+
public readonly storage: property_storage;
|
|
382
|
+
|
|
383
|
+
public constructor();
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* @returns whether object action planner is already initialized
|
|
387
|
+
*/
|
|
388
|
+
public initialized(): boolean;
|
|
389
|
+
public remove_action(value: u32): void;
|
|
390
|
+
public action(value: u32): action_base;
|
|
391
|
+
public add_action(value: u64, action_base: action_base): void;
|
|
392
|
+
public update(): void;
|
|
393
|
+
public clear(): void;
|
|
394
|
+
public evaluator(value: u32): property_evaluator;
|
|
395
|
+
public setup(game_object: game_object): void;
|
|
396
|
+
public set_goal_world_state(world_state: world_state): void;
|
|
397
|
+
public current_action(): action_base;
|
|
398
|
+
public add_evaluator(id: u32, property_evaluator: property_evaluator): void;
|
|
399
|
+
public remove_evaluator(value: u32): void;
|
|
400
|
+
public current_action_id(): u32;
|
|
401
|
+
public actual(): boolean;
|
|
402
|
+
|
|
403
|
+
public show(char: string): void;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @source C++ class planner_action : action_planner,action_base
|
|
408
|
+
* @customConstructor planner_action
|
|
409
|
+
* @group xr_action
|
|
410
|
+
*/
|
|
411
|
+
export class planner_action extends action_planner {
|
|
412
|
+
public constructor(game_object?: game_object, value?: string);
|
|
413
|
+
|
|
414
|
+
public add_effect(world_property: world_property): unknown;
|
|
415
|
+
public add_precondition(world_property: world_property): void;
|
|
416
|
+
public execute(): unknown;
|
|
417
|
+
public finalize(): void;
|
|
418
|
+
public initialize(): void;
|
|
419
|
+
public remove_effect(id: number): void;
|
|
420
|
+
public remove_precondition(id: number): unknown;
|
|
421
|
+
public set_weight(weight: number): unknown;
|
|
422
|
+
public weight(world_state1: world_state, world_state2: world_state): u16;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Storage of object evaluators cached state for handling of in-game logic.
|
|
427
|
+
*
|
|
428
|
+
* @source C++ class property_storage
|
|
429
|
+
* @customConstructor property_storage
|
|
430
|
+
* @group xr_action
|
|
431
|
+
*/
|
|
432
|
+
export class property_storage extends EngineBinding {
|
|
433
|
+
/**
|
|
434
|
+
* Get property evaluator value by ID.
|
|
435
|
+
*
|
|
436
|
+
* @param value - evaluator property ID
|
|
437
|
+
* @returns evaluation value
|
|
438
|
+
* @throws if property is not declared in storage
|
|
439
|
+
*/
|
|
440
|
+
public property(value: u32): boolean;
|
|
441
|
+
|
|
442
|
+
public set_property(value1: u32, value2: boolean): void;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* @source C++ class property_evaluator
|
|
447
|
+
* @customConstructor property_evaluator
|
|
448
|
+
* @group xr_action
|
|
449
|
+
*/
|
|
450
|
+
export class property_evaluator extends EngineBinding {
|
|
451
|
+
public readonly object: game_object;
|
|
452
|
+
public readonly storage: property_storage;
|
|
453
|
+
|
|
454
|
+
public constructor();
|
|
455
|
+
public constructor(game_object: game_object | null);
|
|
456
|
+
public constructor(game_object: game_object | null, name: string);
|
|
457
|
+
|
|
458
|
+
public evaluate(): boolean;
|
|
459
|
+
public setup(game_object: game_object, property_storage: property_storage): void;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* @source C++ class property_evaluator_const : property_evaluator
|
|
464
|
+
* @customConstructor property_evaluator_const
|
|
465
|
+
* @group xr_action
|
|
466
|
+
*/
|
|
467
|
+
export class property_evaluator_const extends property_evaluator {
|
|
468
|
+
public constructor(value: boolean);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* @source C++ class world_property
|
|
473
|
+
* @customConstructor world_property
|
|
474
|
+
* @group xr_action
|
|
475
|
+
*/
|
|
476
|
+
export class world_property extends EngineBinding {
|
|
477
|
+
public constructor(id: u32, enabled: boolean);
|
|
478
|
+
|
|
479
|
+
public value(): boolean;
|
|
480
|
+
public condition(): u32;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* @source C++ class alife_simulator
|
|
4
|
+
* @customConstructor alife_simulator
|
|
5
|
+
* @group xr_alife
|
|
6
|
+
*/
|
|
7
|
+
export class alife_simulator {
|
|
8
|
+
public actor<T extends cse_alife_creature_actor>(): T;
|
|
9
|
+
public add_in_restriction(monster: cse_alife_monster_abstract, value: u16): void;
|
|
10
|
+
public add_out_restriction(monster: cse_alife_monster_abstract, value: u16): void;
|
|
11
|
+
public create_ammo(
|
|
12
|
+
section: string,
|
|
13
|
+
vector: vector,
|
|
14
|
+
level_vertex_id: u32,
|
|
15
|
+
game_vertex_id: u16,
|
|
16
|
+
pid: u16,
|
|
17
|
+
count: i32
|
|
18
|
+
): cse_abstract;
|
|
19
|
+
public dont_has_info(object_id: u16, info_id: string): boolean;
|
|
20
|
+
public has_info(object_id: u16, info_id: string): boolean;
|
|
21
|
+
public iterate_objects(cb: (object: cse_alife_object) => boolean | void): void;
|
|
22
|
+
public level_id(): u32;
|
|
23
|
+
public level_name<T extends string = string>(value: i32): T;
|
|
24
|
+
public release(cse_abstract: cse_alife_object | null, flag: boolean): void;
|
|
25
|
+
public remove_all_restrictions(value: u16, type: i32 /* enum RestrictionSpace::ERestrictorTypes */): void;
|
|
26
|
+
public remove_in_restriction(monster: cse_alife_monster_abstract, value: u16): void;
|
|
27
|
+
public remove_out_restriction(monster: cse_alife_monster_abstract, value: u16): void;
|
|
28
|
+
public set_interactive(value1: u16, value2: boolean): void;
|
|
29
|
+
public set_switch_distance(distance: f32): void;
|
|
30
|
+
public set_switch_offline(value1: u16, value2: boolean): void;
|
|
31
|
+
public set_switch_online(value1: u16, value2: boolean): void;
|
|
32
|
+
public spawn_id(value: u32): u16;
|
|
33
|
+
public story_object(value: u32): cse_alife_object;
|
|
34
|
+
/**
|
|
35
|
+
* @returns alife server-client switch distance
|
|
36
|
+
*/
|
|
37
|
+
public switch_distance(): f32;
|
|
38
|
+
/**
|
|
39
|
+
* Set alife server-client switch distance.
|
|
40
|
+
*
|
|
41
|
+
* @param distance - distance to set
|
|
42
|
+
*/
|
|
43
|
+
public switch_distance(distance: f32): void;
|
|
44
|
+
/**
|
|
45
|
+
* Set count of object updated in alife per one tick.
|
|
46
|
+
*
|
|
47
|
+
* @param count - count of objects to update per tick
|
|
48
|
+
*/
|
|
49
|
+
public set_objects_per_update(count: u16): void;
|
|
50
|
+
public teleport_object(level_vertex_id: u16, game_vertex_id: u16, int: u32, vector: vector): void;
|
|
51
|
+
public valid_object_id(value: u16): boolean;
|
|
52
|
+
|
|
53
|
+
public kill_entity(monster1: cse_alife_monster_abstract, value?: u16, monster2?: cse_alife_monster_abstract): void;
|
|
54
|
+
|
|
55
|
+
public object<T extends cse_alife_object = cse_alife_object>(id: number, value2?: boolean): T | null;
|
|
56
|
+
|
|
57
|
+
public create<T extends cse_alife_object = cse_alife_object>(value: u32): T;
|
|
58
|
+
public create<T extends cse_alife_object = cse_alife_object>(
|
|
59
|
+
item_section: string,
|
|
60
|
+
position: vector,
|
|
61
|
+
level_vertex_id: u32,
|
|
62
|
+
game_vertex_id: u32,
|
|
63
|
+
pid?: i32
|
|
64
|
+
): T;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @source C++ class CALifeSmartTerrainTask
|
|
69
|
+
* @customConstructor CALifeSmartTerrainTask
|
|
70
|
+
* @group xr_alife
|
|
71
|
+
*/
|
|
72
|
+
export class CALifeSmartTerrainTask {
|
|
73
|
+
public constructor(patrol_path_name: string, patrol_point_index?: u32);
|
|
74
|
+
public constructor(game_vertex_id: u16, level_vertex_id: u32);
|
|
75
|
+
|
|
76
|
+
public level_vertex_id(): u16;
|
|
77
|
+
public game_vertex_id(): u16;
|
|
78
|
+
public position(): vector;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @source C++ class CALifeMonsterBrain
|
|
83
|
+
* @customConstructor CALifeMonsterBrain
|
|
84
|
+
* @group xr_alife
|
|
85
|
+
*/
|
|
86
|
+
export class CAILifeMonsterBrain {
|
|
87
|
+
public constructor(object: unknown);
|
|
88
|
+
|
|
89
|
+
public select_task(forced?: boolean): void;
|
|
90
|
+
public process_task(): void;
|
|
91
|
+
public default_behaviour(): void;
|
|
92
|
+
|
|
93
|
+
public can_choose_alife_tasks(): boolean;
|
|
94
|
+
public can_choose_alife_tasks(value: boolean): void;
|
|
95
|
+
|
|
96
|
+
public on_state_write(packet: net_packet): void;
|
|
97
|
+
public on_state_read(packet: net_packet): void;
|
|
98
|
+
public on_register(): void;
|
|
99
|
+
public on_unregister(): void;
|
|
100
|
+
public on_location_change(): void;
|
|
101
|
+
public on_switch_online(): void;
|
|
102
|
+
public on_switch_offline(): void;
|
|
103
|
+
|
|
104
|
+
public update(forced?: boolean): void;
|
|
105
|
+
public update_script(): void;
|
|
106
|
+
|
|
107
|
+
public perform_attack(): boolean;
|
|
108
|
+
public action_type(tpALifeSchedulable: unknown, index: number, mutual_detection: boolean): unknown;
|
|
109
|
+
public object(): unknown;
|
|
110
|
+
public movement(): unknown;
|
|
111
|
+
public smart_terrain(): unknown;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @source C++ class CALifeMonsterBrain
|
|
116
|
+
* @customConstructor CALifeMonsterBrain
|
|
117
|
+
* @group xr_alife
|
|
118
|
+
*/
|
|
119
|
+
export class CALifeMonsterBrain {
|
|
120
|
+
public movement(): CALifeMonsterMovementManager;
|
|
121
|
+
public update(): void;
|
|
122
|
+
public can_choose_alife_tasks(): boolean;
|
|
123
|
+
public can_choose_alife_tasks(can_choose: boolean): void;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @source C++ class CALifeHumanBrain : CALifeMonsterBrain
|
|
128
|
+
* @customConstructor CALifeHumanBrain
|
|
129
|
+
* @group xr_alife
|
|
130
|
+
*/
|
|
131
|
+
export class CALifeHumanBrain extends CALifeMonsterBrain {}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @source C++ class CALifeMonsterDetailPathManager
|
|
135
|
+
* @customConstructor CALifeMonsterDetailPathManager
|
|
136
|
+
* @group xr_alife
|
|
137
|
+
*/
|
|
138
|
+
export class CALifeMonsterDetailPathManager {
|
|
139
|
+
public completed(): boolean;
|
|
140
|
+
public target(a: number, b: number, vector: vector): void;
|
|
141
|
+
public target(task_id: number): void;
|
|
142
|
+
public target(task: CALifeSmartTerrainTask): void;
|
|
143
|
+
public failed(): boolean;
|
|
144
|
+
public speed(number: f32): f32;
|
|
145
|
+
public speed(): f32;
|
|
146
|
+
public actual(): boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @source C++ class CALifeMonsterMovementManager
|
|
151
|
+
* @customConstructor CALifeMonsterMovementManager
|
|
152
|
+
* @group xr_alife
|
|
153
|
+
*/
|
|
154
|
+
export class CALifeMonsterMovementManager {
|
|
155
|
+
public completed(): boolean;
|
|
156
|
+
public patrol(): CALifeMonsterPatrolPathManager;
|
|
157
|
+
public actual(): boolean;
|
|
158
|
+
public path_type(): number; /* EPathType */
|
|
159
|
+
public detail(): CALifeMonsterDetailPathManager;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @source C++ class CALifeMonsterPatrolPathManager
|
|
164
|
+
* @customConstructor CALifeMonsterPatrolPathManager
|
|
165
|
+
* @group xr_alife
|
|
166
|
+
*/
|
|
167
|
+
export class CALifeMonsterPatrolPathManager {
|
|
168
|
+
public path(string: string): void;
|
|
169
|
+
public target_game_vertex_id(): u16;
|
|
170
|
+
public target_level_vertex_id(): u16;
|
|
171
|
+
public target_position(): vector;
|
|
172
|
+
public completed(): boolean;
|
|
173
|
+
public route_type(type: u32 /* const enum PatrolPathManager::EPatrolRouteType */): u32;
|
|
174
|
+
public route_type(): u32;
|
|
175
|
+
public use_randomness(enabled: boolean): boolean;
|
|
176
|
+
public use_randomness(): boolean;
|
|
177
|
+
public start_type(type: u32 /* const enum PatrolPathManager::EPatrolStartType */): u32;
|
|
178
|
+
public start_type(): u32;
|
|
179
|
+
public start_vertex_index(index: u32): void;
|
|
180
|
+
public actual(): boolean;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @source C++ class cover_point
|
|
185
|
+
* @customConstructor cover_point
|
|
186
|
+
* @group xr_alife
|
|
187
|
+
*/
|
|
188
|
+
export class cover_point {
|
|
189
|
+
private constructor();
|
|
190
|
+
|
|
191
|
+
public level_vertex_id(): u32;
|
|
192
|
+
public is_smart_cover(): boolean;
|
|
193
|
+
public position(): vector;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @source C++ class client_spawn_manager
|
|
198
|
+
* @customConstructor client_spawn_manager
|
|
199
|
+
* @group xr_alife
|
|
200
|
+
*/
|
|
201
|
+
export class client_spawn_manager {
|
|
202
|
+
public remove(number1: u16, number2: u16): void;
|
|
203
|
+
public add(number1: u16, number2: u16, cb: () => void): void;
|
|
204
|
+
public add(number1: u16, number2: u16, cb: () => void, object: XR_object): void;
|
|
205
|
+
}
|
|
206
|
+
}
|