mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
Change alert to accept multiple args as other print functions (#2278)
This commit is contained in:
@@ -1473,10 +1473,15 @@ export const ns: InternalAPI<NSFull> = {
|
||||
}
|
||||
return runningScript.onlineExpGained / runningScript.onlineRunningTime;
|
||||
},
|
||||
alert: (ctx) => (_message) => {
|
||||
const message = helpers.string(ctx, "message", _message);
|
||||
dialogBoxCreate(message, { html: true, canBeDismissedEasily: true });
|
||||
},
|
||||
alert:
|
||||
(ctx) =>
|
||||
(...args) => {
|
||||
if (args.length === 0) {
|
||||
throw helpers.errorMessage(ctx, "Takes at least 1 argument.");
|
||||
}
|
||||
const message = helpers.argsToString(args);
|
||||
dialogBoxCreate(message, { html: true, canBeDismissedEasily: true });
|
||||
},
|
||||
toast:
|
||||
(ctx) =>
|
||||
(_message, _variant = ToastVariant.SUCCESS, _duration = 2000) => {
|
||||
|
||||
Reference in New Issue
Block a user