From f555c4567b33541f49dc4f3bd5c4c381f54d2d40 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 13 Apr 2022 01:35:35 -0400 Subject: [PATCH] update doc --- dist/bitburner.d.ts | 151 +++++++++++++++--- doc/source/conf.py | 2 +- electron/package-lock.json | 4 +- electron/package.json | 2 +- ...bitburner.activefragment.highestcharge.md} | 6 +- markdown/bitburner.activefragment.md | 2 +- markdown/bitburner.bitnodemultipliers.md | 2 +- ...tnodemultipliers.purchasedserversoftcap.md | 6 +- .../bitburner.characterinfo.agilityexp.md | 13 ++ .../bitburner.characterinfo.charismaexp.md | 13 ++ markdown/bitburner.characterinfo.company.md | 13 -- .../bitburner.characterinfo.defenseexp.md | 13 ++ .../bitburner.characterinfo.dexterityexp.md | 13 ++ .../bitburner.characterinfo.hackingexp.md | 13 ++ markdown/bitburner.characterinfo.jobs.md | 13 ++ ...d => bitburner.characterinfo.jobtitles.md} | 6 +- markdown/bitburner.characterinfo.md | 10 +- .../bitburner.characterinfo.strengthexp.md | 13 ++ markdown/bitburner.charactermult.charisma.md | 13 ++ .../bitburner.charactermult.charismaexp.md | 13 ++ markdown/bitburner.charactermult.md | 2 + markdown/bitburner.formulas.md | 1 + markdown/bitburner.formulas.reputation.md | 13 ++ markdown/bitburner.hacknet.hashcost.md | 4 +- markdown/bitburner.material.cmp.md | 13 ++ markdown/bitburner.material.dmd.md | 13 ++ markdown/bitburner.material.md | 2 + markdown/bitburner.md | 4 + markdown/bitburner.ns.asleep.md | 4 +- markdown/bitburner.ns.getrecentscripts.md | 35 ++++ markdown/bitburner.ns.getrunningscript.md | 4 +- markdown/bitburner.ns.hackanalyzesecurity.md | 3 +- markdown/bitburner.ns.md | 7 +- markdown/bitburner.ns.singularity.md | 13 ++ markdown/bitburner.ns.sleep.md | 4 +- markdown/bitburner.ns.toast.md | 4 +- markdown/bitburner.nsenums.md | 19 +++ markdown/bitburner.nsenums.toast.md | 11 ++ markdown/bitburner.office.employeejobs.md | 13 ++ markdown/bitburner.office.employeeprod.md | 2 +- markdown/bitburner.office.md | 3 +- markdown/bitburner.product.cmp.md | 4 +- markdown/bitburner.product.dmd.md | 4 +- markdown/bitburner.product.md | 6 +- markdown/bitburner.product.properties.md | 13 ++ markdown/bitburner.product.rat.md | 13 ++ markdown/bitburner.recentscript.md | 20 +++ .../bitburner.recentscript.timeofdeath.md | 13 ++ ....reputationformulas.calculatefavortorep.md | 26 +++ ....reputationformulas.calculatereptofavor.md | 26 +++ markdown/bitburner.reputationformulas.md | 21 +++ markdown/bitburner.runningscript.args.md | 2 + markdown/bitburner.runningscript.filename.md | 2 + markdown/bitburner.runningscript.logs.md | 2 + markdown/bitburner.runningscript.md | 28 ++-- ...itburner.runningscript.offlineexpgained.md | 2 + ...itburner.runningscript.offlinemoneymade.md | 2 + ...burner.runningscript.offlinerunningtime.md | 2 +- ...bitburner.runningscript.onlineexpgained.md | 2 + ...bitburner.runningscript.onlinemoneymade.md | 2 + ...tburner.runningscript.onlinerunningtime.md | 2 +- markdown/bitburner.runningscript.pid.md | 2 + markdown/bitburner.runningscript.ramusage.md | 2 + markdown/bitburner.runningscript.server.md | 2 + markdown/bitburner.runningscript.threads.md | 2 + markdown/bitburner.singularity.hospitalize.md | 6 +- markdown/bitburner.sleeve.settofactionwork.md | 6 +- markdown/bitburner.toastvariant.md | 22 +++ src/Constants.ts | 2 +- src/ScriptEditor/NetscriptDefinitions.d.ts | 6 +- 70 files changed, 637 insertions(+), 100 deletions(-) rename markdown/{bitburner.activefragment.avgcharge.md => bitburner.activefragment.highestcharge.md} (51%) create mode 100644 markdown/bitburner.characterinfo.agilityexp.md create mode 100644 markdown/bitburner.characterinfo.charismaexp.md delete mode 100644 markdown/bitburner.characterinfo.company.md create mode 100644 markdown/bitburner.characterinfo.defenseexp.md create mode 100644 markdown/bitburner.characterinfo.dexterityexp.md create mode 100644 markdown/bitburner.characterinfo.hackingexp.md create mode 100644 markdown/bitburner.characterinfo.jobs.md rename markdown/{bitburner.characterinfo.jobtitle.md => bitburner.characterinfo.jobtitles.md} (63%) create mode 100644 markdown/bitburner.characterinfo.strengthexp.md create mode 100644 markdown/bitburner.charactermult.charisma.md create mode 100644 markdown/bitburner.charactermult.charismaexp.md create mode 100644 markdown/bitburner.formulas.reputation.md create mode 100644 markdown/bitburner.material.cmp.md create mode 100644 markdown/bitburner.material.dmd.md create mode 100644 markdown/bitburner.ns.getrecentscripts.md create mode 100644 markdown/bitburner.ns.singularity.md create mode 100644 markdown/bitburner.nsenums.md create mode 100644 markdown/bitburner.nsenums.toast.md create mode 100644 markdown/bitburner.office.employeejobs.md create mode 100644 markdown/bitburner.product.properties.md create mode 100644 markdown/bitburner.product.rat.md create mode 100644 markdown/bitburner.recentscript.md create mode 100644 markdown/bitburner.recentscript.timeofdeath.md create mode 100644 markdown/bitburner.reputationformulas.calculatefavortorep.md create mode 100644 markdown/bitburner.reputationformulas.calculatereptofavor.md create mode 100644 markdown/bitburner.reputationformulas.md create mode 100644 markdown/bitburner.toastvariant.md diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 7538ac845..defda2c10 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -3,7 +3,7 @@ */ export declare interface ActiveFragment { id: number; - avgCharge: number; + highestCharge: number; numCharge: number; rotation: number; x: number; @@ -182,7 +182,7 @@ export declare interface BitNodeMultipliers { /** Influences the maximum allowed RAM for a purchased server */ PurchasedServerMaxRam: number; /** Influences cost of any purchased server at or above 128GB */ - PurchasedServerSoftCap: number; + PurchasedServerSoftcap: number; /** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */ RepToDonateToFaction: number; /** Influences how much the money on a server can be reduced when a script performs a hack against it. */ @@ -709,10 +709,10 @@ export declare interface CharacterInfo { factions: string[]; /** Current health points */ hp: number; - /** Array of all companies at which you have jobs */ - company: string[]; + /** Array of all jobs */ + jobs: string[]; /** Array of job positions for all companies you are employed at. Same order as 'jobs' */ - jobTitle: string[]; + jobTitles: string[]; /** Maximum health points */ maxHp: number; /** Boolean indicating whether or not you have a tor router */ @@ -737,6 +737,18 @@ export declare interface CharacterInfo { workRepGain: number; /** Money earned so far from work, if applicable */ workMoneyGain: number; + /** total hacking exp */ + hackingExp: number; + /** total strength exp */ + strengthExp: number; + /** total defense exp */ + defenseExp: number; + /** total dexterity exp */ + dexterityExp: number; + /** total agility exp */ + agilityExp: number; + /** total charisma exp */ + charismaExp: number; } /** @@ -747,6 +759,10 @@ export declare interface CharacterMult { agility: number; /** Agility exp */ agilityExp: number; + /** Charisma stat */ + charisma: number; + /** Charisma exp */ + charismaExp: number; /** Company reputation */ companyRep: number; /** Money earned from crimes */ @@ -1177,6 +1193,8 @@ export declare type FilenameOrPID = number | string; * @public */ export declare interface Formulas { + /** Reputation formulas */ + reputation: ReputationFormulas; /** Skills formulas */ skills: SkillsFormulas; /** Hacking formulas */ @@ -2442,6 +2460,10 @@ export declare interface Material { qty: number; /** Quality of the material */ qlt: number; + /** Demand for the material, only present if "Market Research - Demand" unlocked */ + dmd: number | undefined; + /** Competition for the material, only present if "Market Research - Competition" unlocked */ + cmp: number | undefined; /** Amount of material produced */ prod: number; /** Amount of material sold */ @@ -2574,7 +2596,7 @@ export declare interface NodeStats { * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs} *
*/ -export declare interface NS extends Singularity { +export declare interface NS { /** * Namespace for hacknet functions. * @remarks RAM cost: 4 GB @@ -2635,6 +2657,12 @@ export declare interface NS extends Singularity { */ readonly ui: UserInterface; + /** + * Namespace for singularity functions. + * RAM cost: 0 GB + */ + readonly singularity: Singularity; + /** * Namespace for grafting functions. * @remarks @@ -2913,7 +2941,7 @@ export declare interface NS extends Singularity { * ``` * @returns */ - sleep(millis: number): Promise; + sleep(millis: number): Promise; /** * Suspends the script for n milliseconds. Doesn't block with concurrent calls. @@ -2923,7 +2951,7 @@ export declare interface NS extends Singularity { * @param millis - Number of milliseconds to sleep. * @returns */ - asleep(millis: number): Promise; + asleep(millis: number): Promise; /** * Prints one or move values or variables to the script’s logs. @@ -3052,6 +3080,27 @@ export declare interface NS extends Singularity { */ getScriptLogs(fn?: string, host?: string, ...args: any[]): string[]; + /** + * Get an array of recently killed scripts across all servers. + * @remarks + * RAM cost: 0.2 GB + * + * The most recently killed script is the first element in the array. + * Note that there is a maximum number of recently killed scripts which are tracked. + * This is configurable in the game's options as `Recently killed scripts size`. + * + * @example + * ```ts + * let recentScripts = ns.getRecentScripts(); + * let mostRecent = recentScripts.shift() + * if (mostRecent) + * ns.tprint(mostRecent.logs.join('\n')) + * ``` + * + * @returns Array with information about previously killed scripts. + */ + getRecentScripts(): RecentScript[]; + /** * Open the tail window of a script. * @remarks @@ -3942,7 +3991,7 @@ export declare interface NS extends Singularity { * @param args - Arguments to identify the script * @returns The info about the running script if found, and null otherwise. */ - getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript; + getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript | null; /** * Get cost of purchasing a server. @@ -4454,7 +4503,7 @@ export declare interface NS extends Singularity { * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success. * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000 */ - toast(msg: any, variant?: string, duration?: number | null): void; + toast(msg: any, variant?: "success" | "info" | "warning" | "error", duration?: number | null): void; /** * Download a file from the internet. @@ -4649,6 +4698,13 @@ export declare interface NS extends Singularity { * RAM cost: 0.2 GB */ getSharePower(): number; + + // enum: NSEnums; +} + +/** @public */ +export declare interface NSEnums { + toast: ToastVariant; } /** @@ -4950,10 +5006,14 @@ export declare interface ProcessInfo { export declare interface Product { /** Name of the product */ name: string; - /** Demand for the product */ - dmd: number; - /** Competition for the product */ - cmp: number; + /** Demand for the product, only present if "Market Research - Demand" unlocked */ + dmd: number | undefined; + /** Competition for the product, only present if "Market Research - Competition" unlocked */ + cmp: number | undefined; + /** Product Rating */ + rat: number; + /** Product Properties. The data is \{qlt, per, dur, rel, aes, fea\} */ + properties: { [key: string]: number }; /** Production cost */ pCost: number; /** Sell cost, can be "MP+5" */ @@ -4966,24 +5026,66 @@ export declare interface Product { developmentProgress: number; } +/** + * @public + */ +export declare interface RecentScript extends RunningScript { + /** Timestamp of when the script was killed */ + timeOfDeath: Date; +} + +/** + * Reputation formulas + * @public + */ +export declare interface ReputationFormulas { + /** + * Calculate the total required amount of faction reputation to reach a target favor. + * @param favor - target faction favor. + * @returns The calculated faction reputation required. + */ + calculateFavorToRep(favor: number): number; + /** + * Calculate the resulting faction favor of a total amount of reputation. + * (Faction favor is gained whenever you install an Augmentation.) + * @param rep - amount of reputation. + * @returns The calculated faction favor. + */ + calculateRepToFavor(rep: number): number; +} + /** * @public */ export declare interface RunningScript { + /** Arguments the script was called with */ args: string[]; + /** Filename of the script */ filename: string; + /** + * Script logs as an array. The newest log entries are at the bottom. + * Timestamps, if enabled, are placed inside `[brackets]` at the start of each line. + **/ logs: string[]; + /** Total amount of hacking experience earned from this script when offline */ offlineExpGained: number; + /** Total amount of money made by this script when offline */ offlineMoneyMade: number; - /** Offline running time of the script, in seconds **/ + /** Number of seconds that the script has been running offline */ offlineRunningTime: number; + /** Total amount of hacking experience earned from this script when online */ onlineExpGained: number; + /** Total amount of money made by this script when online */ onlineMoneyMade: number; - /** Online running time of the script, in seconds **/ + /** Number of seconds that this script has been running online */ onlineRunningTime: number; + /** Process ID. Must be an integer */ pid: number; + /** How much RAM this script uses for ONE thread */ ramUsage: number; + /** Hostname of the server on which this script runs */ server: string; + /** Number of threads that this script runs with */ threads: number; } @@ -5753,11 +5855,8 @@ export declare interface Singularity { * Hospitalize the player. * @remarks * RAM cost: 0.25 GB * 16/4/1 - * - * - * @returns The cost of the hospitalization. */ - hospitalize(): number; + hospitalize(): void; /** * Soft reset the game. @@ -6031,9 +6130,9 @@ export declare interface Sleeve { * @param sleeveNumber - Index of the sleeve to work for the faction. * @param factionName - Name of the faction to work for. * @param factionWorkType - Name of the action to perform for this faction. - * @returns True if the sleeve started working on this faction, false otherwise. + * @returns True if the sleeve started working on this faction, false otherwise, can also throw on errors */ - setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean; + setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean | undefined; /** * Set a sleeve to work for a company. @@ -6732,6 +6831,14 @@ export declare interface TIX { purchaseTixApi(): boolean; } +/** @public */ +export declare enum ToastVariant { + SUCCESS = "success", + WARNING = "warning", + ERROR = "error", + INFO = "info", +} + /** * User Interface API. * @public diff --git a/doc/source/conf.py b/doc/source/conf.py index eb814598c..8c629c881 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -66,7 +66,7 @@ documentation_title = '{0} Documentation'.format(project) # The short X.Y version. version = '1.6' # The full version, including alpha/beta/rc tags. -release = '1.6.3' +release = '1.6.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/electron/package-lock.json b/electron/package-lock.json index b512a9036..33efbf800 100644 --- a/electron/package-lock.json +++ b/electron/package-lock.json @@ -1,12 +1,12 @@ { "name": "bitburner", - "version": "1.0.0", + "version": "1.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bitburner", - "version": "1.0.0", + "version": "1.6.0", "dependencies": { "electron-config": "^2.0.0", "electron-log": "^4.4.4", diff --git a/electron/package.json b/electron/package.json index ddf366f92..8e6adf40b 100755 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "bitburner", - "version": "1.0.0", + "version": "1.6.0", "description": "A cyberpunk-themed programming incremental game", "main": "main.js", "author": "Daniel Xie & Olivier Gagnon", diff --git a/markdown/bitburner.activefragment.avgcharge.md b/markdown/bitburner.activefragment.highestcharge.md similarity index 51% rename from markdown/bitburner.activefragment.avgcharge.md rename to markdown/bitburner.activefragment.highestcharge.md index e0c70aeb4..d96c88926 100644 --- a/markdown/bitburner.activefragment.avgcharge.md +++ b/markdown/bitburner.activefragment.highestcharge.md @@ -1,11 +1,11 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [ActiveFragment](./bitburner.activefragment.md) > [avgCharge](./bitburner.activefragment.avgcharge.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [ActiveFragment](./bitburner.activefragment.md) > [highestCharge](./bitburner.activefragment.highestcharge.md) -## ActiveFragment.avgCharge property +## ActiveFragment.highestCharge property Signature: ```typescript -avgCharge: number; +highestCharge: number; ``` diff --git a/markdown/bitburner.activefragment.md b/markdown/bitburner.activefragment.md index 3bfe9f05b..bce58a63e 100644 --- a/markdown/bitburner.activefragment.md +++ b/markdown/bitburner.activefragment.md @@ -15,7 +15,7 @@ export interface ActiveFragment | Property | Type | Description | | --- | --- | --- | -| [avgCharge](./bitburner.activefragment.avgcharge.md) | number | | +| [highestCharge](./bitburner.activefragment.highestcharge.md) | number | | | [id](./bitburner.activefragment.id.md) | number | | | [numCharge](./bitburner.activefragment.numcharge.md) | number | | | [rotation](./bitburner.activefragment.rotation.md) | number | | diff --git a/markdown/bitburner.bitnodemultipliers.md b/markdown/bitburner.bitnodemultipliers.md index f5ad7ee9f..f87a7aa44 100644 --- a/markdown/bitburner.bitnodemultipliers.md +++ b/markdown/bitburner.bitnodemultipliers.md @@ -49,7 +49,7 @@ export interface BitNodeMultipliers | [PurchasedServerCost](./bitburner.bitnodemultipliers.purchasedservercost.md) | number | Influence how much it costs to purchase a server | | [PurchasedServerLimit](./bitburner.bitnodemultipliers.purchasedserverlimit.md) | number | Influences the maximum number of purchased servers you can have | | [PurchasedServerMaxRam](./bitburner.bitnodemultipliers.purchasedservermaxram.md) | number | Influences the maximum allowed RAM for a purchased server | -| [PurchasedServerSoftCap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) | number | Influences cost of any purchased server at or above 128GB | +| [PurchasedServerSoftcap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) | number | Influences cost of any purchased server at or above 128GB | | [RepToDonateToFaction](./bitburner.bitnodemultipliers.reptodonatetofaction.md) | number | Influences the minimum favor the player must have with a faction before they can donate to gain rep. | | [ScriptHackMoney](./bitburner.bitnodemultipliers.scripthackmoney.md) | number | Influences how much the money on a server can be reduced when a script performs a hack against it. | | [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | number | Influences how much of the money stolen by a scripted hack will be added to the player's money. | diff --git a/markdown/bitburner.bitnodemultipliers.purchasedserversoftcap.md b/markdown/bitburner.bitnodemultipliers.purchasedserversoftcap.md index 1e1846605..5f8e251e3 100644 --- a/markdown/bitburner.bitnodemultipliers.purchasedserversoftcap.md +++ b/markdown/bitburner.bitnodemultipliers.purchasedserversoftcap.md @@ -1,13 +1,13 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) > [PurchasedServerSoftCap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) > [PurchasedServerSoftcap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) -## BitNodeMultipliers.PurchasedServerSoftCap property +## BitNodeMultipliers.PurchasedServerSoftcap property Influences cost of any purchased server at or above 128GB Signature: ```typescript -PurchasedServerSoftCap: number; +PurchasedServerSoftcap: number; ``` diff --git a/markdown/bitburner.characterinfo.agilityexp.md b/markdown/bitburner.characterinfo.agilityexp.md new file mode 100644 index 000000000..0969553dc --- /dev/null +++ b/markdown/bitburner.characterinfo.agilityexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [agilityExp](./bitburner.characterinfo.agilityexp.md) + +## CharacterInfo.agilityExp property + +total agility exp + +Signature: + +```typescript +agilityExp: number; +``` diff --git a/markdown/bitburner.characterinfo.charismaexp.md b/markdown/bitburner.characterinfo.charismaexp.md new file mode 100644 index 000000000..f20c59149 --- /dev/null +++ b/markdown/bitburner.characterinfo.charismaexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [charismaExp](./bitburner.characterinfo.charismaexp.md) + +## CharacterInfo.charismaExp property + +total charisma exp + +Signature: + +```typescript +charismaExp: number; +``` diff --git a/markdown/bitburner.characterinfo.company.md b/markdown/bitburner.characterinfo.company.md deleted file mode 100644 index 6284c261a..000000000 --- a/markdown/bitburner.characterinfo.company.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [company](./bitburner.characterinfo.company.md) - -## CharacterInfo.company property - -Array of all companies at which you have jobs - -Signature: - -```typescript -company: string[]; -``` diff --git a/markdown/bitburner.characterinfo.defenseexp.md b/markdown/bitburner.characterinfo.defenseexp.md new file mode 100644 index 000000000..c56fa8aea --- /dev/null +++ b/markdown/bitburner.characterinfo.defenseexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [defenseExp](./bitburner.characterinfo.defenseexp.md) + +## CharacterInfo.defenseExp property + +total defense exp + +Signature: + +```typescript +defenseExp: number; +``` diff --git a/markdown/bitburner.characterinfo.dexterityexp.md b/markdown/bitburner.characterinfo.dexterityexp.md new file mode 100644 index 000000000..1930f83af --- /dev/null +++ b/markdown/bitburner.characterinfo.dexterityexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [dexterityExp](./bitburner.characterinfo.dexterityexp.md) + +## CharacterInfo.dexterityExp property + +total dexterity exp + +Signature: + +```typescript +dexterityExp: number; +``` diff --git a/markdown/bitburner.characterinfo.hackingexp.md b/markdown/bitburner.characterinfo.hackingexp.md new file mode 100644 index 000000000..041811c4b --- /dev/null +++ b/markdown/bitburner.characterinfo.hackingexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [hackingExp](./bitburner.characterinfo.hackingexp.md) + +## CharacterInfo.hackingExp property + +total hacking exp + +Signature: + +```typescript +hackingExp: number; +``` diff --git a/markdown/bitburner.characterinfo.jobs.md b/markdown/bitburner.characterinfo.jobs.md new file mode 100644 index 000000000..d96498945 --- /dev/null +++ b/markdown/bitburner.characterinfo.jobs.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [jobs](./bitburner.characterinfo.jobs.md) + +## CharacterInfo.jobs property + +Array of all jobs + +Signature: + +```typescript +jobs: string[]; +``` diff --git a/markdown/bitburner.characterinfo.jobtitle.md b/markdown/bitburner.characterinfo.jobtitles.md similarity index 63% rename from markdown/bitburner.characterinfo.jobtitle.md rename to markdown/bitburner.characterinfo.jobtitles.md index 6b0e52d07..dbc6d935d 100644 --- a/markdown/bitburner.characterinfo.jobtitle.md +++ b/markdown/bitburner.characterinfo.jobtitles.md @@ -1,13 +1,13 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [jobTitle](./bitburner.characterinfo.jobtitle.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [jobTitles](./bitburner.characterinfo.jobtitles.md) -## CharacterInfo.jobTitle property +## CharacterInfo.jobTitles property Array of job positions for all companies you are employed at. Same order as 'jobs' Signature: ```typescript -jobTitle: string[]; +jobTitles: string[]; ``` diff --git a/markdown/bitburner.characterinfo.md b/markdown/bitburner.characterinfo.md index 3c25a6250..340663fc6 100644 --- a/markdown/bitburner.characterinfo.md +++ b/markdown/bitburner.characterinfo.md @@ -15,14 +15,20 @@ export interface CharacterInfo | Property | Type | Description | | --- | --- | --- | +| [agilityExp](./bitburner.characterinfo.agilityexp.md) | number | total agility exp | | [bitnode](./bitburner.characterinfo.bitnode.md) | number | Current BitNode number | +| [charismaExp](./bitburner.characterinfo.charismaexp.md) | number | total charisma exp | | [city](./bitburner.characterinfo.city.md) | string | Name of city you are currently in | -| [company](./bitburner.characterinfo.company.md) | string\[\] | Array of all companies at which you have jobs | +| [defenseExp](./bitburner.characterinfo.defenseexp.md) | number | total defense exp | +| [dexterityExp](./bitburner.characterinfo.dexterityexp.md) | number | total dexterity exp | | [factions](./bitburner.characterinfo.factions.md) | string\[\] | Array of factions you are currently a member of | +| [hackingExp](./bitburner.characterinfo.hackingexp.md) | number | total hacking exp | | [hp](./bitburner.characterinfo.hp.md) | number | Current health points | -| [jobTitle](./bitburner.characterinfo.jobtitle.md) | string\[\] | Array of job positions for all companies you are employed at. Same order as 'jobs' | +| [jobs](./bitburner.characterinfo.jobs.md) | string\[\] | Array of all jobs | +| [jobTitles](./bitburner.characterinfo.jobtitles.md) | string\[\] | Array of job positions for all companies you are employed at. Same order as 'jobs' | | [maxHp](./bitburner.characterinfo.maxhp.md) | number | Maximum health points | | [mult](./bitburner.characterinfo.mult.md) | [CharacterMult](./bitburner.charactermult.md) | Object with many of the player's multipliers from Augmentations/Source Files | +| [strengthExp](./bitburner.characterinfo.strengthexp.md) | number | total strength exp | | [timeWorked](./bitburner.characterinfo.timeworked.md) | number | Timed worked in ms | | [tor](./bitburner.characterinfo.tor.md) | boolean | Boolean indicating whether or not you have a tor router | | [workAgiExpGain](./bitburner.characterinfo.workagiexpgain.md) | number | Agi experience earned so far from work | diff --git a/markdown/bitburner.characterinfo.strengthexp.md b/markdown/bitburner.characterinfo.strengthexp.md new file mode 100644 index 000000000..b2233accb --- /dev/null +++ b/markdown/bitburner.characterinfo.strengthexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterInfo](./bitburner.characterinfo.md) > [strengthExp](./bitburner.characterinfo.strengthexp.md) + +## CharacterInfo.strengthExp property + +total strength exp + +Signature: + +```typescript +strengthExp: number; +``` diff --git a/markdown/bitburner.charactermult.charisma.md b/markdown/bitburner.charactermult.charisma.md new file mode 100644 index 000000000..9a96106df --- /dev/null +++ b/markdown/bitburner.charactermult.charisma.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [charisma](./bitburner.charactermult.charisma.md) + +## CharacterMult.charisma property + +Charisma stat + +Signature: + +```typescript +charisma: number; +``` diff --git a/markdown/bitburner.charactermult.charismaexp.md b/markdown/bitburner.charactermult.charismaexp.md new file mode 100644 index 000000000..9c4ecea68 --- /dev/null +++ b/markdown/bitburner.charactermult.charismaexp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [charismaExp](./bitburner.charactermult.charismaexp.md) + +## CharacterMult.charismaExp property + +Charisma exp + +Signature: + +```typescript +charismaExp: number; +``` diff --git a/markdown/bitburner.charactermult.md b/markdown/bitburner.charactermult.md index 4e0e98562..92018ee12 100644 --- a/markdown/bitburner.charactermult.md +++ b/markdown/bitburner.charactermult.md @@ -17,6 +17,8 @@ export interface CharacterMult | --- | --- | --- | | [agility](./bitburner.charactermult.agility.md) | number | Agility stat | | [agilityExp](./bitburner.charactermult.agilityexp.md) | number | Agility exp | +| [charisma](./bitburner.charactermult.charisma.md) | number | Charisma stat | +| [charismaExp](./bitburner.charactermult.charismaexp.md) | number | Charisma exp | | [companyRep](./bitburner.charactermult.companyrep.md) | number | Company reputation | | [crimeMoney](./bitburner.charactermult.crimemoney.md) | number | Money earned from crimes | | [crimeSuccess](./bitburner.charactermult.crimesuccess.md) | number | Crime success chance | diff --git a/markdown/bitburner.formulas.md b/markdown/bitburner.formulas.md index 5b258e02a..04231ac35 100644 --- a/markdown/bitburner.formulas.md +++ b/markdown/bitburner.formulas.md @@ -24,5 +24,6 @@ You need Formulas.exe on your home computer to use this API. | [hacking](./bitburner.formulas.hacking.md) | [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas | | [hacknetNodes](./bitburner.formulas.hacknetnodes.md) | [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | Hacknet Nodes formulas | | [hacknetServers](./bitburner.formulas.hacknetservers.md) | [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | Hacknet Servers formulas | +| [reputation](./bitburner.formulas.reputation.md) | [ReputationFormulas](./bitburner.reputationformulas.md) | Reputation formulas | | [skills](./bitburner.formulas.skills.md) | [SkillsFormulas](./bitburner.skillsformulas.md) | Skills formulas | diff --git a/markdown/bitburner.formulas.reputation.md b/markdown/bitburner.formulas.reputation.md new file mode 100644 index 000000000..647861041 --- /dev/null +++ b/markdown/bitburner.formulas.reputation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Formulas](./bitburner.formulas.md) > [reputation](./bitburner.formulas.reputation.md) + +## Formulas.reputation property + +Reputation formulas + +Signature: + +```typescript +reputation: ReputationFormulas; +``` diff --git a/markdown/bitburner.hacknet.hashcost.md b/markdown/bitburner.hacknet.hashcost.md index 4f0f8eb6e..1a4ecacd1 100644 --- a/markdown/bitburner.hacknet.hashcost.md +++ b/markdown/bitburner.hacknet.hashcost.md @@ -39,7 +39,7 @@ Returns the number of hashes required for the specified upgrade. The name of the // NS1: var upgradeName = "Sell for Corporation Funds"; if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) { - hacknet.spendHashes(upgName); + hacknet.spendHashes(upgradeName); } ``` @@ -50,7 +50,7 @@ if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) { // NS2: const upgradeName = "Sell for Corporation Funds"; if (ns.hacknet.numHashes() > ns.hacknet.hashCost(upgradeName)) { - ns.hacknet.spendHashes(upgName); + ns.hacknet.spendHashes(upgradeName); } ``` diff --git a/markdown/bitburner.material.cmp.md b/markdown/bitburner.material.cmp.md new file mode 100644 index 000000000..6abd37461 --- /dev/null +++ b/markdown/bitburner.material.cmp.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Material](./bitburner.material.md) > [cmp](./bitburner.material.cmp.md) + +## Material.cmp property + +Competition for the material, only present if "Market Research - Competition" unlocked + +Signature: + +```typescript +cmp: number | undefined; +``` diff --git a/markdown/bitburner.material.dmd.md b/markdown/bitburner.material.dmd.md new file mode 100644 index 000000000..e68f29afd --- /dev/null +++ b/markdown/bitburner.material.dmd.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Material](./bitburner.material.md) > [dmd](./bitburner.material.dmd.md) + +## Material.dmd property + +Demand for the material, only present if "Market Research - Demand" unlocked + +Signature: + +```typescript +dmd: number | undefined; +``` diff --git a/markdown/bitburner.material.md b/markdown/bitburner.material.md index a850ce0d9..140c272c1 100644 --- a/markdown/bitburner.material.md +++ b/markdown/bitburner.material.md @@ -16,6 +16,8 @@ interface Material | Property | Type | Description | | --- | --- | --- | +| [cmp](./bitburner.material.cmp.md) | number \| undefined | Competition for the material, only present if "Market Research - Competition" unlocked | +| [dmd](./bitburner.material.dmd.md) | number \| undefined | Demand for the material, only present if "Market Research - Demand" unlocked | | [name](./bitburner.material.name.md) | string | Name of the material | | [prod](./bitburner.material.prod.md) | number | Amount of material produced | | [qlt](./bitburner.material.qlt.md) | number | Quality of the material | diff --git a/markdown/bitburner.md b/markdown/bitburner.md index 5a3a68c5f..48bc56bbe 100644 --- a/markdown/bitburner.md +++ b/markdown/bitburner.md @@ -10,6 +10,7 @@ | --- | --- | | [OrderTypes](./bitburner.ordertypes.md) | | | [PositionTypes](./bitburner.positiontypes.md) | | +| [ToastVariant](./bitburner.toastvariant.md) | | ## Interfaces @@ -59,12 +60,15 @@ | [NetscriptPort](./bitburner.netscriptport.md) | Object representing a port. A port is a serialized queue. | | [NodeStats](./bitburner.nodestats.md) | Object representing all the values related to a hacknet node. | | [NS](./bitburner.ns.md) | Collection of all functions passed to scripts | +| [NSEnums](./bitburner.nsenums.md) | | | [Office](./bitburner.office.md) | Office for a division in a city. | | [OfficeAPI](./bitburner.officeapi.md) | Corporation Office API | | [Player](./bitburner.player.md) | | | [PlayerSkills](./bitburner.playerskills.md) | Short summary of the players skills. | | [ProcessInfo](./bitburner.processinfo.md) | A single process on a server. | | [Product](./bitburner.product.md) | Product in a warehouse | +| [RecentScript](./bitburner.recentscript.md) | | +| [ReputationFormulas](./bitburner.reputationformulas.md) | Reputation formulas | | [RunningScript](./bitburner.runningscript.md) | | | [Server](./bitburner.server.md) | A single server. | | [Singularity](./bitburner.singularity.md) | Singularity API | diff --git a/markdown/bitburner.ns.asleep.md b/markdown/bitburner.ns.asleep.md index 11c4a98de..f6a74fbf7 100644 --- a/markdown/bitburner.ns.asleep.md +++ b/markdown/bitburner.ns.asleep.md @@ -9,7 +9,7 @@ Suspends the script for n milliseconds. Doesn't block with concurrent calls. Signature: ```typescript -asleep(millis: number): Promise; +asleep(millis: number): Promise; ``` ## Parameters @@ -20,7 +20,7 @@ asleep(millis: number): Promise; Returns: -Promise<void> +Promise<true> ## Remarks diff --git a/markdown/bitburner.ns.getrecentscripts.md b/markdown/bitburner.ns.getrecentscripts.md new file mode 100644 index 000000000..d02afe86c --- /dev/null +++ b/markdown/bitburner.ns.getrecentscripts.md @@ -0,0 +1,35 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getRecentScripts](./bitburner.ns.getrecentscripts.md) + +## NS.getRecentScripts() method + +Get an array of recently killed scripts across all servers. + +Signature: + +```typescript +getRecentScripts(): RecentScript[]; +``` +Returns: + +[RecentScript](./bitburner.recentscript.md)\[\] + +Array with information about previously killed scripts. + +## Remarks + +RAM cost: 0.2 GB + +The most recently killed script is the first element in the array. Note that there is a maximum number of recently killed scripts which are tracked. This is configurable in the game's options as `Recently killed scripts size`. + +## Example + + +```ts +let recentScripts = ns.getRecentScripts(); +let mostRecent = recentScripts.shift() +if (mostRecent) + ns.tprint(mostRecent.logs.join('\n')) +``` + diff --git a/markdown/bitburner.ns.getrunningscript.md b/markdown/bitburner.ns.getrunningscript.md index 64da55ec8..0d90de8c6 100644 --- a/markdown/bitburner.ns.getrunningscript.md +++ b/markdown/bitburner.ns.getrunningscript.md @@ -9,7 +9,7 @@ Get general info about a running script. Signature: ```typescript -getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript; +getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript | null; ``` ## Parameters @@ -22,7 +22,7 @@ getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | Returns: -[RunningScript](./bitburner.runningscript.md) +[RunningScript](./bitburner.runningscript.md) \| null The info about the running script if found, and null otherwise. diff --git a/markdown/bitburner.ns.hackanalyzesecurity.md b/markdown/bitburner.ns.hackanalyzesecurity.md index b74c28f0a..299597e48 100644 --- a/markdown/bitburner.ns.hackanalyzesecurity.md +++ b/markdown/bitburner.ns.hackanalyzesecurity.md @@ -9,7 +9,7 @@ Get the security increase for a number of thread. Signature: ```typescript -hackAnalyzeSecurity(threads: number): number; +hackAnalyzeSecurity(threads: number, hostname?: string): number; ``` ## Parameters @@ -17,6 +17,7 @@ hackAnalyzeSecurity(threads: number): number; | Parameter | Type | Description | | --- | --- | --- | | threads | number | Amount of threads that will be used. | +| hostname | string | Hostname of the target server. The number of threads is limited to the number needed to hack the servers maximum amount of money. | Returns: diff --git a/markdown/bitburner.ns.md b/markdown/bitburner.ns.md index adfdde85b..439ba8532 100644 --- a/markdown/bitburner.ns.md +++ b/markdown/bitburner.ns.md @@ -9,9 +9,8 @@ Collection of all functions passed to scripts Signature: ```typescript -export interface NS extends Singularity +export interface NS ``` -Extends: [Singularity](./bitburner.singularity.md) ## Remarks @@ -49,6 +48,7 @@ export async function main(ns) { | [gang](./bitburner.ns.gang.md) | [Gang](./bitburner.gang.md) | Namespace for gang functions. | | [grafting](./bitburner.ns.grafting.md) | [Grafting](./bitburner.grafting.md) | Namespace for grafting functions. | | [hacknet](./bitburner.ns.hacknet.md) | [Hacknet](./bitburner.hacknet.md) | Namespace for hacknet functions. | +| [singularity](./bitburner.ns.singularity.md) | [Singularity](./bitburner.singularity.md) | Namespace for singularity functions. RAM cost: 0 GB | | [sleeve](./bitburner.ns.sleeve.md) | [Sleeve](./bitburner.sleeve.md) | Namespace for sleeve functions. | | [stanek](./bitburner.ns.stanek.md) | [Stanek](./bitburner.stanek.md) | Namespace for stanek functions. RAM cost: 0 GB | | [stock](./bitburner.ns.stock.md) | [TIX](./bitburner.tix.md) | Namespace for stock functions. | @@ -88,6 +88,7 @@ export async function main(ns) { | [getPurchasedServerLimit()](./bitburner.ns.getpurchasedserverlimit.md) | Returns the maximum number of servers you can purchase. | | [getPurchasedServerMaxRam()](./bitburner.ns.getpurchasedservermaxram.md) | Returns the maximum RAM that a purchased server can have. | | [getPurchasedServers()](./bitburner.ns.getpurchasedservers.md) | Returns an array with the hostnames of all of the servers you have purchased. | +| [getRecentScripts()](./bitburner.ns.getrecentscripts.md) | Get an array of recently killed scripts across all servers. | | [getRunningScript(filename, hostname, args)](./bitburner.ns.getrunningscript.md) | Get general info about a running script. | | [getScriptExpGain()](./bitburner.ns.getscriptexpgain.md) | Get the exp gain of a script. | | [getScriptExpGain(script, host, args)](./bitburner.ns.getscriptexpgain_1.md) | Get the exp gain of a script. | @@ -117,7 +118,7 @@ export async function main(ns) { | [hack(host, opts)](./bitburner.ns.hack.md) | Steal a servers money. | | [hackAnalyze(host)](./bitburner.ns.hackanalyze.md) | Get the part of money stolen with a single thread. | | [hackAnalyzeChance(host)](./bitburner.ns.hackanalyzechance.md) | Get the chance of successfully hacking a server. | -| [hackAnalyzeSecurity(threads)](./bitburner.ns.hackanalyzesecurity.md) | Get the security increase for a number of thread. | +| [hackAnalyzeSecurity(threads, hostname)](./bitburner.ns.hackanalyzesecurity.md) | Get the security increase for a number of thread. | | [hackAnalyzeThreads(host, hackAmount)](./bitburner.ns.hackanalyzethreads.md) | Predict the effect of hack. | | [hasRootAccess(host)](./bitburner.ns.hasrootaccess.md) | Check if your have root access on a server. | | [httpworm(host)](./bitburner.ns.httpworm.md) | Runs HTTPWorm.exe on a server. | diff --git a/markdown/bitburner.ns.singularity.md b/markdown/bitburner.ns.singularity.md new file mode 100644 index 000000000..23f31db42 --- /dev/null +++ b/markdown/bitburner.ns.singularity.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [singularity](./bitburner.ns.singularity.md) + +## NS.singularity property + +Namespace for singularity functions. RAM cost: 0 GB + +Signature: + +```typescript +readonly singularity: Singularity; +``` diff --git a/markdown/bitburner.ns.sleep.md b/markdown/bitburner.ns.sleep.md index 7a2e23446..857992f86 100644 --- a/markdown/bitburner.ns.sleep.md +++ b/markdown/bitburner.ns.sleep.md @@ -9,7 +9,7 @@ Suspends the script for n milliseconds. Signature: ```typescript -sleep(millis: number): Promise; +sleep(millis: number): Promise; ``` ## Parameters @@ -20,7 +20,7 @@ sleep(millis: number): Promise; Returns: -Promise<void> +Promise<true> ## Remarks diff --git a/markdown/bitburner.ns.toast.md b/markdown/bitburner.ns.toast.md index e839c6d54..908131eef 100644 --- a/markdown/bitburner.ns.toast.md +++ b/markdown/bitburner.ns.toast.md @@ -9,7 +9,7 @@ Queue a toast (bottom-right notification). Signature: ```typescript -toast(msg: any, variant?: string, duration?: number | null): void; +toast(msg: any, variant?: "success" | "info" | "warning" | "error", duration?: number | null): void; ``` ## Parameters @@ -17,7 +17,7 @@ toast(msg: any, variant?: string, duration?: number | null): void; | Parameter | Type | Description | | --- | --- | --- | | msg | any | Message in the toast. | -| variant | string | Type of toast, must be one of success, info, warning, error. Defaults to success. | +| variant | "success" \| "info" \| "warning" \| "error" | Type of toast, must be one of success, info, warning, error. Defaults to success. | | duration | number \| null | Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000 | Returns: diff --git a/markdown/bitburner.nsenums.md b/markdown/bitburner.nsenums.md new file mode 100644 index 000000000..eb534afd9 --- /dev/null +++ b/markdown/bitburner.nsenums.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NSEnums](./bitburner.nsenums.md) + +## NSEnums interface + + +Signature: + +```typescript +export interface NSEnums +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [toast](./bitburner.nsenums.toast.md) | [ToastVariant](./bitburner.toastvariant.md) | | + diff --git a/markdown/bitburner.nsenums.toast.md b/markdown/bitburner.nsenums.toast.md new file mode 100644 index 000000000..015ce95c9 --- /dev/null +++ b/markdown/bitburner.nsenums.toast.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NSEnums](./bitburner.nsenums.md) > [toast](./bitburner.nsenums.toast.md) + +## NSEnums.toast property + +Signature: + +```typescript +toast: ToastVariant; +``` diff --git a/markdown/bitburner.office.employeejobs.md b/markdown/bitburner.office.employeejobs.md new file mode 100644 index 000000000..34fe34842 --- /dev/null +++ b/markdown/bitburner.office.employeejobs.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [employeeJobs](./bitburner.office.employeejobs.md) + +## Office.employeeJobs property + +Positions of the employees + +Signature: + +```typescript +employeeJobs: EmployeeJobs; +``` diff --git a/markdown/bitburner.office.employeeprod.md b/markdown/bitburner.office.employeeprod.md index 1702843a7..56c54a74a 100644 --- a/markdown/bitburner.office.employeeprod.md +++ b/markdown/bitburner.office.employeeprod.md @@ -4,7 +4,7 @@ ## Office.employeeProd property -Positions of the employees +Production of the employees Signature: diff --git a/markdown/bitburner.office.md b/markdown/bitburner.office.md index dc3d36a2d..1ca71d0c0 100644 --- a/markdown/bitburner.office.md +++ b/markdown/bitburner.office.md @@ -16,7 +16,8 @@ interface Office | Property | Type | Description | | --- | --- | --- | -| [employeeProd](./bitburner.office.employeeprod.md) | [EmployeeJobs](./bitburner.employeejobs.md) | Positions of the employees | +| [employeeJobs](./bitburner.office.employeejobs.md) | [EmployeeJobs](./bitburner.employeejobs.md) | Positions of the employees | +| [employeeProd](./bitburner.office.employeeprod.md) | [EmployeeJobs](./bitburner.employeejobs.md) | Production of the employees | | [employees](./bitburner.office.employees.md) | string\[\] | Name of all the employees | | [loc](./bitburner.office.loc.md) | string | City of the office | | [maxEne](./bitburner.office.maxene.md) | number | Maximum amount of energy of the employees | diff --git a/markdown/bitburner.product.cmp.md b/markdown/bitburner.product.cmp.md index 9f829211f..88e186780 100644 --- a/markdown/bitburner.product.cmp.md +++ b/markdown/bitburner.product.cmp.md @@ -4,10 +4,10 @@ ## Product.cmp property -Competition for the product +Competition for the product, only present if "Market Research - Competition" unlocked Signature: ```typescript -cmp: number; +cmp: number | undefined; ``` diff --git a/markdown/bitburner.product.dmd.md b/markdown/bitburner.product.dmd.md index 8657f755c..f771d6e4b 100644 --- a/markdown/bitburner.product.dmd.md +++ b/markdown/bitburner.product.dmd.md @@ -4,10 +4,10 @@ ## Product.dmd property -Demand for the product +Demand for the product, only present if "Market Research - Demand" unlocked Signature: ```typescript -dmd: number; +dmd: number | undefined; ``` diff --git a/markdown/bitburner.product.md b/markdown/bitburner.product.md index e0562b85b..be31c122d 100644 --- a/markdown/bitburner.product.md +++ b/markdown/bitburner.product.md @@ -17,10 +17,12 @@ interface Product | Property | Type | Description | | --- | --- | --- | | [cityData](./bitburner.product.citydata.md) | { \[key: string\]: number\[\] } | Data refers to the production, sale, and quantity of the products These values are specific to a city For each city, the data is \[qty, prod, sell\] | -| [cmp](./bitburner.product.cmp.md) | number | Competition for the product | +| [cmp](./bitburner.product.cmp.md) | number \| undefined | Competition for the product, only present if "Market Research - Competition" unlocked | | [developmentProgress](./bitburner.product.developmentprogress.md) | number | Creation progress - A number between 0-100 representing percentage | -| [dmd](./bitburner.product.dmd.md) | number | Demand for the product | +| [dmd](./bitburner.product.dmd.md) | number \| undefined | Demand for the product, only present if "Market Research - Demand" unlocked | | [name](./bitburner.product.name.md) | string | Name of the product | | [pCost](./bitburner.product.pcost.md) | number | Production cost | +| [properties](./bitburner.product.properties.md) | { \[key: string\]: number } | Product Properties. The data is {qlt, per, dur, rel, aes, fea} | +| [rat](./bitburner.product.rat.md) | number | Product Rating | | [sCost](./bitburner.product.scost.md) | string \| number | Sell cost, can be "MP+5" | diff --git a/markdown/bitburner.product.properties.md b/markdown/bitburner.product.properties.md new file mode 100644 index 000000000..bd202079d --- /dev/null +++ b/markdown/bitburner.product.properties.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Product](./bitburner.product.md) > [properties](./bitburner.product.properties.md) + +## Product.properties property + +Product Properties. The data is {qlt, per, dur, rel, aes, fea} + +Signature: + +```typescript +properties: { [key: string]: number }; +``` diff --git a/markdown/bitburner.product.rat.md b/markdown/bitburner.product.rat.md new file mode 100644 index 000000000..d65342786 --- /dev/null +++ b/markdown/bitburner.product.rat.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Product](./bitburner.product.md) > [rat](./bitburner.product.rat.md) + +## Product.rat property + +Product Rating + +Signature: + +```typescript +rat: number; +``` diff --git a/markdown/bitburner.recentscript.md b/markdown/bitburner.recentscript.md new file mode 100644 index 000000000..7be1b56c1 --- /dev/null +++ b/markdown/bitburner.recentscript.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [RecentScript](./bitburner.recentscript.md) + +## RecentScript interface + + +Signature: + +```typescript +export interface RecentScript extends RunningScript +``` +Extends: [RunningScript](./bitburner.runningscript.md) + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [timeOfDeath](./bitburner.recentscript.timeofdeath.md) | Date | Timestamp of when the script was killed | + diff --git a/markdown/bitburner.recentscript.timeofdeath.md b/markdown/bitburner.recentscript.timeofdeath.md new file mode 100644 index 000000000..306281be1 --- /dev/null +++ b/markdown/bitburner.recentscript.timeofdeath.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [RecentScript](./bitburner.recentscript.md) > [timeOfDeath](./bitburner.recentscript.timeofdeath.md) + +## RecentScript.timeOfDeath property + +Timestamp of when the script was killed + +Signature: + +```typescript +timeOfDeath: Date; +``` diff --git a/markdown/bitburner.reputationformulas.calculatefavortorep.md b/markdown/bitburner.reputationformulas.calculatefavortorep.md new file mode 100644 index 000000000..eeb6f6a5b --- /dev/null +++ b/markdown/bitburner.reputationformulas.calculatefavortorep.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ReputationFormulas](./bitburner.reputationformulas.md) > [calculateFavorToRep](./bitburner.reputationformulas.calculatefavortorep.md) + +## ReputationFormulas.calculateFavorToRep() method + +Calculate the total required amount of faction reputation to reach a target favor. + +Signature: + +```typescript +calculateFavorToRep(favor: number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| favor | number | target faction favor. | + +Returns: + +number + +The calculated faction reputation required. + diff --git a/markdown/bitburner.reputationformulas.calculatereptofavor.md b/markdown/bitburner.reputationformulas.calculatereptofavor.md new file mode 100644 index 000000000..98790966c --- /dev/null +++ b/markdown/bitburner.reputationformulas.calculatereptofavor.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ReputationFormulas](./bitburner.reputationformulas.md) > [calculateRepToFavor](./bitburner.reputationformulas.calculatereptofavor.md) + +## ReputationFormulas.calculateRepToFavor() method + +Calculate the resulting faction favor of a total amount of reputation. (Faction favor is gained whenever you install an Augmentation.) + +Signature: + +```typescript +calculateRepToFavor(rep: number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| rep | number | amount of reputation. | + +Returns: + +number + +The calculated faction favor. + diff --git a/markdown/bitburner.reputationformulas.md b/markdown/bitburner.reputationformulas.md new file mode 100644 index 000000000..6c218e8fd --- /dev/null +++ b/markdown/bitburner.reputationformulas.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ReputationFormulas](./bitburner.reputationformulas.md) + +## ReputationFormulas interface + +Reputation formulas + +Signature: + +```typescript +interface ReputationFormulas +``` + +## Methods + +| Method | Description | +| --- | --- | +| [calculateFavorToRep(favor)](./bitburner.reputationformulas.calculatefavortorep.md) | Calculate the total required amount of faction reputation to reach a target favor. | +| [calculateRepToFavor(rep)](./bitburner.reputationformulas.calculatereptofavor.md) | Calculate the resulting faction favor of a total amount of reputation. (Faction favor is gained whenever you install an Augmentation.) | + diff --git a/markdown/bitburner.runningscript.args.md b/markdown/bitburner.runningscript.args.md index 6239f7124..391eaa4df 100644 --- a/markdown/bitburner.runningscript.args.md +++ b/markdown/bitburner.runningscript.args.md @@ -4,6 +4,8 @@ ## RunningScript.args property +Arguments the script was called with + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.filename.md b/markdown/bitburner.runningscript.filename.md index 8ccdc7b31..9df32ed16 100644 --- a/markdown/bitburner.runningscript.filename.md +++ b/markdown/bitburner.runningscript.filename.md @@ -4,6 +4,8 @@ ## RunningScript.filename property +Filename of the script + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.logs.md b/markdown/bitburner.runningscript.logs.md index 07160193c..503a0861e 100644 --- a/markdown/bitburner.runningscript.logs.md +++ b/markdown/bitburner.runningscript.logs.md @@ -4,6 +4,8 @@ ## RunningScript.logs property +Script logs as an array. The newest log entries are at the bottom. Timestamps, if enabled, are placed inside `[brackets]` at the start of each line. + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.md b/markdown/bitburner.runningscript.md index 66d32cd3b..d9e763298 100644 --- a/markdown/bitburner.runningscript.md +++ b/markdown/bitburner.runningscript.md @@ -8,24 +8,24 @@ Signature: ```typescript -interface RunningScript +export interface RunningScript ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [args](./bitburner.runningscript.args.md) | string\[\] | | -| [filename](./bitburner.runningscript.filename.md) | string | | -| [logs](./bitburner.runningscript.logs.md) | string\[\] | | -| [offlineExpGained](./bitburner.runningscript.offlineexpgained.md) | number | | -| [offlineMoneyMade](./bitburner.runningscript.offlinemoneymade.md) | number | | -| [offlineRunningTime](./bitburner.runningscript.offlinerunningtime.md) | number | Offline running time of the script, in seconds \* | -| [onlineExpGained](./bitburner.runningscript.onlineexpgained.md) | number | | -| [onlineMoneyMade](./bitburner.runningscript.onlinemoneymade.md) | number | | -| [onlineRunningTime](./bitburner.runningscript.onlinerunningtime.md) | number | Online running time of the script, in seconds \* | -| [pid](./bitburner.runningscript.pid.md) | number | | -| [ramUsage](./bitburner.runningscript.ramusage.md) | number | | -| [server](./bitburner.runningscript.server.md) | string | | -| [threads](./bitburner.runningscript.threads.md) | number | | +| [args](./bitburner.runningscript.args.md) | string\[\] | Arguments the script was called with | +| [filename](./bitburner.runningscript.filename.md) | string | Filename of the script | +| [logs](./bitburner.runningscript.logs.md) | string\[\] | Script logs as an array. The newest log entries are at the bottom. Timestamps, if enabled, are placed inside [brackets] at the start of each line. | +| [offlineExpGained](./bitburner.runningscript.offlineexpgained.md) | number | Total amount of hacking experience earned from this script when offline | +| [offlineMoneyMade](./bitburner.runningscript.offlinemoneymade.md) | number | Total amount of money made by this script when offline | +| [offlineRunningTime](./bitburner.runningscript.offlinerunningtime.md) | number | Number of seconds that the script has been running offline | +| [onlineExpGained](./bitburner.runningscript.onlineexpgained.md) | number | Total amount of hacking experience earned from this script when online | +| [onlineMoneyMade](./bitburner.runningscript.onlinemoneymade.md) | number | Total amount of money made by this script when online | +| [onlineRunningTime](./bitburner.runningscript.onlinerunningtime.md) | number | Number of seconds that this script has been running online | +| [pid](./bitburner.runningscript.pid.md) | number | Process ID. Must be an integer | +| [ramUsage](./bitburner.runningscript.ramusage.md) | number | How much RAM this script uses for ONE thread | +| [server](./bitburner.runningscript.server.md) | string | Hostname of the server on which this script runs | +| [threads](./bitburner.runningscript.threads.md) | number | Number of threads that this script runs with | diff --git a/markdown/bitburner.runningscript.offlineexpgained.md b/markdown/bitburner.runningscript.offlineexpgained.md index a6c0edd3e..34b8aa729 100644 --- a/markdown/bitburner.runningscript.offlineexpgained.md +++ b/markdown/bitburner.runningscript.offlineexpgained.md @@ -4,6 +4,8 @@ ## RunningScript.offlineExpGained property +Total amount of hacking experience earned from this script when offline + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.offlinemoneymade.md b/markdown/bitburner.runningscript.offlinemoneymade.md index f80c64a3a..e55bccd89 100644 --- a/markdown/bitburner.runningscript.offlinemoneymade.md +++ b/markdown/bitburner.runningscript.offlinemoneymade.md @@ -4,6 +4,8 @@ ## RunningScript.offlineMoneyMade property +Total amount of money made by this script when offline + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.offlinerunningtime.md b/markdown/bitburner.runningscript.offlinerunningtime.md index 583170c8c..ebe6b1467 100644 --- a/markdown/bitburner.runningscript.offlinerunningtime.md +++ b/markdown/bitburner.runningscript.offlinerunningtime.md @@ -4,7 +4,7 @@ ## RunningScript.offlineRunningTime property -Offline running time of the script, in seconds \* +Number of seconds that the script has been running offline Signature: diff --git a/markdown/bitburner.runningscript.onlineexpgained.md b/markdown/bitburner.runningscript.onlineexpgained.md index 1e7b2591c..dafe1fcdf 100644 --- a/markdown/bitburner.runningscript.onlineexpgained.md +++ b/markdown/bitburner.runningscript.onlineexpgained.md @@ -4,6 +4,8 @@ ## RunningScript.onlineExpGained property +Total amount of hacking experience earned from this script when online + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.onlinemoneymade.md b/markdown/bitburner.runningscript.onlinemoneymade.md index 467800656..d206f7b33 100644 --- a/markdown/bitburner.runningscript.onlinemoneymade.md +++ b/markdown/bitburner.runningscript.onlinemoneymade.md @@ -4,6 +4,8 @@ ## RunningScript.onlineMoneyMade property +Total amount of money made by this script when online + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.onlinerunningtime.md b/markdown/bitburner.runningscript.onlinerunningtime.md index dc0074919..280d2ab44 100644 --- a/markdown/bitburner.runningscript.onlinerunningtime.md +++ b/markdown/bitburner.runningscript.onlinerunningtime.md @@ -4,7 +4,7 @@ ## RunningScript.onlineRunningTime property -Online running time of the script, in seconds \* +Number of seconds that this script has been running online Signature: diff --git a/markdown/bitburner.runningscript.pid.md b/markdown/bitburner.runningscript.pid.md index ba6987315..0399d5593 100644 --- a/markdown/bitburner.runningscript.pid.md +++ b/markdown/bitburner.runningscript.pid.md @@ -4,6 +4,8 @@ ## RunningScript.pid property +Process ID. Must be an integer + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.ramusage.md b/markdown/bitburner.runningscript.ramusage.md index 070d86dcc..ce45ffc33 100644 --- a/markdown/bitburner.runningscript.ramusage.md +++ b/markdown/bitburner.runningscript.ramusage.md @@ -4,6 +4,8 @@ ## RunningScript.ramUsage property +How much RAM this script uses for ONE thread + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.server.md b/markdown/bitburner.runningscript.server.md index 7c241a797..246ca1a75 100644 --- a/markdown/bitburner.runningscript.server.md +++ b/markdown/bitburner.runningscript.server.md @@ -4,6 +4,8 @@ ## RunningScript.server property +Hostname of the server on which this script runs + Signature: ```typescript diff --git a/markdown/bitburner.runningscript.threads.md b/markdown/bitburner.runningscript.threads.md index bcd45dbb9..83ec797c5 100644 --- a/markdown/bitburner.runningscript.threads.md +++ b/markdown/bitburner.runningscript.threads.md @@ -4,6 +4,8 @@ ## RunningScript.threads property +Number of threads that this script runs with + Signature: ```typescript diff --git a/markdown/bitburner.singularity.hospitalize.md b/markdown/bitburner.singularity.hospitalize.md index 299c2d43c..16f491c4b 100644 --- a/markdown/bitburner.singularity.hospitalize.md +++ b/markdown/bitburner.singularity.hospitalize.md @@ -9,13 +9,11 @@ Hospitalize the player. Signature: ```typescript -hospitalize(): number; +hospitalize(): void; ``` Returns: -number - -The cost of the hospitalization. +void ## Remarks diff --git a/markdown/bitburner.sleeve.settofactionwork.md b/markdown/bitburner.sleeve.settofactionwork.md index d1b0843f2..b3c5e56f1 100644 --- a/markdown/bitburner.sleeve.settofactionwork.md +++ b/markdown/bitburner.sleeve.settofactionwork.md @@ -9,7 +9,7 @@ Set a sleeve to work for a faction. Signature: ```typescript -setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean; +setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean | undefined; ``` ## Parameters @@ -22,9 +22,9 @@ setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: str Returns: -boolean +boolean \| undefined -True if the sleeve started working on this faction, false otherwise. +True if the sleeve started working on this faction, false otherwise, can also throw on errors ## Remarks diff --git a/markdown/bitburner.toastvariant.md b/markdown/bitburner.toastvariant.md new file mode 100644 index 000000000..fdc76db90 --- /dev/null +++ b/markdown/bitburner.toastvariant.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ToastVariant](./bitburner.toastvariant.md) + +## ToastVariant enum + + +Signature: + +```typescript +export enum ToastVariant +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| ERROR | "error" | | +| INFO | "info" | | +| SUCCESS | "success" | | +| WARNING | "warning" | | + diff --git a/src/Constants.ts b/src/Constants.ts index 0fea85d65..3091714f1 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -116,7 +116,7 @@ export const CONSTANTS: { TotalNumBitNodes: number; LatestUpdate: string; } = { - VersionString: "1.6.3", + VersionString: "1.6.0", VersionNumber: 13, // Speed (in ms) at which the main loop is updated diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index c0604cf96..eaa783950 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4813,7 +4813,7 @@ export interface NS { * Note that there is a maximum number of recently killed scripts which are tracked. * This is configurable in the game's options as `Recently killed scripts size`. * - * @usage below: + * @example * ```ts * let recentScripts = ns.getRecentScripts(); * let mostRecent = recentScripts.shift() @@ -6426,6 +6426,7 @@ export interface NS { // enum: NSEnums; } +/** @public */ export enum ToastVariant { SUCCESS = "success", WARNING = "warning", @@ -6433,6 +6434,7 @@ export enum ToastVariant { INFO = "info", } +/** @public */ export interface NSEnums { toast: ToastVariant; } @@ -6957,7 +6959,7 @@ interface Product { cmp: number | undefined; /** Product Rating */ rat: number; - /** Product Properties. The data is {qlt, per, dur, rel, aes, fea} */ + /** Product Properties. The data is \{qlt, per, dur, rel, aes, fea\} */ properties: { [key: string]: number }; /** Production cost */ pCost: number;