From f24877e9ce2dfdc33fec972ed2d00af98dbccdd5 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 8 Aug 2024 13:14:07 -0400 Subject: [PATCH] Some entries have no icon --- src/engine/ConfigParsing/EffectsParser.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index 1dda51e3..a488eee1 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -10,7 +10,6 @@ package engine.ConfigParsing; import engine.ConfigParsing.EffectEntry.EffectEntry; import engine.gameManager.ConfigManager; -import org.pmw.tinylog.Logger; import java.io.IOException; import java.nio.file.Files; @@ -74,12 +73,14 @@ public class EffectsParser { effectEntry.id = effectDescription.get(0); effectEntry.name = effectDescription.get(1); - try { + // Some effect mods have no icon + // (SEEINVIS-SHADE "See Invis") + + if (effectDescription.size() == 3) effectEntry.icon = Integer.parseInt(effectDescription.get(2)); - } catch (Exception e) { + else effectEntry.icon = 0; - Logger.error(effectData); - } + // Parse source entries matcher = SOURCE_REGEX.matcher(effectData);