mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-06 08:57:45 +07:00
Updated Rhino
This commit is contained in:
parent
91c0235ff5
commit
1895c7b8e0
@ -39,7 +39,7 @@ allprojects{
|
||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||
appName = 'Mindustry'
|
||||
steamworksVersion = '0b86023401880bb5e586bc404bedbaae9b1f1c94'
|
||||
rhinoVersion = '099aed6c82f8094b3ba39a273b8d2ba7bdcc6443'
|
||||
rhinoVersion = '55bf0dac1cfa7770672fd26112512c733ca9d5dc'
|
||||
|
||||
loadVersionProps = {
|
||||
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||
|
@ -60,7 +60,7 @@ public class Scripts implements Disposable{
|
||||
|
||||
public String runConsole(String text){
|
||||
try{
|
||||
Object o = context.evaluateString(scope, text, "console.js", 1, null);
|
||||
Object o = context.evaluateString(scope, text, "console.js", 1);
|
||||
if(o instanceof NativeJavaObject n) o = n.unwrap();
|
||||
if(o instanceof Undefined) o = "undefined";
|
||||
return String.valueOf(o);
|
||||
@ -172,11 +172,11 @@ public class Scripts implements Disposable{
|
||||
try{
|
||||
if(currentMod != null){
|
||||
//inject script info into file
|
||||
context.evaluateString(scope, "modName = \"" + currentMod.name + "\"\nscriptName = \"" + file + "\"", "initscript.js", 1, null);
|
||||
context.evaluateString(scope, "modName = \"" + currentMod.name + "\"\nscriptName = \"" + file + "\"", "initscript.js", 1);
|
||||
}
|
||||
context.evaluateString(scope,
|
||||
wrap ? "(function(){'use strict';\n" + script + "\n})();" : script,
|
||||
file, 0, null);
|
||||
file, 0);
|
||||
return true;
|
||||
}catch(Throwable t){
|
||||
if(currentMod != null){
|
||||
@ -224,7 +224,7 @@ public class Scripts implements Disposable{
|
||||
if(!module.exists() || module.isDirectory()) return null;
|
||||
return new ModuleSource(
|
||||
new InputStreamReader(new ByteArrayInputStream((module.readString()).getBytes())),
|
||||
null, new URI(moduleId), root.file().toURI(), validator);
|
||||
new URI(moduleId), root.file().toURI(), validator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user