Adding /script download (#826)
This reverts commit e98adb77a52d1e274ec320e0cafab34b24c1c738. * First attempt at creating download system... * Last try, I had uncommitted changes which I forgot to add. If it fails now i swear imma delete my fork of fabric carpet. * OK, this is the last chance. I have checked and double checked, this should not fail. Todo make them more detailed, Im not the best person to do that tbh... * Towards a suggestion builder (Also committing stuff in ScriptDownloader incase it crashes) * Finished first theoretically functional draft of suggestion builder * improving suggestion building with actual github api * Collapsing identical error messages * Got suggestions to work! Now gotta get the actual file to save to disk properly * replacing whitespace with url whitespace to make it read form 'creativ building tools' etc * Successfully downloaded script into folder location! * only clients can access global scripts folder, so don't want to cause error message * Compacting code and updating docs * Fixed getting folders from file names
This commit is contained in:
1 parent
f56b22be6a
commit
5f16ffd933
3 files changed
+268
-9
No files matched your search
@@ -167,3 +167,11 @@ This would slow down the computation of fib(40) from a minute to two, but allows
|
||||
and be responsive to commands, using about half of each tick to advance the computation. Obviously depending on the
|
||||
problem, and available hardware, certain things can take more or less time to execute, so portioning of work with
|
||||
calling `gametick` should be balanced in each case separately
|
||||
|
||||
# `/script download` command
|
||||
|
||||
`/script download <global or local?> <path>` command allows to download and save scripts directly from [scarpet app store](https://www.github.com/gnembon/scarpet).
|
||||
You can choose whether to save the script in the global config scripts folder or the local per-world script folder,
|
||||
(on servers it always saves in the scripts folder) and it will be saved there, e.g `/script download local survival/angel_block.sc`
|
||||
would save the `angel_block.sc` file [here](https://github.com/gnembon/scarpet/blob/master/programs/survival/angel_block.sc)
|
||||
to a folder called `appstore/survival` in the world's scripts folder.
|
||||
Reference in new issue
Block a user