Various improvements

This commit is contained in:
Anuken
2019-12-07 00:34:27 -05:00
parent f3a5798a7f
commit 96aa3ccee0
7 changed files with 72 additions and 32 deletions

View File

@@ -53,7 +53,9 @@ public interface Platform{
}
default Context getScriptContext(){
return Context.enter();
Context c = Context.enter();
c.setOptimizationLevel(9);
return c;
}
/** Add a text input dialog that should show up after the field is tapped. */

File diff suppressed because one or more lines are too long

View File

@@ -26,7 +26,7 @@ public class Scripts implements Disposable{
}
public void run(LoadedMod mod, FileHandle file){
run(wrapper.replace("$SCRIPT_NAME$", mod.name + "_" + file.nameWithoutExtension().replace("-", "_").replace(" ", "_")).replace("$CODE$", file.readString()), file.name());
run(wrapper.replace("$SCRIPT_NAME$", mod.name + "_" + file.nameWithoutExtension().replace("-", "_").replace(" ", "_")).replace("$CODE$", file.readString()).replace("$MOD_NAME$", mod.name), file.name());
}
private void run(String script, String file){