mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-10-23 02:03:14 +02:00
b2add6c26b
Found most (hopefully all) places where the error message wording incorrectly was shown to the tune of 'no script exists', where it should have been showing to the effect of 'script is not running'. Also cleaned up some of the consistency in the wording and added a 'helper' export for knowing valid script extensions used in validation of 'isScriptFilename', so we can have consistent error messaging. Resolves danielyxie/bitburner#1966
6 lines
200 B
TypeScript
6 lines
200 B
TypeScript
export const validScriptExtensions: Array<string> = [`.js`, `.script`, `.ns`];
|
|
|
|
export function isScriptFilename(f: string): boolean {
|
|
return validScriptExtensions.some((ext) => f.endsWith(ext));
|
|
}
|