script register ignorepath
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2c807ce4f5
commit
7ee1f99dd1
@ -59,6 +59,13 @@ public class ScriptEngine {
|
|||||||
"Scripts/compiler/host_access.js",
|
"Scripts/compiler/host_access.js",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of files that are ignored when registering new files
|
||||||
|
*/
|
||||||
|
static final String[] registerIgnores = new String[]{
|
||||||
|
"/Scripts/compiler/host_access.ts",
|
||||||
|
};
|
||||||
|
|
||||||
//The classes that will be provided to the scripting engine
|
//The classes that will be provided to the scripting engine
|
||||||
//https://stackoverflow.com/a/65942034
|
//https://stackoverflow.com/a/65942034
|
||||||
static final Object[][] staticClasses = new Object[][]{
|
static final Object[][] staticClasses = new Object[][]{
|
||||||
@ -227,8 +234,18 @@ public class ScriptEngine {
|
|||||||
if(dependentFilesCount > 0){
|
if(dependentFilesCount > 0){
|
||||||
for(int i = 0; i < dependentFilesCount; i++){
|
for(int i = 0; i < dependentFilesCount; i++){
|
||||||
String dependentFilePath = dependentFilesValue.getArrayElement(i).asString();
|
String dependentFilePath = dependentFilesValue.getArrayElement(i).asString();
|
||||||
|
boolean shouldRegister = true;
|
||||||
|
for(String ignorePath : registerIgnores){
|
||||||
|
if(ignorePath.equals(dependentFilePath)){
|
||||||
|
shouldRegister = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(shouldRegister){
|
||||||
LoggerInterface.loggerScripts.INFO("[HOST - Script Engine] Should register file " + dependentFilePath);
|
LoggerInterface.loggerScripts.INFO("[HOST - Script Engine] Should register file " + dependentFilePath);
|
||||||
registerFile(dependentFilePath);
|
registerFile(dependentFilePath);
|
||||||
|
} else {
|
||||||
|
LoggerInterface.loggerScripts.DEBUG("[HOST - Script Engine] Skipping ignorepath file " + dependentFilePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user