Skip to content

Commit

Permalink
Fixed a bug where restunning a crab when the random interval timer wa…
Browse files Browse the repository at this point in the history
…s showing wouldn't remove the old timer.

Add changelog to readme.
Shorten plugin description so it doesn't get cut off in plugin hub.
  • Loading branch information
AnkouOSRS committed Mar 6, 2020
1 parent d597937 commit 6a4ef31
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@ Crabs in the Chambers of Xeric have a 10-tick window where they will unstun. Thi
exactly when the crabs will become unstunned. Instead, it will show one timer that displays the minimum amount of time,
as well as a separate timer to show the 10-tick interval.

## Changelog
####3/5/19
Fixed a bug where restunning a crab when the random interval timer was showing wouldn't remove the old timer.

####3/4/19
Initial release

##

![Example image](https://i.imgur.com/AKp5BEY.png)
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
mavenCentral()
}

def runeLiteVersion = '1.6.9-SNAPSHOT'
def runeLiteVersion = '1.6.9'

dependencies {
compileOnly group: 'net.runelite', name:'client', version: runeLiteVersion
Expand Down
2 changes: 1 addition & 1 deletion runelite-plugin.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
displayName=Crab Stun Timers
author=Ankou
support=https://github.com/AnkouOSRS/crab-stun-timers
description=Plugin to show a timer for how long crabs in the Chambers of Xeric will remain stunned.
description=Timers for when crabs in CoX get unstunned.
tags=chambers,of,xeric,cox,crab,crabs,stun,timer,timers
plugins=com.crabstuntimer.CrabStunPlugin
2 changes: 1 addition & 1 deletion src/main/java/com/crabstuntimer/CrabStunPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ public void onGraphicChanged(GraphicChanged event) {
if (actor.getName() != null && actor.getName().contains("Jewelled Crab") && actor.getGraphic() == CRAB_STUN_GRAPHIC) {
WorldPoint worldPoint = actor.getWorldLocation();
CrabStun stunEvent = new CrabStun(actor, worldPoint, Instant.now(), getStunDurationTicks(), 0);

for (CrabStun stun : stunEvents) {
if (stun.getCrab().equals(actor)) {
stun.setStartTime(Instant.now());
}
}
overlay.getRandomIntervalTimers().removeIf(timer -> (timer.getCrab().equals(stunEvent.getCrab())));
stunEvents.add(stunEvent);
}
}
Expand Down

0 comments on commit 6a4ef31

Please sign in to comment.