Commit Graph

192 Commits

Author SHA1 Message Date
catloversg 222e42000c CLI: Add --temporary flag to run command (#2354) 2025-10-18 12:04:39 -07:00
Adam Weeden bd3c6c10ef EDITOR: Add the ability to Beautify on Save (optionally) (#2287) 2025-08-26 16:35:41 -07:00
catloversg 6a23c85e12 UI: Search and read NS API docs in editor tab and documentation tab (#2163) 2025-05-31 23:53:20 -07:00
catloversg a9900072da MISC: Remove support for running NS1 scripts (#2083) 2025-04-11 13:41:48 -07:00
catloversg 0900f46edb UI: Do not close scripts in editor when their servers are deleted (#2049) 2025-03-29 20:26:45 -07:00
catloversg 23ad55554e UI: Add "Run" action to run current script in editor (#1987) 2025-03-04 02:43:31 -08:00
catloversg 8ed83f3d37 MISC: Add key binding feature (#1830) 2025-02-27 22:59:12 -08:00
catloversg 63d7061fd8 UI: Warn player if they are editing and saving files on non-home servers (#1968) 2025-02-16 18:26:45 -08:00
catloversg 23bc4e8804 MISC: Show user-friendly error message when there is syntax error in scripts (#1963) 2025-02-16 01:27:26 -08:00
catloversg c99fa448fa BUGFIX: Cursor position in editor is moved undesirably in edge cases (#1952) 2025-02-07 15:19:54 -08:00
catloversg 6dd9230cc5 BUGFIX: Dynamically load imported scripts for editor (#1893) 2025-01-07 22:24:41 -08:00
catloversg f6502dd490 CODEBASE: Fix lint errors 1 (#1732) 2024-11-03 22:35:14 -08:00
catloversg 6d8084f40e MISC: Improve tutorial, documentation and discoverability of NS API documentation (#1697) 2024-10-20 20:37:42 -07:00
lucebac 7513fec507 EDITOR: import resolution in code editor (#1661)
* FIX: import resolution in code editor
Since I did not find any callback where we could just load imports
on-demand, I opted for just loading all scripts from the server where
a given script was opened from command line. This does not include
scripts which are already open, only files which are not yet opened
will be loaded.
2024-09-26 11:36:42 -07:00
catloversg cea0afe1f4 EDITOR: Follow-up of #1470 (Editor outline) (#1498) 2024-07-17 15:18:10 -07:00
catloversg 864613c616 MISC: Support JSX, TS, TSX script files (#1216) 2024-07-14 14:47:10 -07:00
G4mingJon4s bec6e82d7f EDITOR: changed editor tabs to have their own editor mode (#1372) 2024-06-12 19:19:40 -07:00
G4mingJon4s 463d4cdb1d EDITOR: useVimEditor uses Material UI (#1332) 2024-06-05 18:30:03 -07:00
Caldwell f40d4f8e92 BUGFIX: fix relative imports (#1305)
Relative paths work in imports, at last.
2024-06-02 17:38:01 -07:00
catloversg 8703da4ab6 BUGFIX: Save position of cursor when switching tabs and unmounting editor (#1297) 2024-05-23 01:51:33 -07:00
G4mingJon4s 08eb60d21b EDITOR: Improved infinite loop checking (#1276) 2024-05-23 00:44:15 -07:00
gmcew 1d8a1d5089 UI: Trigger RAM checking on tab closure (#1279)
Fixes UI bug described at https://discord.com/channels/415207508303544321/415213413745164318/1240361787564490854
2024-05-17 04:46:04 -07:00
Caldwell 6f8a59593a EDITOR: fix disposing models (#1026) 2024-01-09 18:45:31 -05:00
Shy 68a8427838 EDITOR: Add file URI's to monaco to improve intellisense (#1017) 2024-01-07 07:13:52 -05:00
Snarling 87925f1900 EDITOR: Reorganization and minor efficiency improvements (#886) 2023-10-23 07:02:33 -04:00
Aleksei Bezrodnov 1d5a735941 MISC: enforce eslint react checks (#640) 2023-06-26 22:29:44 -04:00
Aleksei Bezrodnov 9e75621cd2 UI: add cursor options to the script editor (#615) 2023-06-18 21:17:15 -04:00
Aleksei Bezrodnov 12b5c00d14 fix RAM calculation on a different server (#612) 2023-06-13 17:19:42 -04:00
Snarling 6732549196 ENUMS: Initial Enum Helper rework + Reorganization (#596) 2023-06-12 00:34:20 -04:00
Aleksei Bezrodnov 99954ebd1e REFACTORING: ScriptEditor (#560) 2023-06-03 13:55:25 -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 016a9a873f.
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