mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-17 05:02:32 +08:00
Compile scripts to replace require with script content
This commit is contained in:
@@ -3,12 +3,13 @@ package emu.grasscutter.scripts.data;
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.game.world.Position;
|
||||
import emu.grasscutter.scripts.ScriptLoader;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.script.*;
|
||||
import lombok.*;
|
||||
import org.luaj.vm2.*;
|
||||
|
||||
import javax.script.*;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ToString
|
||||
@Setter
|
||||
public final class SceneGroup {
|
||||
@@ -35,7 +36,8 @@ public final class SceneGroup {
|
||||
|
||||
public SceneReplaceable is_replaceable;
|
||||
|
||||
private transient boolean loaded; // Not an actual variable in the scripts either
|
||||
/* These are not script variables. */
|
||||
private transient boolean loaded;
|
||||
private transient CompiledScript script;
|
||||
private transient Bindings bindings;
|
||||
|
||||
@@ -82,7 +84,7 @@ public final class SceneGroup {
|
||||
}
|
||||
// Set flag here so if there is no script, we don't call this function over and over again.
|
||||
this.setLoaded(true);
|
||||
|
||||
// Create the bindings.
|
||||
this.bindings = ScriptLoader.getEngine().createBindings();
|
||||
|
||||
var cs =
|
||||
|
||||
Reference in New Issue
Block a user