mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
More hotfixes...
* Script editor theme could be corrupted leading to a recovery screen, this should fix that. * Because script filepath changes were moved before the detection of .ns files, a check was added for .ns files in BaseServer so they get the better name.
This commit is contained in:
@@ -333,6 +333,8 @@ export abstract class BaseServer implements IServer {
|
||||
server.scripts = new JSONMap();
|
||||
// In case somehow there are previously valid filenames that can't be sanitized, they will go in a new directory with a note.
|
||||
for (const script of oldScripts) {
|
||||
// We're about to do type validation on the filename anyway.
|
||||
if (script.filename.endsWith(".ns")) script.filename = (script.filename + ".js") as any;
|
||||
let newFilePath = resolveScriptFilePath(script.filename);
|
||||
if (!newFilePath) {
|
||||
newFilePath = `${newDirectory}script${++invalidScriptCount}.js` as ScriptFilePath;
|
||||
|
||||
Reference in New Issue
Block a user