Browse Source

Naming convention update

feature-config-parsing2
MagicBot 3 months ago
parent
commit
adb10e34f3
  1. 4
      src/engine/wpak/EffectEntry.java
  2. 8
      src/engine/wpak/EffectsParser.java

4
src/engine/wpak/EffectEntry.java

@ -13,8 +13,8 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
public class EffectEntry { public class EffectEntry {
public String id; public String effect_id;
public String name; public String effect_name;
public int icon; public int icon;
public HashSet<String> sources = new HashSet<>(); public HashSet<String> sources = new HashSet<>();
public ArrayList<EffectModifier> mods = new ArrayList<>(); public ArrayList<EffectModifier> mods = new ArrayList<>();

8
src/engine/wpak/EffectsParser.java

@ -43,7 +43,7 @@ public class EffectsParser {
while (matcher.find()) { while (matcher.find()) {
EffectEntry effectEntry = parseEffectEntry(matcher.group()); EffectEntry effectEntry = parseEffectEntry(matcher.group());
effect_data.put(effectEntry.id, effectEntry); effect_data.put(effectEntry.effect_id, effectEntry);
} }
} }
@ -73,9 +73,9 @@ public class EffectsParser {
while (matcher.find()) while (matcher.find())
effectHeader.add(matcher.group().trim()); effectHeader.add(matcher.group().trim());
effectEntry.id = effectHeader.get(0); effectEntry.effect_id = effectHeader.get(0);
effectEntry.name = effectHeader.get(1); effectEntry.effect_name = effectHeader.get(1);
effectEntry.name = effectEntry.name.replaceAll("\"", ""); effectEntry.effect_name = effectEntry.effect_name.replaceAll("\"", "");
// Some effect mods have no icon // Some effect mods have no icon
// (SEEINVIS-SHADE "See Invis") // (SEEINVIS-SHADE "See Invis")

Loading…
Cancel
Save