quick hack for reloading script from disk when script is activated
This commit is contained in:
parent
d84cf2acb5
commit
370ad52620
@ -272,6 +272,16 @@ public class ScriptRunner extends VisPlugin {
|
||||
}
|
||||
|
||||
public void setScriptActive(boolean active) {
|
||||
/* Reload script from file */
|
||||
if (scriptFile != null) {
|
||||
String script = StringUtils.loadFromFile(scriptFile);
|
||||
if (script == null) {
|
||||
logger.fatal("Failed to load script from: " + scriptFile.getAbsolutePath());
|
||||
} else {
|
||||
updateScript(script);
|
||||
}
|
||||
}
|
||||
|
||||
if (active) {
|
||||
/* Free any resources */
|
||||
setScriptActive(false);
|
||||
|
Loading…
Reference in New Issue
Block a user