mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-11 15:57:33 +01:00
Small hotfix (#840)
* yesno box now correctly clean up before new content is loaded in. * formatHp doesnt display decimal, duh * character overview uses numeralWrapper formatHp * minor formatting stuff * Class spending is tracked indepedently of work money * Made an augmentation named after myself. * hotfix a bunch of small stuff
This commit is contained in:
parent
0afdba8f38
commit
80b703639e
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -1395,6 +1395,23 @@ function initAugmentations() {
|
|||||||
}
|
}
|
||||||
AddToAugmentations(Xanipher);
|
AddToAugmentations(Xanipher);
|
||||||
|
|
||||||
|
const HydroflameLeftArm = new Augmentation({
|
||||||
|
name:AugmentationNames.HydroflameLeftArm, repCost:500e3, moneyCost:500e9,
|
||||||
|
info:"The left arm of a legendary BitRunner who ascended beyond this world. " +
|
||||||
|
"It projects a light blue energy shield that protects the exposed inner parts. " +
|
||||||
|
"Even though it contains no weapons, the advance tungsten titanium " +
|
||||||
|
"alloy increases the users strength to unbelievable levels.<br><br>" +
|
||||||
|
"This augmentation increases the player's strength by 300%.",
|
||||||
|
strength_mult: 3,
|
||||||
|
});
|
||||||
|
HydroflameLeftArm.addToFactions(["NWO"]);
|
||||||
|
if (augmentationExists(AugmentationNames.HydroflameLeftArm)) {
|
||||||
|
delete Augmentations[AugmentationNames.HydroflameLeftArm];
|
||||||
|
}
|
||||||
|
AddToAugmentations(HydroflameLeftArm);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ClarkeIncorporated
|
// ClarkeIncorporated
|
||||||
const nextSENS = new Augmentation({
|
const nextSENS = new Augmentation({
|
||||||
name:AugmentationNames.nextSENS, repCost:175e3, moneyCost:385e6,
|
name:AugmentationNames.nextSENS, repCost:175e3, moneyCost:385e6,
|
||||||
|
@ -89,6 +89,7 @@ export let AugmentationNames: IMap<string> = {
|
|||||||
BrachiBlades: "BrachiBlades",
|
BrachiBlades: "BrachiBlades",
|
||||||
BionicArms: "Bionic Arms",
|
BionicArms: "Bionic Arms",
|
||||||
SNA: "Social Negotiation Assistant (S.N.A)",
|
SNA: "Social Negotiation Assistant (S.N.A)",
|
||||||
|
HydroflameLeftArm: "Hydroflame left arm",
|
||||||
EsperEyewear: "EsperTech Bladeburner Eyewear",
|
EsperEyewear: "EsperTech Bladeburner Eyewear",
|
||||||
EMS4Recombination: "EMS-4 Recombination",
|
EMS4Recombination: "EMS-4 Recombination",
|
||||||
OrionShoulder: "ORION-MKIV Shoulder",
|
OrionShoulder: "ORION-MKIV Shoulder",
|
||||||
|
@ -124,8 +124,7 @@ export class HacknetNode extends React.Component {
|
|||||||
<li className={"hacknet-node"}>
|
<li className={"hacknet-node"}>
|
||||||
<div className={"hacknet-node-container"}>
|
<div className={"hacknet-node-container"}>
|
||||||
<div className={"row"}>
|
<div className={"row"}>
|
||||||
<p>Node name:</p>
|
<h1 style={{"fontSize":"1em"}}>{node.name}</h1>
|
||||||
<span className={"text"}>{node.name}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div className={"row"}>
|
<div className={"row"}>
|
||||||
<p>Production:</p>
|
<p>Production:</p>
|
||||||
|
@ -163,8 +163,7 @@ export class HacknetServer extends React.Component {
|
|||||||
<li className={"hacknet-node"}>
|
<li className={"hacknet-node"}>
|
||||||
<div className={"hacknet-node-container"}>
|
<div className={"hacknet-node-container"}>
|
||||||
<div className={"row"}>
|
<div className={"row"}>
|
||||||
<p>Node name:</p>
|
<h1 style={{"fontSize":"1em"}}>{node.hostname}</h1>
|
||||||
<span className={"text"}>{node.hostname}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div className={"row"}>
|
<div className={"row"}>
|
||||||
<p>Production:</p>
|
<p>Production:</p>
|
||||||
|
@ -550,7 +550,11 @@ export function processWorkEarnings(numCycles=1) {
|
|||||||
this.gainAgilityExp(agiExpGain);
|
this.gainAgilityExp(agiExpGain);
|
||||||
this.gainCharismaExp(chaExpGain);
|
this.gainCharismaExp(chaExpGain);
|
||||||
this.gainMoney(moneyGain);
|
this.gainMoney(moneyGain);
|
||||||
|
if (this.className) {
|
||||||
|
this.recordMoneySource(moneyGain, "class");
|
||||||
|
} else {
|
||||||
this.recordMoneySource(moneyGain, "work");
|
this.recordMoneySource(moneyGain, "work");
|
||||||
|
}
|
||||||
this.workHackExpGained += hackExpGain;
|
this.workHackExpGained += hackExpGain;
|
||||||
this.workStrExpGained += strExpGain;
|
this.workStrExpGained += strExpGain;
|
||||||
this.workDefExpGained += defExpGain;
|
this.workDefExpGained += defExpGain;
|
||||||
|
@ -40,7 +40,7 @@ export function CharacterInfo(p: IPlayer): React.ReactElement {
|
|||||||
function Hacknet(): React.ReactElement {
|
function Hacknet(): React.ReactElement {
|
||||||
// Can't import HacknetHelpers for some reason.
|
// Can't import HacknetHelpers for some reason.
|
||||||
if(!(p.bitNodeN === 9 || SourceFileFlags[9] > 0)) {
|
if(!(p.bitNodeN === 9 || SourceFileFlags[9] > 0)) {
|
||||||
return <><span>{`Hacknet Nodes owned: ${p.hacknetNodes.length}</span>`}</span><br /></>
|
return <><span>{`Hacknet Nodes owned: ${p.hacknetNodes.length}`}</span><br /></>
|
||||||
} else {
|
} else {
|
||||||
return <><span>{`Hacknet Servers owned: ${p.hacknetNodes.length} / ${HacknetServerConstants.MaxServers}`}</span><br /></>
|
return <><span>{`Hacknet Servers owned: ${p.hacknetNodes.length} / ${HacknetServerConstants.MaxServers}`}</span><br /></>
|
||||||
}
|
}
|
||||||
@ -51,6 +51,7 @@ export function CharacterInfo(p: IPlayer): React.ReactElement {
|
|||||||
if (src.bladeburner) { parts.push([`Bladeburner:`, Money(src.bladeburner)]) };
|
if (src.bladeburner) { parts.push([`Bladeburner:`, Money(src.bladeburner)]) };
|
||||||
if (src.codingcontract) { parts.push([`Coding Contracts:`, Money(src.codingcontract)]) };
|
if (src.codingcontract) { parts.push([`Coding Contracts:`, Money(src.codingcontract)]) };
|
||||||
if (src.work) { parts.push([`Company Work:`, Money(src.work)]) };
|
if (src.work) { parts.push([`Company Work:`, Money(src.work)]) };
|
||||||
|
if (src.class) { parts.push([`Class:`, Money(src.class)]) };
|
||||||
if (src.corporation) { parts.push([`Corporation:`, Money(src.corporation)]) };
|
if (src.corporation) { parts.push([`Corporation:`, Money(src.corporation)]) };
|
||||||
if (src.crime) { parts.push([`Crimes:`, Money(src.crime)]) };
|
if (src.crime) { parts.push([`Crimes:`, Money(src.crime)]) };
|
||||||
if (src.gang) { parts.push([`Gang:`, Money(src.gang)]) };
|
if (src.gang) { parts.push([`Gang:`, Money(src.gang)]) };
|
||||||
|
@ -19,7 +19,7 @@ export class CharacterOverviewComponent extends Component {
|
|||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr id="character-hp-wrapper">
|
<tr id="character-hp-wrapper">
|
||||||
<td className="character-hp-cell">Hp:</td><td id="character-hp-text" className="character-hp-cell character-stat-cell">{Player.hp + " / " + Player.max_hp}</td>
|
<td className="character-hp-cell">Hp:</td><td id="character-hp-text" className="character-hp-cell character-stat-cell">{numeralWrapper.formatHp(Player.hp) + " / " + numeralWrapper.formatHp(Player.max_hp)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="character-money-wrapper">
|
<tr id="character-money-wrapper">
|
||||||
<td className="character-money-cell">Money: </td><td id="character-money-text" className="character-money-cell character-stat-cell">{numeralWrapper.formatMoney(Player.money.toNumber())}</td>
|
<td className="character-money-cell">Money: </td><td id="character-money-text" className="character-money-cell character-stat-cell">{numeralWrapper.formatMoney(Player.money.toNumber())}</td>
|
||||||
|
@ -49,7 +49,7 @@ class NumeralFormatter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
formatHp(n: number): string {
|
formatHp(n: number): string {
|
||||||
return this.format(n, "0.0");
|
return this.format(n, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
formatMoney(n: number): string {
|
formatMoney(n: number): string {
|
||||||
|
@ -11,6 +11,8 @@ export class MoneySourceTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bladeburner: number = 0;
|
bladeburner: number = 0;
|
||||||
|
casino: number = 0;
|
||||||
|
class: number = 0;
|
||||||
codingcontract: number = 0;
|
codingcontract: number = 0;
|
||||||
corporation: number = 0;
|
corporation: number = 0;
|
||||||
crime: number = 0;
|
crime: number = 0;
|
||||||
@ -22,7 +24,6 @@ export class MoneySourceTracker {
|
|||||||
stock: number = 0;
|
stock: number = 0;
|
||||||
total: number = 0;
|
total: number = 0;
|
||||||
work: number = 0;
|
work: number = 0;
|
||||||
casino: number = 0;
|
|
||||||
|
|
||||||
[key: string]: number | Function;
|
[key: string]: number | Function;
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ export function yesNoBoxCreate(txt: string | JSX.Element) {
|
|||||||
yesNoBoxOpen = true;
|
yesNoBoxOpen = true;
|
||||||
|
|
||||||
if (yesNoBoxTextElement) {
|
if (yesNoBoxTextElement) {
|
||||||
|
ReactDOM.unmountComponentAtNode(yesNoBoxTextElement);
|
||||||
|
yesNoBoxTextElement.innerHTML = '';
|
||||||
if(typeof txt === 'string') {
|
if(typeof txt === 'string') {
|
||||||
yesNoBoxTextElement.innerHTML = txt as string;
|
yesNoBoxTextElement.innerHTML = txt as string;
|
||||||
} else {
|
} else {
|
||||||
@ -136,6 +138,7 @@ export function yesNoTxtInpBoxCreate(txt: string | JSX.Element) {
|
|||||||
|
|
||||||
|
|
||||||
if (yesNoTextInputBoxTextElement) {
|
if (yesNoTextInputBoxTextElement) {
|
||||||
|
ReactDOM.unmountComponentAtNode(yesNoTextInputBoxTextElement);
|
||||||
yesNoTextInputBoxTextElement.innerHTML = '';
|
yesNoTextInputBoxTextElement.innerHTML = '';
|
||||||
if(typeof txt === 'string') {
|
if(typeof txt === 'string') {
|
||||||
yesNoTextInputBoxTextElement.innerHTML = txt;
|
yesNoTextInputBoxTextElement.innerHTML = txt;
|
||||||
|
Loading…
Reference in New Issue
Block a user