Skip to content

Commit

Permalink
Fix missing 3rd tower call
Browse files Browse the repository at this point in the history
  • Loading branch information
xpdota committed Dec 11, 2024
1 parent be76fd0 commit b3f4612
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -18,38 +19,45 @@
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.*;

@ScanMe
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 -> {
DoodleSpec spec = new CircleDoodleSpec(new EntityDoodleLocation(xe), 50.0d, true, CoordSystem.Screen);
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 -> {
DoodleSpec spec = new LineDoodleSpec(new EntityDoodleLocation(state.getPlayer()), new EntityDoodleLocation(xe), 50.0d);
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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ protected List<CalloutInitialValues> 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"),
Expand All @@ -163,6 +164,7 @@ protected List<CalloutInitialValues> 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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ public boolean isSnapshotSupported() {
return this != FFLOGS;
}

public boolean isLive() {
return !isImport;
}
}
4 changes: 4 additions & 0 deletions xivsupport/src/main/resources/te_changelog.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html lang="en">
<body style="margin: 5px 20px 5px 20px">
<h2>December 10, 2024</h2>
<ul>
<li>FRU triggers are complete.</li>
</ul>
<h2>December 5, 2024</h2>
<ul>
<li>Map/replay now supports tethers and has many new settings, including custom colors.</li>
Expand Down

0 comments on commit b3f4612

Please sign in to comment.