mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-04-07 16:32:26 +02:00
Run spotlessApply
also set line endings to native, no more line conflict errors!
This commit is contained in:
@@ -661,8 +661,7 @@ public class SceneScriptManager {
|
||||
|
||||
for (var entityId : region.getEntities()) {
|
||||
var entity = this.getScene().getEntityById(entityId);
|
||||
if (entity == null || !region.getMetaRegion()
|
||||
.contains(entity.getPosition())) {
|
||||
if (entity == null || !region.getMetaRegion().contains(entity.getPosition())) {
|
||||
region.removeEntity(entityId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,7 @@ public class ScriptLoader {
|
||||
private static Map<String, SoftReference<CompiledScript>> scriptsCache =
|
||||
new ConcurrentHashMap<>();
|
||||
/** sceneId - SceneMeta */
|
||||
private static Map<Integer, SoftReference<SceneMeta>> sceneMetaCache =
|
||||
new ConcurrentHashMap<>();
|
||||
private static Map<Integer, SoftReference<SceneMeta>> sceneMetaCache = new ConcurrentHashMap<>();
|
||||
|
||||
public static synchronized void init() throws Exception {
|
||||
if (sm != null) {
|
||||
|
||||
@@ -93,9 +93,8 @@ public final class SceneGroup {
|
||||
|
||||
this.bindings = ScriptLoader.getEngine().createBindings();
|
||||
|
||||
CompiledScript cs =
|
||||
ScriptLoader.getScript(
|
||||
"Scene/" + sceneId + "/scene" + sceneId + "_group" + this.id + ".lua");
|
||||
var cs =
|
||||
ScriptLoader.getScript("Scene/%s/scene%s_group%s.lua".formatted(sceneId, sceneId, this.id));
|
||||
|
||||
if (cs == null) {
|
||||
return this;
|
||||
@@ -171,8 +170,10 @@ public final class SceneGroup {
|
||||
.error(
|
||||
"An error occurred while loading group " + this.id + " in scene " + sceneId + ".", e);
|
||||
} catch (LuaError luaError) {
|
||||
Grasscutter.getLogger().error("An error occurred while loading group %s in scene %s."
|
||||
.formatted(this.id, sceneId), luaError);
|
||||
Grasscutter.getLogger()
|
||||
.error(
|
||||
"An error occurred while loading group %s in scene %s.".formatted(this.id, sceneId),
|
||||
luaError);
|
||||
}
|
||||
|
||||
Grasscutter.getLogger().trace("Successfully loaded group {} in scene {}.", this.id, sceneId);
|
||||
|
||||
Reference in New Issue
Block a user