mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 11:27:04 +02:00
allbuild commit e9254edf
This commit is contained in:
@@ -314,7 +314,7 @@ export function areFilesEqual(f0: string, f1: string): boolean {
|
||||
}
|
||||
|
||||
export function areImportsEquals(f0: string, f1: string): boolean {
|
||||
if (!f0.endsWith(".ns") && !f0.endsWith(".js")) f0 = f0 + ".js";
|
||||
if (!f1.endsWith(".ns") && !f1.endsWith(".js")) f1 = f1 + ".js";
|
||||
if (!f0.endsWith(".js")) f0 = f0 + ".js";
|
||||
if (!f1.endsWith(".js")) f1 = f1 + ".js";
|
||||
return areFilesEqual(f0, f1);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ const TemplatedHelpTexts: IMap<(command: string) => string[]> = {
|
||||
return [
|
||||
`Usage: ${command} [file ...] | [glob]`,
|
||||
` `,
|
||||
`Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) `,
|
||||
`Opens up the specified file(s) in the Script Editor. Only scripts (.js, or .script) or text files (.txt) `,
|
||||
`can be edited using the Script Editor. If a file does not exist a new one will be created`,
|
||||
` `,
|
||||
`If provided a glob as the only argument, ${command} can spider directories and open all matching `,
|
||||
@@ -472,7 +472,7 @@ export const HelpTexts: IMap<string[]> = {
|
||||
"Usage: wget [url] [target file]",
|
||||
" ",
|
||||
"Retrieves data from a URL and downloads it to a file on the current server. The data can only ",
|
||||
"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, ",
|
||||
"be downloaded to a script (.script or .js) or a text file (.txt). If the file already exists, ",
|
||||
"it will be overwritten by this command.",
|
||||
" ",
|
||||
"Note that it will not be possible to download data from many websites because they do not allow ",
|
||||
|
||||
@@ -25,11 +25,10 @@ export function cat(
|
||||
!filename.endsWith(".lit") &&
|
||||
!filename.endsWith(".txt") &&
|
||||
!filename.endsWith(".script") &&
|
||||
!filename.endsWith(".js") &&
|
||||
!filename.endsWith(".ns")
|
||||
!filename.endsWith(".js")
|
||||
) {
|
||||
terminal.error(
|
||||
"Only .msg, .txt, .lit, .script, .js, and .ns files are viewable with cat (filename must end with .msg, .txt, .lit, .script, .js, or .ns)",
|
||||
"Only .msg, .txt, .lit, .script and .js files are viewable with cat (filename must end with .msg, .txt, .lit, .script or .js)",
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -55,7 +54,7 @@ export function cat(
|
||||
txt.show();
|
||||
return;
|
||||
}
|
||||
} else if (filename.endsWith(".script") || filename.endsWith(".js") || filename.endsWith(".ns")) {
|
||||
} else if (filename.endsWith(".script") || filename.endsWith(".js")) {
|
||||
const script = terminal.getScript(player, relative_filename);
|
||||
if (script != null) {
|
||||
dialogBoxCreate(`${script.filename}<br /><br />${script.code}`);
|
||||
|
||||
@@ -17,7 +17,7 @@ interface EditorParameters {
|
||||
}
|
||||
|
||||
function isNs2(filename: string): boolean {
|
||||
return filename.endsWith(".ns") || filename.endsWith(".js");
|
||||
return filename.endsWith(".js");
|
||||
}
|
||||
|
||||
const newNs2Template = `/** @param {NS} ns */
|
||||
@@ -137,7 +137,7 @@ export function commonEditor(
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
`Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with ${command}`,
|
||||
`Invalid file. Only scripts (.script or .js), or text files (.txt) can be edited with ${command}`,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -85,9 +85,6 @@ export function runScript(
|
||||
terminal.print(
|
||||
`Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`,
|
||||
);
|
||||
if (runningScript.filename.endsWith(".ns")) {
|
||||
terminal.warn(".ns files are deprecated, please rename everything to .js");
|
||||
}
|
||||
if (tailFlag) {
|
||||
LogBoxEvents.emit(runningScript);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user