This adds a new createMenuEntry api method to make MenuEntries instead.
Menu entries now have an associated callback called when they are
clicked on, avoiding most plugins from having to hook separately to
detect the menu click. Additionally get/set type has changed to take a
MenuAction.
Apply the color changes at chat build time directly to the message being
set on the component, instead of prepending the color change onto the
message itself.
This is a bit more robust since it doesn't break things which depend on
the chat message not starting with a color, which they would not
otherwise, such as the chat filter.
This lets plain latin-character filters to match messages with accents
and diacritics which are not easily typed on all keyboard layouts.
Co-authored-by: Jordan Atwood <jordan.atwood423@gmail.com>
As the number of bonus types increases, the existing system of allowing
only a single type of bonus to be applied, and only allowing actions to
entirely opt out of having bonuses applied rather than more fine-grained
control, is showing its age. This commit redefines all bonus and action
entries in Java enums so that such systems can be better-defined.
Additionally, it comes with the benefit of easier change validation via
testing and enabling item and sprite ID referencing via runelite-api.
LOOKING_INTO is a generic animation used for numerous activities, and
was previously used as an intermediate animation in a test case. Now
that it is used to trigger idle notifications, a dummy animation has
been inserted to ensure the affected test case will not be broken in the
same way in the future.
Co-authored-by: Nick Wolff <nickwolff2@gmail.com>
Co-authored-by: Arnaud Peralta <arnaud.peralta@gmail.com>
This allows the other plugins which depend on the npc overaly to work
when npc highlight plugin is off, while still letting them use the
consistent highlight style of the central overlay.
The ChatPlayers do not implement equals or hashCode, making them
unsuitable as a hashmap key. Instead just use a linked list and compare
the members using the comparable interface.
turns out that thrall spells are seemingly the only arceuus spell with a
magic-level based duration that uses the boosted level, at least out of
the ones we have timers for
Setting the start time to null isn't necessary, since IN_MENU is marked
shouldRestart, it always resets the start time when the status is changed to
menu. This was clearing it, forcing a presence update, and then erroring when
trying to compute the original start time. It also would have never really unset,
even if it wasn't erroring later, due to IN_MENU also being unclearable, and
so would have never been removed in the first place.
Additionally the status reset test is also wrong since it is testing the end
timestamp which has never been used by us, making the test useless.
The non-items examine info has been broken for years, and the wiki already has item examines anyway, so we can use those in the future if we need them.
Prior to this commit, ThreeStepCrypticClue simply returned a
concatenation of the active step locations without filtering the mapped
locations in any way. This could lead to NPEs in the plugin as some
cryptic clues have null locations for steps which have no specific
location or have a variable location. This commit addresses this by
making CrypticClue's location field `@Nullable`, filtering null
locations from ThreeStepCrypticClue's getLocations stream, and by adding
a test to ensure ThreeStepCrypticClue's getLocations method cannot yield
any null entries in its return value.