Initial implementation of Anuken/Mindustry-Suggestions/issues/327

This commit is contained in:
Anuken
2020-07-28 14:28:58 -04:00
parent 1100803af4
commit c6826a6c7e
11 changed files with 215 additions and 144 deletions

View File

@@ -81,11 +81,11 @@ public class Scripts implements Disposable{
}
public String readString(String path){
return Vars.tree.get(path).readString();
return Vars.tree.get(path, true).readString();
}
public byte[] readBytes(String path){
return Vars.tree.get(path).readBytes();
return Vars.tree.get(path, true).readBytes();
}
public void run(LoadedMod mod, Fi file){
@@ -126,7 +126,7 @@ public class Scripts implements Disposable{
}
@Override
public ModuleSource loadSource(String moduleId, Scriptable paths, Object validator) throws IOException, URISyntaxException{
public ModuleSource loadSource(String moduleId, Scriptable paths, Object validator) throws URISyntaxException{
if(currentMod == null) return null;
return loadSource(moduleId, currentMod.root.child("scripts"), validator);
}