From 772762493fcdd63855494382e5d715e21e9c9164 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:19:01 +0700 Subject: [PATCH] BLADEBURNER: Change sleeveSize from property to getter (#1746) --- src/Bladeburner/Actions/TeamCasualties.ts | 2 +- src/Bladeburner/Bladeburner.ts | 6 +++--- src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts | 4 +--- test/jest/__snapshots__/FullSave.test.ts.snap | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Bladeburner/Actions/TeamCasualties.ts b/src/Bladeburner/Actions/TeamCasualties.ts index 34266c8a8..3c455870d 100644 --- a/src/Bladeburner/Actions/TeamCasualties.ts +++ b/src/Bladeburner/Actions/TeamCasualties.ts @@ -24,7 +24,7 @@ export interface TeamActionWithCasualties { /** * Some actions (Operations and Black Operations) use teams for success bonus * and may result in casualties, reducing the player's hp, killing team members - * and killing sleeves (to shock them, sleeves are immortal) * + * and killing sleeves (to shock them, sleeves are immortal) */ export function resolveTeamCasualties(action: TeamActionWithCasualties, team: OperationTeam, success: boolean): number { if (action.teamCount <= 0) { diff --git a/src/Bladeburner/Bladeburner.ts b/src/Bladeburner/Bladeburner.ts index 5fcac3d69..6d635f715 100644 --- a/src/Bladeburner/Bladeburner.ts +++ b/src/Bladeburner/Bladeburner.ts @@ -64,7 +64,9 @@ export class Bladeburner implements OperationTeam { totalSkillPoints = 0; teamSize = 0; - sleeveSize = 0; + get sleeveSize() { + return Player.sleevesSupportingBladeburner().length; + } teamLost = 0; storedCycles = 0; @@ -703,10 +705,8 @@ export class Bladeburner implements OperationTeam { sleeveSupport(joining: boolean): void { if (joining) { - this.sleeveSize += 1; this.teamSize += 1; } else { - this.sleeveSize -= 1; this.teamSize -= 1; } } diff --git a/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts b/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts index 8cb1091c7..308788eae 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts @@ -12,9 +12,7 @@ export class SleeveSupportWork extends SleeveWorkClass { Player.bladeburner?.sleeveSupport(true); } - process() { - return; - } + process(): void {} finish(): void { Player.bladeburner?.sleeveSupport(false); diff --git a/test/jest/__snapshots__/FullSave.test.ts.snap b/test/jest/__snapshots__/FullSave.test.ts.snap index 754478eef..1c15afe21 100644 --- a/test/jest/__snapshots__/FullSave.test.ts.snap +++ b/test/jest/__snapshots__/FullSave.test.ts.snap @@ -274,7 +274,6 @@ exports[`Check Save File Continuity PlayerSave continuity 1`] = ` "rank": 2000, "skillPoints": 666, "skills": {}, - "sleeveSize": 0, "stamina": 1, "staminaBonus": 0, "storedCycles": 0,