mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 14:12:27 +01:00
fix BN exploit
This commit is contained in:
parent
3c67da02f3
commit
6ef99e138c
@ -2123,12 +2123,15 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return Player.playtimeSinceLastAug;
|
||||
},
|
||||
alert: function (message: any): void {
|
||||
dialogBoxCreate(message);
|
||||
message = toNative(message);
|
||||
dialogBoxCreate(JSON.stringify(message));
|
||||
},
|
||||
toast: function (message: any, variant: any = "success"): void {
|
||||
if (!["success", "info", "warning", "error"].includes(variant))
|
||||
throw new Error(`variant must be one of "success", "info", "warning", or "error"`);
|
||||
SnackbarEvents.emit(message, variant);
|
||||
|
||||
message = toNative(message);
|
||||
SnackbarEvents.emit(JSON.stringify(message), variant);
|
||||
},
|
||||
prompt: function (txt: any): any {
|
||||
if (!isString(txt)) {
|
||||
|
@ -168,6 +168,13 @@ export function prestigeSourceFile(flume: boolean): void {
|
||||
|
||||
const homeComp = Player.getHomeComputer();
|
||||
|
||||
// Stop a Terminal action if there is one.
|
||||
if (Terminal.action !== null) {
|
||||
Terminal.finishAction(Router, Player, true);
|
||||
}
|
||||
Terminal.clear();
|
||||
LogBoxClearEvents.emit();
|
||||
|
||||
// Delete all servers except home computer
|
||||
prestigeAllServers(); // Must be done before initForeignServers()
|
||||
|
||||
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -4624,7 +4624,7 @@ export interface NS extends Singularity {
|
||||
* RAM cost: 0.1 GB
|
||||
*
|
||||
* Returns the server’s instrinsic “growth parameter”. This growth
|
||||
* parameter is a number between 1 and 100 that represents how
|
||||
* parameter is a number between 0 and 100 that represents how
|
||||
* quickly the server’s money grows. This parameter affects the
|
||||
* percentage by which the server’s money is increased when using the
|
||||
* grow function. A higher growth parameter will result in a
|
||||
|
Loading…
Reference in New Issue
Block a user