This replaces uses of `Duration#minusMillis()` and `TemporalUnit`
referencing units of time defined in RSTimeUnits with their definitions.
The Timers plugin constructors are changed to accept implementations of
the `TemporalUnit` interface as they do not require any
`ChronoUnit`-specific APIs. Furthermore, the timer lengths updated use
the game tick lengths described in the OSRS wiki, which generally
closely correspond to the previous length definitions we used.
Location clue scrolls added a hint arrow when the player was nearby one
of the clue's locations. It did not, however clear that arrow if the
locations were changed and the previously-set hint arrow location was no
longer marked. This commit updates this behavior to clear the active
hint arrow each game tick before re-adding any location hint arrows.
(and if no NPC hint arrows are set)
Fixesrunelite/runelite#10370
If a player for example tries to drop an entire inventory quickly with the
overlay turned on, the inventory grid will flash for each small mouse movement
if the left mouse key is held down. This change mitigates the issue by adding a
delay option that controls the amount of time the user has to wait after
pressing it before enabling any overlay functionality. Showing the grid still
requires the mouse to be moved ~5px away from the first clicked position.
This delay just delays the activation of the overlay, as the the delay
countdown is started upon item press rather than the exit this ~5px range.
Making it respect the exit is needlessly complex as desired functionality is
reached with the current changeset.
Creating and destroying buffers each frame is unnecessary and inefficient as it doesn't give the driver the chance to observe the buffer's usage and optimize its access.
Co-authored-by: Adam <Adam@sigterm.info>
This commit allows the poison timer to be much more accurate as it
receives periodic updates from the server, and covers edge cases where
poison may be delayed or cured from sources besides potion clicks.
(banked potion drinks, HP orb "Cure" menu option, etc.)
This commit removes the `initialDelay` field from GameTimer as the field
was used only to chain antivenom timers into their follow-up antipoison
timers.
Fixesrunelite/runelite#1471Fixesrunelite/runelite#10724
Co-authored-by: Lucas <lws.ned1260@gmail.com>
Co-authored-by: Adam <Adam@sigterm.info>