mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
Commit1
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Player } from "../Player";
|
||||
import { IMap } from "../types";
|
||||
|
||||
import { NS as INS } from "../ScriptEditor/NetscriptDefinitions";
|
||||
import { INetscriptExtra } from "../NetscriptFunctions/Extra";
|
||||
@@ -15,7 +14,7 @@ type RamCostTree<API> = {
|
||||
// TODO remember to update RamCalculations.js and WorkerScript.js
|
||||
|
||||
// RAM costs for Netscript functions
|
||||
export const RamCostConstants: IMap<number> = {
|
||||
export const RamCostConstants: Record<string, number> = {
|
||||
ScriptBaseRamCost: 1.6,
|
||||
ScriptDomRamCost: 25,
|
||||
ScriptCorporationRamCost: 1024 - 1.6,
|
||||
@@ -604,7 +603,7 @@ const SourceRamCosts = {
|
||||
},
|
||||
};
|
||||
|
||||
export const RamCosts: IMap<any> = SourceRamCosts;
|
||||
export const RamCosts: Record<string, any> = SourceRamCosts;
|
||||
|
||||
// This line in particular is there so typescript typechecks that we are not missing any static ram cost.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
||||
@@ -13,7 +13,6 @@ import { RunningScript } from "../Script/RunningScript";
|
||||
import { Script } from "../Script/Script";
|
||||
import { GetServer } from "../Server/AllServers";
|
||||
import { BaseServer } from "../Server/BaseServer";
|
||||
import { IMap } from "../types";
|
||||
import { NS } from "../ScriptEditor/NetscriptDefinitions";
|
||||
import { ScriptDeath } from "./ScriptDeath";
|
||||
import { ScriptArg } from "./ScriptArg";
|
||||
@@ -43,14 +42,14 @@ export class WorkerScript {
|
||||
/**
|
||||
* Stores names of all functions that have logging disabled
|
||||
*/
|
||||
disableLogs: IMap<boolean> = {};
|
||||
disableLogs: Record<string, boolean> = {};
|
||||
|
||||
/**
|
||||
* Used for dynamic RAM calculation. Stores names of all functions that have
|
||||
* already been checked by this script.
|
||||
* TODO: Could probably just combine this with loadedFns?
|
||||
*/
|
||||
dynamicLoadedFns: IMap<boolean> = {};
|
||||
dynamicLoadedFns: Record<string, boolean> = {};
|
||||
|
||||
/**
|
||||
* Tracks dynamic RAM usage
|
||||
@@ -71,7 +70,7 @@ export class WorkerScript {
|
||||
* Used for static RAM calculation. Stores names of all functions that have
|
||||
* already been checked by this script
|
||||
*/
|
||||
loadedFns: IMap<boolean> = {};
|
||||
loadedFns: Record<string, boolean> = {};
|
||||
|
||||
/**
|
||||
* Filename of script
|
||||
|
||||
Reference in New Issue
Block a user