Commit Graph

51 Commits

Author SHA1 Message Date
Snarling 0ded11af53 TERMINAL: Fix inconsistent / janky scrolling behavior (#1063) 2024-01-31 19:32:42 -05:00
François Gannaz 87e2f5c23b TERMINAL: Fix autocompletion when running scripts with the "./" command (#900) 2023-10-30 12:32:11 -04:00
Caldwell 269a74d5c0 CODEBASE: update dependencies (#852) 2023-10-07 18:52:48 -04:00
Noah Harris 7b2e8e5312 UI: clear search suggestions on clearall modification (#787) 2023-09-12 02:00:20 -04:00
Michael Ficocelli 7b05bed0d4 FIX: update white-space style to function on electron app (#745) 2023-08-23 17:11:27 -04:00
Michael Ficocelli 86b0bd5ac7 TERMINAL: Add option for partial history search (#736) 2023-08-21 06:50:17 -04:00
rqzcho 2537ded3c2 TERMINAL: Allow new lines in terminal when empty (#605) 2023-06-13 14:04:21 -04:00
Snarling 40b89baca1 MISC: Various small fixes (#574)
* ns.ls filter can include leading slash in filename
* scp from terminal accepts multiple filenames
* terminal displays root / instead of ~ as base
* cd with no args returns to root
2023-06-06 08:46:07 -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
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 cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -04:00
Snarling 21a2d49de7 Finish removing player passing 2022-09-27 15:35:41 -04:00
Snarling 91a69d7d8f format & lint 2022-09-27 15:35:40 -04:00
Snarling 83d357e758 commit1 2022-09-27 15:35:40 -04:00
James Villegas 6d8a3e192b Update ctrl+c hotkey to print current text to terminal without executing it to mimic real terminal behavior 2022-07-07 08:11:34 +08:00
James Villegas 6c026e6d5c Ignore ctrl+c bash hotkey if user has selected text to allow copying 2022-07-03 12:18:47 +08:00
James Villegas 9efb209ea3 Implement ctrl+c bash hotkey to clear current input 2022-07-03 11:49:45 +08:00
Zoë Hoekstra 016a9a873f Add keycode table and switch to event.code in select places 2022-05-03 15:59:46 +02:00
Snarling 5898e27529 Change alignment of autocomplete popper 2022-04-20 09:19:33 -04:00
Snarling f466a880eb Fix style + Format/Lint 2022-04-18 07:55:59 -04:00
Snarling 02ccda197c WIP 2022-04-18 07:41:09 -04:00
phyzical c681828ec1 few more event key. constant refactors 2022-03-24 23:09:24 +08:00
Olivier Gagnon 05fe14a5ed Fix some key not working 2022-03-20 23:11:26 -04:00
Master-Guy 9dd933ecee Changed .keyCode to .key for files in "src" 2022-03-18 10:43:56 +01:00
BB 2f4d879c16 Trailing whitespace and files not ending with \n are now illegal 2022-03-08 22:51:02 +01:00
Martin Fournier e7aa977eb0 Persist terminal command history in game save
Copy the terminal commands into the player object so that they are saved
between game reloads.

Adds a 'history' command to display history, and a 'history -c' command
to clear it from both the current terminal & the player's save.
2022-01-23 17:09:54 -05:00
Frank-py 73adc71965 Updated Terminal.tsx to add keypress event.
Added keypress event to delete the word after input by pressing "alt" + "d".
2021-12-25 23:11:21 +01:00
hydroflame c723c7ecd2 Merge pull request #1957 from billyvg/feat/add-ctrl-u-clear-line
feat: Add `ctrl+u/k/w` hotkeys
2021-12-18 14:35:12 -05:00
Olivier Gagnon 81e291ef6a change color of terminal input 2021-12-16 20:20:07 -05:00
Billy Vong 2e9a42d74c add comment 2021-12-16 17:03:49 -05:00
Billy Vong 2804b6ae56 remove console 2021-12-16 17:03:15 -05:00
Billy Vong d4bf6100a3 feat: Add ctrl+u/k/w hotkeys
Adds the `ctrl+u/k/w` hotkeys to clear line before and after, as well as deleting word before cursor. I implemented deleting word after cursor, but I have not repod the functionality in bash, so I did not add the hotkey.
2021-12-16 16:59:24 -05:00
Olivier Gagnon fe3aa5a357 rm references to fconf 2021-11-26 18:05:14 -05:00
Olivier Gagnon d6ea9c55b1 fixed folder adding space in autocom 2021-10-15 18:33:27 -04:00
Olivier Gagnon 4603216aa0 autocomplete 2021-10-14 22:36:28 -04:00
Olivier Gagnon 33ea31be87 convert autocomplete to tooltip 2021-10-04 17:52:20 -04:00
Olivier Gagnon c5713fa6d8 learned and implemented default props 2021-09-29 01:49:22 -04:00
Olivier Gagnon 06f716c0fa moved a bunch of files 2021-09-25 14:42:57 -04:00
Olivier Gagnon f9a4eadb71 removed some of fconf 2021-09-22 01:36:17 -04:00
Olivier Gagnon 55901f0574 Let player copy terminal 2021-09-22 00:57:37 -04:00
Olivier Gagnon cd0aa192f5 fix terminal not cancelling. 2021-09-19 03:29:36 -04:00
Olivier Gagnon 23e8bc2e71 merge master 2021-09-18 02:38:15 -04:00
Olivier Gagnon aef4aac61a fix terminal not saving state 2021-09-18 02:34:59 -04:00
Olivier Gagnon 45f2f85a30 big work 2021-09-17 19:43:08 -04:00
Olivier Gagnon 1344a17482 Merge branch 'dev' into big-container 2021-09-17 03:09:42 -04:00
Olivier Gagnon aa0008862c fix term issues 2021-09-17 03:08:15 -04:00
Olivier Gagnon 89ea9aaff5 oops 2021-09-17 02:58:02 -04:00
Olivier Gagnon 195dff7c44 fix not being able to ctrlc the terminal 2021-09-16 21:03:14 -04:00
Olivier Gagnon 407ed70ae3 mui5 2021-09-16 19:23:03 -04:00