mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-01 19:07:36 +01:00
sleeve BB contracts now properly give money
This commit is contained in:
parent
bf33734def
commit
1a1decf5fd
@ -5,6 +5,8 @@ import { applySleeveGains, Work, WorkType } from "./Work";
|
|||||||
import { CONSTANTS } from "../../../Constants";
|
import { CONSTANTS } from "../../../Constants";
|
||||||
import { GeneralActions } from "../../../Bladeburner/data/GeneralActions";
|
import { GeneralActions } from "../../../Bladeburner/data/GeneralActions";
|
||||||
import { WorkStats } from "../../../Work/WorkStats";
|
import { WorkStats } from "../../../Work/WorkStats";
|
||||||
|
import { Contract } from "src/Bladeburner/Contract";
|
||||||
|
import { Contracts } from "src/Bladeburner/data/Contracts";
|
||||||
|
|
||||||
interface SleeveBladeburnerWorkParams {
|
interface SleeveBladeburnerWorkParams {
|
||||||
type: string;
|
type: string;
|
||||||
@ -54,13 +56,14 @@ export class SleeveBladeburnerWork extends Work {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.bladeburner.completeAction(player, sleeve, actionIdent, false);
|
const retValue = player.bladeburner.completeAction(player, sleeve, actionIdent, false);
|
||||||
let exp: WorkStats | undefined;
|
let exp: WorkStats | undefined;
|
||||||
if (this.actionType === "General") {
|
if (this.actionType === "General") {
|
||||||
exp = GeneralActions[this.actionName]?.exp;
|
exp = GeneralActions[this.actionName]?.exp;
|
||||||
if (!exp) throw new Error(`Somehow there was no exp for action ${this.actionType} ${this.actionName}`);
|
if (!exp) throw new Error(`Somehow there was no exp for action ${this.actionType} ${this.actionName}`);
|
||||||
applySleeveGains(player, sleeve, exp, 1);
|
applySleeveGains(player, sleeve, exp, 1);
|
||||||
}
|
}
|
||||||
|
if (retValue.money>0)player.gainMoney(retValue.money,"sleeves")
|
||||||
this.cyclesWorked -= this.cyclesNeeded(player, sleeve);
|
this.cyclesWorked -= this.cyclesNeeded(player, sleeve);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user