mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 17:23:00 +02:00
b275f88053
* Add support for enums at other ns layers * APIWrapper: simplified wrapping algorithm and modified to just use cloneDeep to copy enums instead of recursively wrapping enums as if they were new API layers * Improve APIWrapper typing * Changed some typings at RamCostGenerator to allow for enums at different levels without enums needing a ram cost * Added enums to ns.corporation, removed getter functions that were being used instead. * Add FactionWorkType for player use * Add ClassType and CompanyWorkPos enums * Change netscriptDefinitions to expect members of these new enums where appropriate.
19 lines
530 B
TypeScript
19 lines
530 B
TypeScript
import { NS } from "../ScriptEditor/NetscriptDefinitions";
|
|
import { ExternalAPI } from "./APIWrapper";
|
|
|
|
/**
|
|
* The environment in which a script runs. The environment holds
|
|
* Netscript functions and arguments for that script.
|
|
*/
|
|
export class Environment {
|
|
/** Whether or not the script that uses this Environment should stop running */
|
|
stopFlag = false;
|
|
|
|
/** The currently running function */
|
|
|
|
runningFn = "";
|
|
|
|
/** Environment variables (currently only Netscript functions) */
|
|
vars: ExternalAPI<NS> | null = null;
|
|
}
|