mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 22:52:29 +01:00
Merge pull request #4101 from Kelenius/UnhardcodeBBAndCorpDisabling
UI: Bitnode stats now show if BB/Corporation are disabled
This commit is contained in:
commit
9f922de50d
@ -252,7 +252,7 @@ export function PlayerMultipliers(): React.ReactElement {
|
||||
},
|
||||
];
|
||||
|
||||
if (Player.canAccessBladeburner()) {
|
||||
if (Player.canAccessBladeburner() && BitNodeMultipliers.BladeburnerRank > 0) {
|
||||
rightColData.push(
|
||||
{
|
||||
mult: "Bladeburner Success Chance",
|
||||
|
@ -654,6 +654,7 @@ export function getBitNodeMultipliers(n: number, lvl: number): IBitNodeMultiplie
|
||||
}
|
||||
case 8: {
|
||||
return Object.assign(mults, {
|
||||
BladeburnerRank: 0,
|
||||
ScriptHackMoney: 0.3,
|
||||
ScriptHackMoneyGain: 0,
|
||||
ManualHackMoney: 0,
|
||||
|
@ -280,6 +280,14 @@ function BladeburnerMults({ mults }: IMultsProps): React.ReactElement {
|
||||
const player = use.Player();
|
||||
if (!player.canAccessBladeburner()) return <></>;
|
||||
|
||||
if (mults.BladeburnerRank == 0) {
|
||||
const rows: IBNMultRows = {
|
||||
BladeburnerRank: { name: "Disabled", content: "" },
|
||||
};
|
||||
|
||||
return <BNMultTable sectionName="Bladeburner" rowData={rows} mults={mults} />;
|
||||
}
|
||||
|
||||
const rows: IBNMultRows = {
|
||||
BladeburnerRank: { name: "Rank Gain" },
|
||||
BladeburnerSkillCost: { name: "Skill Cost" },
|
||||
@ -323,6 +331,17 @@ function CorporationMults({ mults }: IMultsProps): React.ReactElement {
|
||||
const player = use.Player();
|
||||
if (!player.canAccessCorporation()) return <></>;
|
||||
|
||||
if (mults.CorporationSoftcap < 0.15) {
|
||||
const rows: IBNMultRows = {
|
||||
CorporationSoftcap: {
|
||||
name: "Disabled",
|
||||
content: "",
|
||||
},
|
||||
};
|
||||
|
||||
return <BNMultTable sectionName="Corporation" rowData={rows} mults={mults} />;
|
||||
}
|
||||
|
||||
const rows: IBNMultRows = {
|
||||
CorporationSoftcap: {
|
||||
name: "Corporation Softcap",
|
||||
|
@ -83,7 +83,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
function renderBladeburner(): React.ReactElement {
|
||||
if (!player.canAccessBladeburner()) {
|
||||
if (!player.canAccessBladeburner() || BitNodeMultipliers.BladeburnerRank == 0) {
|
||||
return <></>;
|
||||
}
|
||||
const text = inBladeburner ? "Enter Bladeburner Headquarters" : "Apply to Bladeburner Division";
|
||||
|
@ -397,8 +397,8 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
|
||||
},
|
||||
joinBladeburnerDivision: (ctx: NetscriptContext) => (): boolean => {
|
||||
if (player.bitNodeN === 7 || player.sourceFileLvl(7) > 0) {
|
||||
if (player.bitNodeN === 8) {
|
||||
return false;
|
||||
if (BitNodeMultipliers.BladeburnerRank == 0) {
|
||||
return false; // Disabled in this bitnode
|
||||
}
|
||||
if (player.bladeburner instanceof Bladeburner) {
|
||||
return true; // Already member
|
||||
|
@ -2,10 +2,6 @@ import { Bladeburner } from "../../Bladeburner/Bladeburner";
|
||||
import { IPlayer } from "../IPlayer";
|
||||
|
||||
export function canAccessBladeburner(this: IPlayer): boolean {
|
||||
if (this.bitNodeN === 8) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.bitNodeN === 6 || this.bitNodeN === 7 || this.sourceFileLvl(6) > 0 || this.sourceFileLvl(7) > 0;
|
||||
}
|
||||
|
||||
|
@ -532,7 +532,7 @@ export function CharacterStats(): React.ReactElement {
|
||||
]}
|
||||
color={Settings.theme.combat}
|
||||
/>
|
||||
{player.canAccessBladeburner() && (
|
||||
{player.canAccessBladeburner() && BitNodeMultipliers.BladeburnerRank > 0 && (
|
||||
<MultiplierTable
|
||||
rows={[
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user