Commit Graph

136 Commits

Author SHA1 Message Date
catloversg
97ca8c5f5e
CODEBASE: Fix lint errors 4 ()
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 () 2024-11-12 07:39:21 -08:00
catloversg
772762493f
BLADEBURNER: Change sleeveSize from property to getter () 2024-11-03 23:19:01 -08:00
catloversg
b01527a9dc
MISC: Update blood donation () 2024-10-27 18:40:23 -07:00
Michael Ficocelli
6df3dcdc82
IPVGO: Add optional board state argument to the go analysis functions () 2024-10-27 17:31:06 -07:00
Denis Čahuk
8d1cfb2d97
BLADEBURNER: Test cover action completion () 2024-10-21 20:33:56 -07:00
catloversg
cace34d759
BUGFIX: Wrong calculation in team casualties of Bladeburner action () 2024-10-07 23:55:11 -07:00
Denis Čahuk
6c81e1ac67
BLADEBURNER: test cover console commands () 2024-09-25 16:06:46 -07:00
Denis Čahuk
b86044bcc1
BLADEBURNER: Move bladeburner team losses to Casualties () 2024-09-23 17:03:01 -07:00
Denis Čahuk
cde5e3f6ae
MISC: Refactor BLADEBURNER Identifier Lookup () 2024-09-14 17:39:18 -07:00
Marvin Sautter
3d7a6f70d8
JEST: Test faster by removing barrels () 2024-09-09 18:36:00 -07:00
Marvin Sautter
dd59612121
JEST: Decrease frequency of random Bladeburner Tests by ~59% for improved performance () 2024-09-09 18:33:37 -07:00
Yichi Zhang
028e779602
NETSCRIPT: Don't make dynamicLoadedFns entries for free functions. () 2024-08-23 21:23:41 -07:00
catloversg
818d7446be
MISC: Rename getRandomArbitrary () 2024-08-21 16:50:51 -07:00
catloversg
cacecda72f
API: Add types for parameters of gym-university-bladeburner API (Fix merging error) ()
* 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 ()
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 () 2024-08-16 13:15:20 -07:00
catloversg
864613c616
MISC: Support JSX, TS, TSX script files () 2024-07-14 14:47:10 -07:00
catloversg
783120c886
FEATURE: BitNode options () 2024-07-14 14:30:30 -07:00
David Walker
06553d9700
BUGFIX: Fix "Router called before initialization" race ()
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
Tom Prince
b277975656
EDITOR: Provide type definitions for React and ReactDOM in in-game editor. ()
* Fix the type declaration of `!!raw-loader!` modules.

Instead of declaring them to export an object with a single key
`default` which is a string, the modules have a default export, which
is a string.

Note, that this doesn't actually change the generated code, just the
types that typescript sees. The code worked before because the only
thing done to the values was to coerce the values to a string, which
turned into a no-op.

* Switch from using `raw-loader` to using a source asset module.

`raw-loader` was deprecated in webpack v5.
2024-07-07 00:08:33 -07:00
David Walker
1f2e69631e
EDITOR: Use ramOverride() to set compiled script RAM ()
To use this, add a line like "ns.ramOverride(2);" as the first statement
in main(). Not only will it take effect at runtime, but it will now
*also* be parsed at compile time, changing the script's static RAM
limit. Since ns.ramOverride is a 0-cost function, the call to it on
startup then becomes a no-op.

This is an often-requested feature, and allows for scripts to set their
usage without it needing to be explicitly mentioned via args or options
when being launched. This also reduces pressure on the static RAM
analysis to be perfect all the time. (But certain limits, such as
"functions names must be unique across namespaces," remain.)

