Browse Source

Some entries have no icon

feature-config-parsing2
MagicBot 5 months ago
parent
commit
f24877e9ce
  1. 11
      src/engine/ConfigParsing/EffectsParser.java

11
src/engine/ConfigParsing/EffectsParser.java

@ -10,7 +10,6 @@ package engine.ConfigParsing; @@ -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 { @@ -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);

Loading…
Cancel
Save