2022-12-13 15:08:23 +01:00
|
|
|
import { NSFull } from "../NetscriptFunctions";
|
2022-07-20 07:13:06 +02:00
|
|
|
|
2019-05-05 06:03:40 +02:00
|
|
|
/**
|
|
|
|
* The environment in which a script runs. The environment holds
|
|
|
|
* Netscript functions and arguments for that script.
|
|
|
|
*/
|
|
|
|
export class Environment {
|
2022-10-04 12:40:10 +02:00
|
|
|
/** Whether or not the script that uses this Environment should stop running */
|
2021-09-05 01:09:30 +02:00
|
|
|
stopFlag = false;
|
2019-05-05 06:03:40 +02:00
|
|
|
|
2022-10-04 12:40:10 +02:00
|
|
|
/** The currently running function */
|
2022-08-06 23:53:09 +02:00
|
|
|
|
|
|
|
runningFn = "";
|
|
|
|
|
2022-10-04 12:40:10 +02:00
|
|
|
/** Environment variables (currently only Netscript functions) */
|
2023-01-06 02:41:24 +01:00
|
|
|
vars: NSFull | null = null;
|
2019-05-05 06:03:40 +02:00
|
|
|
}
|