mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 18:22:58 +02:00
SCRIPTS: Script modules are reused when they are imported (#461)
Also corrects some compile race conditions.
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
import { HacknetNodeConstants } from "./data/Constants";
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../utils/JSONReviver";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { ObjectValidator, minMax } from "../utils/Validator";
|
||||
|
||||
export class HacknetNode implements IHacknetNode {
|
||||
@@ -131,4 +131,4 @@ export class HacknetNode implements IHacknetNode {
|
||||
}
|
||||
}
|
||||
|
||||
Reviver.constructors.HacknetNode = HacknetNode;
|
||||
constructorsForReviver.HacknetNode = HacknetNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
|
||||
import { createRandomIp } from "../utils/IPAddress";
|
||||
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../utils/JSONReviver";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { Player } from "@player";
|
||||
|
||||
interface IConstructorParams {
|
||||
@@ -153,4 +153,4 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
|
||||
}
|
||||
}
|
||||
|
||||
Reviver.constructors.HacknetServer = HacknetServer;
|
||||
constructorsForReviver.HacknetServer = HacknetServer;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { HashUpgrades } from "./HashUpgrades";
|
||||
import { HashUpgrade } from "./HashUpgrade";
|
||||
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../utils/JSONReviver";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
|
||||
export class HashManager {
|
||||
// Max number of hashes this can hold. Equal to the sum of capacities of
|
||||
@@ -156,4 +156,4 @@ export class HashManager {
|
||||
}
|
||||
}
|
||||
|
||||
Reviver.constructors.HashManager = HashManager;
|
||||
constructorsForReviver.HashManager = HashManager;
|
||||
|
||||
Reference in New Issue
Block a user