BLADEBURNER: Change sleeveSize from property to getter (#1746)

This commit is contained in:
catloversg 2024-11-04 14:19:01 +07:00 committed by GitHub
parent 56c797e23f
commit 772762493f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 8 deletions

@ -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) {

@ -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;
}
}

@ -12,9 +12,7 @@ export class SleeveSupportWork extends SleeveWorkClass {
Player.bladeburner?.sleeveSupport(true);
}
process() {
return;
}
process(): void {}
finish(): void {
Player.bladeburner?.sleeveSupport(false);

@ -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,