mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
Polish some UI
This commit is contained in:
parent
fef5ab31b2
commit
d2dd88c5ca
@ -1372,7 +1372,7 @@ export function craftAugmentationWork(this: IPlayer, numCycles: number): boolean
|
|||||||
export function finishCraftAugmentationWork(this: IPlayer, cancelled: boolean): string {
|
export function finishCraftAugmentationWork(this: IPlayer, cancelled: boolean): string {
|
||||||
const augName = this.craftAugmentationName;
|
const augName = this.craftAugmentationName;
|
||||||
if (cancelled === false) {
|
if (cancelled === false) {
|
||||||
dialogBoxCreate(`You've finished crafting ${augName}.<br>The augmentation has been grafted to you, but you feel slightly lightheaded.`)
|
dialogBoxCreate(`You've finished crafting ${augName}.<br>The augmentation has been grafted to your body, but you feel a bit off.`)
|
||||||
|
|
||||||
applyAugmentation(Augmentations[augName]);
|
applyAugmentation(Augmentations[augName]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -143,51 +143,66 @@ function Work(): React.ReactElement {
|
|||||||
let details = <></>;
|
let details = <></>;
|
||||||
let header = <></>;
|
let header = <></>;
|
||||||
let innerText = <></>;
|
let innerText = <></>;
|
||||||
if (player.workType === CONSTANTS.WorkTypeCompanyPartTime || player.workType === CONSTANTS.WorkTypeCompany) {
|
switch (player.workType) {
|
||||||
details = (
|
case CONSTANTS.WorkTypeCompanyPartTime:
|
||||||
<>
|
case CONSTANTS.WorkTypeCompany:
|
||||||
{player.jobs[player.companyName]} at <strong>{player.companyName}</strong>
|
details = (
|
||||||
</>
|
<>
|
||||||
);
|
{player.jobs[player.companyName]} at <strong>{player.companyName}</strong>
|
||||||
header = (
|
</>
|
||||||
<>
|
);
|
||||||
Working at <strong>{player.companyName}</strong>
|
header = (
|
||||||
</>
|
<>
|
||||||
);
|
Working at <strong>{player.companyName}</strong>
|
||||||
innerText = (
|
</>
|
||||||
<>
|
);
|
||||||
+<Reputation reputation={player.workRepGained} /> rep
|
innerText = (
|
||||||
</>
|
<>
|
||||||
);
|
+<Reputation reputation={player.workRepGained} /> rep
|
||||||
} else if (player.workType === CONSTANTS.WorkTypeFaction) {
|
</>
|
||||||
details = (
|
);
|
||||||
<>
|
break;
|
||||||
{player.factionWorkType} for <strong>{player.currentWorkFactionName}</strong>
|
case CONSTANTS.WorkTypeFaction:
|
||||||
</>
|
details = (
|
||||||
);
|
<>
|
||||||
header = (
|
{player.factionWorkType} for <strong>{player.currentWorkFactionName}</strong>
|
||||||
<>
|
</>
|
||||||
Working for <strong>{player.currentWorkFactionName}</strong>
|
);
|
||||||
</>
|
header = (
|
||||||
);
|
<>
|
||||||
innerText = (
|
Working for <strong>{player.currentWorkFactionName}</strong>
|
||||||
<>
|
</>
|
||||||
+<Reputation reputation={player.workRepGained} /> rep
|
);
|
||||||
</>
|
innerText = (
|
||||||
);
|
<>
|
||||||
} else if (player.workType === CONSTANTS.WorkTypeStudyClass) {
|
+<Reputation reputation={player.workRepGained} /> rep
|
||||||
details = <>{player.workType}</>;
|
</>
|
||||||
header = <>You are {player.className}</>;
|
);
|
||||||
innerText = <>{convertTimeMsToTimeElapsedString(player.timeWorked)}</>;
|
break;
|
||||||
} else if (player.workType === CONSTANTS.WorkTypeCreateProgram) {
|
case CONSTANTS.WorkTypeStudyClass:
|
||||||
details = <>Coding {player.createProgramName}</>;
|
details = <>{player.workType}</>;
|
||||||
header = <>Creating a program</>;
|
header = <>You are {player.className}</>;
|
||||||
innerText = (
|
innerText = <>{convertTimeMsToTimeElapsedString(player.timeWorked)}</>;
|
||||||
<>
|
break;
|
||||||
{player.createProgramName}{" "}
|
case CONSTANTS.WorkTypeCreateProgram:
|
||||||
{((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}%
|
details = <>Coding {player.createProgramName}</>;
|
||||||
</>
|
header = <>Creating a program</>;
|
||||||
);
|
innerText = (
|
||||||
|
<>
|
||||||
|
{player.createProgramName}{" "}
|
||||||
|
{((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}%
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CONSTANTS.WorkTypeCraftAugmentation:
|
||||||
|
details = <>Crafting {player.craftAugmentationName}</>;
|
||||||
|
header = <>Crafting an Augmentation</>;
|
||||||
|
innerText = (
|
||||||
|
<>
|
||||||
|
<strong>{convertTimeMsToTimeElapsedString(player.timeNeededToCompleteWork - player.timeWorkedCraftAugmentation)}</strong>
|
||||||
|
{" "}remaining
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -511,8 +511,7 @@ export function WorkInProgressRoot(): React.ReactElement {
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}
|
You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}
|
||||||
<br /><br />
|
<br /><br />
|
||||||
The augumentation if {((player.timeWorkedCraftAugmentation / player.timeNeededToCompleteWork) * 100).toFixed(2)}
|
The augmentation will be done in {convertTimeMsToTimeElapsedString(player.timeNeededToCompleteWork - player.timeWorkedCraftAugmentation)}.<br />
|
||||||
% complete. <br />
|
|
||||||
If you cancel, your work will <b>not</b> be saved, and the money you spent will <b>not</b> be returned.
|
If you cancel, your work will <b>not</b> be saved, and the money you spent will <b>not</b> be returned.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user