mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Fix #1863: Add getHashUpgrades hacknet function
Adds a new functions ofr hacknet servers that returns the list of available hash upgrades.
This commit is contained in:
16
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
16
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -2290,6 +2290,22 @@ export interface Hacknet {
|
||||
*/
|
||||
spendHashes(upgName: string, upgTarget?: string): boolean;
|
||||
|
||||
/**
|
||||
* Get the list of hash upgrades
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
|
||||
*
|
||||
* Returns the list of all available hash upgrades that can be used in the spendHashes function.
|
||||
* @example
|
||||
* ```ts
|
||||
* const upgrades = hacknet.getHashUpgrades(); // ["Sell for Money","Sell for Corporation Funds",...]
|
||||
* ```
|
||||
* @returns An array containing the available upgrades
|
||||
*/
|
||||
getHashUpgrades(): string[];
|
||||
|
||||
/**
|
||||
* Get the level of a hash upgrade.
|
||||
* @remarks
|
||||
|
||||
Reference in New Issue
Block a user