Commit Graph

67 Commits

Author SHA1 Message Date
Olivier Gagnon 52e01fc026 fix a few things about getRecentScritps 2022-04-12 14:45:48 -04:00
hydroflame 68abd27d2c Merge branch 'dev' into add-ns-getRecentScripts 2022-04-12 14:21:18 -04:00
Olivier Gagnon 48f80f25d6 fmt and lint 2022-04-06 19:30:08 -04:00
Martin Fournier 2262d6d8dd Add a warning triggered while auto-saves are off
The check auto-save engine loop will show a warning toast if the auto-saves are disabled (at 0s) and not suppressed. This warning includes a button to re-enable them.

Adds a user setting to suppress those warnings.
Adds information to save button tooltip.
2022-03-25 09:18:35 -04:00
smolgumball 2add4e9112 Merge branch 'dev' into add-ns-getRecentScripts 2022-01-26 19:07:02 -07:00
Martin Fournier 26432082e2 Add an import save comparison page
This adds a new page reachable from the import save file
options menu. It shows the difference between the current save
and the data that is being imported, for confirmation.

Includes an "automatic" variant, which has different wording for when
Electron decides it has access to a newer version of the game.

While in this screen, the autosave is disabled.

This also adds a new BypassWrapper component around the game's tree.
It allows for content to be displayed without rendering the nested
pages (import, recovery). This prevents player scripts from messing
with the screen.
2022-01-26 03:56:17 -05:00
Martin Fournier 974344545d Move import save functionality into SaveObject
Adds a lot of metadata to be able to easily compare the new save to the
current player.

- Adds lastSaved & identifier to the PlayerObject
- Includes a hash method used to generate an identifier
2022-01-26 03:42:52 -05:00
hydroflame 7a5dfd0e72 Merge pull request #2707 from MartinFournier/feature/theme-browser
Add Theme Browser accessible from GameOptions
2022-01-26 00:46:17 -05:00
nickofolas 259071e3d5 Align slider endpoints in settings 2022-01-21 16:32:32 -06:00
Martin Fournier a26b9c8dcf Add theme browser page accessible from game options
Removed the themes buttons that were in the ThemeEditorModal and only
left a "Revert to Default" button along with a link to the ThemeBrowser
page.

Split off the buttons into reusable components since they are now used
in two pages.

Display the themes in big cards with a zoomable screenshot. Applying the
theme now shows a toast with an option to undo the action.

The snackbar now allows ReactNode instead of only strings.

- Add link with details on how to create a new theme in the game.
- Add link to the theme-sharing discord channel.
- Add icons to the theme & style buttons in GameOptions
- Add "Theme Editor" button to ThemeBrowser
- Add "Style Editor" button to ThemeBrowser
- Move Styles related files into Themes folder
- Includes a modal that shows a bigger version of the screenshot.
- Change Snackbar to allow for ReactNode as the message
2022-01-20 18:41:49 -05:00
Martin Fournier a9e2e35446 Move theme related things into its own subfolder
This will make contributions easier and less prone to conflicts.
2022-01-20 18:41:48 -05:00
smolgumball 74e2acfa6f Add ns.getRecentScripts() 2022-01-19 00:04:48 -07:00
Olivier Gagnon 53727f6222 typo 2022-01-18 19:20:16 -05:00
Martin Fournier 65964c84b2 Add information to the recovery page
Adds error & environment information to the recovery page when
available. The info will be displayed when the error boundary catches an error only.

Otherwise, does a few minor tweaks to the UI of the page.

- Add DevPage button to throw an uncaught error to go into recovery
- Add "Delete Save" button in recovery from Game Options (refactored into its own
component)
- Use "Soft Reset" button from Game Options (refactored into its own
component)
- The "Soft Reset" & "Delete Save" buttons now have confirmations
- Add tooltip on "Disable Recovery Mode" button
- Add timestamp to the RECOVERY.json filename
- Add textarea containing markdown with the current error details, if
available
  - Error
  - Page
  - Version
  - Environment
  - Platform
  - UserAgent
  - Features
  - Source
  - Stack Trace
- Change GitHub new issue link to contain default body & title, if possible
- Change links to not take the full width (they were clickable by mistake)
- Fix "Disable Recovery Mode" not resetting the ErrorBoundary's state,
making going back to terminal impossible
2022-01-16 09:07:53 -05:00
nickofolas 0359229af6 Grid-align buttons in location UIs (and options) 2022-01-15 10:21:45 -06:00
Martin Fournier b22eb58aba Add option to exclude running scripts from save 2022-01-11 16:48:00 -05:00
Martin Fournier 7ee2612c17 Allow drag on character overview
Makes the character overview (and tutorial) draggable, persisting the
{x, y, opened} in the user's settings.

