From b3f46125843a9426e4d6342dfcee219f85780eec Mon Sep 17 00:00:00 2001 From: XP Date: Tue, 10 Dec 2024 16:57:32 -0800 Subject: [PATCH] Fix missing 3rd tower call --- .../rightclicks/TelestoRightClickOptions.java | 16 ++++++++++++---- .../gg/xp/xivsupport/triggers/ultimate/FRU.java | 4 ++++ .../xp/xivsupport/triggers/ultimate/FRUTest.java | 2 ++ .../gg/xp/xivsupport/sys/KnownLogSource.java | 3 +++ xivsupport/src/main/resources/te_changelog.html | 4 ++++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/telesto-support/telesto-right-clicks/src/main/java/gg/xp/telestosupport/rightclicks/TelestoRightClickOptions.java b/telesto-support/telesto-right-clicks/src/main/java/gg/xp/telestosupport/rightclicks/TelestoRightClickOptions.java index 48f423c3d4aa..9e27aadccdd0 100644 --- a/telesto-support/telesto-right-clicks/src/main/java/gg/xp/telestosupport/rightclicks/TelestoRightClickOptions.java +++ b/telesto-support/telesto-right-clicks/src/main/java/gg/xp/telestosupport/rightclicks/TelestoRightClickOptions.java @@ -1,6 +1,7 @@ package gg.xp.telestosupport.rightclicks; import gg.xp.reevent.events.EventMaster; +import gg.xp.reevent.scan.LiveOnly; import gg.xp.reevent.scan.ScanMe; import gg.xp.telestosupport.doodle.CircleDoodleSpec; import gg.xp.telestosupport.doodle.CoordSystem; @@ -18,6 +19,7 @@ import gg.xp.xivsupport.models.XivPlayerCharacter; import gg.xp.xivsupport.persistence.PersistenceProvider; import gg.xp.xivsupport.persistence.settings.BooleanSetting; +import gg.xp.xivsupport.sys.PrimaryLogSource; import java.awt.*; @@ -25,15 +27,17 @@ public class TelestoRightClickOptions { private final BooleanSetting enableExtraOptions; + private final PrimaryLogSource pls; - public TelestoRightClickOptions(RightClickOptionRepo repo, EventMaster master, PersistenceProvider pers, XivState state, DoodleProcessor dp) { + public TelestoRightClickOptions(RightClickOptionRepo repo, EventMaster master, PersistenceProvider pers, XivState state, DoodleProcessor dp, PrimaryLogSource pls) { this.enableExtraOptions = new BooleanSetting(pers, "telesto-support.right-click-options.enabled", false); + this.pls = pls; BooleanSetting enableDoodles = dp.enableDoodles(); // TODO: these should also only enable if doodles are enabled repo.addOption(CustomRightClickOption.forRow("Mark with Circle", XivPlayerCharacter.class, xpc -> master.pushEvent(new SpecificAutoMarkRequest(xpc, MarkerSign.CIRCLE)), - ignored -> enableExtraOptions.get())); + ignored -> extraOptionsEnabled())); repo.addOption(CustomRightClickOption.forRow("Draw Circle on Entity", XivEntity.class, xe -> { @@ -41,7 +45,7 @@ public TelestoRightClickOptions(RightClickOptionRepo repo, EventMaster master, P spec.color = new Color(255, 0, 255, 192); master.pushEvent(new CreateDoodleRequest(spec)); }, - ignored -> enableExtraOptions.get() && enableDoodles.get())); + ignored -> extraOptionsEnabled() && enableDoodles.get())); repo.addOption(CustomRightClickOption.forRow("Draw Line to Entity", XivEntity.class, xe -> { @@ -49,7 +53,11 @@ public TelestoRightClickOptions(RightClickOptionRepo repo, EventMaster master, P spec.color = new Color(255, 0, 255, 192); master.pushEvent(new CreateDoodleRequest(spec)); }, - ignored -> enableExtraOptions.get() && enableDoodles.get())); + ignored -> extraOptionsEnabled() && enableDoodles.get())); + } + + private boolean extraOptionsEnabled() { + return pls.getLogSource().isLive() && enableExtraOptions.get(); } public BooleanSetting getEnableExtraOptions() { 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 316d28999907..0a352d86ee62 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 @@ -1632,6 +1632,10 @@ else if (hit.eighthsTo(nextHit) == -1) { s.updateCall(paradiseRegained2LightCleaveLightTether); } } + s.waitMs(2_000); + s.waitEvent(AbilityUsedEvent.class, aue -> aue.abilityIdMatches(0x9D7A, 0x9D7B)); + s.updateCall(paradiseRegained3); + // TODO: 3rd tower call // Map effects seem to indicate tower locations 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 c457a09e8000..2f627d0e4a30 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 @@ -142,6 +142,7 @@ protected List getExpectedCalls() { call(884879, "Move", "Move"), call(899968, "Tanks Left, Party Out", "Tanks Left, Party Out (6.6)"), call(906860, "Party In", "Party In"), + call(910858, "Third Tower", "Third Tower"), call(921762, "Line Stacks", "Line Stacks (6.2)"), call(928829, "Move", "Move"), call(930919, "Stacks", "Stacks"), @@ -163,6 +164,7 @@ protected List getExpectedCalls() { call(997938, "Move", "Move"), call(1017222, "Tanks Left, Party Out", "Tanks Left, Party Out (6.6)"), call(1024112, "Party In", "Party In"), + call(1028343, "Third Tower", "Third Tower"), call(1033948, "Line Stacks", "Line Stacks (6.2)"), call(1040991, "Move", "Move"), call(1043086, "Stacks", "Stacks"), diff --git a/xivsupport/src/main/java/gg/xp/xivsupport/sys/KnownLogSource.java b/xivsupport/src/main/java/gg/xp/xivsupport/sys/KnownLogSource.java index a9e34a41a4c1..d70a1ce805dc 100644 --- a/xivsupport/src/main/java/gg/xp/xivsupport/sys/KnownLogSource.java +++ b/xivsupport/src/main/java/gg/xp/xivsupport/sys/KnownLogSource.java @@ -21,4 +21,7 @@ public boolean isSnapshotSupported() { return this != FFLOGS; } + public boolean isLive() { + return !isImport; + } } diff --git a/xivsupport/src/main/resources/te_changelog.html b/xivsupport/src/main/resources/te_changelog.html index 5c23d0d9f727..7a0f8b96eb75 100644 --- a/xivsupport/src/main/resources/te_changelog.html +++ b/xivsupport/src/main/resources/te_changelog.html @@ -1,5 +1,9 @@ +

December 10, 2024

+
    +
  • FRU triggers are complete.
  • +

December 5, 2024

  • Map/replay now supports tethers and has many new settings, including custom colors.