API: Remove RAM cost of hacknet namespace and set RAM cost of each hacknet API (#2502)

* API: Remove RAM cost of hacknet namespace and set RAM cost of each hacknet API

* Fix Jest tests

* Update based on feedback
This commit is contained in:
catloversg
2026-02-17 00:00:02 +07:00
committed by GitHub
parent 775a1b1e4b
commit dd78a2cb44
6 changed files with 58 additions and 48 deletions
+29
View File
@@ -541,5 +541,34 @@ export const breakingChanges300: VersionBreakingChange = {
showWarning: false,
doNotSkip: true,
},
{
brokenAPIs: [
{ name: "ns.hacknet.numNodes" },
{ name: "ns.hacknet.purchaseNode" },
{ name: "ns.hacknet.getPurchaseNodeCost" },
{ name: "ns.hacknet.getNodeStats" },
{ name: "ns.hacknet.upgradeLevel" },
{ name: "ns.hacknet.upgradeRam" },
{ name: "ns.hacknet.upgradeCore" },
{ name: "ns.hacknet.upgradeCache" },
{ name: "ns.hacknet.getLevelUpgradeCost" },
{ name: "ns.hacknet.getRamUpgradeCost" },
{ name: "ns.hacknet.getCoreUpgradeCost" },
{ name: "ns.hacknet.getCacheUpgradeCost" },
{ name: "ns.hacknet.numHashes" },
{ name: "ns.hacknet.hashCost" },
{ name: "ns.hacknet.spendHashes" },
{ name: "ns.hacknet.maxNumNodes" },
{ name: "ns.hacknet.hashCapacity" },
{ name: "ns.hacknet.getHashUpgrades" },
{ name: "ns.hacknet.getHashUpgradeLevel" },
{ name: "ns.hacknet.getStudyMult" },
{ name: "ns.hacknet.getTrainingMult" },
],
info:
"Accessing the hacknet namespace incurred a one-time cost of 4 GB of RAM, and each hacknet API did not incur \n" +
"RAM cost. Now the hacknet namespace does not incur RAM cost, but each hacknet API incurs a 0.5GB RAM cost.",
showWarning: false,
},
],
};
+2
View File
@@ -620,6 +620,8 @@ Error: ${e}`,
}
if (ver < 45) {
initDarkwebServer();
}
if (ver < 46) {
showAPIBreaks("3.0.0", breakingChanges300);
}
}