diff --git a/src/engine/ConfigParsing/EffectsData/Condition.java b/src/engine/ConfigParsing/EffectEntry/Condition.java similarity index 64% rename from src/engine/ConfigParsing/EffectsData/Condition.java rename to src/engine/ConfigParsing/EffectEntry/Condition.java index 17ae0cd7..3aa12f0e 100644 --- a/src/engine/ConfigParsing/EffectsData/Condition.java +++ b/src/engine/ConfigParsing/EffectEntry/Condition.java @@ -1,4 +1,4 @@ -package engine.ConfigParsing.EffectsData; +package engine.ConfigParsing.EffectEntry; public class Condition { public String type; diff --git a/src/engine/ConfigParsing/EffectEntry/EffectEntry.java b/src/engine/ConfigParsing/EffectEntry/EffectEntry.java new file mode 100644 index 00000000..f9121d7c --- /dev/null +++ b/src/engine/ConfigParsing/EffectEntry/EffectEntry.java @@ -0,0 +1,12 @@ +package engine.ConfigParsing.EffectEntry; + +import java.util.HashSet; + +public class EffectEntry { + public String id; + public String name; + public int icon; + public HashSet sources; + public HashSet mods; + public HashSet conditions; +} diff --git a/src/engine/ConfigParsing/EffectsData/Mod.java b/src/engine/ConfigParsing/EffectEntry/Mod.java similarity index 77% rename from src/engine/ConfigParsing/EffectsData/Mod.java rename to src/engine/ConfigParsing/EffectEntry/Mod.java index 558f4a0e..d5632e68 100644 --- a/src/engine/ConfigParsing/EffectsData/Mod.java +++ b/src/engine/ConfigParsing/EffectEntry/Mod.java @@ -1,4 +1,4 @@ -package engine.ConfigParsing.EffectsData; +package engine.ConfigParsing.EffectEntry; import engine.mbEnums; diff --git a/src/engine/ConfigParsing/EffectsData/EffectData.java b/src/engine/ConfigParsing/EffectsData/EffectData.java deleted file mode 100644 index 99c07693..00000000 --- a/src/engine/ConfigParsing/EffectsData/EffectData.java +++ /dev/null @@ -1,14 +0,0 @@ -package engine.ConfigParsing.EffectsData; - -import engine.mbEnums; - -import java.util.ArrayList; - -public class EffectData { - public String id; - public String name; - public int icon; - public ArrayList sources; - public ArrayList mods; - public ArrayList conditions; -} diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index bb923b7e..af903ec9 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -6,10 +6,9 @@ // Magicbane Emulator Project © 2013 - 2024 // www.magicbane.com - package engine.ConfigParsing; -import engine.ConfigParsing.EffectsData.EffectData; +import engine.ConfigParsing.EffectEntry.EffectEntry; import engine.gameManager.ConfigManager; import java.io.IOException; @@ -24,7 +23,7 @@ import java.util.regex.Pattern; public class EffectsParser { public static String EffectsPath = ConfigManager.DEFAULT_DATA_DIR + "wpak/Effects.cfg"; - public static HashMap effect_data = new HashMap<>(); + public static HashMap effect_data = new HashMap<>(); private static final Pattern EFFECT_REGEX = Pattern.compile("(.+?)", Pattern.DOTALL); private static final Pattern SOURCE_REGEX = Pattern.compile("(.+?)", Pattern.DOTALL); private static final Pattern MODS_REGEX = Pattern.compile("(.+?)", Pattern.DOTALL); @@ -43,4 +42,8 @@ public class EffectsParser { } + private static void parseEffectEntry(String effectEntry) { + + + } }