mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-07 11:04:36 +01:00
API: Update getInfiltration API (#1235)
This commit is contained in:
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 | |
|
| [difficulty](./bitburner.infiltrationlocation.difficulty.md) | | number | |
|
||||||
| [location](./bitburner.infiltrationlocation.location.md) | | [ILocation](./bitburner.ilocation.md) | |
|
| [location](./bitburner.infiltrationlocation.location.md) | | [ILocation](./bitburner.ilocation.md) | |
|
||||||
|
| [maxClearanceLevel](./bitburner.infiltrationlocation.maxclearancelevel.md) | | number | |
|
||||||
| [reward](./bitburner.infiltrationlocation.reward.md) | | [InfiltrationReward](./bitburner.infiltrationreward.md) | |
|
| [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 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 { FactionName, LocationName } from "@enums";
|
||||||
import { Location } from "../Locations/Location";
|
import { Location } from "../Locations/Location";
|
||||||
import { Locations } from "../Locations/Locations";
|
import { Locations } from "../Locations/Locations";
|
||||||
@ -29,13 +29,18 @@ export function NetscriptInfiltration(): InternalAPI<NetscriptInfiltation> {
|
|||||||
const reward = calculateReward(startingSecurityLevel);
|
const reward = calculateReward(startingSecurityLevel);
|
||||||
const maxLevel = location.infiltrationData.maxClearanceLevel;
|
const maxLevel = location.infiltrationData.maxClearanceLevel;
|
||||||
return {
|
return {
|
||||||
location: structuredClone(location) as ILocation,
|
location: {
|
||||||
|
city: location.city!,
|
||||||
|
name: location.name,
|
||||||
|
},
|
||||||
reward: {
|
reward: {
|
||||||
tradeRep: calculateTradeInformationRepReward(reward, maxLevel, startingSecurityLevel),
|
tradeRep: calculateTradeInformationRepReward(reward, maxLevel, startingSecurityLevel),
|
||||||
sellCash: calculateSellInformationCashReward(reward, maxLevel, startingSecurityLevel),
|
sellCash: calculateSellInformationCashReward(reward, maxLevel, startingSecurityLevel),
|
||||||
SoARep: calculateInfiltratorsRepReward(Factions[FactionName.ShadowsOfAnarchy], startingSecurityLevel),
|
SoARep: calculateInfiltratorsRepReward(Factions[FactionName.ShadowsOfAnarchy], startingSecurityLevel),
|
||||||
},
|
},
|
||||||
difficulty: difficulty,
|
difficulty: difficulty,
|
||||||
|
maxClearanceLevel: location.infiltrationData.maxClearanceLevel,
|
||||||
|
startingSecurityLevel: location.infiltrationData.startingSecurityLevel,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -5158,6 +5158,8 @@ interface InfiltrationLocation {
|
|||||||
location: ILocation;
|
location: ILocation;
|
||||||
reward: InfiltrationReward;
|
reward: InfiltrationReward;
|
||||||
difficulty: number;
|
difficulty: number;
|
||||||
|
maxClearanceLevel: number;
|
||||||
|
startingSecurityLevel: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user