mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
change location of home cores cost formula
This commit is contained in:
parent
e2c8fed307
commit
b7823f46e4
@ -19,7 +19,7 @@ export function CoresButton(props: IProps): React.ReactElement {
|
||||
return <Button>Upgrade 'home' cores - MAX</Button>;
|
||||
}
|
||||
|
||||
const cost = 1e9 * Math.pow(7.5, homeComputer.cpuCores);
|
||||
const cost = props.p.getUpgradeHomeCoresCost();
|
||||
|
||||
function buy(): void {
|
||||
if (maxCores) return;
|
||||
|
@ -191,6 +191,7 @@ export interface IPlayer {
|
||||
getHomeComputer(): Server;
|
||||
getNextCompanyPosition(company: Company, entryPosType: CompanyPosition): CompanyPosition | null;
|
||||
getUpgradeHomeRamCost(): number;
|
||||
getUpgradeHomeCoresCost(): number;
|
||||
gotoLocation(to: LocationName): boolean;
|
||||
hasAugmentation(aug: string | Augmentation): boolean;
|
||||
hasCorporation(): boolean;
|
||||
|
@ -198,6 +198,7 @@ export class PlayerObject implements IPlayer {
|
||||
getHomeComputer: () => Server;
|
||||
getNextCompanyPosition: (company: Company, entryPosType: CompanyPosition) => CompanyPosition | null;
|
||||
getUpgradeHomeRamCost: () => number;
|
||||
getUpgradeHomeCoresCost: () => number;
|
||||
gotoLocation: (to: LocationName) => boolean;
|
||||
hasAugmentation: (aug: string | Augmentation) => boolean;
|
||||
hasCorporation: () => boolean;
|
||||
@ -567,6 +568,7 @@ export class PlayerObject implements IPlayer {
|
||||
this.getCurrentServer = serverMethods.getCurrentServer;
|
||||
this.getHomeComputer = serverMethods.getHomeComputer;
|
||||
this.getUpgradeHomeRamCost = serverMethods.getUpgradeHomeRamCost;
|
||||
this.getUpgradeHomeCoresCost = serverMethods.getUpgradeHomeCoresCost;
|
||||
this.createHacknetServer = serverMethods.createHacknetServer;
|
||||
this.factionWorkType = "";
|
||||
this.committingCrimeThruSingFn = false;
|
||||
|
@ -40,6 +40,10 @@ export function getUpgradeHomeRamCost(this: IPlayer): number {
|
||||
return cost;
|
||||
}
|
||||
|
||||
export function getUpgradeHomeCoresCost(this: IPlayer): number {
|
||||
return 1e9 * Math.pow(7.5, this.getHomeComputer().cpuCores);
|
||||
}
|
||||
|
||||
export function createHacknetServer(this: IPlayer): HacknetServer {
|
||||
const numOwned = this.hacknetNodes.length;
|
||||
const name = `hacknet-node-${numOwned}`;
|
||||
|
Loading…
Reference in New Issue
Block a user