fix sleeve memory bug

This commit is contained in:
Olivier Gagnon
2021-09-08 23:47:34 -04:00
parent bada8a5f39
commit 2a13db39c7
360 changed files with 5424 additions and 15764 deletions
+1 -5
View File
@@ -9,11 +9,7 @@ import { HashManager } from "../../Hacknet/HashManager";
import { CityName } from "../../Locations/data/CityNames";
import { MoneySourceTracker } from "../../utils/MoneySourceTracker";
import {
Reviver,
Generic_toJSON,
Generic_fromJSON,
} from "../../../utils/JSONReviver";
import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../../utils/JSONReviver";
import Decimal from "decimal.js";
@@ -5,10 +5,7 @@ import { IPlayer } from "../IPlayer";
import { Augmentation } from "../../Augmentation/Augmentation";
export function hasAugmentation(
this: IPlayer,
aug: string | Augmentation,
): boolean {
export function hasAugmentation(this: IPlayer, aug: string | Augmentation): boolean {
const augName: string = aug instanceof Augmentation ? aug.name : aug;
for (const owned of this.augmentations) {
@@ -6,12 +6,7 @@ export function canAccessBladeburner() {
return false;
}
return (
this.bitNodeN === 6 ||
this.bitNodeN === 7 ||
SourceFileFlags[6] > 0 ||
SourceFileFlags[7] > 0
);
return this.bitNodeN === 6 || this.bitNodeN === 7 || SourceFileFlags[6] > 0 || SourceFileFlags[7] > 0;
}
export function inBladeburner() {
@@ -14,9 +14,7 @@ export function canAccessGang() {
return false;
}
return (
this.karma <= BitNodeMultipliers.GangKarmaRequirement * GangKarmaRequirement
);
return this.karma <= BitNodeMultipliers.GangKarmaRequirement * GangKarmaRequirement;
}
export function getGangFaction() {
File diff suppressed because it is too large Load Diff
@@ -8,11 +8,7 @@ import { CONSTANTS } from "../../Constants";
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
import { Server } from "../../Server/Server";
import { HacknetServer } from "../../Hacknet/HacknetServer";
import {
AddToAllServers,
AllServers,
createUniqueRandomIp,
} from "../../Server/AllServers";
import { AddToAllServers, AllServers, createUniqueRandomIp } from "../../Server/AllServers";
import { SpecialServerIps } from "../../Server/SpecialServerIps";
export function hasTorRouter(this: IPlayer): boolean {
@@ -35,11 +31,7 @@ export function getUpgradeHomeRamCost(this: IPlayer): number {
//Calculate cost
//Have cost increase by some percentage each time RAM has been upgraded
const mult = Math.pow(1.58, numUpgrades);
const cost =
currentRam *
CONSTANTS.BaseCostFor1GBOfRamHome *
mult *
BitNodeMultipliers.HomeComputerRamCost;
const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;
return cost;
}