Scenario loading has big issues with paths, this is a bandaid

This commit is contained in:
Daniel Vestøl committed 2018-11-14 22:17:09 +01:00
1 parent 081d9a5bea
commit 12a0ebf8d1
1 file changed
+1 -1
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class remoteCommands {
messageInterface(`Loading `/*${scenarios[i]}*/+`${fileName}`);
let code = await clusterTools.getLua(/*path.join(scenPath, */fileName/*)*/, false);
// trim away external path from filenames
fileName = fileName.replace("scenarios\\factoriommoscenarios\\", "");
fileName = fileName.replace("scenarios\\factoriommoscenarios\\", "").replace("scenarios/factoriommoscenarios", "");
files[fileName.split(".")[0]] = code;
}
}