mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
API: Update getInfiltration API (#1235)
This commit is contained in:
parent
e478b9a224
commit
1288d1c289
11
markdown/bitburner.infiltrationlocation.maxclearancelevel.md
Normal file
11
markdown/bitburner.infiltrationlocation.maxclearancelevel.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [maxClearanceLevel](./bitburner.infiltrationlocation.maxclearancelevel.md)
|
||||
|
||||
## InfiltrationLocation.maxClearanceLevel property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
maxClearanceLevel: number;
|
||||
```
|
@ -17,5 +17,7 @@ interface InfiltrationLocation
|
||||
| --- | --- | --- | --- |
|
||||
| [difficulty](./bitburner.infiltrationlocation.difficulty.md) | | number | |
|
||||
| [location](./bitburner.infiltrationlocation.location.md) | | [ILocation](./bitburner.ilocation.md) | |
|
||||
| [maxClearanceLevel](./bitburner.infiltrationlocation.maxclearancelevel.md) | | number | |
|
||||
| [reward](./bitburner.infiltrationlocation.reward.md) | | [InfiltrationReward](./bitburner.infiltrationreward.md) | |
|
||||
| [startingSecurityLevel](./bitburner.infiltrationlocation.startingsecuritylevel.md) | | number | |
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [startingSecurityLevel](./bitburner.infiltrationlocation.startingsecuritylevel.md)
|
||||
|
||||
## InfiltrationLocation.startingSecurityLevel property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
startingSecurityLevel: number;
|
||||
```
|
@ -1,5 +1,5 @@
|
||||
import type { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
|
||||
import { Infiltration as NetscriptInfiltation, InfiltrationLocation, ILocation } from "@nsdefs";
|
||||
import { Infiltration as NetscriptInfiltation, InfiltrationLocation } from "@nsdefs";
|
||||
import { FactionName, LocationName } from "@enums";
|
||||
import { Location } from "../Locations/Location";
|
||||
import { Locations } from "../Locations/Locations";
|
||||
@ -29,13 +29,18 @@ export function NetscriptInfiltration(): InternalAPI<NetscriptInfiltation> {
|
||||
const reward = calculateReward(startingSecurityLevel);
|
||||
const maxLevel = location.infiltrationData.maxClearanceLevel;
|
||||
return {
|
||||
location: structuredClone(location) as ILocation,
|
||||
location: {
|
||||
city: location.city!,
|
||||
name: location.name,
|
||||
},
|
||||
reward: {
|
||||
tradeRep: calculateTradeInformationRepReward(reward, maxLevel, startingSecurityLevel),
|
||||
sellCash: calculateSellInformationCashReward(reward, maxLevel, startingSecurityLevel),
|
||||
SoARep: calculateInfiltratorsRepReward(Factions[FactionName.ShadowsOfAnarchy], startingSecurityLevel),
|
||||
},
|
||||
difficulty: difficulty,
|
||||
maxClearanceLevel: location.infiltrationData.maxClearanceLevel,
|
||||
startingSecurityLevel: location.infiltrationData.startingSecurityLevel,
|
||||
};
|
||||
};
|
||||
return {
|
||||
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -5158,6 +5158,8 @@ interface InfiltrationLocation {
|
||||
location: ILocation;
|
||||
reward: InfiltrationReward;
|
||||
difficulty: number;
|
||||
maxClearanceLevel: number;
|
||||
startingSecurityLevel: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user