Commit Graph

6427 Commits

Author SHA1 Message Date
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
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
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
catloversg
1d9e026b6e
DOCUMENTATION: Remove wrong information in ns.weaken (#1574)
* DOCUMENTATION: Remove wrong information in ns.weaken

* Update based on the feedback
2024-08-14 22:07:42 -07:00
catloversg
e3dc867e08
UI: Notify players about documentation tab after getting SF1.1 (#1571) 2024-08-13 16:04:08 -07:00
catloversg
e7cd2ee19b
DEVMENU: Use Autocomplete instead of Select in augmentation tool (#1569) 2024-08-13 15:59:49 -07:00
catloversg
6c2d44b0fe
DOCUMENTATION: Fix errors and warnings shown by api-extractor (#1566) 2024-08-13 15:57:15 -07:00
catloversg
5427ae71ca
DOCUMENTATION: Fix wrong description of ns.singularity.applyToCompany (#1561) 2024-08-13 15:28:02 -07:00
catloversg
23f98c1ff6
UI: Add success chance of Bladeburner action to Sleeves UI (#1567) 2024-08-11 16:59:08 -07:00
Nicole
7029ac9bcc
UI: Add apostrophe to stanek's gift strings (#1568) 2024-08-11 16:38:40 -07:00
David Walker
ff80847af6
MISC: Improve rep calculation accuracy (#1559) 2024-08-09 16:26:01 -07:00
Yichi Zhang
93eb9b0cef
Add buyAmount and importAmount to Corporation Material API (#1553) 2024-08-08 18:13:03 -07:00
Michael Ficocelli
e16ac34c15
IPVGO: add scoring rules explanations to how to play page and score modal (#1558) 2024-08-08 17:44:19 -07:00
catloversg
59bb58535e
DEVMENU: Small change in augmentation tool (#1557) 2024-08-08 17:40:52 -07:00
catloversg
1fdb8bd352
UI: Always show description of faction price multiplier (#1555) 2024-08-08 17:39:53 -07:00
catloversg
ed01fb8e9e
BUGFIX: Wrong success range of Bladeburner general action (#1552) 2024-08-08 17:37:22 -07:00
catloversg
75cacc36bc
BUGFIX: Outdated formula of favor in tooltip (#1554) 2024-08-08 16:46:19 -07:00
gmcew
2d1747b3e9
CONTRACTS: Hamming Code parity sentence clarification, "Find All Valid Math Expressions" missing line breaks added, example formatting made consistent (#1550) 2024-08-06 15:02:54 -07:00
catloversg
1a8dcad02b
BUGFIX: Duplicated program in edge case (#1549) 2024-08-05 13:43:56 -07:00
catloversg
180dae1d2c
DOCUMENTATION: Add GoAnalysis and GoCheat (#1548) 2024-08-05 13:42:19 -07:00
catloversg
9a77b47241
MISC: Remove js-sha256 (#1278) 2024-08-05 13:40:16 -07:00
catloversg
eeac3f7dd1
BUGFIX: Duplicated augmentation when buying after grafting (#1536) 2024-08-04 13:11:00 -07:00
catloversg
e5a63b4116
MISC: Fix typos in NetscriptDefinitions.d.ts (#1546) 2024-08-04 13:09:50 -07:00
catloversg
986ac0b627
BUGFIX: Wrong countdown of remaining time for Bladeburner action (#1547) 2024-08-04 13:07:10 -07:00
catloversg
23f193c8eb
MISC: Remove unnecessary dependency in Person class (#1534) 2024-08-04 00:04:06 -07:00
catloversg
1b9676c68e
MISC: Clarify deprecation warning of ns.getTimeSinceLastAug() (#1535) 2024-08-04 00:01:34 -07:00
catloversg
7c7293b687
BUGFIX: Prompt does not reset text value (#1539) 2024-08-04 00:01:01 -07:00
catloversg
1ed47b4bc9
BUGFIX: Tab completion uses wrong command list (#1537) 2024-08-03 23:52:29 -07:00
catloversg
829eda2e5a
MISC: Add help text for changelog command (#1540) 2024-08-03 23:43:14 -07:00
BaxoPlenty
3be9f9dfd7
BUGFIX: Fix link to non-existing page (#1541) 2024-08-03 23:42:43 -07:00
Yichi Zhang
0dd42a1d57
TERMINAL: Stop terminal scp from revealing and copying to unreachable servers (#1542) 2024-08-03 23:38:00 -07:00
catloversg
d9394db543
BUGFIX: Add missing BN multipliers in UI (#1545) 2024-08-03 23:17:50 -07:00
Tom Prince
935ac610d3
EDITOR: Support cross-language imports in editor. (#1518) 2024-08-01 23:59:31 -07:00
Tom Prince
2f95d21503
UI: Sync UI updates to game updates. (#1512)
There are a bunch of React components that update at the same rate
that the game engine processes cycles. Rather than have each place
that does so start its own timer to update that often, add a new
react hook that triggers an update shortly after the engine completes
a cycle.
2024-08-01 23:57:43 -07:00
catloversg
06677a1306
MISC: Refactor Person.ts and Sleeve.ts (#1532) 2024-08-01 22:59:41 -07:00
catloversg
d4b73531f5
DOCUMENTATION: Remove unmaintained VS Code extension (#1531) 2024-08-01 22:45:47 -07:00
catloversg
9308301b12
UI: Fix misleading favor numbers (#1530) 2024-08-01 22:44:03 -07:00
catloversg
bcb4a3835b
BLADEBURNER: Allow upgrading skill level over max safe integer (#1509) 2024-07-31 12:48:09 -07:00
Michael Taylor
0ceb478e32
DOC: Typo in ns2 migration doc (#1528) 2024-07-31 12:41:54 -07:00
mmjr-x
4d57d636af
INFILTRATION: Minesweepergame minor bugfix, made rounding behavior for height, width and mine count consistent (#1526) 2024-07-30 15:23:55 -07:00
TheAimMan
6cae65fc0d
BUGFIX: Cap Gang recruit member calculation (#1523) 2024-07-27 15:44:00 -07:00
gmcew
ad5e2b0fe5
CONTRACT: Remove " "s from .getDescription() result (#1525) 2024-07-27 15:42:28 -07:00
TheAimMan
d4f3cf7d81
BUGFIX: Stop current work when starting a program with Singularity (#1521) 2024-07-26 15:05:27 -07:00
Tom Prince
1e6e635ae3
BUGFIX: Correctly show remaining grafting/programming time left when cycles are skipped. (#1510) 2024-07-26 02:05:29 -07:00
Tom Prince
c3dc275d34
MISC: Show values of constants in type hints. (#1515) 2024-07-26 01:56:09 -07:00
Tom Prince
02538d6953
EDITOR: Enable strict typechecking of typescript. (#1493)
* EDITOR: Tweak typescript language server configuration to match use.

- We allow importing files with `.ts`/`.tsx` extensions.
- We use an file-at-a-time transpiler, so we don't support features
  that require understanding the full type system.
- We use the classic `React.createElement` transform.
2024-07-23 21:28:05 -07:00
Tom Prince
854c1a5921
MISC: Remove unsed attribues of internal ScriptDeath. (#1513) 2024-07-23 17:50:51 -07:00
robofinch
42bcfa1889
BUGFIX: Prevent runtime NotAllowedError on Safari (#1507)
Could occur when the browser’s window is resized.
2024-07-20 01:16:02 -07:00
David Walker
4502fd443e
BUGFIX: Don't spin forever if IDB can't be loaded (#1500)
Our IndexDB handling did not have very good error handling. It wasn't
reporting the actual errors that occured, nor was it using actual Error
objects. In some cases it also had overly convoluted Promise use, and it
didn't need to be .tsx either.

The biggest issue was that if any problem occured during the main
load(), this would end up as an unhandled rejection and so it would only
be logged to the console. This extends the previous catch to also cover
this, so that the recovery screen is activated.
2024-07-19 19:27:04 -07:00
Tom Prince
d1f190c894
BUGFIX: Fix mathjax path on dev server. (#1501) 2024-07-19 17:13:42 -07:00
Tom Prince
dc93d166f0
BUGFIX: Use mathjax from npm, rather than vendored copy. (#1491) 2024-07-18 16:27:01 -07:00
catloversg
ceaf27714b
MISC: Remove testing code in ScriptTransformer (#1499) 2024-07-17 23:23:18 -07:00
catloversg
cea0afe1f4
EDITOR: Follow-up of #1470 (Editor outline) (#1498) 2024-07-17 15:18:10 -07:00
David Walker
abe7a43eec
MISC: Always include stack trace in Recovery Mode (#1487)
We are getting some more error reports coming in that don't have enough
info in them. It turns out that populating the stack trace was gated
behind the dev flag; in reality, production builds are where we need it
most. Even if it ends up being obfuscated (source maps should prevent
this), we can figure out the actual source lines with enough effort if
need be.

This also changes to using the actual stack trace, rather than the
"component" trace (the tree of JSX objects), since knowing where the
code failed is far more valuable. Also, it ensures we get the full error
details when things go wrong in savefile loading.
2024-07-14 22:51:18 -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
catloversg
0e1e8a9862
MISC: Disable rumor of Bladeburners in BN8 (#1484) 2024-07-14 14:20:10 -07:00
catloversg
8d39c7d9fc
UI: Only show relevant changes in "Purchased Augmentations" table (#1476) 2024-07-08 11:07:19 -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
catloversg
2b6ec5cd33
BLADEBURNER: Fix wrong behavior of ns.bladeburner.getSkillUpgradeCost (#1471) 2024-07-07 14:49:23 -07:00
jazzybones-www
1613eb38ed
BUGFIX: fix a typo in the hamming code problem statement (#1472) 2024-07-07 14:41:22 -07:00
catloversg
8f0ea7c8c4
EDITOR: Work around bug in monaco-editor (#1470) 2024-07-07 14:38:22 -07:00
catloversg
b7a996718b
UI: Tweak Hacknet summary (#1466) 2024-07-07 14:33:49 -07:00
Tom Prince
b277975656
EDITOR: Provide type definitions for React and ReactDOM in in-game editor. (#1458)
* 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
catloversg
055b4bd7bc
MISC: Add threshold for warning about system clock (#1463) 2024-07-06 22:24:51 -07:00
catloversg
f18d28fc6e
DOCUMENTATION: Add link to NS API documentation (#1460) 2024-07-06 12:54:56 -07:00
catloversg
8ade4801a9
MISC: Remove redundant type of CONSTANTS (#1464) 2024-07-06 12:52:20 -07:00
David Walker
1f2e69631e
EDITOR: Use ramOverride() to set compiled script RAM (#1446)
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
catloversg
29c54df543
BLADEBURNER: Change formula of skill cost (#1443) 2024-07-05 14:27:28 -07:00
catloversg
02f5c5b727
MISC: Update description of source files (#1461) 2024-07-05 14:17:06 -07:00
catloversg
26316c2494
BUGFIX: Fix wrong money source when traveling (#1456) 2024-07-04 14:19:36 -07:00
catloversg
313d6a28b6
MISC: Remove obsolete description of killall (#1453) 2024-07-04 00:03:18 -07:00
Snarling
8ee703760a Start 2.6.3 dev cycle 2024-07-03 19:39:21 -04:00
Snarling
633da38301
RELEASE: 2.6.2 (#1454) 2024-07-03 19:14:45 -04:00
catloversg
3c29757827
CORPORATION: Fix wrong product price calculation (#1451) 2024-07-02 15:11:32 -07:00
catloversg
960fe5aa8b
BUGFIX: Wrong success chance in ns.bladeburner.getActionEstimatedSuccessChance (#1450) 2024-07-02 15:07:56 -07:00
catloversg
922f0bfcc5
BITVERSE: Fix React warning (#1449) 2024-07-01 13:17:30 -07:00
catloversg
e66a8e319f
MISC: Remove debug code (#1448) 2024-07-01 13:16:47 -07:00
catloversg
3fafa23f28
GANG: Fix ns.gang.getRecruitsAvailable (#1442) 2024-06-28 20:18:29 -07:00
catloversg
b1c1fc24a9
GRAFTING: Add new api for checking ongoing grafting (#1435) 2024-06-28 19:59:18 -07:00
Tom Prince
32eb6324fd
MISC: Simplify graftingIntBonus calculation. (#1445)
The weight of the intelligence bonus is a multiplier to the percentage increase. So, rather than calculate it with a weight of 3 and then divide by 3, we can just calculate it with a weight of 1.
2024-06-28 19:52:36 -07:00
Sphyxis
61ec7dde80
API: Get Sleeve Success at BB tasks through existing commands (#1428) 2024-06-28 19:49:52 -07:00