@@ -875,6 +875,25 @@ export declare interface CrimeStats {
875
875
intelligence_exp : number ;
876
876
}
877
877
878
+ /**
879
+ * Object representing data representing a gang member equipment.
880
+ * @public
881
+ */
882
+ export declare interface EquipmentStats {
883
+ /** Strength multiplier */
884
+ str : number ;
885
+ /** Defense multiplier */
886
+ def : number ;
887
+ /** Dexterity multiplier */
888
+ dex : number ;
889
+ /** Agility multiplier */
890
+ agi : number ;
891
+ /** Charisma multiplier */
892
+ cha : number ;
893
+ /** Hacking multiplier */
894
+ hack : number ;
895
+ }
896
+
878
897
/**
879
898
* Gang API
880
899
* @remarks
@@ -989,7 +1008,7 @@ export declare interface Gang {
989
1008
* @param name - Name of the task.
990
1009
* @returns Detailed stats of a task.
991
1010
*/
992
- getTaskStats ( name : string ) : stringStats ;
1011
+ getTaskStats ( name : string ) : GangTaskStats ;
993
1012
994
1013
/**
995
1014
* List equipment names.
@@ -1038,7 +1057,7 @@ export declare interface Gang {
1038
1057
* @param equipName - Name of equipment.
1039
1058
* @returns A dictionary containing the stats of the equipment.
1040
1059
*/
1041
- getEquipmentStats ( equipName : string ) : stringStats ;
1060
+ getEquipmentStats ( equipName : string ) : EquipmentStats ;
1042
1061
1043
1062
/**
1044
1063
* Purchase an equipment for a gang member.
@@ -1202,10 +1221,10 @@ export declare interface GangMemberInfo {
1202
1221
/**
1203
1222
* @public
1204
1223
*/
1205
- export declare type GangOtherInfo = {
1224
+ export declare interface GangOtherInfo {
1206
1225
/** Stock Symbol */
1207
1226
[ key : string ] : GangOtherInfoObject [ ] ;
1208
- } ;
1227
+ }
1209
1228
1210
1229
/**
1211
1230
* @public
@@ -1217,6 +1236,55 @@ export declare interface GangOtherInfoObject {
1217
1236
territory : number ;
1218
1237
}
1219
1238
1239
+ /**
1240
+ * Object representing data representing a gang member task.
1241
+ * @public
1242
+ */
1243
+ export declare interface GangTaskStats {
1244
+ /** Task name */
1245
+ name : string ;
1246
+ /** Task Description */
1247
+ desc : string ;
1248
+ /** Is a task of a hacking gang */
1249
+ isHacking : boolean ;
1250
+ /** Is a task of a combat gang */
1251
+ isCombat : boolean ;
1252
+ /** Base respect earned */
1253
+ baseRespect : number ;
1254
+ /** Base wanted earned */
1255
+ baseWanted : number ;
1256
+ /** Base money earned */
1257
+ baseMoney : number ;
1258
+ /** Hacking skill impact on task scaling */
1259
+ hackWeight : number ;
1260
+ /** Stength skill impact on task scaling */
1261
+ strWeight : number ;
1262
+ /** Defense skill impact on task scaling */
1263
+ defWeight : number ;
1264
+ /** Dexterity skill impact on task scaling */
1265
+ dexWeight : number ;
1266
+ /** Agility skill impact on task scaling */
1267
+ agiWeight : number ;
1268
+ /** Charisma skill impact on task scaling */
1269
+ chaWeight : number ;
1270
+ /** Number representing the difficulty of the task */
1271
+ difficulty : number ;
1272
+ /** Territory impact on task scaling */
1273
+ territory : GangTerritory ;
1274
+ }
1275
+
1276
+ /**
1277
+ * @public
1278
+ */
1279
+ export declare interface GangTerritory {
1280
+ /** Money gain impact on task scaling */
1281
+ money : number ;
1282
+ /** Respect gain impact on task scaling */
1283
+ respect : number ;
1284
+ /** Wanted gain impact on task scaling */
1285
+ wanted : number ;
1286
+ }
1287
+
1220
1288
/**
1221
1289
* Hack related multipliers.
1222
1290
* @public
@@ -1512,11 +1580,6 @@ export declare interface HacknetMultipliers {
1512
1580
levelCost : number ;
1513
1581
}
1514
1582
1515
- /**
1516
- * @public
1517
- */
1518
- export declare type Handle = string | Port ;
1519
-
1520
1583
/**
1521
1584
* Object representing all the values related to a hacknet node.
1522
1585
* @public
@@ -2573,7 +2636,7 @@ export declare interface NS extends Singularity {
2573
2636
* @param data - Data to write.
2574
2637
* @param mode - Defines the write mode. Only valid when writing to text files.
2575
2638
*/
2576
- write ( handle : Handle , data ?: string [ ] | number , mode ?: "w" | "a" ) : void ;
2639
+ write ( handle : string | number , data ?: string [ ] | number , mode ?: "w" | "a" ) : void ;
2577
2640
2578
2641
/**
2579
2642
* Attempts to write data to the specified Netscript Port.
@@ -2585,7 +2648,7 @@ export declare interface NS extends Singularity {
2585
2648
* @param data - Data to write.
2586
2649
* @returns True if the data is successfully written to the port, and false otherwise.
2587
2650
*/
2588
- tryWrite ( port : Handle , data : string [ ] | number ) : boolean ;
2651
+ tryWrite ( port : number , data : string [ ] | number ) : boolean ;
2589
2652
2590
2653
/**
2591
2654
* This function is used to read data from a port or from a text file (.txt).
@@ -2603,7 +2666,7 @@ export declare interface NS extends Singularity {
2603
2666
* @param handle - Port or text file to read from.
2604
2667
* @returns Data in the specified text file or port.
2605
2668
*/
2606
- read ( handle : Handle ) : string | number | object ;
2669
+ read ( handle : string | number ) : string | number | object ;
2607
2670
2608
2671
/**
2609
2672
* This function is used to peek at the data from a port. It returns the
@@ -2614,7 +2677,7 @@ export declare interface NS extends Singularity {
2614
2677
* @param port - Port to peek. Must be an integer between 1 and 20.
2615
2678
* @returns Data in the specified port.
2616
2679
*/
2617
- peek ( port : Port ) : string | number | object ;
2680
+ peek ( port : number ) : string | number | object ;
2618
2681
2619
2682
/**
2620
2683
* This function is used to clear data in a Netscript Ports or a text file.
@@ -2628,7 +2691,7 @@ export declare interface NS extends Singularity {
2628
2691
* @remarks RAM cost: 1 GB
2629
2692
* @param handle - Port or text file to clear.
2630
2693
*/
2631
- clear ( handle : Handle ) : void ;
2694
+ clear ( handle : string | number ) : void ;
2632
2695
2633
2696
/**
2634
2697
* Get a handle to a Netscript Port.
@@ -2640,7 +2703,7 @@ export declare interface NS extends Singularity {
2640
2703
* @param port - Port number. Must be an integer between 1 and 20.
2641
2704
* @returns Data in the specified port.
2642
2705
*/
2643
- getPortHandle ( port : Port ) : any [ ] ;
2706
+ getPortHandle ( port : number ) : any [ ] ;
2644
2707
2645
2708
/**
2646
2709
* Removes the specified file from the current server. This function works for every file
@@ -2919,20 +2982,6 @@ export declare interface PlayerSkills {
2919
2982
intelligence : number ;
2920
2983
}
2921
2984
2922
- /**
2923
- * Queue used to send and receive messages.
2924
- * @remarks
2925
- * A port is implemented as a sort of serialized queue,
2926
- * where you can only write and read one element at a time from the port.
2927
- * When you read data from a port, the element that is read is removed from the port.
2928
- *
2929
- * IMPORTANT: The data inside ports are not saved!
2930
- * This means if you close and re-open the game, or reload the page
2931
- * then you will lose all of the data in the ports!
2932
- * @public
2933
- */
2934
- export declare type Port = number ;
2935
-
2936
2985
/**
2937
2986
* A single process on a server.
2938
2987
* @public
@@ -3892,10 +3941,10 @@ export declare interface SourceFileLvl {
3892
3941
* Return value of {@link TIX.getOrders | getOrders}
3893
3942
* @public
3894
3943
*/
3895
- export declare type StockOrder = {
3944
+ export declare interface StockOrder {
3896
3945
/** Stock Symbol */
3897
3946
[ key : string ] : StockOrderObject [ ] ;
3898
- } ;
3947
+ }
3899
3948
3900
3949
/**
3901
3950
* Value in map of {@link StockOrder}
@@ -3912,74 +3961,6 @@ export declare interface StockOrderObject {
3912
3961
position : string ;
3913
3962
}
3914
3963
3915
- /**
3916
- * Object representing data representing a gang member task.
3917
- * @public
3918
- */
3919
- export declare interface stringStats {
3920
- /** Task name */
3921
- name : string ;
3922
- /** Task Description */
3923
- desc : string ;
3924
- /** Is a task of a hacking gang */
3925
- isHacking : boolean ;
3926
- /** Is a task of a combat gang */
3927
- isCombat : boolean ;
3928
- /** Base respect earned */
3929
- baseRespect : number ;
3930
- /** Base wanted earned */
3931
- baseWanted : number ;
3932
- /** Base money earned */
3933
- baseMoney : number ;
3934
- /** Hacking skill impact on task scaling */
3935
- hackWeight : number ;
3936
- /** Stength skill impact on task scaling */
3937
- strWeight : number ;
3938
- /** Defense skill impact on task scaling */
3939
- defWeight : number ;
3940
- /** Dexterity skill impact on task scaling */
3941
- dexWeight : number ;
3942
- /** Agility skill impact on task scaling */
3943
- agiWeight : number ;
3944
- /** Charisma skill impact on task scaling */
3945
- chaWeight : number ;
3946
- /** Number representing the difficulty of the task */
3947
- difficulty : number ;
3948
- /** Territory impact on task scaling */
3949
- territory : stringTerritory ;
3950
- }
3951
-
3952
- /**
3953
- * Object representing data representing a gang member equipment.
3954
- * @public
3955
- */
3956
- export declare interface stringStats {
3957
- /** Strength multiplier */
3958
- str : number ;
3959
- /** Defense multiplier */
3960
- def : number ;
3961
- /** Dexterity multiplier */
3962
- dex : number ;
3963
- /** Agility multiplier */
3964
- agi : number ;
3965
- /** Charisma multiplier */
3966
- cha : number ;
3967
- /** Hacking multiplier */
3968
- hack : number ;
3969
- }
3970
-
3971
- /**
3972
- * @public
3973
- */
3974
- export declare interface stringTerritory {
3975
- /** Money gain impact on task scaling */
3976
- money : number ;
3977
- /** Respect gain impact on task scaling */
3978
- respect : number ;
3979
- /** Wanted gain impact on task scaling */
3980
- wanted : number ;
3981
- }
3982
-
3983
3964
/**
3984
3965
* Stock market API
3985
3966
* @public
0 commit comments