Compare commits

..

501 Commits

Author SHA1 Message Date
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
David Walker
9c9a69f2e2 NETSCRIPT: Add ramOverride() function (#1346)
This adds a way to dynamically change the static RAM limit of a script,
which is also its current RAM usage. This makes it possible for scripts
to dynamically change their memory footprint, opening up new strategies
beyond current ram-dodging.

Calling functions still permanently increases the *dynamic* memory
limit; RAM-dodging is still the optimal strategy for avoiding RAM costs,
in that sense.

This also adds dynamicRamUsage to the info returned by
`getRunningScript`, to allow introspection on the currently needed ram.
2024-06-28 18:42:20 -07:00
David Walker
1c20a24079 MISC: Make spawn able to have 0 delay (#1333)
This eliminates a hole where spawn was unrelaible, because other scripts
could jump in and steal the RAM. It's not an API break, because 0 used
to be an invalid value.
2024-06-28 18:41:41 -07:00
David Walker
06d742a7f3 BUGFIX: Fix rounding issues due to ramOverride edge cases (#1339)
*All* RAM calculations must take place in units of hundredths-of-a-GB in
order for there not to be issues.

Also adds slightly more verbose logging when the dynamic RAM check
fails.
2024-06-28 17:58:17 -07:00
muesli4brekkies
357cc568e9 TERMINAL: Tweaks and bugfixes to grep (#1431) 2024-06-28 15:13:49 -07:00
catloversg
21e984bda6 DOCUMENTATION: Clarify logging API (#1444) 2024-06-28 02:37:04 -07:00
catloversg
f620ec889c MISC: Update BitNode info and documentation (#1436) 2024-06-28 02:11:50 -07:00
catloversg
f162faf60a INFILTRATION: Improve accuracy of slash game UI (#1422) 2024-06-28 02:09:18 -07:00
catloversg
031b8b9cbb UI: Remember last position of documentation pages (#1434) 2024-06-28 02:08:10 -07:00
Snarling
64933419d6 Changelog update 2024-06-27 12:37:03 -04:00
Snarling
b597746343 TRAVEL: Unify implementation for Player and Sleeves (and some followup for #1365) (#1439) 2024-06-26 20:46:50 -04:00
catloversg
abdf5f52cd INFILTRATION: Handle automated infiltration (#1414) 2024-06-26 11:19:52 -04:00
Snarling
dc057d05fc minor package-lock update
Fixes an audit issue on a dev dependency
2024-06-25 19:30:30 -04:00
catloversg
cef789eb7c ELECTRON: Fix error with symbolic link (#1427) 2024-06-25 19:09:22 -04:00
catloversg
fd8eae5cf5 MISC: Cancel spawned scripts in Bitverse (#1429) 2024-06-24 22:20:08 -07:00
ilkecan
bf8c15332e CORPORATION: Don't check access for getConstants (#1430) 2024-06-24 22:18:57 -07:00
John Gietzen
819f877370 Update codingcontracttypes.ts to clarify '0' (#1433)
Fixes #1432
2024-06-24 22:02:11 -07:00
JamesWilcox-git
67cdd57728 BUGFIX: Hacknet level base cost multiplier fixed (#1412) 2024-06-24 21:40:50 -07:00
catloversg
5a8f0e99af SINGULARITY: Add ns.singularity.getFactionWorkTypes (#1425) 2024-06-24 20:43:36 -07:00
catloversg
0d8cc54c99 INFILTRATION: Fix React warnings (#1423) 2024-06-24 20:37:57 -07:00
catloversg
c0036b03d4 SINGULARITY: Allow being hospitalized while being busy (#1426) 2024-06-24 20:36:03 -07:00
catloversg
48bebeea2b MISC: Remove unused properties of source file (#1424) 2024-06-24 20:34:56 -07:00
Michael Ficocelli
49668f10b2 IPVGO: Fix displayed mult to match the actual bonus of SF 14.1 (#1419) 2024-06-24 20:31:09 -07:00
catloversg
847d45f4f4 GANG: Show equipments when there is not enough money (#1417) 2024-06-21 03:14:48 -07:00
catloversg
a62bdcafef BUGFIX: Fix a bug in ns.singularity.getAugmentationFactions (#1418) 2024-06-21 03:06:57 -07:00
catloversg
337fa4e274 GANG: Fix wrong wanted gain rate (#1415) 2024-06-21 03:05:33 -07:00
catloversg
eff834bfe9 BUGFIX: Fix wrong augmentation price (#1416) 2024-06-21 03:01:57 -07:00
David Walker
99b22a221c BUGFIX: Fix issues and edge-cases with rm (#1404) 2024-06-16 18:27:46 -07:00
catloversg
4382f860db CCT: Clarify empty string solution in UI (#1400) 2024-06-15 16:37:14 -07:00
catloversg
7a39a93fa9 MISC: Remove mention of re-sleeving (#1399) 2024-06-15 16:36:32 -07:00
catloversg
ceb58bc6b3 UI: Show BitNode multipliers in BN 5.1 (#1398) 2024-06-15 16:35:32 -07:00
Jesse Clark
f6de21ea18 UI: Clean up Hacknet UI (#1397) 2024-06-14 00:08:10 -07:00
muesli4brekkies
4936d14639 TERMINAL: Add grep command (#1381) 2024-06-14 00:00:48 -07:00
catloversg
a780880531 MISC: Add ns.enums to AutocompleteData (#1389) 2024-06-13 23:56:27 -07:00
Albert Llop
e9347fca76 DOCS: Fix example signature in IPvGO guide (#1396) 2024-06-13 23:55:46 -07:00
catloversg
417d420793 BLADEBURNER: Fix NaN in getSuccessRange (#1394) 2024-06-13 23:48:50 -07:00
catloversg
a12056a898 BLADEBURNER: Add remaining time for actions (#1391) 2024-06-12 19:21:23 -07:00
G4mingJon4s
bec6e82d7f EDITOR: changed editor tabs to have their own editor mode (#1372) 2024-06-12 19:19:40 -07:00
G4mingJon4s
805ca06922 TERMINAL: Added deleting entire directories using rm (#1378) 2024-06-12 19:17:39 -07:00
catloversg
344054f10d DOCUMENTATION: Clarify maximum number of ports (#1388) 2024-06-12 19:07:05 -07:00
catloversg
39b18e7659 BUGFIX: Fix wrong position name in ns.formulas.work.companyGains (#1393) 2024-06-12 14:34:13 -07:00
catloversg
2198a02152 MISC: Fix support of react-refresh-webpack-plugin (#1392) 2024-06-12 14:31:13 -07:00
catloversg
e76e254c3e BLADEBURNER: Fix wrong tooltip description in ActionLevel (#1384) 2024-06-12 01:24:57 -07:00
G4mingJon4s
ab80ee66c8 EDITOR: re-added vim notifications and register view (#1382) 2024-06-12 01:24:10 -07:00
G4mingJon4s
f25756916a GANG: added effective text to gang UI gains (#1379) 2024-06-12 01:21:27 -07:00
muesli4brekkies
7b3265346d ACCESSIBILITY: Wire cutting infil now prints colours of wire along the wire (#1380) 2024-06-09 16:49:34 -07:00
catloversg
9a2bb16548 MISC: Fix wrong help text of cd command (#1376) 2024-06-09 16:39:56 -07:00
Albert Llop
ba7d45362f bladeburner.getTeamSize: fix signature and documentation (#1383) 2024-06-09 16:39:01 -07:00
Albert Llop
995294a770 BUGFIX: bladeburner.getActionRepGain: mark level param as optional in signature (#1375) 2024-06-09 16:34:53 -07:00
catloversg
a0fc9cc713 UI: Automatically show Bitverse UI if BN is finished (#1358) 2024-06-08 13:54:44 -07:00
catloversg
a354867fc4 MISC: Refactor code of traveling and going to location (#1365) 2024-06-08 13:52:10 -07:00
catloversg
b8f03cb50b BLADEBURNER: Remove unused code (#1368) 2024-06-08 13:51:05 -07:00
catloversg
abcd6c545a BLADEBURNER: Remove obsolete fix (#1367) 2024-06-07 18:04:08 -07:00
catloversg
ebf08d5d1f BLADEBURNER: Improve terminal logging (#1361) 2024-06-07 13:41:42 -07:00
catloversg
8b3206e1c6 BLADEBURNER: Add Stop button and refactor code (#1363) 2024-06-07 13:34:47 -07:00
catloversg
d9efea0fe6 SLEEVES: Clarify augmentation condition (#1369) 2024-06-07 13:24:19 -07:00
catloversg
70383d9085 MISC: Change error message when spawning on an invalid server (#1370) 2024-06-07 13:23:04 -07:00
catloversg
16b9ad21ea MISC: Set copyright line for Electron app (#1371) 2024-06-07 13:21:26 -07:00
catloversg
e782b6fd7c DOCUMENTATION: Split changelog.md (#1374) 2024-06-07 13:20:18 -07:00
catloversg
e64247571d IPVGO: Add missing space characters in API documentation (#1373) 2024-06-07 13:15:46 -07:00
catloversg
7b3cf48453 CORPORATION: Refactor markup multiplier (#1362) 2024-06-06 23:10:16 -07:00
Michael Ficocelli
481938a2fb IPVGO: Balance and improvements for offline bonus time cycles (#1356) 2024-06-05 19:39:22 -07:00
G4mingJon4s
463d4cdb1d EDITOR: useVimEditor uses Material UI (#1332) 2024-06-05 18:30:03 -07:00
Michael Ficocelli
cf48d666f5 IPVGO: Add history, and details to status, to go API (#1348) 2024-06-05 18:24:48 -07:00
catloversg
30a6419b11 MISC: Use camel case for CSS properties (#1353) 2024-06-05 18:18:19 -07:00
catloversg
304a918cc9 BUGFIX: Fix negative elapsed time (#1354) 2024-06-05 18:11:59 -07:00
Michael Ficocelli
eeab6df718 IPVGO: Use tss-react makeStyles on the IPvGO board and UI (#1351) 2024-06-05 21:09:16 -04:00
Michael Ficocelli
fe3e8fb348 IPVGO: Fix crash caused by malformed previous move formatting (#1360) 2024-06-05 17:51:01 -07:00
Michael Ficocelli
d9e8161a64 IPVGO: Fix mismatch in board size options on save loader [save corruption bugfix] (#1355) 2024-06-05 18:27:27 -04:00
Kelenius
653d531d0a Remove sleeve message when quitting job from a script (#1357) 2024-06-05 18:25:54 -04:00
Michael Ficocelli
bd5c502f53 IPVGO: Support bonus cycles from offline time (#1345) 2024-06-04 18:43:29 -07:00
Michael Ficocelli
5f6a5c8785 IPVGO: Fix non-async promise-returning methods to be more consistent (#1327) 2024-06-04 18:37:00 -07:00
catloversg
7321d64383 BUGFIX: Fix manual hack exploit (#1324)
Formula is updated to be still relevant, but not crushing
2024-06-04 18:32:24 -07:00
Caldwell
2316bf5b69 BUGFIX: clamp bitnode mults (#1350) 2024-06-04 18:20:43 -07:00
Caldwell
c42d4143c9 BUGFIX: clamp Hackchance to prevent infinity / infinity (#1349) 2024-06-04 18:19:41 -07:00
Snarling
18ae6ce215 Changelog update 2024-06-04 10:21:44 -04:00
TheAimMan
101914b660 MISC: Add a potential of more than 1 core for initial servers (#963) 2024-06-04 09:50:28 -04:00
Snarling
3afafe4454 SLEEVE: Editorial followup on #1314 (#1347) 2024-06-04 09:49:23 -04:00
Caldwell
cb92643c7e IMPROVEMENT: partial migration @mui/styles to tss-react (#1338) 2024-06-03 12:27:13 -04:00
TheAimMan
e622b9b904 UI: change time elapsed to time remaining for programs and grafting (#1328) 2024-06-02 20:51:21 -07:00
Michael Ficocelli
d9f04203cf IPVGO: Record full history to avoid infinite ko capture loops on larger boards (#1299) 2024-06-02 20:19:26 -07:00
catloversg
2f7950b49c DOCUMENTATION: Clarify server's minimum security level (#1337) 2024-06-02 20:14:18 -07:00
gmcew
1f08724fea CORP: Products sell all at price of 0 (#1330)
Match material behaviour - price of 0 discards stored products
2024-06-02 18:01:03 -07:00
Michael Ficocelli
a28bb4bd99 IPVGO: Support playing manually as white against your scripts using the No AI type board (#1296) 2024-06-02 17:41:31 -07:00
Caldwell
f40d4f8e92 BUGFIX: fix relative imports (#1305)
Relative paths work in imports, at last.
2024-06-02 17:38:01 -07:00
Snarling
76ce2f9955 Hotfix changelog 2024-06-02 12:09:14 -04:00
catloversg
2ee548a140 BUGFIX: Fix corrupted save in Steam cloud (#1341) 2024-06-02 12:04:42 -04:00
Yichi Zhang
54d099e552 TERMINAL: Fix autocomplete for mixed case strings (#1323) 2024-05-29 11:34:46 -07:00
catloversg
bd6585617c UI: Reverse order of Black Operations list (#1322) 2024-05-29 01:31:44 -07:00
catloversg
f439352438 BUGFIX: Fix wrong HP after calling applyEntropy (#1313) 2024-05-28 12:15:12 -07:00
catloversg
c2a56a6150 MISC: Refactor favor code (#1321) 2024-05-28 12:04:16 -07:00
catloversg
b8d3109158 MISC: Change type of location parameter/property (#1316) 2024-05-28 11:49:48 -07:00
Sphyxis
bed66f980f BUGFIX: BB Sleeves cannot be assigned to contract programmatically (#1314) 2024-05-27 18:32:21 -07:00
Yichi Zhang
e674a177d6 BUGFIX: Check that the augmentation is available before installing it on a sleeve. (#1320) 2024-05-27 15:34:19 -07:00
catloversg
53f187fb89 MISC: Fix wrong text in Tutorial and NetscriptDefinitions.d.ts (#1319) 2024-05-27 15:30:32 -07:00
catloversg
ee4471e22c INFILTRATION: Change description of slash game (#1317) 2024-05-27 15:29:10 -07:00
Sphyxis
4b5e0b1f6a BUGFIX: Update GraftingWork.tsx (#1315)
Removed the purposeful structural typo as it was causing bug reports.
2024-05-27 15:22:31 -07:00
Kelenius
bf5c43daa2 UI: Add a stop button to bladeburner (#1312) 2024-05-27 15:02:56 -07:00
gmcew
30cdaa1a7a DOCS: Faction work description update (#1310)
- made it clear security gives hacking exp, and utilises it too
- clarified weighting of stats for hacking/field work.
2024-05-27 14:52:05 -07:00
catloversg
48a7eb364f DOCUMENTATION: Fix wrong examples in NetscriptDefinitions.d.ts (#1309) 2024-05-27 14:42:31 -07:00
catloversg
70521c9156 BUGFIX: Fix hidden debt of exp at level 1 (#1292) 2024-05-27 14:20:41 -07:00
Michael Ficocelli
efd4152eed IPVGO: Fix outdated docs (#1306) 2024-05-23 20:07:45 -04:00
Jesse Clark
23445a917d Give the player starting money and programs as declared in augmentation definitions (#1304) 2024-05-23 01:55:06 -07:00
catloversg
8703da4ab6 BUGFIX: Save position of cursor when switching tabs and unmounting editor (#1297) 2024-05-23 01:51:33 -07:00
gmcew
7f8757b536 SLEEVE: Add funds check for sleeve travel (#1298)
This makes it consistent with player behaviour. This also makes the function description more truthful in that it is now possible to return false.
2024-05-23 01:46:55 -07:00
catloversg
b42f775493 BUGFIX: Fix wrong money gain rate of Hacknet node (#1303) 2024-05-23 01:45:04 -07:00
catloversg
30c04f8152 DOCUMENTATION: Fix wrong examples in NetscriptDefinitions.d.ts (#1295) 2024-05-23 01:42:47 -07:00
catloversg
81a707123e BUGFIX: Engine does not send all faction invitations (#1277) 2024-05-23 01:40:23 -07:00
catloversg
cfa941ce58 DOCUMENTATION: Clarify multipliers of Hacknet server (#1291) 2024-05-23 00:49:06 -07:00
gmcew
c82b2e15a0 MISC: Additional clarity in 'HammingCodes: Encoded Binary to Integer' (#1289)
Should have done this in PR #1244
2024-05-23 00:45:25 -07:00
gmcew
fe14d4fef3 CCT: Minor simplification of 'Shortest Path' solver (#1288)
BFS shouldn't need some checks.
Also allows deletion of a helper file used by this function only.
2024-05-23 00:44:41 -07:00
G4mingJon4s
08eb60d21b EDITOR: Improved infinite loop checking (#1276) 2024-05-23 00:44:15 -07:00
Yichi Zhang
7ed64cbc9c Improve performance of checker for valid math contracts (#1286) 2024-05-23 00:41:52 -07:00
catloversg
819e9f3448 MISC: Embed JetBrainsMono font (#1246) 2024-05-22 21:50:09 -04:00
catloversg
7bb36ec111 MISC: Refactor InvitationModal and AlertManager (#1287) 2024-05-22 21:43:31 -04:00
Snarling
fe7e1c86bc Start 2.6.2 cycle (#1301) 2024-05-22 01:35:35 -04:00
Snarling
d2c7b2504c Release 2.6.1 (#1300) 2024-05-22 01:14:52 -04:00
catloversg
175af0bd28 BUGFIX: Improve implementation of getRandomInt (#1282) 2024-05-18 15:12:06 -07:00
TheAimMan
8deb907b89 BUGFIX: Correct BN10 Sleeve starting Shock (#1285) 2024-05-17 13:31:40 -07:00
gmcew
36e3dd73ac IPVGO: Tetrads do def (#1284) 2024-05-17 04:59:21 -07:00
catloversg
585e089976 DOCUMENTATION: Clarify 2 forms of flag in ns.flags (#1283) 2024-05-17 04:57:10 -07:00
Vilsol
7a4a973c06 DOC: remove redundant @remarks for sqlinject() function (#1281) 2024-05-17 04:55:50 -07:00
gmcew
1d8a1d5089 UI: Trigger RAM checking on tab closure (#1279)
Fixes UI bug described at https://discord.com/channels/415207508303544321/415213413745164318/1240361787564490854
2024-05-17 04:46:04 -07:00
gmcew
7113ee5425 UI: Hacknet terminology consistency (#1256)
* UI labels/Augment effects reworded to remove the "Node" parts
* No changes to API-facing labels/savedata/functions
2024-05-17 04:44:09 -07:00
David Walker
38d99ff15e IPVGO: Remove unneeded functions from boardState.ts (#1270) 2024-05-16 12:26:18 -07:00
Snarling
b7962ad8ab Increment version number early
This is needed to avoid API break spam every time the player loads the game.
2024-05-14 20:18:00 -04:00
Snarling
ed308b4fa6 Changelog update 2024-05-14 20:12:55 -04:00
Snarling
574c284321 API: Add API break utilities, and add an API break for bladeburner.getCurrentAction (#1248) 2024-05-14 19:24:03 -04:00
catloversg
9dc3b22919 BUGFIX: Tail window position does not update when being dragged (#1275) 2024-05-13 00:27:21 -07:00
catloversg
25afecc0ec CORPORATION: Rename functions in Actions.ts (#1272)
This should be a straight rename, no functionality changes.
2024-05-12 14:52:07 -07:00
catloversg
7f5bc5700e CORPORATION: Refactor bribery (#1268)
This also removes the useless restriction Player.hasGangWith(factionName). When the corporation is strong enough to bribe, the gang is useless. This problem was discussed on Discord.
2024-05-12 14:49:11 -07:00
Michael Taylor
da6262c856 Modify the source code TS file mode to be a regular (non-executable) file (#1269) 2024-05-11 21:57:21 -07:00
catloversg
1288d1c289 API: Update getInfiltration API (#1235) 2024-05-11 20:13:59 -04:00
catloversg
e478b9a224 MISC: Log invalid file request in Electron app (#1267) 2024-05-11 17:04:54 -07:00
catloversg
7ee7a79763 INFILTRATION: Fix a crash when rendering InfiltrationRoot with an invalid location (#1266) 2024-05-11 17:04:02 -07:00
gmcew
519b4fef44 MISC: Hamming Code Contract description clarification (#1244)
Rewording of the Hamming code contract wording based on suggestion at discord.
There's further scope on other contracts to clean up inconsistencies in example formatting.
2024-05-11 17:00:36 -07:00
Snarling
e23db93c8b GO: Alternate fix for race conditions (#1260) 2024-05-11 19:58:59 -04:00
gmcew
1b8205e9d5 UI: Bladeburner console to use Settings.TimestampsFormat for logging (#1265) 2024-05-11 19:10:55 -04:00
catloversg
52111f6e07 INFILTRATION: Format damage in Intro UI (#1264) 2024-05-10 18:56:24 -07:00
catloversg
8ebfcdb089 MISC: Fix bugs in useRerender hook and ns.moveTail (#1263) 2024-05-10 18:55:45 -07:00
catloversg
19984a6f22 UI: Fix clipped numbers when values are too big in Augmentations page (#1250) 2024-05-10 18:51:12 -07:00
catloversg
b88361921e MISC: Remove tsdoc-metadata.json (#1262) 2024-05-10 18:50:27 -07:00
Michael Ficocelli
591ad45154 IPVGO: Handle RNG seeding and visual board updating bugs (#1258) 2024-05-10 01:58:09 -07:00
Michael Ficocelli
b53c35126e IPVGO: Provide API for getting game stats per opponent (#1255)
Give users access to wins, losses, stat bonuses, and favor gained
2024-05-10 01:57:03 -07:00
catloversg
35c32e2871 BUGFIX: Fix unresolved promise in ns.prompt API (#1257) 2024-05-10 01:55:50 -07:00
catloversg
e55387df4d INFILTRATION: Rename variables in slash game (#1253)
This PR renames variables in the slash game to match the new description/wording in #1243.
2024-05-10 01:39:20 -07:00
catloversg
2414949c2c MISC: Update formatHashes function (#1252)
When hash/hashRate value is too small, formatHashes converts it to the useless string 0.000. This PR fixes that.
2024-05-10 01:38:38 -07:00
catloversg
309cd55085 UI: Change buttons in Tutorial (#1251) 2024-05-10 01:34:45 -07:00
catloversg
8289b23cff UI: Wrap long text in Active Scripts UI (#1247) 2024-05-09 17:07:41 -07:00
catloversg
aef362204d MISC: Handle error when getting save data (#1241) 2024-05-09 02:19:30 -07:00
TheAimMan
bfb9841832 DARKWEB: Update DarkWeb.tsx to buy all possible programs using buy -a (#1240) 2024-05-09 02:18:03 -07:00
catloversg
6f009679ad INFILTRATION: Add HP and damage to Intro UI (#1242) 2024-05-08 17:10:20 -07:00
catloversg
6a1691fe54 CORPORATION: Update tooltip of storage space (#1237)
The tooltip of the storage space only shows sizes of materials/products. This is confusing for newbies. They use "Unit" (number of material/product units) when buying materials, but that tooltip only shows sizes without any description.
2024-05-08 16:29:03 -07:00
catloversg
bc71b8e18f INFILTRATION: Update slash game wording / balance (#1243) 2024-05-06 14:07:27 -04:00
catloversg
a79d7f9e45 BUGFIX: Fix wrong zoom factor in Electron app (#1245) 2024-05-06 13:13:56 -04:00
catloversg
478646290e BUGFIX: Fix #795 (#1231) 2024-05-02 18:39:30 -04:00
catloversg
5696db2788 MISC: Fix ghost processes when Electron code crashes too early (#1238) 2024-05-02 18:38:39 -04:00
catloversg
d4bdb8de2b MISC: Rework reputation bonus after installing a backdoor (#1236) 2024-04-28 18:35:56 -07:00
catloversg
4d3dbf169d INFILTRATION: Increase timePreparing in SlashGame if players have WKSharmonizer (#1232) 2024-04-27 02:13:16 -07:00
catloversg
dc4a85e591 CORPORATION: Fix wrong error message in buyMaterial API (#1234) 2024-04-27 02:10:58 -07:00
catloversg
de8883ed0f BUGFIX: Fix #998 (#1233)
CorruptableText wasn't updating state properly
2024-04-27 02:10:17 -07:00
catloversg
3fac471d51 EDITOR: Add "arguments" to the keyword list (#1230) 2024-04-24 16:10:20 -04:00
Michael Ficocelli
0f23c95737 IPVGO: Remove opponent from react state (#1222) 2024-04-24 16:10:01 -04:00
Snarling
f4fcb5cde1 Changelog update 2024-04-23 21:03:58 -04:00
David Walker
e56ed353e5 (Partial) fix for #795 (#1223) 2024-04-23 20:40:59 -04:00
hydroflame
d3b9f32c3f MISC: Rename an aug (#1218) 2024-04-23 20:40:12 -04:00
David Walker
384d1c1a2b NETSCRIPT: A minorly breaking change around script launch, and refactoring. (#1213) 2024-04-23 20:21:05 -04:00
catloversg
7a1fce6f64 CORPORATION: Fix wrong average price of material (#1227) 2024-04-23 20:14:22 -04:00
catloversg
eba86e4bf0 BUGFIX: Fix #997 (#1226) 2024-04-23 20:05:24 -04:00
Caldwell
a3f9a5c21e update and fix (#1225)
Co-authored-by: Caldwell <15591472+Caldwell-74@users.noreply.github.com>
2024-04-23 20:00:28 -04:00
catloversg
703e7c52ae MISC: Remove unused constants (#1229) 2024-04-23 19:58:45 -04:00
catloversg
7b993f3550 MISC: Remove file-saver (#1217)
Also refactor to dedup our own download code
2024-04-19 13:38:44 -07:00
catloversg
216500ed32 CORPORATION: Add a new API to sell a division (#1210)
Also refactoring around use of "player" variable (whether it is capitalized or not).
2024-04-15 21:19:47 -07:00
Michael Ficocelli
dd3975ab1d IPVGO: Fix formatting to avoid breaking external editors (#1215) 2024-04-11 14:28:06 -07:00
Michael Ficocelli
ed59f325ef IPVGO: Ensure full name of method is recorded in the possibleLogs list, to be matched later (#1207) 2024-04-09 18:24:57 -07:00
Michael Ficocelli
057ccc2a2b IPVGO: Improve error logging to include stacktraces (#1212) 2024-04-09 06:36:05 -07:00
catloversg
1ad6f9f310 CORPORATION: Update documentation (#1209)
New optimal strategy based on API tweaks.
2024-04-08 14:46:16 -07:00
Michael Ficocelli
104a97d711 DOCS: Link to stable instead of dev for player-facing docs (#1208)
* DOCS: Link to stable instead of dev for player-facing docs, to avoid confusion about features that are not yet released or finalized
2024-04-08 14:40:53 -07:00
Snarling
be437c83f6 BLADEBURNER: Allow unsafe positive integers for skill upgrade count (#1211) 2024-04-08 06:33:45 -04:00
catloversg
7ae309edda UI: Increase margin bottom for BitNode Multipliers in Stats page (BN1) (#1204) 2024-04-02 03:07:49 -07:00
p0n24
7ab4ad8174 fix documentation typo (#1203) 2024-03-31 13:53:51 -07:00
catloversg
524714601e CORPORATION: Add missing checks for Export API (#1202) 2024-03-31 13:53:02 -07:00
T.J. Eckman
da7f01cca9 DOCS: Fixed a typo in tutorial (#1201) 2024-03-31 13:51:48 -07:00
Michael Ficocelli
6c9555ba32 IPVGO: Tweak cheat success scaling so it is applicable even to endgame stats (#1194) 2024-03-30 16:22:53 -07:00
Snarling
6beb6e9f95 BLADEBURNER: Followup for #1154 (#1200) 2024-03-29 20:43:28 -04:00
catloversg
61274310d6 DEVMENU: Remove SaveFileDev (#1196)
It was broken and no one could be found who had used it.
2024-03-29 14:01:21 -07:00
Snarling
12f9a2b24d Bugfix
Fix Skill.maxLvl defaulting to 1
2024-03-29 14:27:36 -04:00
catloversg
c467daaf86 DOCUMENTATION: Fix wrong identification of inline mathematical expressions (#1195)
Applies backslashes to all relevant "$".
2024-03-29 01:42:18 -07:00
Snarling
a923041382 Changelog update 2024-03-29 01:20:49 -04:00
Paco Delozanne
ae1ca8f9a6 NETSCRIPT: Add Singularity.getFactionEnemies() (#1192) 2024-03-29 01:16:54 -04:00
Snarling
6669c4da6a BLADEBURNER: Typesafety / refactoring (#1154) 2024-03-28 21:52:37 -04:00
adeilt
5f1a94a9d3 DEV: improve "git blame" for contributors (#1092) 2024-03-28 21:28:05 -04:00
Michael Ficocelli
fe87f1f628 IPVGO: Bugfixes (#1193)
* 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 (#1162)
* 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
David Walker
75dabd10be NETSCRIPT: add formulas.hacking.growAmount() (#1090)
Also, improve docs.
2024-03-26 03:26:50 -07:00
Michael Ficocelli
d8de22a273 IPVGO: Nerf overly-difficult handicap, [issue #1169] misc bugfixes (#1188)
* IPVGO: Nerf overly-difficult handicap on 5x5 board

* IPVGO: Tweak 5x5 handicap
2024-03-25 16:12:35 -07:00
catloversg
714c1cc9d6 CORPORATION: Update documentation (#1191) 2024-03-25 14:49:43 -07:00
adeilt
08097aaf09 CORPORATION: more granular office size upgrades (#1179)
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 #1166 for details of current behavior.
2024-03-24 17:37:08 -07:00
catloversg
db226ce0b8 MISC: Remove isString utility function (#1185) 2024-03-23 02:46:52 -07:00
catloversg
c5581e92bc MISC: Make text file (txt, json) clickable when using ls (#1172) 2024-03-23 02:45:48 -07:00
catloversg
7c4cd7ef86 MISC: Update devDependencies (#1186)
Removing unused dependencies
2024-03-22 16:52:34 -07:00
Snarling
28a4af0ddc Changelog update (#1184) 2024-03-21 21:36:18 -04:00
Snarling
0c2a59bb6c CREDITS: Add d0sboots as documented maintainer (#1183) 2024-03-21 18:32:02 -04:00
catloversg
99f7a4cc7b IPvGO: Fix API documentation (#1171)
Proper fix for table pre layout
2024-03-21 14:39:37 -07:00
catloversg
35a34470a2 CORPORATION: update documentation (#1182)
Tweak several formulas
2024-03-21 14:37:50 -07:00
catloversg
c637d0e4e4 SINGULARITY: Fix API documentation (#1181) 2024-03-21 14:27:13 -07:00
Caldwell
803afc5244 SLEEVES: add nextCompletion to SleeveInfiltrationWork (#1177)
* add nextCompletion to InfilWork

and make nextCompletion in BladeburnerWork uniform with other promisePairs
2024-03-20 23:11:12 -07:00
catloversg
bbd942ceca MISC: Suggest automatic translation systems not translate our game (#1180) 2024-03-20 20:39:23 -04:00
Michael Ficocelli
1e5f7184a2 IPVGO: Remove current game history from savefile, re-implement superko (#1175) 2024-03-20 20:37:20 -04:00
catloversg
fc8958af83 MISC: Remove jquery (#1167)
Changes wget, which was the only thing using it.
2024-03-20 14:20:29 -07:00
Michael Ficocelli
6b9f9ef7fa IPVGO: Balance: Reduce base bonuses, increase SF 14.1 to compensate (#1176)
* IPVGO: Balance: Reduce base bonuses, increase SF 14.1 to compensate

* Fix ts doc format

* Do not show "No AI" opponent in stat summary page
2024-03-20 14:12:35 -07:00
Michael Ficocelli
dd4b54406c IPVGO: Bugfix: Require special opponent to be on the fixed size board (#1170) 2024-03-19 14:23:50 -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 (#1142) 2024-03-19 14:07:15 -04:00
LJ
6aaeb6b59e Fix sing function for bn14 (#1168) 2024-03-18 00:54:20 -04:00
Michael Ficocelli
edf8e24046 IPvGO: Bugfix: ensure the 'No Ai' white player can still pass, and fix missing dead nodes (#1165) 2024-03-17 14:15:53 -07:00
gmcew
c0662599b3 MISC: Stanek UI description corrections (#1161)
Corrected description on charging efficacy against threadcount and time

From https://github.com/bitburner-official/bitburner-src/issues/689, description has been corrected to reflect the scaling for highestCharge and numCharge
2024-03-14 18:51:32 -07:00
catloversg
7ef7b692d0 MISC: Filter servers in autocomplete data (#1164) 2024-03-14 17:55:06 -04:00
FoGsesipod
25ac8432fc BUGFIX: spawn() log reads "seconds" instead of "milliseconds" (#1158) 2024-03-11 15:25:02 -07:00
Snarling
0457081908 Changelog + generate docs 2024-03-11 13:14:33 -04:00
Snarling
162310f005 UI: Fix go colors for light theme (#1155) 2024-03-11 13:13:22 -04:00
Michael Ficocelli
c703b71871 IPVGO: Ensure that the player has the prerequisites to face the secret opponent (#1157) 2024-03-11 12:57:44 -04:00
Snarling
e9d1ddfaf3 SAVEGAME: Reduce size of savefile (#1148)
Storing less info in the save for Factions/Companies if it's still the default info
2024-03-11 08:58:10 -04:00
LJ
4d5401f62e 4 (#1152) 2024-03-10 07:36:20 -04:00
adeilt
de5c1bbf98 DOC: Add namespaced example to disableLog doc. (#1150)
It probably won't be used that often, but "ui.setTheme" seemed the least spoilery function name to use as an example.
2024-03-09 15:25:48 -08:00
User670
c93205fec6 MISC: add a missing word in a comment in crime.ts (#1145) 2024-03-08 11:53:14 -08:00
LJ
09c5ec7769 GANG: Correctly display effects of justice tasks on wanted gain rate (#1144) 2024-03-07 23:46:25 -05:00
Michael Ficocelli
33af6685f8 IPVGO: Fix displayed maximum favor in tooltip to update with player bitnode status (#1143) 2024-03-07 23:46:08 -05:00
Shy
d2dd6916b1 allow json (#1137)
Allow creating .json files.
Also added the json language server so syntax highlighting and validation works with the ingame editor
2024-03-06 15:52:32 -08:00
Snarling
863ac2c8c0 Historical changelog update for hotfix 2024-03-06 16:33:21 -05:00
Michael Ficocelli
1547581c24 IPVGO: Fix self-capture move evaluation (#1140) 2024-03-06 16:23:16 -05:00
Snarling
1755b7cd7f 2.6.1dev initial state 2024-03-05 20:54:11 -05:00
Snarling
0bf01aacab RELEASE: 2.6.0 (#1136) 2024-03-05 20:46:46 -05:00
Snarling
69babf02b2 Changelog before 2.6.0 2024-03-05 20:18:22 -05:00
Snarling
d61e12fdd1 API: Minor followup changes for #1059 (#1135) 2024-03-05 19:42:55 -05:00
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
LJ
2f2355942f Kill all scripts upon entering the bitverse (#1042) 2024-01-31 19:44:31 -05:00
TheAimMan
330a32e1d0 MISC: Don't include temporary scripts into Recently Killed (#1045) 2024-01-31 19:43:48 -05:00
LJ
011d5e8fd6 BUGFIX: Properly deep copy array data for coding contracts (#1064) 2024-01-31 19:43:04 -05:00
Rinne
5277db2c65 API: Changing return value of ns.bladeburner.getSkillUpgradeCost to return Infinity when the skill's level overshoot the maximum level (#1060) 2024-01-31 19:40:27 -05:00
Snarling
497618dc2f Generate missing docs 2024-01-31 19:37:08 -05:00
Snarling
0ded11af53 TERMINAL: Fix inconsistent / janky scrolling behavior (#1063) 2024-01-31 19:32:42 -05:00
Michael Ficocelli
cf45981cd2 [PATCH][IPVGO] Use colors from theme for white and black, to support lower-contrast options (#1074) 2024-01-31 19:32:28 -05:00
David Walker
55e21d1e19 Make grow formulas faster and more accurate. (#1044) 2024-01-31 19:27:31 -05:00
LJ
b6b4788845 GANG: Reuse one promise for ns.gang.nextUpdate() (#1068) 2024-01-27 17:25:30 -05:00
LJ
05295598a4 BUGFIX: Format money requirement in fl1ght.exe (#1061) 2024-01-25 01:45:39 -05:00
deansvendsen
cb7c75a3ce MISC: Gang Expenses category in MoneySource (#1043) 2024-01-23 18:18:56 -05:00
catloversg
51ac4d009c Fix wrong demandRange of Minerals (#1053) 2024-01-23 16:18:32 -05:00
deansvendsen
f79470148e DOCS: Adding information to CONTRIBUTING.md (#1049) 2024-01-23 16:18:00 -05:00
Snarling
788a7549da Update Constants.ts 2024-01-15 06:18:55 -05:00
Justin
39c5a356b1 BUGFIX: Fix writePort() error where deconstructing the Port class caused the reduce() function to lose its 'this' reference (#1037) 2024-01-15 06:14:13 -05:00
LJ
157ff8ea88 PORTS: Add ns.nextPortWrite() as a safer option (#1036) 2024-01-15 06:10:39 -05:00
Snarling
d0e66d5be2 Changelog update 2024-01-14 16:48:14 -05:00
Caldwell
2ac0470cea adding int stat to sleeve overview and more stats overview (#1030) 2024-01-14 16:34:48 -05:00
Jesse Clark
c5ca30d796 add descriptions for hacknet_node_level_cost and hacknet_node_core_cost (#1032) 2024-01-14 16:12:49 -05:00
Shockwave
63574bca0c MISC: Several typo fix in corporation modals (#1029) 2024-01-14 16:12:28 -05:00
Snarling
44f0a77c4e PORTS: One promise, one resolver (test) (#1022) 2024-01-14 16:05:57 -05:00
Michael Ficocelli
87c4cbbc57 [IPvGO] Performance enhancement: async move option lookup (#1028) 2024-01-09 18:46:01 -05:00
Caldwell
6f8a59593a EDITOR: fix disposing models (#1026) 2024-01-09 18:45:31 -05:00
TheAimMan
82511e5030 BUGFIX: Update formatPercent to not use a suffixStart of 0 (#1024) 2024-01-08 10:25:20 -05:00
Shockwave
7017f3c2f8 API: Fix serverExists() return true for not revealed servers (#1013) 2024-01-07 11:40:07 -05:00
Snarling
f0f335e09a changelog update, regenerate docs 2024-01-07 08:37:38 -05:00
LJ
a433c8284c NETSCRIPT: Add .script deprecation notice & migration guide (#1007) 2024-01-07 08:15:24 -05:00
TheAimMan
9827fda4a4 BUGFIX: formatNumber throws an error if suffixStart is too low (#957) 2024-01-07 08:14:02 -05:00
TheAimMan
dd9ace7891 PROGRAMS: Change flight.exe to easily display unmet requirements (#939) 2024-01-07 08:12:16 -05:00
Miłosz Giera
1b03618555 REMOTE: Added possibility to change target IP of remote API (#943) 2024-01-07 07:57:54 -05:00
Shy
68a8427838 EDITOR: Add file URI's to monaco to improve intellisense (#1017) 2024-01-07 07:13:52 -05:00
Michael Ficocelli
7e721c144e [IPvGO] Docs improvements and other feedback (#1011) 2024-01-05 20:50:28 -05:00
Collin Pearce
0da9d9d3c0 fix player input parsing for coding contracts that accept arrays of strings (#937) 2024-01-02 09:26:34 -05:00
Jesse Clark
8742df9588 fix for stanek.acceptGift not working (#1001) 2024-01-02 09:12:14 -05:00
catloversg
4db4b77954 Change import declaration of arg library (#962) 2023-12-28 02:00:12 -05:00
Jesse Clark
1dac133ef4 Align columns in warehouse storage breakdown (#970) 2023-12-28 00:25:57 -05:00
Shockwave
e096456c29 Update StaneksGiftRoot.tsx (#987) 2023-12-27 06:10:35 -05:00
Rinne
eba840dcd3 API: Updating typing for ns.singularity.getCurrentWork() (#989) 2023-12-27 06:06:45 -05:00
Snarling
550829a1c3 Fix #944 merge errors 2023-12-27 04:35:58 -05:00
draughtnyan
ccf0aa4771 UI: 'Disable Text Effects' setting applies to "corrupted text" (#944) 2023-12-27 03:30:08 -05:00
Snarling
e7b68676f5 UI: Hash upgrade descriptions use number formatting options (#996) 2023-12-27 03:26:40 -05:00
Snarling
498bb6128a Handle br tag in tables (#995) 2023-12-27 02:04:52 -05:00
Snarling
a42b72d31a INFILTRATION: Different visual rework for CheatCodeGame (#994) 2023-12-27 00:45:40 -05:00
Snarling
489ba595f3 VERSION: Begin 2.6.0 dev cycle (#992) 2023-12-26 11:53:27 -05:00
Michael Ficocelli
7ef12a0323 BITNODE: IPvGO territory control strategy game (#934) 2023-12-26 11:45:27 -05:00
Snarling
c6141f2adf RELEASE: 2.5.2 (#990) 2023-12-26 10:59:33 -05:00
Snarling
2b7f6381eb Changelog update 2023-12-22 06:54:53 -05:00
Kelenius
5789003d46 Gave bit fluming its own message (#974) 2023-12-19 05:28:34 -05:00
Snarling
3a7ff7880d COMPANY: Show unqualified direct promotion (followup) (#983) 2023-12-19 05:27:26 -05:00
Snarling
09b74a3868 BLADEBURNER: Different solution for Enter key support in team member modal (#984) 2023-12-19 05:21:25 -05:00
Shockwave
28d1610bac Update Prestige.ts (#985) 2023-12-19 05:21:05 -05:00
Tibo De Peuter
1ce22e9788 MISC: Fix various typos (#982) 2023-12-18 08:21:47 -05:00
Jesse Clark
28ef5df880 COMPANY: Much better job location interface (#927) 2023-12-18 07:23:47 -05:00
Snarling
97d679bdac MISC: Protect against reassigning certain globals (#972) 2023-12-16 05:03:52 -05:00
Kelenius
da1b8533e0 Added "prev" and "next" buttons to job screen (#932) 2023-12-16 05:00:19 -05:00
Jesse Clark
417671ecb8 CORPORATION: Account for CapEx and Cap Gains differently (#977) 2023-12-16 04:56:57 -05:00
DJMatch3000
a6436ca4b3 MISC: Revert default HGW threads from 1 to number of script threads (#978) 2023-12-16 04:38:39 -05:00
Jesse Clark
473217ef31 API: Programming-friendly interface to getFactionInviteRequirements (#953) 2023-12-16 04:27:22 -05:00
TheAimMan
e957864c4b Fix missing check on singularity.getCurrentWork (#971) 2023-12-09 06:11:46 -05:00
Snarling
c6434e2297 Quick changelog update 2023-12-09 06:06:14 -05:00
Snarling
a3c26caf2c npm run doc 2023-12-07 21:26:28 -05:00
TheAimMan
5482848eeb SLEEVE: Add task counter to Crimes and BladeBurner (#930) 2023-12-07 21:24:50 -05:00
Jesse Clark
902306530c CORPORATION: Use accounting methods for all funds transactions (#949) 2023-12-07 21:22:21 -05:00
Snarling
b114fb9eed Changelog update 2023-12-07 21:20:58 -05:00
Jesse Clark
ecc63eb07e FACTIONS: Fix for faction names staying scrambled after joining (#968) 2023-12-07 20:53:28 -05:00
Kelenius
107b4e90e9 Changed message when buying tor router (#948) 2023-12-07 20:51:29 -05:00
David Walker
61ffed9b3a BUGFIX: Fix additionalMsec overflow issue (#941) 2023-12-07 20:34:49 -05:00
Sphyxis
21c7f56d23 TERMINAL: Updated Alias/Unalias (#914) 2023-12-07 20:15:55 -05:00
TheAimMan
89fc22f28f IMPROVEMENT: Apply core bonus for share and stanek (#913) 2023-12-07 20:10:21 -05:00
Jesse Clark
544c38065e DOC: Create factions-list documentation page (#904) 2023-12-07 20:07:01 -05:00
LJ
1ce0584b25 MISC: Switch port.nextWrite() from LIFO to FIFO (#965) 2023-12-07 18:00:01 -05:00
TheAimMan
375cf453b3 BUGFIX: Properly apply entropy to hacknet multiplers (#969) 2023-12-07 17:57:54 -05:00
catloversg
4dd4f920c3 Remove unused code in OfficeSpace (#961) 2023-12-07 07:55:30 -05:00
David Walker
019f2d6a11 DOCS: Add type of return for 3 formulas functions. (#967) 2023-12-07 07:33:15 -05:00
draughtnyan
b46b6e62bc Fix script autocompletion bug w/ subdirectories (#947) 2023-12-04 14:39:08 -05:00
Sphyxis
79b0f83b5f DEVMENU: Easier to add/remove sleeves (#908) 2023-12-04 14:36:00 -05:00
Kelenius
76f0f3d6d3 Remove inter-fragment borders in Stanek's gift (#929) 2023-12-03 04:55:13 -05:00
Sphyxis
3b4cac5584 BITVERSE: Updated BN 3 from easy to hard (#909) 2023-12-03 04:21:24 -05:00
Kelenius
aee353a54e Fix warehouse not updating after product sale (#925) 2023-12-03 04:13:06 -05:00
Shockwave
1dc4d01d64 Fix bug in SF9.3 reward server cpuCores (#938) 2023-12-03 04:12:20 -05:00
Jesse Clark
99383eb1c7 Only show "joining this faction will prevent you from joining enemies" for factions that have enemies (#921) 2023-12-03 04:07:59 -05:00
Jesse Clark
7fc46649f9 FACTIONS: fix unstable display order (#920) 2023-12-03 04:06:30 -05:00
Jesse Clark
34cc0441c2 Remove cooldown from "Sell corporation and start over" (#919) 2023-12-03 04:03:30 -05:00
Trambelus
f2baa04f45 CCT: Fewer money coding contracts if the reward would be $0 (#918) 2023-12-03 04:00:15 -05:00
Caldwell
8b6caeb68b STOCKMARKET: Added slight randomization to when stock forecasts can flip (#911) 2023-12-03 03:45:42 -05:00
Snarling
997ae8c176 Changelog reset for 2.5.2 dev cycle 2023-11-30 17:21:31 -05:00
Snarling
05875e4f3e Bump version number
Missed this in previous release update
2023-11-30 17:01:56 -05:00
Snarling
f93bbfbd5d UPDATE: 2.5.1 Release (#952) 2023-11-30 16:46:56 -05:00
Snarling
6a76e1a9ab Changeog 2023-11-07 19:38:50 -05:00
Snarling
aaf80a9a33 SLEEVE: Add a nextCompletion promise to SleeveBladeburnerWork (#916) 2023-11-05 20:09:34 -05:00
Sphyxis
0c4cf81f66 FIX: #896 - Establish a base growth in Bladeburner (#899) 2023-11-05 04:43:33 -05:00
Snarling
99afd2ff2a Fix FactionsDev issue
Receive all invites button was only setting the alreadyInvited flag for the selected faction, instead of all factions.

Also some slight refactoring / variable name improvements.
2023-11-05 04:40:30 -05:00
Jesse Clark
9585913e0a FACTIONS: fix invite requirement for slum snakes (#915) 2023-11-05 01:07:05 -04:00
Sphyxis
b06b8bbdde BLADEBURNER: Updated descriptions (#906) 2023-11-03 21:48:46 -04:00
Caldwell
4e8c43fdbe install latest eslint (#912) 2023-11-03 21:20:32 -04:00
TheAimMan
14b4722210 Clear Stanek before applying entropy on prestige (#907) 2023-11-03 21:12:08 -04:00
Sphyxis
2df04bc567 SLEEVES: Set to Idle in UI (#903) 2023-11-03 21:01:53 -04:00
omuretsu
e56e3dddf1 Fix stuff I broke in #910 2023-11-02 18:57:22 -04:00
Snarling
2997384403 FACTIONS: Followup changes for Rumors PR (#910) 2023-11-02 11:02:12 -04:00
Jesse Clark
fdcb8306d9 FACTIONS: Add "Rumors" system for learning about faction join requirements (#888) 2023-11-02 10:20:24 -04:00
Shockwave
023f32bce3 FORMULAS: Removing the possible exception when gymGains/universityGains is called (#898) 2023-11-01 20:22:17 -04:00
François Gannaz
87e2f5c23b TERMINAL: Fix autocompletion when running scripts with the "./" command (#900) 2023-10-30 12:32:11 -04:00
TheAimMan
6f67224146 BUGFIX: Add effect definition to fragmentObject (#891) 2023-10-30 04:00:31 -04:00
Caldwell
009622069f add size property to getProduct (#893) 2023-10-30 03:56:54 -04:00
TheAimMan
2a149df13e BUGFIX: Contracts now fail if there are 0 of them remaining (#889) 2023-10-30 03:11:51 -04:00
Caldwell
0bdab7bec8 CORPORATION: move product productionCost into cityData (#887) 2023-10-30 03:10:45 -04:00
TheAimMan
ca12bddaf5 BUGFIX: Check Corp Research pre-reqs in research api call (#884) 2023-10-30 03:09:34 -04:00
Zonoia
bc5789af60 MISC: Readthedocs configuration that redirects to this repo (#833) 2023-10-24 05:11:14 -04:00
Snarling
cb2f530b88 dedupe + audit fix (#890) 2023-10-24 04:32:48 -04:00
omuretsu
d58e2ec7cf Changelog 10/23/23 2023-10-23 08:34:11 -04:00
omuretsu
e608e07879 Doc update 2023-10-23 07:32:46 -04:00
Snarling
87925f1900 EDITOR: Reorganization and minor efficiency improvements (#886) 2023-10-23 07:02:33 -04:00
David Walker
e339b5dc5f Tweak Illuminati .lit to provide a join hint (#883) 2023-10-23 05:34:04 -04:00
Squirlll
62be77b3f4 UI: grammar/typo fixes (#878) 2023-10-23 05:31:27 -04:00
TheAimMan
848fc9905a BUGFIX: SleeveCrimeWork.ts works through all cyclesWorked if its greater than cyclesNeeded (#881) 2023-10-23 05:31:11 -04:00
TheAimMan
5d266e01a6 Fix rm on .cct files (#880) 2023-10-23 05:19:49 -04:00
alutman
445c0c3134 Offline hacking income now shown for scripts (#873) 2023-10-23 05:00:16 -04:00
alutman
36a8b35cfb Prevent faction invitations appearing after prestige (#872) 2023-10-23 04:55:08 -04:00
TheAimMan
71e37823dd BUGFIX: Update warehouseSizeUsed after bulk purchase (#871) 2023-10-23 04:54:43 -04:00
Snarling
36312c660d CODE: Enable es2023 features (#870) 2023-10-23 04:49:12 -04:00
Caldwell
e992cb966a CORPORATION: adding prevState and changed state display in the warehouse UI (#861) 2023-10-23 04:48:06 -04:00
TheAimMan
eed2c5d6d4 BUGFIX: Update NetscriptHelpers.tsx to verify servers are on network when getServer is called (#855) 2023-10-23 04:37:19 -04:00
Jesse Clark
61c311a126 API: Add nextUpdate() promise for systems with bonus time (#845) 2023-10-23 04:24:30 -04:00
Snarling
daa7a22786 UI: General devmenu followup changes (#885) 2023-10-23 04:22:11 -04:00
missymae#2783
ff0118f2f4 UI: Update general devmenu page (#835) 2023-10-23 04:01:21 -04:00
Daniele Basso
9dd8275be1 Replace electron-config with electron-store. (#813) 2023-10-23 02:43:18 -04:00
Jesse Clark
62ab9f33be UI: Clarify wording in Corporation (#866) 2023-10-17 09:59:52 -04:00
omuretsu
d4120fa688 Update changelog date 2023-10-17 09:00:57 -04:00
omuretsu
45cf414e9c Changelog update 10/17 2023-10-17 07:20:35 -04:00
Snarling
38f693e2c1 ENUMS: Followup for #859 (#868) 2023-10-17 07:19:32 -04:00
Caldwell
9c41995e59 increment employees the right way (#869)
move the incrementation of employees after the avg calc
2023-10-17 07:07:26 -04:00
Warrobot10
ad03e4ee82 Update CONTRIBUTING.md (#862) 2023-10-17 07:06:50 -04:00
alutman
1a052a7daf API: Change singularity.applyToCompany() to use an enum for job field (#859) 2023-10-17 05:33:16 -04:00
Tyasuh
686d2e2b9b Remove territory warfare toggle from main gang management page (#849) 2023-10-17 03:47:54 -04:00
missymae#2783
1007ce5e68 API: Add ns.bladeburner.getNextBlackOp() (#815) 2023-10-17 02:18:54 -04:00
omuretsu
7e94a8653e Fix electron w/ unsupported arch for greenworks 2023-10-09 19:14:53 -04:00
Caldwell
6fa149ff08 CORPORATION: remove unneeded "state" property from Divisions (#857) 2023-10-07 23:25:46 -04:00
Jesse Clark
2f40b66789 CORPORATION: UI to display production and sales multipliers (#838) 2023-10-07 23:22:28 -04:00
Caldwell
269a74d5c0 CODEBASE: update dependencies (#852) 2023-10-07 18:52:48 -04:00
Warrobot10
79cfbb5f2e Fix a doc typo (#858) 2023-10-07 18:44:28 -04:00
Snarling
1b271d6e29 Update electron to latest (#850) 2023-10-04 19:46:08 -04:00
omuretsu
feb3f1a5db Dev changelog 2023-10-04 10:50:14 -04:00
omuretsu
32197e024d Actually fix faction invite spam 2023-10-04 10:32:33 -04:00
omuretsu
7226a9effa Update changelog.md 2023-10-04 10:30:06 -04:00
Snarling
74fe6af595 Hotfix: Popups no longer show up during infiltration (#847) 2023-10-04 09:52:04 -04:00
Noah Harris
e22527e7b7 fix: check for purchased program before enough money (#839) 2023-10-03 02:02:28 -04:00
Jesse Clark
f4cd4b3362 Fix check for "True Recursion" achievement (#827) 2023-10-03 01:29:09 -04:00
omuretsu
a4e9fd9705 Update SourceFilesDev.tsx
Remove unused sfData state variable
Removed the custom coloring for the SF buttons from #830.
Added a text indicator for the current SF level.
Other minor organizational changes
2023-10-03 01:19:10 -04:00
missymae#2783
aa5d37c7c1 UI: Make Source-Files devmenu page reactive (#830) 2023-10-03 00:36:51 -04:00
missymae#2783
673efb427f UI: Fix some DevMenu react errors, add number of exploits to savegame comparison (#825) 2023-10-02 23:28:16 -04:00
Michael Ficocelli
7b00fcc5b1 MISC: spelling and consistency fixes in the NetscriptDefinitions.ts file (#821) 2023-10-02 20:14:44 -04:00
Jesse Clark
7f575eb34c UI: Clean up typesetting of Corp ingredient formulas (#819) 2023-10-02 20:13:41 -04:00
Yichi Zhang
3f0c10adf4 STANEK: Re-apply stanek boosts when applying entropy (#816) 2023-10-02 20:11:22 -04:00
omuretsu
7f82ceaf24 npm audit fix 2023-10-02 20:07:22 -04:00
missymae#2783
3c52984d61 UI: Add a Credits button in options menu (#836) 2023-10-02 20:00:52 -04:00
omuretsu
a8e48ddb12 2.5.1 dev start 2023-10-02 19:46:57 -04:00
omuretsu
5c738919fc Update changelog.md for 2.5.0 2023-10-02 19:30:37 -04:00
Snarling
223d9b9cdb 2.5.0 as release version (#842) 2023-10-02 19:18:10 -04:00
omuretsu
6a63f8a02c Final dev changelog for 2.5.0 cycle? 2023-09-29 21:32:36 -04:00
Jesse Clark
ad6f919d64 CORPORATION: Dramatically lower API RAM costs (#818) 2023-09-27 17:38:30 -04:00
muesli4brekkies
c5e2f65cb0 API: Added spawnDelay parameter to ns.spawn options, allowing user defined delay (#807) 2023-09-27 01:31:47 -04:00
Michael Ficocelli
7fad6e0778 UI: Rename Territory Warfare gang status to avoid confusion with gang member task of the same name (#790) 2023-09-26 21:04:43 -04:00
Snarling
6d3495d05f Changelog update for 2.5.0 (#828) 2023-09-24 09:11:49 -04:00
David Walker
875bddbbdb BUGFIX: Patch a minor hole in RAM calculation (#820) 2023-09-21 21:44:32 -04:00
Snarling
648c180952 UI: Modals no longer update content and become inert while closing (#817) 2023-09-21 21:33:18 -04:00
Jesse Clark
3ae3f947ac CORPORATION: Rework share price calculation + UI improvements (#782) 2023-09-20 00:36:48 -04:00
Michael Ficocelli
f6e1c171ae MISC: Add configuration to eslintrc to fix the warning thrown when linting (#814) 2023-09-19 12:24:12 -04:00
Yichi Zhang
1b81fe8766 CORPORATION: Rework valuation calculation (#789) 2023-09-19 08:47:16 -04:00
missymae#2783
e1d2e12747 UI: Improve soft reset dialog, and always confirm soft resets (#809) 2023-09-17 16:30:10 -04:00
Jesse Clark
b9d13063ac Format time in ns.sleep and ns.asleep (#806) 2023-09-17 15:40:25 -04:00
missymae#2783
47176b7809 Workout achievement requires work in gym (#805) 2023-09-17 15:38:52 -04:00
Caldwell
d914040ae7 CORPORATION: Remove Market TA string in sell dialog text fields (#784) 2023-09-12 19:49:51 -04:00
omuretsu
cb93f4d108 Changelog update 12sep 2023-09-12 06:09:18 -04:00
omuretsu
fe0f8cad4d Import changes
Just some import changes in a couple files.
2023-09-12 05:38:25 -04:00
Caldwell
b6eafce563 CORPORATION: remove TA modals and integrate into sell modal (#796) 2023-09-12 05:30:45 -04:00
Zelow79
99e5c5e6b0 Added BB Training to sleeve actions (#713) 2023-09-12 05:07:36 -04:00
Caldwell
bf5e638891 CORPORATION: Fix "Use same 'Sell Amount' for all cities" toggle for products (#775) 2023-09-12 04:31:51 -04:00
Caldwell
d2b3659512 DOC: Add CorporationDivisions multiplier to BitNodeMultipliers API interface (#798) 2023-09-12 04:30:19 -04:00
aschmider
a6ff0d3e14 CORPORATION: Fix additive value in party result message (#793) (#794) 2023-09-12 03:56:59 -04:00
aschmider
c4482a70f9 HACKNET: Fix spendHashes ignoring count for Company Favor upgrade (#791) (#792) 2023-09-12 03:55:43 -04:00
missymae#2783
3c42880185 DOCS: Updates to basic documentations (#788) 2023-09-12 02:07:04 -04:00
Noah Harris
7b2e8e5312 UI: clear search suggestions on clearall modification (#787) 2023-09-12 02:00:20 -04:00
Michael Ficocelli
b844593e22 UI: Add filter to faction augmentation purchase page (#783) 2023-09-12 01:36:47 -04:00
Caldwell
624a0a5b02 CORPORATION: improve State description (#778) 2023-09-12 01:25:51 -04:00
Caldwell
bba2ccd83a CORPORATION: add issueNewSharesCooldown and makesMaterial (#774) 2023-09-12 01:23:36 -04:00
Michael Ficocelli
25dae7ec8b UI: Basic Map and Set support in ns.print/tprint (#756) 2023-09-12 01:07:41 -04:00
omuretsu
f95ca64e01 Changelog update 5 sep 2023-09-05 18:34:26 -04:00
Caldwell
0ed88a4317 UI: Stats page uses same number format as overview for skills. (#776) 2023-09-05 18:13:41 -04:00
missymae#2783
8d3f2bd750 GANG: Updates to Docs, UI, API (#773)
API Changes:
Adds ns.gang.getRecruitsAvailable: Gets the number of additional gang members that can currently be recruited
Adds ns.gang.respectForNextRecruit: Gets the respect threshold for recruiting the next gang member
Adds ns.gang.renameMember: Renames a gang member

Plus many doc and ui improvements
2023-09-05 18:07:19 -04:00
missymae#2783
bec737a253 DOCS: Add documentation descriptions for GangMemberInfo properties (#779) 2023-09-03 16:50:24 -04:00
muesli4brekkies
66ac31ee99 DOCS: Improve/correct some API docs related to ports (#772) 2023-09-02 10:57:31 -04:00
Michael Ficocelli
52769706d2 UI: Keep tail windows and dialogs mounted but hidden on pages where they are not shown (#769) 2023-08-31 21:31:59 -04:00
Michael Ficocelli
ae87851889 Improve pagination for Active Scripts page (#763) 2023-08-31 20:31:48 -04:00
Caldwell
7c82221a13 CORP: Change some number formatting to look better (#764)
changed formatCorpStat to formatBigNumber to make big numbers readable
2023-08-31 20:29:04 -04:00
VictorS
b7fdcdf35d DOCS: Improved documentation for functions that take a FilenameOrPID (#759) 2023-08-30 16:36:34 -04:00
missymae#2783
ad9bde40e0 DOCS: Improve documentation for ns.bladeburner.getActionRepGain (#760) 2023-08-30 16:28:21 -04:00
Caldwell
8c86e1e07a fix NaN in Bladeburner success Chance (#761) 2023-08-30 14:51:16 -04:00
Valentin Dewilde
1ea555f572 UI: Move pagination to top of active scripts, improve filtering (#494) 2023-08-30 14:45:27 -04:00
omuretsu
bc7482b0a2 Changelog update 2023-08-28 15:47:59 -04:00
missymae#2783
12de5505b5 DOCS: Bladeburner in-game documentation update (#755) 2023-08-28 15:36:49 -04:00
Michael Ficocelli
62058a7f78 UI: Suppress confusing reputation-earned dialog on augment install (#739) 2023-08-28 15:12:13 -04:00
Michael Ficocelli
9a0d688909 NETSCRIPT: Add more helpful error messages to getPurchasedServerCost (#757) 2023-08-28 15:03:16 -04:00
Eli Doran
b4f33fe655 Remove an unnecessary for loop in HacknetServer upgradeRam (#754) 2023-08-28 14:51:20 -04:00
missymae#2783
4b627cde1e DOCS: ns.getScriptLog update to use "FilenameOrPID" and related ns.tail change (#753) 2023-08-28 14:49:37 -04:00
Caldwell
101fb21c58 UI: Faction augmentation page rerenders automatically (#744) 2023-08-28 14:40:34 -04:00
Michael Ficocelli
79b677973b MESSAGES: Re-implement limit on Icarus messages after a bitnode is completed (#742) 2023-08-28 14:38:15 -04:00
Michael Ficocelli
93235570d0 TERMINAL: Prevent recursive aliases from being resolved. (#741) 2023-08-28 14:26:25 -04:00
omuretsu
51b03003f6 Fix changelog 2023-08-26 18:35:44 -04:00
omuretsu
281e22c90c 2.4.2dev Start 2023-08-26 18:32:14 -04:00
930 changed files with 38136 additions and 35564 deletions

View File

@@ -35,4 +35,9 @@ module.exports = {
"@typescript-eslint/no-explicit-any": "off",
"react/no-unescaped-entities": "off",
},
settings: {
react: {
version: "detect",
},
},
};

191
.git_blame_ignore_revs Normal file
View File

@@ -0,0 +1,191 @@
## What is this?
## Some git commits contain mostly prettier/lint changes and aren't as valuable when
## using `git blame`. This file contains a list of hashes that identify such commits
## in a way that git can use.
## Tell git to use this file with:
## git config --local blame.ignoreRevsFile .git_blame_ignore_revs
## This file was created by cleaning up and filtering the output of this command line:
## git log --grep "[Pp]rettier"
## All that's really needed here are the actual 40-digit hashes of
## the commits. I left the author/date info in as it helped when I
## was filtering this list to just formatting changes.
4c9ca4990450740785a4dc95a75de53aeac724df
# Author: omuretsu
# Date: Fri Jun 23 10:14:18 2023 -0400
07b1eefe33b16251e0e67ae3231db2059defb1cc
# Author: omuretsu
# Date: Tue Feb 7 21:16:18 2023 -0500
bbe6421b067b0d0b876c42e49dafcbbb6458ef8d
# Author: borisflagell
# Date: Tue Oct 11 15:33:55 2022 +0300
ed0a28d29272ba2d5716618b73d231bca1ad79d1
# Author: hydroflame
# Date: Sun Oct 9 00:22:25 2022 -0400
a1f90d77ce708efb968d7e7ddb804b9862f2f460
# Author: Snarling
# Date: Tue Sep 27 19:58:14 2022 -0400
6be884a9ad42e9920be233302a066dea01766c8e
# Author: borisflagell
# Date: Sat May 28 01:15:05 2022 +0200
51ba358464ce5787ef472531e0bdb2b6b239955e
# Author: Markus-D-M
# Date: Wed May 25 21:27:58 2022 +0200
9091441389182a261438ec16ea17edcf11ab6f39
# Author: borisflagell
# Date: Mon May 23 19:43:46 2022 +0200
5bc1d293ca14f717d967ff4a345fe1ace1ffdd4c
# Author: borisflagell
# Date: Sun May 22 11:59:14 2022 +0200
d44d71712f066518321cefed18e145141ea23818
# Author: borisflagell
# Date: Sun May 22 06:40:32 2022 +0200
bd2d5396a60f31c1bd9837786fb10586cbcc6eda
# Author: phyzical
# Date: Thu Apr 28 19:22:37 2022 +0800
ad4c84be937224297f6745b6df3d433466b047c1
# Author: borisflagell
# Date: Sat Apr 23 15:18:43 2022 +0200
d4f8f2d0354832101f48d60f0b3445cc1f43dd23
# Author: borisflagell
# Date: Sat Apr 23 15:01:24 2022 +0200
a7045a234353de795494c0b3f378808b4a6d32aa
# Author: borisflagell
# Date: Thu Apr 21 19:20:16 2022 +0200
421e7b8c74eb85238ccf45b1a83225a452024058
# Author: borisflagell
# Date: Thu Apr 21 18:51:04 2022 +0200
9850b56711b29c254102ad8694b1610b4d5adc81
# Author: Snarling
# Date: Sun Apr 17 17:23:14 2022 -0400
567fcf8fb63bc469ae61013cca511a76eb6f9086
# Author: violet
# Date: Wed Apr 13 14:42:07 2022 -0500
f6af85a38d8286aec702556f1296565de5a5067f
# Author: violet
# Date: Sun Apr 10 15:57:34 2022 -0500
57f04d3911b5a384c379dcfb2d0bcb18b25c37ea
# Author: violet
# Date: Thu Apr 7 11:45:21 2022 -0500
720e2112c6766b581e43e1f9e712c47300b22dcd
# Author: violet
# Date: Mon Mar 21 14:40:17 2022 -0500
ecffc8655a70e6e3c7bd03ba5723b437d7857dfa
Merge: 8506dcfed 00d1d294e
# Author: hydroflame
# Date: Sun Mar 20 22:21:00 2022 -0400
901ee92fe97606bd27840900512b0fa760ba428e
# Author: Olivier Gagnon
# Date: Sun Mar 20 22:02:36 2022 -0400
b3f9380ebd3feb3b6ef91873a1c6a3a1ddc56654
# Author: Billy Vong
# Date: Fri Dec 17 12:56:48 2021 -0500
# I *really* didn't want to include this one because it has a few tiny, actual
# code changes, but it reformats tens of thousands of lines of code. Argh.
8f13363466c2e825bbfb7e4b66d853c4805eda61
# Author: Olivier Gagnon
# Date: Mon Oct 11 16:38:50 2021 -0400
66a2adaeb4b12a48fc8fdafe5e5169919f8d46a5
# Author: Olivier Gagnon
# Date: Wed Sep 22 12:56:55 2021 -0400
## Additional changes that should be ignored for blame.
2e7f164b5f251ce457f0d3b9a42cfa0f08ef200e
# Author: tyasuh.taeragan
# Date: Fri Oct 22 16:35:05 2021 -0400
a18bdd6afc77752bded2f0794bf35ad9d6455fa1
# Author: Olivier Gagnon
# Date: Sat Sep 4 19:09:30 2021 -0400
# from a search for "lint"; many more of these had significant code changes than
# Prettier, so I'm only vetting the largest for inclusion
48f80f25d6fb90edc292481905814c0d5593b5a9
# Author: Olivier Gagnon
# Date: Wed Apr 6 19:30:08 2022 -0400
b0f20c8c8f4859f01cfc79bc3945a8e7272d6592
# Author: Olivier Gagnon
# Date: Sat Sep 25 01:26:03 2021 -0400
d745150c45979ab251b51447a0847e28966346a6
# Author: Olivier Gagnon
# Date: Sat May 1 03:17:31 2021 -0400
3fad5050961a3259b0158763f48016174a2a690e
# Author: Olivier Gagnon
# Date: Thu Apr 29 23:52:56 2021 -0400
#
# The commits listed below showed up on a search for "[Pp]rettier", but
# weren't just Prettier/lint changes.
#
# 6459b1ab483cf66ae1e6e50518424311c6bbbd8b
# Author: omuretsu
# Date: Sat Feb 4 07:42:35 2023 -0500
# 5b4addbb212411aa1de27ba0ee16ebaabedbc6a1
# Author: borisflagell
# Date: Sun May 22 01:08:53 2022 +0200
# 705a56f3bdcb859179144cdafab7eeb8832f7eb9
# Author: borisflagell
# Date: Sat May 7 12:55:56 2022 +0200
# 4fa65322fe770dc3d79cd0301521d230694a1fc7
# Author: borisflagell
# Date: Thu Apr 21 18:37:47 2022 +0200
# 81d1c02fdfe087c3bd0a2a8a2a41c2f82a6fef56
# Author: hydroflame
# Date: Sun Mar 20 22:50:42 2022 -0400
# 4a7fcda86f5d3d05638b4a9f3a61e5937dde52c6
# Author: hydroflame
# Date: Sat Sep 4 19:03:05 2021 -0400
# 7ee2612c17a90a80e5a0a7793a4c81465e212c0c
# Author: Martin Fournier
# Date: Sun Jan 9 11:15:09 2022 -0500
# c59806c87d543c7cc78d1d68af9599d118c0cb2b
# Author: Martin Fournier
# Date: Fri Dec 17 09:54:32 2021 -0500
# 306facc0d10104d543974d5cb01b6ff419c9acb2
# Author: David Edmondson
# Date: Sat Sep 4 22:17:30 2021 -0700
# 1e42f73e2a1b7ac9489a7287c7be99298f412ac0
# Author: David Edmondson
# Date: Sat Sep 4 13:18:08 2021 -0700commit 2e7f164b5f251ce457f0d3b9a42cfa0f08ef200e

View File

@@ -15,3 +15,5 @@ markdown
package.json
package.lock.json
tsdoc-metadata.json
.git_blame_ignore_revs

16
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,16 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py

View File

@@ -1,10 +1,13 @@
import JSDOMEnvironment from "jest-environment-jsdom";
import { cloneDeep } from "lodash";
// https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
constructor(...args: ConstructorParameters<typeof JSDOMEnvironment>) {
super(...args);
// TODO Tests aren't polyfilled.
this.global.structuredClone = cloneDeep;
// FIXME https://github.com/nodejs/node/issues/35889
// Add missing importActual() function to mirror requireActual(),
// which lets us work around the ESM bug.

93
dist/OFL.txt vendored Normal file
View File

@@ -0,0 +1,93 @@
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -60,7 +60,7 @@ called `npm` is installed as well.
Not all code contributions will be accepted. The safest way to ensure
that you don't waste time working on something that gets rejected is to
run your idea(s)/plan(s) past the developpers first.
run your idea(s)/plan(s) past the developers first.
You can contact him through Discord.
Otherwise, here are some general guidelines for determining what types of
@@ -207,9 +207,17 @@ the following rules:
- Ensure you have run `npm run lint` to make sure your changes conform to the
rules enforced across the code base. The command will fail if any of the
linters find a violation.
- Ensure you have run `npm run format` to make sure your changes conform to the
style guide.
- Also, ensure you have run `npm run test` to make sure your changes pass
the automated tests.
- Do not check in any bundled files (`dist\*.bundle.js`) or the `index.html`
in the root of the repository. These will be updated as part of official
releases.
- The title of your Pull Request will need to be formatted like
`MISC: Reticulated the splines`, where the first word must be capitalised
and relate to the kind of change being implemented. Possible examples
are UI, BUGFIX, SERVERS, NETSCRIPT... You get the idea.
## As a Documenter
@@ -232,7 +240,7 @@ rules:
## Deploying a new version
Update the following
Update the following:
- `src/Constants.ts` `Version` and `LatestUpdate`
- `package.json` `version`

34
doc/conf.py Normal file
View File

@@ -0,0 +1,34 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
# -- Project information -----------------------------------------------------
project = 'Bitburner'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['*']
exclude_patterns = ['doc/index.rst']
# -- Options for HTML output -------------------------------------------------

5
doc/index.rst Normal file
View File

@@ -0,0 +1,5 @@
.. meta::
:http-equiv=Refresh: 0; url='https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md'
This link is outdated as documentation for Bitburner has been migrated to an in-game menu, this page should have redirected you to the new location.
You can also click `here to go to the game's documentation <https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md/>`_.

View File

@@ -2,8 +2,8 @@
const http = require("http");
const crypto = require("crypto");
const log = require("electron-log");
const Config = require("electron-config");
const config = new Config();
const Store = require("electron-store");
const store = new Store();
let server;
let window;
@@ -100,7 +100,7 @@ async function initialize(win) {
});
});
const autostart = config.get("autostart", false);
const autostart = store.get("autostart", false);
if (autostart) {
try {
await enable();
@@ -118,8 +118,8 @@ function enable() {
return Promise.resolve();
}
const port = config.get("port", 9990);
const host = config.get("host", "127.0.0.1");
const port = store.get("port", 9990);
const host = store.get("host", "127.0.0.1");
log.log(`Starting http server on port ${port} - listening on ${host}`);
// https://stackoverflow.com/a/62289870
@@ -165,20 +165,20 @@ function isListening() {
function toggleAutostart() {
const newValue = !isAutostart();
config.set("autostart", newValue);
store.set("autostart", newValue);
log.log(`New autostart value is '${newValue}'`);
}
function isAutostart() {
return config.get("autostart");
return store.get("autostart");
}
function getAuthenticationToken() {
const token = config.get("token");
const token = store.get("token");
if (token) return token;
const newToken = generateToken();
config.set("token", newToken);
store.set("token", newToken);
return newToken;
}

30
electron/fileError.html Normal file
View File

@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Bitburner</title>
<style>
body {
background-color: black;
color: #0c0;
margin: 0;
}
div {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
h1 {
text-align: center;
}
</style>
</head>
<body>
<div>
<h1>Attempts to access local files outside the normal game environment will be directed to this file.</h1>
</div>
</body>
</html>

View File

@@ -1 +0,0 @@
Attempts to access local files outside the normal game environment will be directed to this file.

View File

@@ -44,6 +44,9 @@ async function createWindow(killall) {
window.removeMenu();
noScripts = killall ? { query: { noScripts: killall } } : {};
window.loadFile("index.html", noScripts);
window.once("ready-to-show", () => {
utils.setZoomFactor(window, utils.getZoomFactor());
});
window.show();
if (debug) window.webContents.openDevTools();
@@ -60,7 +63,6 @@ async function createWindow(killall) {
achievements.enableAchievementsInterval(window);
utils.attachUnresponsiveAppHandler(window);
utils.setZoomFactor(window);
try {
await api.initialize(window);

View File

@@ -7,15 +7,10 @@ var fs = require("fs");
var greenworks;
if (process.platform == "darwin") {
if (process.arch == "x64") greenworks = require("./lib/greenworks-osx64");
else if (process.arch == "ia32") greenworks = require("./lib/greenworks-osx32");
} else if (process.platform == "win32") {
if (process.arch == "x64") greenworks = require("./lib/greenworks-win64");
else if (process.arch == "ia32") greenworks = require("./lib/greenworks-win32");
} else if (process.platform == "linux") {
if (process.arch == "x64") greenworks = require("./lib/greenworks-linux64");
else if (process.arch == "ia32") greenworks = require("./lib/greenworks-linux32");
if (process.arch === "x64") {
if (process.platform === "darwin") greenworks = require("./lib/greenworks-osx64");
else if (process.platform === "win32") greenworks = require("./lib/greenworks-win64");
else if (process.platform === "linux") greenworks = require("./lib/greenworks-linux64");
}
function error_process(err, error_callback) {

3
electron/jsconfig.json Normal file
View File

@@ -0,0 +1,3 @@
{
"compilerOptions": { "target": "ESNext" }
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,24 @@
/* eslint-disable no-process-exit */
/* eslint-disable @typescript-eslint/no-var-requires */
const { app, dialog, BrowserWindow, ipcMain, protocol } = require("electron");
const log = require("electron-log");
log.catchErrors();
// This handler must be set ASAP to prevent ghost processes.
process.on("uncaughtException", function () {
// The exception will be logged by electron-log.
app.quit();
process.exit(1);
});
// This handler must be set ASAP to prevent ghost processes.
app.on("window-all-closed", () => {
log.info("Quitting the app...");
app.quit();
process.exit(0);
});
const greenworks = require("./greenworks");
const api = require("./api-server");
const gameWindow = require("./gameWindow");
@@ -9,23 +26,17 @@ const achievements = require("./achievements");
const utils = require("./utils");
const storage = require("./storage");
const debounce = require("lodash/debounce");
const Config = require("electron-config");
const config = new Config();
const Store = require("electron-store");
const store = new Store();
const path = require("path");
const { realpathSync } = require("fs");
const { fileURLToPath } = require("url");
log.transports.file.level = config.get("file-log-level", "info");
log.transports.console.level = config.get("console-log-level", "debug");
log.transports.file.level = store.get("file-log-level", "info");
log.transports.console.level = store.get("console-log-level", "debug");
log.catchErrors();
log.info(`Started app: ${JSON.stringify(process.argv)}`);
process.on("uncaughtException", function () {
// The exception will already have been logged by electron-log
app.quit();
process.exit(1);
});
// We want to fail gracefully if we cannot connect to Steam
try {
if (greenworks && greenworks.init()) {
@@ -42,13 +53,6 @@ try {
let isRestoreDisabled = false;
// This was moved so that startup errors do not lead to ghost processes
app.on("window-all-closed", () => {
log.info("Quitting the app...");
app.quit();
process.exit(0);
});
function setStopProcessHandler(app, window) {
const closingWindowHandler = async (e) => {
// We need to prevent the default closing event to add custom logic
@@ -105,7 +109,7 @@ function setStopProcessHandler(app, window) {
window.gameInfo = { ...arg };
await storage.prepareSaveFolders(window);
const restoreNewest = config.get("onload-restore-newest", true);
const restoreNewest = store.get("onload-restore-newest", true);
if (restoreNewest && !isRestoreDisabled) {
try {
await storage.restoreIfNewerExists(window);
@@ -152,14 +156,14 @@ function setStopProcessHandler(app, window) {
log.debug("Saving to Steam Cloud ...");
try {
const playerId = window.gameInfo.player.identifier;
await storage.pushGameSaveToSteamCloud(save, playerId);
await storage.pushSaveDataToSteamCloud(save, playerId);
log.silly("Saved Game to Steam Cloud");
} catch (error) {
log.error(error);
utils.writeToast(window, "Could not save to Steam Cloud.", "error", 5000);
}
},
config.get("cloud-save-min-time", 1000 * 60 * 15),
store.get("cloud-save-min-time", 1000 * 60 * 15),
{ leading: true },
);
@@ -174,7 +178,7 @@ function setStopProcessHandler(app, window) {
utils.writeToast(window, "Could not save to disk", "error", 5000);
}
},
config.get("disk-save-min-time", 1000 * 60 * 5),
store.get("disk-save-min-time", 1000 * 60 * 5),
{ leading: true },
);
@@ -198,13 +202,18 @@ app.on("ready", async () => {
// Intercept file protocol requests and only let valid requests through
protocol.interceptFileProtocol("file", ({ url, method }, callback) => {
const filePath = fileURLToPath(url);
const relativePath = path.relative(__dirname, filePath);
//only provide html files in same directory, or anything in dist
if ((method === "GET" && relativePath.startsWith("dist")) || relativePath.match(/^[a-zA-Z-_]*\.html/)) {
return callback(filePath);
const realPath = realpathSync(filePath);
const relativePath = path.relative(__dirname, realPath);
// Only allow access to files in "dist" folder or html files in the same directory
if (method === "GET" && (relativePath.startsWith("dist") || relativePath.match(/^[a-zA-Z-_]*\.html/))) {
callback(realPath);
return;
}
log.error("Tried to access a page outside sandbox.");
callback(path.join(__dirname, "fileError.txt"));
log.error(
`Tried to access a page outside the sandbox. Url: ${url}. FilePath: ${filePath}. RealPath: ${realPath}.` +
` __dirname: ${__dirname}. RelativePath: ${relativePath}. Method: ${method}.`,
);
callback(path.join(__dirname, "fileError.html"));
});
log.info("Application is ready!");

View File

@@ -1,11 +1,11 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { app, Menu, clipboard, dialog, shell } = require("electron");
const log = require("electron-log");
const Config = require("electron-config");
const Store = require("electron-store");
const api = require("./api-server");
const utils = require("./utils");
const storage = require("./storage");
const config = new Config();
const store = new Store();
function getMenu(window) {
const canZoomIn = utils.getZoomFactor() <= 2;
@@ -103,8 +103,8 @@ function getMenu(window) {
enabled: storage.isCloudEnabled(),
click: async () => {
try {
const saveGame = await storage.getSteamCloudSaveString();
await storage.pushSaveGameForImport(window, saveGame, false);
const saveData = await storage.getSteamCloudSaveData();
await storage.pushSaveGameForImport(window, saveData, false);
} catch (error) {
log.error(error);
utils.writeToast(window, "Could not load from Steam Cloud", "error", 5000);
@@ -114,16 +114,6 @@ function getMenu(window) {
{
type: "separator",
},
{
label: "Compress Disk Saves (.gz)",
type: "checkbox",
checked: storage.isSaveCompressionEnabled(),
click: (menuItem) => {
storage.setSaveCompressionConfig(menuItem.checked);
utils.writeToast(window, `${menuItem.checked ? "Enabled" : "Disabled"} Save Compression`, "info", 5000);
refreshMenu(window);
},
},
{
label: "Auto-Save to Disk",
type: "checkbox",
@@ -153,9 +143,9 @@ function getMenu(window) {
{
label: "Restore Newest on Load",
type: "checkbox",
checked: config.get("onload-restore-newest", true),
checked: store.get("onload-restore-newest", true),
click: (menuItem) => {
config.set("onload-restore-newest", menuItem.checked);
store.set("onload-restore-newest", menuItem.checked);
utils.writeToast(
window,
`${menuItem.checked ? "Enabled" : "Disabled"} Restore Newest on Load`,
@@ -222,7 +212,7 @@ function getMenu(window) {
click: () => window.loadFile("index.html"),
},
{
label: "Reload & Kill All Scripts",
label: "Reload && Kill All Scripts",
click: () => utils.reloadAndKill(window, true),
},
],

View File

@@ -1,51 +1,106 @@
{
"name": "bitburner",
"version": "2.3.2dev",
"lockfileVersion": 2,
"version": "2.6.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bitburner",
"version": "2.3.2dev",
"version": "2.6.2",
"dependencies": {
"electron-config": "^2.0.0",
"electron-log": "^4.4.8",
"electron-store": "^8.1.0",
"lodash": "^4.17.21"
}
},
"node_modules/conf": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/conf/-/conf-1.4.0.tgz",
"integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==",
"node_modules/ajv": {
"version": "8.12.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
"dependencies": {
"dot-prop": "^4.1.0",
"env-paths": "^1.0.0",
"make-dir": "^1.0.0",
"pkg-up": "^2.0.0",
"write-file-atomic": "^2.3.0"
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/ajv-formats": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
"dependencies": {
"ajv": "^8.0.0"
},
"peerDependencies": {
"ajv": "^8.0.0"
},
"peerDependenciesMeta": {
"ajv": {
"optional": true
}
}
},
"node_modules/atomically": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/atomically/-/atomically-1.7.0.tgz",
"integrity": "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==",
"engines": {
"node": ">=10.12.0"
}
},
"node_modules/conf": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/conf/-/conf-10.2.0.tgz",
"integrity": "sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg==",
"dependencies": {
"ajv": "^8.6.3",
"ajv-formats": "^2.1.1",
"atomically": "^1.7.0",
"debounce-fn": "^4.0.0",
"dot-prop": "^6.0.1",
"env-paths": "^2.2.1",
"json-schema-typed": "^7.0.3",
"onetime": "^5.1.2",
"pkg-up": "^3.1.0",
"semver": "^7.3.5"
},
"engines": {
"node": ">=4"
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/debounce-fn": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-4.0.0.tgz",
"integrity": "sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ==",
"dependencies": {
"mimic-fn": "^3.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/dot-prop": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
"integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"dependencies": {
"is-obj": "^1.0.0"
"is-obj": "^2.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/electron-config": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/electron-config/-/electron-config-2.0.0.tgz",
"integrity": "sha512-5mGwRK4lsAo6tiy4KNF/zUInYpUGr7JJzLA8FHOoqBWV3kkKJWSrDXo4Uk2Ffm5aeQ1o73XuorfkYhaWFV2O4g==",
"deprecated": "Renamed to `electron-store`.",
"dependencies": {
"conf": "^1.0.0"
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/electron-log": {
@@ -53,56 +108,70 @@
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.4.8.tgz",
"integrity": "sha512-QQ4GvrXO+HkgqqEOYbi+DHL7hj5JM+nHi/j+qrN9zeeXVKy8ZABgbu4CnG+BBqDZ2+tbeq9tUC4DZfIWFU5AZA=="
},
"node_modules/env-paths": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
"engines": {
"node": ">=4"
"node_modules/electron-store": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/electron-store/-/electron-store-8.1.0.tgz",
"integrity": "sha512-2clHg/juMjOH0GT9cQ6qtmIvK183B39ZXR0bUoPwKwYHJsEF3quqyDzMFUAu+0OP8ijmN2CbPRAelhNbWUbzwA==",
"dependencies": {
"conf": "^10.2.0",
"type-fest": "^2.17.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/env-paths": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
"integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
"engines": {
"node": ">=6"
}
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"node_modules/find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"dependencies": {
"locate-path": "^2.0.0"
"locate-path": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/graceful-fs": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
},
"node_modules/imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"engines": {
"node": ">=0.8.19"
"node": ">=6"
}
},
"node_modules/is-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"engines": {
"node": ">=0.10.0"
"node": ">=8"
}
},
"node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
},
"node_modules/json-schema-typed": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-7.0.3.tgz",
"integrity": "sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A=="
},
"node_modules/locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"dependencies": {
"p-locate": "^2.0.0",
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
}
},
"node_modules/lodash": {
@@ -110,227 +179,152 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/make-dir": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"pify": "^3.0.0"
"yallist": "^4.0.0"
},
"engines": {
"node": ">=4"
"node": ">=10"
}
},
"node_modules/mimic-fn": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz",
"integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/onetime": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"dependencies": {
"mimic-fn": "^2.1.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/onetime/node_modules/mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"engines": {
"node": ">=6"
}
},
"node_modules/p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dependencies": {
"p-try": "^1.0.0"
"p-try": "^2.0.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"dependencies": {
"p-limit": "^1.1.0"
"p-limit": "^2.0.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
}
},
"node_modules/p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"engines": {
"node": ">=4"
"node": ">=6"
}
},
"node_modules/path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
"engines": {
"node": ">=4"
}
},
"node_modules/pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
"engines": {
"node": ">=4"
}
},
"node_modules/pkg-up": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
"integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
"integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
"dependencies": {
"find-up": "^2.1.0"
"find-up": "^3.0.0"
},
"engines": {
"node": ">=4"
"node": ">=8"
}
},
"node_modules/signal-exit": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
"node_modules/punycode": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
"engines": {
"node": ">=6"
}
},
"node_modules/write-file-atomic": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
"integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
"node_modules/require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": {
"graceful-fs": "^4.1.11",
"imurmurhash": "^0.1.4",
"signal-exit": "^3.0.2"
}
}
},
"dependencies": {
"conf": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/conf/-/conf-1.4.0.tgz",
"integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==",
"requires": {
"dot-prop": "^4.1.0",
"env-paths": "^1.0.0",
"make-dir": "^1.0.0",
"pkg-up": "^2.0.0",
"write-file-atomic": "^2.3.0"
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"dot-prop": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
"integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
"requires": {
"is-obj": "^1.0.0"
"node_modules/type-fest": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"engines": {
"node": ">=12.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"electron-config": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/electron-config/-/electron-config-2.0.0.tgz",
"integrity": "sha512-5mGwRK4lsAo6tiy4KNF/zUInYpUGr7JJzLA8FHOoqBWV3kkKJWSrDXo4Uk2Ffm5aeQ1o73XuorfkYhaWFV2O4g==",
"requires": {
"conf": "^1.0.0"
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dependencies": {
"punycode": "^2.1.0"
}
},
"electron-log": {
"version": "4.4.8",
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.4.8.tgz",
"integrity": "sha512-QQ4GvrXO+HkgqqEOYbi+DHL7hj5JM+nHi/j+qrN9zeeXVKy8ZABgbu4CnG+BBqDZ2+tbeq9tUC4DZfIWFU5AZA=="
},
"env-paths": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA="
},
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"requires": {
"locate-path": "^2.0.0"
}
},
"graceful-fs": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
},
"is-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"make-dir": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
"requires": {
"pify": "^3.0.0"
}
},
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"requires": {
"p-try": "^1.0.0"
}
},
"p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"requires": {
"p-limit": "^1.1.0"
}
},
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
},
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
},
"pkg-up": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
"integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",
"requires": {
"find-up": "^2.1.0"
}
},
"signal-exit": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
},
"write-file-atomic": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
"integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
"requires": {
"graceful-fs": "^4.1.11",
"imurmurhash": "^0.1.4",
"signal-exit": "^3.0.2"
}
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}

View File

@@ -1,9 +1,9 @@
{
"name": "bitburner",
"version": "2.4.1",
"version": "2.6.2",
"description": "A cyberpunk-themed programming incremental game",
"main": "main.js",
"author": "Daniel Xie, Olivier Gagnon, et al.",
"author": "Daniel Xie, hydroflame, et al.",
"mac": {
"icon": "./public/icons/mac/icon.icns",
"category": "public.app-category.games"
@@ -24,7 +24,7 @@
"buildResources": "public"
},
"dependencies": {
"electron-config": "^2.0.0",
"electron-store": "^8.1.0",
"electron-log": "^4.4.8",
"lodash": "^4.17.21"
}

1
electron/saveDataBinaryFormat.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare const isBinaryFormat: (saveData: string | Uint8Array) => boolean;

View File

@@ -0,0 +1,13 @@
// The 2 magic bytes of the gzip header plus the mandatory compression type of DEFLATE
const magicBytes = [0x1f, 0x8b, 0x08];
function isBinaryFormat(rawData) {
for (let i = 0; i < magicBytes.length; ++i) {
if (magicBytes[i] !== rawData[i]) {
return false;
}
}
return true;
}
module.exports = { isBinaryFormat };

View File

@@ -10,8 +10,9 @@ const gunzip = promisify(zlib.gunzip);
const greenworks = require("./greenworks");
const log = require("electron-log");
const flatten = require("lodash/flatten");
const Config = require("electron-config");
const config = new Config();
const Store = require("electron-store");
const { isBinaryFormat } = require("./saveDataBinaryFormat");
const store = new Store();
// https://stackoverflow.com/a/69418940
const dirSize = async (directory) => {
@@ -79,23 +80,15 @@ async function getFolderSizeInBytes(saveFolder) {
}
function setAutosaveConfig(value) {
config.set("autosave-enabled", value);
store.set("autosave-enabled", value);
}
function isAutosaveEnabled() {
return config.get("autosave-enabled", true);
}
function setSaveCompressionConfig(value) {
config.set("save-compression-enabled", value);
}
function isSaveCompressionEnabled() {
return config.get("save-compression-enabled", true);
return store.get("autosave-enabled", true);
}
function setCloudEnabledConfig(value) {
config.set("cloud-enabled", value);
store.set("cloud-enabled", value);
}
async function getSaveFolder(window, root = false) {
@@ -112,7 +105,7 @@ function isCloudEnabled() {
if (!greenworks.isCloudEnabledForUser()) return false;
// Let's check the config file to see if it's been overriden
const enabledInConf = config.get("cloud-enabled", true);
const enabledInConf = store.get("cloud-enabled", true);
if (!enabledInConf) return false;
const isAppEnabled = greenworks.isCloudEnabled();
@@ -163,17 +156,22 @@ async function backupSteamDataToDisk(currentPlayerId) {
const file = greenworks.getFileNameAndSize(0);
const previousPlayerId = file.name.replace(".json.gz", "");
if (previousPlayerId !== currentPlayerId) {
const backupSave = await getSteamCloudSaveString();
const backupSaveData = await getSteamCloudSaveData();
const backupFile = path.join(app.getPath("userData"), "/saves/_backups", `${previousPlayerId}.json.gz`);
const buffer = Buffer.from(backupSave, "base64").toString("utf8");
saveContent = await gzip(buffer);
await fs.writeFile(backupFile, saveContent, "utf8");
await fs.writeFile(backupFile, backupSaveData, "utf8");
log.debug(`Saved backup game to '${backupFile}`);
}
}
async function pushGameSaveToSteamCloud(base64save, currentPlayerId) {
if (!isCloudEnabled) return Promise.reject("Steam Cloud is not Enabled");
/**
* The name of save file is `${currentPlayerId}.json.gz`. The content of save file is weird: it's a base64 string of the
* binary data of compressed json save string. It's weird because the extension is .json.gz while the content is a
* base64 string. Check the comments in the implementation to see why it is like that.
*/
async function pushSaveDataToSteamCloud(saveData, currentPlayerId) {
if (!isCloudEnabled()) {
return Promise.reject("Steam Cloud is not Enabled");
}
try {
backupSteamDataToDisk(currentPlayerId);
@@ -183,13 +181,20 @@ async function pushGameSaveToSteamCloud(base64save, currentPlayerId) {
const steamSaveName = `${currentPlayerId}.json.gz`;
// Let's decode the base64 string so GZIP is more efficient.
const buffer = Buffer.from(base64save, "base64");
const compressedBuffer = await gzip(buffer);
// We can't use utf8 for some reason, steamworks is unhappy.
const content = compressedBuffer.toString("base64");
log.debug(`Uncompressed: ${base64save.length} bytes`);
log.debug(`Compressed: ${content.length} bytes`);
/**
* When we push save file to Steam Cloud, we use greenworks.saveTextToFile. It seems that this method expects a string
* as the file content. That is why saveData is encoded in base64 and pushed to Steam Cloud as a text file.
*
* Encoding saveData in UTF-8 (with buffer.toString("utf8")) is not the proper way to convert binary data to string.
* Quote from buffer's documentation: "If encoding is 'utf8' and a byte sequence in the input is not valid UTF-8, then
* each invalid byte is replaced with the replacement character U+FFFD.". The proper way to do it is to use
* String.fromCharCode or String.fromCodePoint.
*
* Instead of implementing it, the old code (encoding in base64) is used here for backward compatibility.
*/
const content = Buffer.from(saveData).toString("base64");
log.debug(`saveData: ${saveData.length} bytes`);
log.debug(`Base64 string of saveData: ${content.length} bytes`);
log.debug(`Saving to Steam Cloud as ${steamSaveName}`);
try {
@@ -199,41 +204,37 @@ async function pushGameSaveToSteamCloud(base64save, currentPlayerId) {
}
}
async function getSteamCloudSaveString() {
if (!isCloudEnabled()) return Promise.reject("Steam Cloud is not Enabled");
/**
* This function processes the save file in Steam Cloud and returns the save data in the binary format.
*/
async function getSteamCloudSaveData() {
if (!isCloudEnabled()) {
return Promise.reject("Steam Cloud is not Enabled");
}
log.debug(`Fetching Save in Steam Cloud`);
const cloudString = await getCloudFile();
const gzippedBase64Buffer = Buffer.from(cloudString, "base64");
const uncompressedBuffer = await gunzip(gzippedBase64Buffer);
const content = uncompressedBuffer.toString("base64");
log.debug(`Compressed: ${cloudString.length} bytes`);
log.debug(`Uncompressed: ${content.length} bytes`);
return content;
// Decode cloudString to get save data back.
const saveData = Buffer.from(cloudString, "base64");
log.debug(`SaveData: ${saveData.length} bytes`);
return saveData;
}
async function saveGameToDisk(window, saveData) {
async function saveGameToDisk(window, electronGameData) {
const currentFolder = await getSaveFolder(window);
let saveFolderSizeBytes = await getFolderSizeInBytes(currentFolder);
const maxFolderSizeBytes = config.get("autosave-quota", 1e8); // 100Mb per playerIndentifier
const maxFolderSizeBytes = store.get("autosave-quota", 1e8); // 100Mb per playerIndentifier
const remainingSpaceBytes = maxFolderSizeBytes - saveFolderSizeBytes;
log.debug(`Folder Usage: ${saveFolderSizeBytes} bytes`);
log.debug(`Folder Capacity: ${maxFolderSizeBytes} bytes`);
log.debug(
`Remaining: ${remainingSpaceBytes} bytes (${((saveFolderSizeBytes / maxFolderSizeBytes) * 100).toFixed(2)}% used)`,
);
const shouldCompress = isSaveCompressionEnabled();
const fileName = saveData.fileName;
const file = path.join(currentFolder, fileName + (shouldCompress ? ".gz" : ""));
let saveData = electronGameData.save;
const file = path.join(currentFolder, electronGameData.fileName);
try {
let saveContent = saveData.save;
if (shouldCompress) {
// Let's decode the base64 string so GZIP is more efficient.
const buffer = Buffer.from(saveContent, "base64").toString("utf8");
saveContent = await gzip(buffer);
}
await fs.writeFile(file, saveContent, "utf8");
await fs.writeFile(file, saveData, "utf8");
log.debug(`Saved Game to '${file}'`);
log.debug(`Save Size: ${saveContent.length} bytes`);
log.debug(`Save Size: ${saveData.length} bytes`);
} catch (error) {
log.error(error);
}
@@ -276,14 +277,14 @@ async function loadLastFromDisk(window) {
async function loadFileFromDisk(path) {
const buffer = await fs.readFile(path);
let content;
if (path.endsWith(".gz")) {
const uncompressedBuffer = await gunzip(buffer);
content = uncompressedBuffer.toString("base64");
log.debug(`Uncompressed file content (new size: ${content.length} bytes)`);
if (isBinaryFormat(buffer)) {
// Save file is in the binary format.
content = buffer;
} else {
// Save file is in the base64 format.
content = buffer.toString("utf8");
log.debug(`Loaded file with ${content.length} bytes`);
}
log.debug(`Loaded file with ${content.length} bytes`);
return content;
}
@@ -319,7 +320,7 @@ async function restoreIfNewerExists(window) {
const disk = {};
try {
steam.save = await getSteamCloudSaveString();
steam.save = await getSteamCloudSaveData();
steam.data = await getSaveInformation(window, steam.save);
} catch (error) {
log.error("Could not retrieve steam file");
@@ -361,12 +362,12 @@ async function restoreIfNewerExists(window) {
// We add a few seconds to the currentSave's lastSave to prioritize it
log.info("Found newer data than the current's save file");
log.silly(bestMatch.data);
await pushSaveGameForImport(window, bestMatch.save, true);
pushSaveGameForImport(window, bestMatch.save, true);
return true;
} else if (bestMatch.data.playtime > currentData.playtime && currentData.playtime < lowPlaytime) {
log.info("Found older save, but with more playtime, and current less than 15 mins played");
log.silly(bestMatch.data);
await pushSaveGameForImport(window, bestMatch.save, true);
pushSaveGameForImport(window, bestMatch.save, true);
return true;
} else {
log.debug("Current save data is the freshest");
@@ -380,8 +381,8 @@ module.exports = {
getSaveInformation,
restoreIfNewerExists,
pushSaveGameForImport,
pushGameSaveToSteamCloud,
getSteamCloudSaveString,
pushSaveDataToSteamCloud,
getSteamCloudSaveData,
getSteamCloudQuota,
deleteCloudFile,
saveGameToDisk,
@@ -394,6 +395,4 @@ module.exports = {
setCloudEnabledConfig,
isAutosaveEnabled,
setAutosaveConfig,
isSaveCompressionEnabled,
setSaveCompressionConfig,
};

View File

@@ -2,13 +2,17 @@
const { dialog, shell } = require("electron");
const log = require("electron-log");
const Config = require("electron-config");
const config = new Config();
const Store = require("electron-store");
const store = new Store();
function reloadAndKill(window, killScripts) {
log.info("Reloading & Killing all scripts...");
const zoomFactor = getZoomFactor();
window.webContents.forcefullyCrashRenderer();
window.loadFile("index.html", killScripts ? { query: { noScripts: true } } : {});
window.once("ready-to-show", () => {
setZoomFactor(window, zoomFactor);
});
}
function promptForReload(window) {
@@ -88,7 +92,7 @@ async function writeToast(window, message, type = "info", duration = 2000) {
}
function getZoomFactor() {
const configZoom = config.get("zoom", 1);
const configZoom = store.get("zoom", 1);
return configZoom;
}
@@ -96,7 +100,7 @@ function setZoomFactor(window, zoom = null) {
if (zoom === null) {
zoom = 1;
} else {
config.set("zoom", zoom);
store.set("zoom", zoom);
}
window.webContents.setZoomFactor(zoom);
}

View File

@@ -2,8 +2,8 @@
const { screen } = require("electron");
const log = require("electron-log");
const debounce = require("lodash/debounce");
const Config = require("electron-config");
const config = new Config();
const Store = require("electron-store");
const store = new Store();
// https://stackoverflow.com/a/68627253
const windowTracker = (windowName) => {
@@ -11,8 +11,8 @@ const windowTracker = (windowName) => {
const setBounds = () => {
// Restore from appConfig
if (config.has(`window.${windowName}`)) {
windowState = config.get(`window.${windowName}`);
if (store.has(`window.${windowName}`)) {
windowState = store.get(`window.${windowName}`);
return;
}
@@ -40,7 +40,7 @@ const windowTracker = (windowName) => {
windowState.isMaximized = window.isMaximized();
log.silly(`Saving window.${windowName} to configs`);
config.set(`window.${windowName}`, windowState);
store.set(`window.${windowName}`, windowState);
log.silly(windowState);
}, 1000);

View File

@@ -7,15 +7,17 @@ module.exports = {
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
testPathIgnorePatterns: [".cypress", "node_modules", "dist"],
testEnvironment: "./FixJSDOMEnvironment.ts",
setupFiles: ["./jest.polyfills.js"],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/test/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",
"\\!!raw-loader!.*$": "<rootDir>/test/__mocks__/rawLoader.js",
"\\.(css|less)$": "<rootDir>/test/__mocks__/NullMock.js",
"\\!!raw-loader!.*$": "<rootDir>/test/__mocks__/NullMock.js",
"@player": "<rootDir>/src/Player",
"@enums": "<rootDir>/src/Enums",
"@nsdefs": "<rootDir>/src/ScriptEditor/NetscriptDefinitions",
"^monaco-editor$": "<rootDir>/test/__mocks__/monacoMock.js",
"^monaco-vim$": "<rootDir>/test/__mocks__/monacoMock.js",
"^monaco-editor$": "<rootDir>/test/__mocks__/NullMock.js",
"^monaco-vim$": "<rootDir>/test/__mocks__/NullMock.js",
"/utils/Protections$": "<rootDir>/test/__mocks__/NullMock.js",
},
};

6
jest.polyfills.js Normal file
View File

@@ -0,0 +1,6 @@
const { TextEncoder, TextDecoder } = require("node:util");
Object.defineProperties(globalThis, {
TextEncoder: { value: TextEncoder },
TextDecoder: { value: TextDecoder },
});

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AutocompleteData](./bitburner.autocompletedata.md) &gt; [enums](./bitburner.autocompletedata.enums.md)
## AutocompleteData.enums property
**Signature:**
```typescript
enums: NSEnums;
```

View File

@@ -16,6 +16,7 @@ interface AutocompleteData
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [enums](./bitburner.autocompletedata.enums.md) | | [NSEnums](./bitburner.nsenums.md) | |
| [scripts](./bitburner.autocompletedata.scripts.md) | | string\[\] | |
| [servers](./bitburner.autocompletedata.servers.md) | | string\[\] | |
| [txts](./bitburner.autocompletedata.txts.md) | | string\[\] | |

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BackdoorRequirement](./bitburner.backdoorrequirement.md)
## BackdoorRequirement interface
Player must have installed a backdoor on this server.
**Signature:**
```typescript
interface BackdoorRequirement
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [server](./bitburner.backdoorrequirement.server.md) | | string | |
| [type](./bitburner.backdoorrequirement.type.md) | | "backdoorInstalled" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BackdoorRequirement](./bitburner.backdoorrequirement.md) &gt; [server](./bitburner.backdoorrequirement.server.md)
## BackdoorRequirement.server property
**Signature:**
```typescript
server: string;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BackdoorRequirement](./bitburner.backdoorrequirement.md) &gt; [type](./bitburner.backdoorrequirement.type.md)
## BackdoorRequirement.type property
**Signature:**
```typescript
type: "backdoorInstalled";
```

View File

@@ -18,5 +18,5 @@ interface BasicHGWOptions
| --- | --- | --- | --- |
| [additionalMsec?](./bitburner.basichgwoptions.additionalmsec.md) | | number | _(Optional)_ Number of additional milliseconds that will be spent waiting between the start of the function and when it completes. |
| [stock?](./bitburner.basichgwoptions.stock.md) | | boolean | _(Optional)_ Set to true this action will affect the stock market. |
| [threads?](./bitburner.basichgwoptions.threads.md) | | number | _(Optional)_ Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. |
| [threads?](./bitburner.basichgwoptions.threads.md) | | number | _(Optional)_ Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. Accepts positive non integer values. |

View File

@@ -4,7 +4,7 @@
## BasicHGWOptions.threads property
Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with.
Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. Accepts positive non integer values.
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [CorporationDivisions](./bitburner.bitnodemultipliers.corporationdivisions.md)
## BitNodeMultipliers.CorporationDivisions property
Influences the amount of divisions a corporation can have at the same time
**Signature:**
```typescript
CorporationDivisions: number;
```

View File

@@ -26,6 +26,7 @@ interface BitNodeMultipliers
| [CodingContractMoney](./bitburner.bitnodemultipliers.codingcontractmoney.md) | | number | Influences the amount of money gained from completing Coding Contracts |
| [CompanyWorkExpGain](./bitburner.bitnodemultipliers.companyworkexpgain.md) | | number | Influences the experience gained for each ability when the player completes working their job. |
| [CompanyWorkMoney](./bitburner.bitnodemultipliers.companyworkmoney.md) | | number | Influences how much money the player earns when completing working their job. |
| [CorporationDivisions](./bitburner.bitnodemultipliers.corporationdivisions.md) | | number | Influences the amount of divisions a corporation can have at the same time |
| [CorporationSoftcap](./bitburner.bitnodemultipliers.corporationsoftcap.md) | | number | Influences the money gain from dividends of corporations created by the player. |
| [CorporationValuation](./bitburner.bitnodemultipliers.corporationvaluation.md) | | number | Influences the valuation of corporations created by the player. |
| [CrimeExpGain](./bitburner.bitnodemultipliers.crimeexpgain.md) | | number | Influences the base experience gained for each ability when the player commits a crime. |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeRequirement](./bitburner.bitnoderequirement.md) &gt; [bitNodeN](./bitburner.bitnoderequirement.bitnoden.md)
## BitNodeRequirement.bitNodeN property
**Signature:**
```typescript
bitNodeN: number;
```

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeRequirement](./bitburner.bitnoderequirement.md)
## BitNodeRequirement interface
Player must be located in this BitNode.
**Signature:**
```typescript
interface BitNodeRequirement
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [bitNodeN](./bitburner.bitnoderequirement.bitnoden.md) | | number | |
| [type](./bitburner.bitnoderequirement.type.md) | | "bitNodeN" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeRequirement](./bitburner.bitnoderequirement.md) &gt; [type](./bitburner.bitnoderequirement.type.md)
## BitNodeRequirement.type property
**Signature:**
```typescript
type: "bitNodeN";
```

View File

@@ -9,7 +9,7 @@ Get estimate success chance of an action.
**Signature:**
```typescript
getActionEstimatedSuccessChance(type: string, name: string): [number, number];
getActionEstimatedSuccessChance(type: string, name: string, sleeveNumber?: number): [number, number];
```
## Parameters
@@ -18,6 +18,7 @@ getActionEstimatedSuccessChance(type: string, name: string): [number, number];
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| sleeveNumber | number | _(Optional)_ Optional. Index of the sleeve to retrieve information. |
**Returns:**
@@ -29,5 +30,5 @@ Estimated success chance for the specified action.
RAM cost: 4 GB
Returns the estimated success chance for the specified action. This chance is returned as a decimal value, NOT a percentage (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80).
Returns the estimated success chance for the specified action. This chance is returned as a decimal value, NOT a percentage (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80). Returns 2 values, value\[0\] - MIN Chance, value\[1\] - MAX Chance

View File

@@ -9,7 +9,7 @@ Get the reputation gain of an action.
**Signature:**
```typescript
getActionRepGain(type: string, name: string, level: number): number;
getActionRepGain(type: string, name: string, level?: number): number;
```
## Parameters
@@ -18,7 +18,7 @@ getActionRepGain(type: string, name: string, level: number): number;
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| level | number | Optional action level at which to calculate the gain |
| level | number | _(Optional)_ Optional number. Action level at which to calculate the gain. Will be the action's current level if not given. |
**Returns:**

View File

@@ -4,7 +4,7 @@
## Bladeburner.getBonusTime() method
Get bladeburner bonus time.
Get Bladeburner bonus time.
**Signature:**
@@ -25,5 +25,5 @@ Returns the amount of accumulated “bonus time” (milliseconds) for the Bladeb
“Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.
“Bonus time” makes the game progress faster, up to 5x the normal speed. For example, if an action takes 30 seconds to complete but youve accumulated over 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.
“Bonus time” makes the game progress faster, up to 5x the normal speed. For example, if an action takes 30 seconds to complete, but youve accumulated over 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.

View File

@@ -9,17 +9,15 @@ Get current action.
**Signature:**
```typescript
getCurrentAction(): BladeburnerCurAction;
getCurrentAction(): BladeburnerCurAction | null;
```
**Returns:**
[BladeburnerCurAction](./bitburner.bladeburnercuraction.md)
[BladeburnerCurAction](./bitburner.bladeburnercuraction.md) \| null
Object that represents the players current Bladeburner action.
Object that represents the players current Bladeburner action, or null if no action is being performed.
## Remarks
RAM cost: 1 GB
Returns an object that represents the players current Bladeburner action. If the player is not performing an action, the function will return an object with the type property set to “Idle”.

View File

@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Bladeburner](./bitburner.bladeburner.md) &gt; [getNextBlackOp](./bitburner.bladeburner.getnextblackop.md)
## Bladeburner.getNextBlackOp() method
Get an object with the name and rank requirement of the next BlackOp that can be completed.
**Signature:**
```typescript
getNextBlackOp(): { name: string; rank: number } | null;
```
**Returns:**
{ name: string; rank: number } \| null
An object with the `.name` and `.rank` properties of the available BlackOp, or `null`<!-- -->.
## Remarks
RAM cost: 2 GB
Returns the name and rank requirement for the available BlackOp. Returns `null` if no BlackOps remain in the BitNode.

View File

@@ -9,14 +9,14 @@ Get skill level.
**Signature:**
```typescript
getSkillLevel(name: string): number;
getSkillLevel(skillName: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| name | string | |
| skillName | string | Name of skill. Case-sensitive and must be an exact match. |
**Returns:**

View File

@@ -9,14 +9,14 @@ Get cost to upgrade skill.
**Signature:**
```typescript
getSkillUpgradeCost(name: string, count?: number): number;
getSkillUpgradeCost(skillName: string, count?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| name | string | |
| skillName | string | Name of skill. Case-sensitive and must be an exact match. |
| count | number | _(Optional)_ Number of times to upgrade the skill. Defaults to 1 if not specified. |
**Returns:**
@@ -31,5 +31,5 @@ RAM cost: 4 GB
This function returns the number of skill points needed to upgrade the specified skill the specified number of times.
The function returns -1 if an invalid skill name is passed in.
The function returns -1 if an invalid skill name is passed in, and Infinity if the count overflows the maximum level.

View File

@@ -4,7 +4,7 @@
## Bladeburner.getStamina() method
Get bladeburner stamina.
Get Bladeburner stamina.
**Signature:**

View File

@@ -9,15 +9,15 @@ Get team size.
**Signature:**
```typescript
getTeamSize(type: string, name: string): number;
getTeamSize(type?: string, name?: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | string | _(Optional)_ Type of action. |
| name | string | _(Optional)_ Name of action. Must be an exact match. |
**Returns:**
@@ -29,7 +29,7 @@ Number of Bladeburner team members that were assigned to the specified action.
RAM cost: 4 GB
Returns the number of Bladeburner team members you have assigned to the specified action.
Returns the number of available Bladeburner team members. You can also pass the type and name of an action to get the number of Bladeburner team members you have assigned to the specified action.
Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.

View File

@@ -4,7 +4,7 @@
## Bladeburner.inBladeburner() method
Returns whether player is a member of bladeburner division. Does not require API access.
Returns whether player is a member of Bladeburner division. Does not require API access.
**Signature:**
@@ -15,7 +15,7 @@ inBladeburner(): boolean;
boolean
whether player is a member of bladeburner division.
whether player is a member of Bladeburner division.
## Remarks

View File

@@ -4,7 +4,7 @@
## Bladeburner.joinBladeburnerDivision() method
Join the bladeburner division.
Join the Bladeburner division.
**Signature:**

View File

@@ -4,7 +4,7 @@
## Bladeburner.joinBladeburnerFaction() method
Join the bladeburner faction.
Join the Bladeburner faction.
**Signature:**

View File

@@ -24,14 +24,14 @@ You have to be employed in the Bladeburner division and be in BitNode-7 or have
| [getActionCountRemaining(type, name)](./bitburner.bladeburner.getactioncountremaining.md) | Get action count remaining. |
| [getActionCurrentLevel(type, name)](./bitburner.bladeburner.getactioncurrentlevel.md) | Get the current level of an action. |
| [getActionCurrentTime()](./bitburner.bladeburner.getactioncurrenttime.md) | Get the time elapsed on current action. |
| [getActionEstimatedSuccessChance(type, name)](./bitburner.bladeburner.getactionestimatedsuccesschance.md) | Get estimate success chance of an action. |
| [getActionEstimatedSuccessChance(type, name, sleeveNumber)](./bitburner.bladeburner.getactionestimatedsuccesschance.md) | Get estimate success chance of an action. |
| [getActionMaxLevel(type, name)](./bitburner.bladeburner.getactionmaxlevel.md) | Get the maximum level of an action. |
| [getActionRepGain(type, name, level)](./bitburner.bladeburner.getactionrepgain.md) | Get the reputation gain of an action. |
| [getActionSuccesses(type, name)](./bitburner.bladeburner.getactionsuccesses.md) | Get action successes. |
| [getActionTime(type, name)](./bitburner.bladeburner.getactiontime.md) | Get the time to complete an action. |
| [getBlackOpNames()](./bitburner.bladeburner.getblackopnames.md) | List all black ops. |
| [getBlackOpRank(name)](./bitburner.bladeburner.getblackoprank.md) | Get black op required rank. |
| [getBonusTime()](./bitburner.bladeburner.getbonustime.md) | Get bladeburner bonus time. |
| [getBonusTime()](./bitburner.bladeburner.getbonustime.md) | Get Bladeburner bonus time. |
| [getCity()](./bitburner.bladeburner.getcity.md) | Get current city. |
| [getCityChaos(city)](./bitburner.bladeburner.getcitychaos.md) | Get chaos of a city. |
| [getCityCommunities(city)](./bitburner.bladeburner.getcitycommunities.md) | Get number of communities in a city. |
@@ -39,22 +39,24 @@ You have to be employed in the Bladeburner division and be in BitNode-7 or have
| [getContractNames()](./bitburner.bladeburner.getcontractnames.md) | List all contracts. |
| [getCurrentAction()](./bitburner.bladeburner.getcurrentaction.md) | Get current action. |
| [getGeneralActionNames()](./bitburner.bladeburner.getgeneralactionnames.md) | List all general actions. |
| [getNextBlackOp()](./bitburner.bladeburner.getnextblackop.md) | Get an object with the name and rank requirement of the next BlackOp that can be completed. |
| [getOperationNames()](./bitburner.bladeburner.getoperationnames.md) | List all operations. |
| [getRank()](./bitburner.bladeburner.getrank.md) | Get player bladeburner rank. |
| [getSkillLevel(name)](./bitburner.bladeburner.getskilllevel.md) | Get skill level. |
| [getSkillLevel(skillName)](./bitburner.bladeburner.getskilllevel.md) | Get skill level. |
| [getSkillNames()](./bitburner.bladeburner.getskillnames.md) | List all skills. |
| [getSkillPoints()](./bitburner.bladeburner.getskillpoints.md) | Get bladeburner skill points. |
| [getSkillUpgradeCost(name, count)](./bitburner.bladeburner.getskillupgradecost.md) | Get cost to upgrade skill. |
| [getStamina()](./bitburner.bladeburner.getstamina.md) | Get bladeburner stamina. |
| [getSkillUpgradeCost(skillName, count)](./bitburner.bladeburner.getskillupgradecost.md) | Get cost to upgrade skill. |
| [getStamina()](./bitburner.bladeburner.getstamina.md) | Get Bladeburner stamina. |
| [getTeamSize(type, name)](./bitburner.bladeburner.getteamsize.md) | Get team size. |
| [inBladeburner()](./bitburner.bladeburner.inbladeburner.md) | Returns whether player is a member of bladeburner division. Does not require API access. |
| [joinBladeburnerDivision()](./bitburner.bladeburner.joinbladeburnerdivision.md) | Join the bladeburner division. |
| [joinBladeburnerFaction()](./bitburner.bladeburner.joinbladeburnerfaction.md) | Join the bladeburner faction. |
| [inBladeburner()](./bitburner.bladeburner.inbladeburner.md) | Returns whether player is a member of Bladeburner division. Does not require API access. |
| [joinBladeburnerDivision()](./bitburner.bladeburner.joinbladeburnerdivision.md) | Join the Bladeburner division. |
| [joinBladeburnerFaction()](./bitburner.bladeburner.joinbladeburnerfaction.md) | Join the Bladeburner faction. |
| [nextUpdate()](./bitburner.bladeburner.nextupdate.md) | Sleep until the next Bladeburner update has happened. |
| [setActionAutolevel(type, name, autoLevel)](./bitburner.bladeburner.setactionautolevel.md) | Set an action autolevel. |
| [setActionLevel(type, name, level)](./bitburner.bladeburner.setactionlevel.md) | Set the level of an action. |
| [setTeamSize(type, name, size)](./bitburner.bladeburner.setteamsize.md) | Set team size. |
| [startAction(type, name)](./bitburner.bladeburner.startaction.md) | Start an action. |
| [stopBladeburnerAction()](./bitburner.bladeburner.stopbladeburneraction.md) | Stop current action. |
| [switchCity(city)](./bitburner.bladeburner.switchcity.md) | Travel to another city in bladeburner. |
| [upgradeSkill(name, count)](./bitburner.bladeburner.upgradeskill.md) | Upgrade skill. |
| [switchCity(city)](./bitburner.bladeburner.switchcity.md) | Travel to another city in Bladeburner. |
| [upgradeSkill(skillName, count)](./bitburner.bladeburner.upgradeskill.md) | Upgrade skill. |

View File

@@ -0,0 +1,37 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Bladeburner](./bitburner.bladeburner.md) &gt; [nextUpdate](./bitburner.bladeburner.nextupdate.md)
## Bladeburner.nextUpdate() method
Sleep until the next Bladeburner update has happened.
**Signature:**
```typescript
nextUpdate(): Promise<number>;
```
**Returns:**
Promise&lt;number&gt;
Promise that resolves to the number of milliseconds of Bladeburner time that were processed in the previous update (1000 - 5000 ms).
## Remarks
RAM cost: 1 GB
The amount of real time spent asleep between updates can vary due to "bonus time" (usually 1 second).
## Example
```js
while (true) {
const duration = await ns.bladeburner.nextUpdate();
ns.print(`Bladeburner Division completed ${ns.tFormat(duration)} of actions.`);
ns.print(`Bonus time remaining: ${ns.tFormat(ns.bladeburner.getBonusTime())}`);
// Manage the Bladeburner division
}
```

View File

@@ -31,3 +31,12 @@ RAM cost: 4 GB
Attempts to start the specified Bladeburner action. Returns true if the action was started successfully, and false otherwise.
## Example
```js
ns.bladeburner.startAction("Contracts", "Tracking")
// This will start the Bladeburner Contracts action of Tracking
```

View File

@@ -4,7 +4,7 @@
## Bladeburner.switchCity() method
Travel to another city in bladeburner.
Travel to another city in Bladeburner.
**Signature:**

View File

@@ -9,14 +9,14 @@ Upgrade skill.
**Signature:**
```typescript
upgradeSkill(name: string, count?: number): boolean;
upgradeSkill(skillName: string, count?: number): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| name | string | |
| skillName | string | Name of skill to be upgraded. Case-sensitive and must be an exact match. |
| count | number | _(Optional)_ Number of times to upgrade the skill. Defaults to 1 if not specified. |
**Returns:**

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerRankRequirement](./bitburner.bladeburnerrankrequirement.md) &gt; [bladeburnerRank](./bitburner.bladeburnerrankrequirement.bladeburnerrank.md)
## BladeburnerRankRequirement.bladeburnerRank property
**Signature:**
```typescript
bladeburnerRank: number;
```

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerRankRequirement](./bitburner.bladeburnerrankrequirement.md)
## BladeburnerRankRequirement interface
Player must have at least this rank in the Bladeburner Division.
**Signature:**
```typescript
interface BladeburnerRankRequirement
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [bladeburnerRank](./bitburner.bladeburnerrankrequirement.bladeburnerrank.md) | | number | |
| [type](./bitburner.bladeburnerrankrequirement.type.md) | | "bladeburnerRank" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerRankRequirement](./bitburner.bladeburnerrankrequirement.md) &gt; [type](./bitburner.bladeburnerrankrequirement.type.md)
## BladeburnerRankRequirement.type property
**Signature:**
```typescript
type: "bladeburnerRank";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CityRequirement](./bitburner.cityrequirement.md) &gt; [city](./bitburner.cityrequirement.city.md)
## CityRequirement.city property
**Signature:**
```typescript
city: CityName;
```

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CityRequirement](./bitburner.cityrequirement.md)
## CityRequirement interface
Player must be located in this city.
**Signature:**
```typescript
interface CityRequirement
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [city](./bitburner.cityrequirement.city.md) | | [CityName](./bitburner.cityname.md) | |
| [type](./bitburner.cityrequirement.type.md) | | "city" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CityRequirement](./bitburner.cityrequirement.md) &gt; [type](./bitburner.cityrequirement.type.md)
## CityRequirement.type property
**Signature:**
```typescript
type: "city";
```

View File

@@ -36,9 +36,11 @@ Attempts to solve the Coding Contract with the provided solution.
```js
const reward = codingcontract.attempt(yourSolution, filename, hostname);
const reward = ns.codingcontract.attempt(yourSolution, filename, hostname);
if (reward) {
ns.tprint(`Contract solved successfully! Reward: ${reward}`)
} else ns.tprint("Failed to solve contract.")
ns.tprint(`Contract solved successfully! Reward: ${reward}`);
} else {
ns.tprint("Failed to solve contract.");
}
```

View File

@@ -9,7 +9,7 @@ Generate a dummy contract.
**Signature:**
```typescript
createDummyContract(type: string): void;
createDummyContract(type: string): string;
```
## Parameters
@@ -20,7 +20,9 @@ createDummyContract(type: string): void;
**Returns:**
void
string
Filename of the contract.
## Remarks

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyPositionInfo](./bitburner.companypositioninfo.md) &gt; [field](./bitburner.companypositioninfo.field.md)
## CompanyPositionInfo.field property
**Signature:**
```typescript
field: JobField;
```

View File

@@ -16,6 +16,7 @@ export interface CompanyPositionInfo
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [field](./bitburner.companypositioninfo.field.md) | | [JobField](./bitburner.jobfield.md) | |
| [name](./bitburner.companypositioninfo.name.md) | | [JobName](./bitburner.jobname.md) | |
| [nextPosition](./bitburner.companypositioninfo.nextposition.md) | | [JobName](./bitburner.jobname.md) \| null | |
| [requiredReputation](./bitburner.companypositioninfo.requiredreputation.md) | | number | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md) &gt; [company](./bitburner.companyreputationrequirement.company.md)
## CompanyReputationRequirement.company property
**Signature:**
```typescript
company: CompanyName;
```

View File

@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md)
## CompanyReputationRequirement interface
Player must have at least this much reputation with this company.
**Signature:**
```typescript
interface CompanyReputationRequirement
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [company](./bitburner.companyreputationrequirement.company.md) | | [CompanyName](./bitburner.companyname.md) | |
| [reputation](./bitburner.companyreputationrequirement.reputation.md) | | number | |
| [type](./bitburner.companyreputationrequirement.type.md) | | "companyReputation" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md) &gt; [reputation](./bitburner.companyreputationrequirement.reputation.md)
## CompanyReputationRequirement.reputation property
**Signature:**
```typescript
reputation: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md) &gt; [type](./bitburner.companyreputationrequirement.type.md)
## CompanyReputationRequirement.type property
**Signature:**
```typescript
type: "companyReputation";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [companyName](./bitburner.companyworktask.companyname.md)
## CompanyWorkTask.companyName property
**Signature:**
```typescript
companyName: CompanyName;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [cyclesWorked](./bitburner.companyworktask.cyclesworked.md)
## CompanyWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md)
## CompanyWorkTask interface
Company Work
**Signature:**
```typescript
export interface CompanyWorkTask
```
## Remarks
An object representing the current work for a company
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | |
| [cyclesWorked](./bitburner.companyworktask.cyclesworked.md) | | number | |
| [type](./bitburner.companyworktask.type.md) | | "COMPANY" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [type](./bitburner.companyworktask.type.md)
## CompanyWorkTask.type property
**Signature:**
```typescript
type: "COMPANY";
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorpIndustryData](./bitburner.corpindustrydata.md) &gt; [makesMaterials](./bitburner.corpindustrydata.makesmaterials.md)
## CorpIndustryData.makesMaterials property
Whether the industry of this division is capable of producing materials
**Signature:**
```typescript
makesMaterials: boolean;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorpIndustryData](./bitburner.corpindustrydata.md) &gt; [makesProducts](./bitburner.corpindustrydata.makesproducts.md)
## CorpIndustryData.makesProducts property
Whether the industry of this division is capable of developing and producing products
**Signature:**
```typescript
makesProducts: boolean;
```

View File

@@ -20,7 +20,9 @@ interface CorpIndustryData
| [aiCoreFactor?](./bitburner.corpindustrydata.aicorefactor.md) | | number | _(Optional)_ AI Cores factor |
| [description](./bitburner.corpindustrydata.description.md) | | string | |
| [hardwareFactor?](./bitburner.corpindustrydata.hardwarefactor.md) | | number | _(Optional)_ Hardware factor |
| [producedMaterials?](./bitburner.corpindustrydata.producedmaterials.md) | | [CorpMaterialName](./bitburner.corpmaterialname.md)<!-- -->\[\] | _(Optional)_ |
| [makesMaterials](./bitburner.corpindustrydata.makesmaterials.md) | | boolean | Whether the industry of this division is capable of producing materials |
| [makesProducts](./bitburner.corpindustrydata.makesproducts.md) | | boolean | Whether the industry of this division is capable of developing and producing products |
| [producedMaterials?](./bitburner.corpindustrydata.producedmaterials.md) | | [CorpMaterialName](./bitburner.corpmaterialname.md)<!-- -->\[\] | _(Optional)_ Array of Materials produced |
| [product?](./bitburner.corpindustrydata.product.md) | | [CorpProductData](./bitburner.corpproductdata.md) | _(Optional)_ |
| [realEstateFactor?](./bitburner.corpindustrydata.realestatefactor.md) | | number | _(Optional)_ Real estate factor |
| [recommendStarting](./bitburner.corpindustrydata.recommendstarting.md) | | boolean | |

View File

@@ -4,6 +4,8 @@
## CorpIndustryData.producedMaterials property
Array of Materials produced
**Signature:**
```typescript

View File

@@ -4,7 +4,7 @@
## Corporation.buyBackShares() method
Buyback Shares
Buyback Shares. Spend money from the player's wallet to transfer shares from public traders to the CEO.
**Signature:**

View File

@@ -19,7 +19,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI
| --- | --- |
| [acceptInvestmentOffer()](./bitburner.corporation.acceptinvestmentoffer.md) | Accept investment based on you companies current valuation |
| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | Bribe a faction |
| [buyBackShares(amount)](./bitburner.corporation.buybackshares.md) | Buyback Shares |
| [buyBackShares(amount)](./bitburner.corporation.buybackshares.md) | Buyback Shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. |
| [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | Create a Corporation |
| [expandCity(divisionName, city)](./bitburner.corporation.expandcity.md) | Expand to a new city |
| [expandIndustry(industryType, divisionName)](./bitburner.corporation.expandindustry.md) | Expand to a new industry |
@@ -39,6 +39,8 @@ export interface Corporation extends WarehouseAPI, OfficeAPI
| [issueDividends(rate)](./bitburner.corporation.issuedividends.md) | Issue dividends |
| [issueNewShares(amount)](./bitburner.corporation.issuenewshares.md) | Issue new shares |
| [levelUpgrade(upgradeName)](./bitburner.corporation.levelupgrade.md) | Level an upgrade. |
| [nextUpdate()](./bitburner.corporation.nextupdate.md) | Sleep until the next Corporation update has happened. |
| [purchaseUnlock(upgradeName)](./bitburner.corporation.purchaseunlock.md) | Unlock an upgrade |
| [sellShares(amount)](./bitburner.corporation.sellshares.md) | Sell Shares |
| [sellDivision(divisionName)](./bitburner.corporation.selldivision.md) | Sell a division |
| [sellShares(amount)](./bitburner.corporation.sellshares.md) | Sell Shares. Transfer shares from the CEO to public traders to receive money in the player's wallet. |

View File

@@ -0,0 +1,41 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [nextUpdate](./bitburner.corporation.nextupdate.md)
## Corporation.nextUpdate() method
Sleep until the next Corporation update has happened.
**Signature:**
```typescript
nextUpdate(): Promise<CorpStateName>;
```
**Returns:**
Promise&lt;[CorpStateName](./bitburner.corpstatename.md)<!-- -->&gt;
Promise that resolves to the name of the state that was just processed.
I.e. when the state is PURCHASE, it means purchasing has just happened. Note that this is the state just before `getCorporation().state`<!-- -->.
Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.
## Remarks
RAM cost: 1 GB
The amount of real time spent asleep between updates can vary due to "bonus time" (usually 200 milliseconds - 2 seconds).
## Example
```js
while (true) {
const prevState = await ns.corporation.nextUpdate();
const nextState = ns.corporation.getCorporation().nextState;
ns.print(`Corporation finished with ${prevState}, next will be ${nextState}.`);
// Manage the Corporation
}
```

View File

@@ -0,0 +1,28 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [sellDivision](./bitburner.corporation.selldivision.md)
## Corporation.sellDivision() method
Sell a division
**Signature:**
```typescript
sellDivision(divisionName: string): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| divisionName | string | Name of the division |
**Returns:**
void
## Remarks
RAM cost: 20 GB

View File

@@ -4,7 +4,7 @@
## Corporation.sellShares() method
Sell Shares
Sell Shares. Transfer shares from the CEO to public traders to receive money in the player's wallet.
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [investorShares](./bitburner.corporationinfo.investorshares.md)
## CorporationInfo.investorShares property
Amount of shares owned by private investors. Not available for public sale or CEO buyback.
**Signature:**
```typescript
investorShares: number;
```

View File

@@ -4,7 +4,7 @@
## CorporationInfo.issuedShares property
Amount of acquirable shares.
Amount of shares owned by public traders. Available for CEO buyback.
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [issueNewSharesCooldown](./bitburner.corporationinfo.issuenewsharescooldown.md)
## CorporationInfo.issueNewSharesCooldown property
Cooldown until new shares can be issued
**Signature:**
```typescript
issueNewSharesCooldown: number;
```

View File

@@ -22,13 +22,16 @@ interface CorporationInfo
| [divisions](./bitburner.corporationinfo.divisions.md) | | string\[\] | Array of all division names |
| [expenses](./bitburner.corporationinfo.expenses.md) | | number | Expenses per second this cycle |
| [funds](./bitburner.corporationinfo.funds.md) | | number | Funds available |
| [issuedShares](./bitburner.corporationinfo.issuedshares.md) | | number | Amount of acquirable shares. |
| [investorShares](./bitburner.corporationinfo.investorshares.md) | | number | Amount of shares owned by private investors. Not available for public sale or CEO buyback. |
| [issuedShares](./bitburner.corporationinfo.issuedshares.md) | | number | Amount of shares owned by public traders. Available for CEO buyback. |
| [issueNewSharesCooldown](./bitburner.corporationinfo.issuenewsharescooldown.md) | | number | Cooldown until new shares can be issued |
| [name](./bitburner.corporationinfo.name.md) | | string | Name of the corporation |
| [numShares](./bitburner.corporationinfo.numshares.md) | | number | Amount of share owned |
| [nextState](./bitburner.corporationinfo.nextstate.md) | | [CorpStateName](./bitburner.corpstatename.md) | <p>The next state to be processed.</p><p>I.e. when the state is PURCHASE, it means purchasing will occur during the next state transition.</p><p>Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.</p> |
| [numShares](./bitburner.corporationinfo.numshares.md) | | number | Amount of shares owned by the CEO. |
| [prevState](./bitburner.corporationinfo.prevstate.md) | | [CorpStateName](./bitburner.corpstatename.md) | <p>The last state that got processed.</p><p>I.e. when that state is PURCHASE, it means purchasing just happened.</p><p>Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.</p> |
| [public](./bitburner.corporationinfo.public.md) | | boolean | Indicating if the company is public |
| [revenue](./bitburner.corporationinfo.revenue.md) | | number | Revenue per second this cycle |
| [sharePrice](./bitburner.corporationinfo.shareprice.md) | | number | Price of the shares |
| [shareSaleCooldown](./bitburner.corporationinfo.sharesalecooldown.md) | | number | Cooldown until shares can be sold again |
| [state](./bitburner.corporationinfo.state.md) | | string | State of the corporation. Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE. |
| [totalShares](./bitburner.corporationinfo.totalshares.md) | | number | Total number of shares issues by this corporation |
| [totalShares](./bitburner.corporationinfo.totalshares.md) | | number | Total number of shares issued by this corporation. |

View File

@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [nextState](./bitburner.corporationinfo.nextstate.md)
## CorporationInfo.nextState property
The next state to be processed.
I.e. when the state is PURCHASE, it means purchasing will occur during the next state transition.
Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.
**Signature:**
```typescript
nextState: CorpStateName;
```

View File

@@ -4,7 +4,7 @@
## CorporationInfo.numShares property
Amount of share owned
Amount of shares owned by the CEO.
**Signature:**

View File

@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [prevState](./bitburner.corporationinfo.prevstate.md)
## CorporationInfo.prevState property
The last state that got processed.
I.e. when that state is PURCHASE, it means purchasing just happened.
Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.
**Signature:**
```typescript
prevState: CorpStateName;
```

View File

@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [state](./bitburner.corporationinfo.state.md)
## CorporationInfo.state property
State of the corporation. Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.
**Signature:**
```typescript
state: string;
```

View File

@@ -4,7 +4,7 @@
## CorporationInfo.totalShares property
Total number of shares issues by this corporation
Total number of shares issued by this corporation.
**Signature:**

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md)
## CreateProgramWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md)
## CreateProgramWorkTask interface
Create Program
**Signature:**
```typescript
export interface CreateProgramWorkTask
```
## Remarks
An object representing the status of the program being created
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
| [programName](./bitburner.createprogramworktask.programname.md) | | string | |
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [programName](./bitburner.createprogramworktask.programname.md)
## CreateProgramWorkTask.programName property
**Signature:**
```typescript
programName: string;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [type](./bitburner.createprogramworktask.type.md)
## CreateProgramWorkTask.type property
**Signature:**
```typescript
type: "CREATE_PROGRAM";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [crimeType](./bitburner.crimetask.crimetype.md)
## CrimeTask.crimeType property
**Signature:**
```typescript
crimeType: CrimeType;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [cyclesWorked](./bitburner.crimetask.cyclesworked.md)
## CrimeTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

Some files were not shown because too many files have changed in this diff Show More