diff --git a/easytriggers/src/main/java/gg/xp/xivsupport/events/triggers/easytriggers/EasyTriggers.java b/easytriggers/src/main/java/gg/xp/xivsupport/events/triggers/easytriggers/EasyTriggers.java index 32d84c5a01dd..37b37f751d64 100644 --- a/easytriggers/src/main/java/gg/xp/xivsupport/events/triggers/easytriggers/EasyTriggers.java +++ b/easytriggers/src/main/java/gg/xp/xivsupport/events/triggers/easytriggers/EasyTriggers.java @@ -164,6 +164,7 @@ public Object findInjectableValue(Object o, DeserializationContext deserializati .postConstruct(this::doLegacyMigration) .build(); setting.tryRecoverFailures(); + // TODO: Having lots of EasyTriggers can inflate startup times this.triggers = new ArrayList<>(setting.getItems()); recalc(); } diff --git a/reevent/src/main/java/gg/xp/reevent/scan/AutoScan.java b/reevent/src/main/java/gg/xp/reevent/scan/AutoScan.java index 602a2eeeb43f..ea413621b9c3 100644 --- a/reevent/src/main/java/gg/xp/reevent/scan/AutoScan.java +++ b/reevent/src/main/java/gg/xp/reevent/scan/AutoScan.java @@ -34,6 +34,11 @@ public class AutoScan { private final AutoHandlerInstanceProvider instanceProvider; private final AutoHandlerConfig config; private static final Pattern jarFileName = Pattern.compile("([a-zA-Z0-9\\-.]+)\\.jar"); + private static final Pattern targetDirName = Pattern.compile("/([a-zA-Z0-9\\-.]+)/target/classes/?"); + /** + * List of jar file names to not scan. If running in an IDE, this will also match the /(module name)/target/classes/ + * directory. + */ private static final List scanBlacklist = List.of( "annotations", "caffeine", @@ -189,7 +194,11 @@ private static boolean isClassInstantiable(Class clazz) { return matcher.group(1); } else { - return null; + Matcher tgtMatcher = targetDirName.matcher(uriStr); + if (tgtMatcher.find()) { + return tgtMatcher.group(1); + } } + return null; } } diff --git a/triggers/triggers-dt/src/main/java/gg/xp/xivsupport/triggers/ultimate/FRU.java b/triggers/triggers-dt/src/main/java/gg/xp/xivsupport/triggers/ultimate/FRU.java index efd6ddd1f18e..d177ff8d369a 100644 --- a/triggers/triggers-dt/src/main/java/gg/xp/xivsupport/triggers/ultimate/FRU.java +++ b/triggers/triggers-dt/src/main/java/gg/xp/xivsupport/triggers/ultimate/FRU.java @@ -9,6 +9,7 @@ import gg.xp.xivdata.data.duties.*; import gg.xp.xivsupport.callouts.CalloutRepo; import gg.xp.xivsupport.callouts.ModifiableCallout; +import gg.xp.xivsupport.events.actlines.events.AbilityCastCancel; import gg.xp.xivsupport.events.actlines.events.AbilityCastStart; import gg.xp.xivsupport.events.actlines.events.AbilityUsedEvent; import gg.xp.xivsupport.events.actlines.events.ActorControlExtraEvent; @@ -703,10 +704,18 @@ else if (playerHasMarker) { @NpcCastCallout(0x9D20) private final ModifiableCallout p2enrage = ModifiableCallout.durationBasedCall("P2 Enrage", "Enrage, Knockback"); - @NpcCastCallout(0x9D43) + @NpcCastCallout(value = 0x9D43, cancellable = true) private final ModifiableCallout intermissionEnrage = ModifiableCallout.durationBasedCall("Endless Ice Age (Intermission)", "Kill Crystals, Bait AoEs"); - // TODO: there is a raidwide (Junction 9D22) between intermission and p3 + private final ModifiableCallout junction = new ModifiableCallout<>("Junction", "Raidwide"); + + @AutoFeed + private final SequentialTrigger intermissionRaidwideSq = SqtTemplates.sq(30_000, + AbilityCastCancel.class, acc -> acc.abilityIdMatches(0x9D43), + (e1, s) -> { + s.waitMs(7_000); + s.updateCall(junction); + }); @NpcCastCallout(0x9D49) private final ModifiableCallout hellsJudgment = ModifiableCallout.durationBasedCall("Hell's Judgment", "1 HP"); diff --git a/triggers/triggers-dt/src/test/java/gg/xp/xivsupport/triggers/ultimate/FRUTest.java b/triggers/triggers-dt/src/test/java/gg/xp/xivsupport/triggers/ultimate/FRUTest.java index 2f627d0e4a30..b6c7bed8e289 100644 --- a/triggers/triggers-dt/src/test/java/gg/xp/xivsupport/triggers/ultimate/FRUTest.java +++ b/triggers/triggers-dt/src/test/java/gg/xp/xivsupport/triggers/ultimate/FRUTest.java @@ -83,6 +83,7 @@ protected List getExpectedCalls() { call(320715, "Proteans", "Proteans (4.7)"), call(334989, "Enrage, Knockback", "Enrage, Knockback (9.7)"), call(371856, "Kill Crystals, Bait AoEs", "Kill Crystals, Bait AoEs (39.7)"), + call(417128, "Raidwide", "Raidwide"), call(437660, "1 HP", "1 HP (3.7)"), call(445922, "Raidwide", "Raidwide (9.7)"), call(457085, "Long Fire", "Long Fire (30.6)"), diff --git a/xivsupport/src/main/java/gg/xp/xivsupport/gui/CommonGuiSetup.java b/xivsupport/src/main/java/gg/xp/xivsupport/gui/CommonGuiSetup.java index 584def4822b8..3d388e7ac981 100644 --- a/xivsupport/src/main/java/gg/xp/xivsupport/gui/CommonGuiSetup.java +++ b/xivsupport/src/main/java/gg/xp/xivsupport/gui/CommonGuiSetup.java @@ -64,6 +64,7 @@ private static void doSetup() { } } EnumSetting themeSetting = WindowConfig.getThemeSettingStatic(); + log.info("Theme: {}", themeSetting.get()); themeSetting.addAndRunListener(() -> setTheme(themeSetting.get())); SwingUtilities.invokeLater(() -> { Thread.currentThread().setPriority(Thread.MAX_PRIORITY); @@ -82,6 +83,7 @@ private static void doSetup() { monFuture.complete(monitor); }); final Monitor monitor; + log.info("Waiting for monitor setup"); Monitor monitorTmp; try { monitorTmp = monFuture.get(5, TimeUnit.SECONDS); @@ -90,6 +92,7 @@ private static void doSetup() { log.info("Error setting up gui performance monitor", e); monitorTmp = null; } + log.info("Monitor setup done"); monitor = monitorTmp; // monitor = null; queue.push(new EventQueue() {