Commit Graph

737 Commits

Author SHA1 Message Date
Snarling
87f2ae459d
UI: Better support for custom player React content (#513) 2023-05-22 05:28:24 -04:00
David Walker
9d9f6b4dcd
Fix incorrect progress (#516) 2023-05-21 10:04:40 -04:00
omuretsu
ce9ceb05a3 Revert hostname in tail titlebar 2023-05-15 20:26:18 -04:00
Snarling
2ae3ac52f1
CORPORATION: Corp changes prior to 2.3 finalization (#503) 2023-05-15 18:06:57 -04:00
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00
David Walker
8b7166e4ed
UI: Fix (most) perf issues in Active Scripts (#498) 2023-04-30 19:31:29 -04:00
David Walker
aa7facd4ba
NETSCRIPT: Greatly speed up script launching, and remove the limitation unique args per script (#440)
* Remove the limitation unique args per script
* Internal changes to how runningScripts are stored on the server, to make common usage faster.
2023-04-27 18:21:06 -04:00
David Walker
be4b0267a6
TERMINAL: Greatly improve ANSI handling (#485)
- Add support for 2;r;g;b color codes (much easier to deal with
  than 5;x256 style codes)
- Fix 40-47 (standard background colors) so that they work
- Add support for italic
- Add support for empty arguments interpreted as 0
  (0 is still not supported for "reset style", since it's not needed
  with our non-standard usage of resetting styles on every escape
  sequence, and it might cause compat issues)
- Fix ordering of 0-15 in the x256 colors to match the standard. The
  "main" colors (selected via 30-37 for FG and 40-47 for BG) are still
  artificially bright for FG, kept for compatibility, but there's no
  reason to screw up the x256 colors. (Hopefully usage of that section
  should be small anyway.)
2023-04-24 11:04:37 -04:00
Arron Chapman
e7fcda19c1
UI: Added hostname to LogBox title (#478) 2023-04-24 10:33:16 -04:00
Snarling
e0272ad4af
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 10:26:57 -04:00
Snarling
0df984eea0
CODEBASE: Add Jsonable Map and Set types, move player.sourceFiles to a map (#473) 2023-04-18 03:19:45 -04:00
T.J. Eckman
751fe82f92
HASHNET: Company Favor (#469) 2023-04-08 23:24:09 -04:00
omuretsu
4ebfdcc4a8 Changelog + misc minor changes
Recovery textarea no longer spellchecks, fixed some "as" type assertions that were not necessary.
2023-03-06 11:45:36 -05:00
Snarling
759f86d6e5
NETSCRIPT: Rework script ram updates (#408) 2023-03-05 22:39:42 -05:00
Snarling
d3f9554a6e
2.2.2 Release (#378) 2023-02-21 09:44:18 -05:00
omuretsu
bba6b26ac1 Fix ram<1GB display bug 2023-02-20 06:31:52 -05:00
omuretsu
6b8ae1b351 Change high% display to mult form
Also includes some documentation updates from a previous PR (sleeve.setToIdle)
2023-02-19 15:24:27 -05:00
omuretsu
bd4fe19fde Fix percent display at large values 2023-02-18 08:03:16 -05:00
Snarling
6a6043c509
CODEBASE: Add custom useRerender hook (#359) 2023-02-11 13:22:55 -05:00
Snarling
b4074328ec
UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
omuretsu
07b1eefe33 Run prettier 2023-02-07 21:16:18 -05:00
Mughur
67fde6167b Fix tutorial getting started link
change tformat.rst file name
2023-02-08 03:46:42 +02:00
Zelow79
d6a0d5fcaa
BUGFIX: Corrected error in formatReallyBigNumber and updated BB UI to be more large number friendly (#331) 2023-01-20 08:06:50 -05:00
Mughur
7e183c4e4a Updated ReadTheDocs links 2023-01-06 15:24:10 +02:00
David Walker
7b5080a42b
NETSCRIPT: Add undocumented function printRaw() (#277)
This is analagous to tprintRaw (enabled by ns.iKnowWhatImDoing()), but
for logs instead of the terminal. This provides a supported* method of
creating complicated UIs for scripts.

*No actual support, expressed or implied, is provided for use of this
function.
2023-01-05 20:30:34 -05:00
Snarling
31bf0c43d1 v2.2.1 (#293)
* handle enums differently
* Enums are frozen and fed directly to the proxy
* Enums are not included in the NSFull definition, allowing samekeys for RamCostTree<API>, InternalAPI<API>, and ExternalAPI<API>
* Rewrote a lot of the ramcalc test, with better typing thanks to the samekeys above
* Fix ns1 for proxy (args, pid, and enums after above changes were not being added to ns1 scripts.)
* Fixed an overview issue where the bars could display inaccurately.
Update changelog and bump version to 2.2.1
2023-01-04 09:45:17 -05:00
omuretsu
bb566dc57c hotfix
* Fix ramcost for corporation.bonusTime (must be 0 because other getBonusTime functions exist).
* Fix ui hook names for overview.
2023-01-03 12:23:38 -05:00
Snarling
dc0de2498b
Fix mathjax error (#287)
* Updated mathjax and better-react-mathjax
* Removed MathJaxWrapper. Per better-react-mathjax documentation, we were incorrectly including a new context for every equation using this wrapper.
* Wrapped entire game in a MathJaxContext at GameRoot.
2023-01-03 07:38:14 -05:00
omuretsu
d00ed1f4ee sync overview updates
Using EventEmitter. Also get rid of ShownContext as it is no longer needed with this event based rerender.
2023-01-02 08:54:18 -05:00
omuretsu
90fc82b86f Fix bad memoization in blade overview 2023-01-02 08:00:45 -05:00
omuretsu
313f6ada94 Fix more overview issues
Previous changes had overview become empty when collapsing it, which broke the collapse animation. It also would have broken use of the player-visible hooks, because those would have been removed from the document on collapse.
Now a context is used to store whether the overview is being shown or not, and components that update themselves will only do so when they are being shown.
2022-12-30 15:42:58 -05:00
Snarling
62a2532d05
UI: Fix broken overview (#273)
Fixes the broken overview where improper hook use was causing React errors for certain prop changes.
Overview no longer rerenders itself on a timer. Instead individual items that need to check for state updates do so themselves on a timer.
2022-12-30 14:28:49 -05:00
Snarling
fb1f95c26e
VARIOUS: Various changes prior to release 2.2 (#271)
See PR #271 description
2022-12-29 20:28:53 -05:00
David Walker
149d687fd6
UI: Memoize character overview (#247) 2022-12-21 18:27:51 -05:00
Mughur
addcee73fc
Tutorial: Remove NS1 tutorial, change getting started guide to .js (#258) 2022-12-21 17:49:12 -05:00
David Walker
8d793ea271
Internal refactoring of Router (#241) 2022-12-04 03:14:06 -05:00
G4mingJon4s
897a1fbc8e
Changed skill formatting from numeral to localeStr (#244) 2022-12-03 23:32:39 -05:00
Snarling
5ff2cd5357
VERSION: Update game version to 2.2 (#240)
Includes some bug fixes:
* Fix sleeve shock internal/display discrepancy (0-100 vs 0-100)
* Special error message if ns function called without a this
* Change whitespace to pre-wrap for dialog box.
* Fix bug where idle sleeves do not consume cycles but still recover shock from those cycles. Now they do not recover during idle.
* attempted to tag commit as v2.2.0
2022-12-01 16:07:46 -05:00
Snarling
e17380549d
Add ctrl-a support for logs (#228)
And prevent double line returns when copying logs
2022-11-24 13:04:06 -05:00
Snarling
79fd5f6089
Fix ansi background spacing (#219) 2022-11-21 11:08:36 -05:00
Snarling
65cd14e33b
DOC: Add ns documentation for possible sleeve tasks (#217)
* Add specific types for sleeve tasks
* Moved LocationName enum to overall enums file
* Add LocationName enum to those provided to player
* remove trailing s on CompanyPosNames enum (now CompanyPosName, in line with LocationName)
* Also regenerated all ns documentation. This leads to an expected error when checking for generated files, because PRs should not normally touch markdown files. Also leads to a lint failure in generated file bitburner.d.ts
* also removed some exporting from NetscriptDefinitions.d.ts for anything that wasn't imported somewhere else.
2022-11-20 12:07:22 -05:00
Snarling
88d51e9a7e
MISC: A bunch of enums stuff. (#212)
* Some game enums moved to utils/enums. Others can eventually be moved there as well.
* findEnumMember function for performing fuzzy matching of player input with enum members, without needing separate fuzzy functions for every enum.
* Also used findEnumMember for safely loading save games (allows case changes in enum values)
* Changed capitalization on some enums.
* BREAKING: removed classGains work formulas function
* Split ClassType enum into UniversityClassType and GymType.
* Added universityGains and gymGains work formulas functions
* Provided the new split enums to the player on ns.enums.
2022-11-20 08:37:11 -05:00
Rai
c17af3ad35
UI: SoftResetButton.tsx Tooltip changed to make more sense (#186) 2022-11-06 17:30:01 -05:00
jaculler
a40aa1bab2
Fix Tutorial Ram Text (#162)
This updates the tutorial (and tests) to match the updated value of 8GB starting ram.
2022-10-27 06:25:45 -04:00
Olivier Gagnon
cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -04:00
Olivier Gagnon
f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
Snarling
068533cd2f format, lint, more enums, revert fn rename 2022-10-05 14:52:48 -04:00
Snarling
aa80cf6451 See description
Reverted ToastVariant back to an enum internally. Still exposed to player as just possible strings.
Changed all 1-line documentation comments to actually be 1-line. Moved some because they were not providing documentation for the thing they were trying to.
2022-10-04 06:40:10 -04:00
Snarling
50f14b4f58 Commit1 2022-10-03 12:12:16 -04:00
Snarling
3addda7173 format and lint 2022-10-01 15:15:36 -04:00