grow helpers improvement

This commit is contained in:
2023-09-05 00:58:08 +02:00
parent 673abd49b2
commit 7b14e98658
25 changed files with 359 additions and 136 deletions
+7 -7
View File
@@ -7,7 +7,7 @@ export async function main(ns) {
const upgradeCostThreshold = ns.args.length > 1 ? ns.args[1] : 0.1;
const upgradeCount = ns.args.length > 2 ? ns.args[2] : 1;
const helperBuyThreshold = ns.args.length > 3 ? ns.args[3] : 0.2;
const nodeCap = 200;
const nodeCap = 24;
const levelCap = 200;
const ramCap = 64;
const coreCap = 16;
@@ -63,13 +63,13 @@ export async function main(ns) {
let logFiles = ['hack-log.js', 'nuke-log.js'];
// let logFiles = ['hack-log.js', 'nuke-log.js'];
for (let index = 0; index < logFiles.length; index++) {
const logFile = logFiles[index];
let portData = ns.readPort(index + 1);
if (portData != 'NULL PORT DATA') ns.write(logFile, portData, 'a');
}
// for (let index = 0; index < logFiles.length; index++) {
// const logFile = logFiles[index];
// let portData = ns.readPort(index + 1);
// if (portData != 'NULL PORT DATA') ns.write(logFile, portData, 'a');
// }
await ns.sleep(1000);
}