Browse Source

parsing multi worded names

feature-config-parsing
FatBoy-DOTC 4 months ago
parent
commit
47cb824b3f
  1. 21
      src/engine/ConfigParsing/EffectsParser.java

21
src/engine/ConfigParsing/EffectsParser.java

@ -88,10 +88,23 @@ public class EffectsParser { @@ -88,10 +88,23 @@ public class EffectsParser {
//log all sources
for (String line : compiledLines) {
if (line.contains("SOURCEBEGIN"))
effectData.sources.add(mbEnums.EffectSourceType.valueOf(compiledLines.get(index + 1).replace(" ", "")));
String rawValue;
if (line.contains("SOURCEBEGIN")) {
rawValue = compiledLines.get(index + 1).replace(" ", "");
switch (rawValue) {
case "Crush":
rawValue = "Crushing";
break;
case "Slash":
rawValue = "Slashing";
break;
case "Pierce":
rawValue = "Piercing";
break;
}
effectData.sources.add(mbEnums.EffectSourceType.valueOf(rawValue));
}
index++;
}

Loading…
Cancel
Save