From 5f467759509bcdc7051f0f583fc2783f963eb9bc Mon Sep 17 00:00:00 2001 From: rderfler <44448965+rderfler@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:41:43 -0400 Subject: [PATCH] Cant stop wont stop studying Correct merge, and known bug that prevents stopping studying --- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 5 ++--- src/PersonObjects/Sleeve/Sleeve.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index c7287064e..d293117de 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -67,7 +67,7 @@ import { achievements } from "../../Achievements/Achievements"; import { FactionNames } from "../../Faction/data/FactionNames"; import { ITaskTracker } from "../ITaskTracker"; import { IPerson } from "../IPerson"; -import { use } from "../../ui/Context"; +import { Player } from "../../Player"; import { graftingIntBonus } from "../Grafting/GraftingHelpers"; export function init(this: IPlayer): void { @@ -470,8 +470,7 @@ export function gainIntelligenceExp(this: IPerson, exp: number): void { console.error("ERROR: NaN passed into Player.gainIntelligenceExp()"); return; } - const player = use.Player(); - if (player.sourceFileLvl(5) > 0 || this.intelligence > 0) { + if (Player.sourceFileLvl(5) > 0 || this.intelligence > 0) { this.intelligence_exp += exp; this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp, 1)); } diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 918ca11d7..335abeb5c 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -590,7 +590,7 @@ export class Sleeve extends Person { // for, we need to reset the sleeve's task if (p.gang) { if (fac.name === p.gang.facName) { - this.resetTaskStatus(); + this.resetTaskStatus(p); } }