Suppose you have two files.
<root>/scripts/my_script.ash
<root>/scripts/a_folder/however_many_layers_you_want/scripts.ash
It is currently impossible to point to the former without using an absolute path, as submitting "scripts/my_script.ash" to KoLmafiaCLI.findScriptFile( string ) will always find both.
On top of that, even if the latter didn't exist, even once the former is found, the method will still scan the rest of your files for potential matches. If you have a lot of folders, this can take some time (this is why this thread is also a feature request, in a way. Fixing/implementing this would also act as a way to speed up scripts).
The solution would be a way to indicate to KoLmafiaCLI.findScriptFile( string ) that it only needs to search in the root location.
I think we should use characters not allowed in file names (i.e. \ / : * ? " < > | ) to achieve this.
These characters are not allowed in file names because, AFAIK, they are used in command lines to indicate high priority operations (i.e. a priority higher than "string").
I gave it a go, using the asterisk (*), but feel free to change this is you think of something more suitable.
<root>/scripts/my_script.ash
<root>/scripts/a_folder/however_many_layers_you_want/scripts.ash
It is currently impossible to point to the former without using an absolute path, as submitting "scripts/my_script.ash" to KoLmafiaCLI.findScriptFile( string ) will always find both.
On top of that, even if the latter didn't exist, even once the former is found, the method will still scan the rest of your files for potential matches. If you have a lot of folders, this can take some time (this is why this thread is also a feature request, in a way. Fixing/implementing this would also act as a way to speed up scripts).
The solution would be a way to indicate to KoLmafiaCLI.findScriptFile( string ) that it only needs to search in the root location.
I think we should use characters not allowed in file names (i.e. \ / : * ? " < > | ) to achieve this.
These characters are not allowed in file names because, AFAIK, they are used in command lines to indicate high priority operations (i.e. a priority higher than "string").
I gave it a go, using the asterisk (*), but feel free to change this is you think of something more suitable.