From 92f7d12c0e958a9d17f7ce8a23d1ea5622ac7064 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 29 Mar 2019 12:26:25 -0400 Subject: [PATCH 1/4] free output is now aligned and shows percent used --- src/Terminal.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Terminal.js b/src/Terminal.js index e41bb5125..87f15c181 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -1640,9 +1640,15 @@ let Terminal = { postError("Incorrect usage of free command. Usage: free"); return; } - post("Total: " + numeralWrapper.format(Player.getCurrentServer().maxRam, '0.00') + " GB"); - post("Used: " + numeralWrapper.format(Player.getCurrentServer().ramUsed, '0.00') + " GB"); - post("Available: " + numeralWrapper.format(Player.getCurrentServer().maxRam - Player.getCurrentServer().ramUsed, '0.00') + " GB"); + const ram = numeralWrapper.format(Player.getCurrentServer().maxRam, '0.00'); + const used = numeralWrapper.format(Player.getCurrentServer().ramUsed, '0.00'); + const avail = numeralWrapper.format(Player.getCurrentServer().maxRam - Player.getCurrentServer().ramUsed, '0.00'); + const maxLength = Math.max(ram.length, Math.max(used.length, avail.length)); + const usedPercent = numeralWrapper.format(Player.getCurrentServer().ramUsed/Player.getCurrentServer().maxRam*100, '0.00'); + + post(`Total: ${" ".repeat(maxLength-ram.length)}${ram} GB`); + post(`Used: ${" ".repeat(maxLength-used.length)}${used} GB (${usedPercent}%)`); + post(`Available: ${" ".repeat(maxLength-avail.length)}${avail} GB`); }, executeKillCommand: function(commandArray) { From b646c155217de606b2e0dfd628f8e126509fa14d Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 29 Mar 2019 12:32:11 -0400 Subject: [PATCH 2/4] It is now possible to join bladeburners in BN7 without having SF6-1 --- src/Location.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Location.js b/src/Location.js index 0e791d01f..f168d2eeb 100644 --- a/src/Location.js +++ b/src/Location.js @@ -654,7 +654,7 @@ function displayLocationContent() { networkEngineerJob.style.display = "block"; securityJob.style.display = "block"; agentJob.style.display = "block"; - if (Player.bitNodeN === 6 || hasBladeburnerSF === true) { + if (Player.bitNodeN === 6 ||Player.bitNodeN === 7 || hasBladeburnerSF === true) { if (Player.bitNodeN === 8) {break;} if (Player.bladeburner instanceof Bladeburner) { //Note: Can't infiltrate NSA when part of bladeburner From cb66ad9628b0d7c305805ba42f80d8cb31a4a3f5 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 29 Mar 2019 12:10:22 -0400 Subject: [PATCH 3/4] fli1ght now displays the correct number of augs --- src/Terminal.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Terminal.js b/src/Terminal.js index 87f15c181..afe0bca97 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -2,6 +2,7 @@ import {substituteAliases, printAliases, parseAliasDeclaration, removeAlias, GlobalAliases, Aliases} from "./Alias"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import {CodingContract, CodingContractResult, CodingContractRewardType} from "./CodingContracts"; import {CONSTANTS} from "./Constants"; @@ -2144,7 +2145,8 @@ let Terminal = { post("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10."); }; programHandlers[Programs.Flight.name] = () => { - const fulfilled = Player.augmentations.length >= 30 && + const numAugReq = Math.round(BitNodeMultipliers.DaedalusAugsRequirement*30) + const fulfilled = Player.augmentations.length >= numAugReq && Player.money.gt(1e11) && ((Player.hacking_skill >= 2500)|| (Player.strength >= 1500 && @@ -2152,17 +2154,17 @@ let Terminal = { Player.dexterity >= 1500 && Player.agility >= 1500)); if(!fulfilled) { - post("Augmentations: " + Player.augmentations.length + " / 30"); + post(`Augmentations: ${Player.augmentations.length} / ${numAugReq}`); - post("Money: " + numeralWrapper.format(Player.money.toNumber(), '($0.000a)') + " / " + numeralWrapper.format(1e11, '($0.000a)')); + post(`Money: ${numeralWrapper.format(Player.money.toNumber(), '($0.000a)')} / numeralWrapper.format(1e11, '($0.000a)')`); post("One path below must be fulfilled..."); post("----------HACKING PATH----------"); - post("Hacking skill: " + Player.hacking_skill + " / 2500"); + post(`Hacking skill: ${Player.hacking_skill} / 2500`); post("----------COMBAT PATH----------"); - post("Strength: " + Player.strength + " / 1500"); - post("Defense: " + Player.defense + " / 1500"); - post("Dexterity: " + Player.dexterity + " / 1500"); - post("Agility: " + Player.agility + " / 1500"); + post(`Strength: ${Player.strength} / 1500`); + post(`Defense: ${Player.defense} / 1500`); + post(`Dexterity: ${Player.dexterity} / 1500`); + post(`Agility: ${Player.agility} / 1500`); return; } From e63ad767013762f78053e60c93b17122ef685fc4 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 29 Mar 2019 12:11:01 -0400 Subject: [PATCH 4/4] typo --- src/Terminal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Terminal.js b/src/Terminal.js index afe0bca97..c00bc76f5 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -2156,7 +2156,7 @@ let Terminal = { if(!fulfilled) { post(`Augmentations: ${Player.augmentations.length} / ${numAugReq}`); - post(`Money: ${numeralWrapper.format(Player.money.toNumber(), '($0.000a)')} / numeralWrapper.format(1e11, '($0.000a)')`); + post(`Money: ${numeralWrapper.format(Player.money.toNumber(), '($0.000a)')} / ${numeralWrapper.format(1e11, '($0.000a)')}`); post("One path below must be fulfilled..."); post("----------HACKING PATH----------"); post(`Hacking skill: ${Player.hacking_skill} / 2500`);