Merge pull request #1615 from danielyxie/dev

safeguyard against Formulas.exe missing
This commit is contained in:
hydroflame 2021-10-28 15:59:22 -04:00 committed by GitHub
commit 4b794bf554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,6 +5,7 @@ import { sanitizeExploits } from "./Exploits/Exploit";
import { Reviver } from "./utils/JSONReviver";
import Decimal from "decimal.js";
import { Programs } from "./Programs/Programs";
export let Player = new PlayerObject();
@ -29,4 +30,9 @@ export function loadPlayer(saveString: string): void {
}
Player.exploits = sanitizeExploits(Player.exploits);
const home = Player.getHomeComputer();
if (Player.sourceFileLvl(5) > 0 && !home.programs.includes(Programs.Formulas.name)) {
Player.getHomeComputer().programs.push(Programs.Formulas.name);
}
}