mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 16:13:49 +01:00
Merge pull request #908 from danielyxie/dev
hotfix netscript access to formulas and getServer
This commit is contained in:
commit
7df4aac8e6
@ -521,7 +521,7 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
|
||||
const checkFormulasAccess = function(func, n) {
|
||||
if (SourceFileFlags[5] < 1 || SourceFileFlags[n] < 1) {
|
||||
if ((SourceFileFlags[5] < 1 && Player.bitNodeN !== 5) || (SourceFileFlags[n] < 1 && Player.bitNodeN !== n)) {
|
||||
let extra = '';
|
||||
if (n !== 5) {
|
||||
extra = ` and Source-File ${n}-1`;
|
||||
@ -1638,7 +1638,7 @@ function NetscriptFunctions(workerScript) {
|
||||
},
|
||||
getServer: function(ip) {
|
||||
updateDynamicRam("getServer", getRamCost("getServer"));
|
||||
if (SourceFileFlags[5] <= 0) {
|
||||
if (SourceFileFlags[5] <= 0 && Player.bitNodeN !== 5) {
|
||||
throw makeRuntimeErrorMsg("getServer", "Requires Source-File 5 to run.");
|
||||
}
|
||||
const server = safeGetServer(ip, "getServer");
|
||||
|
Loading…
Reference in New Issue
Block a user