- Remove margin & padding from html, body and ensure main content is
full height
- Add setting to disable progress bars
- Refactor options to use new OptionSwitch
- Add exclusions to prettierignore
- Specify line ending in prettier & gitattributes
2022-01-10 07:37:01 -05:00
Martin Fournier 0ede6c4295 Add fontFamily & lineHeight settings 2022-01-09 08:40:57 -05:00
Martin Fournier 3562671772 Add SaveTimestamp to saveString, used in import 2022-01-07 09:02:35 -05:00
Martin Fournier 46fe8cc94c Change SuppressSaveToast to only work on auto-save
Before this, this setting also suppressed the toast for the manual clicks.
2022-01-05 14:56:28 -05:00
Martin Fournier dfabc0ac11 Fix import save issue with large files
The base64 regex was throwing a maximum stack size exceeded error with
large files.
The whole check was a bit redundant since we already try to parse the
file from base64 just below.
2022-01-03 11:02:29 -05:00
hydroflame cd9fad06d0 Merge pull request #2231 from ErzengelLichtes/use-numeraljs-for-ram
Use numeral.js to format memory, allow use of GiB with an option
2022-01-02 11:43:33 -05:00
Martin Fournier 2b7464ebb7 Add validation & confirm prompt for save import 2021-12-31 05:32:52 -05:00
ErzengelLichtes 8f3da16ecf Use numeral.js to format memory, allow use of GiB with an option
numeral.js has a formatter for both kilobyte and kibibyte, so why use a custom formatter that only goes up to exabyte?
Also added a setting to allow people who really want to see GiB to enable that, even if it doesn't make sense.
2021-12-29 15:51:59 -08:00
Jared Jolton e3a9f9edab Fix "Terminal capacity" option description typo 2021-12-26 20:21:35 -07:00
Olivier Gagnon 555216a39b Add confirmation to installing 2021-12-18 18:13:49 -05:00
Martin Fournier 733f04c343 Add an option to suppress the 'Saved Game' toast 2021-12-18 08:01:15 -05:00
Olivier Gagnon d195b00ab6 Added option to suppress TIX limit/stop orders 2021-12-08 20:21:44 -05:00
Olivier Gagnon d01d75606a few bugfix 2021-12-08 17:39:01 -05:00
Olivier Gagnon d4ebc46a19 merge dev 2021-12-03 15:35:45 -05:00
Olivier Gagnon 7ee5d8d71a more achievements 2021-11-28 23:51:01 -05:00
Olivier Gagnon 60d34c3cc6 rebuild 2021-11-19 23:45:34 -05:00
Olivier Gagnon a4a931dad7 v1.0.2 part 1 2021-11-19 14:39:38 -05:00
Olivier Gagnon 632de50a73 convert BN13 to a more conventional one. 2021-11-18 15:38:19 -05:00
Olivier Gagnon e34467ff6e Added blood donation link. 2021-11-18 15:21:12 -05:00
Olivier Gagnon 56ddcd9a45 more work on bn13 2021-11-13 22:44:17 -05:00
Olivier Gagnon 3112dc60c0 few more bugfixes 2021-11-11 23:28:08 -05:00
hydroflame 70ffe25bb4 Revert "bunch of bugfixes" 2021-11-11 20:06:05 -05:00
Olivier Gagnon d91d7c564e bunch of bugfixes 2021-11-11 19:56:09 -05:00
Olivier Gagnon cf2efe7698 few bugdic 2021-11-11 17:00:36 -05:00
Olivier Gagnon 3f28b066b0 working on timestamps and make netscript function highlight more specific. 2021-11-11 10:07:16 -05:00
Olivier Gagnon 15b3a82a41 plenty of bug fix. 2021-11-10 19:28:20 -05:00
Olivier Gagnon d83650c3bc speed up ns1 2021-11-05 14:32:21 -04:00
Olivier Gagnon 87c63cde59 merge v0.56.0 2021-10-12 01:35:30 -04:00
Olivier Gagnon 06775b20fa saving file now saves game 2021-10-11 17:57:17 -04:00
Olivier Gagnon da746a63c3 add incremental game plaza stuff 2021-10-04 23:56:24 -04:00
Olivier Gagnon c5713fa6d8 learned and implemented default props 2021-09-29 01:49:22 -04:00
Olivier Gagnon b5abbbc240 hacknet nodes in mui 2021-09-26 21:26:25 -04:00
Olivier Gagnon 06f716c0fa moved a bunch of files 2021-09-25 14:42:57 -04:00
Olivier Gagnon b8faa9dc0b convert player to ts 2021-09-23 18:47:43 -04:00