Skip to content

Commit

Permalink
Fix some relativity calls, add one more
Browse files Browse the repository at this point in the history
  • Loading branch information
xpdota committed Dec 11, 2024
1 parent b3f4612 commit c1439e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -740,15 +740,17 @@ private static Predicate<HasDuration> initDurBetween(int secondsMin, int seconds
private final ModifiableCallout<BuffApplied> relThLongFire = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Support Long Fire", "Long Fire").autoIcon();
private final ModifiableCallout<BuffApplied> relThIce = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Support Ice", "Ice").autoIcon();

private final ModifiableCallout<BuffApplied> relShortFirePop = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: DPS Short Fire Popping", "Move Out").autoIcon()
private final ModifiableCallout<BuffApplied> relShortFirePop = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Short Fire Popping", "Move Out").autoIcon()
.extendedDescription("The short fire/stack pop calls happen about 5 seconds in.");
private final ModifiableCallout<BuffApplied> relShortStackPop = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: DPS Short Stack Popping", "Stack").autoIcon();
private final ModifiableCallout<BuffApplied> relShortStackPop = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Short Stack Popping", "Stack").autoIcon();

private final ModifiableCallout<?> relLongRewind = new ModifiableCallout<>("Relativity: Long Rewind", "Bait Spinny")
.extendedDescription("This call happens after the first fire/stack pop, if you have long rewind.");
private final ModifiableCallout<BuffApplied> relShortRewindEruption = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Short Rewind w/ Eruption", "Stand on Light").autoIcon()
.extendedDescription("This call happens after the first fire/stack pop, if you have short rewind and have eruption (no water).");
private final ModifiableCallout<BuffApplied> relShortRewindWater = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Short Rewind w/ Water", "Stand on Light").autoIcon()
private final ModifiableCallout<BuffApplied> relShortRewindEruptionMedFire = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Short Rewind w/ Eruption and Med Fire", "Stand inside Light").autoIcon()
.extendedDescription("This call happens after the first fire/stack pop, if you have short rewind and have eruption (no water) as well as medium fire.");
private final ModifiableCallout<BuffApplied> relShortRewindWater = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: Short Rewind w/ Water", "Stand In").autoIcon()
.extendedDescription("This call happens after the first fire/stack pop, if you have short rewind and have water (no eruption).");

private final ModifiableCallout<BuffApplied> relMedFirePop = ModifiableCallout.<BuffApplied>durationBasedCall("Relativity: DPS Medium Fire Popping", "Move Out").autoIcon()
Expand Down Expand Up @@ -888,7 +890,13 @@ private static Predicate<HasDuration> initDurBetween(int secondsMin, int seconds
s.updateCall(relShortRewindWater, e);
}
else {
s.updateCall(relShortRewindEruption, e);
// TODO: some people need to bait inside for this?
if (medFireC.anyMatch(isPlayer)) {
s.updateCall(relShortRewindEruptionMedFire, e);
}
else {
s.updateCall(relShortRewindEruption, e);
}
}
},
() -> s.updateCall(relLongRewind));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ private void recalcEnabledDisabledStatus() {
callCheckbox.repaint();
ttsPanel.updateUI();
textPanel.updateUI();
soundPanel.updateUI();
}

public void setEnabledByParent(boolean enabledByParent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public void setBounds(int x, int y, int width, int height) {
Rectangle currentBounds = getBounds();
int currentWidth = currentBounds.width;
boolean doResize = width - currentWidth > 3 || width - currentWidth < 0;
super.setBounds(x, y, width, height);
if (doResize) {
super.setBounds(x, y, width, height);
}
if (!isPreferredSizeSet()) {
fakePreferredSize = super.getPreferredSize();
}
Expand Down

0 comments on commit c1439e4

Please sign in to comment.