Commit Graph

118 Commits

Author SHA1 Message Date
catloversg
5d26f4fa56
GANG: Show error popup when there are errors (#1763)
* GANG: Show error popup when there are errors

* Only show error once when it's in a hot code path
2024-11-11 07:41:38 -08:00
catloversg
f6502dd490
CODEBASE: Fix lint errors 1 (#1732) 2024-11-03 22:35:14 -08:00
catloversg
f7ee3a340f
MISC: Remove or change popup shown when system clock moved backward (#1739) 2024-10-30 04:15:43 -07:00
catloversg
bc51733fbe
MISC: Improve exception alert (#1709) 2024-10-21 20:36:29 -07:00
catloversg
c2727b5127
BUGFIX: Change generation rate of CCTs (#1657) 2024-09-22 21:35:34 -07:00
catloversg
4a3dcf8a26
MISC: Expose internal data in dev build (#1611) 2024-08-21 17:50:11 -07:00
Nicole
7029ac9bcc
UI: Add apostrophe to stanek's gift strings (#1568) 2024-08-11 16:38:40 -07:00
Tom Prince
2f95d21503
UI: Sync UI updates to game updates. (#1512)
There are a bunch of React components that update at the same rate
that the game engine processes cycles. Rather than have each place
that does so start its own timer to update that often, add a new
react hook that triggers an update shortly after the engine completes
a cycle.
2024-08-01 23:57:43 -07:00
David Walker
06553d9700
BUGFIX: Fix "Router called before initialization" race (#1474)
If the game takes long enough to load, certain counters can become
eligible to run as soon as Engine.start() runs. When this happens,
eventually Router.page() is called, which throws an Error since Router
isn't initialized yet. (Dropping a breakpoint before Engine.start() and
waiting at least 30 seconds is enough to reliably repro, but I have seen
this both live and in tests.)

This fixes it so that Router.page() is valid immediately, returning a
value of Page.LoadingScreen. It also removes the isInitialized field,
since this is now redundant. Trying to switch pages is still an error,
but that doesn't happen without user input, whereas checking the current
page is quite common.

This also consolidates a check for "should we show toasts" behind a
function in Router, making the logic central and equal for a few
usecases. This means (for instance) that the "autosave is disabled"
logic won't run during infiltration. (The toast should have already been
suppressed.)
2024-07-07 22:13:37 -07:00
catloversg
055b4bd7bc
MISC: Add threshold for warning about system clock (#1463) 2024-07-06 22:24:51 -07:00
catloversg
a12056a898
BLADEBURNER: Add remaining time for actions (#1391) 2024-06-12 19:21:23 -07:00
catloversg
304a918cc9
BUGFIX: Fix negative elapsed time (#1354) 2024-06-05 18:11:59 -07:00
Michael Ficocelli
bd5c502f53
IPVGO: Support bonus cycles from offline time (#1345) 2024-06-04 18:43:29 -07:00
catloversg
81a707123e
BUGFIX: Engine does not send all faction invitations (#1277) 2024-05-23 01:40:23 -07:00
David Walker
e56ed353e5
(Partial) fix for #795 (#1223) 2024-04-23 20:40:59 -04: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
Snarling
97d679bdac
MISC: Protect against reassigning certain globals (#972) 2023-12-16 05:03:52 -05:00
Snarling
87925f1900
EDITOR: Reorganization and minor efficiency improvements (#886) 2023-10-23 07:02:33 -04:00
alutman
445c0c3134
Offline hacking income now shown for scripts (#873) 2023-10-23 05:00:16 -04:00
Yichi Zhang
3f0c10adf4
STANEK: Re-apply stanek boosts when applying entropy (#816) 2023-10-02 20:11:22 -04:00
Snarling
e2655793f4
TYPESAFETY: CompanyName (#650) 2023-07-11 09:23:17 -04:00
Snarling
9a0a843ffc
TYPESAFETY: FactionName (#644) 2023-06-25 22:53:35 -04:00
Snarling
a4b826683e
TYPESAFETY: Strict internal typing for AugmentationName (#608) 2023-06-16 17:52:42 -04:00
Snarling
6732549196
ENUMS: Initial Enum Helper rework + Reorganization (#596) 2023-06-12 00:34:20 -04:00
Snarling
403beef69e
PRESTIGE: Make bitnode reset synchronous again (#566)
* Make prestige synchronous
2023-06-03 18:04:45 -04:00
David Walker
db26d054fc
Various fixes to our upgrade logic (#536)
Stuff broke over time, especially with the major changes we made leading
up to 2.3. We should test with older saves if/when we make large changes
in the future.

Fixes #532
2023-05-27 00:16:31 -04:00
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -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
David Walker
8445af5f2b
Moved Player initialization point (#452)
Now initialized as side effect in PlayerObject, instead of in Player file that is imported everywhere.
2023-03-29 00:30:27 -04:00
David Walker
02a436dc79
ENGINE: Use setTimeout() instead of requestAnimationFrame() (#421) 2023-03-12 18:31:58 -04:00
Mughur
9d504b0dfb
updated node starting messages actually show up (#397) 2023-02-27 21:46:01 +02:00
Snarling
d3f9554a6e
2.2.2 Release (#378) 2023-02-21 09:44:18 -05:00
Snarling
b4074328ec
UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
Mughur
1baa615def
MISC: small fixes (#270)
* infiltration gain bug fix
* fix corp division description
* avoid some issues with Infinity at super high NFG levels
Co-authored-by: Daniel Perez Alvarez <danielpza@protonmail.com>
2023-01-02 13:51:59 -05:00
David Walker
8d793ea271
Internal refactoring of Router (#241) 2022-12-04 03:14:06 -05:00
TheMas3212
533d8a4332 GANG: Fix Gang UI to correctly report the bonus time multiplier as 25x
Add Tooltop to Corporation UI to explain bonus time (matching the one in
Gang UI)
Move corporation.process to the correct location
2022-11-25 00:45:30 +11:00
Olivier Gagnon
cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -04:00
hydroflame
f8a3a046de
Merge pull request #4156 from G4mingJon4s/contractFix
Coding Contract: Saving and reloading no longer generates extra coding contracts.
2022-10-09 00:31:42 -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
ab56d18e1e group initializers 2022-10-01 15:49:23 -04:00
Snarling
9774235404 initial test fix attempt 2022-10-01 15:03:47 -04:00
Olivier Gagnon
cb064ce8d7 fix new save file not loading 2022-09-28 23:35:01 -04:00
Snarling
38063f62a7 build fix, lint, remove some instanceof checks 2022-09-27 16:09:32 -04:00
Snarling
21a2d49de7 Finish removing player passing 2022-09-27 15:35:41 -04:00
Snarling
1ac57d2e48 Fix use-before-defined import issue 2022-09-27 15:35:40 -04:00
Snarling
83d357e758 commit1 2022-09-27 15:35:40 -04:00
G4mingJon4s
fd9bdb3b65 Readded randomness for lower values of chances 2022-09-26 19:19:03 +02:00