Fixes penalty message for quitting work early.

This commit is contained in:
Andrew Cooper
2021-12-23 19:15:22 +00:00
parent fcb876695d
commit 4861ac4153

View File

@ -654,6 +654,8 @@ export function finishWork(this: IPlayer, cancelled: boolean, sing = false): str
this.workRepGained *= this.cancelationPenalty(); this.workRepGained *= this.cancelationPenalty();
} }
const penaltyString = this.cancelationPenalty() === 0.5 ? "half" : "three-quarters";
const company = Companies[this.companyName]; const company = Companies[this.companyName];
company.playerReputation += this.workRepGained; company.playerReputation += this.workRepGained;
@ -680,7 +682,7 @@ export function finishWork(this: IPlayer, cancelled: boolean, sing = false): str
<> <>
You worked a short shift of {convertTimeMsToTimeElapsedString(this.timeWorked)} <br /> You worked a short shift of {convertTimeMsToTimeElapsedString(this.timeWorked)} <br />
<br /> <br />
Since you cancelled your work early, you only gained half of the reputation you earned. <br /> Since you cancelled your work early, you only gained {penaltyString} of the reputation you earned. <br />
<br /> <br />
{content} {content}
</> </>