NETSCRIPT: Add additionalMsec to BasicHGWOptions

This option adds additional time to the sleep in hack/grow/weaken before
the command takes effect. The critical difference between this and doing
your own sleep is that it creates a single, uninterruptible sleep: This
opens up multiple new avenues of gameplay for batching.

Note that use of this new feature is theoretically always suboptimal,
since extending the sleep time wastes RAM.
This commit is contained in:
David Walker
2023-01-10 18:18:33 -08:00
parent af0ed1dbb0
commit 53755dd573
3 changed files with 26 additions and 15 deletions

View File

@@ -256,6 +256,12 @@ interface BasicHGWOptions {
threads?: number;
/** Set to true this action will affect the stock market. */
stock?: boolean;
/** Number of additional milliseconds that will be spent waiting between the
* start of the function and when it completes. There will only be one,
* contiguous wait, which is relevant because stats such as server security
* level are computed at the *start* of the function.
* Must be non-negative. */
additionalMsec?: number;
}
/**