Commit Graph

8055 Commits

Author SHA1 Message Date
Shy
4aaf845fca
API: make ns.atExit add the callback to an array instead of setting it (#1059) 2024-03-05 19:22:45 -05:00
Snarling
4f4c6fe7e5
Move heart.break out of Extra.ts (#1133) 2024-03-04 18:36:14 -05:00
Snarling
d801743842 Generate missing docs 2024-03-04 09:51:34 -05:00
LJ
a5f5c81912
API: Add karma to ns.getPlayer() & document ns.heart.break() (#1131) 2024-03-04 09:35:54 -05:00
LJ
65082f677e
Update rm command help text (#1132) 2024-03-04 09:30:03 -05:00
catloversg
ffc34387f0
CORPORATION: Add documentation (#1121)
This ports the PDF manual by @catloversg into .md form, so it can be used in-game and via browsing on GitHub.

It also adds MathJax rendering to in-game docs, so that the math formulas can be rendered. (GitHub already supports this natively.)
2024-03-04 03:10:18 -08:00
Bart Kuijper
6a3d22d7bd
CONTRACTS: createDummyContract returns filename (#1129) 2024-03-01 23:12:04 -05:00
LJ
4c7f192645
UI: Infiltration rewards default to the faction you're currently working for (#1114)
* Better infiltration victory faction default
* Better condition for "none" default
* Fix default faction type.
2024-02-28 16:37:27 -08:00
Yichi Zhang
6288eec6d7
HACKNET: Disallow negative count argument for spendHashes (#1127)
* disallow buying a negative amount of an upgrade
* allow 0 silently
2024-02-27 12:34:36 -08:00
Caldwell
3d6692b292
MISC: clamping numbers (#1104) 2024-02-27 09:47:00 -05:00
Snarling
153dbfff12 Changelog + doc update 2024-02-26 09:51:48 -05:00
hydroflame
483d554fc2
MISC: Update donation counter (#1118) 2024-02-26 09:42:31 -05:00
Snarling
91105c6d8c
TESTS: Prevent some test spam (#1126) 2024-02-26 08:22:33 -05:00
Snarling
373ced2efe
GO: Various changes before 2.6.0 (#1120) 2024-02-26 08:05:10 -05:00
LJ
f6871f0911
GANG: Clarify install behavior & add getInstallResult() (#1119)
New function returns post-install ascension ratios.

* Add ascension penalty to Gang constants
* Improve wording of Gang install message
* Add GangMember#getInstallResults()
* Update prestiging to use getInstallResults()
* Add ns.gang.getInstallResults(memberName)
* Update definitions
* Add ram cost for ns.gang.getInstallResult()
* Fix typo
* More specific wording in documentation
* Fix another typo
* Run prettier
* Rename getInstallResults to getPostInstallPoints
* Update Prestige.ts
* Update Gang.ts
2024-02-23 12:58:22 -08:00
hydroflame
d00fad472e
Merge pull request #1117 from bitburner-official/hydroflame-patch-1
Update package.json
2024-02-21 16:11:48 -05:00
hydroflame
b655b7a44e
Update package.json 2024-02-21 16:11:22 -05:00
LJ
1577467fe1
BUGFIX: Prevent renaming servers to hacknet. (#1112)
* Add hacknet check to renaming
* Handle manual server purchases
* Handle automated server purchases
* Remove unnecessary parenthesis

fixes #1111
2024-02-20 18:22:24 -08:00
Michael Ficocelli
ac05135f59
IPVGO: Ensure favor text is only shown for even-numbered winstreaks, not even loss streaks (#1110)
closes #1109

Ensure that loss streak tracking does not display the favor gain text, to avoid misleading players
2024-02-20 14:36:06 -08:00
Caldwell
47cf5c1610
SETTINGS: add tailRenderInterval (#1107)
currently tails are on a static rerender time of 1000ms
there are ways to force a rerender with ns.moveTail / ns.resizeTail
but i dont know why this shouldnt be a setting set by the player

currently its static set on creation of the tail window but that could be expanded to allow setting it per script
and maybe through a ns function
2024-02-19 11:19:03 -08:00
David Walker
e6755afcb3
Changelog (#1106) 2024-02-17 20:28:19 -08:00
LJ
27a8abbdec
PORTS: Support all serializable data. (#1089)
A significant portion of players who use ports are passing objects through them. Currently they are required to handle that themselves via JSON serialization. This PR adds better support for passing objects; which is more convenient, extensive, and optimized (probably, more on this one later).

This adds zero overhead to existing (or when passing any primitive types) port usage, and also isn't a breaking change. The questions to debate here are:

Should objects be supported in the first place?
If so, how exactly do we want to serialize objects?
Based on an extensive discussion in Discord, the overwhelming majority answered "yes" to question one. As for question two, that has been much more hotly contested.

Ultimately, `structuredClone` was used, despite less-than-stellar performance, because other options were worse either in safety, speed, error-handling, or multiple of the above.
2024-02-17 19:15:17 -08:00
Shy
aba2336093
add purchasedPlayer to RFA server data (#1103) 2024-02-17 00:11:29 -05:00
Snarling
9b483bdd8a
Servers are sorted on Active Scripts page (#1102) 2024-02-16 21:06:18 -05:00
Caldwell
8c8af38a3a
MISC: refactor weaken effect calculation (#1076)
so far we calculate the effect of weaken in three +1 places
ns.weaken
ns.weakenAnalyze
terminal weaken

and server.weaken where the bn mult is applied

i extracted the logic into a new netscript helper function getWeakenEffect
this gives us one place if we want to change the formula

a side effect i added the server.cpuCores to the terminal weaken to future proof it if the npc server core pr (#963) is merged
2024-02-16 17:18:16 -08:00
adeilt
93b9a10e41
UI: Improve theme support. (#1079) 2024-02-15 23:51:07 -05:00
adeilt
22aec2a8b9
DOC: Fix outdated example for ns.spawn() (#1101) 2024-02-15 23:44:25 -05:00
Shy
ef334cb851
BUGFIX: make hacknet node a bit bigger and change unit to em (#1094)
PR #1070 caused some overflow when having hacknet servers.
2024-02-15 16:33:08 -08:00
Shy
c894aba8f5
BUGFIX: fix double stringify on server array (#1100)
The server array that the RFA currently sends is stringified twice. I fixed that and also added a proper ResultType for the new data
2024-02-15 16:27:03 -08:00
LJ
ddb10f833c
TERMINAL: Add --ram-override flag to the run command (#1055)
* Add --ram-override flag to run command
* Update help command
* Fix whitespace
* Update run usage message
* Update autocomplete for run command
* Format
2024-02-15 05:51:37 -08:00
catloversg
733f2ccb5b
CORPORATION: Improve performance of cycle valuation (#1088)
This PR is an alternative for PR #1085. It includes these changes:

* Create a new property: numberOfOfficesAndWarehouses. It's used for calculating cycle valuation.
* Hardcode 1.0079741404289038 instead of calculating Math.pow(1.1, 1 / 12).
2024-02-15 05:43:37 -08:00
LJ
dc7c9bb065
BUGFIX: Attach hostname to script links in ls command (#1062)
fixes #1051

* Add hostname to script editor page options
* Add hostname option to script editor page
* Attach hostname to script links in ls
* Fix script editor page option type
2024-02-15 05:39:50 -08:00
Caldwell
b79df29ef4
nerf n00dles (#1020)
the n00dles buff is meant as a meme as far as iam aware

but the corp changes made it the core part of a "fraud" strategy
because the corp funds added have now an alot bigger effect on the valuation
thats why i think a few more 0's are needed to tune it down back to a meme
2024-02-15 05:36:04 -08:00
LJ
078f94cbc0
BUGFIX: Fix script editor documentation button using wrong URL (#1099)
* Fix script editor documentation button
* Fix lint and import url
2024-02-15 04:55:36 -08:00
Caldwell
0ba337f091
BUGFIX: few bandaids for Bladeburner (#1093)
bandaids for 3 bugs in bladeburner
this really needs proper fixes and a alot of refactoring!

the manual action start didnt start tasks the right way, modifying an existing action object instead of creating a new one
therefore the current action wasnt shown on the stats overview

the api start action didnt check for the BladesSimulacrum Aug and didnt stop current Player tasks
so the next time Bladeburner proccessed it stopped the bladeburner tasks again
when the player was doing something else like crimes

sometimes blops had an action.count of 0 even when they wherent done in that bladeburner instance yet

this happends because the BlackOps class instances are only initialized on game load
and then later on BlackOps completion manipulated
this change doesnt reset on a bitnode change or when bladeburner is deleted through the dev Menu
as a quick fix i added a new resetBlackOps function that always runs when Bladeburner processes
this isnt the best solution but any proper fix i came up with requires a refactor that i couldnt do at this moment

credits to @TheAimMan for finding the clue that the count is the problem not the rank!

edit,;
added a 4th bandaid to avoid NaN Stamina Penalty when stamina is infinite
2024-02-15 04:48:04 -08:00
Snarling
fca414e7c9 changelog
Also undid a weird style change from #1083 that I accidentally included.
2024-02-10 08:24:05 -05:00
Michael Ficocelli
ca374076b8
[IPvGO] Remove testing flag (#1016) 2024-02-10 08:04:21 -05:00
Caldwell
84c4dba1e2
UI: fix scripts recorded offline income (#1025) 2024-02-10 07:24:55 -05:00
Caldwell
fccc27fe58
MISC: HGWOptions accepts non integer (#1035) 2024-02-10 07:24:11 -05:00
catloversg
65214c0322
Change the calculation of valuation (#1056) 2024-02-10 06:48:52 -05:00
Shy
903f812424
REMOTE: add 'getAllServers' method to RFA (#1058) 2024-02-10 06:31:35 -05:00
Rinne
e8311d4f05
Changing color of stocks going up (#1065) 2024-02-10 06:28:18 -05:00
Caldwell
8c2a23f2ba
MISC: change all nextUpdates to use one Promise (#1069) 2024-02-10 06:27:47 -05:00
Shy
fbc41d0278
make hacknet node grid dynamic (#1070) 2024-02-10 04:15:27 -05:00
TheAimMan
e966e78b72
MISC: Add an option to run b1t_flume with a "quick" option (#1072) 2024-02-10 04:14:11 -05:00
Caldwell
4d551915b3
MISC: move server constants into their own constant (#1075) 2024-02-10 04:13:42 -05:00
LJ
fd5b0f8241
MISC: Use structuredClone() for deep cloning (#1077) 2024-02-10 04:10:19 -05:00
Rinne
6bd50e6f24
BUGFIX: Fixed bug that returned Infinity cost for most skills (#1084) 2024-02-10 04:01:42 -05:00
Snarling
9697a82e0c
UI: Active Scripts changes (followup to #933) (#1083) 2024-02-10 03:59:20 -05:00
Snarling
187226a30f Changelog 2024-02-01 18:20:36 -05:00