mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 06:02:26 +01:00
BLADEBURNER: Change sleeveSize from property to getter (#1746)
This commit is contained in:
parent
56c797e23f
commit
772762493f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user