Merge pull request #3544 from phyzical/feature/refactor-augmentation

REFACTOR:  augmentation cost, rep cost and level to be calculated in place
This commit is contained in:
hydroflame
2022-05-04 12:08:24 -04:00
committed by GitHub
25 changed files with 348 additions and 202 deletions
@@ -1,6 +1,5 @@
import { IPlayer } from "../IPlayer";
import { PlayerObject } from "./PlayerObject";
import { Augmentations } from "../../Augmentation/Augmentations";
import { applyAugmentation } from "../../Augmentation/AugmentationHelpers";
import { PlayerOwnedAugmentation } from "../../Augmentation/PlayerOwnedAugmentation";
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
@@ -1367,7 +1366,7 @@ export function craftAugmentationWork(this: IPlayer, numCycles: number): boolean
export function finishGraftAugmentationWork(this: IPlayer, cancelled: boolean, singularity = false): string {
const augName = this.graftAugmentationName;
if (cancelled === false) {
applyAugmentation(Augmentations[augName]);
applyAugmentation({ name: augName, level: 1 });
if (!this.hasAugmentation(AugmentationNames.CongruityImplant)) {
this.entropy += 1;