bitburner-official / bitburner-src

Bitburner source code.
Other
847 stars 274 forks source link

DOCS: Correct function signature for hashUpgradeCost #1603

Closed Faenre closed 3 months ago

Faenre commented 3 months ago

(Versions 2.6.2 and 2.6.3dev)

Correct function signature for hashUpgradeCost

The typescript definition for HacknetServersFormulas.hashUpgradeCost() lists the upgrade name being a number, when it's supposed to be the name of the upgrade as a string. This affects the generated documentation plus user-facing typescript definition files.

Old:

image

New:

image

This is the intended mechanism for how the formulas function is written, in which upgName is cast into a string:

image

The hash manager then takes that string and returns the corresponding record for HashUpgrades: Record<string, HashUpgrade>.

Documentation

Issue reported by Yeraze on Discord

d0sboots commented 3 months ago

PR backlog let's gooooooooooo