xray16 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/xr_lib/xr_game.d.ts +0 -5
- package/types/xr_lib/xr_ini.d.ts +2 -0
- package/types/xr_lib/xr_save.d.ts +2 -2
- package/types/xr_lib/xr_task.d.ts +1 -1
- package/types/xr_object/client/xr_physic.d.ts +1 -1
- package/types/xr_object/script/xr_script_interface.d.ts +4 -0
- package/types/xr_object/script/xr_script_object.d.ts +62 -7
- package/types/xr_object/server/xr_server_object.d.ts +4 -4
- package/types/xr_ui/xr_ui_interface.d.ts +1 -1
package/package.json
CHANGED
|
@@ -137,11 +137,6 @@ declare module "xray16" {
|
|
|
137
137
|
*/
|
|
138
138
|
export function set_start_position(this: void, position: vector): void;
|
|
139
139
|
|
|
140
|
-
/**
|
|
141
|
-
* @group xr_game
|
|
142
|
-
*/
|
|
143
|
-
export function set_start_direction(this: void, direction: vector): void;
|
|
144
|
-
|
|
145
140
|
/**
|
|
146
141
|
* @group xr_game
|
|
147
142
|
*/
|
package/types/xr_lib/xr_ini.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ declare module "xray16" {
|
|
|
65
65
|
|
|
66
66
|
public r_seek(value: u32): void;
|
|
67
67
|
|
|
68
|
-
public r_stringZ<T extends string>(): T;
|
|
68
|
+
public r_stringZ<T extends string = string>(): T;
|
|
69
69
|
|
|
70
70
|
public r_tell(): u32;
|
|
71
71
|
|
|
@@ -166,7 +166,7 @@ declare module "xray16" {
|
|
|
166
166
|
|
|
167
167
|
public r_bool(): boolean;
|
|
168
168
|
|
|
169
|
-
public r_stringZ<T extends string>(): T;
|
|
169
|
+
public r_stringZ<T extends string = string>(): T;
|
|
170
170
|
|
|
171
171
|
public r_float<T extends f32>(value?: T): T;
|
|
172
172
|
|
|
@@ -39,7 +39,7 @@ declare module "xray16" {
|
|
|
39
39
|
|
|
40
40
|
public set_icon_name(icon_name: string): void;
|
|
41
41
|
|
|
42
|
-
public get_icon_name<T extends string>(): T | null;
|
|
42
|
+
public get_icon_name<T extends string = string>(): T | null;
|
|
43
43
|
|
|
44
44
|
public set_description(description: string): void;
|
|
45
45
|
|
|
@@ -164,6 +164,8 @@ declare module "xray16" {
|
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* 4 todo;
|
|
167
|
+
*
|
|
168
|
+
* Works with script_zone objects.
|
|
167
169
|
*/
|
|
168
170
|
public set_callback<T extends AnyObject>(
|
|
169
171
|
type: TXR_callbacks["zone_enter"],
|
|
@@ -173,6 +175,8 @@ declare module "xray16" {
|
|
|
173
175
|
|
|
174
176
|
/**
|
|
175
177
|
* 4 todo;
|
|
178
|
+
*
|
|
179
|
+
* Works with script_zone objects.
|
|
176
180
|
*/
|
|
177
181
|
public set_callback<T extends AnyObject>(
|
|
178
182
|
type: TXR_callbacks["zone_exit"],
|
|
@@ -322,9 +322,9 @@ declare module "xray16" {
|
|
|
322
322
|
|
|
323
323
|
public change_team(team_id: u8, squad_id: u8, group_id: u8): void;
|
|
324
324
|
|
|
325
|
-
public character_icon<T extends string>(): T;
|
|
325
|
+
public character_icon<T extends string = string>(): T;
|
|
326
326
|
|
|
327
|
-
public character_name<T extends string>(): T;
|
|
327
|
+
public character_name<T extends string = string>(): T;
|
|
328
328
|
|
|
329
329
|
public character_rank(): i32;
|
|
330
330
|
|
|
@@ -400,7 +400,7 @@ declare module "xray16" {
|
|
|
400
400
|
*/
|
|
401
401
|
public get_script_name(): string;
|
|
402
402
|
|
|
403
|
-
public get_visual_name<T extends string>(): T;
|
|
403
|
+
public get_visual_name<T extends string = string>(): T;
|
|
404
404
|
|
|
405
405
|
public has_info(value: string): boolean;
|
|
406
406
|
|
|
@@ -739,9 +739,9 @@ declare module "xray16" {
|
|
|
739
739
|
*/
|
|
740
740
|
public info_clear(): void;
|
|
741
741
|
|
|
742
|
-
public inside(
|
|
742
|
+
public inside(position: vector): boolean;
|
|
743
743
|
|
|
744
|
-
public inside(
|
|
744
|
+
public inside(position: vector, epsilon: f32): boolean;
|
|
745
745
|
|
|
746
746
|
public inv_box_can_take_status(): boolean;
|
|
747
747
|
|
|
@@ -875,10 +875,55 @@ declare module "xray16" {
|
|
|
875
875
|
|
|
876
876
|
public switch_to_upgrade(): void;
|
|
877
877
|
|
|
878
|
+
// For weapons / outfits:
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* @param upgrade_section - section of upgrade to check
|
|
882
|
+
* @returns whether upgrade can be added
|
|
883
|
+
*/
|
|
884
|
+
public can_add_upgrade(upgrade_section: string): boolean;
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* @param upgrade_section - section of upgrade to check
|
|
888
|
+
* @returns whether upgrade can be installed
|
|
889
|
+
*/
|
|
890
|
+
public can_install_upgrade(upgrade_section: string): boolean;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* @param upgrade_section - section of upgrade to check
|
|
894
|
+
* @returns whether upgrade is installed
|
|
895
|
+
*/
|
|
878
896
|
public has_upgrade(upgrade_section: string): boolean;
|
|
879
897
|
|
|
898
|
+
/**
|
|
899
|
+
* @param upgrade_group_section - section of upgrade group to check
|
|
900
|
+
* @returns whether upgrade group is installed
|
|
901
|
+
*/
|
|
902
|
+
public has_upgrade_group(upgrade_group_section: string): boolean;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* @param upgrade_section - section of upgrade to check parent group
|
|
906
|
+
* @returns whether upgrade parent group is installed
|
|
907
|
+
*/
|
|
908
|
+
public has_upgrade_group_by_upgrade_id(upgrade_section: string): boolean;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* @param upgrade_section - section of upgrade to add
|
|
912
|
+
* @returns whether upgrade is installed successfully or not
|
|
913
|
+
*/
|
|
914
|
+
public add_upgrade(upgrade_section: string): boolean;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* @param upgrade_section - section of upgrade to install
|
|
918
|
+
* @returns whether upgrade is installed successfully or not
|
|
919
|
+
*/
|
|
880
920
|
public install_upgrade(upgrade_section: string): boolean;
|
|
881
921
|
|
|
922
|
+
/**
|
|
923
|
+
* Iterate over all item upgrades.
|
|
924
|
+
*
|
|
925
|
+
* @param callback - callback to call on each iteration to check installed upgrades
|
|
926
|
+
*/
|
|
882
927
|
public iterate_installed_upgrades(callback: (upgrade_section: string, object: game_object) => void): void;
|
|
883
928
|
|
|
884
929
|
public target_body_state(): TXR_move;
|
|
@@ -922,7 +967,17 @@ declare module "xray16" {
|
|
|
922
967
|
type?: Maybe<i32>
|
|
923
968
|
): void;
|
|
924
969
|
|
|
925
|
-
|
|
970
|
+
/**
|
|
971
|
+
* @param position - target position to check
|
|
972
|
+
* @returns if target position is accessible by the object
|
|
973
|
+
*/
|
|
974
|
+
public accessible(position: vector): boolean;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* @param vertexId - target vertex ID to check
|
|
978
|
+
* @returns if target vertex is accessible by the object
|
|
979
|
+
*/
|
|
980
|
+
public accessible(vertexId: u32): boolean;
|
|
926
981
|
|
|
927
982
|
public accuracy(): f32;
|
|
928
983
|
|
|
@@ -1025,7 +1080,7 @@ declare module "xray16" {
|
|
|
1025
1080
|
/**
|
|
1026
1081
|
* @returns object community like `monolith`, `stalker` or `zombied`
|
|
1027
1082
|
*/
|
|
1028
|
-
public character_community<T extends string>(): T;
|
|
1083
|
+
public character_community<T extends string = string>(): T;
|
|
1029
1084
|
|
|
1030
1085
|
public external_sound_stop(): void;
|
|
1031
1086
|
|
|
@@ -127,13 +127,13 @@ declare module "xray16" {
|
|
|
127
127
|
|
|
128
128
|
public constructor(section: string);
|
|
129
129
|
|
|
130
|
-
public name<T extends string>(): T;
|
|
130
|
+
public name<T extends string = string>(): T;
|
|
131
131
|
|
|
132
132
|
public clsid(): TXR_class_id;
|
|
133
133
|
|
|
134
134
|
public spawn_ini(): ini_file;
|
|
135
135
|
|
|
136
|
-
public section_name<T extends string>(): T;
|
|
136
|
+
public section_name<T extends string = string>(): T;
|
|
137
137
|
|
|
138
138
|
public UPDATE_Read(packet: net_packet): void;
|
|
139
139
|
|
|
@@ -316,7 +316,7 @@ declare module "xray16" {
|
|
|
316
316
|
/**
|
|
317
317
|
* @returns object community like `monolith`, `stalker` or `zombied`
|
|
318
318
|
*/
|
|
319
|
-
public community<T extends string>(): T;
|
|
319
|
+
public community<T extends string = string>(): T;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
/**
|
|
@@ -698,7 +698,7 @@ declare module "xray16" {
|
|
|
698
698
|
* @group xr_object_server
|
|
699
699
|
*/
|
|
700
700
|
export class cse_smart_cover extends cse_alife_dynamic_object {
|
|
701
|
-
public description<T extends string>(): T | null;
|
|
701
|
+
public description<T extends string = string>(): T | null;
|
|
702
702
|
|
|
703
703
|
public set_available_loopholes(object: unknown): void;
|
|
704
704
|
|
|
@@ -386,7 +386,7 @@ declare module "xray16" {
|
|
|
386
386
|
export class CUIMapList extends CUIWindow {
|
|
387
387
|
public ClearList(): void;
|
|
388
388
|
|
|
389
|
-
public GetCommandLine<T extends string>(value: string): T;
|
|
389
|
+
public GetCommandLine<T extends string = string>(value: string): T;
|
|
390
390
|
|
|
391
391
|
public GetCurGameType(): TXR_GAME_TYPE;
|
|
392
392
|
|