Commit Graph

218 Commits

Author SHA1 Message Date
David Walker d4cb50fbf1 BUGFIX: Fix calculateExp so that it won't return a too small result (#2274)
* BUGFIX: Fix calculateExp so that it won't return a too small result

Due to floating point rounding issues, when applying the inverse
operation and flooring, roughly half the time we would get the next
lower skill level. This quickly finds a slightly higher result that
gives the correct inverse.

* clearer test layout
2025-07-31 12:54:31 -07:00
catloversg f182030385 CORPORATION: Use different term for dividend modifier instead of tax (#2237) 2025-07-11 12:55:46 -07:00
catloversg 6c7783aa85 CORPORATION: Remove DreamSense upgrade (#2232) 2025-07-10 01:40:36 -07:00
catloversg 9b59fcbb5f BUGFIX: Running scripts may be loaded before main UI (#1726) 2025-07-05 18:10:51 -07:00
hydroflame 407dad0d6b MISC: Update blood donations (#2216) 2025-06-26 15:15:57 -07:00
catloversg 8aa73b2c65 MISC: Detect circular dependencies when generating modules (#2194) 2025-06-21 13:32:47 -07:00
catloversg 510a9a6be5 BUGFIX: Documentation navigator does not handle external URL properly (#2202) 2025-06-21 13:31:52 -07:00
Michael Ficocelli 18f84396e2 FEATURE: Add "Recent Errors" tab and improved error modal (#2169) 2025-06-16 16:43:21 -07:00
catloversg a794fddaf7 MISC: Add file metadata (timestamps) (#2199) 2025-06-16 16:34:06 -07:00
HansLuft778 67017c5782 TERMINAL: Add RAM usage and detailed file size to ls -l output (#2135) 2025-06-02 02:23:22 -07:00
catloversg eaf4014516 MISC: Update blood donation (#2151) 2025-05-23 14:12:26 -07:00
catloversg 90555a64e6 MISC: Add achievements for BN14 (#2140) 2025-05-20 14:32:13 -07:00
whiskeyfur 5e2d038e05 MISC: Updated createRandomIP to use the full 32 bit space (#2113) 2025-05-14 01:17:52 -07:00
catloversg a9900072da MISC: Remove support for running NS1 scripts (#2083) 2025-04-11 13:41:48 -07:00
Michael Ficocelli f6e7ef082c IPVGO: Add support for highlighting nodes and adding small text (#1996) 2025-03-31 13:36:30 -07:00
Michael Ficocelli 17ffabdfa5 IPVGO: Add new analysis method to set a custom testing board state (#2029) 2025-03-22 23:52:26 -07:00
catloversg 7f443427ea CODEBASE: Suppress false-positive console errors caused by RamCalculation.test.ts (#2002) 2025-03-07 15:15:54 -08:00
catloversg 23ad55554e UI: Add "Run" action to run current script in editor (#1987) 2025-03-04 02:43:31 -08:00
catloversg 8ed83f3d37 MISC: Add key binding feature (#1830) 2025-02-27 22:59:12 -08:00
G4mingJon4s b61e93b246 CODINGCONTRACT: Move internals to a separate folder (#1932) 2025-02-11 22:04:23 -08:00
Michael Ficocelli c8d2c9f769 IPVGO: Support scripts playing against each other as each color on "No AI" boards (#1917)
This is a big change with a *lot* of moving parts.

The largest part of it is enabling scripts to `playAsWhite` as a parameter to many Go functions. In the implementation, this involved a significant rewrite of `opponentNextTurn` promise handling.

A number of other changes and bugfixes are included:
* Fixes the issue where handicap stones are added on game load.
* Better typing for error callbacks.
* Throw errors instead of deadlocking on bad cheat usage.
* Return always-resolved gameOver promise after game end
* Added a new `resetStats` api function.

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2025-02-02 20:47:16 -08:00
catloversg de6b202341 CODEBASE: Refactor Player.applyForJob (#1947) 2025-02-02 09:29:18 -08:00
catloversg a4217b448a MISC: Standardize behavior of connect CLI and Singularity API (#1933) 2025-01-31 11:20:17 -08:00
catloversg ada903f356 CODEBASE: Refactor ns.singularity.purchaseAugmentation (#1879) 2025-01-28 10:42:25 -08:00
catloversg 0f9144a059 CODEBASE: Validate theme, editor theme, and styles (#1789) 2025-01-08 19:20:05 -08:00
catloversg b66eff0379 JEST: Fix flaky stock market test (#1834) 2024-12-12 02:58:35 -08:00
catloversg 1e6c9d69e2 JEST: Move TerminalMatching.test.ts (#1801) 2024-11-27 01:23:51 -08:00
catloversg faed78cf2c CODEBASE: Validate AllGangs and StockMarket after loading with JSON.parse (#1783) 2024-11-27 01:13:47 -08:00
catloversg bb0b857f71 JEST: Add tests for b1tflum3 and destroyW0r1dD43m0n API (#1802) 2024-11-27 00:06:11 -08:00
catloversg 8c4fcfe045 CODEBASE: Recheck all usages of typecasting with JSON.parse (#1775) 2024-11-20 23:47:02 -08:00
catloversg 97ca8c5f5e CODEBASE: Fix lint errors 4 (#1773)
Co-authored-by: Michael Ficocelli <ficocemt@gmail.com>
2024-11-14 07:47:35 -08:00
catloversg 246d668951 CORPORATION: Rewrite validation code for strings of price and quantity (#1753) 2024-11-12 07:39:21 -08:00
catloversg 772762493f BLADEBURNER: Change sleeveSize from property to getter (#1746) 2024-11-03 23:19:01 -08:00
catloversg b01527a9dc MISC: Update blood donation (#1736) 2024-10-27 18:40:23 -07:00
Michael Ficocelli 6df3dcdc82 IPVGO: Add optional board state argument to the go analysis functions (#1716) 2024-10-27 17:31:06 -07:00
Denis Čahuk 8d1cfb2d97 BLADEBURNER: Test cover action completion (#1695) 2024-10-21 20:33:56 -07:00
catloversg cace34d759 BUGFIX: Wrong calculation in team casualties of Bladeburner action (#1672) 2024-10-07 23:55:11 -07:00
Denis Čahuk 6c81e1ac67 BLADEBURNER: test cover console commands (#1664) 2024-09-25 16:06:46 -07:00
Denis Čahuk b86044bcc1 BLADEBURNER: Move bladeburner team losses to Casualties (#1654) 2024-09-23 17:03:01 -07:00
Denis Čahuk cde5e3f6ae MISC: Refactor BLADEBURNER Identifier Lookup (#1646) 2024-09-14 17:39:18 -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
Yichi Zhang 028e779602 NETSCRIPT: Don't make dynamicLoadedFns entries for free functions. (#1617) 2024-08-23 21:23:41 -07:00
catloversg 818d7446be MISC: Rename getRandomArbitrary (#1605) 2024-08-21 16:50:51 -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 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
catloversg 289f60d8c8 BLADEBURNER: Add API to calculate max upgrade count of skill (#1475) 2024-08-16 13:15:20 -07:00
catloversg 864613c616 MISC: Support JSX, TS, TSX script files (#1216) 2024-07-14 14:47:10 -07:00
catloversg 783120c886 FEATURE: BitNode options (#1411) 2024-07-14 14:30:30 -07:00
David Walker 06553d9700 BUGFIX: Fix "Router called before initialization" race (#1474)
If the game takes long enough to load, certain counters can become
eligible to run as soon as Engine.start() runs. When this happens,
eventually Router.page() is called, which throws an Error since Router
isn't initialized yet. (Dropping a breakpoint before Engine.start() and
waiting at least 30 seconds is enough to reliably repro, but I have seen
this both live and in tests.)

This fixes it so that Router.page() is valid immediately, returning a
value of Page.LoadingScreen. It also removes the isInitialized field,
since this is now redundant. Trying to switch pages is still an error,
but that doesn't happen without user input, whereas checking the current
page is quite common.

This also consolidates a check for "should we show toasts" behind a
function in Router, making the logic central and equal for a few
usecases. This means (for instance) that the "autosave is disabled"
logic won't run during infiltration. (The toast should have already been
suppressed.)
2024-07-07 22:13:37 -07:00