This also adds a tooltip to the RAM calculation, to make this slightly
discoverable.
2024-07-05 17:32:46 -07:00
Michael Ficocelli
481938a2fb
IPVGO: Balance and improvements for offline bonus time cycles () 2024-06-05 19:39:22 -07:00
Michael Ficocelli
cf48d666f5
IPVGO: Add history, and details to status, to go API () 2024-06-05 18:24:48 -07:00
Michael Ficocelli
bd5c502f53
IPVGO: Support bonus cycles from offline time () 2024-06-04 18:43:29 -07:00
Michael Ficocelli
d9f04203cf
IPVGO: Record full history to avoid infinite ko capture loops on larger boards () 2024-06-02 20:19:26 -07:00
Caldwell
f40d4f8e92
BUGFIX: fix relative imports ()
Relative paths work in imports, at last.
2024-06-02 17:38:01 -07:00
catloversg
c2a56a6150
MISC: Refactor favor code () 2024-05-28 12:04:16 -07:00
catloversg
25afecc0ec
CORPORATION: Rename functions in Actions.ts ()
This should be a straight rename, no functionality changes.
2024-05-12 14:52:07 -07:00
catloversg
eba86e4bf0
BUGFIX: Fix () 2024-04-23 20:05:24 -04:00
Michael Ficocelli
6c9555ba32
IPVGO: Tweak cheat success scaling so it is applicable even to endgame stats () 2024-03-30 16:22:53 -07:00
Snarling
6669c4da6a
BLADEBURNER: Typesafety / refactoring () 2024-03-28 21:52:37 -04:00
Michael Ficocelli
fe87f1f628
IPVGO: Bugfixes ()
* IPVGO: Explicitly link the generated API documentation in the algorithm design doc
* IPVGO: Fix missing factions in netscript docs
* IPVGO: Linting
* IPVGO: Ensure resetBoardState() logs that a new game has started
2024-03-27 22:02:53 -07:00
catloversg
8553bcb8fc
MISC: Support compression of save data ()
* Use Compression Streams API instead of jszip or other libraries.
* Remove usage of base64 in the new binary format.
* Do not convert binary data to string and back. The type of save data is SaveData, it's either string (old base64 format) or Uint8Array (new binary format).
* Proper support for interacting with electron-related code. Electron-related code assumes that save data is in the base64 format.
* Proper support for other tools (DevMenu, pretty-save.js). Full support for DevMenu will be added in a follow-up PR. Check the comments in src\DevMenu\ui\SaveFileDev.tsx for details.
2024-03-27 21:08:09 -07:00
Michael Ficocelli
d8de22a273
IPVGO: Nerf overly-difficult handicap, [issue ] misc bugfixes ()
* IPVGO: Nerf overly-difficult handicap on 5x5 board

* IPVGO: Tweak 5x5 handicap
2024-03-25 16:12:35 -07:00
adeilt
08097aaf09
CORPORATION: more granular office size upgrades ()
Allows corporation.upgradeOfficeSize to increase the size of a Corporation office by a non-multiple of 3 and also be charged a corresponding amount of corporate funds. See  for details of current behavior.
2024-03-24 17:37:08 -07:00
Michael Ficocelli
1e5f7184a2
IPVGO: Remove current game history from savefile, re-implement superko () 2024-03-20 20:37:20 -04:00
Michael Ficocelli
d81358c80f
IPVGO: Add support to netscript API for game state, current player, and alternate ways to check/wait on AI turn () 2024-03-19 14:07:15 -04:00
Michael Ficocelli
c703b71871
IPVGO: Ensure that the player has the prerequisites to face the secret opponent () 2024-03-11 12:57:44 -04:00
Snarling
e9d1ddfaf3
SAVEGAME: Reduce size of savefile ()
Storing less info in the save for Factions/Companies if it's still the default info
2024-03-11 08:58:10 -04:00
Michael Ficocelli
1547581c24
IPVGO: Fix self-capture move evaluation () 2024-03-06 16:23:16 -05:00
Shy
4aaf845fca
API: make ns.atExit add the callback to an array instead of setting it () 2024-03-05 19:22:45 -05:00
hydroflame
483d554fc2
MISC: Update donation counter () 2024-02-26 09:42:31 -05:00
Snarling
91105c6d8c
TESTS: Prevent some test spam () 2024-02-26 08:22:33 -05:00
Snarling
373ced2efe
GO: Various changes before 2.6.0 () 2024-02-26 08:05:10 -05:00
Caldwell
84c4dba1e2
UI: fix scripts recorded offline income () 2024-02-10 07:24:55 -05:00
David Walker
55e21d1e19
Make grow formulas faster and more accurate. () 2024-01-31 19:27:31 -05:00
deansvendsen
cb7c75a3ce
MISC: Gang Expenses category in MoneySource () 2024-01-23 18:18:56 -05:00
Michael Ficocelli
7ef12a0323
BITNODE: IPvGO territory control strategy game () 2023-12-26 11:45:27 -05:00
TheAimMan
5482848eeb
SLEEVE: Add task counter to Crimes and BladeBurner () 2023-12-07 21:24:50 -05:00