mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-08 11:29:19 +01:00
build new function
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2751,9 +2751,9 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
updateDynamicRam("upgradeHomeCores", getRamCost("upgradeHomeCores"));
|
||||
checkSingularityAccess("upgradeHomeCores", 2);
|
||||
|
||||
// Check if we're at max CORES
|
||||
// Check if we're at max cores
|
||||
const homeComputer = Player.getHomeComputer();
|
||||
if (homeComputer.cpuCores >=8) {
|
||||
if (homeComputer.cpuCores >= 8) {
|
||||
workerScript.log("upgradeHomeCores", `Your home computer is at max cores.`);
|
||||
return false;
|
||||
}
|
||||
@ -2764,13 +2764,14 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return false;
|
||||
}
|
||||
|
||||
homeComputer.cpuCores +=1;
|
||||
homeComputer.cpuCores += 1;
|
||||
Player.loseMoney(cost);
|
||||
|
||||
Player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);
|
||||
workerScript.log(
|
||||
"upgradeHomeCores",
|
||||
`Purchased an additional core for home computer! It now has ${(homeComputer.cpuCores)} cores.`,);
|
||||
`Purchased an additional core for home computer! It now has ${homeComputer.cpuCores} cores.`,
|
||||
);
|
||||
return true;
|
||||
},
|
||||
getUpgradeHomeCoresCost: function (): any {
|
||||
|
Reference in New Issue
Block a user