FEATURE: BitNode options (#1411)

This commit is contained in:
catloversg
2024-07-15 04:30:30 +07:00
committed by GitHub
parent 0e1e8a9862
commit 783120c886
71 changed files with 1315 additions and 308 deletions
+10 -4
View File
@@ -86,10 +86,16 @@ export const RamCostConstants = {
function SF4Cost(cost: number): () => number {
return () => {
if (Player.bitNodeN === 4) return cost;
const sf4 = Player.sourceFileLvl(4);
if (sf4 <= 1) return cost * 16;
if (sf4 === 2) return cost * 4;
if (Player.bitNodeN === 4) {
return cost;
}
const sf4 = Player.activeSourceFileLvl(4);
if (sf4 <= 1) {
return cost * 16;
}
if (sf4 === 2) {
return cost * 4;
}
return cost;
};
}