move singularity to its own namespace but still support the old.

This commit is contained in:
Olivier Gagnon 2022-04-12 20:55:28 -04:00
parent c8c271a334
commit eaf0098cc7
2 changed files with 4 additions and 1 deletions

@ -230,6 +230,9 @@ async function parseOnlyRamCalculate(
} else if (ref in workerScript.env.vars.grafting) { } else if (ref in workerScript.env.vars.grafting) {
func = workerScript.env.vars.grafting[ref]; func = workerScript.env.vars.grafting[ref];
refDetail = `grafting.${ref}`; refDetail = `grafting.${ref}`;
} else if (ref in workerScript.env.vars.singularity) {
func = workerScript.env.vars.singularity[ref];
refDetail = `singularity.${ref}`;
} else { } else {
func = workerScript.env.vars[ref]; func = workerScript.env.vars[ref];
refDetail = `${ref}`; refDetail = `${ref}`;

@ -4320,7 +4320,7 @@ interface UserInterface {
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs} * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
* <hr> * <hr>
*/ */
export interface NS extends Singularity { export interface NS {
/** /**
* Namespace for hacknet functions. * Namespace for hacknet functions.
* @remarks RAM cost: 4 GB * @remarks RAM cost: 4 GB