From 1a1decf5fda74f4848f9b867ca20353365a06f29 Mon Sep 17 00:00:00 2001 From: Mughur Date: Thu, 25 Aug 2022 20:06:19 +0300 Subject: [PATCH] sleeve BB contracts now properly give money --- src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts b/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts index 5b8900eed..f99af453c 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts @@ -5,6 +5,8 @@ import { applySleeveGains, Work, WorkType } from "./Work"; import { CONSTANTS } from "../../../Constants"; import { GeneralActions } from "../../../Bladeburner/data/GeneralActions"; import { WorkStats } from "../../../Work/WorkStats"; +import { Contract } from "src/Bladeburner/Contract"; +import { Contracts } from "src/Bladeburner/data/Contracts"; interface SleeveBladeburnerWorkParams { type: string; @@ -54,13 +56,14 @@ export class SleeveBladeburnerWork extends Work { return 0; } } - player.bladeburner.completeAction(player, sleeve, actionIdent, false); + const retValue = player.bladeburner.completeAction(player, sleeve, actionIdent, false); let exp: WorkStats | undefined; if (this.actionType === "General") { exp = GeneralActions[this.actionName]?.exp; if (!exp) throw new Error(`Somehow there was no exp for action ${this.actionType} ${this.actionName}`); applySleeveGains(player, sleeve, exp, 1); } + if (retValue.money>0)player.gainMoney(retValue.money,"sleeves") this.cyclesWorked -= this.cyclesNeeded(player, sleeve); } return 0;