From dbc26b824352acc7784d99f1b7101c4beb2fdb28 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 19 Aug 2024 20:41:30 -0400 Subject: [PATCH] PowerActionEntry parsing work. --- src/engine/wpak/PowerActionParser.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/wpak/PowerActionParser.java b/src/engine/wpak/PowerActionParser.java index 7ff9e917..fa5110fd 100644 --- a/src/engine/wpak/PowerActionParser.java +++ b/src/engine/wpak/PowerActionParser.java @@ -8,6 +8,12 @@ package engine.wpak; -public class PowerActionParser { +import engine.gameManager.ConfigManager; + +import java.util.regex.Pattern; +public class PowerActionParser { + private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\"[^\"]*\")\\s*"); + private static final Pattern POWER_ACTION_REGEX = Pattern.compile("(?<=POWERACTIONBEGIN)(.+?)(?=POWERACTIONEND)", Pattern.DOTALL); + private static final String powerActionPath = ConfigManager.DEFAULT_DATA_DIR + "wpak/PowerActions.cfg"; }