xray16 1.0.7 → 1.0.8
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 +4 -1
- package/package.json +4 -3
- package/types/index.d.ts +46 -22
- package/types/{xr_object → xr_ai}/xr_action.d.ts +163 -135
- package/types/xr_ai/xr_alife.d.ts +552 -0
- package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -0
- package/types/xr_ai/xr_goap.d.ts +668 -0
- package/types/xr_ai/xr_graph.d.ts +47 -0
- package/types/xr_ai/xr_memory.d.ts +148 -0
- package/types/xr_lib/xr_animation.d.ts +81 -0
- package/types/xr_lib/xr_bitwise.d.ts +21 -0
- package/types/xr_lib/xr_color.d.ts +40 -0
- package/types/xr_lib/xr_debug.d.ts +100 -0
- package/types/{xr_object → xr_lib}/xr_dialog.d.ts +7 -1
- package/types/xr_lib/xr_flags.d.ts +148 -0
- package/types/xr_lib/xr_fs.d.ts +37 -233
- package/types/xr_lib/xr_game.d.ts +159 -0
- package/types/xr_lib/xr_hit.d.ts +41 -0
- package/types/xr_lib/xr_ini.d.ts +176 -0
- package/types/xr_lib/xr_level.d.ts +225 -0
- package/types/xr_lib/xr_luabind.d.ts +59 -0
- package/types/{xr_map → xr_lib}/xr_map.d.ts +19 -0
- package/types/xr_lib/xr_math.d.ts +65 -0
- package/types/{xr_online → xr_lib}/xr_multiplayer.d.ts +52 -0
- package/types/xr_lib/xr_properties.d.ts +166 -0
- package/types/xr_lib/xr_relation.d.ts +84 -0
- package/types/xr_lib/xr_render.d.ts +70 -0
- package/types/xr_lib/xr_save.d.ts +223 -0
- package/types/{xr_sound → xr_lib}/xr_sound.d.ts +10 -12
- package/types/xr_lib/xr_stats.ts +20 -0
- package/types/{xr_object/xr_quest.d.ts → xr_lib/xr_task.d.ts} +54 -2
- package/types/xr_lib/xr_time.d.ts +61 -0
- package/types/{xr_type → xr_lib}/xr_type.d.ts +13 -13
- package/types/xr_object/client/xr_client_object.d.ts +76 -0
- package/types/xr_object/{xr_level.d.ts → client/xr_level.d.ts} +69 -0
- package/types/xr_object/{xr_physic.d.ts → client/xr_physic.d.ts} +58 -0
- package/types/xr_object/client/xr_zone.d.ts +40 -0
- package/types/xr_object/script/xr_script_interface.d.ts +429 -0
- package/types/xr_object/{xr_client_object.d.ts → script/xr_script_object.d.ts} +425 -518
- package/types/xr_object/script/xr_script_trade.d.ts +26 -0
- package/types/xr_object/{xr_server_object.d.ts → server/xr_server_object.d.ts} +151 -72
- package/types/xr_ui/xr_ui_asset.d.ts +123 -0
- package/types/xr_ui/xr_ui_core.d.ts +33 -123
- package/types/xr_ui/xr_ui_event.d.ts +382 -0
- package/types/xr_ui/xr_ui_interface.d.ts +213 -0
- package/types/xr_ui/xr_ui_menu.d.ts +142 -0
- package/types/xr_constant.d.ts +0 -996
- package/types/xr_core.d.ts +0 -347
- package/types/xr_global.d.ts +0 -663
- package/types/xr_lib/xr_utils.d.ts +0 -412
- package/types/xr_luabind.d.ts +0 -34
- package/types/xr_object/xr_alife.d.ts +0 -213
- package/types/xr_type/xr_enums.d.ts +0 -17
- package/types/xr_ui/README.md +0 -277
- package/types/xr_ui/demo/CServerList.png +0 -0
- package/types/xr_ui/demo/CUI3tButton.png +0 -0
- package/types/xr_ui/demo/CUICheckButton.png +0 -0
- package/types/xr_ui/demo/CUIComboBox.png +0 -0
- package/types/xr_ui/demo/CUICustomEdit.png +0 -0
- package/types/xr_ui/demo/CUIStatic.png +0 -0
- package/types/xr_ui/demo/CUITrackBar.png +0 -0
- /package/types/xr_object/{xr_anomaly.d.ts → client/xr_anomaly.d.ts} +0 -0
- /package/types/xr_object/{xr_artefact.d.ts → client/xr_artefact.d.ts} +0 -0
- /package/types/xr_object/{xr_creature.d.ts → client/xr_creature.d.ts} +0 -0
- /package/types/xr_object/{xr_item.d.ts → client/xr_item.d.ts} +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Implementation of streaming ini file container.
|
|
4
|
+
* Allows reading / writing field in file by section/field.
|
|
5
|
+
*
|
|
6
|
+
* Supports custom extension with section overriding and custom `#include` statements.
|
|
7
|
+
*
|
|
8
|
+
* @source C++ class ini_file
|
|
9
|
+
* @customConstructor ini_file
|
|
10
|
+
* @group xr_ini
|
|
11
|
+
*/
|
|
12
|
+
export class ini_file {
|
|
13
|
+
public constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Create ini file representation based on file name.
|
|
16
|
+
* Full path is limited to 520 chars.
|
|
17
|
+
*
|
|
18
|
+
* @param path - file name and relative path to gamedata configs folder
|
|
19
|
+
*/
|
|
20
|
+
public constructor(path: string);
|
|
21
|
+
/**
|
|
22
|
+
* Create ini file representation based on file name.
|
|
23
|
+
* Full path is limited to 520 chars.
|
|
24
|
+
*
|
|
25
|
+
* @param initial - base to count relative path from, `$game_data$` is an example
|
|
26
|
+
* @param path - file name and relative path from initial entrypoint
|
|
27
|
+
*/
|
|
28
|
+
public constructor(initial: string, path: string);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param section - target section to check lines count
|
|
32
|
+
* @returns count of lines for provided section
|
|
33
|
+
*/
|
|
34
|
+
public line_count(section: string): u32;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @returns sections count for ini file
|
|
38
|
+
*/
|
|
39
|
+
public section_count(): u32;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Remove ini file section field.
|
|
43
|
+
*
|
|
44
|
+
* @param section - target section to modify
|
|
45
|
+
* @param field - target section field to remove
|
|
46
|
+
*/
|
|
47
|
+
public remove_line(section: string, field: string): void;
|
|
48
|
+
|
|
49
|
+
public r_bool(section: string, field: string): boolean;
|
|
50
|
+
|
|
51
|
+
public section_exist(section: string | null): boolean;
|
|
52
|
+
|
|
53
|
+
public r_float(section: string, field: string): f32;
|
|
54
|
+
|
|
55
|
+
public r_clsid(section: string, field: string): i32;
|
|
56
|
+
|
|
57
|
+
public r_s32(section: string, field: string): i32;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Read text line from ini config file.
|
|
61
|
+
*
|
|
62
|
+
* @returns tuple with three elements, where first is success status, second is key, third is value.
|
|
63
|
+
*/
|
|
64
|
+
public r_line<T extends string = string, P extends string = string>(
|
|
65
|
+
section: string,
|
|
66
|
+
line_number: i32,
|
|
67
|
+
c: string,
|
|
68
|
+
d: string
|
|
69
|
+
): LuaMultiReturn<[boolean, T, P]>;
|
|
70
|
+
|
|
71
|
+
public r_token(section: string, field: string, list: token_list): i32;
|
|
72
|
+
|
|
73
|
+
public r_vector(section: string, field: string): vector;
|
|
74
|
+
|
|
75
|
+
public r_u32(section: string, field: string): u32;
|
|
76
|
+
|
|
77
|
+
public r_string_wq(section: string, field: string): string;
|
|
78
|
+
|
|
79
|
+
public r_string(section: string, field: string): string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Check if line exists in the file by section and field.
|
|
83
|
+
*
|
|
84
|
+
* @param section - target section to check
|
|
85
|
+
* @param field - section field to check
|
|
86
|
+
* @returns whether line exists
|
|
87
|
+
*/
|
|
88
|
+
public line_exist(section: string | null, field: string): boolean;
|
|
89
|
+
|
|
90
|
+
public w_fvector2(section: string, field: string, vector: vector2, comment?: string): void;
|
|
91
|
+
|
|
92
|
+
public w_fvector3(section: string, field: string, vector: vector, comment?: string): void;
|
|
93
|
+
|
|
94
|
+
public w_fvector4(section: string, field: string, vector: never, comment?: string): void; // struct _vector4<float>
|
|
95
|
+
|
|
96
|
+
public w_fcolor(section: string, field: string, color: fcolor, comment?: string): void;
|
|
97
|
+
|
|
98
|
+
public w_color(section: string, field: string, color: u32, comment?: string): void;
|
|
99
|
+
|
|
100
|
+
public w_bool(section: string, field: string, bool: boolean, comment?: string): void;
|
|
101
|
+
|
|
102
|
+
public w_s8(section: string, field: string, uchar: u8, comment?: string): void;
|
|
103
|
+
|
|
104
|
+
public w_u8(section: string, field: string, uchar: u8, comment?: string): void;
|
|
105
|
+
|
|
106
|
+
public w_s16(section: string, field: string, sshort: i16, comment?: string): void;
|
|
107
|
+
|
|
108
|
+
public w_u16(section: string, field: string, ushort: u16, comment?: string): void;
|
|
109
|
+
|
|
110
|
+
public w_s32(section: string, field: string, sint: i32, comment?: string): void;
|
|
111
|
+
|
|
112
|
+
public w_u32(section: string, field: string, uint: u32, comment?: string): void;
|
|
113
|
+
|
|
114
|
+
public w_s64(section: string, field: string, sint: i64, comment?: string): void;
|
|
115
|
+
|
|
116
|
+
public w_u64(section: string, field: string, uint: u64, comment?: string): void;
|
|
117
|
+
|
|
118
|
+
public w_float(section: string, field: string, float: f32, comment?: string): void;
|
|
119
|
+
|
|
120
|
+
public w_string(section: string, field: string, string: string, comment?: string): void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Get file name and path of ini file.
|
|
124
|
+
*
|
|
125
|
+
* @example `f:\applications\steam\steamapps\common\stalker call of pripyat\gamedata\configs\misc\task_manager.ltx`
|
|
126
|
+
*
|
|
127
|
+
* @returns full path to ini file
|
|
128
|
+
*/
|
|
129
|
+
public fname(): string;
|
|
130
|
+
|
|
131
|
+
public set_readonly(is_readonly: boolean): void;
|
|
132
|
+
|
|
133
|
+
public set_override_names(override: boolean): void;
|
|
134
|
+
|
|
135
|
+
public save_as(path: string): boolean;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Adjust saving on file closing/destructor calls.
|
|
139
|
+
*
|
|
140
|
+
* @param should_save - whether ini file should be saved when destructor is called
|
|
141
|
+
*/
|
|
142
|
+
public save_at_end(should_save: boolean): void;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Iterate over ini file sections.
|
|
146
|
+
* Calls provided callback for each ini section in file.
|
|
147
|
+
*
|
|
148
|
+
* @param cb - callback to call on each ini file section, where name is section name
|
|
149
|
+
*/
|
|
150
|
+
public section_for_each(cb: (this: void, name: string) => void): void;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Create ini file instance based on provided string content.
|
|
155
|
+
*
|
|
156
|
+
* @group xr_ini
|
|
157
|
+
* @param content - string value to be read as ini file
|
|
158
|
+
* @returns new ini file instance based on provided content
|
|
159
|
+
*/
|
|
160
|
+
export function create_ini_file(this: void, content: string): ini_file;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @group xr_ini
|
|
164
|
+
*/
|
|
165
|
+
export function game_ini(this: void): ini_file;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @group xr_ini
|
|
169
|
+
*/
|
|
170
|
+
export function system_ini(this: void): ini_file;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @group xr_ini
|
|
174
|
+
*/
|
|
175
|
+
export function reload_system_ini(this: void): ini_file;
|
|
176
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* @source namespace level
|
|
4
|
+
* @group xr_level
|
|
5
|
+
*/
|
|
6
|
+
export interface IXR_level {
|
|
7
|
+
add_call(this: void, cb1: (this: void) => boolean, cb2: (this: void) => boolean): void;
|
|
8
|
+
|
|
9
|
+
add_call(this: void, object: object, cb1: (this: void) => boolean, cb2: (this: void) => boolean): void;
|
|
10
|
+
|
|
11
|
+
add_call(this: void, object: object, str1: string, str2: string): void;
|
|
12
|
+
|
|
13
|
+
add_cam_effector(this: void, effect: string, id: i32, is_cyclic: boolean, callback: string): void;
|
|
14
|
+
|
|
15
|
+
add_cam_effector2(this: void, effect: string, id: i32, is_cyclic: boolean, callback: string, camera_fov: f32): void;
|
|
16
|
+
|
|
17
|
+
add_complex_effector(this: void, section: string, id: i32): void;
|
|
18
|
+
|
|
19
|
+
add_dialog_to_render(this: void, window: CUIDialogWnd): void;
|
|
20
|
+
|
|
21
|
+
add_pp_effector(this: void, fn: string, id: i32, is_cyclic: boolean): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Move time forward based on provided parameters.
|
|
25
|
+
*
|
|
26
|
+
* @param days - days to move forward
|
|
27
|
+
* @param hours - hours to move forward
|
|
28
|
+
* @param minutes - minutes to move forward
|
|
29
|
+
*/
|
|
30
|
+
change_game_time(this: void, days: u32, hours: u32, minutes: u32): void;
|
|
31
|
+
|
|
32
|
+
check_object(this: void, object: game_object): void;
|
|
33
|
+
|
|
34
|
+
client_spawn_manager(this: void): client_spawn_manager;
|
|
35
|
+
|
|
36
|
+
debug_actor(this: void): game_object;
|
|
37
|
+
|
|
38
|
+
debug_object(this: void, str: string): game_object;
|
|
39
|
+
|
|
40
|
+
disable_input(this: void): void;
|
|
41
|
+
|
|
42
|
+
enable_input(this: void): void;
|
|
43
|
+
|
|
44
|
+
environment(this: void): unknown /* XR_CEnvironment */;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @returns current game state ID.
|
|
48
|
+
*/
|
|
49
|
+
game_id(this: void): TXR_EGameID;
|
|
50
|
+
|
|
51
|
+
get_active_cam(this: void): u8;
|
|
52
|
+
|
|
53
|
+
get_bounding_volume(this: void): Fbox;
|
|
54
|
+
|
|
55
|
+
get_game_difficulty(this: void): TXR_game_difficulty;
|
|
56
|
+
|
|
57
|
+
get_snd_volume(this: void): f32;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get object target distance aimed by crosshair.
|
|
61
|
+
*/
|
|
62
|
+
get_target_dist(this: void): f32;
|
|
63
|
+
|
|
64
|
+
get_target_element(this: void): u32;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Get object target aimed by crosshair.
|
|
68
|
+
*/
|
|
69
|
+
get_target_obj(this: void): game_object | null;
|
|
70
|
+
|
|
71
|
+
get_time_days(this: void): u32;
|
|
72
|
+
|
|
73
|
+
get_time_factor(this: void): f32;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @returns current hours time number
|
|
77
|
+
*/
|
|
78
|
+
get_time_hours(this: void): u32;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @returns current minutes time number
|
|
82
|
+
*/
|
|
83
|
+
get_time_minutes(this: void): u32;
|
|
84
|
+
|
|
85
|
+
get_weather(this: void): string;
|
|
86
|
+
|
|
87
|
+
get_wfx_time(this: void): f32;
|
|
88
|
+
|
|
89
|
+
hide_indicators(this: void): void;
|
|
90
|
+
|
|
91
|
+
hide_indicators_safe(this: void): void;
|
|
92
|
+
|
|
93
|
+
high_cover_in_direction(this: void, num: u32, vector: vector): f32;
|
|
94
|
+
|
|
95
|
+
is_wfx_playing(this: void): boolean;
|
|
96
|
+
|
|
97
|
+
iterate_online_objects(this: void, cb: (this: void, object: game_object) => void | boolean): void;
|
|
98
|
+
|
|
99
|
+
iterate_sounds(this: void, str: string, num: u32, cb: (this: void) => void): void;
|
|
100
|
+
|
|
101
|
+
iterate_sounds(this: void, str: string, num: u32, object: object, cb: (this: void) => void): void;
|
|
102
|
+
|
|
103
|
+
low_cover_in_direction(this: void, num: u32, vector: vector): f32;
|
|
104
|
+
|
|
105
|
+
main_input_receiver(this: void): CUIDialogWnd;
|
|
106
|
+
|
|
107
|
+
map_add_object_spot(this: void, id: u16, selector: string, hint: string): void;
|
|
108
|
+
|
|
109
|
+
map_add_object_spot_ser(this: void, id: u16, str1: string, str2: string): void;
|
|
110
|
+
|
|
111
|
+
map_change_spot_hint(this: void, num: u16, selector: string, hint: string): void;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Checks if object has map spot registered with provided selector.
|
|
115
|
+
*
|
|
116
|
+
* @param object_id - game object id to check map spot
|
|
117
|
+
* @param spot_type - map spot type (icon type to display for the object)
|
|
118
|
+
* @returns whether object map spot with provided selector is registered
|
|
119
|
+
*/
|
|
120
|
+
map_has_object_spot(this: void, object_id: u16, spot_type: string): u16;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Remove object map spot if it exists.
|
|
124
|
+
* Checks if map spot is registered and then removes it in such case.
|
|
125
|
+
* There is no sense in checking object spot before calling removal since action will be duplicated.
|
|
126
|
+
*
|
|
127
|
+
* @param object_id - game object id to check map spot
|
|
128
|
+
* @param spot_type - map spot type (icon type to display for the object)
|
|
129
|
+
*/
|
|
130
|
+
map_remove_object_spot(this: void, object_id: u16, spot_type: string): void;
|
|
131
|
+
|
|
132
|
+
name<T extends string = string>(this: void): T;
|
|
133
|
+
|
|
134
|
+
object_by_id(this: void, object_id: u16): game_object | null;
|
|
135
|
+
|
|
136
|
+
patrol_path_exists(this: void, path_name: string): boolean;
|
|
137
|
+
|
|
138
|
+
physics_world(this: void): physics_world;
|
|
139
|
+
|
|
140
|
+
prefetch_sound(this: void, str: string): void;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @returns whether game level is loaded
|
|
144
|
+
*/
|
|
145
|
+
present(this: void): boolean;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @returns intensity of rain, 0 if no rain active
|
|
149
|
+
*/
|
|
150
|
+
rain_factor(this: void): f32;
|
|
151
|
+
|
|
152
|
+
remove_call(this: void, cb1: (this: void) => boolean, cb2: (this: void) => void): void;
|
|
153
|
+
|
|
154
|
+
remove_call(this: void, object: object, cb1: (this: void) => boolean, cb2: (this: void) => void): void;
|
|
155
|
+
|
|
156
|
+
remove_call(this: void, object: object, str1: string, str2: string): void;
|
|
157
|
+
|
|
158
|
+
remove_calls_for_object(this: void, object: object): void;
|
|
159
|
+
|
|
160
|
+
remove_cam_effector(this: void, id: i32): void;
|
|
161
|
+
|
|
162
|
+
remove_complex_effector(this: void, id: i32): void;
|
|
163
|
+
|
|
164
|
+
remove_dialog_to_render(this: void, window: CUIDialogWnd): void;
|
|
165
|
+
|
|
166
|
+
remove_pp_effector(this: void, id: i32): void;
|
|
167
|
+
|
|
168
|
+
send(net_packet: net_packet, bool1: boolean, bool2: boolean, bool3: boolean, bool4: boolean): void;
|
|
169
|
+
|
|
170
|
+
set_active_cam(this: void, id: u8): void;
|
|
171
|
+
|
|
172
|
+
set_game_difficulty(this: void, difficulty: unknown /* enum ESingleGameDifficulty */): void;
|
|
173
|
+
|
|
174
|
+
set_pp_effector_factor(this: void, id: i32, f: f32, f_sp?: f32): void;
|
|
175
|
+
|
|
176
|
+
set_snd_volume(this: void, num: f32): void;
|
|
177
|
+
|
|
178
|
+
set_time_factor(this: void, factor: f32): void;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Change active game weather.
|
|
182
|
+
*
|
|
183
|
+
* @param weather_name - name of weather config to apply (gamedata\configs\environment\weathers)
|
|
184
|
+
* @param is_forced - whether weather change should be forced
|
|
185
|
+
*/
|
|
186
|
+
set_weather(this: void, weather_name: string, is_forced: boolean): void;
|
|
187
|
+
|
|
188
|
+
set_weather_fx(this: void, weather_fs_name: string): boolean;
|
|
189
|
+
|
|
190
|
+
show_indicators(this: void): void;
|
|
191
|
+
|
|
192
|
+
show_weapon(this: void, val: boolean): void;
|
|
193
|
+
|
|
194
|
+
spawn_item(this: void, str: string, vector: vector, uint: u32, ushort: u16, bool: boolean): void;
|
|
195
|
+
|
|
196
|
+
spawn_phantom(this: void, vector: vector): void;
|
|
197
|
+
|
|
198
|
+
start_stop_menu(this: void, dialog: CUIDialogWnd, bool: boolean): void;
|
|
199
|
+
|
|
200
|
+
start_weather_fx_from_time(this: void, str: string, num: f32): boolean;
|
|
201
|
+
|
|
202
|
+
stop_weather_fx(this: void): void;
|
|
203
|
+
|
|
204
|
+
vertex_id(this: void, vector: vector): u32;
|
|
205
|
+
|
|
206
|
+
vertex_in_direction(this: void, num1: u32, vector: vector, num2: f32): u32;
|
|
207
|
+
|
|
208
|
+
vertex_position(this: void, id: u32): vector;
|
|
209
|
+
|
|
210
|
+
ray_pick(
|
|
211
|
+
this: void,
|
|
212
|
+
vec: vector,
|
|
213
|
+
vec2: vector,
|
|
214
|
+
fl: f32,
|
|
215
|
+
enumc: unknown,
|
|
216
|
+
rqres: unknown,
|
|
217
|
+
gobj: game_object
|
|
218
|
+
): boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @group xr_level
|
|
223
|
+
*/
|
|
224
|
+
export const level: IXR_level;
|
|
225
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Base for bindings brought from LuaBind library.
|
|
4
|
+
* Includes base methods implemented with @LuabindClass decorator and overriding of operators.
|
|
5
|
+
*
|
|
6
|
+
* @source luabind
|
|
7
|
+
* @group xr_luabind
|
|
8
|
+
*/
|
|
9
|
+
export class EngineBinding {
|
|
10
|
+
/**
|
|
11
|
+
* Name of luabind class constructor.
|
|
12
|
+
*/
|
|
13
|
+
public static readonly __name: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Name of luabind class instance constructor.
|
|
17
|
+
*/
|
|
18
|
+
public readonly __name: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @group xr_luabind
|
|
23
|
+
*/
|
|
24
|
+
type TEngineBindingStaticMethods = keyof typeof EngineBinding;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Decorator to mark classes as luabind transformed.
|
|
28
|
+
* Marked classes will be declared using luabind tools instead of default typescript-to-lua approach.
|
|
29
|
+
* Luabind variant is less flexible and has many limitations,
|
|
30
|
+
* but allows extension of engine exported classes and virtual methods.
|
|
31
|
+
*
|
|
32
|
+
* @group xr_luabind
|
|
33
|
+
* @returns class decorator to mark class as luabind implementation
|
|
34
|
+
*/
|
|
35
|
+
export function LuabindClass(): ClassDecorator;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @source C++ class class_info_data
|
|
39
|
+
* @customConstructor class_info_data
|
|
40
|
+
* @group xr_luabind
|
|
41
|
+
*/
|
|
42
|
+
export class class_info_data extends EngineBinding {
|
|
43
|
+
public readonly methods: object;
|
|
44
|
+
public readonly attributes: object;
|
|
45
|
+
public readonly name: string;
|
|
46
|
+
|
|
47
|
+
private constructor();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @group xr_luabind
|
|
52
|
+
*/
|
|
53
|
+
export function class_names(this: void, lua_state: unknown /* lua_State*/): object;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @group xr_luabind
|
|
57
|
+
*/
|
|
58
|
+
export function class_info(this: void, target: unknown): class_info_data;
|
|
59
|
+
}
|
|
@@ -8,7 +8,9 @@ declare module "xray16" {
|
|
|
8
8
|
public constructor();
|
|
9
9
|
|
|
10
10
|
public RemoveMapLocationByObjectID(id: u16): void;
|
|
11
|
+
|
|
11
12
|
public RemoveMapLocation(spot_type: string, id: u16): void;
|
|
13
|
+
|
|
12
14
|
public DisableAllPointers(): void;
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -21,22 +23,39 @@ declare module "xray16" {
|
|
|
21
23
|
public constructor();
|
|
22
24
|
|
|
23
25
|
public Collidable(): boolean;
|
|
26
|
+
|
|
24
27
|
public DisablePointer(): void;
|
|
28
|
+
|
|
25
29
|
public DisableSpot(): void;
|
|
30
|
+
|
|
26
31
|
public EnablePointer(): void;
|
|
32
|
+
|
|
27
33
|
public EnableSpot(): void;
|
|
34
|
+
|
|
28
35
|
public GetHint(): string;
|
|
36
|
+
|
|
29
37
|
public GetLastPosition(): vector2;
|
|
38
|
+
|
|
30
39
|
public GetLevelName(): string;
|
|
40
|
+
|
|
31
41
|
public GetPosition(): vector2;
|
|
42
|
+
|
|
32
43
|
public HighlightSpot(state: boolean, color: fcolor): void;
|
|
44
|
+
|
|
33
45
|
public HintEnabled(): boolean;
|
|
46
|
+
|
|
34
47
|
public IsUserDefined(): boolean;
|
|
48
|
+
|
|
35
49
|
public ObjectID(): u16;
|
|
50
|
+
|
|
36
51
|
public PointerEnabled(): boolean;
|
|
52
|
+
|
|
37
53
|
public SetHint(hint: string): void;
|
|
54
|
+
|
|
38
55
|
public SetUserDefinedFlag(state: boolean): void;
|
|
56
|
+
|
|
39
57
|
public SpotEnabled(): boolean;
|
|
58
|
+
|
|
40
59
|
public SpotSize(): vector2;
|
|
41
60
|
}
|
|
42
61
|
}
|
|
@@ -51,6 +51,7 @@ declare module "xray16" {
|
|
|
51
51
|
public y: f32;
|
|
52
52
|
|
|
53
53
|
public set(x: f32, y: f32): vector2;
|
|
54
|
+
|
|
54
55
|
public set(vector: vector2): vector2;
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -65,57 +66,109 @@ declare module "xray16" {
|
|
|
65
66
|
public z: f32;
|
|
66
67
|
|
|
67
68
|
public abs(vector: Readonly<vector>): vector;
|
|
69
|
+
|
|
68
70
|
public add(val: f32): vector;
|
|
71
|
+
|
|
69
72
|
public add(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
73
|
+
|
|
70
74
|
public add(vector: Readonly<vector>): vector;
|
|
75
|
+
|
|
71
76
|
public add(vector: Readonly<vector>, val: f32): vector;
|
|
77
|
+
|
|
72
78
|
public align(): vector;
|
|
79
|
+
|
|
73
80
|
public average(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
81
|
+
|
|
74
82
|
public average(vector: Readonly<vector>): vector;
|
|
83
|
+
|
|
75
84
|
public clamp(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
85
|
+
|
|
76
86
|
public clamp(vector: Readonly<vector>): vector;
|
|
87
|
+
|
|
77
88
|
public crossproduct(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
89
|
+
|
|
78
90
|
public distance_to(vector: Readonly<vector>): f32;
|
|
91
|
+
|
|
79
92
|
public distance_to_sqr(vector: Readonly<vector>): f32;
|
|
93
|
+
|
|
80
94
|
public distance_to_xz(vector: Readonly<vector>): f32;
|
|
95
|
+
|
|
81
96
|
public div(val: f32): vector;
|
|
97
|
+
|
|
82
98
|
public div(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
99
|
+
|
|
83
100
|
public div(vector: Readonly<vector>): vector;
|
|
101
|
+
|
|
84
102
|
public div(vector: Readonly<vector>, val: f32): vector;
|
|
103
|
+
|
|
85
104
|
public dotproduct(vector: Readonly<vector>): f32;
|
|
105
|
+
|
|
86
106
|
public getH(): f32;
|
|
107
|
+
|
|
87
108
|
public getP(): f32;
|
|
109
|
+
|
|
88
110
|
public inertion(vector: Readonly<vector>, val: f32): vector;
|
|
111
|
+
|
|
89
112
|
public invert(): vector;
|
|
113
|
+
|
|
90
114
|
public invert(vector: Readonly<vector>): vector;
|
|
115
|
+
|
|
91
116
|
public lerp(vector1: Readonly<vector>, vector2: Readonly<vector>, val: f32): vector;
|
|
117
|
+
|
|
92
118
|
public mad(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
119
|
+
|
|
93
120
|
public mad(vector1: Readonly<vector>, vector2: Readonly<vector>, val: f32): vector;
|
|
121
|
+
|
|
94
122
|
public mad(vector1: Readonly<vector>, vector2: Readonly<vector>, vector3: Readonly<vector>): vector;
|
|
123
|
+
|
|
95
124
|
public mad(vector: Readonly<vector>, val: f32): vector;
|
|
125
|
+
|
|
96
126
|
public magnitude(): f32;
|
|
127
|
+
|
|
97
128
|
public max(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
129
|
+
|
|
98
130
|
public max(vector: Readonly<vector>): vector;
|
|
131
|
+
|
|
99
132
|
public min(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
133
|
+
|
|
100
134
|
public min(vector: Readonly<vector>): vector;
|
|
135
|
+
|
|
101
136
|
public mul(val: f32): vector;
|
|
137
|
+
|
|
102
138
|
public mul(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
139
|
+
|
|
103
140
|
public mul(vector: Readonly<vector>): vector;
|
|
141
|
+
|
|
104
142
|
public mul(vector: Readonly<vector>, val: f32): vector;
|
|
143
|
+
|
|
105
144
|
public normalize(): vector;
|
|
145
|
+
|
|
106
146
|
public normalize(vector: Readonly<vector>): vector;
|
|
147
|
+
|
|
107
148
|
public normalize_safe(): vector;
|
|
149
|
+
|
|
108
150
|
public normalize_safe(vector: Readonly<vector>): vector;
|
|
151
|
+
|
|
109
152
|
public reflect(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
153
|
+
|
|
110
154
|
public set(vector: Readonly<vector>): vector;
|
|
155
|
+
|
|
111
156
|
public set(x: f32, y: f32, z: f32): vector;
|
|
157
|
+
|
|
112
158
|
public setHP(val1: f32, val2: f32): vector;
|
|
159
|
+
|
|
113
160
|
public set_length(val: f32): vector;
|
|
161
|
+
|
|
114
162
|
public similar(vector: Readonly<vector>, val: f32): boolean;
|
|
163
|
+
|
|
115
164
|
public slide(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
165
|
+
|
|
116
166
|
public sub(val: f32): vector;
|
|
167
|
+
|
|
117
168
|
public sub(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
|
|
169
|
+
|
|
118
170
|
public sub(vector: Readonly<vector>): vector;
|
|
171
|
+
|
|
119
172
|
public sub(vector: Readonly<vector>, val: f32): vector;
|
|
120
173
|
}
|
|
121
174
|
|
|
@@ -149,17 +202,29 @@ declare module "xray16" {
|
|
|
149
202
|
public constructor();
|
|
150
203
|
|
|
151
204
|
public mk_xform(x: unknown /* _quaternion<float> */, vector: vector): matrix;
|
|
205
|
+
|
|
152
206
|
public set(matix: matrix): matrix;
|
|
207
|
+
|
|
153
208
|
public set(vector1: vector, vector2: vector, vector3: vector, vector4: vector): matrix;
|
|
209
|
+
|
|
154
210
|
public div(matix: matrix, number: f32): matrix;
|
|
211
|
+
|
|
155
212
|
public div(number: f32): matrix;
|
|
213
|
+
|
|
156
214
|
public identity(): matrix;
|
|
215
|
+
|
|
157
216
|
public setHPB(number1: f32, number2: f32, number3: f32): matrix;
|
|
217
|
+
|
|
158
218
|
public setXYZ(x: f32, y: f32, z: f32): matrix;
|
|
219
|
+
|
|
159
220
|
public getHPB(matrix: matrix, number1: f32, number2: f32, number3: f32): matrix;
|
|
221
|
+
|
|
160
222
|
public mul(matix1: matrix, matix2: matrix): matrix;
|
|
223
|
+
|
|
161
224
|
public mul(matix: matrix, number: f32): matrix;
|
|
225
|
+
|
|
162
226
|
public mul(number: f32): matrix;
|
|
227
|
+
|
|
163
228
|
public setXYZi(number1: f32, number2: f32, number3: f32): matrix;
|
|
164
229
|
}
|
|
165
230
|
}
|