Commit Graph

8424 Commits

Author SHA1 Message Date
catloversg
70e16bf349
BUGFIX: Wrong team size when all team members die in Bladeburner's action (#1658) 2024-09-20 02:31:15 -07:00
David Walker
21ffa5322f
MISC: Refactor coding contracts for type safety (#1653)
* MISC: Refactor coding contracts for type safety

This refactor does three things without any behavior changes:
* Adds type safety by introducing generic type parameters to the coding
  contract definitions, so they can use concrete types instead of
  "unknown". This also eliminates a bunch of boilerplate casts.
* Removes the unneeded CodingContractType class. We can use the metadata
  type directly.
* Introduces a new hidden state to coding contracts. Instead of
  generating and storing the data (which is what is shown to the user as
  the problem's input), the state is stored instead. This allows
  problems to (for instance) generate the answer up-front, and check the
  solution directly against the answer, instead of needing to embed a
  solver in the problem (which can then easily be ripped from the source
  code).

For compatibility, state == data by default. I plan to make use of this
feature in a followup, but it is unused currently.
2024-09-15 23:53:10 -07:00
Denis Čahuk
cde5e3f6ae
MISC: Refactor BLADEBURNER Identifier Lookup (#1646) 2024-09-14 17:39:18 -07:00
David Walker
f39402e8be
BLADE: Use "grow" semantics for population estimate (#1624)
This changes the way percantage-based population estimates work, so that
they have a similar mechanism to grow(). This allows natural recovery
from 0, and also falling to 0 in finite steps.

This also changes the formula for reducing estimates to est / (1 + p)
instead of est * (1 - p). The latter becomes overpowered at large p,
we've seen this formula issue elsewhere (such as BN modifiers).
2024-09-13 23:41:10 -07:00
Marvin Sautter
3d7a6f70d8
JEST: Test faster by removing barrels (#1645) 2024-09-09 18:36:00 -07:00
Marvin Sautter
dd59612121
JEST: Decrease frequency of random Bladeburner Tests by ~59% for improved performance (#1648) 2024-09-09 18:33:37 -07:00
Michael Ficocelli
2a5b0ca4e9
IPVGO: Prevent issues caused by resetting the board while the go AI is in flight (#1608) 2024-09-07 18:33:49 -07:00
catloversg
4f426e1b20
UI: Change description of Documentation button in Script Editor (#1644) 2024-09-07 18:08:16 -07:00
G4mingJon4s
651b17739c
NETSCRIPT: Add ns.self() as a free info function (#1636)
* added utility info

* moved info to running script

* fix for RAM cost

* description changes

Co-authored-by: David Walker <d0sboots@gmail.com>

* fixed wrong formatting

* Added parent to ignored fields

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2024-09-07 17:34:24 -07:00
catloversg
0ce5cd35dc
DOCUMENTATION: Fix mangled NS API TSDoc (#1643) 2024-09-07 17:29:23 -07:00
nobody0
17e906cd76
Update NetscriptDefinitions.d.ts to match class BitNodeMultipliers (#1642) 2024-08-30 19:31:04 -07:00
Fireball5939
95394b5956
DOCUMENTATION: Improve ns.enableLog() docs to remove a missleading description (#1634)
Changed ns.enableLog documentation to be very similar to ns.disableLog, to remove possible confusion that it only undoes the effects of ns.disableLog
2024-08-26 19:49:44 -07:00
Tahvohck
47b261f520
STANEK: Typo fix in description (#1627)
Fixing a typo (missing space) in the CotMG faction info text.
2024-08-25 10:14:33 -07:00
Nicole
b4f2a5c641
set static information netscript costs to 0 (#1628) 2024-08-25 10:09:36 -07:00
catloversg
3750363d95
MISC: Show more information about documentation in last step of tutorial (#1630) 2024-08-25 10:04:55 -07:00
catloversg
e58a7d8eaa
DEVMENU: Use Autocomplete instead of Select in more tools (#1631) 2024-08-25 10:02:28 -07:00
catloversg
2e42a1f781
DOCUMENTATION: Minor changes in index page (#1626) 2024-08-24 14:11:11 -07:00
catloversg
ac0c9bd7e8
BUGFIX: Missing error handler when calling libarg (#1625) 2024-08-24 14:08:42 -07:00
gmcew
49629d1d28
UI: Remove extra "label=" text from SmartSupply interface (#1622) 2024-08-23 21:27:36 -07:00
Yichi Zhang
028e779602
NETSCRIPT: Don't make dynamicLoadedFns entries for free functions. (#1617) 2024-08-23 21:23:41 -07:00
Nicole
2141032432
BLADE: Fix population estimate percent growth when estimate is 0 (#1620) 2024-08-23 21:22:41 -07:00
catloversg
be515cc195
BUGFIX: Crash in b1tflum3 and destroyW0r1dD43m0n API (#1619) 2024-08-23 21:06:53 -07:00
catloversg
329d8ca8e6
BUGFIX: Wrong skill multipliers in Bladeburner (#1615) 2024-08-23 21:04:13 -07:00
bupjae
95bb6a33df
DOCUMENTATION: Clarify experience gain of sleeves (#1609) 2024-08-22 12:53:16 -07:00
Nicole
7f5c4e1fe0
API: Reduced RAM cost for ns.getPurchasedServers (#1614) 2024-08-22 00:44:21 -07:00
catloversg
614bec1e13
DOCUMENTATION: Fix wrong description of ns.corporation.createCorporation (#1612) 2024-08-21 17:50:47 -07:00
catloversg
4a3dcf8a26
MISC: Expose internal data in dev build (#1611) 2024-08-21 17:50:11 -07:00
Sol
8d9f63f49f
UI: Fix incorrect information given in pserv upgrade error msg. (#1602) 2024-08-21 17:48:55 -07:00
catloversg
818d7446be
MISC: Rename getRandomArbitrary (#1605) 2024-08-21 16:50:51 -07:00
Nicole
995e367432
DOCS: Correct function signature for hashUpgradeCost (#1603) 2024-08-21 16:47:26 -07:00
David Walker
f235513742
CHANGELOG: Update changelog for 2.6.3dev (#1601)
Commit d82247a4 was a lazy update, this finishes putting all the entries
in the changelog. The "last updated" date is not changed, since it is
only including changes up to the old date.

Reverts the html-ification introduced in the last changelog update.
2024-08-18 17:28:59 -07:00
Yichi Zhang
2563874acb
MISC: Use indirect eval for terminal expr and corporation sell prices/amounts (#1599) 2024-08-17 18:13:31 -07:00
catloversg
94eef8ecde
BUGFIX: Fix inconsistencies of error handling in promise-based API (#1377) 2024-08-17 14:23:08 -07:00
Fireball5939
701c5d8e64
API: Fixed ns.singularity.donateToFaction being able to donate to SoA (#1595)
Fixed ns.singularity.donateToFaction bug
Fixed a bug within singularity.donateToFaction where you could use it to donate to Shadows Of Anarchy
Also updated the Node version in package-lock.json to 18
2024-08-17 14:10:01 -07:00
catloversg
cacecda72f
API: Add types for parameters of gym-university-bladeburner API (Fix merging error) (#1596)
* API: Add types for parameters of gym-university-bladeburner API
* Fix merging error
2024-08-17 14:08:55 -07:00
David Walker
5b2a4eafcb
MISC: Improve several things relating to PID lookups (#1594)
findRunningScriptByPid needlessly took a "server" argument. This caused
there to be a "getRunningScriptByPid" version that did *not*, and it was
looping through all servers in order to function, which is needlessly
inefficient.

By removing the parameter and the needless inefficient helper method,
the following changes:
- Many Netscript functions such as isRunning() and getScript() become faster.
- The terminal "tail" command now works by pid regardless of the current
  server. Note that "kill" already worked this way.

I also improved the docs around "tail", since the pid argument wasn't
in the help.
2024-08-17 14:03:00 -07:00
David Walker
34db6e8b26
NETSCRIPT: Rework disableLog for efficiency (#1589)
The current implementation was naive; disableLog("ALL") was storing a
key for every function, and iterating over a different object to do it
(when iterating over objects is quite slow).

The common cases of Bitburner (and especially batching, where efficiency
matters most) are either never disabling anything, or disabling "ALL".
This optimizes for these two cases, at the expense of slightly more
complicated code to deal with the less-common edge cases.
2024-08-16 19:10:20 -07:00
Nicole
385a9dc11d
BUGFIX: Fix Bladeburner city chaos reaching Infinity/NaN (#1588) 2024-08-16 16:28:43 -07:00
David Walker
79bb0d289a
Revert "API: Add types for parameters of gym-university-bladeburner API (#1591)" (#1592)
This reverts commit da8870ed796c916c19cac7c2b6328a75180367fc.
2024-08-16 13:45:54 -07:00
catloversg
da8870ed79
API: Add types for parameters of gym-university-bladeburner API (#1591) 2024-08-16 13:29:24 -07:00
catloversg
289f60d8c8
BLADEBURNER: Add API to calculate max upgrade count of skill (#1475) 2024-08-16 13:15:20 -07:00
catloversg
3d15413619
MISC: Increase minimum node version (#1565) 2024-08-16 13:01:09 -07:00
catloversg
4a1506cf7e
BUGFIX: Block hacking-related actions on player-owned servers (#1585) 2024-08-16 02:05:22 -07:00
catloversg
a9cb46606c
DOCUMENTATION: Update documentation of Corporation API (#1587) 2024-08-16 02:02:23 -07:00
Snarling
d82247a404 Lazy changelog update
Just referencing commit history for changelog right now
2024-08-15 18:09:42 -04:00
catloversg
a48bfba536
BUGFIX: Wrong error message when failing to recruit gang member (#1580) 2024-08-15 13:15:05 -07:00
catloversg
8e278f9262
CI: Update Node version (#1578) 2024-08-15 13:08:21 -07:00
catloversg
9db1084b16
MISC: Cancel infiltration when player is hospitalized (#1579) 2024-08-14 22:20:17 -07:00
catloversg
440c074606
UI: Allow filtering graftable augmentations (#1570) 2024-08-14 22:18:27 -07:00
catloversg
dbeaef94a2
CORPORATION: Fix NaN Total Assets caused by bug in bulkPurchase API (#1573) 2024-08-14 22:09:41 -07:00