BLADEBURNER: Move bladeburner team losses to Casualties (#1654)

This commit is contained in:
Denis Čahuk
2024-09-24 02:03:01 +02:00
committed by GitHub
parent cf2d9b8335
commit b86044bcc1
8 changed files with 265 additions and 52 deletions

View File

@@ -28,6 +28,7 @@ import { CONSTANTS } from "../../Constants";
import { Person } from "../Person";
import { isMember } from "../../utils/EnumHelper";
import { PartialRecord } from "../../Types/Record";
import { isSleeveSupportWork } from "../Sleeve/Work/SleeveSupportWork";
export class PlayerObject extends Person implements IPlayer {
// Player-specific properties
@@ -171,6 +172,10 @@ export class PlayerObject extends Person implements IPlayer {
return "Player";
}
sleevesSupportingBladeburner(): Sleeve[] {
return this.sleeves.filter((s) => isSleeveSupportWork(s.currentWork));
}
/** Serialize the current object to a JSON save state. */
toJSON(): IReviverValue {
return Generic_toJSON("PlayerObject", this);