mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 02:32:55 +02:00
BUGFIX: fix relative imports (#1305)
Relative paths work in imports, at last.
This commit is contained in:
@@ -73,7 +73,13 @@ export class Script implements ContentFile {
|
||||
* @param {Script[]} otherScripts - Other scripts on the server. Used to process imports
|
||||
*/
|
||||
updateRamUsage(otherScripts: Map<ScriptFilePath, Script>): void {
|
||||
const ramCalc = calculateRamUsage(this.code, otherScripts, this.filename.endsWith(".script"));
|
||||
const ramCalc = calculateRamUsage(
|
||||
this.code,
|
||||
this.filename,
|
||||
otherScripts,
|
||||
this.server,
|
||||
this.filename.endsWith(".script"),
|
||||
);
|
||||
if (ramCalc.cost && ramCalc.cost >= RamCostConstants.Base) {
|
||||
this.ramUsage = roundToTwo(ramCalc.cost);
|
||||
this.ramUsageEntries = ramCalc.entries as RamUsageEntry[];
|
||||
|
||||
Reference in New Issue
Block a user