This commit is contained in:
Snarling
2022-09-06 09:07:12 -04:00
parent cc2246213f
commit 83d357e758
203 changed files with 2263 additions and 3018 deletions
@@ -32,5 +32,5 @@ export function applyEntropy(this: IPlayer, stacks = 1): void {
this.reapplyAllAugmentations();
this.reapplyAllSourceFiles();
this.mults = calculateEntropy(this, stacks);
this.mults = calculateEntropy(stacks);
}
@@ -13,5 +13,5 @@ export function inBladeburner(this: IPlayer): boolean {
}
export function startBladeburner(this: IPlayer): void {
this.bladeburner = new Bladeburner(this);
this.bladeburner = new Bladeburner();
}
@@ -112,15 +112,15 @@ export function prestigeAugmentation(this: PlayerObject): void {
const numSleeves = Math.min(3, this.sourceFileLvl(10) + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;
if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;
for (let i = this.sleeves.length; i < numSleeves; i++) {
this.sleeves.push(new Sleeve(this));
this.sleeves.push(new Sleeve());
}
for (let i = 0; i < this.sleeves.length; ++i) {
if (this.sleeves[i] instanceof Sleeve) {
if (this.sleeves[i].shock >= 100) {
this.sleeves[i].synchronize(this);
this.sleeves[i].synchronize();
} else {
this.sleeves[i].shockRecovery(this);
this.sleeves[i].shockRecovery();
}
}
}
@@ -149,9 +149,9 @@ export function prestigeSourceFile(this: IPlayer): void {
// Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)
for (let i = 0; i < this.sleeves.length; ++i) {
if (this.sleeves[i] instanceof Sleeve) {
this.sleeves[i].prestige(this);
this.sleeves[i].prestige();
} else {
this.sleeves[i] = new Sleeve(this);
this.sleeves[i] = new Sleeve();
}
}
@@ -490,7 +490,7 @@ export function regenerateHp(this: IPerson, amt: number): void {
}
export function hospitalize(this: IPlayer): number {
const cost = getHospitalizationCost(this);
const cost = getHospitalizationCost();
SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, ToastVariant.WARNING, 2000);
this.loseMoney(cost, "hospitalization");
@@ -596,7 +596,7 @@ export function quitJob(this: IPlayer, company: string): void {
}
for (const sleeve of this.sleeves) {
if (isSleeveCompanyWork(sleeve.currentWork) && sleeve.currentWork.companyName === company) {
sleeve.stopWork(this);
sleeve.stopWork();
dialogBoxCreate(`You quit ${company} while one of your sleeves was working there. The sleeve is now idle.`);
}
}
@@ -3,20 +3,20 @@ import { IPlayer } from "../IPlayer";
export function start(this: IPlayer, w: Work): void {
if (this.currentWork !== null) {
this.currentWork.finish(this, true);
this.currentWork.finish(true);
}
this.currentWork = w;
}
export function process(this: IPlayer, cycles = 1): void {
if (this.currentWork === null) return;
const finished = this.currentWork.process(this, cycles);
const finished = this.currentWork.process(cycles);
if (finished) {
this.finishWork(false);
}
}
export function finish(this: IPlayer, cancelled: boolean): void {
if (this.currentWork === null) return;
this.currentWork.finish(this, cancelled);
this.currentWork.finish(cancelled);
this.currentWork = null;
this.focus = false;
}