Commit Graph

43 Commits

Author SHA1 Message Date
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00
Snarling
d25254caf1
BUGFIX: Prevent crash that could occur with server named runningScripts (#502) 2023-05-03 20:19:56 -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
omuretsu
211e2bcb95 Fix Electron API server
VSCode integration fix for Electron version
2023-02-23 21:18:29 -05:00
Olivier Gagnon
cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -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
572c68738f Unify error handling 2022-09-27 15:34:47 -04:00
Roman Ivaniuk
5c0c130b4b 3992 Fix: handle null duration in toast ns function
extend SnackbarEvents typing to allow null in third argument
also remove typos in Electron.tsx init functions comments
2022-08-19 14:38:46 +03:00
Olivier Gagnon
71d8e35bb5 more anys 2022-07-19 23:26:21 -04:00
Olivier Gagnon
606f1bf6c4 create program and grafting done 2022-07-10 01:37:36 -04:00
JP Sugarbroad
c6327ee682 add better typing to Electron.tsx 2022-04-21 23:50:49 -07:00
Heinous Tugboat
492c7012ea Renames SnackbarVariant to ToastVariant, adds enum to ns 2022-04-13 01:54:13 -04:00
Heinous Tugboat
5b96cedd0c Adds SnackbarVariant enum 2022-04-08 23:46:19 -04:00
Olivier Gagnon
c26c9a0c3a fix lint 2022-02-23 02:50:38 -05:00
Martin Fournier
855a4e622d Add Electron preload script to allow communication
Adds a channel to communicate between the main process & the renderer
process, so that the game can easily ship data back to the main process.

It uses the Electron contextBridge & ipcRenderer/ipcMain.

Connects those events to various save functions. Adds triggered events
on game save, game load, and imported game. Adds way for the Electron
app to ask for certain actions or data.

Hook handlers to disable automatic restore

Allows to temporarily disable restore when the game just did an import
or deleted a save game. Prevents looping screens.
2022-01-26 03:56:19 -05:00
Olivier Gagnon
022dd5d7d7 fix compile error 2022-01-26 00:58:02 -05:00
Xi-Lin Yeh
cf8908fbc8 Add metadata (hash, ramUsage) to be returns
Allows for better dirty checking and integrations
2022-01-21 20:49:12 -08:00
Xi-Lin Yeh
4a3ee95b63 Enhanced API Server interface
- Used restful patterns for handling server calls (GET/PUT/DELETE)

- Utilized Server interface for saves rather than reimplementing code

- Exposed operations for getting codebase of scripts on the home server and deleting files.

- Added a common response structure
2022-01-20 00:03:07 -08:00
Martin Fournier
844d518684 Add achievements to base game
- Add a script to generate achievement data from Steamworks API
- Add achievements page with a link in sidebar
- Calculate achievements (1/min) with an engine counter
- Store achievements with a timestamp on unlocked in the PlayerObject
- Add a script to generate monochrome icons from Steam icons
- Add toast when unlocking an achievement
2022-01-08 05:45:32 -05:00
Olivier Gagnon
1ac0d761e6 fix incorrect API files 2022-01-06 11:49:21 -05:00
hydroflame
61a50da586
Merge pull request #2378 from SagePtr/patch-2
Fix "BN3+" achievement triggered for BN2
2022-01-06 11:24:44 -05:00
TheMas3212
414cf35321
Add check for DevMenu exploit to trigger steam achivement 2022-01-06 21:26:30 +11:00
Sage Pointer
ba99612d5d
Fix "BN3+" achievement triggered for BN2 2022-01-06 01:46:53 +02:00
Olivier Gagnon
c59a267437 change sf4 2022-01-04 19:09:34 -05:00
Olivier Gagnon
dfae337d26 Merge branch 'dev' of github.com:danielyxie/bitburner into dev 2022-01-03 15:49:05 -05:00
Olivier Gagnon
7655b91e2a rm some bullshit 2022-01-03 15:45:56 -05:00
Martin Fournier
6c3618cb65 Check userAgent before running electron init 2022-01-03 10:33:58 -05:00
Martin Fournier
6d8df6744e Add toasts & terminal funcs to electron app
Attach functions to the window object so that the wrapper can executeJs
to display messages to the player
2022-01-03 10:32:01 -05:00
Olivier Gagnon
87d6c18254 ext push now save folder correctly 2021-12-23 15:34:01 -05:00
Olivier Gagnon
fcb876695d remove leading slash when saving via http 2021-12-23 12:23:50 -05:00
Olivier Gagnon
88151efa61 ext use base64 2021-12-22 19:56:43 -05:00
Olivier Gagnon
ea0be338e1 dont make new copies when injecting via localhost 2021-12-21 15:40:23 -05:00
Olivier Gagnon
b2b682fa04 fix editor not loading files 2021-12-21 13:44:18 -05:00
Olivier Gagnon
b57ac45698 doc 2021-12-20 15:59:46 -05:00
Olivier Gagnon
41a7109baa fix 2021-12-20 15:48:26 -05:00
Martin Fournier
3b99da8474 Lint current problems & fix ignore paths 2021-12-19 13:17:44 -05:00
Olivier Gagnon
02605090df v1.2.0 2021-12-18 16:28:09 -05:00
Olivier Gagnon
1b42b51e5f few bugfix 2021-12-13 18:44:52 -05:00
Olivier Gagnon
9b009b980c achievements stuff 2021-12-01 14:26:49 -05:00
Olivier Gagnon
7ee5d8d71a more achievements 2021-11-28 23:51:01 -05:00
Olivier Gagnon
e262c9bb38 achievements 2021-11-27 15:07:25 -05:00