Skip to content

Commit

Permalink
BLADEBURNER: Change sleeveSize from property to getter (#1746)
Browse files Browse the repository at this point in the history
  • Loading branch information
catloversg authored Nov 4, 2024
1 parent 56c797e commit 7727624
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Bladeburner/Actions/TeamCasualties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/Bladeburner/Bladeburner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ export class SleeveSupportWork extends SleeveWorkClass {
Player.bladeburner?.sleeveSupport(true);
}

process() {
return;
}
process(): void {}

finish(): void {
Player.bladeburner?.sleeveSupport(false);
Expand Down
1 change: 0 additions & 1 deletion test/jest/__snapshots__/FullSave.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7727624

Please sign in to comment.