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
-4
View File
@@ -182,10 +182,6 @@ function parseOnlyRamCalculate(
return { cost: override, entries: [{ type: "misc", name: "override", cost: override }] };
}
// Check if this is one of the special keys, and add the appropriate ram cost if so.
if (ref === "hacknet" && !resolvedRefs.has("hacknet")) {
ram += RamCostConstants.HacknetNodes;
detailedCosts.push({ type: "ns", name: "hacknet", cost: RamCostConstants.HacknetNodes });
}
if (ref === "document" && !resolvedRefs.has("document")) {
ram += RamCostConstants.Dom;
detailedCosts.push({ type: "dom", name: "document", cost: RamCostConstants.Dom });