mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
UI: Suppress confusing reputation-earned dialog on augment install (#739)
This commit is contained in:
parent
9a0d688909
commit
62058a7f78
@ -154,6 +154,7 @@ export function AugmentationsRoot(props: IProps): React.ReactElement {
|
|||||||
<br />- skill / experience
|
<br />- skill / experience
|
||||||
<br />- every server except home
|
<br />- every server except home
|
||||||
<br />- factions and reputation
|
<br />- factions and reputation
|
||||||
|
<br />- current work activity
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
You will keep:
|
You will keep:
|
||||||
|
@ -130,7 +130,7 @@ export function prestigeAugmentation(this: PlayerObject): void {
|
|||||||
this.reapplyAllAugmentations(true);
|
this.reapplyAllAugmentations(true);
|
||||||
this.hp.current = this.hp.max;
|
this.hp.current = this.hp.max;
|
||||||
|
|
||||||
this.finishWork(true);
|
this.finishWork(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function prestigeSourceFile(this: PlayerObject): void {
|
export function prestigeSourceFile(this: PlayerObject): void {
|
||||||
|
@ -15,9 +15,9 @@ export function processWork(this: PlayerObject, cycles = 1): void {
|
|||||||
this.finishWork(false);
|
this.finishWork(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function finishWork(this: PlayerObject, cancelled: boolean): void {
|
export function finishWork(this: PlayerObject, cancelled: boolean, suppressDialog?: boolean): void {
|
||||||
if (this.currentWork === null) return;
|
if (this.currentWork === null) return;
|
||||||
this.currentWork.finish(cancelled);
|
this.currentWork.finish(cancelled, !!suppressDialog);
|
||||||
this.currentWork = null;
|
this.currentWork = null;
|
||||||
this.focus = false;
|
this.focus = false;
|
||||||
}
|
}
|
||||||
|
@ -111,8 +111,8 @@ export class ClassWork extends Work {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
finish(): void {
|
finish(cancelled: boolean, suppressDialog?: boolean): void {
|
||||||
if (!this.singularity) {
|
if (!this.singularity && !suppressDialog) {
|
||||||
dialogBoxCreate(
|
dialogBoxCreate(
|
||||||
<>
|
<>
|
||||||
After {this.getClass().youAreCurrently} for{" "}
|
After {this.getClass().youAreCurrently} for{" "}
|
||||||
|
@ -53,8 +53,8 @@ export class CompanyWork extends Work {
|
|||||||
influenceStockThroughCompanyWork(company, gains.reputation, cycles);
|
influenceStockThroughCompanyWork(company, gains.reputation, cycles);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finish(): void {
|
finish(cancelled: boolean, suppressDialog?: boolean): void {
|
||||||
if (!this.singularity) {
|
if (!this.singularity && !suppressDialog) {
|
||||||
dialogBoxCreate(
|
dialogBoxCreate(
|
||||||
<>
|
<>
|
||||||
You finished working for {this.companyName}
|
You finished working for {this.companyName}
|
||||||
|
@ -73,14 +73,14 @@ export class CreateProgramWork extends Work {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finish(cancelled: boolean): void {
|
finish(cancelled: boolean, suppressDialog?: boolean): void {
|
||||||
const programName = asProgramFilePath(this.programName);
|
const programName = asProgramFilePath(this.programName);
|
||||||
if (!cancelled) {
|
if (!cancelled) {
|
||||||
//Complete case
|
//Complete case
|
||||||
Player.gainIntelligenceExp(
|
Player.gainIntelligenceExp(
|
||||||
(CONSTANTS.IntelligenceProgramBaseExpGain * this.cyclesWorked * CONSTANTS.MilliPerCycle) / 1000,
|
(CONSTANTS.IntelligenceProgramBaseExpGain * this.cyclesWorked * CONSTANTS.MilliPerCycle) / 1000,
|
||||||
);
|
);
|
||||||
if (!this.singularity) {
|
if (!this.singularity && !suppressDialog) {
|
||||||
const lines = [
|
const lines = [
|
||||||
`You've finished creating ${programName}!`,
|
`You've finished creating ${programName}!`,
|
||||||
"The new program can be found on your home computer.",
|
"The new program can be found on your home computer.",
|
||||||
|
@ -62,8 +62,8 @@ export class FactionWork extends Work {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
finish(): void {
|
finish(cancelled: boolean, suppressDialog?: boolean): void {
|
||||||
if (!this.singularity) {
|
if (!this.singularity && !suppressDialog) {
|
||||||
dialogBoxCreate(
|
dialogBoxCreate(
|
||||||
<>
|
<>
|
||||||
You worked for {this.getFaction().name}.
|
You worked for {this.getFaction().name}.
|
||||||
|
@ -12,7 +12,7 @@ export abstract class Work {
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract process(cycles: number): boolean;
|
abstract process(cycles: number): boolean;
|
||||||
abstract finish(cancelled: boolean): void;
|
abstract finish(cancelled: boolean, suppressDialog?: boolean): void;
|
||||||
abstract APICopy(): Record<string, unknown>;
|
abstract APICopy(): Record<string, unknown>;
|
||||||
abstract toJSON(): IReviverValue;
|
abstract toJSON(): IReviverValue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user