xray16 1.6.0 → 1.6.1
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 +30847 -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
package/types/xr_ai/xr_goap.d.ts
DELETED
|
@@ -1,1118 +0,0 @@
|
|
|
1
|
-
import type { Nillable } from "../internal";
|
|
2
|
-
|
|
3
|
-
declare module "xray16" {
|
|
4
|
-
/**
|
|
5
|
-
* GOAP property and action id constants for stalker AI.
|
|
6
|
-
*
|
|
7
|
-
* @source C++ class stalker_ids
|
|
8
|
-
* @customConstructor stalker_ids
|
|
9
|
-
* @group xr_goap
|
|
10
|
-
*/
|
|
11
|
-
export class stalker_ids {
|
|
12
|
-
/**
|
|
13
|
-
* Engine enum value for `stalker_ids.action_accomplish_task`.
|
|
14
|
-
*/
|
|
15
|
-
public static readonly action_accomplish_task: 7;
|
|
16
|
-
/**
|
|
17
|
-
* Engine enum value for `stalker_ids.action_aim_enemy`.
|
|
18
|
-
*/
|
|
19
|
-
public static readonly action_aim_enemy: 16;
|
|
20
|
-
/**
|
|
21
|
-
* Engine enum value for `stalker_ids.action_alife_planner`.
|
|
22
|
-
*/
|
|
23
|
-
public static readonly action_alife_planner: 88;
|
|
24
|
-
/**
|
|
25
|
-
* Engine enum value for `stalker_ids.action_anomaly_planner`.
|
|
26
|
-
*/
|
|
27
|
-
public static readonly action_anomaly_planner: 90;
|
|
28
|
-
/**
|
|
29
|
-
* Engine enum value for `stalker_ids.action_combat_planner`.
|
|
30
|
-
*/
|
|
31
|
-
public static readonly action_combat_planner: 89;
|
|
32
|
-
/**
|
|
33
|
-
* Engine enum value for `stalker_ids.action_communicate_with_customer`.
|
|
34
|
-
*/
|
|
35
|
-
public static readonly action_communicate_with_customer: 9;
|
|
36
|
-
/**
|
|
37
|
-
* Engine enum value for `stalker_ids.action_critically_wounded`.
|
|
38
|
-
*/
|
|
39
|
-
public static readonly action_critically_wounded: 36;
|
|
40
|
-
/**
|
|
41
|
-
* Engine enum value for `stalker_ids.action_danger_by_sound_planner`.
|
|
42
|
-
*/
|
|
43
|
-
public static readonly action_danger_by_sound_planner: 73;
|
|
44
|
-
/**
|
|
45
|
-
* Engine enum value for `stalker_ids.action_danger_grenade_look_around`.
|
|
46
|
-
*/
|
|
47
|
-
public static readonly action_danger_grenade_look_around: 85;
|
|
48
|
-
/**
|
|
49
|
-
* Engine enum value for `stalker_ids.action_danger_grenade_planner`.
|
|
50
|
-
*/
|
|
51
|
-
public static readonly action_danger_grenade_planner: 72;
|
|
52
|
-
/**
|
|
53
|
-
* Engine enum value for `stalker_ids.action_danger_grenade_search`.
|
|
54
|
-
*/
|
|
55
|
-
public static readonly action_danger_grenade_search: 86;
|
|
56
|
-
/**
|
|
57
|
-
* Engine enum value for `stalker_ids.action_danger_grenade_take_cover`.
|
|
58
|
-
*/
|
|
59
|
-
public static readonly action_danger_grenade_take_cover: 82;
|
|
60
|
-
/**
|
|
61
|
-
* Engine enum value for `stalker_ids.action_danger_grenade_take_cover_after_explosion`.
|
|
62
|
-
*/
|
|
63
|
-
public static readonly action_danger_grenade_take_cover_after_explosion: 84;
|
|
64
|
-
/**
|
|
65
|
-
* Engine enum value for `stalker_ids.action_danger_grenade_wait_for_explosion`.
|
|
66
|
-
*/
|
|
67
|
-
public static readonly action_danger_grenade_wait_for_explosion: 83;
|
|
68
|
-
/**
|
|
69
|
-
* Engine enum value for `stalker_ids.action_danger_in_direction_detour`.
|
|
70
|
-
*/
|
|
71
|
-
public static readonly action_danger_in_direction_detour: 80;
|
|
72
|
-
/**
|
|
73
|
-
* Engine enum value for `stalker_ids.action_danger_in_direction_hold_position`.
|
|
74
|
-
*/
|
|
75
|
-
public static readonly action_danger_in_direction_hold_position: 79;
|
|
76
|
-
/**
|
|
77
|
-
* Engine enum value for `stalker_ids.action_danger_in_direction_look_out`.
|
|
78
|
-
*/
|
|
79
|
-
public static readonly action_danger_in_direction_look_out: 78;
|
|
80
|
-
/**
|
|
81
|
-
* Engine enum value for `stalker_ids.action_danger_in_direction_planner`.
|
|
82
|
-
*/
|
|
83
|
-
public static readonly action_danger_in_direction_planner: 71;
|
|
84
|
-
/**
|
|
85
|
-
* Engine enum value for `stalker_ids.action_danger_in_direction_search`.
|
|
86
|
-
*/
|
|
87
|
-
public static readonly action_danger_in_direction_search: 81;
|
|
88
|
-
/**
|
|
89
|
-
* Engine enum value for `stalker_ids.action_danger_in_direction_take_cover`.
|
|
90
|
-
*/
|
|
91
|
-
public static readonly action_danger_in_direction_take_cover: 77;
|
|
92
|
-
/**
|
|
93
|
-
* Engine enum value for `stalker_ids.action_danger_planner`.
|
|
94
|
-
*/
|
|
95
|
-
public static readonly action_danger_planner: 91;
|
|
96
|
-
/**
|
|
97
|
-
* Engine enum value for `stalker_ids.action_danger_unknown_look_around`.
|
|
98
|
-
*/
|
|
99
|
-
public static readonly action_danger_unknown_look_around: 75;
|
|
100
|
-
/**
|
|
101
|
-
* Engine enum value for `stalker_ids.action_danger_unknown_planner`.
|
|
102
|
-
*/
|
|
103
|
-
public static readonly action_danger_unknown_planner: 70;
|
|
104
|
-
/**
|
|
105
|
-
* Engine enum value for `stalker_ids.action_danger_unknown_search`.
|
|
106
|
-
*/
|
|
107
|
-
public static readonly action_danger_unknown_search: 76;
|
|
108
|
-
/**
|
|
109
|
-
* Engine enum value for `stalker_ids.action_danger_unknown_take_cover`.
|
|
110
|
-
*/
|
|
111
|
-
public static readonly action_danger_unknown_take_cover: 74;
|
|
112
|
-
/**
|
|
113
|
-
* Engine enum value for `stalker_ids.action_dead`.
|
|
114
|
-
*/
|
|
115
|
-
public static readonly action_dead: 0;
|
|
116
|
-
/**
|
|
117
|
-
* Engine enum value for `stalker_ids.action_death_planner`.
|
|
118
|
-
*/
|
|
119
|
-
public static readonly action_death_planner: 87;
|
|
120
|
-
/**
|
|
121
|
-
* Engine enum value for `stalker_ids.action_detour_enemy`.
|
|
122
|
-
*/
|
|
123
|
-
public static readonly action_detour_enemy: 25;
|
|
124
|
-
/**
|
|
125
|
-
* Engine enum value for `stalker_ids.action_dying`.
|
|
126
|
-
*/
|
|
127
|
-
public static readonly action_dying: 1;
|
|
128
|
-
/**
|
|
129
|
-
* Engine enum value for `stalker_ids.action_find_ammo`.
|
|
130
|
-
*/
|
|
131
|
-
public static readonly action_find_ammo: 15;
|
|
132
|
-
/**
|
|
133
|
-
* Engine enum value for `stalker_ids.action_find_item_to_kill`.
|
|
134
|
-
*/
|
|
135
|
-
public static readonly action_find_item_to_kill: 13;
|
|
136
|
-
/**
|
|
137
|
-
* Engine enum value for `stalker_ids.action_gather_items`.
|
|
138
|
-
*/
|
|
139
|
-
public static readonly action_gather_items: 2;
|
|
140
|
-
/**
|
|
141
|
-
* Engine enum value for `stalker_ids.action_get_distance`.
|
|
142
|
-
*/
|
|
143
|
-
public static readonly action_get_distance: 24;
|
|
144
|
-
/**
|
|
145
|
-
* Engine enum value for `stalker_ids.action_get_item_to_kill`.
|
|
146
|
-
*/
|
|
147
|
-
public static readonly action_get_item_to_kill: 12;
|
|
148
|
-
/**
|
|
149
|
-
* Engine enum value for `stalker_ids.action_get_ready_to_kill`.
|
|
150
|
-
*/
|
|
151
|
-
public static readonly action_get_ready_to_kill: 17;
|
|
152
|
-
/**
|
|
153
|
-
* Engine enum value for `stalker_ids.action_hold_position`.
|
|
154
|
-
*/
|
|
155
|
-
public static readonly action_hold_position: 23;
|
|
156
|
-
/**
|
|
157
|
-
* Engine enum value for `stalker_ids.action_kill_enemy`.
|
|
158
|
-
*/
|
|
159
|
-
public static readonly action_kill_enemy: 19;
|
|
160
|
-
/**
|
|
161
|
-
* Engine enum value for `stalker_ids.action_kill_enemy_if_not_visible`.
|
|
162
|
-
*/
|
|
163
|
-
public static readonly action_kill_enemy_if_not_visible: 29;
|
|
164
|
-
/**
|
|
165
|
-
* Engine enum value for `stalker_ids.action_kill_if_enemy_critically_wounded`.
|
|
166
|
-
*/
|
|
167
|
-
public static readonly action_kill_if_enemy_critically_wounded: 37;
|
|
168
|
-
/**
|
|
169
|
-
* Engine enum value for `stalker_ids.action_kill_if_player_on_the_path`.
|
|
170
|
-
*/
|
|
171
|
-
public static readonly action_kill_if_player_on_the_path: 35;
|
|
172
|
-
/**
|
|
173
|
-
* Engine enum value for `stalker_ids.action_kill_wounded_enemy`.
|
|
174
|
-
*/
|
|
175
|
-
public static readonly action_kill_wounded_enemy: 33;
|
|
176
|
-
/**
|
|
177
|
-
* Engine enum value for `stalker_ids.action_look_out`.
|
|
178
|
-
*/
|
|
179
|
-
public static readonly action_look_out: 22;
|
|
180
|
-
/**
|
|
181
|
-
* Engine enum value for `stalker_ids.action_make_item_killing`.
|
|
182
|
-
*/
|
|
183
|
-
public static readonly action_make_item_killing: 14;
|
|
184
|
-
/**
|
|
185
|
-
* Engine enum value for `stalker_ids.action_no_alife`.
|
|
186
|
-
*/
|
|
187
|
-
public static readonly action_no_alife: 3;
|
|
188
|
-
/**
|
|
189
|
-
* Engine enum value for `stalker_ids.action_post_combat_wait`.
|
|
190
|
-
*/
|
|
191
|
-
public static readonly action_post_combat_wait: 34;
|
|
192
|
-
/**
|
|
193
|
-
* Engine enum value for `stalker_ids.action_prepare_wounded_enemy`.
|
|
194
|
-
*/
|
|
195
|
-
public static readonly action_prepare_wounded_enemy: 32;
|
|
196
|
-
/**
|
|
197
|
-
* Engine enum value for `stalker_ids.action_reach_customer_location`.
|
|
198
|
-
*/
|
|
199
|
-
public static readonly action_reach_customer_location: 8;
|
|
200
|
-
/**
|
|
201
|
-
* Engine enum value for `stalker_ids.action_reach_task_location`.
|
|
202
|
-
*/
|
|
203
|
-
public static readonly action_reach_task_location: 6;
|
|
204
|
-
/**
|
|
205
|
-
* Engine enum value for `stalker_ids.action_reach_wounded_enemy`.
|
|
206
|
-
*/
|
|
207
|
-
public static readonly action_reach_wounded_enemy: 30;
|
|
208
|
-
/**
|
|
209
|
-
* Engine enum value for `stalker_ids.action_retreat_from_enemy`.
|
|
210
|
-
*/
|
|
211
|
-
public static readonly action_retreat_from_enemy: 20;
|
|
212
|
-
/**
|
|
213
|
-
* Engine enum value for `stalker_ids.action_script`.
|
|
214
|
-
*/
|
|
215
|
-
public static readonly action_script: 92;
|
|
216
|
-
/**
|
|
217
|
-
* Engine enum value for `stalker_ids.action_search_enemy`.
|
|
218
|
-
*/
|
|
219
|
-
public static readonly action_search_enemy: 26;
|
|
220
|
-
/**
|
|
221
|
-
* Engine enum value for `stalker_ids.action_smart_terrain_task`.
|
|
222
|
-
*/
|
|
223
|
-
public static readonly action_smart_terrain_task: 4;
|
|
224
|
-
/**
|
|
225
|
-
* Engine enum value for `stalker_ids.action_solve_zone_puzzle`.
|
|
226
|
-
*/
|
|
227
|
-
public static readonly action_solve_zone_puzzle: 5;
|
|
228
|
-
/**
|
|
229
|
-
* Engine enum value for `stalker_ids.action_sudden_attack`.
|
|
230
|
-
*/
|
|
231
|
-
public static readonly action_sudden_attack: 28;
|
|
232
|
-
/**
|
|
233
|
-
* Engine enum value for `stalker_ids.action_take_cover`.
|
|
234
|
-
*/
|
|
235
|
-
public static readonly action_take_cover: 21;
|
|
236
|
-
/**
|
|
237
|
-
* Engine enum value for `stalker_ids.detect_anomaly`.
|
|
238
|
-
*/
|
|
239
|
-
public static readonly detect_anomaly: 11;
|
|
240
|
-
/**
|
|
241
|
-
* Engine enum value for `stalker_ids.get_out_of_anomaly`.
|
|
242
|
-
*/
|
|
243
|
-
public static readonly get_out_of_anomaly: 10;
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Engine enum value for `stalker_ids.property_alife`.
|
|
247
|
-
*/
|
|
248
|
-
public static readonly property_alife: 3;
|
|
249
|
-
/**
|
|
250
|
-
* Whether object is alive.
|
|
251
|
-
*/
|
|
252
|
-
public static readonly property_alive: 0;
|
|
253
|
-
/**
|
|
254
|
-
* Engine enum value for `stalker_ids.property_already_dead`.
|
|
255
|
-
*/
|
|
256
|
-
public static readonly property_already_dead: 2;
|
|
257
|
-
/**
|
|
258
|
-
* Engine enum value for `stalker_ids.property_anomaly`.
|
|
259
|
-
*/
|
|
260
|
-
public static readonly property_anomaly: 46;
|
|
261
|
-
/**
|
|
262
|
-
* Engine enum value for `stalker_ids.property_cover_actual`.
|
|
263
|
-
*/
|
|
264
|
-
public static readonly property_cover_actual: 42;
|
|
265
|
-
/**
|
|
266
|
-
* Engine enum value for `stalker_ids.property_cover_reached`.
|
|
267
|
-
*/
|
|
268
|
-
public static readonly property_cover_reached: 43;
|
|
269
|
-
/**
|
|
270
|
-
* Engine enum value for `stalker_ids.property_critically_wounded`.
|
|
271
|
-
*/
|
|
272
|
-
public static readonly property_critically_wounded: 29;
|
|
273
|
-
/**
|
|
274
|
-
* Engine enum value for `stalker_ids.property_danger`.
|
|
275
|
-
*/
|
|
276
|
-
public static readonly property_danger: 8;
|
|
277
|
-
/**
|
|
278
|
-
* Engine enum value for `stalker_ids.property_danger_by_sound`.
|
|
279
|
-
*/
|
|
280
|
-
public static readonly property_danger_by_sound: 41;
|
|
281
|
-
/**
|
|
282
|
-
* Engine enum value for `stalker_ids.property_danger_grenade`.
|
|
283
|
-
*/
|
|
284
|
-
public static readonly property_danger_grenade: 40;
|
|
285
|
-
/**
|
|
286
|
-
* Engine enum value for `stalker_ids.property_danger_in_direction`.
|
|
287
|
-
*/
|
|
288
|
-
public static readonly property_danger_in_direction: 39;
|
|
289
|
-
/**
|
|
290
|
-
* Engine enum value for `stalker_ids.property_danger_unknown`.
|
|
291
|
-
*/
|
|
292
|
-
public static readonly property_danger_unknown: 38;
|
|
293
|
-
/**
|
|
294
|
-
* Engine enum value for `stalker_ids.property_dead`.
|
|
295
|
-
*/
|
|
296
|
-
public static readonly property_dead: 1;
|
|
297
|
-
/**
|
|
298
|
-
* Whether object has any enemy.
|
|
299
|
-
*/
|
|
300
|
-
public static readonly property_enemy: 7;
|
|
301
|
-
/**
|
|
302
|
-
* Engine enum value for `stalker_ids.property_enemy_critically_wounded`.
|
|
303
|
-
*/
|
|
304
|
-
public static readonly property_enemy_critically_wounded: 30;
|
|
305
|
-
/**
|
|
306
|
-
* Engine enum value for `stalker_ids.property_enemy_detoured`.
|
|
307
|
-
*/
|
|
308
|
-
public static readonly property_enemy_detoured: 21;
|
|
309
|
-
/**
|
|
310
|
-
* Engine enum value for `stalker_ids.property_found_ammo`.
|
|
311
|
-
*/
|
|
312
|
-
public static readonly property_found_ammo: 12;
|
|
313
|
-
/**
|
|
314
|
-
* Engine enum value for `stalker_ids.property_found_item_to_kill`.
|
|
315
|
-
*/
|
|
316
|
-
public static readonly property_found_item_to_kill: 10;
|
|
317
|
-
/**
|
|
318
|
-
* Engine enum value for `stalker_ids.property_grenade_exploded`.
|
|
319
|
-
*/
|
|
320
|
-
public static readonly property_grenade_exploded: 45;
|
|
321
|
-
/**
|
|
322
|
-
* Engine enum value for `stalker_ids.property_in_cover`.
|
|
323
|
-
*/
|
|
324
|
-
public static readonly property_in_cover: 18;
|
|
325
|
-
/**
|
|
326
|
-
* Engine enum value for `stalker_ids.property_inside_anomaly`.
|
|
327
|
-
*/
|
|
328
|
-
public static readonly property_inside_anomaly: 47;
|
|
329
|
-
/**
|
|
330
|
-
* Engine enum value for `stalker_ids.property_item_can_kill`.
|
|
331
|
-
*/
|
|
332
|
-
public static readonly property_item_can_kill: 11;
|
|
333
|
-
/**
|
|
334
|
-
* Engine enum value for `stalker_ids.property_item_to_kill`.
|
|
335
|
-
*/
|
|
336
|
-
public static readonly property_item_to_kill: 9;
|
|
337
|
-
/**
|
|
338
|
-
* Whether object has valuable items to be looted after death.
|
|
339
|
-
*/
|
|
340
|
-
public static readonly property_items: 6;
|
|
341
|
-
/**
|
|
342
|
-
* Engine enum value for `stalker_ids.property_looked_around`.
|
|
343
|
-
*/
|
|
344
|
-
public static readonly property_looked_around: 44;
|
|
345
|
-
/**
|
|
346
|
-
* Engine enum value for `stalker_ids.property_looked_out`.
|
|
347
|
-
*/
|
|
348
|
-
public static readonly property_looked_out: 19;
|
|
349
|
-
/**
|
|
350
|
-
* Whether object should panic.
|
|
351
|
-
*/
|
|
352
|
-
public static readonly property_panic: 17;
|
|
353
|
-
/**
|
|
354
|
-
* Engine enum value for `stalker_ids.property_position_holded`.
|
|
355
|
-
*/
|
|
356
|
-
public static readonly property_position_holded: 20;
|
|
357
|
-
/**
|
|
358
|
-
* Engine enum value for `stalker_ids.property_pure_enemy`.
|
|
359
|
-
*/
|
|
360
|
-
public static readonly property_pure_enemy: 23;
|
|
361
|
-
/**
|
|
362
|
-
* Whether object has solved zone puzzle.
|
|
363
|
-
* Originally alife was different and it was end goal of each stalker.
|
|
364
|
-
* To solve zone puzzle stalkers collected artefacts, did quests etc.
|
|
365
|
-
*/
|
|
366
|
-
public static readonly property_puzzle_solved: 4;
|
|
367
|
-
/**
|
|
368
|
-
* Engine enum value for `stalker_ids.property_ready_to_detour`.
|
|
369
|
-
*/
|
|
370
|
-
public static readonly property_ready_to_detour: 14;
|
|
371
|
-
/**
|
|
372
|
-
* Engine enum value for `stalker_ids.property_ready_to_kill`.
|
|
373
|
-
*/
|
|
374
|
-
public static readonly property_ready_to_kill: 13;
|
|
375
|
-
/**
|
|
376
|
-
* Engine enum value for `stalker_ids.property_script`.
|
|
377
|
-
*/
|
|
378
|
-
public static readonly property_script: 74;
|
|
379
|
-
/**
|
|
380
|
-
* Whether object see enemy.
|
|
381
|
-
*/
|
|
382
|
-
public static readonly property_see_enemy: 15;
|
|
383
|
-
/**
|
|
384
|
-
* Engine enum value for `stalker_ids.property_smart_terrain_task`.
|
|
385
|
-
*/
|
|
386
|
-
public static readonly property_smart_terrain_task: 5;
|
|
387
|
-
/**
|
|
388
|
-
* Engine enum value for `stalker_ids.property_use_crouch_to_look_out`.
|
|
389
|
-
*/
|
|
390
|
-
public static readonly property_use_crouch_to_look_out: 24;
|
|
391
|
-
/**
|
|
392
|
-
* Engine enum value for `stalker_ids.property_use_suddenness`.
|
|
393
|
-
*/
|
|
394
|
-
public static readonly property_use_suddenness: 22;
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Engine enum value for `stalker_ids.sound_alarm`.
|
|
398
|
-
*/
|
|
399
|
-
public static readonly sound_alarm: 4;
|
|
400
|
-
/**
|
|
401
|
-
* Engine enum value for `stalker_ids.sound_attack_allies_several_enemies`.
|
|
402
|
-
*/
|
|
403
|
-
public static readonly sound_attack_allies_several_enemies: 7;
|
|
404
|
-
/**
|
|
405
|
-
* Engine enum value for `stalker_ids.sound_attack_allies_single_enemy`.
|
|
406
|
-
*/
|
|
407
|
-
public static readonly sound_attack_allies_single_enemy: 6;
|
|
408
|
-
/**
|
|
409
|
-
* Engine enum value for `stalker_ids.sound_attack_no_allies`.
|
|
410
|
-
*/
|
|
411
|
-
public static readonly sound_attack_no_allies: 5;
|
|
412
|
-
/**
|
|
413
|
-
* Engine enum value for `stalker_ids.sound_backup`.
|
|
414
|
-
*/
|
|
415
|
-
public static readonly sound_backup: 8;
|
|
416
|
-
/**
|
|
417
|
-
* Engine enum value for `stalker_ids.sound_detour`.
|
|
418
|
-
*/
|
|
419
|
-
public static readonly sound_detour: 9;
|
|
420
|
-
/**
|
|
421
|
-
* Engine enum value for `stalker_ids.sound_die`.
|
|
422
|
-
*/
|
|
423
|
-
public static readonly sound_die: 0;
|
|
424
|
-
/**
|
|
425
|
-
* Engine enum value for `stalker_ids.sound_die_in_anomaly`.
|
|
426
|
-
*/
|
|
427
|
-
public static readonly sound_die_in_anomaly: 1;
|
|
428
|
-
/**
|
|
429
|
-
* Engine enum value for `stalker_ids.sound_enemy_critically_wounded`.
|
|
430
|
-
*/
|
|
431
|
-
public static readonly sound_enemy_critically_wounded: 24;
|
|
432
|
-
/**
|
|
433
|
-
* Engine enum value for `stalker_ids.sound_enemy_killed_or_wounded`.
|
|
434
|
-
*/
|
|
435
|
-
public static readonly sound_enemy_killed_or_wounded = -805289984;
|
|
436
|
-
/**
|
|
437
|
-
* Engine enum value for `stalker_ids.sound_enemy_lost_no_allies`.
|
|
438
|
-
*/
|
|
439
|
-
public static readonly sound_enemy_lost_no_allies: 12;
|
|
440
|
-
/**
|
|
441
|
-
* Engine enum value for `stalker_ids.sound_enemy_lost_with_allies`.
|
|
442
|
-
*/
|
|
443
|
-
public static readonly sound_enemy_lost_with_allies: 13;
|
|
444
|
-
/**
|
|
445
|
-
* Engine enum value for `stalker_ids.sound_friendly_grenade_alarm`.
|
|
446
|
-
*/
|
|
447
|
-
public static readonly sound_friendly_grenade_alarm: 20;
|
|
448
|
-
/**
|
|
449
|
-
* Engine enum value for `stalker_ids.sound_grenade_alarm`.
|
|
450
|
-
*/
|
|
451
|
-
public static readonly sound_grenade_alarm: 19;
|
|
452
|
-
/**
|
|
453
|
-
* Engine enum value for `stalker_ids.sound_humming`.
|
|
454
|
-
*/
|
|
455
|
-
public static readonly sound_humming: 3;
|
|
456
|
-
/**
|
|
457
|
-
* Engine enum value for `stalker_ids.sound_injuring`.
|
|
458
|
-
*/
|
|
459
|
-
public static readonly sound_injuring: 2;
|
|
460
|
-
/**
|
|
461
|
-
* Engine enum value for `stalker_ids.sound_injuring_by_friend`.
|
|
462
|
-
*/
|
|
463
|
-
public static readonly sound_injuring_by_friend: 14;
|
|
464
|
-
/**
|
|
465
|
-
* Engine enum value for `stalker_ids.sound_kill_wounded`.
|
|
466
|
-
*/
|
|
467
|
-
public static readonly sound_kill_wounded: 23;
|
|
468
|
-
/**
|
|
469
|
-
* Engine enum value for `stalker_ids.sound_need_backup`.
|
|
470
|
-
*/
|
|
471
|
-
public static readonly sound_need_backup: 21;
|
|
472
|
-
/**
|
|
473
|
-
* Engine enum value for `stalker_ids.sound_panic_human`.
|
|
474
|
-
*/
|
|
475
|
-
public static readonly sound_panic_human: 15;
|
|
476
|
-
/**
|
|
477
|
-
* Engine enum value for `stalker_ids.sound_panic_monster`.
|
|
478
|
-
*/
|
|
479
|
-
public static readonly sound_panic_monster: 16;
|
|
480
|
-
/**
|
|
481
|
-
* Engine enum value for `stalker_ids.sound_running_in_danger`.
|
|
482
|
-
*/
|
|
483
|
-
public static readonly sound_running_in_danger: 22;
|
|
484
|
-
/**
|
|
485
|
-
* Engine enum value for `stalker_ids.sound_script`.
|
|
486
|
-
*/
|
|
487
|
-
public static readonly sound_script: 27;
|
|
488
|
-
/**
|
|
489
|
-
* Engine enum value for `stalker_ids.sound_search1_no_allies`.
|
|
490
|
-
*/
|
|
491
|
-
public static readonly sound_search1_no_allies: 11;
|
|
492
|
-
/**
|
|
493
|
-
* Engine enum value for `stalker_ids.sound_search1_with_allies`.
|
|
494
|
-
*/
|
|
495
|
-
public static readonly sound_search1_with_allies: 10;
|
|
496
|
-
/**
|
|
497
|
-
* Engine enum value for `stalker_ids.sound_tolls`.
|
|
498
|
-
*/
|
|
499
|
-
public static readonly sound_tolls: 17;
|
|
500
|
-
/**
|
|
501
|
-
* Engine enum value for `stalker_ids.sound_wounded`.
|
|
502
|
-
*/
|
|
503
|
-
public static readonly sound_wounded: 18;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Create an ids constants wrapper.
|
|
507
|
-
*/
|
|
508
|
-
public constructor();
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Generic container object for GOAP world properties.
|
|
513
|
-
*
|
|
514
|
-
* @source C++ class world_property
|
|
515
|
-
* @customConstructor world_property
|
|
516
|
-
* @group xr_goap
|
|
517
|
-
*/
|
|
518
|
-
export class world_property extends EngineBinding {
|
|
519
|
-
/**
|
|
520
|
-
* Default constructor to describe a pair of identifier and value.
|
|
521
|
-
*
|
|
522
|
-
* @param id - Identifier of unique world property.
|
|
523
|
-
* @param enabled - Value of property state.
|
|
524
|
-
*/
|
|
525
|
-
public constructor(id: u32, enabled: boolean);
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* @returns Value of current world property.
|
|
529
|
-
*/
|
|
530
|
-
public value(): boolean;
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* @returns Condition identifier of current world property.
|
|
534
|
-
*/
|
|
535
|
-
public condition(): u32;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* World state describing whole world state in action planning.
|
|
540
|
-
*
|
|
541
|
-
* Overrides operators: `<`, `==`.
|
|
542
|
-
*
|
|
543
|
-
* @source C++ class world_state
|
|
544
|
-
* @customConstructor world_state
|
|
545
|
-
* @group xr_goap
|
|
546
|
-
*/
|
|
547
|
-
export class world_state extends EngineBinding {
|
|
548
|
-
/**
|
|
549
|
-
* Default constructor.
|
|
550
|
-
*/
|
|
551
|
-
public constructor();
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Copy constructor.
|
|
555
|
-
*
|
|
556
|
-
* @param another_state - Target world state to copy.
|
|
557
|
-
*/
|
|
558
|
-
public constructor(another_state: world_state);
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Set property for world state.
|
|
562
|
-
*
|
|
563
|
-
* @param property - Target property to add in world state.
|
|
564
|
-
*/
|
|
565
|
-
public add_property(property: world_property): void;
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Clear all properties in the state.
|
|
569
|
-
*/
|
|
570
|
-
public clear(): void;
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* Check if provided state is subset of current one.
|
|
574
|
-
*
|
|
575
|
-
* @param state - Target state to check.
|
|
576
|
-
* @returns Whether current world state includes provided state.
|
|
577
|
-
*/
|
|
578
|
-
public includes(state: world_state): boolean;
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Get world property by id.
|
|
582
|
-
*
|
|
583
|
-
* @param id - Numeric if of the required property.
|
|
584
|
-
* @returns Property id/state based on provided id.
|
|
585
|
-
*/
|
|
586
|
-
public property(id: u32): world_property;
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Remove world property from current world state.
|
|
590
|
-
*
|
|
591
|
-
* @param id - Identifier of the property to remove.
|
|
592
|
-
*/
|
|
593
|
-
public remove_property(id: u32): void;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Storage of object evaluators cached state for handling of in-game logic.
|
|
598
|
-
* Container for actions.
|
|
599
|
-
*
|
|
600
|
-
* @source C++ class property_storage
|
|
601
|
-
* @customConstructor property_storage
|
|
602
|
-
* @group xr_goap
|
|
603
|
-
*/
|
|
604
|
-
export class property_storage extends EngineBinding {
|
|
605
|
-
/**
|
|
606
|
-
* Get property evaluator value by `id`.
|
|
607
|
-
*
|
|
608
|
-
* @throws If property is not declared in storage.
|
|
609
|
-
*
|
|
610
|
-
* @param id - Unique identifier of the world property.
|
|
611
|
-
* @returns Current value for provided `id`.
|
|
612
|
-
*/
|
|
613
|
-
public property(id: u32): boolean;
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* Set property value in the storage.
|
|
617
|
-
*
|
|
618
|
-
* @param id - Unique identifier of the world property.
|
|
619
|
-
* @param value - Value for provided `id`.
|
|
620
|
-
*/
|
|
621
|
-
public set_property(id: u32, value: boolean): void;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* Class implementation of world properties evaluators.
|
|
626
|
-
* Generic handler to calculate current state of bound world property `id`.
|
|
627
|
-
*
|
|
628
|
-
* @source C++ class property_evaluator
|
|
629
|
-
* @customConstructor property_evaluator
|
|
630
|
-
* @group xr_goap
|
|
631
|
-
*/
|
|
632
|
-
export class property_evaluator extends EngineBinding {
|
|
633
|
-
/**
|
|
634
|
-
* Linked game object to work with.
|
|
635
|
-
*/
|
|
636
|
-
public readonly object: game_object;
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Container reference with state of action preconditions.
|
|
640
|
-
*/
|
|
641
|
-
public readonly storage: property_storage;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Default constructor.
|
|
645
|
-
*/
|
|
646
|
-
public constructor();
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* @param object - Target game object to work with, `null` is OK since correct object will be injected on setup.
|
|
650
|
-
*/
|
|
651
|
-
public constructor(object: Nillable<game_object>);
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* @param object - Target game object to work with, `null` is OK since correct object will be injected on setup.
|
|
655
|
-
* @param name - Name of the evaluator, used for debug purposes mainly.
|
|
656
|
-
*/
|
|
657
|
-
public constructor(object: Nillable<game_object>, name: string);
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* Handle setup of the evaluator and binding to a specific object.
|
|
661
|
-
*
|
|
662
|
-
* @remarks
|
|
663
|
-
* Called by the planner when the evaluator is registered. Call it manually only for standalone evaluator tests.
|
|
664
|
-
*
|
|
665
|
-
* @param object - Target client object to work with.
|
|
666
|
-
* @param storage - Action instance storage with preconditions and state.
|
|
667
|
-
*/
|
|
668
|
-
public setup(object: game_object, storage: property_storage): void;
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* Main evaluator lifecycle method.
|
|
672
|
-
* Called every time to get world property up-to-date state.
|
|
673
|
-
*
|
|
674
|
-
* @returns Current evaluator value.
|
|
675
|
-
*/
|
|
676
|
-
public evaluate(): boolean;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Class implementation of world properties evaluators.
|
|
681
|
-
* Static handler to return pre-defined value for specific world property `id`.
|
|
682
|
-
*
|
|
683
|
-
* @source C++ class property_evaluator_const : property_evaluator
|
|
684
|
-
* @customConstructor property_evaluator_const
|
|
685
|
-
* @group xr_goap
|
|
686
|
-
*/
|
|
687
|
-
export class property_evaluator_const extends property_evaluator {
|
|
688
|
-
/**
|
|
689
|
-
* @param value - Constant value for evaluation.
|
|
690
|
-
*/
|
|
691
|
-
public constructor(value: boolean);
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* Abstract class for implementation of GOAP planner actions.
|
|
696
|
-
*
|
|
697
|
-
* @source C++ class action_base
|
|
698
|
-
* @customConstructor action_base
|
|
699
|
-
* @group xr_goap
|
|
700
|
-
*/
|
|
701
|
-
export abstract class action_base extends EngineBinding {
|
|
702
|
-
/**
|
|
703
|
-
* Game object that is handled by current action instance.
|
|
704
|
-
*/
|
|
705
|
-
public readonly object: game_object;
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Container reference with state of action preconditions.
|
|
709
|
-
*/
|
|
710
|
-
public readonly storage: property_storage;
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Default constructor.
|
|
714
|
-
*/
|
|
715
|
-
public constructor();
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* @param object - Target game object to work with, `null` is OK since correct object will be injected on setup.
|
|
719
|
-
*/
|
|
720
|
-
public constructor(object?: Nillable<game_object>);
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* @param object - Target game object to work with, `null` is OK since correct object will be injected on setup.
|
|
724
|
-
* @param name - Name of the action, used for debug purposes mainly.
|
|
725
|
-
*/
|
|
726
|
-
public constructor(object: Nillable<game_object>, name: string);
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Handle setup of the action and binding to a specific object.
|
|
730
|
-
*
|
|
731
|
-
* @remarks
|
|
732
|
-
* Called by the planner when the action is registered. Call it manually only for standalone action tests.
|
|
733
|
-
*
|
|
734
|
-
* @param object - Target client object to work with.
|
|
735
|
-
* @param storage - Action instance storage with preconditions and state.
|
|
736
|
-
*/
|
|
737
|
-
public setup(object: game_object, storage: property_storage): void;
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* Lifecycle method called once on action execution start.
|
|
741
|
-
* Means that lifecycle of the action begun.
|
|
742
|
-
*
|
|
743
|
-
* @remarks
|
|
744
|
-
* Called by the owning planner. Direct calls are only useful when driving an action manually in tests or tools.
|
|
745
|
-
*/
|
|
746
|
-
public initialize(): void;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* Lifecycle method.
|
|
750
|
-
* Execution tick of the action, called from object logics update cycle when current action is active.
|
|
751
|
-
*
|
|
752
|
-
* @remarks
|
|
753
|
-
* Called by the owning planner after `initialize`. Direct calls bypass planner state.
|
|
754
|
-
*/
|
|
755
|
-
public execute(): void;
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Lifecycle method called once on action execution stop.
|
|
759
|
-
* Means that action is finished / preconditions are not met anymore.
|
|
760
|
-
*
|
|
761
|
-
* @remarks
|
|
762
|
-
* Called by the owning planner. Direct calls are only useful when driving an action manually in tests or tools.
|
|
763
|
-
*/
|
|
764
|
-
public finalize(): void;
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Set weight of current action execution.
|
|
768
|
-
*
|
|
769
|
-
* @param weight - Weight value to express how prioritized action is.
|
|
770
|
-
*/
|
|
771
|
-
public set_weight(weight: u16): void;
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* Add action effect.
|
|
775
|
-
* Describes what target world state is expected to be if action is completed.
|
|
776
|
-
*
|
|
777
|
-
* @remarks
|
|
778
|
-
* Do not mutate effects while the owner planner is updating; the engine asserts on graph changes during solving.
|
|
779
|
-
*
|
|
780
|
-
* @param property - World state property describing a pair of evaluator ID and value.
|
|
781
|
-
*/
|
|
782
|
-
public add_effect(property: world_property): void;
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
* Remove action effect.
|
|
786
|
-
* Action will be not considered as property changing for `id` anymore.
|
|
787
|
-
*
|
|
788
|
-
* @remarks
|
|
789
|
-
* Do not mutate effects while the owner planner is updating; the engine asserts on graph changes during solving.
|
|
790
|
-
*
|
|
791
|
-
* @param id - World state property id.
|
|
792
|
-
*/
|
|
793
|
-
public remove_effect(id: u32): void;
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Add action execution precondition.
|
|
797
|
-
* When building logics graph, action will be considered blocked by some preconditions.
|
|
798
|
-
*
|
|
799
|
-
* @remarks
|
|
800
|
-
* Do not mutate preconditions while the owner planner is updating; the engine asserts on graph changes during
|
|
801
|
-
* solving.
|
|
802
|
-
*
|
|
803
|
-
* @param property - World state property describing a pair of evaluator ID and value.
|
|
804
|
-
*/
|
|
805
|
-
public add_precondition(property: world_property): void;
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* Remove precondition for action.
|
|
809
|
-
* When building logics graph, action will not be considered blocked by evaluator `id` states.
|
|
810
|
-
*
|
|
811
|
-
* @remarks
|
|
812
|
-
* Do not mutate preconditions while the owner planner is updating; the engine asserts on graph changes during
|
|
813
|
-
* solving.
|
|
814
|
-
*
|
|
815
|
-
* @param id - World state property id.
|
|
816
|
-
*/
|
|
817
|
-
public remove_precondition(id: u32): void;
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* Debug method.
|
|
821
|
-
* With mixed / debug build allows investigation of evaluators and actions matches.
|
|
822
|
-
* Helps to debug custom actions and actions pre-conditions with state printing in log files.
|
|
823
|
-
*
|
|
824
|
-
* Note: Available only in mixed / debug engine builds, not for direct usage from lua.
|
|
825
|
-
*
|
|
826
|
-
* @param prefix - String prefix to display current action state in logs.
|
|
827
|
-
*/
|
|
828
|
-
public show(prefix?: string): void;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
/**
|
|
832
|
-
* Script action planner binding for GOAP evaluators and actions.
|
|
833
|
-
*
|
|
834
|
-
* @source C++ class action_planner
|
|
835
|
-
* @customConstructor action_planner
|
|
836
|
-
* @group xr_goap
|
|
837
|
-
*/
|
|
838
|
-
export class action_planner extends EngineBinding {
|
|
839
|
-
/**
|
|
840
|
-
* Game object that is handled by current planner instance.
|
|
841
|
-
*/
|
|
842
|
-
public readonly object: game_object;
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* Container reference with state of planner preconditions.
|
|
846
|
-
*/
|
|
847
|
-
public readonly storage: property_storage;
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Default constructor.
|
|
851
|
-
*/
|
|
852
|
-
public constructor();
|
|
853
|
-
|
|
854
|
-
/**
|
|
855
|
-
* @returns Whether object action planner is already initialized.
|
|
856
|
-
*/
|
|
857
|
-
public initialized(): boolean;
|
|
858
|
-
|
|
859
|
-
/**
|
|
860
|
-
* @returns Whether state of current planner is actual.
|
|
861
|
-
*/
|
|
862
|
-
public actual(): boolean;
|
|
863
|
-
|
|
864
|
-
/**
|
|
865
|
-
* Setup planner for game object.
|
|
866
|
-
*
|
|
867
|
-
* @throws If `object` is missing.
|
|
868
|
-
*
|
|
869
|
-
* @param object - Client game object to setup planner for.
|
|
870
|
-
*/
|
|
871
|
-
public setup(object: game_object): void;
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* Clear state of current action planner.
|
|
875
|
-
*/
|
|
876
|
-
public clear(): void;
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* Lifecycle method to handle generic game loop updates.
|
|
880
|
-
*
|
|
881
|
-
* @throws If the planner cannot build a non-empty action sequence to the target world state.
|
|
882
|
-
*/
|
|
883
|
-
public update(): void;
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* Add generic action by `id` for planner execution.
|
|
887
|
-
*
|
|
888
|
-
* @remarks
|
|
889
|
-
* Do not add actions from evaluator/action callbacks running inside `update`; the engine asserts on planner graph
|
|
890
|
-
* changes during solving.
|
|
891
|
-
*
|
|
892
|
-
* @param id - Unique identifier of new action.
|
|
893
|
-
* @param action - Action implementation containing preconditions, logics, effects and other meta infos.
|
|
894
|
-
*/
|
|
895
|
-
public add_action(id: u32, action: action_base): void;
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* Remove action by unique `id`.
|
|
899
|
-
*
|
|
900
|
-
* @remarks
|
|
901
|
-
* Do not remove actions from evaluator/action callbacks running inside `update`; the engine asserts on planner
|
|
902
|
-
* graph changes during solving.
|
|
903
|
-
*
|
|
904
|
-
* @param id - Unique identifier of the action to remove.
|
|
905
|
-
*/
|
|
906
|
-
public remove_action(id: u32): void;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* Get action instance by unique `id`.
|
|
910
|
-
*
|
|
911
|
-
* @param id - Unique identifier of the action to get.
|
|
912
|
-
* @returns Registered action instance.
|
|
913
|
-
*/
|
|
914
|
-
public action(id: u32): action_base;
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* Get currently active action being executed.
|
|
918
|
-
*
|
|
919
|
-
* @remarks
|
|
920
|
-
* Requires the planner to be initialized, usually after a successful `update`.
|
|
921
|
-
*
|
|
922
|
-
* @returns Current action instance reference.
|
|
923
|
-
*/
|
|
924
|
-
public current_action(): action_base;
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* Get currently active action identifier.
|
|
928
|
-
*
|
|
929
|
-
* @throws If the planner is not initialized yet.
|
|
930
|
-
*
|
|
931
|
-
* @returns Unique identifier of current action.
|
|
932
|
-
*/
|
|
933
|
-
public current_action_id(): u32;
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* Set target world state to try to reach with all the graph logics.
|
|
937
|
-
* All graphs will be built from current state to goal world state with the shortest possible path.
|
|
938
|
-
*
|
|
939
|
-
* @param state - Target world state to reach with planner.
|
|
940
|
-
*/
|
|
941
|
-
public set_goal_world_state(state: world_state): void;
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* Add evaluator instance for current action planner.
|
|
945
|
-
*
|
|
946
|
-
* @remarks
|
|
947
|
-
* Do not add evaluators from evaluator/action callbacks running inside `update`; the engine asserts on planner
|
|
948
|
-
* graph changes during solving.
|
|
949
|
-
*
|
|
950
|
-
* @param id - Unique identifier of the evaluator.
|
|
951
|
-
* @param evaluator - Instance of evaluator linked to the `id`.
|
|
952
|
-
*/
|
|
953
|
-
public add_evaluator(id: u32, evaluator: property_evaluator): void;
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* Remove evaluator instance from current action planner.
|
|
957
|
-
*
|
|
958
|
-
* @remarks
|
|
959
|
-
* Do not remove evaluators from evaluator/action callbacks running inside `update`; the engine asserts on planner
|
|
960
|
-
* graph changes during solving.
|
|
961
|
-
*
|
|
962
|
-
* @param id - Unique identifier of the evaluator for removal.
|
|
963
|
-
*/
|
|
964
|
-
public remove_evaluator(id: u32): void;
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* Get evaluator instance by `id`.
|
|
968
|
-
*
|
|
969
|
-
* @param id - Unique identifier of the evaluator to get.
|
|
970
|
-
* @returns Registered property evaluator.
|
|
971
|
-
*/
|
|
972
|
-
public evaluator(id: u32): property_evaluator;
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* Debug method.
|
|
976
|
-
* With mixed / debug build allows investigation of evaluators and actions matches.
|
|
977
|
-
* Helps to debug custom actions and actions pre-conditions with state printing in log files.
|
|
978
|
-
*
|
|
979
|
-
* Note: Available only in mixed / debug engine builds, not for direct usage from lua.
|
|
980
|
-
*
|
|
981
|
-
* @param prefix - String prefix to display current action state in logs.
|
|
982
|
-
*/
|
|
983
|
-
public show(prefix: string): void;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* GOAP action class implementing both action base and action planner.
|
|
988
|
-
* Captures execution as action and plans its internal logic with separate logics graph.
|
|
989
|
-
*
|
|
990
|
-
* Examples: combat planner, anomaly planner, items looting planner, alife planner, state planner.
|
|
991
|
-
*
|
|
992
|
-
* @source C++ class planner_action : action_planner,action_base
|
|
993
|
-
* @customConstructor planner_action
|
|
994
|
-
* @group xr_goap
|
|
995
|
-
*/
|
|
996
|
-
export class planner_action extends action_planner {
|
|
997
|
-
/**
|
|
998
|
-
* Default constructor.
|
|
999
|
-
*/
|
|
1000
|
-
public constructor();
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* @param object - Target game object to work with, `null` is OK since correct object will be injected on setup.
|
|
1004
|
-
*/
|
|
1005
|
-
public constructor(object?: Nillable<game_object>);
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* @param object - Target game object to work with, `null` is OK since correct object will be injected on setup.
|
|
1009
|
-
* @param name - Name of the action, used for debug purposes mainly.
|
|
1010
|
-
*/
|
|
1011
|
-
public constructor(object: Nillable<game_object>, name: string);
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Lifecycle method called once on action execution start.
|
|
1015
|
-
* Means that lifecycle of the action begun.
|
|
1016
|
-
*
|
|
1017
|
-
* @remarks
|
|
1018
|
-
* Called by the owning outer planner. Direct calls are only useful when driving the planner action manually in
|
|
1019
|
-
* tests or tools.
|
|
1020
|
-
*/
|
|
1021
|
-
public initialize(): void;
|
|
1022
|
-
|
|
1023
|
-
/**
|
|
1024
|
-
* Lifecycle method called once on action execution stop.
|
|
1025
|
-
* Means that action is finished / preconditions are not met anymore.
|
|
1026
|
-
*
|
|
1027
|
-
* @remarks
|
|
1028
|
-
* Called by the owning outer planner. Direct calls are only useful when driving the planner action manually in
|
|
1029
|
-
* tests or tools.
|
|
1030
|
-
*/
|
|
1031
|
-
public finalize(): void;
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* Lifecycle method.
|
|
1035
|
-
* Execution tick of the action, called from object logics update cycle when current action is active.
|
|
1036
|
-
*
|
|
1037
|
-
* @remarks
|
|
1038
|
-
* Called by the owning outer planner after `initialize`. Direct calls bypass planner state.
|
|
1039
|
-
*/
|
|
1040
|
-
public execute(): void;
|
|
1041
|
-
|
|
1042
|
-
/**
|
|
1043
|
-
* Add action effect.
|
|
1044
|
-
* Describes what target world state is expected to be if action is completed.
|
|
1045
|
-
*
|
|
1046
|
-
* @remarks
|
|
1047
|
-
* Do not mutate effects while the owner planner is updating; the engine asserts on graph changes during solving.
|
|
1048
|
-
*
|
|
1049
|
-
* @param property - World state property describing a pair of evaluator ID and value.
|
|
1050
|
-
*/
|
|
1051
|
-
public add_effect(property: world_property): void;
|
|
1052
|
-
|
|
1053
|
-
/**
|
|
1054
|
-
* Remove action effect.
|
|
1055
|
-
* Action will be not considered as property changing for `id` anymore.
|
|
1056
|
-
*
|
|
1057
|
-
* @remarks
|
|
1058
|
-
* Do not mutate effects while the owner planner is updating; the engine asserts on graph changes during solving.
|
|
1059
|
-
*
|
|
1060
|
-
* @param id - World state property id.
|
|
1061
|
-
*/
|
|
1062
|
-
public remove_effect(id: u32): void;
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Add action execution precondition.
|
|
1066
|
-
* When building logics graph, action will be considered blocked by some preconditions.
|
|
1067
|
-
*
|
|
1068
|
-
* @remarks
|
|
1069
|
-
* Do not mutate preconditions while the owner planner is updating; the engine asserts on graph changes during
|
|
1070
|
-
* solving.
|
|
1071
|
-
*
|
|
1072
|
-
* @param property - World state property describing a pair of evaluator ID and value.
|
|
1073
|
-
*/
|
|
1074
|
-
public add_precondition(property: world_property): void;
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* Remove precondition for action.
|
|
1078
|
-
* When building logics graph, action will not be considered blocked by evaluator `id` states.
|
|
1079
|
-
*
|
|
1080
|
-
* @remarks
|
|
1081
|
-
* Do not mutate preconditions while the owner planner is updating; the engine asserts on graph changes during
|
|
1082
|
-
* solving.
|
|
1083
|
-
*
|
|
1084
|
-
* @param id - World state property id.
|
|
1085
|
-
*/
|
|
1086
|
-
public remove_precondition(id: u32): void;
|
|
1087
|
-
|
|
1088
|
-
/**
|
|
1089
|
-
* Set weight of planner action switch.
|
|
1090
|
-
*
|
|
1091
|
-
* @param weight - Weight value to express how prioritized action is.
|
|
1092
|
-
*/
|
|
1093
|
-
public set_weight(weight: u32): void;
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
* Comparator to check weight of switching one state to another.
|
|
1097
|
-
*
|
|
1098
|
-
* @param first - First state.
|
|
1099
|
-
* @param second - Second state.
|
|
1100
|
-
* @returns Transition weight.
|
|
1101
|
-
*/
|
|
1102
|
-
public weight(first: world_state, second: world_state): u16;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Cast a base action to an action planner when it is implemented as a planner action.
|
|
1107
|
-
*
|
|
1108
|
-
* @group xr_global_declaration
|
|
1109
|
-
*
|
|
1110
|
-
* @remarks
|
|
1111
|
-
* Returns the planner interface only for actions implemented by `planner_action`; other action instances are not
|
|
1112
|
-
* planner-backed.
|
|
1113
|
-
*
|
|
1114
|
-
* @param base_action - Action to cast.
|
|
1115
|
-
* @returns Planner interface for the action, or `null` when the action is not planner-backed.
|
|
1116
|
-
*/
|
|
1117
|
-
export function cast_planner(this: void, base_action: action_base): action_planner;
|
|
1118
|
-
}
|