Carpet

Carpet

2M Downloads

[Scarpet][Feature Request] Allow Apps to Have Their Own Folders.

Parietic opened this issue · 0 comments

commented

The Problem

As I'm been getting more ambitious with my scarpet apps, I've started needing to use multiple scripts for my apps, so I can keep things organised for my own sanity.
How ever in doing this, the scripts folder then becomes a disorganised mess. Especially if you have other apps in that script directory. (Even more so when apps start needed to save data, or use assets.)

For example, you have a large app that needs 3 scripts, an nbt file for storing app configuration and some asset files json/nbt/text etc.
In this case your are looking at 5+ files just for one overly ambitious app.

My Proposed Solution

Allow for apps to be contained within their own folders within the script directory.
And better yet, have their own file structure.

For example, you have the familiar script folder, with in it you can have standalone scripts like you can now, but you can also create folders containing a single apps multiple scripts and resources.
Something like this:

├───scripts
    │   standalone_app.data.nbt
    │   standalone_app.sc
    │   
    └───large_app
            large_app.data.nbt
            large_app.sc
            large_app_data_functions.sc
            large_app_resource.json
            large_app_util_functions.sc
            some_json_lib.sc
            some_math_lib.sc

Or better yet:

├───scripts
    │   standalone_app.data.nbt
    │   standalone_app.sc
    │   
    └───large_app
        │   large_app.sc
        │   large_app_data_functions.sc
        │   large_app_util_functions.sc
        │   
        ├───assets
        │       large_app.data.nbt
        │       large_app_resource.json
        │       
        └───libs
                some_json_lib.sc
                some_math_lib.sc