Commit Graph

15 Commits

Author SHA1 Message Date
catloversg 8729dc3d1b MISC: Update messages related to text files (#2266) 2025-07-24 22:39:55 -07:00
Chris Farfan de los Godos 8f69a6c0ee COMMAND: Improving error message for mv when a script is Running
* Adjusted error message to include information about making sure scripts are not running when trying to use mv on them.

* nom run format

* Added behaviour info to NetscriptDefinitions.d.ts

* `npm run doc`

* un-nested/inversed the check

* `npm run format`
2025-07-23 16:27:01 -07: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 6290ce562a Prevent errors thrown from terminal (#443)
At least from getFilepath function
2023-03-23 12:01:58 -04:00
Olivier Gagnon f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
Snarling 83d357e758 commit1 2022-09-27 15:35:40 -04:00
Undeemiss f8f3c099e0 Formatted/linted (There are some errors, but they aren't mine afaik) 2022-05-28 21:35:20 -05:00
Olivier Gagnon 76ccb0ba36 lint 2022-05-25 11:43:43 -04:00
Zoë Hoekstra 43807fb757 Add code for handling when dest. script is running 2022-04-15 19:44:08 +02:00
theit8514 2d949c076b Fix mv overwriting script files 2021-12-23 21:31:59 -05:00
theit8514 8ef227595a Add support for relative paths in mv
Fixes mv command deleting file on overwrite
2021-12-15 17:46:36 -05:00
Olivier Gagnon 13b08d7cc8 terminal parses boolean exactly. 2021-12-03 14:44:32 -05:00
Olivier Gagnon 2e05f14c0d convert to ts 2021-09-24 16:34:21 -04:00
Olivier Gagnon 89ea9aaff5 oops 2021-09-17 02:58:02 -04:00
Olivier Gagnon 2922e42055 most terminal converted to ts 2021-09-16 18:10:28 -04:00