Move scripting-related logger messages to debug

This commit is contained in:
KingRainbow44 2023-04-11 02:05:12 -04:00
parent 54b7d1251e
commit 990b36cbce
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -786,7 +786,7 @@ public final class Scene {
this.getScriptManager().loadBlockFromScript(block); this.getScriptManager().loadBlockFromScript(block);
scriptManager.getLoadedGroupSetPerBlock().put(block.id, new HashSet<>()); scriptManager.getLoadedGroupSetPerBlock().put(block.id, new HashSet<>());
Grasscutter.getLogger().info("Scene {} Block {} loaded.", this.getId(), block.id); Grasscutter.getLogger().debug("Scene {} Block {} loaded.", this.getId(), block.id);
} }
public int loadDynamicGroup(int group_id) { public int loadDynamicGroup(int group_id) {
@ -826,7 +826,7 @@ public final class Scene {
.filter(replacement -> dynamicGroups.contains(replacement.id)) .filter(replacement -> dynamicGroups.contains(replacement.id))
.forEach( .forEach(
replacement -> { replacement -> {
Grasscutter.getLogger().info("Graph ordering replacement {}", replacement); Grasscutter.getLogger().debug("Graph ordering replacement {}", replacement);
replacement.replace_groups.forEach( replacement.replace_groups.forEach(
group -> { group -> {
nodes.add(new KahnsSort.Node(replacement.id, group)); nodes.add(new KahnsSort.Node(replacement.id, group));
@ -863,7 +863,7 @@ public final class Scene {
this.unloadGroup( this.unloadGroup(
scriptManager.getBlocks().get(sceneGroup.block_id), replace_group); scriptManager.getBlocks().get(sceneGroup.block_id), replace_group);
it.remove(); it.remove();
Grasscutter.getLogger().info("Graph ordering: unloaded {}", replace_group); Grasscutter.getLogger().debug("Graph ordering: unloaded {}", replace_group);
} }
} }
} }
@ -939,7 +939,7 @@ public final class Scene {
groups.forEach( groups.forEach(
g -> scriptManager.callEvent(new ScriptArgs(g.id, EventType.EVENT_GROUP_LOAD, g.id))); g -> scriptManager.callEvent(new ScriptArgs(g.id, EventType.EVENT_GROUP_LOAD, g.id)));
Grasscutter.getLogger().info("Scene {} loaded {} group(s)", this.getId(), groups.size()); Grasscutter.getLogger().debug("Scene {} loaded {} group(s)", this.getId(), groups.size());
} }
public void unloadGroup(SceneBlock block, int group_id) { public void unloadGroup(SceneBlock block, int group_id) {
@ -967,7 +967,7 @@ public final class Scene {
if (this.scriptManager.getLoadedGroupSetPerBlock().get(block.id).isEmpty()) { if (this.scriptManager.getLoadedGroupSetPerBlock().get(block.id).isEmpty()) {
this.scriptManager.getLoadedGroupSetPerBlock().remove(block.id); this.scriptManager.getLoadedGroupSetPerBlock().remove(block.id);
Grasscutter.getLogger().info("Scene {} Block {} is unloaded.", this.getId(), block.id); Grasscutter.getLogger().debug("Scene {} Block {} is unloaded.", this.getId(), block.id);
} }
this.broadcastPacket(new PacketGroupUnloadNotify(List.of(group_id))); this.broadcastPacket(new PacketGroupUnloadNotify(List.of(group_id)));