xray16 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/package.json +7 -3
- package/plugins/inline_constants/plugin.d.ts +14 -0
- package/plugins/inline_constants/plugin.js +44 -0
- package/plugins/inline_constants/transformation/ast.d.ts +60 -0
- package/plugins/inline_constants/transformation/ast.js +185 -0
- package/plugins/inline_constants/transformation/constants.d.ts +14 -0
- package/plugins/inline_constants/transformation/constants.js +27 -0
- package/plugins/inline_constants/transformation/errors.d.ts +24 -0
- package/plugins/inline_constants/transformation/errors.js +16 -0
- package/plugins/inline_constants/transformation/evaluation.d.ts +79 -0
- package/plugins/inline_constants/transformation/evaluation.js +296 -0
- package/plugins/inline_constants/transformation/index.d.ts +6 -0
- package/plugins/inline_constants/transformation/index.js +22 -0
- package/plugins/inline_constants/transformation/transformers.d.ts +27 -0
- package/plugins/inline_constants/transformation/transformers.js +61 -0
- package/plugins/inline_constants/transformation/validation.d.ts +25 -0
- package/plugins/inline_constants/transformation/validation.js +86 -0
- package/xray16.d.ts +1295 -548
package/xray16.d.ts
CHANGED
|
@@ -371,6 +371,21 @@ declare module "xray16" {
|
|
|
371
371
|
*/
|
|
372
372
|
export const object: typeof XR_object;
|
|
373
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Opaque native patrol path handle used by low-level movement action bindings.
|
|
376
|
+
*
|
|
377
|
+
* @source C++ class CPatrolPath
|
|
378
|
+
* @customConstructor CPatrolPath
|
|
379
|
+
* @group xr_action
|
|
380
|
+
*
|
|
381
|
+
* @remarks
|
|
382
|
+
* The engine does not register this as a public Lua constructor. Scripts normally use the public `patrol` parameter
|
|
383
|
+
* object when constructing movement actions; this handle models native code paths that pass a raw patrol path pointer.
|
|
384
|
+
*/
|
|
385
|
+
export class CPatrolPath {
|
|
386
|
+
private constructor();
|
|
387
|
+
}
|
|
388
|
+
|
|
374
389
|
/**
|
|
375
390
|
* Movement action for stalkers, monsters, and vehicles.
|
|
376
391
|
*
|
|
@@ -383,7 +398,6 @@ declare module "xray16" {
|
|
|
383
398
|
* actions. Use the constructor group that matches the object receiving the resulting `entity_action`.
|
|
384
399
|
*/
|
|
385
400
|
export class move extends EngineBinding {
|
|
386
|
-
// Todo: All enums are in one static, probably should declare few parent interfaces / classes with enums
|
|
387
401
|
/**
|
|
388
402
|
* Engine enum value for `move.crouch`.
|
|
389
403
|
*/
|
|
@@ -545,7 +559,7 @@ declare module "xray16" {
|
|
|
545
559
|
* @param pathType - Detail path type id.
|
|
546
560
|
* @param game_object - Target object.
|
|
547
561
|
*/
|
|
548
|
-
public constructor(bodyState:
|
|
562
|
+
public constructor(bodyState: TXR_body_state, movementType: TXR_movement_type, pathType: TXR_detail_path_type, game_object: game_object);
|
|
549
563
|
|
|
550
564
|
/**
|
|
551
565
|
* Move toward an object with a speed value.
|
|
@@ -557,9 +571,9 @@ declare module "xray16" {
|
|
|
557
571
|
* @param value - Speed or distance value.
|
|
558
572
|
*/
|
|
559
573
|
public constructor(
|
|
560
|
-
bodyState:
|
|
561
|
-
movementType:
|
|
562
|
-
pathType:
|
|
574
|
+
bodyState: TXR_body_state,
|
|
575
|
+
movementType: TXR_movement_type,
|
|
576
|
+
pathType: TXR_detail_path_type,
|
|
563
577
|
game_object: game_object,
|
|
564
578
|
value: f32
|
|
565
579
|
);
|
|
@@ -572,7 +586,7 @@ declare module "xray16" {
|
|
|
572
586
|
* @param pathType - Detail path type id.
|
|
573
587
|
* @param patrol - Patrol path parameters.
|
|
574
588
|
*/
|
|
575
|
-
public constructor(bodyState:
|
|
589
|
+
public constructor(bodyState: TXR_body_state, movementType: TXR_movement_type, pathType: TXR_detail_path_type, patrol: patrol);
|
|
576
590
|
|
|
577
591
|
/**
|
|
578
592
|
* Move along a patrol path with a speed value.
|
|
@@ -583,7 +597,7 @@ declare module "xray16" {
|
|
|
583
597
|
* @param patrol - Patrol path parameters.
|
|
584
598
|
* @param value - Speed or distance value.
|
|
585
599
|
*/
|
|
586
|
-
public constructor(bodyState:
|
|
600
|
+
public constructor(bodyState: TXR_body_state, movementType: TXR_movement_type, pathType: TXR_detail_path_type, patrol: patrol, value: f32);
|
|
587
601
|
|
|
588
602
|
/**
|
|
589
603
|
* Move toward a position.
|
|
@@ -593,7 +607,7 @@ declare module "xray16" {
|
|
|
593
607
|
* @param pathType - Detail path type id.
|
|
594
608
|
* @param vector - Target position.
|
|
595
609
|
*/
|
|
596
|
-
public constructor(bodyState:
|
|
610
|
+
public constructor(bodyState: TXR_body_state, movementType: TXR_movement_type, pathType: TXR_detail_path_type, vector: vector);
|
|
597
611
|
|
|
598
612
|
/**
|
|
599
613
|
* Move toward a position with a speed value.
|
|
@@ -604,7 +618,7 @@ declare module "xray16" {
|
|
|
604
618
|
* @param vector - Target position.
|
|
605
619
|
* @param value - Speed or distance value.
|
|
606
620
|
*/
|
|
607
|
-
public constructor(bodyState:
|
|
621
|
+
public constructor(bodyState: TXR_body_state, movementType: TXR_movement_type, pathType: TXR_detail_path_type, vector: vector, value: f32);
|
|
608
622
|
|
|
609
623
|
/**
|
|
610
624
|
* Move toward a position with distance.
|
|
@@ -757,14 +771,14 @@ declare module "xray16" {
|
|
|
757
771
|
*
|
|
758
772
|
* @param pathType - Detail path type id.
|
|
759
773
|
*/
|
|
760
|
-
public path(pathType:
|
|
774
|
+
public path(pathType: TXR_detail_path_type): void;
|
|
761
775
|
|
|
762
776
|
/**
|
|
763
777
|
* Set movement type.
|
|
764
778
|
*
|
|
765
779
|
* @param movementType - Movement type id.
|
|
766
780
|
*/
|
|
767
|
-
public move(movementType:
|
|
781
|
+
public move(movementType: TXR_movement_type): void;
|
|
768
782
|
|
|
769
783
|
/**
|
|
770
784
|
* Set target position.
|
|
@@ -781,12 +795,18 @@ declare module "xray16" {
|
|
|
781
795
|
public input(inputKey: number): void;
|
|
782
796
|
|
|
783
797
|
/**
|
|
784
|
-
* Set patrol path.
|
|
798
|
+
* Set patrol path from a native patrol path pointer.
|
|
785
799
|
*
|
|
786
|
-
* @
|
|
787
|
-
*
|
|
800
|
+
* @source `src/xrGame/script_movement_action_script.cpp`, `move.patrol` binding.
|
|
801
|
+
*
|
|
802
|
+
* @remarks
|
|
803
|
+
* This low-level binding expects an internal `CPatrolPath*`, not the public `patrol` parameter object. Prefer the
|
|
804
|
+
* movement action constructors that accept `patrol` unless native code passes a raw patrol path pointer.
|
|
805
|
+
*
|
|
806
|
+
* @param patrolPath - Internal native patrol path handle.
|
|
807
|
+
* @param path_name - Patrol path name copied into the movement action.
|
|
788
808
|
*/
|
|
789
|
-
public patrol(patrolPath:
|
|
809
|
+
public patrol(patrolPath: CPatrolPath, path_name: string): void;
|
|
790
810
|
|
|
791
811
|
/**
|
|
792
812
|
* Set target object.
|
|
@@ -800,20 +820,69 @@ declare module "xray16" {
|
|
|
800
820
|
*
|
|
801
821
|
* @param bodyState - Body state id.
|
|
802
822
|
*/
|
|
803
|
-
public body(bodyState:
|
|
823
|
+
public body(bodyState: TXR_body_state): void;
|
|
804
824
|
}
|
|
805
825
|
|
|
806
826
|
/**
|
|
827
|
+
* Movement action constants exposed by the `move` class.
|
|
828
|
+
*
|
|
807
829
|
* @group xr_action
|
|
808
830
|
*/
|
|
809
831
|
export type TXR_move = EnumeratedStaticsValues<typeof move>;
|
|
810
832
|
|
|
833
|
+
/**
|
|
834
|
+
* Body-state constants accepted by stalker movement actions.
|
|
835
|
+
*
|
|
836
|
+
* @source `src/xrGame/script_movement_action_script.cpp`, `move.body` enum.
|
|
837
|
+
* @group xr_action
|
|
838
|
+
*/
|
|
839
|
+
export type TXR_body_state = typeof move.crouch | typeof move.standing;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Movement-type constants accepted by stalker movement actions.
|
|
843
|
+
*
|
|
844
|
+
* @source `src/xrGame/script_movement_action_script.cpp`, `move.move` enum.
|
|
845
|
+
* @group xr_action
|
|
846
|
+
*/
|
|
847
|
+
export type TXR_movement_type = typeof move.walk | typeof move.run | typeof move.stand;
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* Detail-path constants accepted by stalker movement actions.
|
|
851
|
+
*
|
|
852
|
+
* @source `src/xrGame/script_movement_action_script.cpp`, `move.path` enum.
|
|
853
|
+
* @group xr_action
|
|
854
|
+
*/
|
|
855
|
+
export type TXR_detail_path_type = typeof move.line | typeof move.dodge | typeof move.criteria;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Patrol start mode accepted by native patrol path managers.
|
|
859
|
+
*
|
|
860
|
+
* @source C++ enum EPatrolStartType
|
|
861
|
+
* @group xr_action
|
|
862
|
+
*
|
|
863
|
+
* @remarks
|
|
864
|
+
* `1` is the native `ePatrolStartTypeLast` value. The Lua `patrol` constants do not expose a dedicated name for it.
|
|
865
|
+
*/
|
|
866
|
+
export type TXR_patrol_start_type = -1 | 0 | 1 | 2 | 3 | 4;
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Patrol route behavior accepted by native patrol path managers.
|
|
870
|
+
*
|
|
871
|
+
* @source C++ enum EPatrolRouteType
|
|
872
|
+
* @group xr_action
|
|
873
|
+
*/
|
|
874
|
+
export type TXR_patrol_route_type = typeof patrol.stop | typeof patrol.continue | typeof patrol.dummy;
|
|
875
|
+
|
|
811
876
|
/**
|
|
812
877
|
* Patrol path parameters used by movement actions.
|
|
813
878
|
*
|
|
814
|
-
* @source
|
|
879
|
+
* @source `src/xrAICore/Navigation/PatrolPath/patrol_path_params_script.cpp`, `CPatrolPathParams` binding.
|
|
815
880
|
* @customConstructor patrol
|
|
816
881
|
* @group xr_action
|
|
882
|
+
*
|
|
883
|
+
* @remarks
|
|
884
|
+
* The Lua-visible `patrol` class stores a patrol path name, start mode, route mode, randomization flag, and optional
|
|
885
|
+
* custom point index. Movement action constructors copy those values into the native movement action.
|
|
817
886
|
*/
|
|
818
887
|
export class patrol extends EngineBinding {
|
|
819
888
|
/**
|
|
@@ -851,18 +920,22 @@ declare module "xray16" {
|
|
|
851
920
|
/**
|
|
852
921
|
* Create patrol path parameters.
|
|
853
922
|
*
|
|
923
|
+
* @remarks
|
|
924
|
+
* The native constructor resolves `name` through patrol path storage. Missing patrol paths can assert in debug
|
|
925
|
+
* builds. Use `patrol.custom` with `customPointIndex` to start from an explicit patrol point.
|
|
926
|
+
*
|
|
854
927
|
* @param name - Patrol path name.
|
|
855
|
-
* @param startType - Patrol start
|
|
856
|
-
* @param routeType - Patrol route
|
|
857
|
-
* @param
|
|
858
|
-
* @param
|
|
928
|
+
* @param startType - Patrol start mode.
|
|
929
|
+
* @param routeType - Patrol route mode.
|
|
930
|
+
* @param random - Whether random point selection is enabled.
|
|
931
|
+
* @param customPointIndex - Custom start point index.
|
|
859
932
|
*/
|
|
860
933
|
public constructor(
|
|
861
934
|
name?: string,
|
|
862
|
-
startType?:
|
|
863
|
-
routeType?:
|
|
864
|
-
|
|
865
|
-
|
|
935
|
+
startType?: TXR_patrol_start_type,
|
|
936
|
+
routeType?: TXR_patrol_route_type,
|
|
937
|
+
random?: boolean,
|
|
938
|
+
customPointIndex?: u32
|
|
866
939
|
);
|
|
867
940
|
|
|
868
941
|
/**
|
|
@@ -954,7 +1027,13 @@ declare module "xray16" {
|
|
|
954
1027
|
}
|
|
955
1028
|
|
|
956
1029
|
/**
|
|
1030
|
+
* Patrol start or route enum value.
|
|
1031
|
+
*
|
|
957
1032
|
* @group xr_action
|
|
1033
|
+
*
|
|
1034
|
+
* @remarks
|
|
1035
|
+
* The xray binding exports patrol start and route enums on the same Lua class, so this type is a flattened union of
|
|
1036
|
+
* both enum groups.
|
|
958
1037
|
*/
|
|
959
1038
|
export type TXR_patrol_type = EnumeratedStaticsValues<typeof patrol>;
|
|
960
1039
|
|
|
@@ -1273,7 +1352,7 @@ declare module "xray16" {
|
|
|
1273
1352
|
*
|
|
1274
1353
|
* @param state - Mental state id.
|
|
1275
1354
|
*/
|
|
1276
|
-
public constructor(state:
|
|
1355
|
+
public constructor(state: TXR_mental_state);
|
|
1277
1356
|
|
|
1278
1357
|
/**
|
|
1279
1358
|
* Set monster animation action and extra value.
|
|
@@ -1284,7 +1363,7 @@ declare module "xray16" {
|
|
|
1284
1363
|
* @param state - Monster animation action id.
|
|
1285
1364
|
* @param value - Extra action value.
|
|
1286
1365
|
*/
|
|
1287
|
-
public constructor(state:
|
|
1366
|
+
public constructor(state: TXR_monster_animation_action, value: i32);
|
|
1288
1367
|
|
|
1289
1368
|
/**
|
|
1290
1369
|
* @returns Whether the animation action is complete.
|
|
@@ -1296,7 +1375,7 @@ declare module "xray16" {
|
|
|
1296
1375
|
*
|
|
1297
1376
|
* @param state - Mental state id.
|
|
1298
1377
|
*/
|
|
1299
|
-
public type(state:
|
|
1378
|
+
public type(state: TXR_mental_state): void;
|
|
1300
1379
|
|
|
1301
1380
|
/**
|
|
1302
1381
|
* Set animation name.
|
|
@@ -1312,10 +1391,51 @@ declare module "xray16" {
|
|
|
1312
1391
|
export type TXR_animation_key = EnumeratedStaticsKeys<typeof anim>;
|
|
1313
1392
|
|
|
1314
1393
|
/**
|
|
1394
|
+
* Animation action constants exposed by the `anim` class.
|
|
1395
|
+
*
|
|
1315
1396
|
* @group xr_action
|
|
1316
1397
|
*/
|
|
1317
1398
|
export type TXR_animation = EnumeratedStaticsValues<typeof anim>;
|
|
1318
1399
|
|
|
1400
|
+
/**
|
|
1401
|
+
* Mental-state constants accepted by stalker animation and movement APIs.
|
|
1402
|
+
*
|
|
1403
|
+
* @source `src/xrGame/script_animation_action_script.cpp`, `anim.type` enum.
|
|
1404
|
+
* @group xr_action
|
|
1405
|
+
*/
|
|
1406
|
+
export type TXR_mental_state = typeof anim.danger | typeof anim.free | typeof anim.panic;
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Monster animation action constants accepted by the two-argument `anim` constructor.
|
|
1410
|
+
*
|
|
1411
|
+
* @source `src/xrGame/script_animation_action_script.cpp`, `anim.monster` enum.
|
|
1412
|
+
* @group xr_action
|
|
1413
|
+
*/
|
|
1414
|
+
export type TXR_monster_animation_action =
|
|
1415
|
+
| typeof anim.stand_idle
|
|
1416
|
+
| typeof anim.capture_prepare
|
|
1417
|
+
| typeof anim.sit_idle
|
|
1418
|
+
| typeof anim.lie_idle
|
|
1419
|
+
| typeof anim.eat
|
|
1420
|
+
| typeof anim.sleep
|
|
1421
|
+
| typeof anim.rest
|
|
1422
|
+
| typeof anim.attack
|
|
1423
|
+
| typeof anim.look_around
|
|
1424
|
+
| typeof anim.turn;
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Monster head-animation constants accepted by trader sound actions.
|
|
1428
|
+
*
|
|
1429
|
+
* @source `src/xrGame/script_sound_action_script.cpp`, trader-specific sound constructor.
|
|
1430
|
+
* @group xr_action
|
|
1431
|
+
*/
|
|
1432
|
+
export type TXR_monster_head_animation =
|
|
1433
|
+
| typeof MonsterSpace.head_anim_normal
|
|
1434
|
+
| typeof MonsterSpace.head_anim_angry
|
|
1435
|
+
| typeof MonsterSpace.head_anim_glad
|
|
1436
|
+
| typeof MonsterSpace.head_anim_kind
|
|
1437
|
+
| -1;
|
|
1438
|
+
|
|
1319
1439
|
/**
|
|
1320
1440
|
* Sound action for scripted AI behavior.
|
|
1321
1441
|
*
|
|
@@ -1500,7 +1620,7 @@ declare module "xray16" {
|
|
|
1500
1620
|
*
|
|
1501
1621
|
* @param type - Monster sound type id.
|
|
1502
1622
|
*/
|
|
1503
|
-
public constructor(type: TXR_sound_type);
|
|
1623
|
+
public constructor(type: TXR_sound_type);
|
|
1504
1624
|
|
|
1505
1625
|
/**
|
|
1506
1626
|
* Play a monster sound by type with extra value.
|
|
@@ -1511,19 +1631,22 @@ declare module "xray16" {
|
|
|
1511
1631
|
* @param type - Monster sound type id.
|
|
1512
1632
|
* @param value - Extra sound value.
|
|
1513
1633
|
*/
|
|
1514
|
-
public constructor(type: TXR_sound_type
|
|
1634
|
+
public constructor(type: TXR_sound_type, value: number);
|
|
1515
1635
|
|
|
1516
1636
|
/**
|
|
1517
1637
|
* Play a trader sound with a head animation.
|
|
1518
1638
|
*
|
|
1639
|
+
* @source `src/xrGame/script_sound_action_script.cpp`, trader-specific sound constructor.
|
|
1640
|
+
*
|
|
1519
1641
|
* @remarks
|
|
1520
|
-
* Trader-specific overload. The head animation is one of `MonsterSpace.head_anim_
|
|
1642
|
+
* Trader-specific overload. The head animation is one of the `MonsterSpace.head_anim_*` constants. The native enum
|
|
1643
|
+
* also has `-1` for no head animation, but that value is not exported as a named Lua constant.
|
|
1521
1644
|
*
|
|
1522
1645
|
* @param value1 - Sound prefix or collection.
|
|
1523
1646
|
* @param value2 - Sound name.
|
|
1524
1647
|
* @param type - Monster head animation type.
|
|
1525
1648
|
*/
|
|
1526
|
-
public constructor(value1: string, value2: string, type:
|
|
1649
|
+
public constructor(value1: string, value2: string, type: TXR_monster_head_animation);
|
|
1527
1650
|
|
|
1528
1651
|
/**
|
|
1529
1652
|
* Set sound by name.
|
|
@@ -1565,7 +1688,7 @@ declare module "xray16" {
|
|
|
1565
1688
|
*
|
|
1566
1689
|
* @param type - Sound type id.
|
|
1567
1690
|
*/
|
|
1568
|
-
public set_sound_type(type:
|
|
1691
|
+
public set_sound_type(type: TXR_snd_type): void;
|
|
1569
1692
|
|
|
1570
1693
|
/**
|
|
1571
1694
|
* @returns Whether sound playback is complete.
|
|
@@ -1810,6 +1933,27 @@ type Nillable<T> = T | null | undefined;
|
|
|
1810
1933
|
type Nullable<T> = T | null;
|
|
1811
1934
|
|
|
1812
1935
|
declare module "xray16" {
|
|
1936
|
+
/**
|
|
1937
|
+
* Restriction-space category stored on space restrictors and used by ALife restriction events.
|
|
1938
|
+
*
|
|
1939
|
+
* @group xr_alife
|
|
1940
|
+
*
|
|
1941
|
+
* @remarks
|
|
1942
|
+
* Values mirror `RestrictionSpace::ERestrictorTypes`: default none/out/in are `0`, `1`, `2`; runtime none/in/out
|
|
1943
|
+
* are `3`, `4`, `5`.
|
|
1944
|
+
*/
|
|
1945
|
+
export type TXR_restrictor_type = 0 | 1 | 2 | 3 | 4 | 5;
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* Dynamic restriction-list type accepted by APIs that clear ALife in/out restriction arrays.
|
|
1949
|
+
*
|
|
1950
|
+
* @group xr_alife
|
|
1951
|
+
*
|
|
1952
|
+
* @remarks
|
|
1953
|
+
* The engine switch handles only runtime `eRestrictorTypeIn` (`4`) and `eRestrictorTypeOut` (`5`) here.
|
|
1954
|
+
*/
|
|
1955
|
+
export type TXR_dynamic_restrictor_type = 4 | 5;
|
|
1956
|
+
|
|
1813
1957
|
/**
|
|
1814
1958
|
* Access point for ALife simulation objects and registries.
|
|
1815
1959
|
*
|
|
@@ -1945,7 +2089,7 @@ declare module "xray16" {
|
|
|
1945
2089
|
* @param objectId - Restricted object id.
|
|
1946
2090
|
* @param type - Restriction type.
|
|
1947
2091
|
*/
|
|
1948
|
-
public remove_all_restrictions(objectId: u16, type:
|
|
2092
|
+
public remove_all_restrictions(objectId: u16, type: TXR_dynamic_restrictor_type): void;
|
|
1949
2093
|
|
|
1950
2094
|
/**
|
|
1951
2095
|
* Remove an inside-space restriction from an offline monster.
|
|
@@ -2517,7 +2661,7 @@ declare module "xray16" {
|
|
|
2517
2661
|
*
|
|
2518
2662
|
* @returns Movement path type.
|
|
2519
2663
|
*/
|
|
2520
|
-
public path_type():
|
|
2664
|
+
public path_type(): TXR_game_object_path;
|
|
2521
2665
|
|
|
2522
2666
|
/**
|
|
2523
2667
|
* Get the detail path manager.
|
|
@@ -2586,14 +2730,14 @@ declare module "xray16" {
|
|
|
2586
2730
|
*
|
|
2587
2731
|
* @param type - Patrol route type.
|
|
2588
2732
|
*/
|
|
2589
|
-
public route_type(type:
|
|
2733
|
+
public route_type(type: TXR_patrol_route_type): void;
|
|
2590
2734
|
|
|
2591
2735
|
/**
|
|
2592
2736
|
* Get patrol route behavior.
|
|
2593
2737
|
*
|
|
2594
2738
|
* @returns Patrol route type.
|
|
2595
2739
|
*/
|
|
2596
|
-
public route_type():
|
|
2740
|
+
public route_type(): TXR_patrol_route_type;
|
|
2597
2741
|
|
|
2598
2742
|
/**
|
|
2599
2743
|
* Enable or disable random patrol point selection.
|
|
@@ -2614,14 +2758,14 @@ declare module "xray16" {
|
|
|
2614
2758
|
*
|
|
2615
2759
|
* @param type - Patrol start type.
|
|
2616
2760
|
*/
|
|
2617
|
-
public start_type(type:
|
|
2761
|
+
public start_type(type: TXR_patrol_start_type): void;
|
|
2618
2762
|
|
|
2619
2763
|
/**
|
|
2620
2764
|
* Get how the patrol path starts.
|
|
2621
2765
|
*
|
|
2622
2766
|
* @returns Patrol start type.
|
|
2623
2767
|
*/
|
|
2624
|
-
public start_type():
|
|
2768
|
+
public start_type(): TXR_patrol_start_type;
|
|
2625
2769
|
|
|
2626
2770
|
/**
|
|
2627
2771
|
* Set the starting patrol point.
|
|
@@ -3622,12 +3766,12 @@ declare module "xray16" {
|
|
|
3622
3766
|
/**
|
|
3623
3767
|
* @group xr_alife
|
|
3624
3768
|
*/
|
|
3625
|
-
type TXR_class_key = EnumeratedStaticsKeys<typeof clsid>;
|
|
3769
|
+
export type TXR_class_key = EnumeratedStaticsKeys<typeof clsid>;
|
|
3626
3770
|
|
|
3627
3771
|
/**
|
|
3628
3772
|
* @group xr_alife
|
|
3629
3773
|
*/
|
|
3630
|
-
type TXR_class_id = EnumeratedStaticsValues<typeof clsid>;
|
|
3774
|
+
export type TXR_class_id = EnumeratedStaticsValues<typeof clsid>;
|
|
3631
3775
|
|
|
3632
3776
|
/**
|
|
3633
3777
|
* Factory for ALife server object bindings.
|
|
@@ -5427,7 +5571,7 @@ declare module "xray16" {
|
|
|
5427
5571
|
/**
|
|
5428
5572
|
* @returns How the danger was perceived.
|
|
5429
5573
|
*/
|
|
5430
|
-
public perceive_type():
|
|
5574
|
+
public perceive_type(): TXR_danger_perceive_type;
|
|
5431
5575
|
|
|
5432
5576
|
/**
|
|
5433
5577
|
* Get the object attached to this danger event.
|
|
@@ -5440,6 +5584,13 @@ declare module "xray16" {
|
|
|
5440
5584
|
public dependent_object(): Nullable<game_object>;
|
|
5441
5585
|
}
|
|
5442
5586
|
|
|
5587
|
+
/**
|
|
5588
|
+
* How a danger event was perceived by AI memory.
|
|
5589
|
+
*
|
|
5590
|
+
* @source C++ enum CDangerObject::EDangerPerceiveType
|
|
5591
|
+
* @group xr_memory
|
|
5592
|
+
*/
|
|
5593
|
+
export type TXR_danger_perceive_type = typeof danger_object.visual | typeof danger_object.sound | typeof danger_object.hit;
|
|
5443
5594
|
/**
|
|
5444
5595
|
* @group xr_memory
|
|
5445
5596
|
*/
|
|
@@ -7433,7 +7584,7 @@ declare module "xray16" {
|
|
|
7433
7584
|
* @source C++ enum EGameIDs
|
|
7434
7585
|
* @group xr_game
|
|
7435
7586
|
*/
|
|
7436
|
-
export type TXR_EGameID = 0 | 1 | 2 | 8 | 16 | 32 | 64;
|
|
7587
|
+
export type TXR_EGameID = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64;
|
|
7437
7588
|
|
|
7438
7589
|
/**
|
|
7439
7590
|
* Game type constants used by menu and multiplayer scripts.
|
|
@@ -7500,18 +7651,18 @@ declare module "xray16" {
|
|
|
7500
7651
|
/**
|
|
7501
7652
|
* Engine enum value for `GAME_TYPE.GAME_DUMMY`.
|
|
7502
7653
|
*/
|
|
7503
|
-
public static readonly GAME_DUMMY: 255;
|
|
7654
|
+
public static readonly GAME_DUMMY: 255;
|
|
7504
7655
|
}
|
|
7505
7656
|
|
|
7506
7657
|
/**
|
|
7507
7658
|
* @group xr_game
|
|
7508
7659
|
*/
|
|
7509
|
-
type TXR_GAME_TYPE = EnumeratedStaticsValues<typeof GAME_TYPE>;
|
|
7660
|
+
export type TXR_GAME_TYPE = EnumeratedStaticsValues<typeof GAME_TYPE>;
|
|
7510
7661
|
|
|
7511
7662
|
/**
|
|
7512
7663
|
* Single-player difficulty constants.
|
|
7513
7664
|
*
|
|
7514
|
-
* @source
|
|
7665
|
+
* @source `src/xrGame/game_cl_single.h`, `ESingleGameDifficulty`; `src/xrGame/level_script.cpp`, `game_difficulty` binding
|
|
7515
7666
|
* @customConstructor game_difficulty
|
|
7516
7667
|
* @group xr_game
|
|
7517
7668
|
*/
|
|
@@ -7794,51 +7945,51 @@ declare module "xray16" {
|
|
|
7794
7945
|
/**
|
|
7795
7946
|
* Engine enum value for `hit.burn`.
|
|
7796
7947
|
*/
|
|
7797
|
-
public static readonly burn
|
|
7948
|
+
public static readonly burn: 0;
|
|
7798
7949
|
/**
|
|
7799
7950
|
* Engine enum value for `hit.chemical_burn`.
|
|
7800
7951
|
*/
|
|
7801
|
-
public static readonly chemical_burn
|
|
7952
|
+
public static readonly chemical_burn: 2;
|
|
7802
7953
|
/**
|
|
7803
7954
|
* Engine enum value for `hit.dummy`.
|
|
7804
7955
|
*/
|
|
7805
|
-
public static readonly dummy
|
|
7956
|
+
public static readonly dummy: 12;
|
|
7806
7957
|
/**
|
|
7807
7958
|
* Engine enum value for `hit.explosion`.
|
|
7808
7959
|
*/
|
|
7809
|
-
public static readonly explosion
|
|
7960
|
+
public static readonly explosion: 7;
|
|
7810
7961
|
/**
|
|
7811
7962
|
* Engine enum value for `hit.fire_wound`.
|
|
7812
7963
|
*/
|
|
7813
|
-
public static readonly fire_wound
|
|
7964
|
+
public static readonly fire_wound: 8;
|
|
7814
7965
|
/**
|
|
7815
7966
|
* Engine enum value for `hit.light_burn`.
|
|
7816
7967
|
*/
|
|
7817
|
-
public static readonly light_burn
|
|
7968
|
+
public static readonly light_burn: 11;
|
|
7818
7969
|
/**
|
|
7819
7970
|
* Engine enum value for `hit.physic_strike`.
|
|
7820
7971
|
*/
|
|
7821
|
-
public static readonly physic_strike
|
|
7972
|
+
public static readonly physic_strike: 10;
|
|
7822
7973
|
/**
|
|
7823
7974
|
* Engine enum value for `hit.radiation`.
|
|
7824
7975
|
*/
|
|
7825
|
-
public static readonly radiation
|
|
7976
|
+
public static readonly radiation: 3;
|
|
7826
7977
|
/**
|
|
7827
7978
|
* Engine enum value for `hit.shock`.
|
|
7828
7979
|
*/
|
|
7829
|
-
public static readonly shock
|
|
7980
|
+
public static readonly shock: 1;
|
|
7830
7981
|
/**
|
|
7831
7982
|
* Engine enum value for `hit.strike`.
|
|
7832
7983
|
*/
|
|
7833
|
-
public static readonly strike
|
|
7984
|
+
public static readonly strike: 5;
|
|
7834
7985
|
/**
|
|
7835
7986
|
* Engine enum value for `hit.telepatic`.
|
|
7836
7987
|
*/
|
|
7837
|
-
public static readonly telepatic
|
|
7988
|
+
public static readonly telepatic: 4;
|
|
7838
7989
|
/**
|
|
7839
7990
|
* Engine enum value for `hit.wound`.
|
|
7840
7991
|
*/
|
|
7841
|
-
public static readonly wound
|
|
7992
|
+
public static readonly wound: 6;
|
|
7842
7993
|
|
|
7843
7994
|
/**
|
|
7844
7995
|
* Hit direction.
|
|
@@ -8380,6 +8531,231 @@ declare module "xray16" {
|
|
|
8380
8531
|
}
|
|
8381
8532
|
|
|
8382
8533
|
declare module "xray16" {
|
|
8534
|
+
/**
|
|
8535
|
+
* Ray query target bitmask accepted by `level.ray_pick` and `ray_pick`.
|
|
8536
|
+
*
|
|
8537
|
+
* @source `src/xrGame/level_script.cpp`, `rq_target` binding.
|
|
8538
|
+
* @customConstructor rq_target
|
|
8539
|
+
* @group xr_level
|
|
8540
|
+
*/
|
|
8541
|
+
export class rq_target {
|
|
8542
|
+
/**
|
|
8543
|
+
* No ray query target.
|
|
8544
|
+
*/
|
|
8545
|
+
public static readonly rqtNone: 0;
|
|
8546
|
+
|
|
8547
|
+
/**
|
|
8548
|
+
* Dynamic game objects.
|
|
8549
|
+
*/
|
|
8550
|
+
public static readonly rqtObject: 1;
|
|
8551
|
+
|
|
8552
|
+
/**
|
|
8553
|
+
* Static level geometry.
|
|
8554
|
+
*/
|
|
8555
|
+
public static readonly rqtStatic: 2;
|
|
8556
|
+
|
|
8557
|
+
/**
|
|
8558
|
+
* Dynamic collision shapes.
|
|
8559
|
+
*/
|
|
8560
|
+
public static readonly rqtShape: 4;
|
|
8561
|
+
|
|
8562
|
+
/**
|
|
8563
|
+
* Dynamic obstacles.
|
|
8564
|
+
*/
|
|
8565
|
+
public static readonly rqtObstacle: 8;
|
|
8566
|
+
|
|
8567
|
+
/**
|
|
8568
|
+
* Dynamic game objects and static level geometry.
|
|
8569
|
+
*/
|
|
8570
|
+
public static readonly rqtBoth: 3;
|
|
8571
|
+
|
|
8572
|
+
/**
|
|
8573
|
+
* Dynamic game objects, collision shapes, and obstacles.
|
|
8574
|
+
*/
|
|
8575
|
+
public static readonly rqtDyn: 13;
|
|
8576
|
+
}
|
|
8577
|
+
|
|
8578
|
+
/**
|
|
8579
|
+
* Ray query target bitmask value.
|
|
8580
|
+
*
|
|
8581
|
+
* @group xr_level
|
|
8582
|
+
*/
|
|
8583
|
+
export type TXR_rq_target = EnumeratedStaticsValues<typeof rq_target>;
|
|
8584
|
+
|
|
8585
|
+
/**
|
|
8586
|
+
* Result object filled by level ray queries.
|
|
8587
|
+
*
|
|
8588
|
+
* @source `src/xrGame/raypick.h`, `script_rq_result`.
|
|
8589
|
+
* @customConstructor rq_result
|
|
8590
|
+
* @group xr_level
|
|
8591
|
+
*
|
|
8592
|
+
* @remarks
|
|
8593
|
+
* A new result starts with `object = null`, `range = 0`, and `element = 0`. `level.ray_pick` updates it only when the
|
|
8594
|
+
* query returns `true`.
|
|
8595
|
+
*/
|
|
8596
|
+
export class rq_result extends EngineBinding {
|
|
8597
|
+
/**
|
|
8598
|
+
* Create an empty ray query result.
|
|
8599
|
+
*/
|
|
8600
|
+
public constructor();
|
|
8601
|
+
|
|
8602
|
+
/**
|
|
8603
|
+
* Hit object, or `null` when the hit is not a game object.
|
|
8604
|
+
*/
|
|
8605
|
+
public readonly object: Nullable<game_object>;
|
|
8606
|
+
|
|
8607
|
+
/**
|
|
8608
|
+
* Distance from ray origin to the hit.
|
|
8609
|
+
*/
|
|
8610
|
+
public readonly range: f32;
|
|
8611
|
+
|
|
8612
|
+
/**
|
|
8613
|
+
* Hit model element id, or `0` when the hit has no element.
|
|
8614
|
+
*/
|
|
8615
|
+
public readonly element: i32;
|
|
8616
|
+
}
|
|
8617
|
+
|
|
8618
|
+
/**
|
|
8619
|
+
* Active weather descriptor exposed through `CEnvironment.current()`.
|
|
8620
|
+
*
|
|
8621
|
+
* @source C++ class CEnvDescriptor
|
|
8622
|
+
* @customConstructor CEnvDescriptor
|
|
8623
|
+
* @group xr_level
|
|
8624
|
+
*
|
|
8625
|
+
* @remarks
|
|
8626
|
+
* Lua receives the engine-owned current descriptor; scripts should treat it as read-only.
|
|
8627
|
+
*/
|
|
8628
|
+
export class CEnvDescriptor {
|
|
8629
|
+
/**
|
|
8630
|
+
* Current fog density.
|
|
8631
|
+
*/
|
|
8632
|
+
public readonly fog_density: f32;
|
|
8633
|
+
|
|
8634
|
+
/**
|
|
8635
|
+
* Current far clipping plane distance.
|
|
8636
|
+
*/
|
|
8637
|
+
public readonly far_plane: f32;
|
|
8638
|
+
}
|
|
8639
|
+
|
|
8640
|
+
/**
|
|
8641
|
+
* Active weather environment controller.
|
|
8642
|
+
*
|
|
8643
|
+
* @source C++ class CEnvironment
|
|
8644
|
+
* @customConstructor CEnvironment
|
|
8645
|
+
* @group xr_level
|
|
8646
|
+
*
|
|
8647
|
+
* @remarks
|
|
8648
|
+
* Returned by `level.environment()`. The Lua binding exposes only access to the current descriptor.
|
|
8649
|
+
*/
|
|
8650
|
+
export class CEnvironment {
|
|
8651
|
+
/**
|
|
8652
|
+
* Get the current interpolated environment descriptor.
|
|
8653
|
+
*
|
|
8654
|
+
* @returns Engine-owned current environment descriptor.
|
|
8655
|
+
*/
|
|
8656
|
+
public current(): CEnvDescriptor;
|
|
8657
|
+
}
|
|
8658
|
+
|
|
8659
|
+
/**
|
|
8660
|
+
* Reusable ray query object.
|
|
8661
|
+
*
|
|
8662
|
+
* @source `src/xrGame/level_script.cpp`, `ray_pick` binding.
|
|
8663
|
+
* @customConstructor ray_pick
|
|
8664
|
+
* @group xr_level
|
|
8665
|
+
*/
|
|
8666
|
+
export class ray_pick extends EngineBinding {
|
|
8667
|
+
/**
|
|
8668
|
+
* Create an empty ray query with no target flags and zero range.
|
|
8669
|
+
*/
|
|
8670
|
+
public constructor();
|
|
8671
|
+
|
|
8672
|
+
/**
|
|
8673
|
+
* Create a configured ray query.
|
|
8674
|
+
*
|
|
8675
|
+
* @param position - Ray origin.
|
|
8676
|
+
* @param direction - Ray direction.
|
|
8677
|
+
* @param range - Ray range.
|
|
8678
|
+
* @param target - Ray query target flags.
|
|
8679
|
+
* @param ignore_object - Object ignored by the query, or `null` / `undefined`.
|
|
8680
|
+
*/
|
|
8681
|
+
public constructor(
|
|
8682
|
+
position: vector,
|
|
8683
|
+
direction: vector,
|
|
8684
|
+
range: f32,
|
|
8685
|
+
target: TXR_rq_target,
|
|
8686
|
+
ignore_object: Nillable<game_object>
|
|
8687
|
+
);
|
|
8688
|
+
|
|
8689
|
+
/**
|
|
8690
|
+
* Set ray origin.
|
|
8691
|
+
*
|
|
8692
|
+
* @param position - Ray origin.
|
|
8693
|
+
*/
|
|
8694
|
+
public set_position(position: vector): void;
|
|
8695
|
+
|
|
8696
|
+
/**
|
|
8697
|
+
* Set ray direction.
|
|
8698
|
+
*
|
|
8699
|
+
* @param direction - Ray direction.
|
|
8700
|
+
*/
|
|
8701
|
+
public set_direction(direction: vector): void;
|
|
8702
|
+
|
|
8703
|
+
/**
|
|
8704
|
+
* Set ray range.
|
|
8705
|
+
*
|
|
8706
|
+
* @param range - Ray range.
|
|
8707
|
+
*/
|
|
8708
|
+
public set_range(range: f32): void;
|
|
8709
|
+
|
|
8710
|
+
/**
|
|
8711
|
+
* Set ray target flags.
|
|
8712
|
+
*
|
|
8713
|
+
* @param target - Ray query target flags.
|
|
8714
|
+
*/
|
|
8715
|
+
public set_flags(target: TXR_rq_target): void;
|
|
8716
|
+
|
|
8717
|
+
/**
|
|
8718
|
+
* Set object ignored by the query.
|
|
8719
|
+
*
|
|
8720
|
+
* @param ignore_object - Object ignored by the query, or `null` / `undefined`.
|
|
8721
|
+
*/
|
|
8722
|
+
public set_ignore_object(ignore_object: Nillable<game_object>): void;
|
|
8723
|
+
|
|
8724
|
+
/**
|
|
8725
|
+
* Execute the ray query and update this query's result on hit.
|
|
8726
|
+
*
|
|
8727
|
+
* @returns Whether the ray hit anything.
|
|
8728
|
+
*/
|
|
8729
|
+
public query(): boolean;
|
|
8730
|
+
|
|
8731
|
+
/**
|
|
8732
|
+
* Get last ray query result.
|
|
8733
|
+
*
|
|
8734
|
+
* @returns Last ray query result.
|
|
8735
|
+
*/
|
|
8736
|
+
public get_result(): rq_result;
|
|
8737
|
+
|
|
8738
|
+
/**
|
|
8739
|
+
* Get hit object from the last ray query.
|
|
8740
|
+
*
|
|
8741
|
+
* @returns Hit object, or `null`.
|
|
8742
|
+
*/
|
|
8743
|
+
public get_object(): Nullable<game_object>;
|
|
8744
|
+
|
|
8745
|
+
/**
|
|
8746
|
+
* Get hit distance from the last ray query.
|
|
8747
|
+
*
|
|
8748
|
+
* @returns Hit distance.
|
|
8749
|
+
*/
|
|
8750
|
+
public get_distance(): f32;
|
|
8751
|
+
|
|
8752
|
+
/**
|
|
8753
|
+
* Get hit model element id from the last ray query.
|
|
8754
|
+
*
|
|
8755
|
+
* @returns Hit model element id, or `0`.
|
|
8756
|
+
*/
|
|
8757
|
+
public get_element(): i32;
|
|
8758
|
+
}
|
|
8383
8759
|
/**
|
|
8384
8760
|
* Global helpers for the currently loaded level.
|
|
8385
8761
|
*
|
|
@@ -8516,25 +8892,31 @@ declare module "xray16" {
|
|
|
8516
8892
|
client_spawn_manager(this: void): client_spawn_manager;
|
|
8517
8893
|
|
|
8518
8894
|
/**
|
|
8519
|
-
* Get actor object used by debug helpers.
|
|
8895
|
+
* Get the current actor object used by debug helpers.
|
|
8896
|
+
*
|
|
8897
|
+
* @source `src/xrGame/level_script.cpp`, `debug_actor` binding.
|
|
8520
8898
|
*
|
|
8521
8899
|
* @remarks
|
|
8522
|
-
* Exported only in debug builds.
|
|
8900
|
+
* Exported only in debug builds. The native helper logs a warning on first use and returns `null` when the current
|
|
8901
|
+
* level entity is not an actor.
|
|
8523
8902
|
*
|
|
8524
|
-
* @returns Actor game object.
|
|
8903
|
+
* @returns Actor game object, or `null` when no actor is current.
|
|
8525
8904
|
*/
|
|
8526
|
-
debug_actor(this: void): game_object
|
|
8905
|
+
debug_actor(this: void): Nullable<game_object>;
|
|
8527
8906
|
|
|
8528
8907
|
/**
|
|
8529
|
-
* Find an object by debug name.
|
|
8908
|
+
* Find an online object by debug name.
|
|
8909
|
+
*
|
|
8910
|
+
* @source `src/xrGame/level_script.cpp`, `debug_object` binding.
|
|
8530
8911
|
*
|
|
8531
8912
|
* @remarks
|
|
8532
|
-
* Exported only in debug builds.
|
|
8913
|
+
* Exported only in debug builds. The native helper logs a warning on first use and searches loaded level objects by
|
|
8914
|
+
* runtime name.
|
|
8533
8915
|
*
|
|
8534
|
-
* @param name -
|
|
8535
|
-
* @returns Matching
|
|
8916
|
+
* @param name - Runtime object name.
|
|
8917
|
+
* @returns Matching online object, or `null` when no object with this name is loaded.
|
|
8536
8918
|
*/
|
|
8537
|
-
debug_object(this: void, name: string): game_object
|
|
8919
|
+
debug_object(this: void, name: string): Nullable<game_object>;
|
|
8538
8920
|
|
|
8539
8921
|
/**
|
|
8540
8922
|
* Disable player input.
|
|
@@ -8550,11 +8932,11 @@ declare module "xray16" {
|
|
|
8550
8932
|
enable_input(this: void): void;
|
|
8551
8933
|
|
|
8552
8934
|
/**
|
|
8553
|
-
* Get the active environment
|
|
8935
|
+
* Get the active weather environment controller.
|
|
8554
8936
|
*
|
|
8555
|
-
* @returns Engine environment
|
|
8937
|
+
* @returns Engine-owned environment controller.
|
|
8556
8938
|
*/
|
|
8557
|
-
environment(this: void):
|
|
8939
|
+
environment(this: void): CEnvironment;
|
|
8558
8940
|
|
|
8559
8941
|
/**
|
|
8560
8942
|
* Get current game state id.
|
|
@@ -8585,7 +8967,9 @@ declare module "xray16" {
|
|
|
8585
8967
|
/**
|
|
8586
8968
|
* Get active single-player difficulty.
|
|
8587
8969
|
*
|
|
8588
|
-
* @
|
|
8970
|
+
* @source `src/xrGame/level_script.cpp`, `get_game_difficulty`.
|
|
8971
|
+
*
|
|
8972
|
+
* @returns Current `game_difficulty` enum value.
|
|
8589
8973
|
*/
|
|
8590
8974
|
get_game_difficulty(this: void): TXR_game_difficulty;
|
|
8591
8975
|
|
|
@@ -8621,6 +9005,11 @@ declare module "xray16" {
|
|
|
8621
9005
|
* Get the object under the crosshair.
|
|
8622
9006
|
*
|
|
8623
9007
|
* @since OpenXRay 2014-12-27, c82669625
|
|
9008
|
+
* @source `src/xrGame/level_script.cpp`, `g_get_target_obj`.
|
|
9009
|
+
*
|
|
9010
|
+
* @remarks
|
|
9011
|
+
* Reads the current HUD ray query. Returns `null` when the ray hit has no object or the hit object is not a
|
|
9012
|
+
* `CGameObject`.
|
|
8624
9013
|
*
|
|
8625
9014
|
* @returns Target object, or `null` when nothing is targeted.
|
|
8626
9015
|
*/
|
|
@@ -8813,10 +9202,15 @@ declare module "xray16" {
|
|
|
8813
9202
|
name<T extends string = string>(this: void): T;
|
|
8814
9203
|
|
|
8815
9204
|
/**
|
|
8816
|
-
* Find an online object by id.
|
|
9205
|
+
* Find an online object by runtime id.
|
|
9206
|
+
*
|
|
9207
|
+
* @source `src/xrGame/level_script.cpp`, `object_by_id` binding.
|
|
9208
|
+
*
|
|
9209
|
+
* @remarks
|
|
9210
|
+
* Looks up the object in `Level().Objects` by network id. This does not search offline ALife objects.
|
|
8817
9211
|
*
|
|
8818
|
-
* @param object_id -
|
|
8819
|
-
* @returns Matching object, or `null` when it is not
|
|
9212
|
+
* @param object_id - Runtime network object id.
|
|
9213
|
+
* @returns Matching online object, or `null` when it is not loaded on the level.
|
|
8820
9214
|
*/
|
|
8821
9215
|
object_by_id(this: void, object_id: u16): Nullable<game_object>;
|
|
8822
9216
|
|
|
@@ -8970,14 +9364,17 @@ declare module "xray16" {
|
|
|
8970
9364
|
/**
|
|
8971
9365
|
* Set active single-player difficulty.
|
|
8972
9366
|
*
|
|
9367
|
+
* @source `src/xrGame/level_script.cpp`, `set_game_difficulty`.
|
|
9368
|
+
*
|
|
8973
9369
|
* @remarks
|
|
8974
|
-
* Updates the global difficulty and notifies the active single-player game state.
|
|
9370
|
+
* Updates the global difficulty and notifies the active single-player game state. The native binding verifies that
|
|
9371
|
+
* the current game state is `game_cl_Single`.
|
|
8975
9372
|
*
|
|
8976
9373
|
* @throws If the active game state is not single-player.
|
|
8977
9374
|
*
|
|
8978
|
-
* @param difficulty -
|
|
9375
|
+
* @param difficulty - `game_difficulty` enum value.
|
|
8979
9376
|
*/
|
|
8980
|
-
set_game_difficulty(this: void, difficulty:
|
|
9377
|
+
set_game_difficulty(this: void, difficulty: TXR_game_difficulty): void;
|
|
8981
9378
|
|
|
8982
9379
|
/**
|
|
8983
9380
|
* Set a post-process effector factor.
|
|
@@ -9146,7 +9543,7 @@ declare module "xray16" {
|
|
|
9146
9543
|
* Cast a ray through the level collision world.
|
|
9147
9544
|
*
|
|
9148
9545
|
* @remarks
|
|
9149
|
-
* `result` is updated only when this returns `true`.
|
|
9546
|
+
* `result` is updated only when this returns `true`. Use `rq_target` flags to choose static, object, or dynamic collision targets.
|
|
9150
9547
|
*
|
|
9151
9548
|
* @param position - Ray origin.
|
|
9152
9549
|
* @param direction - Ray direction.
|
|
@@ -9161,8 +9558,8 @@ declare module "xray16" {
|
|
|
9161
9558
|
position: vector,
|
|
9162
9559
|
direction: vector,
|
|
9163
9560
|
range: f32,
|
|
9164
|
-
target:
|
|
9165
|
-
result:
|
|
9561
|
+
target: TXR_rq_target,
|
|
9562
|
+
result: rq_result,
|
|
9166
9563
|
ignore_object: Nillable<game_object>
|
|
9167
9564
|
): boolean;
|
|
9168
9565
|
}
|
|
@@ -9216,6 +9613,20 @@ declare module "xray16" {
|
|
|
9216
9613
|
*/
|
|
9217
9614
|
export function LuabindClass(): ClassDecorator;
|
|
9218
9615
|
|
|
9616
|
+
/**
|
|
9617
|
+
* Opaque native Lua state pointer.
|
|
9618
|
+
*
|
|
9619
|
+
* @source C++ type lua_State
|
|
9620
|
+
* @customConstructor lua_State
|
|
9621
|
+
* @group xr_luabind
|
|
9622
|
+
*/
|
|
9623
|
+
export class lua_State {
|
|
9624
|
+
/**
|
|
9625
|
+
* Native engine pointer; scripts do not construct Lua states.
|
|
9626
|
+
*/
|
|
9627
|
+
private constructor();
|
|
9628
|
+
}
|
|
9629
|
+
|
|
9219
9630
|
/**
|
|
9220
9631
|
* Runtime metadata for a LuaBind class.
|
|
9221
9632
|
*
|
|
@@ -9253,7 +9664,7 @@ declare module "xray16" {
|
|
|
9253
9664
|
* @param lua_state - Lua state to inspect.
|
|
9254
9665
|
* @returns Registered class names.
|
|
9255
9666
|
*/
|
|
9256
|
-
export function class_names(this: void, lua_state:
|
|
9667
|
+
export function class_names(this: void, lua_state: lua_State): LuaTable<number, string>;
|
|
9257
9668
|
|
|
9258
9669
|
/**
|
|
9259
9670
|
* Get LuaBind metadata for an object or class.
|
|
@@ -9263,7 +9674,7 @@ declare module "xray16" {
|
|
|
9263
9674
|
* @param target - Object or class to inspect.
|
|
9264
9675
|
* @returns LuaBind class metadata.
|
|
9265
9676
|
*/
|
|
9266
|
-
export function class_info(this: void, target:
|
|
9677
|
+
export function class_info(this: void, target: object): class_info_data;
|
|
9267
9678
|
}
|
|
9268
9679
|
|
|
9269
9680
|
declare module "xray16" {
|
|
@@ -10141,6 +10552,21 @@ declare module "xray16" {
|
|
|
10141
10552
|
public constructor();
|
|
10142
10553
|
}
|
|
10143
10554
|
|
|
10555
|
+
/**
|
|
10556
|
+
* Opaque native quaternion used by matrix transform helpers.
|
|
10557
|
+
*
|
|
10558
|
+
* @source C++ struct Fquaternion
|
|
10559
|
+
* @customConstructor Fquaternion
|
|
10560
|
+
* @group xr_math
|
|
10561
|
+
*
|
|
10562
|
+
* @remarks
|
|
10563
|
+
* The engine binds matrix transforms against this native quaternion type, but does not expose a public constructor or
|
|
10564
|
+
* script-side quaternion operations in these Lua bindings.
|
|
10565
|
+
*/
|
|
10566
|
+
export class Fquaternion {
|
|
10567
|
+
private constructor();
|
|
10568
|
+
}
|
|
10569
|
+
|
|
10144
10570
|
/**
|
|
10145
10571
|
* Mutable 4x4 transform matrix.
|
|
10146
10572
|
*
|
|
@@ -10207,7 +10633,7 @@ declare module "xray16" {
|
|
|
10207
10633
|
* @param position - Translation vector.
|
|
10208
10634
|
* @returns This matrix.
|
|
10209
10635
|
*/
|
|
10210
|
-
public mk_xform(rotation:
|
|
10636
|
+
public mk_xform(rotation: Fquaternion, position: vector): matrix;
|
|
10211
10637
|
|
|
10212
10638
|
/**
|
|
10213
10639
|
* Copy another matrix.
|
|
@@ -10550,7 +10976,7 @@ declare module "xray16" {
|
|
|
10550
10976
|
* @param password - Account password.
|
|
10551
10977
|
* @param cb - Completion callback.
|
|
10552
10978
|
*/
|
|
10553
|
-
public get_account_profiles(email: string, password: string, cb: account_profiles_cb):
|
|
10979
|
+
public get_account_profiles(email: string, password: string, cb: account_profiles_cb): void;
|
|
10554
10980
|
|
|
10555
10981
|
/**
|
|
10556
10982
|
* Get profiles found by the last email search.
|
|
@@ -11335,7 +11761,7 @@ declare module "xray16" {
|
|
|
11335
11761
|
* @group xr_multiplayer
|
|
11336
11762
|
*
|
|
11337
11763
|
* @remarks
|
|
11338
|
-
* Multiplayer match state, not single-player task or story state. `type` uses
|
|
11764
|
+
* Multiplayer match state, not single-player task or story state. `type` uses engine `EGameIDs` values.
|
|
11339
11765
|
*/
|
|
11340
11766
|
export class game_GameState extends DLL_Pure {
|
|
11341
11767
|
/**
|
|
@@ -11351,7 +11777,7 @@ declare module "xray16" {
|
|
|
11351
11777
|
/**
|
|
11352
11778
|
* Multiplayer game type id.
|
|
11353
11779
|
*/
|
|
11354
|
-
public type:
|
|
11780
|
+
public type: TXR_EGameID;
|
|
11355
11781
|
|
|
11356
11782
|
/**
|
|
11357
11783
|
* Create an empty multiplayer game state.
|
|
@@ -11376,39 +11802,165 @@ declare module "xray16" {
|
|
|
11376
11802
|
/**
|
|
11377
11803
|
* @returns Multiplayer game type id.
|
|
11378
11804
|
*/
|
|
11379
|
-
public Type():
|
|
11805
|
+
public Type(): TXR_EGameID;
|
|
11380
11806
|
}
|
|
11381
11807
|
|
|
11382
11808
|
/**
|
|
11383
|
-
*
|
|
11384
|
-
*
|
|
11385
|
-
*
|
|
11386
|
-
*
|
|
11387
|
-
*
|
|
11388
|
-
*
|
|
11389
|
-
*
|
|
11390
|
-
*
|
|
11391
|
-
*
|
|
11392
|
-
* .def_readwrite("ping", &BaseType::ping)
|
|
11393
|
-
* .def_readwrite("GameID", &BaseType::GameID)
|
|
11394
|
-
* //.def_readwrite("Skip", &BaseType::Skip)
|
|
11395
|
-
* .def_readwrite("lasthitter", &BaseType::lasthitter)
|
|
11396
|
-
* .def_readwrite("lasthitweapon", &BaseType::lasthitweapon)
|
|
11397
|
-
* .def_readwrite("skin", &BaseType::skin)
|
|
11398
|
-
* .def_readwrite("RespawnTime", &BaseType::RespawnTime)
|
|
11399
|
-
* .def_readwrite("money_delta", &BaseType::money_delta).
|
|
11400
|
-
*
|
|
11401
|
-
* .def_readwrite("pItemList", &BaseType::pItemList)
|
|
11402
|
-
* .def_readwrite("LastBuyAcount", &BaseType::LastBuyAcount)
|
|
11403
|
-
* .def("testFlag", &BaseType::testFlag)
|
|
11404
|
-
* .def("setFlag", &BaseType::setFlag)
|
|
11405
|
-
* .def("resetFlag", &BaseType::resetFlag)
|
|
11406
|
-
* .def("getName", &BaseType::getName)
|
|
11407
|
-
* .def("setName", &BaseType::setName)
|
|
11408
|
-
* .def("clear", &BaseType::clear, &WrapType::clear_static)
|
|
11409
|
-
* .def("net_Export", &BaseType::net_Export, &WrapType::net_Export_static)
|
|
11410
|
-
* .def("net_Import", &BaseType::net_Import, &WrapType::net_Import_static).
|
|
11809
|
+
* Opaque native list of multiplayer buy/spawn item ids.
|
|
11810
|
+
*
|
|
11811
|
+
* @source C++ type game_PlayerState::PLAYER_ITEMS_LIST (`xr_vector<u16>`)
|
|
11812
|
+
* @customConstructor game_player_item_list
|
|
11813
|
+
* @group xr_multiplayer
|
|
11814
|
+
*
|
|
11815
|
+
* @remarks
|
|
11816
|
+
* The field is exposed as a native vector object. No public vector mutation or iteration helpers are declared here
|
|
11817
|
+
* because the binding only exposes the field, not a script API for `xr_vector<u16>` itself.
|
|
11411
11818
|
*/
|
|
11819
|
+
export class game_player_item_list {
|
|
11820
|
+
private constructor();
|
|
11821
|
+
}
|
|
11822
|
+
|
|
11823
|
+
/**
|
|
11824
|
+
* Multiplayer player state replicated by multiplayer game modes.
|
|
11825
|
+
*
|
|
11826
|
+
* @source C++ class game_PlayerState
|
|
11827
|
+
* @customConstructor game_PlayerState
|
|
11828
|
+
* @group xr_multiplayer
|
|
11829
|
+
*
|
|
11830
|
+
* @remarks
|
|
11831
|
+
* This is the networked player state used by multiplayer server/client code. The public fields are the exact names
|
|
11832
|
+
* exported by the Lua binding, which do not always match the underlying C++ member names.
|
|
11833
|
+
*/
|
|
11834
|
+
export class game_PlayerState {
|
|
11835
|
+
/**
|
|
11836
|
+
* Player team id.
|
|
11837
|
+
*/
|
|
11838
|
+
public team: u8;
|
|
11839
|
+
|
|
11840
|
+
/**
|
|
11841
|
+
* Rival kill count.
|
|
11842
|
+
*/
|
|
11843
|
+
public kills: i16;
|
|
11844
|
+
|
|
11845
|
+
/**
|
|
11846
|
+
* Death count.
|
|
11847
|
+
*/
|
|
11848
|
+
public deaths: i16;
|
|
11849
|
+
|
|
11850
|
+
/**
|
|
11851
|
+
* Current multiplayer money amount.
|
|
11852
|
+
*/
|
|
11853
|
+
public money_for_round: i32;
|
|
11854
|
+
|
|
11855
|
+
/**
|
|
11856
|
+
* Packed `GAME_PLAYER_FLAG_*` bitmask.
|
|
11857
|
+
*/
|
|
11858
|
+
public flags: u16;
|
|
11859
|
+
|
|
11860
|
+
/**
|
|
11861
|
+
* Player network ping.
|
|
11862
|
+
*/
|
|
11863
|
+
public ping: u16;
|
|
11864
|
+
|
|
11865
|
+
/**
|
|
11866
|
+
* Current player game id.
|
|
11867
|
+
*/
|
|
11868
|
+
public GameID: u16;
|
|
11869
|
+
|
|
11870
|
+
/**
|
|
11871
|
+
* Object id of the last hitter.
|
|
11872
|
+
*/
|
|
11873
|
+
public lasthitter: u16;
|
|
11874
|
+
|
|
11875
|
+
/**
|
|
11876
|
+
* Weapon id used by the last hitter.
|
|
11877
|
+
*/
|
|
11878
|
+
public lasthitweapon: u16;
|
|
11879
|
+
|
|
11880
|
+
/**
|
|
11881
|
+
* Multiplayer skin id.
|
|
11882
|
+
*/
|
|
11883
|
+
public skin: i8;
|
|
11884
|
+
|
|
11885
|
+
/**
|
|
11886
|
+
* Scheduled respawn time.
|
|
11887
|
+
*/
|
|
11888
|
+
public RespawnTime: u32;
|
|
11889
|
+
|
|
11890
|
+
/**
|
|
11891
|
+
* Last money delta shown to the player.
|
|
11892
|
+
*/
|
|
11893
|
+
public money_delta: i16;
|
|
11894
|
+
|
|
11895
|
+
/**
|
|
11896
|
+
* Native item id vector containing selected buy/spawn item ids.
|
|
11897
|
+
*/
|
|
11898
|
+
public pItemList: game_player_item_list;
|
|
11899
|
+
|
|
11900
|
+
/**
|
|
11901
|
+
* Money difference from the last buy transaction.
|
|
11902
|
+
*/
|
|
11903
|
+
public LastBuyAcount: i32;
|
|
11904
|
+
|
|
11905
|
+
/**
|
|
11906
|
+
* Create an empty player state.
|
|
11907
|
+
*/
|
|
11908
|
+
public constructor();
|
|
11909
|
+
|
|
11910
|
+
/**
|
|
11911
|
+
* Check whether a player flag bit is set.
|
|
11912
|
+
*
|
|
11913
|
+
* @param flag - `GAME_PLAYER_FLAG_*` bit to test.
|
|
11914
|
+
* @returns Whether the bit is set.
|
|
11915
|
+
*/
|
|
11916
|
+
public testFlag(flag: u16): boolean;
|
|
11917
|
+
|
|
11918
|
+
/**
|
|
11919
|
+
* Set a player flag bit.
|
|
11920
|
+
*
|
|
11921
|
+
* @param flag - `GAME_PLAYER_FLAG_*` bit to set.
|
|
11922
|
+
*/
|
|
11923
|
+
public setFlag(flag: u16): void;
|
|
11924
|
+
|
|
11925
|
+
/**
|
|
11926
|
+
* Clear a player flag bit.
|
|
11927
|
+
*
|
|
11928
|
+
* @param flag - `GAME_PLAYER_FLAG_*` bit to clear.
|
|
11929
|
+
*/
|
|
11930
|
+
public resetFlag(flag: u16): void;
|
|
11931
|
+
|
|
11932
|
+
/**
|
|
11933
|
+
* @returns Current multiplayer player name.
|
|
11934
|
+
*/
|
|
11935
|
+
public getName(): string;
|
|
11936
|
+
|
|
11937
|
+
/**
|
|
11938
|
+
* Set multiplayer player name.
|
|
11939
|
+
*
|
|
11940
|
+
* @param name - New player name.
|
|
11941
|
+
*/
|
|
11942
|
+
public setName(name: string): void;
|
|
11943
|
+
|
|
11944
|
+
/**
|
|
11945
|
+
* Reset this state to default values.
|
|
11946
|
+
*/
|
|
11947
|
+
public clear(): void;
|
|
11948
|
+
|
|
11949
|
+
/**
|
|
11950
|
+
* Write this state to a network packet.
|
|
11951
|
+
*
|
|
11952
|
+
* @param packet - Target network packet.
|
|
11953
|
+
* @param full - Whether to include account data in the packet.
|
|
11954
|
+
*/
|
|
11955
|
+
public net_Export(packet: net_packet, full?: boolean): void;
|
|
11956
|
+
|
|
11957
|
+
/**
|
|
11958
|
+
* Read this state from a network packet.
|
|
11959
|
+
*
|
|
11960
|
+
* @param packet - Source network packet.
|
|
11961
|
+
*/
|
|
11962
|
+
public net_Import(packet: net_packet): void;
|
|
11963
|
+
}
|
|
11412
11964
|
}
|
|
11413
11965
|
|
|
11414
11966
|
declare module "xray16" {
|
|
@@ -11829,339 +12381,318 @@ declare module "xray16" {
|
|
|
11829
12381
|
}
|
|
11830
12382
|
|
|
11831
12383
|
/**
|
|
11832
|
-
*
|
|
12384
|
+
* Native editor property item collection.
|
|
11833
12385
|
*
|
|
11834
|
-
* @source C++ class
|
|
11835
|
-
* @customConstructor
|
|
12386
|
+
* @source C++ class PropItemVec
|
|
12387
|
+
* @customConstructor prop_item_vec
|
|
11836
12388
|
* @group xr_properties
|
|
11837
|
-
*
|
|
11838
|
-
* @remarks
|
|
11839
|
-
* This is an editor bridge. Most methods require a real editor property item list and a server object that owns
|
|
11840
|
-
* the wrapped field; they are not useful in ordinary gameplay scripts.
|
|
11841
12389
|
*/
|
|
11842
|
-
export class
|
|
11843
|
-
/**
|
|
11844
|
-
* Create a 3-axis angle property.
|
|
11845
|
-
*
|
|
11846
|
-
* @remarks
|
|
11847
|
-
* Bound object field must be an `Fvector`.
|
|
11848
|
-
*
|
|
11849
|
-
* @returns Engine property value handle.
|
|
11850
|
-
*/
|
|
11851
|
-
public create_vangle(): unknown;
|
|
11852
|
-
|
|
11853
|
-
/**
|
|
11854
|
-
* Create an angle property.
|
|
11855
|
-
*
|
|
11856
|
-
* @remarks
|
|
11857
|
-
* Bound object field must be a float.
|
|
11858
|
-
*
|
|
11859
|
-
* @returns Engine property value handle.
|
|
11860
|
-
*/
|
|
11861
|
-
public create_angle(): unknown;
|
|
11862
|
-
|
|
11863
|
-
/**
|
|
11864
|
-
* Create a time property.
|
|
11865
|
-
*
|
|
11866
|
-
* @remarks
|
|
11867
|
-
* Bound object field must be a float.
|
|
11868
|
-
*
|
|
11869
|
-
* @returns Engine property value handle.
|
|
11870
|
-
*/
|
|
11871
|
-
public create_time(): unknown;
|
|
11872
|
-
|
|
11873
|
-
/**
|
|
11874
|
-
* Create a color property.
|
|
11875
|
-
*
|
|
11876
|
-
* @remarks
|
|
11877
|
-
* Bound object field must be a 32-bit color value.
|
|
11878
|
-
*
|
|
11879
|
-
* @returns Engine property value handle.
|
|
11880
|
-
*/
|
|
11881
|
-
public create_color(): unknown;
|
|
11882
|
-
|
|
11883
|
-
/**
|
|
11884
|
-
* Create a vector color property.
|
|
11885
|
-
*
|
|
11886
|
-
* @remarks
|
|
11887
|
-
* Bound object field must be an `Fvector`.
|
|
11888
|
-
*
|
|
11889
|
-
* @returns Engine property value handle.
|
|
11890
|
-
*/
|
|
11891
|
-
public create_vcolor(): unknown;
|
|
11892
|
-
|
|
11893
|
-
/**
|
|
11894
|
-
* Create a float color property.
|
|
11895
|
-
*
|
|
11896
|
-
* @remarks
|
|
11897
|
-
* Bound object field must be an `Fcolor`.
|
|
11898
|
-
*
|
|
11899
|
-
* @returns Engine property value handle.
|
|
11900
|
-
*/
|
|
11901
|
-
public create_fcolor(): unknown;
|
|
11902
|
-
|
|
11903
|
-
/**
|
|
11904
|
-
* Create a runtime token list property.
|
|
11905
|
-
*
|
|
11906
|
-
* @remarks
|
|
11907
|
-
* Requires an `rtoken_list`; keep it alive while the editor property uses it.
|
|
11908
|
-
*
|
|
11909
|
-
* @returns Engine property value handle.
|
|
11910
|
-
*/
|
|
11911
|
-
public create_list(): unknown;
|
|
11912
|
-
|
|
11913
|
-
/**
|
|
11914
|
-
* Create an 8-bit token property.
|
|
11915
|
-
*
|
|
11916
|
-
* @remarks
|
|
11917
|
-
* Requires a `token_list`; ids must fit into an unsigned 8-bit value.
|
|
11918
|
-
*
|
|
11919
|
-
* @returns Engine property value handle.
|
|
11920
|
-
*/
|
|
11921
|
-
public create_token8(): unknown;
|
|
11922
|
-
|
|
11923
|
-
/**
|
|
11924
|
-
* Create a 16-bit token property.
|
|
11925
|
-
*
|
|
11926
|
-
* @remarks
|
|
11927
|
-
* Requires a `token_list`; ids must fit into an unsigned 16-bit value.
|
|
11928
|
-
*
|
|
11929
|
-
* @returns Engine property value handle.
|
|
11930
|
-
*/
|
|
11931
|
-
public create_token16(): unknown;
|
|
11932
|
-
|
|
11933
|
-
/**
|
|
11934
|
-
* Create a 32-bit token property.
|
|
11935
|
-
*
|
|
11936
|
-
* @remarks
|
|
11937
|
-
* Requires a `token_list`; ids are stored as unsigned 32-bit values.
|
|
11938
|
-
*
|
|
11939
|
-
* @returns Engine property value handle.
|
|
11940
|
-
*/
|
|
11941
|
-
public create_token32(): unknown;
|
|
11942
|
-
|
|
11943
|
-
/**
|
|
11944
|
-
* Create an 8-bit flag property.
|
|
11945
|
-
*
|
|
11946
|
-
* @remarks
|
|
11947
|
-
* Binds individual bit toggles to an unsigned 8-bit integer field.
|
|
11948
|
-
*
|
|
11949
|
-
* @returns Engine property value handle.
|
|
11950
|
-
*/
|
|
11951
|
-
public create_flag8(): unknown;
|
|
11952
|
-
|
|
11953
|
-
/**
|
|
11954
|
-
* Create a 16-bit flag property.
|
|
11955
|
-
*
|
|
11956
|
-
* @remarks
|
|
11957
|
-
* Binds individual bit toggles to an unsigned 16-bit integer field.
|
|
11958
|
-
*
|
|
11959
|
-
* @returns Engine property value handle.
|
|
11960
|
-
*/
|
|
11961
|
-
public create_flag16(): unknown;
|
|
11962
|
-
|
|
12390
|
+
export class prop_item_vec {
|
|
11963
12391
|
/**
|
|
11964
|
-
*
|
|
11965
|
-
*
|
|
11966
|
-
* @remarks
|
|
11967
|
-
* Binds individual bit toggles to an unsigned 32-bit integer field.
|
|
11968
|
-
*
|
|
11969
|
-
* @returns Engine property value handle.
|
|
11970
|
-
*/
|
|
11971
|
-
public create_flag32(): unknown;
|
|
11972
|
-
|
|
11973
|
-
/**
|
|
11974
|
-
* Create a vector property.
|
|
11975
|
-
*
|
|
11976
|
-
* @remarks
|
|
11977
|
-
* Bound object field must be an `Fvector`.
|
|
11978
|
-
*
|
|
11979
|
-
* @returns Engine property value handle.
|
|
12392
|
+
* Engine-created property item vector.
|
|
11980
12393
|
*/
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
public
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12394
|
+
private constructor();
|
|
12395
|
+
}
|
|
12396
|
+
|
|
12397
|
+
/**
|
|
12398
|
+
* Editor asset chooser mode constants.
|
|
12399
|
+
*
|
|
12400
|
+
* @source `src/xrServerEntities/script_properties_list_helper_script.cpp`, `choose_type` binding.
|
|
12401
|
+
* @customConstructor choose_type
|
|
12402
|
+
* @group xr_properties
|
|
12403
|
+
*/
|
|
12404
|
+
export class choose_type {
|
|
12405
|
+
public static readonly custom: u32;
|
|
12406
|
+
public static readonly sound_source: u32;
|
|
12407
|
+
public static readonly sound_environment: u32;
|
|
12408
|
+
public static readonly library_object: u32;
|
|
12409
|
+
public static readonly engine_shader: u32;
|
|
12410
|
+
public static readonly compiler_shader: u32;
|
|
12411
|
+
public static readonly particle_effect: u32;
|
|
12412
|
+
public static readonly particle_system: u32;
|
|
12413
|
+
public static readonly texture: u32;
|
|
12414
|
+
public static readonly entity: u32;
|
|
12415
|
+
public static readonly spawn_item: u32;
|
|
12416
|
+
public static readonly light_animation: u32;
|
|
12417
|
+
public static readonly visual: u32;
|
|
12418
|
+
public static readonly skeleton_animations: u32;
|
|
12419
|
+
public static readonly skeleton_bones: u32;
|
|
12420
|
+
public static readonly material: u32;
|
|
12421
|
+
public static readonly game_animation: u32;
|
|
12422
|
+
public static readonly game_motion: u32;
|
|
12423
|
+
|
|
12424
|
+
/**
|
|
12425
|
+
* Engine-owned chooser constants.
|
|
12011
12426
|
*/
|
|
12012
|
-
|
|
12427
|
+
private constructor();
|
|
12428
|
+
}
|
|
12013
12429
|
|
|
12430
|
+
/**
|
|
12431
|
+
* Editor asset chooser mode value.
|
|
12432
|
+
*
|
|
12433
|
+
* @group xr_properties
|
|
12434
|
+
*/
|
|
12435
|
+
export type TXR_choose_type = EnumeratedStaticsValues<typeof choose_type>;
|
|
12436
|
+
|
|
12437
|
+
/** @group xr_properties */
|
|
12438
|
+
export class caption_value extends prop_value {}
|
|
12439
|
+
/** @group xr_properties */
|
|
12440
|
+
export class canvas_value extends prop_value {}
|
|
12441
|
+
/** @group xr_properties */
|
|
12442
|
+
export class button_value extends prop_value {}
|
|
12443
|
+
/** @group xr_properties */
|
|
12444
|
+
export class text_value extends prop_value {}
|
|
12445
|
+
/** @group xr_properties */
|
|
12446
|
+
export class choose_value extends text_value {}
|
|
12447
|
+
/** @group xr_properties */
|
|
12448
|
+
export class bool_value extends prop_value {}
|
|
12449
|
+
/** @group xr_properties */
|
|
12450
|
+
export class vector_value extends prop_value {}
|
|
12451
|
+
/** @group xr_properties */
|
|
12452
|
+
export class color_value extends prop_value {}
|
|
12453
|
+
/** @group xr_properties */
|
|
12454
|
+
export class float_value extends prop_value {}
|
|
12455
|
+
/** @group xr_properties */
|
|
12456
|
+
export class s8_value extends prop_value {}
|
|
12457
|
+
/** @group xr_properties */
|
|
12458
|
+
export class s16_value extends prop_value {}
|
|
12459
|
+
/** @group xr_properties */
|
|
12460
|
+
export class s32_value extends prop_value {}
|
|
12461
|
+
/** @group xr_properties */
|
|
12462
|
+
export class u8_value extends prop_value {}
|
|
12463
|
+
/** @group xr_properties */
|
|
12464
|
+
export class u16_value extends prop_value {}
|
|
12465
|
+
/** @group xr_properties */
|
|
12466
|
+
export class u32_value extends prop_value {}
|
|
12467
|
+
/** @group xr_properties */
|
|
12468
|
+
export class flag8_value extends prop_value {}
|
|
12469
|
+
/** @group xr_properties */
|
|
12470
|
+
export class flag16_value extends prop_value {}
|
|
12471
|
+
/** @group xr_properties */
|
|
12472
|
+
export class flag32_value extends prop_value {}
|
|
12473
|
+
/** @group xr_properties */
|
|
12474
|
+
export class token8_value extends prop_value {}
|
|
12475
|
+
/** @group xr_properties */
|
|
12476
|
+
export class token16_value extends prop_value {}
|
|
12477
|
+
/** @group xr_properties */
|
|
12478
|
+
export class token32_value extends prop_value {}
|
|
12479
|
+
/** @group xr_properties */
|
|
12480
|
+
export class list_value extends text_value {}
|
|
12481
|
+
/**
|
|
12482
|
+
* Helper for building editor property rows for spawned objects.
|
|
12483
|
+
*
|
|
12484
|
+
* @source C++ class properties_list_helper
|
|
12485
|
+
* @customConstructor properties_list_helper
|
|
12486
|
+
* @group xr_properties
|
|
12487
|
+
*
|
|
12488
|
+
* @remarks
|
|
12489
|
+
* This is an editor bridge. Most methods require a real editor property item list and a server object that owns
|
|
12490
|
+
* the wrapped field; they are not useful in ordinary gameplay scripts.
|
|
12491
|
+
*/
|
|
12492
|
+
export class properties_list_helper extends EngineBinding {
|
|
12014
12493
|
/**
|
|
12015
|
-
* Create
|
|
12016
|
-
*
|
|
12017
|
-
* @remarks
|
|
12018
|
-
* Bound object field must fit into an unsigned 8-bit value.
|
|
12019
|
-
*
|
|
12020
|
-
* @returns Engine property value handle.
|
|
12494
|
+
* Create a 3-axis angle property bound to an `Fvector` field.
|
|
12021
12495
|
*/
|
|
12022
|
-
public
|
|
12496
|
+
public create_vangle(
|
|
12497
|
+
items: prop_item_vec,
|
|
12498
|
+
key: string,
|
|
12499
|
+
object: object,
|
|
12500
|
+
name: string,
|
|
12501
|
+
min?: f32,
|
|
12502
|
+
max?: f32,
|
|
12503
|
+
increment?: f32,
|
|
12504
|
+
decimals?: i32
|
|
12505
|
+
): vector_value;
|
|
12023
12506
|
|
|
12024
12507
|
/**
|
|
12025
|
-
* Create an
|
|
12026
|
-
*
|
|
12027
|
-
* @remarks
|
|
12028
|
-
* Bound object field must fit into an unsigned 16-bit value.
|
|
12029
|
-
*
|
|
12030
|
-
* @returns Engine property value handle.
|
|
12508
|
+
* Create an angle property bound to a float field.
|
|
12031
12509
|
*/
|
|
12032
|
-
public
|
|
12510
|
+
public create_angle(
|
|
12511
|
+
items: prop_item_vec,
|
|
12512
|
+
key: string,
|
|
12513
|
+
object: object,
|
|
12514
|
+
name: string,
|
|
12515
|
+
min?: f32,
|
|
12516
|
+
max?: f32,
|
|
12517
|
+
increment?: f32,
|
|
12518
|
+
decimals?: i32
|
|
12519
|
+
): float_value;
|
|
12033
12520
|
|
|
12034
12521
|
/**
|
|
12035
|
-
* Create
|
|
12036
|
-
*
|
|
12037
|
-
* @remarks
|
|
12038
|
-
* Bound object field must fit into an unsigned 32-bit value.
|
|
12039
|
-
*
|
|
12040
|
-
* @returns Engine property value handle.
|
|
12522
|
+
* Create a time property bound to a float field.
|
|
12041
12523
|
*/
|
|
12042
|
-
public
|
|
12524
|
+
public create_time(
|
|
12525
|
+
items: prop_item_vec,
|
|
12526
|
+
key: string,
|
|
12527
|
+
object: object,
|
|
12528
|
+
name: string,
|
|
12529
|
+
min?: f32,
|
|
12530
|
+
max?: f32
|
|
12531
|
+
): float_value;
|
|
12043
12532
|
|
|
12044
12533
|
/**
|
|
12045
|
-
* Create a
|
|
12046
|
-
*
|
|
12047
|
-
* @remarks
|
|
12048
|
-
* Bound object field must fit into a signed 32-bit value.
|
|
12049
|
-
*
|
|
12050
|
-
* @returns Engine property value handle.
|
|
12534
|
+
* Create a 32-bit packed color property bound to an unsigned integer field.
|
|
12051
12535
|
*/
|
|
12052
|
-
public
|
|
12536
|
+
public create_color(items: prop_item_vec, key: string, object: object, name: string): u32_value;
|
|
12053
12537
|
|
|
12054
12538
|
/**
|
|
12055
|
-
* Create a
|
|
12056
|
-
*
|
|
12057
|
-
* @remarks
|
|
12058
|
-
* Bound object field must fit into a signed 16-bit value.
|
|
12059
|
-
*
|
|
12060
|
-
* @returns Engine property value handle.
|
|
12539
|
+
* Create a vector color property bound to an `Fvector` field.
|
|
12061
12540
|
*/
|
|
12062
|
-
public
|
|
12541
|
+
public create_vcolor(items: prop_item_vec, key: string, object: object, name: string): vector_value;
|
|
12063
12542
|
|
|
12064
12543
|
/**
|
|
12065
|
-
* Create
|
|
12066
|
-
*
|
|
12067
|
-
* @remarks
|
|
12068
|
-
* Requires a chooser mode and a string-like field that receives the selected section, asset, or path.
|
|
12069
|
-
*
|
|
12070
|
-
* @returns Engine property value handle.
|
|
12544
|
+
* Create a float color property bound to an `Fcolor` field.
|
|
12071
12545
|
*/
|
|
12072
|
-
public
|
|
12546
|
+
public create_fcolor(items: prop_item_vec, key: string, object: object, name: string): color_value;
|
|
12073
12547
|
|
|
12074
12548
|
/**
|
|
12075
|
-
* Create a
|
|
12076
|
-
*
|
|
12077
|
-
* @remarks
|
|
12078
|
-
* Editor-only command row. Use it to expose an action callback, not persistent object data.
|
|
12079
|
-
*
|
|
12080
|
-
* @returns Engine property value handle.
|
|
12549
|
+
* Create a runtime token list property bound to a string field.
|
|
12081
12550
|
*/
|
|
12082
|
-
public
|
|
12551
|
+
public create_list(items: prop_item_vec, key: string, object: object, name: string, tokens: rtoken_list): list_value;
|
|
12083
12552
|
|
|
12084
12553
|
/**
|
|
12085
|
-
* Create
|
|
12086
|
-
*
|
|
12087
|
-
* @remarks
|
|
12088
|
-
* Editor-only drawing surface for custom property UI.
|
|
12089
|
-
*
|
|
12090
|
-
* @returns Engine property value handle.
|
|
12554
|
+
* Create token properties bound to integer fields.
|
|
12091
12555
|
*/
|
|
12092
|
-
public
|
|
12556
|
+
public create_token8(items: prop_item_vec, key: string, object: object, name: string, tokens: token_list): token8_value;
|
|
12557
|
+
public create_token16(items: prop_item_vec, key: string, object: object, name: string, tokens: token_list): token16_value;
|
|
12558
|
+
public create_token32(items: prop_item_vec, key: string, object: object, name: string, tokens: token_list): token32_value;
|
|
12093
12559
|
|
|
12094
12560
|
/**
|
|
12095
|
-
* Create
|
|
12096
|
-
*
|
|
12097
|
-
* @remarks
|
|
12098
|
-
* Editor-only label row used to group or explain nearby properties.
|
|
12099
|
-
*
|
|
12100
|
-
* @returns Engine property value handle.
|
|
12561
|
+
* Create flag properties bound to integer flag fields.
|
|
12101
12562
|
*/
|
|
12102
|
-
public
|
|
12563
|
+
public create_flag8(
|
|
12564
|
+
items: prop_item_vec,
|
|
12565
|
+
key: string,
|
|
12566
|
+
object: object,
|
|
12567
|
+
name: string,
|
|
12568
|
+
mask: u8,
|
|
12569
|
+
offCaption?: string,
|
|
12570
|
+
onCaption?: string,
|
|
12571
|
+
flags?: u32
|
|
12572
|
+
): flag8_value;
|
|
12573
|
+
public create_flag16(
|
|
12574
|
+
items: prop_item_vec,
|
|
12575
|
+
key: string,
|
|
12576
|
+
object: object,
|
|
12577
|
+
name: string,
|
|
12578
|
+
mask: u16,
|
|
12579
|
+
offCaption?: string,
|
|
12580
|
+
onCaption?: string,
|
|
12581
|
+
flags?: u32
|
|
12582
|
+
): flag16_value;
|
|
12583
|
+
public create_flag32(
|
|
12584
|
+
items: prop_item_vec,
|
|
12585
|
+
key: string,
|
|
12586
|
+
object: object,
|
|
12587
|
+
name: string,
|
|
12588
|
+
mask: u32,
|
|
12589
|
+
offCaption?: string,
|
|
12590
|
+
onCaption?: string,
|
|
12591
|
+
flags?: u32
|
|
12592
|
+
): flag32_value;
|
|
12103
12593
|
|
|
12104
12594
|
/**
|
|
12105
|
-
*
|
|
12106
|
-
*
|
|
12107
|
-
* @remarks
|
|
12108
|
-
* Editor bridge callback. Native code passes the edited value through an output argument.
|
|
12109
|
-
*
|
|
12110
|
-
* @returns Engine callback result.
|
|
12595
|
+
* Create a vector property bound to an `Fvector` field.
|
|
12111
12596
|
*/
|
|
12112
|
-
public
|
|
12597
|
+
public create_vector(
|
|
12598
|
+
items: prop_item_vec,
|
|
12599
|
+
key: string,
|
|
12600
|
+
object: object,
|
|
12601
|
+
name: string,
|
|
12602
|
+
min?: f32,
|
|
12603
|
+
max?: f32,
|
|
12604
|
+
increment?: f32,
|
|
12605
|
+
decimals?: i32
|
|
12606
|
+
): vector_value;
|
|
12113
12607
|
|
|
12114
12608
|
/**
|
|
12115
|
-
*
|
|
12116
|
-
*
|
|
12117
|
-
* @remarks
|
|
12118
|
-
* Editor bridge callback. Native code passes the current value through an output argument.
|
|
12119
|
-
*
|
|
12120
|
-
* @returns Engine callback result.
|
|
12609
|
+
* Create a boolean property bound to `table[name]` and owned by `object`.
|
|
12121
12610
|
*/
|
|
12122
|
-
public
|
|
12611
|
+
public create_bool(items: prop_item_vec, key: string, object: object, table: object, name: string): bool_value;
|
|
12123
12612
|
|
|
12124
12613
|
/**
|
|
12125
|
-
*
|
|
12126
|
-
*
|
|
12127
|
-
* @remarks
|
|
12128
|
-
* Editor bridge callback. Native code passes the edited name through an output argument.
|
|
12129
|
-
*
|
|
12130
|
-
* @returns Engine callback result.
|
|
12614
|
+
* Create numeric properties bound to object fields.
|
|
12131
12615
|
*/
|
|
12132
|
-
public
|
|
12616
|
+
public create_float(
|
|
12617
|
+
items: prop_item_vec,
|
|
12618
|
+
key: string,
|
|
12619
|
+
object: object,
|
|
12620
|
+
name: string,
|
|
12621
|
+
min?: f32,
|
|
12622
|
+
max?: f32,
|
|
12623
|
+
increment?: f32,
|
|
12624
|
+
decimals?: i32
|
|
12625
|
+
): float_value;
|
|
12626
|
+
public create_u8(items: prop_item_vec, key: string, object: object, name: string, min?: u8, max?: u8, increment?: u8): u8_value;
|
|
12627
|
+
public create_u16(
|
|
12628
|
+
items: prop_item_vec,
|
|
12629
|
+
key: string,
|
|
12630
|
+
object: object,
|
|
12631
|
+
name: string,
|
|
12632
|
+
min?: u16,
|
|
12633
|
+
max?: u16,
|
|
12634
|
+
increment?: u16
|
|
12635
|
+
): u16_value;
|
|
12636
|
+
public create_u32(
|
|
12637
|
+
items: prop_item_vec,
|
|
12638
|
+
key: string,
|
|
12639
|
+
object: object,
|
|
12640
|
+
name: string,
|
|
12641
|
+
min?: u32,
|
|
12642
|
+
max?: u32,
|
|
12643
|
+
increment?: u32
|
|
12644
|
+
): u32_value;
|
|
12645
|
+
public create_s32(
|
|
12646
|
+
items: prop_item_vec,
|
|
12647
|
+
key: string,
|
|
12648
|
+
object: object,
|
|
12649
|
+
name: string,
|
|
12650
|
+
min?: i32,
|
|
12651
|
+
max?: i32,
|
|
12652
|
+
increment?: i32
|
|
12653
|
+
): s32_value;
|
|
12654
|
+
public create_s16(
|
|
12655
|
+
items: prop_item_vec,
|
|
12656
|
+
key: string,
|
|
12657
|
+
object: object,
|
|
12658
|
+
name: string,
|
|
12659
|
+
min?: i16,
|
|
12660
|
+
max?: i16,
|
|
12661
|
+
increment?: i16
|
|
12662
|
+
): s16_value;
|
|
12133
12663
|
|
|
12134
12664
|
/**
|
|
12135
|
-
*
|
|
12136
|
-
*
|
|
12137
|
-
* @remarks
|
|
12138
|
-
* Editor bridge callback. Native code passes the current name through an output argument.
|
|
12139
|
-
*
|
|
12140
|
-
* @returns Engine callback result.
|
|
12665
|
+
* Create an asset/object chooser property bound to a string field.
|
|
12141
12666
|
*/
|
|
12142
|
-
public
|
|
12667
|
+
public create_choose(
|
|
12668
|
+
items: prop_item_vec,
|
|
12669
|
+
key: string,
|
|
12670
|
+
object: object,
|
|
12671
|
+
name: string,
|
|
12672
|
+
mode: TXR_choose_type,
|
|
12673
|
+
path?: string,
|
|
12674
|
+
fillParam?: string,
|
|
12675
|
+
subItemCount?: u32
|
|
12676
|
+
): choose_value;
|
|
12143
12677
|
|
|
12144
12678
|
/**
|
|
12145
|
-
*
|
|
12146
|
-
*
|
|
12147
|
-
* @remarks
|
|
12148
|
-
* Editor bridge callback for vector rows, usually used to prepare a value before the editor opens.
|
|
12149
|
-
*
|
|
12150
|
-
* @returns Engine callback result.
|
|
12679
|
+
* Create editor-only utility rows.
|
|
12151
12680
|
*/
|
|
12152
|
-
public
|
|
12681
|
+
public create_button(items: prop_item_vec, key: string, value: string, flags: u32): button_value;
|
|
12682
|
+
public create_canvas(items: prop_item_vec, key: string, value: string, height: i32): canvas_value;
|
|
12683
|
+
public create_caption(items: prop_item_vec, key: string, value: string): caption_value;
|
|
12684
|
+
public create_text(items: prop_item_vec, key: string, object: object, name: string): text_value;
|
|
12153
12685
|
|
|
12154
12686
|
/**
|
|
12155
|
-
*
|
|
12156
|
-
*
|
|
12157
|
-
* @remarks
|
|
12158
|
-
* Editor bridge callback for vector rows, usually used to accept or normalize the edited value.
|
|
12159
|
-
*
|
|
12160
|
-
* @returns Engine callback result.
|
|
12687
|
+
* Standard editor callbacks used by property rows with luabind out-parameters.
|
|
12161
12688
|
*/
|
|
12162
|
-
public
|
|
12689
|
+
public float_on_after_edit(sender: prop_value, value: f32): LuaMultiReturn<[boolean, f32]>;
|
|
12690
|
+
public float_on_before_edit(sender: prop_value, value: f32): f32;
|
|
12691
|
+
public name_after_edit(sender: prop_value, value: string): LuaMultiReturn<[boolean, string]>;
|
|
12692
|
+
public name_before_edit(sender: prop_value, value: string): string;
|
|
12693
|
+
public vector_on_before_edit(sender: prop_value, value: vector): vector;
|
|
12694
|
+
public vector_on_after_edit(sender: prop_value, value: vector): boolean;
|
|
12163
12695
|
}
|
|
12164
|
-
|
|
12165
12696
|
/**
|
|
12166
12697
|
* Global editor properties helper.
|
|
12167
12698
|
*
|
|
@@ -12195,7 +12726,7 @@ declare module "xray16" {
|
|
|
12195
12726
|
*
|
|
12196
12727
|
* @returns Engine property value handle.
|
|
12197
12728
|
*/
|
|
12198
|
-
public token16_value():
|
|
12729
|
+
public token16_value(): token16_value;
|
|
12199
12730
|
|
|
12200
12731
|
/**
|
|
12201
12732
|
* Treat this property value as a 32-bit flag value.
|
|
@@ -12205,7 +12736,7 @@ declare module "xray16" {
|
|
|
12205
12736
|
*
|
|
12206
12737
|
* @returns Engine property value handle.
|
|
12207
12738
|
*/
|
|
12208
|
-
public flag32_value():
|
|
12739
|
+
public flag32_value(): flag32_value;
|
|
12209
12740
|
|
|
12210
12741
|
/**
|
|
12211
12742
|
* Treat this property value as text.
|
|
@@ -12215,7 +12746,7 @@ declare module "xray16" {
|
|
|
12215
12746
|
*
|
|
12216
12747
|
* @returns Engine property value handle.
|
|
12217
12748
|
*/
|
|
12218
|
-
public text_value():
|
|
12749
|
+
public text_value(): text_value;
|
|
12219
12750
|
|
|
12220
12751
|
/**
|
|
12221
12752
|
* Treat this property value as a boolean.
|
|
@@ -12225,7 +12756,7 @@ declare module "xray16" {
|
|
|
12225
12756
|
*
|
|
12226
12757
|
* @returns Engine property value handle.
|
|
12227
12758
|
*/
|
|
12228
|
-
public bool_value():
|
|
12759
|
+
public bool_value(): bool_value;
|
|
12229
12760
|
|
|
12230
12761
|
/**
|
|
12231
12762
|
* Treat this property value as an unsigned 16-bit integer.
|
|
@@ -12235,7 +12766,7 @@ declare module "xray16" {
|
|
|
12235
12766
|
*
|
|
12236
12767
|
* @returns Engine property value handle.
|
|
12237
12768
|
*/
|
|
12238
|
-
public u16_value():
|
|
12769
|
+
public u16_value(): u16_value;
|
|
12239
12770
|
|
|
12240
12771
|
/**
|
|
12241
12772
|
* Treat this property value as a signed 16-bit integer.
|
|
@@ -12245,7 +12776,7 @@ declare module "xray16" {
|
|
|
12245
12776
|
*
|
|
12246
12777
|
* @returns Engine property value handle.
|
|
12247
12778
|
*/
|
|
12248
|
-
public s16_value():
|
|
12779
|
+
public s16_value(): s16_value;
|
|
12249
12780
|
|
|
12250
12781
|
/**
|
|
12251
12782
|
* Treat this property value as a button.
|
|
@@ -12255,7 +12786,7 @@ declare module "xray16" {
|
|
|
12255
12786
|
*
|
|
12256
12787
|
* @returns Engine property value handle.
|
|
12257
12788
|
*/
|
|
12258
|
-
public button_value():
|
|
12789
|
+
public button_value(): button_value;
|
|
12259
12790
|
|
|
12260
12791
|
/**
|
|
12261
12792
|
* Treat this property value as a caption.
|
|
@@ -12265,7 +12796,7 @@ declare module "xray16" {
|
|
|
12265
12796
|
*
|
|
12266
12797
|
* @returns Engine property value handle.
|
|
12267
12798
|
*/
|
|
12268
|
-
public caption_value():
|
|
12799
|
+
public caption_value(): caption_value;
|
|
12269
12800
|
}
|
|
12270
12801
|
|
|
12271
12802
|
/**
|
|
@@ -12513,19 +13044,29 @@ declare module "xray16" {
|
|
|
12513
13044
|
export const relation_registry: IXR_relation_registry;
|
|
12514
13045
|
|
|
12515
13046
|
/**
|
|
12516
|
-
*
|
|
13047
|
+
* Relation type names exposed through the `game_object.relation` Lua enum.
|
|
12517
13048
|
*
|
|
12518
|
-
*
|
|
12519
|
-
*
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
13049
|
+
* @source `src/xrGame/script_game_object_script2.cpp`, `game_object.relation` enum.
|
|
13050
|
+
* @group xr_relation
|
|
13051
|
+
*/
|
|
13052
|
+
export type TXR_relation_name = "friend" | "neutral" | "enemy" | "dummy";
|
|
13053
|
+
|
|
13054
|
+
/**
|
|
13055
|
+
* Relation type returned by `game_object.relation()` and accepted by `game_object.set_relation()`.
|
|
12524
13056
|
*
|
|
13057
|
+
* @source C++ enum ALife::ERelationType
|
|
12525
13058
|
* @group xr_relation
|
|
13059
|
+
*
|
|
13060
|
+
* @remarks
|
|
13061
|
+
* `game_object.relation()` returns `game_object.dummy` when either object cannot be treated as a living entity.
|
|
13062
|
+
* `3` is the native `eRelationTypeWorstEnemy` value; it is not exported as a named Lua enum member.
|
|
12526
13063
|
*/
|
|
12527
|
-
export type TXR_relation =
|
|
12528
|
-
|
|
13064
|
+
export type TXR_relation =
|
|
13065
|
+
| typeof game_object.dummy
|
|
13066
|
+
| typeof game_object.friend
|
|
13067
|
+
| typeof game_object.neutral
|
|
13068
|
+
| typeof game_object.enemy
|
|
13069
|
+
| 3;}
|
|
12529
13070
|
|
|
12530
13071
|
declare module "xray16" {
|
|
12531
13072
|
/**
|
|
@@ -14145,14 +14686,36 @@ declare module "xray16" {
|
|
|
14145
14686
|
/**
|
|
14146
14687
|
* @group xr_task
|
|
14147
14688
|
*/
|
|
14148
|
-
export type TXR_TaskStateName =
|
|
14689
|
+
export type TXR_TaskStateName = "fail" | "in_progress" | "completed" | "task_dummy";
|
|
14149
14690
|
|
|
14150
14691
|
/**
|
|
14151
14692
|
* ETaskState.
|
|
14152
14693
|
*
|
|
14153
14694
|
* @group xr_task
|
|
14154
14695
|
*/
|
|
14155
|
-
export type TXR_TaskState =
|
|
14696
|
+
export type TXR_TaskState =
|
|
14697
|
+
| typeof task.fail
|
|
14698
|
+
| typeof task.in_progress
|
|
14699
|
+
| typeof task.completed
|
|
14700
|
+
| typeof task.task_dummy;
|
|
14701
|
+
|
|
14702
|
+
/**
|
|
14703
|
+
* ETaskType constant names.
|
|
14704
|
+
*
|
|
14705
|
+
* @group xr_task
|
|
14706
|
+
*/
|
|
14707
|
+
export type TXR_TaskTypeName = "storyline" | "additional" | "insignificant" | "task_dummy";
|
|
14708
|
+
|
|
14709
|
+
/**
|
|
14710
|
+
* ETaskType.
|
|
14711
|
+
*
|
|
14712
|
+
* @group xr_task
|
|
14713
|
+
*/
|
|
14714
|
+
export type TXR_TaskType =
|
|
14715
|
+
| typeof task.storyline
|
|
14716
|
+
| typeof task.additional
|
|
14717
|
+
| typeof task.insignificant
|
|
14718
|
+
| typeof task.task_dummy;
|
|
14156
14719
|
|
|
14157
14720
|
/**
|
|
14158
14721
|
* One objective inside a game task.
|
|
@@ -14326,14 +14889,14 @@ declare module "xray16" {
|
|
|
14326
14889
|
/**
|
|
14327
14890
|
* @returns Task type, such as `task.storyline` or `task.additional`.
|
|
14328
14891
|
*/
|
|
14329
|
-
public get_type():
|
|
14892
|
+
public get_type(): TXR_TaskType;
|
|
14330
14893
|
|
|
14331
14894
|
/**
|
|
14332
14895
|
* Set task type.
|
|
14333
14896
|
*
|
|
14334
14897
|
* @param type - Task type, such as `task.storyline` or `task.additional`.
|
|
14335
14898
|
*/
|
|
14336
|
-
public set_type(type:
|
|
14899
|
+
public set_type(type: TXR_TaskType): void;
|
|
14337
14900
|
|
|
14338
14901
|
/**
|
|
14339
14902
|
* Set hint text for the linked map location.
|
|
@@ -16184,6 +16747,47 @@ declare module "xray16" {
|
|
|
16184
16747
|
*/
|
|
16185
16748
|
export type TXR_CCar_weapon_param = EnumeratedStaticsValues<typeof CCar>;
|
|
16186
16749
|
|
|
16750
|
+
/**
|
|
16751
|
+
* Helicopter life-state values returned by `CHelicopter.GetState()`.
|
|
16752
|
+
*
|
|
16753
|
+
* @source `src/xrGame/helicopter_script.cpp`, `CHelicopter.state` enum.
|
|
16754
|
+
* @group xr_level
|
|
16755
|
+
*/
|
|
16756
|
+
export type TXR_helicopter_state = typeof CHelicopter.eAlive | typeof CHelicopter.eDead | -1;
|
|
16757
|
+
|
|
16758
|
+
/**
|
|
16759
|
+
* Helicopter movement-state values returned by `CHelicopter.GetMovementState()`.
|
|
16760
|
+
*
|
|
16761
|
+
* @source `src/xrGame/helicopter_script.cpp`, `CHelicopter.movement_state` enum.
|
|
16762
|
+
* @group xr_level
|
|
16763
|
+
*/
|
|
16764
|
+
export type TXR_helicopter_movement_state =
|
|
16765
|
+
| typeof CHelicopter.eMovNone
|
|
16766
|
+
| typeof CHelicopter.eMovToPoint
|
|
16767
|
+
| typeof CHelicopter.eMovPatrolPath
|
|
16768
|
+
| typeof CHelicopter.eMovRoundPath
|
|
16769
|
+
| typeof CHelicopter.eMovLanding
|
|
16770
|
+
| typeof CHelicopter.eMovTakeOff;
|
|
16771
|
+
|
|
16772
|
+
/**
|
|
16773
|
+
* Helicopter body-state values returned by `CHelicopter.GetBodyState()`.
|
|
16774
|
+
*
|
|
16775
|
+
* @source `src/xrGame/helicopter_script.cpp`, `CHelicopter.body_state` enum.
|
|
16776
|
+
* @group xr_level
|
|
16777
|
+
*/
|
|
16778
|
+
export type TXR_helicopter_body_state = typeof CHelicopter.eBodyByPath | typeof CHelicopter.eBodyToPoint;
|
|
16779
|
+
|
|
16780
|
+
/**
|
|
16781
|
+
* Helicopter enemy-tracking values returned by `CHelicopter.GetHuntState()`.
|
|
16782
|
+
*
|
|
16783
|
+
* @source `src/xrGame/helicopter_script.cpp`, `CHelicopter.hunt_state` enum.
|
|
16784
|
+
* @group xr_level
|
|
16785
|
+
*/
|
|
16786
|
+
export type TXR_helicopter_hunt_state =
|
|
16787
|
+
| typeof CHelicopter.eEnemyNone
|
|
16788
|
+
| typeof CHelicopter.eEnemyPoint
|
|
16789
|
+
| typeof CHelicopter.eEnemyEntity;
|
|
16790
|
+
|
|
16187
16791
|
/**
|
|
16188
16792
|
* Script-controlled helicopter object.
|
|
16189
16793
|
*
|
|
@@ -16363,12 +16967,12 @@ declare module "xray16" {
|
|
|
16363
16967
|
/**
|
|
16364
16968
|
* @returns Current movement state.
|
|
16365
16969
|
*/
|
|
16366
|
-
public GetMovementState():
|
|
16970
|
+
public GetMovementState(): TXR_helicopter_movement_state;
|
|
16367
16971
|
|
|
16368
16972
|
/**
|
|
16369
16973
|
* @returns Current body aiming state.
|
|
16370
16974
|
*/
|
|
16371
|
-
public GetBodyState():
|
|
16975
|
+
public GetBodyState(): TXR_helicopter_body_state;
|
|
16372
16976
|
|
|
16373
16977
|
/**
|
|
16374
16978
|
* @returns Current velocity vector.
|
|
@@ -16378,7 +16982,7 @@ declare module "xray16" {
|
|
|
16378
16982
|
/**
|
|
16379
16983
|
* @returns Alive/dead state.
|
|
16380
16984
|
*/
|
|
16381
|
-
public GetState():
|
|
16985
|
+
public GetState(): TXR_helicopter_state;
|
|
16382
16986
|
|
|
16383
16987
|
/**
|
|
16384
16988
|
* @returns Distance to destination position.
|
|
@@ -16388,14 +16992,14 @@ declare module "xray16" {
|
|
|
16388
16992
|
/**
|
|
16389
16993
|
* @returns Current enemy tracking state.
|
|
16390
16994
|
*/
|
|
16391
|
-
public GetHuntState():
|
|
16995
|
+
public GetHuntState(): TXR_helicopter_hunt_state;
|
|
16392
16996
|
|
|
16393
16997
|
/**
|
|
16394
16998
|
* Set desired speed near the destination point.
|
|
16395
16999
|
*
|
|
16396
17000
|
* @param value - Speed value.
|
|
16397
17001
|
*/
|
|
16398
|
-
public SetSpeedInDestPoint(value: f32):
|
|
17002
|
+
public SetSpeedInDestPoint(value: f32): void;
|
|
16399
17003
|
|
|
16400
17004
|
/**
|
|
16401
17005
|
* Set linear acceleration limits.
|
|
@@ -17065,6 +17669,36 @@ declare module "xray16" {
|
|
|
17065
17669
|
public unblock_breaking(): void;
|
|
17066
17670
|
}
|
|
17067
17671
|
|
|
17672
|
+
/**
|
|
17673
|
+
* Opaque native physics condition handle.
|
|
17674
|
+
*
|
|
17675
|
+
* @source C++ class CPHCondition
|
|
17676
|
+
* @customConstructor CPHCondition
|
|
17677
|
+
* @group xr_physic
|
|
17678
|
+
*
|
|
17679
|
+
* @remarks
|
|
17680
|
+
* Script-friendly condition callbacks are exposed through `level.add_call`; this handle models native physics world
|
|
17681
|
+
* calls that already have a C++ condition object.
|
|
17682
|
+
*/
|
|
17683
|
+
export class CPHCondition {
|
|
17684
|
+
private constructor();
|
|
17685
|
+
}
|
|
17686
|
+
|
|
17687
|
+
/**
|
|
17688
|
+
* Opaque native physics action handle.
|
|
17689
|
+
*
|
|
17690
|
+
* @source C++ class CPHAction
|
|
17691
|
+
* @customConstructor CPHAction
|
|
17692
|
+
* @group xr_physic
|
|
17693
|
+
*
|
|
17694
|
+
* @remarks
|
|
17695
|
+
* Script-friendly action callbacks are exposed through `level.add_call`; this handle models native physics world calls
|
|
17696
|
+
* that already have a C++ action object.
|
|
17697
|
+
*/
|
|
17698
|
+
export class CPHAction {
|
|
17699
|
+
private constructor();
|
|
17700
|
+
}
|
|
17701
|
+
|
|
17068
17702
|
/**
|
|
17069
17703
|
* Global physics world controls.
|
|
17070
17704
|
*
|
|
@@ -17092,9 +17726,13 @@ declare module "xray16" {
|
|
|
17092
17726
|
* Add a physics condition/action callback pair.
|
|
17093
17727
|
*
|
|
17094
17728
|
* @remarks
|
|
17095
|
-
* This binding expects native `CPHCondition` and `CPHAction` objects; ordinary scripts
|
|
17729
|
+
* This binding expects native `CPHCondition` and `CPHAction` objects; ordinary scripts usually use
|
|
17730
|
+
* `level.add_call` instead.
|
|
17731
|
+
*
|
|
17732
|
+
* @param condition - Native physics condition object.
|
|
17733
|
+
* @param action - Native physics action object.
|
|
17096
17734
|
*/
|
|
17097
|
-
public add_call(
|
|
17735
|
+
public add_call(condition: CPHCondition, action: CPHAction): void;
|
|
17098
17736
|
}
|
|
17099
17737
|
|
|
17100
17738
|
/**
|
|
@@ -17345,10 +17983,37 @@ declare module "xray16" {
|
|
|
17345
17983
|
export type TXR_bloodsucker_visibility_state = -1 | 0 | 1 | 2;
|
|
17346
17984
|
|
|
17347
17985
|
/**
|
|
17348
|
-
* @source
|
|
17986
|
+
* @source `src/xrGame/script_game_object_script2.cpp`, `game_object.EPathType` enum.
|
|
17987
|
+
* @group xr_script_interface
|
|
17988
|
+
*/
|
|
17989
|
+
export type TXR_game_object_path =
|
|
17990
|
+
| typeof game_object.game_path
|
|
17991
|
+
| typeof game_object.level_path
|
|
17992
|
+
| typeof game_object.patrol_path
|
|
17993
|
+
| typeof game_object.no_path;
|
|
17994
|
+
|
|
17995
|
+
/**
|
|
17996
|
+
* Game-graph destination selection mode for stalker movement.
|
|
17997
|
+
*
|
|
17998
|
+
* @source `src/xrGame/script_game_object_script2.cpp`, `game_object.ESelectionType` enum.
|
|
17349
17999
|
* @group xr_script_interface
|
|
17350
18000
|
*/
|
|
17351
|
-
export type
|
|
18001
|
+
export type TXR_movement_selection_type = 0 | 1;
|
|
18002
|
+
|
|
18003
|
+
/**
|
|
18004
|
+
* Script entity action type id passed to action callbacks.
|
|
18005
|
+
*
|
|
18006
|
+
* @source C++ enum ScriptEntity::EActionType
|
|
18007
|
+
* @group xr_script_interface
|
|
18008
|
+
*/
|
|
18009
|
+
export type TXR_action_type =
|
|
18010
|
+
| typeof game_object.movement
|
|
18011
|
+
| typeof game_object.watch
|
|
18012
|
+
| typeof game_object.animation
|
|
18013
|
+
| typeof game_object.sound
|
|
18014
|
+
| typeof game_object.particle
|
|
18015
|
+
| typeof game_object.object
|
|
18016
|
+
| 7;
|
|
17352
18017
|
|
|
17353
18018
|
/**
|
|
17354
18019
|
* Engine callback id registry.
|
|
@@ -17922,11 +18587,14 @@ declare module "xray16" {
|
|
|
17922
18587
|
* @source `src/xrGame/script_entity.cpp`, `CScriptEntity::ProcessScripts`.
|
|
17923
18588
|
*
|
|
17924
18589
|
* @remarks
|
|
17925
|
-
* The engine passes `-1` as the
|
|
18590
|
+
* The engine passes `ScriptEntity::eActionTypeMovement` as the action type and `-1` as the target point index for
|
|
18591
|
+
* this callback path.
|
|
17926
18592
|
*/
|
|
17927
18593
|
public set_callback<T extends AnyObject>(
|
|
17928
18594
|
type: TXR_callbacks["action_movement"],
|
|
17929
|
-
|
|
18595
|
+
cb?: Nillable<
|
|
18596
|
+
(this: void, object: game_object, action_type: TXR_action_type, target_point_index: -1) => void
|
|
18597
|
+
>,
|
|
17930
18598
|
object?: Nillable<T>
|
|
17931
18599
|
): void;
|
|
17932
18600
|
|
|
@@ -17937,7 +18605,7 @@ declare module "xray16" {
|
|
|
17937
18605
|
*/
|
|
17938
18606
|
public set_callback<T extends AnyObject>(
|
|
17939
18607
|
type: TXR_callbacks["action_watch"],
|
|
17940
|
-
cb?: Nillable<(this: void, object: game_object, action_type:
|
|
18608
|
+
cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>,
|
|
17941
18609
|
object?: Nillable<T>
|
|
17942
18610
|
): void;
|
|
17943
18611
|
|
|
@@ -17948,7 +18616,7 @@ declare module "xray16" {
|
|
|
17948
18616
|
*/
|
|
17949
18617
|
public set_callback<T extends AnyObject>(
|
|
17950
18618
|
type: TXR_callbacks["action_removed"],
|
|
17951
|
-
cb?: Nillable<(this: void, object: game_object, action_type:
|
|
18619
|
+
cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>,
|
|
17952
18620
|
object?: Nillable<T>
|
|
17953
18621
|
): void;
|
|
17954
18622
|
|
|
@@ -17959,7 +18627,7 @@ declare module "xray16" {
|
|
|
17959
18627
|
*/
|
|
17960
18628
|
public set_callback<T extends AnyObject>(
|
|
17961
18629
|
type: TXR_callbacks["action_animation"],
|
|
17962
|
-
cb?: Nillable<(this: void, object: game_object, action_type:
|
|
18630
|
+
cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>,
|
|
17963
18631
|
object?: Nillable<T>
|
|
17964
18632
|
): void;
|
|
17965
18633
|
|
|
@@ -17970,7 +18638,7 @@ declare module "xray16" {
|
|
|
17970
18638
|
*/
|
|
17971
18639
|
public set_callback<T extends AnyObject>(
|
|
17972
18640
|
type: TXR_callbacks["action_sound"],
|
|
17973
|
-
cb?: Nillable<(this: void, object: game_object, action_type:
|
|
18641
|
+
cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>,
|
|
17974
18642
|
object?: Nillable<T>
|
|
17975
18643
|
): void;
|
|
17976
18644
|
|
|
@@ -17981,7 +18649,7 @@ declare module "xray16" {
|
|
|
17981
18649
|
*/
|
|
17982
18650
|
public set_callback<T extends AnyObject>(
|
|
17983
18651
|
type: TXR_callbacks["action_particle"],
|
|
17984
|
-
cb?: Nillable<(this: void, object: game_object, action_type:
|
|
18652
|
+
cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>,
|
|
17985
18653
|
object?: Nillable<T>
|
|
17986
18654
|
): void;
|
|
17987
18655
|
|
|
@@ -17992,7 +18660,7 @@ declare module "xray16" {
|
|
|
17992
18660
|
*/
|
|
17993
18661
|
public set_callback<T extends AnyObject>(
|
|
17994
18662
|
type: TXR_callbacks["action_object"],
|
|
17995
|
-
cb?: Nillable<(this: void, object: game_object, action_type:
|
|
18663
|
+
cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>,
|
|
17996
18664
|
object?: Nillable<T>
|
|
17997
18665
|
): void;
|
|
17998
18666
|
|
|
@@ -18622,8 +19290,15 @@ declare module "xray16" {
|
|
|
18622
19290
|
/**
|
|
18623
19291
|
* Get inventory object by index or name.
|
|
18624
19292
|
*
|
|
19293
|
+
* @source `src/xrGame/script_game_object_script2.cpp`, `object` bindings.
|
|
19294
|
+
*
|
|
19295
|
+
* @remarks
|
|
19296
|
+
* Requires this object to be a `CInventoryOwner`. Numeric lookup uses the engine inventory index, not a runtime
|
|
19297
|
+
* object id. String lookup searches inventory item names. Both overloads return `null` when the item is missing or
|
|
19298
|
+
* the inventory entry cannot be cast back to a game object.
|
|
19299
|
+
*
|
|
18625
19300
|
* @param value - Inventory index or item name.
|
|
18626
|
-
* @returns Matching item, or `null
|
|
19301
|
+
* @returns Matching inventory item, or `null`.
|
|
18627
19302
|
*/
|
|
18628
19303
|
public object(value: i32 | string): Nullable<game_object>;
|
|
18629
19304
|
|
|
@@ -18693,22 +19368,25 @@ declare module "xray16" {
|
|
|
18693
19368
|
/**
|
|
18694
19369
|
* Get active detector item.
|
|
18695
19370
|
*
|
|
19371
|
+
* @source `src/xrGame/script_game_object_inventory_owner.cpp`, `CScriptGameObject::active_detector`.
|
|
19372
|
+
*
|
|
18696
19373
|
* @remarks
|
|
18697
|
-
* Requires this object to be a `CInventoryOwner`.
|
|
18698
|
-
*
|
|
19374
|
+
* Requires this object to be a `CInventoryOwner`. The binding reads the detector slot and returns the detector only
|
|
19375
|
+
* while it is working. Missing inventory owner, empty detector slot, or inactive detector returns `null`.
|
|
18699
19376
|
*
|
|
18700
|
-
* @returns
|
|
19377
|
+
* @returns Working detector item, or `null`.
|
|
18701
19378
|
*/
|
|
18702
19379
|
public active_detector(): Nullable<game_object>;
|
|
18703
19380
|
|
|
18704
19381
|
/**
|
|
18705
19382
|
* Get active inventory item.
|
|
18706
19383
|
*
|
|
19384
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::GetActiveItem`.
|
|
19385
|
+
*
|
|
18707
19386
|
* @remarks
|
|
18708
|
-
* Requires this object to be a `CInventoryOwner`. Other object types log a script error and return
|
|
18709
|
-
* a default value or do nothing.
|
|
19387
|
+
* Requires this object to be a `CInventoryOwner`. Other object types log a script error and return `null`.
|
|
18710
19388
|
*
|
|
18711
|
-
* @returns Active item, or `null
|
|
19389
|
+
* @returns Active inventory item, or `null` when no item is active.
|
|
18712
19390
|
*/
|
|
18713
19391
|
public active_item(): Nullable<game_object>;
|
|
18714
19392
|
|
|
@@ -18762,24 +19440,29 @@ declare module "xray16" {
|
|
|
18762
19440
|
public base_out_restrictions(): string;
|
|
18763
19441
|
|
|
18764
19442
|
/**
|
|
18765
|
-
* Get best
|
|
19443
|
+
* Get best remembered item for this object.
|
|
19444
|
+
*
|
|
19445
|
+
* @source `src/xrGame/script_game_object2.cpp`, `CScriptGameObject::GetBestItem`.
|
|
18766
19446
|
*
|
|
18767
19447
|
* @remarks
|
|
18768
|
-
* Requires this object to be a `
|
|
18769
|
-
*
|
|
19448
|
+
* Requires this object to be a `CCustomMonster`. This is the selected item from monster memory, not the best item in
|
|
19449
|
+
* the object's inventory. Non-monster objects or monsters without a selected item return `null`.
|
|
18770
19450
|
*
|
|
18771
|
-
* @returns Best item, or `null`.
|
|
19451
|
+
* @returns Best remembered item, or `null`.
|
|
18772
19452
|
*/
|
|
18773
19453
|
public best_item(): Nullable<game_object>;
|
|
18774
19454
|
|
|
18775
19455
|
/**
|
|
18776
19456
|
* Get best available weapon for this object.
|
|
18777
19457
|
*
|
|
19458
|
+
* @source `src/xrGame/script_game_object2.cpp`, `CScriptGameObject::best_weapon`.
|
|
19459
|
+
*
|
|
18778
19460
|
* @remarks
|
|
18779
|
-
* Requires this object to be a `
|
|
18780
|
-
*
|
|
19461
|
+
* Requires this object to be a `CAI_Stalker`. The binding reads the stalker object handler's best weapon candidate
|
|
19462
|
+
* and returns it only when the item still belongs to this object. Non-stalker objects, missing candidates, and
|
|
19463
|
+
* candidates owned by another object return `null`.
|
|
18781
19464
|
*
|
|
18782
|
-
* @returns Best weapon, or `null`.
|
|
19465
|
+
* @returns Best weapon candidate, or `null`.
|
|
18783
19466
|
*/
|
|
18784
19467
|
public best_weapon(): Nullable<game_object>;
|
|
18785
19468
|
|
|
@@ -19215,15 +19898,17 @@ declare module "xray16" {
|
|
|
19215
19898
|
public max_ignore_monster_distance(value: f32): void;
|
|
19216
19899
|
|
|
19217
19900
|
/**
|
|
19218
|
-
*
|
|
19901
|
+
* Iterate native hit-memory records for this monster.
|
|
19902
|
+
*
|
|
19903
|
+
* @source `src/xrGame/script_game_object_script3.cpp`, `memory_hit_objects` binding with `return_stl_iterator()`.
|
|
19219
19904
|
*
|
|
19220
19905
|
* @remarks
|
|
19221
|
-
* Requires this object to be a `CCustomMonster` or one of its subclasses.
|
|
19222
|
-
*
|
|
19906
|
+
* Requires this object to be a `CCustomMonster` or one of its subclasses. The binding returns a Lua iterator over
|
|
19907
|
+
* the native `xr_vector<MemorySpace::CHitObject>` collection.
|
|
19223
19908
|
*
|
|
19224
|
-
* @returns
|
|
19909
|
+
* @returns Iterable hit-memory records.
|
|
19225
19910
|
*/
|
|
19226
|
-
public memory_hit_objects():
|
|
19911
|
+
public memory_hit_objects(): LuaIterable<hit_memory_object>;
|
|
19227
19912
|
|
|
19228
19913
|
/**
|
|
19229
19914
|
* Get time since this object remembered another object.
|
|
@@ -19251,20 +19936,29 @@ declare module "xray16" {
|
|
|
19251
19936
|
/**
|
|
19252
19937
|
* Get current stalker mental state.
|
|
19253
19938
|
*
|
|
19254
|
-
* @
|
|
19939
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::mental_state`.
|
|
19940
|
+
*
|
|
19941
|
+
* @remarks
|
|
19942
|
+
* Requires this object to be a `CAI_Stalker`. Non-stalker objects log an engine script error and return
|
|
19943
|
+
* `anim.danger`.
|
|
19944
|
+
*
|
|
19945
|
+
* @returns Current mental state.
|
|
19255
19946
|
*/
|
|
19256
|
-
public mental_state
|
|
19947
|
+
public mental_state(): TXR_mental_state;
|
|
19257
19948
|
|
|
19258
19949
|
/**
|
|
19259
|
-
*
|
|
19950
|
+
* Iterate visual-memory candidates that are being detected but are not visible yet.
|
|
19951
|
+
*
|
|
19952
|
+
* @source `src/xrGame/script_game_object_script3.cpp`, `not_yet_visible_objects` binding with
|
|
19953
|
+
* `return_stl_iterator()`.
|
|
19260
19954
|
*
|
|
19261
19955
|
* @remarks
|
|
19262
|
-
* Requires this object to be a `CCustomMonster` or one of its subclasses.
|
|
19263
|
-
*
|
|
19956
|
+
* Requires this object to be a `CCustomMonster` or one of its subclasses. The binding returns a Lua iterator over
|
|
19957
|
+
* the native visual memory manager collection. Use `memory_visible_objects()` for fully visible remembered objects.
|
|
19264
19958
|
*
|
|
19265
|
-
* @returns
|
|
19959
|
+
* @returns Iterable pending-visibility records.
|
|
19266
19960
|
*/
|
|
19267
|
-
public not_yet_visible_objects():
|
|
19961
|
+
public not_yet_visible_objects(): LuaIterable<not_yet_visible_object>;
|
|
19268
19962
|
|
|
19269
19963
|
/**
|
|
19270
19964
|
* Get inventory object count.
|
|
@@ -19431,7 +20125,7 @@ declare module "xray16" {
|
|
|
19431
20125
|
*
|
|
19432
20126
|
* @param state - Target mental state.
|
|
19433
20127
|
*/
|
|
19434
|
-
public set_mental_state(state:
|
|
20128
|
+
public set_mental_state(state: TXR_mental_state): void;
|
|
19435
20129
|
|
|
19436
20130
|
/**
|
|
19437
20131
|
* Force an override animation.
|
|
@@ -19757,7 +20451,7 @@ declare module "xray16" {
|
|
|
19757
20451
|
*
|
|
19758
20452
|
* @returns Current stalker body state.
|
|
19759
20453
|
*/
|
|
19760
|
-
public body_state():
|
|
20454
|
+
public body_state(): TXR_body_state;
|
|
19761
20455
|
|
|
19762
20456
|
/**
|
|
19763
20457
|
* Get model bone world position.
|
|
@@ -20058,9 +20752,12 @@ declare module "xray16" {
|
|
|
20058
20752
|
public get_campfire(): CZoneCampfire;
|
|
20059
20753
|
|
|
20060
20754
|
/**
|
|
20755
|
+
* Get currently equipped outfit.
|
|
20756
|
+
*
|
|
20757
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::GetCurrentOutfit`.
|
|
20758
|
+
*
|
|
20061
20759
|
* @remarks
|
|
20062
|
-
* Requires this object to be a `CInventoryOwner`. Other object types log a script error and return
|
|
20063
|
-
* a default value or do nothing.
|
|
20760
|
+
* Requires this object to be a `CInventoryOwner`. Other object types log a script error and return `null`.
|
|
20064
20761
|
*
|
|
20065
20762
|
* @returns Currently equipped outfit, or `null` when none is equipped.
|
|
20066
20763
|
*/
|
|
@@ -20320,15 +21017,17 @@ declare module "xray16" {
|
|
|
20320
21017
|
public marked_dropped(object: game_object): boolean;
|
|
20321
21018
|
|
|
20322
21019
|
/**
|
|
20323
|
-
*
|
|
21020
|
+
* Iterate sound-memory records for this monster.
|
|
21021
|
+
*
|
|
21022
|
+
* @source `src/xrGame/script_game_object_script3.cpp`, `memory_sound_objects` binding with `return_stl_iterator()`.
|
|
20324
21023
|
*
|
|
20325
21024
|
* @remarks
|
|
20326
|
-
* Requires this object to be a `CCustomMonster` or one of its subclasses.
|
|
20327
|
-
*
|
|
21025
|
+
* Requires this object to be a `CCustomMonster` or one of its subclasses. The binding returns a Lua iterator over
|
|
21026
|
+
* the native `xr_vector<MemorySpace::CSoundObject>` collection.
|
|
20328
21027
|
*
|
|
20329
|
-
* @returns
|
|
21028
|
+
* @returns Iterable sound-memory records.
|
|
20330
21029
|
*/
|
|
20331
|
-
public memory_sound_objects():
|
|
21030
|
+
public memory_sound_objects(): LuaIterable<sound_memory_object>;
|
|
20332
21031
|
|
|
20333
21032
|
/**
|
|
20334
21033
|
* @remarks
|
|
@@ -20349,13 +21048,17 @@ declare module "xray16" {
|
|
|
20349
21048
|
public motivation_action_manager(): action_planner;
|
|
20350
21049
|
|
|
20351
21050
|
/**
|
|
21051
|
+
* Get current stalker movement type.
|
|
21052
|
+
*
|
|
21053
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::movement_type`.
|
|
21054
|
+
*
|
|
20352
21055
|
* @remarks
|
|
20353
|
-
* Requires this object to be a `CAI_Stalker`.
|
|
20354
|
-
*
|
|
21056
|
+
* Requires this object to be a `CAI_Stalker`. Non-stalker objects log an engine script error and return
|
|
21057
|
+
* `move.stand`.
|
|
20355
21058
|
*
|
|
20356
|
-
* @returns Current movement type
|
|
21059
|
+
* @returns Current movement type.
|
|
20357
21060
|
*/
|
|
20358
|
-
public movement_type():
|
|
21061
|
+
public movement_type(): TXR_movement_type;
|
|
20359
21062
|
|
|
20360
21063
|
/**
|
|
20361
21064
|
* @remarks
|
|
@@ -20568,7 +21271,7 @@ declare module "xray16" {
|
|
|
20568
21271
|
*
|
|
20569
21272
|
* @param state - Body state.
|
|
20570
21273
|
*/
|
|
20571
|
-
public set_body_state(state:
|
|
21274
|
+
public set_body_state(state: TXR_body_state): void;
|
|
20572
21275
|
|
|
20573
21276
|
/**
|
|
20574
21277
|
* Configure bloodsucker capture animation jump.
|
|
@@ -20666,9 +21369,9 @@ declare module "xray16" {
|
|
|
20666
21369
|
* Requires this object to be a `CAI_Stalker`. Other object types log a script error and return a
|
|
20667
21370
|
* default value or do nothing.
|
|
20668
21371
|
*
|
|
20669
|
-
* @param
|
|
21372
|
+
* @param type - Detail path type id.
|
|
20670
21373
|
*/
|
|
20671
|
-
public set_detail_path_type(
|
|
21374
|
+
public set_detail_path_type(type: TXR_detail_path_type): void;
|
|
20672
21375
|
|
|
20673
21376
|
/**
|
|
20674
21377
|
* Force bloodsucker invisibility state.
|
|
@@ -20684,13 +21387,15 @@ declare module "xray16" {
|
|
|
20684
21387
|
/**
|
|
20685
21388
|
* Set movement target selection type.
|
|
20686
21389
|
*
|
|
21390
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::set_movement_selection_type`.
|
|
21391
|
+
*
|
|
20687
21392
|
* @remarks
|
|
20688
|
-
* Requires
|
|
20689
|
-
*
|
|
21393
|
+
* Requires this object to be a `CAI_Stalker`. The native wrapper logs an error for non-stalker objects but then
|
|
21394
|
+
* still dereferences the missing stalker pointer, so this should only be called after the runtime type is known.
|
|
20690
21395
|
*
|
|
20691
21396
|
* @param type - Selection type id.
|
|
20692
21397
|
*/
|
|
20693
|
-
public set_movement_selection_type(type:
|
|
21398
|
+
public set_movement_selection_type(type: TXR_movement_selection_type): void;
|
|
20694
21399
|
|
|
20695
21400
|
/**
|
|
20696
21401
|
* Set movement patrol path.
|
|
@@ -20704,7 +21409,7 @@ declare module "xray16" {
|
|
|
20704
21409
|
* @param route_type - Patrol route type.
|
|
20705
21410
|
* @param random - Whether path point selection is random.
|
|
20706
21411
|
*/
|
|
20707
|
-
public set_patrol_path(path_name: string, start_type:
|
|
21412
|
+
public set_patrol_path(path_name: string, start_type: TXR_patrol_start_type, route_type: TXR_patrol_route_type, random: boolean): void;
|
|
20708
21413
|
|
|
20709
21414
|
/**
|
|
20710
21415
|
* Make smart-cover target selection prefer idle positions.
|
|
@@ -20982,7 +21687,7 @@ declare module "xray16" {
|
|
|
20982
21687
|
* @param ini_file - Trade config.
|
|
20983
21688
|
* @param section - Condition section.
|
|
20984
21689
|
*/
|
|
20985
|
-
public show_condition(ini_file:
|
|
21690
|
+
public show_condition(ini_file: ini_file, section: string): void;
|
|
20986
21691
|
|
|
20987
21692
|
/**
|
|
20988
21693
|
* @remarks
|
|
@@ -21027,43 +21732,47 @@ declare module "xray16" {
|
|
|
21027
21732
|
/**
|
|
21028
21733
|
* Register an NPC sound.
|
|
21029
21734
|
*
|
|
21735
|
+
* @source `src/xrGame/script_game_object4.cpp`, `CScriptGameObject::add_sound`.
|
|
21736
|
+
*
|
|
21030
21737
|
* @remarks
|
|
21031
21738
|
* Requires this object to be a `CCustomMonster` or one of its subclasses. Items, actors, and other
|
|
21032
21739
|
* objects log a script error and return a default value or do nothing.
|
|
21033
21740
|
*
|
|
21034
21741
|
* @param prefix - Sound prefix.
|
|
21742
|
+
* @param max_count - Maximum samples in the sound collection.
|
|
21743
|
+
* @param type - AI sound category.
|
|
21035
21744
|
* @param priority - Sound priority.
|
|
21036
|
-
* @param
|
|
21037
|
-
* @param
|
|
21038
|
-
* @
|
|
21039
|
-
* @param max_count - Maximum active sounds.
|
|
21040
|
-
* @returns Registered sound id.
|
|
21745
|
+
* @param mask - Sound synchronization mask.
|
|
21746
|
+
* @param internal_type - Internal monster sound id.
|
|
21747
|
+
* @returns Registered sound id, or `0` when this object is not a custom monster.
|
|
21041
21748
|
*/
|
|
21042
|
-
public add_sound(prefix: string,
|
|
21749
|
+
public add_sound(prefix: string, max_count: u32, type: TXR_snd_type, priority: u32, mask: u32, internal_type: u32): u32;
|
|
21043
21750
|
|
|
21044
21751
|
/**
|
|
21045
21752
|
* Register an NPC sound with a bone name.
|
|
21046
21753
|
*
|
|
21754
|
+
* @source `src/xrGame/script_game_object4.cpp`, `CScriptGameObject::add_sound`.
|
|
21755
|
+
*
|
|
21047
21756
|
* @remarks
|
|
21048
21757
|
* Requires this object to be a `CCustomMonster` or one of its subclasses. Items, actors, and other
|
|
21049
21758
|
* objects log a script error and return a default value or do nothing.
|
|
21050
21759
|
*
|
|
21051
21760
|
* @param prefix - Sound prefix.
|
|
21761
|
+
* @param max_count - Maximum samples in the sound collection.
|
|
21762
|
+
* @param type - AI sound category.
|
|
21052
21763
|
* @param priority - Sound priority.
|
|
21053
|
-
* @param
|
|
21054
|
-
* @param
|
|
21055
|
-
* @param
|
|
21056
|
-
* @
|
|
21057
|
-
* @param bone - Bone name.
|
|
21058
|
-
* @returns Registered sound id.
|
|
21764
|
+
* @param mask - Sound synchronization mask.
|
|
21765
|
+
* @param internal_type - Internal monster sound id.
|
|
21766
|
+
* @param bone - Bone name used for playback placement.
|
|
21767
|
+
* @returns Registered sound id, or `0` when this object is not a custom monster.
|
|
21059
21768
|
*/
|
|
21060
21769
|
public add_sound(
|
|
21061
21770
|
prefix: string,
|
|
21771
|
+
max_count: u32,
|
|
21772
|
+
type: TXR_snd_type,
|
|
21062
21773
|
priority: u32,
|
|
21063
|
-
type: unknown,
|
|
21064
21774
|
mask: u32,
|
|
21065
21775
|
internal_type: u32,
|
|
21066
|
-
max_count: u32,
|
|
21067
21776
|
bone: string
|
|
21068
21777
|
): u32;
|
|
21069
21778
|
|
|
@@ -21248,9 +21957,18 @@ declare module "xray16" {
|
|
|
21248
21957
|
public deadbody_can_take_status(): boolean;
|
|
21249
21958
|
|
|
21250
21959
|
/**
|
|
21251
|
-
*
|
|
21960
|
+
* Get current detail path type used by the object's movement manager.
|
|
21961
|
+
*
|
|
21962
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::detail_path_type`.
|
|
21963
|
+
*
|
|
21964
|
+
* @remarks
|
|
21965
|
+
* Requires this object to be a `CAI_Stalker`. Non-stalker objects log an engine script error and return
|
|
21966
|
+
* `move.line`. In the verified xray source, the wrapper also returns `move.line` for stalkers instead of reading
|
|
21967
|
+
* the current movement manager value.
|
|
21968
|
+
*
|
|
21969
|
+
* @returns Detail path type id.
|
|
21252
21970
|
*/
|
|
21253
|
-
public detail_path_type():
|
|
21971
|
+
public detail_path_type(): TXR_detail_path_type;
|
|
21254
21972
|
|
|
21255
21973
|
/**
|
|
21256
21974
|
* Enable or disable weapon show, hide and reload sounds for this inventory owner.
|
|
@@ -21383,9 +22101,13 @@ declare module "xray16" {
|
|
|
21383
22101
|
public get_car(): CCar;
|
|
21384
22102
|
|
|
21385
22103
|
/**
|
|
22104
|
+
* Get current corpse selected by this monster.
|
|
22105
|
+
*
|
|
22106
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::GetCorpse`.
|
|
22107
|
+
*
|
|
21386
22108
|
* @remarks
|
|
21387
|
-
* Requires this object to be a
|
|
21388
|
-
*
|
|
22109
|
+
* Requires this object to be a `CCustomMonster`. The binding ignores destroyed corpse objects and returns `null`
|
|
22110
|
+
* when no usable corpse is selected.
|
|
21389
22111
|
*
|
|
21390
22112
|
* @returns Corpse selected by this monster, or `null`.
|
|
21391
22113
|
*/
|
|
@@ -21397,9 +22119,13 @@ declare module "xray16" {
|
|
|
21397
22119
|
public get_current_holder(): Nullable<holder>;
|
|
21398
22120
|
|
|
21399
22121
|
/**
|
|
22122
|
+
* Get current enemy selected by this monster.
|
|
22123
|
+
*
|
|
22124
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::GetEnemy`.
|
|
22125
|
+
*
|
|
21400
22126
|
* @remarks
|
|
21401
|
-
* Requires this object to be
|
|
21402
|
-
*
|
|
22127
|
+
* Requires this object to be an alive `CCustomMonster`. The binding ignores destroyed enemy objects and returns
|
|
22128
|
+
* `null` when the monster is dead, has no current enemy, or is not a monster.
|
|
21403
22129
|
*
|
|
21404
22130
|
* @returns Current enemy object, or `null`.
|
|
21405
22131
|
*/
|
|
@@ -21453,9 +22179,9 @@ declare module "xray16" {
|
|
|
21453
22179
|
* a default value or do nothing.
|
|
21454
22180
|
*
|
|
21455
22181
|
* @param task_id - Task id.
|
|
21456
|
-
* @returns Task state id.
|
|
22182
|
+
* @returns Task state id, or `task.task_dummy` when this object is not an inventory owner or the task is missing.
|
|
21457
22183
|
*/
|
|
21458
|
-
public get_task_state(task_id: string):
|
|
22184
|
+
public get_task_state(task_id: string): TXR_TaskState;
|
|
21459
22185
|
|
|
21460
22186
|
/**
|
|
21461
22187
|
* Add an info portion to this object.
|
|
@@ -21681,25 +22407,28 @@ declare module "xray16" {
|
|
|
21681
22407
|
/**
|
|
21682
22408
|
* Get item in inventory slot.
|
|
21683
22409
|
*
|
|
22410
|
+
* @source `src/xrGame/script_game_object_inventory_owner.cpp`, `CScriptGameObject::item_in_slot`.
|
|
22411
|
+
*
|
|
21684
22412
|
* @remarks
|
|
21685
|
-
* Requires this object to be a `CInventoryOwner`.
|
|
21686
|
-
*
|
|
22413
|
+
* Requires this object to be a `CInventoryOwner`. Compatibility mode can shift slot ids by one for legacy
|
|
22414
|
+
* minus-one slot ordering. Empty slots and non-inventory owners return `null`.
|
|
21687
22415
|
*
|
|
21688
|
-
* @param slot -
|
|
22416
|
+
* @param slot - Inventory slot id.
|
|
21689
22417
|
* @returns Item in slot, or `null`.
|
|
21690
22418
|
*/
|
|
21691
22419
|
public item_in_slot(slot: u32): Nullable<game_object>;
|
|
21692
22420
|
|
|
21693
22421
|
/**
|
|
21694
|
-
* Get item on belt by
|
|
22422
|
+
* Get item on belt by belt container index.
|
|
21695
22423
|
*
|
|
21696
22424
|
* @since OpenXRay 2015-10-07, 658f68a2
|
|
22425
|
+
* @source `src/xrGame/script_game_object_inventory_owner.cpp`, `CScriptGameObject::ItemOnBelt`.
|
|
21697
22426
|
*
|
|
21698
22427
|
* @remarks
|
|
21699
|
-
* Requires this object to be a `CInventoryOwner`.
|
|
21700
|
-
* a
|
|
22428
|
+
* Requires this object to be a `CInventoryOwner`. Empty belt cells, non-inventory owners, and invalid belt indices
|
|
22429
|
+
* return `null` after logging a script error where applicable.
|
|
21701
22430
|
*
|
|
21702
|
-
* @param slot - Belt
|
|
22431
|
+
* @param slot - Belt container index.
|
|
21703
22432
|
* @returns Item on belt, or `null`.
|
|
21704
22433
|
*/
|
|
21705
22434
|
public item_on_belt(slot: u32): Nullable<game_object>;
|
|
@@ -21777,9 +22506,17 @@ declare module "xray16" {
|
|
|
21777
22506
|
public out_restrictions(): string;
|
|
21778
22507
|
|
|
21779
22508
|
/**
|
|
22509
|
+
* Get current movement path type.
|
|
22510
|
+
*
|
|
22511
|
+
* @source `src/xrGame/script_game_object3.cpp`, `CScriptGameObject::path_type`.
|
|
22512
|
+
*
|
|
22513
|
+
* @remarks
|
|
22514
|
+
* Requires this object to be a `CAI_Stalker`. Non-stalker objects log an engine script error and return
|
|
22515
|
+
* `game_object.no_path`.
|
|
22516
|
+
*
|
|
21780
22517
|
* @returns Current movement path type.
|
|
21781
22518
|
*/
|
|
21782
|
-
public path_type():
|
|
22519
|
+
public path_type(): TXR_game_object_path;
|
|
21783
22520
|
|
|
21784
22521
|
/**
|
|
21785
22522
|
* @remarks
|
|
@@ -22002,7 +22739,7 @@ declare module "xray16" {
|
|
|
22002
22739
|
* @param relation - Relation id.
|
|
22003
22740
|
* @param object - Target object.
|
|
22004
22741
|
*/
|
|
22005
|
-
public set_relation(relation:
|
|
22742
|
+
public set_relation(relation: TXR_relation, object: game_object): void;
|
|
22006
22743
|
|
|
22007
22744
|
/**
|
|
22008
22745
|
* Make the smart-cover target mode fire without lookout.
|
|
@@ -22203,7 +22940,7 @@ declare module "xray16" {
|
|
|
22203
22940
|
*
|
|
22204
22941
|
* @returns Target body state requested by the movement manager.
|
|
22205
22942
|
*/
|
|
22206
|
-
public target_body_state():
|
|
22943
|
+
public target_body_state(): TXR_body_state;
|
|
22207
22944
|
|
|
22208
22945
|
/**
|
|
22209
22946
|
* @remarks
|
|
@@ -22212,7 +22949,7 @@ declare module "xray16" {
|
|
|
22212
22949
|
*
|
|
22213
22950
|
* @returns Target movement type requested by the movement manager.
|
|
22214
22951
|
*/
|
|
22215
|
-
public target_movement_type():
|
|
22952
|
+
public target_movement_type(): TXR_movement_type;
|
|
22216
22953
|
|
|
22217
22954
|
/**
|
|
22218
22955
|
* Transfer an item to another inventory owner.
|
|
@@ -22398,13 +23135,15 @@ declare module "xray16" {
|
|
|
22398
23135
|
): cover_point;
|
|
22399
23136
|
|
|
22400
23137
|
/**
|
|
22401
|
-
* Get best
|
|
23138
|
+
* Get best enemy selected by monster memory.
|
|
23139
|
+
*
|
|
23140
|
+
* @source `src/xrGame/script_game_object2.cpp`, `CScriptGameObject::GetBestEnemy`.
|
|
22402
23141
|
*
|
|
22403
23142
|
* @remarks
|
|
22404
|
-
* Requires this object to be a `CCustomMonster
|
|
22405
|
-
*
|
|
23143
|
+
* Requires this object to be a `CCustomMonster`. The binding reads the selected enemy from monster memory and
|
|
23144
|
+
* returns `null` when the object is not a monster or no enemy is selected.
|
|
22406
23145
|
*
|
|
22407
|
-
* @returns
|
|
23146
|
+
* @returns Selected enemy object, or `null`.
|
|
22408
23147
|
*/
|
|
22409
23148
|
public best_enemy(): Nullable<game_object>;
|
|
22410
23149
|
|
|
@@ -22549,26 +23288,27 @@ declare module "xray16" {
|
|
|
22549
23288
|
/**
|
|
22550
23289
|
* Register a combat sound.
|
|
22551
23290
|
*
|
|
23291
|
+
* @source `src/xrGame/script_game_object4.cpp`, `CScriptGameObject::add_combat_sound`.
|
|
23292
|
+
*
|
|
22552
23293
|
* @remarks
|
|
22553
|
-
* Requires this object to be a `
|
|
22554
|
-
* objects log a script error and return a default value or do nothing.
|
|
23294
|
+
* Requires this object to be a `CAI_Stalker`. Other object types log a script error and return `0`.
|
|
22555
23295
|
*
|
|
22556
23296
|
* @param prefix - Sound prefix.
|
|
23297
|
+
* @param max_count - Maximum samples in the sound collection.
|
|
23298
|
+
* @param type - AI sound category.
|
|
22557
23299
|
* @param priority - Sound priority.
|
|
22558
|
-
* @param
|
|
22559
|
-
* @param
|
|
22560
|
-
* @param
|
|
22561
|
-
* @
|
|
22562
|
-
* @param bone - Bone name.
|
|
22563
|
-
* @returns Registered sound id.
|
|
23300
|
+
* @param mask - Sound synchronization mask.
|
|
23301
|
+
* @param internal_type - Internal stalker sound id.
|
|
23302
|
+
* @param bone - Bone name used for playback placement.
|
|
23303
|
+
* @returns Registered sound id, or `0` when this object is not a stalker.
|
|
22564
23304
|
*/
|
|
22565
23305
|
public add_combat_sound(
|
|
22566
23306
|
prefix: string,
|
|
22567
|
-
|
|
22568
|
-
type:
|
|
23307
|
+
max_count: u32,
|
|
23308
|
+
type: TXR_snd_type,
|
|
23309
|
+
priority: u32,
|
|
22569
23310
|
mask: u32,
|
|
22570
23311
|
internal_type: u32,
|
|
22571
|
-
max_count: u32,
|
|
22572
23312
|
bone: string
|
|
22573
23313
|
): u32;
|
|
22574
23314
|
|
|
@@ -22810,9 +23550,14 @@ declare module "xray16" {
|
|
|
22810
23550
|
/**
|
|
22811
23551
|
* Get parent object.
|
|
22812
23552
|
*
|
|
22813
|
-
* @
|
|
23553
|
+
* @source `src/xrGame/script_game_object_use.cpp`, `CScriptGameObject::Parent`.
|
|
23554
|
+
*
|
|
23555
|
+
* @remarks
|
|
23556
|
+
* Returns `null` when the object has no parent game object.
|
|
23557
|
+
*
|
|
23558
|
+
* @returns Parent object, or `null` when no parent exists.
|
|
22814
23559
|
*/
|
|
22815
|
-
public parent(): game_object
|
|
23560
|
+
public parent(): Nullable<game_object>;
|
|
22816
23561
|
|
|
22817
23562
|
/**
|
|
22818
23563
|
* Get current world position.
|
|
@@ -22896,7 +23641,7 @@ declare module "xray16" {
|
|
|
22896
23641
|
*
|
|
22897
23642
|
* @param movement_type - Movement type.
|
|
22898
23643
|
*/
|
|
22899
|
-
public set_movement_type(movement_type:
|
|
23644
|
+
public set_movement_type(movement_type: TXR_movement_type): void;
|
|
22900
23645
|
|
|
22901
23646
|
/**
|
|
22902
23647
|
* Move an NPC to a position.
|
|
@@ -22949,7 +23694,7 @@ declare module "xray16" {
|
|
|
22949
23694
|
*
|
|
22950
23695
|
* @returns Target mental state requested by the movement manager.
|
|
22951
23696
|
*/
|
|
22952
|
-
public target_mental_state():
|
|
23697
|
+
public target_mental_state(): TXR_mental_state;
|
|
22953
23698
|
|
|
22954
23699
|
/**
|
|
22955
23700
|
* Unregister this door from NPC door management.
|
|
@@ -23259,24 +24004,22 @@ declare module "xray16" {
|
|
|
23259
24004
|
public get_remaining_uses(): u8;
|
|
23260
24005
|
|
|
23261
24006
|
/**
|
|
23262
|
-
* Set
|
|
24007
|
+
* Set space-restrictor category.
|
|
23263
24008
|
*
|
|
23264
24009
|
* @remarks
|
|
23265
|
-
* Requires this object to be a
|
|
23266
|
-
* default value or do nothing.
|
|
24010
|
+
* Requires this object to be a space restrictor. Other object types silently do nothing.
|
|
23267
24011
|
*
|
|
23268
24012
|
* @param type - Restrictor type.
|
|
23269
24013
|
*/
|
|
23270
|
-
public set_restrictor_type(type:
|
|
24014
|
+
public set_restrictor_type(type: TXR_restrictor_type): void;
|
|
23271
24015
|
|
|
23272
24016
|
/**
|
|
23273
24017
|
* @remarks
|
|
23274
|
-
* Requires this object to be a
|
|
23275
|
-
* default value or do nothing.
|
|
24018
|
+
* Requires this object to be a space restrictor. Other object types return `255`.
|
|
23276
24019
|
*
|
|
23277
|
-
* @returns
|
|
24020
|
+
* @returns Space-restrictor category, or `255` when this object is not a space restrictor.
|
|
23278
24021
|
*/
|
|
23279
|
-
public get_restrictor_type():
|
|
24022
|
+
public get_restrictor_type(): TXR_restrictor_type | 255;
|
|
23280
24023
|
|
|
23281
24024
|
/**
|
|
23282
24025
|
* Set spatial registration type for this object.
|
|
@@ -24457,7 +25200,7 @@ declare module "xray16" {
|
|
|
24457
25200
|
* @param pref - Property prefix.
|
|
24458
25201
|
* @param items - Property collection to populate.
|
|
24459
25202
|
*/
|
|
24460
|
-
public FillProps(pref: string, items:
|
|
25203
|
+
public FillProps(pref: string, items: prop_item_vec): void;
|
|
24461
25204
|
}
|
|
24462
25205
|
|
|
24463
25206
|
/**
|
|
@@ -25513,16 +26256,20 @@ declare module "xray16" {
|
|
|
25513
26256
|
/**
|
|
25514
26257
|
* Replace the table of available loopholes.
|
|
25515
26258
|
*
|
|
25516
|
-
* @
|
|
26259
|
+
* @remarks
|
|
26260
|
+
* Keys are smart-cover loophole ids from the description table. A `false` value hides the matching loophole from
|
|
26261
|
+
* parsed draw/usage data; missing keys leave loopholes available.
|
|
26262
|
+
*
|
|
26263
|
+
* @param loopholes - Lua table mapping loophole id to availability flag.
|
|
25517
26264
|
*/
|
|
25518
|
-
public set_available_loopholes(
|
|
26265
|
+
public set_available_loopholes(loopholes: LuaTable<string, boolean>): void;
|
|
25519
26266
|
|
|
25520
26267
|
/**
|
|
25521
26268
|
* Enable or disable editor validation for the loopholes table.
|
|
25522
26269
|
*
|
|
25523
26270
|
* @param value - Whether loopholes should be checked.
|
|
25524
26271
|
*/
|
|
25525
|
-
public set_loopholes_table_checker(value:
|
|
26272
|
+
public set_loopholes_table_checker(value: bool_value): void;
|
|
25526
26273
|
}
|
|
25527
26274
|
|
|
25528
26275
|
/**
|
|
@@ -26580,7 +27327,7 @@ declare module "xray16" {
|
|
|
26580
27327
|
*
|
|
26581
27328
|
* @group xr_ui_event
|
|
26582
27329
|
*/
|
|
26583
|
-
type TXR_ui_event = EnumeratedStaticsValues<typeof ui_events>;
|
|
27330
|
+
export type TXR_ui_event = EnumeratedStaticsValues<typeof ui_events>;
|
|
26584
27331
|
|
|
26585
27332
|
/**
|
|
26586
27333
|
* Keyboard scan-code constants.
|
|
@@ -27641,14 +28388,14 @@ declare module "xray16" {
|
|
|
27641
28388
|
*
|
|
27642
28389
|
* @group xr_ui_event
|
|
27643
28390
|
*/
|
|
27644
|
-
type TXR_DIK_key_name = EnumeratedStaticsKeys<typeof DIK_keys>;
|
|
28391
|
+
export type TXR_DIK_key_name = EnumeratedStaticsKeys<typeof DIK_keys>;
|
|
27645
28392
|
|
|
27646
28393
|
/**
|
|
27647
28394
|
* DIK, mouse, or gamepad key code.
|
|
27648
28395
|
*
|
|
27649
28396
|
* @group xr_ui_event
|
|
27650
28397
|
*/
|
|
27651
|
-
type TXR_DIK_key = EnumeratedStaticsValues<typeof DIK_keys>;
|
|
28398
|
+
export type TXR_DIK_key = EnumeratedStaticsValues<typeof DIK_keys>;
|
|
27652
28399
|
|
|
27653
28400
|
/**
|
|
27654
28401
|
* Game action binding constants.
|