Commit Graph

240 Commits

Author SHA1 Message Date
omuretsu
7240bbe8b7 Fix hotfix 2023-05-30 20:47:01 -04:00
omuretsu
8bc67f542a Satisfy lint 2023-05-30 20:06:13 -04:00
omuretsu
b65bd62345 More hotfixes...
* Script editor theme could be corrupted leading to a recovery screen, this should fix that.
* Because script filepath changes were moved before the detection of .ns files, a check was added for .ns files in BaseServer so they get the better name.
2023-05-30 20:00:43 -04:00
omuretsu
27a6b619eb Lint fix
Also reduce unnecessary imports
2023-05-16 11:41:55 -04:00
omuretsu
00522fb8f3 Fix infinite loop detection
Also debounce it with the ram calc to improve performance
2023-05-16 11:27:11 -04:00
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00
omuretsu
003be33886 Lint fix 2023-05-03 07:31:29 -04:00
omuretsu
3c996a47ea Fully remove formatCode function (trim on script save) 2023-05-03 07:21:23 -04:00
Snarling
62adaf3006
Various bugfix/cleanup (#489)
* parseCommands no longer removes excess whitespace (it was unneeded and also had a bug in it relating to commands that ended in a quote mark)
* more documentation and some variable renaming
* Fix script editor focus bug on navigating to the editor from sidebar
* Fix initialization for lastNodeReset and lastAugReset
2023-04-24 15:48:49 -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
Snarling
04d49e3a6d
SCRIPTS: Script modules are reused when they are imported (#461)
Also corrects some compile race conditions.
2023-04-07 00:33:51 -04:00
Snarling
4166c09bd4
More script editor options (#386)
* Options are responsive again (fix from previous changes)
* Better height control on the monaco container using flexbox.
* Added options for tab size, auto-detect indentation per-file, font family, and font ligatures.
2023-02-24 07:37:29 -05:00
Snarling
71051cde9c
Upgrade monaco and bump game version to 2.3.0dev (#369) 2023-02-23 21:43:29 -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
Mughur
7e183c4e4a Updated ReadTheDocs links 2023-01-06 15:24:10 +02:00
David Walker
8d793ea271
Internal refactoring of Router (#241) 2022-12-04 03:14:06 -05:00
David Walker
49f732d1ee
Revert "Revert "Add keycode table and switch to event.code in select places" (#224)" (#242) 2022-12-03 22:56:42 -05:00
David Walker
70fadde222
Revert "Add keycode table and switch to event.code in select places" (#224)
Using code instead of key is strongly warned against at MDN and causes issues with nonstandard layouts:
https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event#keyboardevent.code

This also fixes ScriptEditorRoot.tsx, where some code snuck in that
wasn't using *any* of the constants.

This reverts commit 016a9a873fba71388bdbaa1423134fd1f2335a15.
2022-11-26 08:51:09 -05:00
Olivier Gagnon
af1a1ac58d Rename lots of reference from old to new repo 2022-10-20 03:56:59 +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
Olivier Gagnon
f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
Duck McSouls
d8ef63cfe9 NETSCRIPT: format fixes
The command `npm run format` reports some formatting issues under `src/ScriptEditor`.  Fix the reported formatting issues.
2022-09-30 14:47:33 +10:00
hydroflame
7ce1adddce
Merge pull request #4151 from LJNeon/script-editor-fix
UI: Remove extra / from open script tab when files are in a folder
2022-09-27 17:50:32 -03:00
Snarling
91a69d7d8f format & lint 2022-09-27 15:35:40 -04:00
Snarling
83d357e758 commit1 2022-09-27 15:35:40 -04:00
Snarling
572c68738f Unify error handling 2022-09-27 15:34:47 -04:00
LJNeon
a464563e1c
chore(ScriptEditor): Remove extra / from files in a folder 2022-09-23 19:23:54 -07:00
Snarling
445e365959 debounce updateRAM 2022-08-23 16:38:30 -04:00
hydroflame
849046df3a
Merge pull request #3985 from Snarling/synchronize
NETSCRIPT: ns.scp and ns.write are now synchronous + fix exec race condition
2022-08-23 12:25:24 -03:00
Snarling
f6a8d5d337 synchronize scp and write 2022-08-17 18:55:12 -04:00
Snarling
e6f9f9ed75 const openScripts (format) 2022-08-16 15:19:33 -04:00
Snarling
57fa1b743a const openScripts 2022-08-16 15:17:44 -04:00
Snarling
8cbb8aac2e Remove unnecessary assignments & spreads 2022-08-16 12:24:50 -04:00
Snarling
fbee07ffd7 Fix dirty indicator 2022-08-16 10:41:40 -04:00
Snarling
fd3ff76976 Improve ScriptEditor responsiveness 2022-08-16 02:32:25 -04:00
Olivier Gagnon
2d522ea1e6 allbuild commit e9254edf 2022-07-21 15:09:55 -04:00
Olivier Gagnon
d01fd55bde lint fmt 2022-07-21 01:58:47 -04:00
Olivier Gagnon
207e55c7b8 add colon x to vim mode 2022-07-21 01:25:43 -04:00
Olivier Gagnon
96654d4c0a rm some anys 2022-07-19 21:38:50 -04:00
Olivier Gagnon
dfadfe6eb2 working with monaco anys 2022-07-19 20:10:30 -04:00
Olivier Gagnon
2442402af5 fix more anys 2022-07-19 16:46:03 -04:00
Olivier Gagnon
4bee746576 rm any 2022-07-15 01:51:30 -04:00
Olivier Gagnon
76ccb0ba36 lint 2022-05-25 11:43:43 -04:00
hydroflame
9818a397bc
Merge pull request #2989 from phyzical/bugfix/2958
UI: FIX #2228,#2958 Fix tab highlights and highlight files not on home.
2022-05-04 12:10:43 -04:00
Olivier Gagnon
f10de908d4 Make tutorial explain ns1 vs ns2 better 2022-04-29 17:54:59 -04:00
nickofolas
e69e45c283 Better imports 2022-04-13 14:52:30 -05:00
nickofolas
58c4861c56 lint 2022-04-13 14:45:26 -05:00
nickofolas
567fcf8fb6 prettier 2022-04-13 14:42:07 -05:00