mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501)
This commit is contained in:
@@ -11,7 +11,6 @@ import { Player } from "@player";
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { isPowerOfTwo } from "../utils/helpers/isPowerOfTwo";
|
||||
import { WorkerScript } from "../Netscript/WorkerScript";
|
||||
import { workerScripts } from "../Netscript/WorkerScripts";
|
||||
|
||||
// Returns the cost of purchasing a server with the given RAM
|
||||
@@ -76,8 +75,8 @@ export const renamePurchasedServer = (hostname: string, newName: string): void =
|
||||
for (const byPid of server.runningScriptMap.values()) {
|
||||
for (const r of byPid.values()) {
|
||||
r.server = newName;
|
||||
// Lookup can't fail.
|
||||
const ws = workerScripts.get(r.pid) as WorkerScript;
|
||||
const ws = workerScripts.get(r.pid);
|
||||
if (!ws) continue;
|
||||
ws.hostname = newName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user