Skip to content

Commit

Permalink
Add junction call, fix some things
Browse files Browse the repository at this point in the history
  • Loading branch information
xpdota committed Dec 21, 2024
1 parent feb95b7 commit 1d88bc4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
11 changes: 10 additions & 1 deletion reevent/src/main/java/gg/xp/reevent/scan/AutoScan.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> scanBlacklist = List.of(
"annotations",
"caffeine",
Expand Down Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -703,10 +704,18 @@ else if (playerHasMarker) {
@NpcCastCallout(0x9D20)
private final ModifiableCallout<AbilityCastStart> p2enrage = ModifiableCallout.durationBasedCall("P2 Enrage", "Enrage, Knockback");

@NpcCastCallout(0x9D43)
@NpcCastCallout(value = 0x9D43, cancellable = true)
private final ModifiableCallout<AbilityCastStart> 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<BaseEvent> 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<AbilityCastStart> hellsJudgment = ModifiableCallout.durationBasedCall("Hell's Judgment", "1 HP");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ protected List<CalloutInitialValues> 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)"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private static void doSetup() {
}
}
EnumSetting<BuiltinTheme> themeSetting = WindowConfig.getThemeSettingStatic();
log.info("Theme: {}", themeSetting.get());
themeSetting.addAndRunListener(() -> setTheme(themeSetting.get()));
SwingUtilities.invokeLater(() -> {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
Expand All @@ -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);
Expand All @@ -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() {
Expand Down

0 comments on commit 1d88bc4

Please sign in to comment.