xray16 1.3.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +112 -106
- package/package.json +45 -42
- package/plugins/built_at_info.d.ts +1 -1
- package/plugins/from_cast_utils.d.ts +1 -1
- package/plugins/global_declarations_transform.d.ts +1 -1
- package/plugins/inject_file_meta.d.ts +1 -1
- package/plugins/inject_tracy_zones.d.ts +1 -1
- package/plugins/inject_tracy_zones.js +2 -2
- package/plugins/strip_lua_logger.d.ts +1 -1
- package/plugins/strip_lua_logger.js +1 -1
- package/plugins/transform_luabind_class/plugin.d.ts +1 -1
- package/plugins/transform_luabind_class/transformation/class_declaration.d.ts +3 -3
- package/plugins/transform_luabind_class/transformation/decorators.d.ts +5 -2
- package/plugins/transform_luabind_class/transformation/decorators.js +3 -0
- package/plugins/transform_luabind_class/transformation/members/accessors.d.ts +1 -1
- package/plugins/transform_luabind_class/transformation/members/constructor.d.ts +2 -2
- package/plugins/transform_luabind_class/transformation/members/constructor.js +2 -2
- package/plugins/transform_luabind_class/transformation/members/fields.d.ts +5 -2
- package/plugins/transform_luabind_class/transformation/members/fields.js +5 -2
- package/plugins/transform_luabind_class/transformation/members/method.d.ts +6 -3
- package/plugins/transform_luabind_class/transformation/members/method.js +4 -1
- package/plugins/transform_luabind_class/transformation/new.d.ts +7 -3
- package/plugins/transform_luabind_class/transformation/new.js +5 -1
- package/plugins/transform_luabind_class/transformation/setup.d.ts +9 -3
- package/plugins/transform_luabind_class/transformation/setup.js +22 -6
- package/plugins/transform_luabind_class/transformation/super.d.ts +19 -3
- package/plugins/transform_luabind_class/transformation/super.js +17 -1
- package/plugins/transform_luabind_class/transformation/utils.d.ts +27 -4
- package/plugins/transform_luabind_class/transformation/utils.js +25 -2
- package/plugins/utils/ast.d.ts +1 -1
- package/plugins/utils/diagnostics.d.ts +9 -5
- package/plugins/utils/diagnostics.js +5 -1
- package/plugins/utils/tracy.d.ts +1 -1
- package/types/index.d.ts +55 -55
- package/types/xr_ai/xr_action.d.ts +510 -510
- package/types/xr_ai/xr_alife.d.ts +566 -566
- package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -41
- package/types/xr_ai/xr_goap.d.ts +669 -668
- package/types/xr_ai/xr_graph.d.ts +47 -47
- package/types/xr_ai/xr_memory.d.ts +148 -148
- package/types/xr_lib/xr_animation.d.ts +81 -81
- package/types/xr_lib/xr_bitwise.d.ts +32 -21
- package/types/xr_lib/xr_color.d.ts +45 -40
- package/types/xr_lib/xr_debug.d.ts +83 -77
- package/types/xr_lib/xr_dialog.d.ts +40 -40
- package/types/xr_lib/xr_flags.d.ts +529 -148
- package/types/xr_lib/xr_fs.d.ts +149 -148
- package/types/xr_lib/xr_game.d.ts +261 -158
- package/types/xr_lib/xr_hit.d.ts +41 -41
- package/types/xr_lib/xr_ini.d.ts +415 -188
- package/types/xr_lib/xr_level.d.ts +652 -225
- package/types/xr_lib/xr_luabind.d.ts +64 -59
- package/types/xr_lib/xr_map.d.ts +61 -61
- package/types/xr_lib/xr_math.d.ts +815 -233
- package/types/xr_lib/xr_multiplayer.d.ts +351 -351
- package/types/xr_lib/xr_profile.d.ts +192 -160
- package/types/xr_lib/xr_properties.d.ts +455 -166
- package/types/xr_lib/xr_relation.d.ts +84 -84
- package/types/xr_lib/xr_render.d.ts +71 -69
- package/types/xr_lib/xr_save.d.ts +727 -223
- package/types/xr_lib/xr_sound.d.ts +151 -151
- package/types/xr_lib/xr_stats.ts +20 -20
- package/types/xr_lib/xr_task.d.ts +111 -111
- package/types/xr_lib/xr_time.d.ts +166 -61
- package/types/xr_lib/xr_type.d.ts +75 -75
- package/types/xr_object/client/xr_anomaly.d.ts +50 -50
- package/types/xr_object/client/xr_artefact.d.ts +98 -98
- package/types/xr_object/client/xr_client_object.d.ts +76 -76
- package/types/xr_object/client/xr_creature.d.ts +164 -164
- package/types/xr_object/client/xr_item.d.ts +264 -264
- package/types/xr_object/client/xr_level.d.ts +285 -285
- package/types/xr_object/client/xr_physic.d.ts +214 -214
- package/types/xr_object/client/xr_zone.d.ts +47 -47
- package/types/xr_object/script/xr_script_interface.d.ts +584 -584
- package/types/xr_object/script/xr_script_object.d.ts +2408 -1390
- package/types/xr_object/script/xr_script_trade.d.ts +41 -26
- package/types/xr_object/server/xr_server_object.d.ts +794 -792
- package/types/xr_ui/xr_ui_asset.d.ts +129 -123
- package/types/xr_ui/xr_ui_core.d.ts +106 -97
- package/types/xr_ui/xr_ui_event.d.ts +383 -381
- package/types/xr_ui/xr_ui_interface.d.ts +901 -903
- package/types/xr_ui/xr_ui_menu.d.ts +142 -142
- package/types/xrf_plugin.d.ts +59 -51
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* @source C++ class FactionState
|
|
4
|
-
* @customConstructor FactionState
|
|
5
|
-
* @group xr_relation
|
|
6
|
-
*/
|
|
7
|
-
export class FactionState {
|
|
8
|
-
public actor_goodwill: i32;
|
|
9
|
-
public bonus: i32;
|
|
10
|
-
public faction_id: string;
|
|
11
|
-
public icon: string;
|
|
12
|
-
public icon_big: string;
|
|
13
|
-
public location: string;
|
|
14
|
-
public member_count: i32;
|
|
15
|
-
public name: string;
|
|
16
|
-
public power: f32;
|
|
17
|
-
public resource: f32;
|
|
18
|
-
public target: string;
|
|
19
|
-
public target_desc: string;
|
|
20
|
-
public war_state1: string;
|
|
21
|
-
public war_state2: string;
|
|
22
|
-
public war_state3: string;
|
|
23
|
-
public war_state4: string;
|
|
24
|
-
public war_state5: string;
|
|
25
|
-
public war_state_hint1: string;
|
|
26
|
-
public war_state_hint2: string;
|
|
27
|
-
public war_state_hint3: string;
|
|
28
|
-
public war_state_hint4: string;
|
|
29
|
-
public war_state_hint5: string;
|
|
30
|
-
|
|
31
|
-
protected constructor();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @source namespace relation_registry
|
|
36
|
-
* @group xr_relation
|
|
37
|
-
*/
|
|
38
|
-
export interface IXR_relation_registry {
|
|
39
|
-
/**
|
|
40
|
-
* Change relation from community to object by `delta_goodwill`.
|
|
41
|
-
*/
|
|
42
|
-
change_community_goodwill(this: void, from_community: string, to_object_id: i32, delta_goodwill: i32): void;
|
|
43
|
-
|
|
44
|
-
community_goodwill(this: void, from_community: string, to_object_id: i32): i32;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @returns
|
|
48
|
-
*/
|
|
49
|
-
community_relation(this: void, from_community: string, to_community: string): i32;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Get relation from object to actor.
|
|
53
|
-
* Return formula looks like `personal_goodwill + community_to_obj_goodwill + community_to_community_goodwill`.
|
|
54
|
-
*
|
|
55
|
-
* @param from_object_id -
|
|
56
|
-
* @param to_object_id -
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
get_general_goodwill_between(this: void, from_object_id: u16, to_object_id: u16): i32;
|
|
60
|
-
|
|
61
|
-
set_community_goodwill(this: void, from_community: string, to_object_id: i32, goodwill: i32): void;
|
|
62
|
-
|
|
63
|
-
set_community_relation(this: void, from_community: string, to_community: string, goodwill: i32): void;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @group xr_relation
|
|
68
|
-
*/
|
|
69
|
-
export const relation_registry: IXR_relation_registry;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Enumeration of relations.
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* eRelationTypeNeutral - 1
|
|
76
|
-
* eRelationTypeEnemy - 2
|
|
77
|
-
* eRelationTypeWorstEnemy - 3
|
|
78
|
-
* eRelationTypeLast - 4
|
|
79
|
-
* eRelationTypeDummy - -1
|
|
80
|
-
*
|
|
81
|
-
* @group xr_relation
|
|
82
|
-
*/
|
|
83
|
-
export type TXR_relation = 0 | 1 | 2 | 3;
|
|
84
|
-
}
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* @source C++ class FactionState
|
|
4
|
+
* @customConstructor FactionState
|
|
5
|
+
* @group xr_relation
|
|
6
|
+
*/
|
|
7
|
+
export class FactionState {
|
|
8
|
+
public actor_goodwill: i32;
|
|
9
|
+
public bonus: i32;
|
|
10
|
+
public faction_id: string;
|
|
11
|
+
public icon: string;
|
|
12
|
+
public icon_big: string;
|
|
13
|
+
public location: string;
|
|
14
|
+
public member_count: i32;
|
|
15
|
+
public name: string;
|
|
16
|
+
public power: f32;
|
|
17
|
+
public resource: f32;
|
|
18
|
+
public target: string;
|
|
19
|
+
public target_desc: string;
|
|
20
|
+
public war_state1: string;
|
|
21
|
+
public war_state2: string;
|
|
22
|
+
public war_state3: string;
|
|
23
|
+
public war_state4: string;
|
|
24
|
+
public war_state5: string;
|
|
25
|
+
public war_state_hint1: string;
|
|
26
|
+
public war_state_hint2: string;
|
|
27
|
+
public war_state_hint3: string;
|
|
28
|
+
public war_state_hint4: string;
|
|
29
|
+
public war_state_hint5: string;
|
|
30
|
+
|
|
31
|
+
protected constructor();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @source namespace relation_registry
|
|
36
|
+
* @group xr_relation
|
|
37
|
+
*/
|
|
38
|
+
export interface IXR_relation_registry {
|
|
39
|
+
/**
|
|
40
|
+
* Change relation from community to object by `delta_goodwill`.
|
|
41
|
+
*/
|
|
42
|
+
change_community_goodwill(this: void, from_community: string, to_object_id: i32, delta_goodwill: i32): void;
|
|
43
|
+
|
|
44
|
+
community_goodwill(this: void, from_community: string, to_object_id: i32): i32;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @returns Relation points between communities, usually between `-5000` and `5000`.
|
|
48
|
+
*/
|
|
49
|
+
community_relation(this: void, from_community: string, to_community: string): i32;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get relation from object to actor.
|
|
53
|
+
* Return formula looks like `personal_goodwill + community_to_obj_goodwill + community_to_community_goodwill`.
|
|
54
|
+
*
|
|
55
|
+
* @param from_object_id - Object from.
|
|
56
|
+
* @param to_object_id - Object to.
|
|
57
|
+
* @returns General goodwill from object to another object based on personal and community goodwill.
|
|
58
|
+
*/
|
|
59
|
+
get_general_goodwill_between(this: void, from_object_id: u16, to_object_id: u16): i32;
|
|
60
|
+
|
|
61
|
+
set_community_goodwill(this: void, from_community: string, to_object_id: i32, goodwill: i32): void;
|
|
62
|
+
|
|
63
|
+
set_community_relation(this: void, from_community: string, to_community: string, goodwill: i32): void;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @group xr_relation
|
|
68
|
+
*/
|
|
69
|
+
export const relation_registry: IXR_relation_registry;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Enumeration of relations.
|
|
73
|
+
*
|
|
74
|
+
* ERelationTypeFriend - 0
|
|
75
|
+
* eRelationTypeNeutral - 1
|
|
76
|
+
* eRelationTypeEnemy - 2
|
|
77
|
+
* eRelationTypeWorstEnemy - 3
|
|
78
|
+
* eRelationTypeLast - 4
|
|
79
|
+
* eRelationTypeDummy - -1.
|
|
80
|
+
*
|
|
81
|
+
* @group xr_relation
|
|
82
|
+
*/
|
|
83
|
+
export type TXR_relation = 0 | 1 | 2 | 3;
|
|
84
|
+
}
|
|
@@ -1,69 +1,71 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* @source C++ class render_device
|
|
4
|
-
* @customConstructor render_device
|
|
5
|
-
* @group xr_render
|
|
6
|
-
*/
|
|
7
|
-
export class render_device {
|
|
8
|
-
private constructor();
|
|
9
|
-
|
|
10
|
-
public readonly cam_dir: vector;
|
|
11
|
-
public readonly cam_pos: vector;
|
|
12
|
-
public readonly cam_right: vector;
|
|
13
|
-
public readonly cam_top: vector;
|
|
14
|
-
public readonly aspect_ratio: f32;
|
|
15
|
-
public readonly fov: f32;
|
|
16
|
-
public readonly precache_frame: u32;
|
|
17
|
-
public readonly frame: u32;
|
|
18
|
-
public readonly height: u32;
|
|
19
|
-
public readonly time_delta: u32;
|
|
20
|
-
public readonly f_time_delta: f32;
|
|
21
|
-
public readonly width: u32;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Get current game timestamp.
|
|
25
|
-
*
|
|
26
|
-
* @example `29319`,`46297`
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
* @
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* @source C++ class render_device
|
|
4
|
+
* @customConstructor render_device
|
|
5
|
+
* @group xr_render
|
|
6
|
+
*/
|
|
7
|
+
export class render_device {
|
|
8
|
+
private constructor();
|
|
9
|
+
|
|
10
|
+
public readonly cam_dir: vector;
|
|
11
|
+
public readonly cam_pos: vector;
|
|
12
|
+
public readonly cam_right: vector;
|
|
13
|
+
public readonly cam_top: vector;
|
|
14
|
+
public readonly aspect_ratio: f32;
|
|
15
|
+
public readonly fov: f32;
|
|
16
|
+
public readonly precache_frame: u32;
|
|
17
|
+
public readonly frame: u32;
|
|
18
|
+
public readonly height: u32;
|
|
19
|
+
public readonly time_delta: u32;
|
|
20
|
+
public readonly f_time_delta: f32;
|
|
21
|
+
public readonly width: u32;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get current game timestamp.
|
|
25
|
+
*
|
|
26
|
+
* @example `29319`,`46297`
|
|
27
|
+
*
|
|
28
|
+
* @returns Milliseconds from game start.
|
|
29
|
+
*/
|
|
30
|
+
public time_global(): u32;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @returns Whether game is paused.
|
|
34
|
+
*/
|
|
35
|
+
public is_paused(): boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Change game pause state.
|
|
39
|
+
*
|
|
40
|
+
* @param paused - Whether game should be paused.
|
|
41
|
+
*/
|
|
42
|
+
public pause(paused: boolean): void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @group xr_render
|
|
47
|
+
*/
|
|
48
|
+
export function device(this: void): render_device;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @group xr_render
|
|
52
|
+
*/
|
|
53
|
+
export function app_ready(this: void): boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @group xr_render
|
|
57
|
+
*/
|
|
58
|
+
export function xrRender_test_r2_hw(this: void): boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @group xr_render
|
|
62
|
+
*/
|
|
63
|
+
export function render_get_dx_level(this: void): number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @group xr_global_declaration
|
|
67
|
+
*
|
|
68
|
+
* @returns Whether renderer setting can be changed.
|
|
69
|
+
*/
|
|
70
|
+
export function renderer_allow_override(this: void): boolean;
|
|
71
|
+
}
|