Commit Graph

18 Commits

Author SHA1 Message Date
Snarling
9a0a843ffc
TYPESAFETY: FactionName (#644) 2023-06-25 22:53:35 -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
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
f4668b21ca functions to generate dummy contracts 2022-10-09 02:56:11 -04:00
Snarling
068533cd2f format, lint, more enums, revert fn rename 2022-10-05 14:52:48 -04:00
Duck McSouls
819e102fe1 CCT: no special characters in file names of Coding Contracts
Fixes #4067.  The file name of a Coding Contract follows the format contract-xxx-rewardName.cct.  The part `xxx` means a sequence of random decimal digits.  The part `rewardName` can be an empty string if the player is not part of any faction nor is working for a company.  However, if the player is working for a company or faction whose name has a special character, then the special character would also appear in the generated file name.  We only want alphanumeric characters throughout the whole file name.
2022-09-27 00:01:21 +10:00
Daniel Barbera
37e32ee0f8 #3711: Generate contracts only on network 2022-05-24 16:26:40 +02:00
Olivier Gagnon
eb6f016ac1 fix corp softcap 2021-11-05 21:01:23 -04:00
Olivier Gagnon
89a6bf175d nuke half the dependencies because they were unused. 2021-10-14 19:31:17 -04:00
Olivier Gagnon
7d0536a4d2 finish convert to hostname 2021-10-07 17:55:49 -04:00
Olivier Gagnon
a7dfb1a537 more convertion from ip to hostname 2021-10-07 16:56:01 -04:00
Olivier Gagnon
be29481689 unexport AllServers 2021-10-07 16:04:04 -04:00
Olivier Gagnon
06f716c0fa moved a bunch of files 2021-09-25 14:42:57 -04:00
Olivier Gagnon
2a13db39c7 fix sleeve memory bug 2021-09-08 23:47:34 -04:00
Olivier Gagnon
a18bdd6afc prettify, sorry for the big ass commit 2021-09-04 19:09:30 -04:00
Olivier Gagnon
d745150c45 all the lints 2021-05-01 03:17:31 -04:00
Olivier Gagnon
3fad505096 run auto fix lint 2021-04-29 23:52:56 -04:00
Olivier Gagnon
62c571ef3a Convert CodingContractGenerator to typescript 2021-03-14 01:31:23 -05:00