getVarbitValue was originally for external plugins which could not
modify the varbits enum, but now ints are used everywhere it is no
longer necessary for two separate methods
This adds a Varbit magic constant annotation which is used now on
varbit parameters and fields.
This is roughly the same type-safety wise, with IDE support, but the ids
can be inlined by the compiler and it avoids having to have a large enum
class with many fields.
The Slayer plugin highlights target monsters based on their name rather
than NPC ID, as many common monsters (skeletons, zombies, etc.) have
nearly endless variations for different models and combat levels.
Previously, this name matching was done via a simple
`String#contains()`, which led to some incorrect matches such as pirates
being highlighted while on rat tasks and Jonny the beard being
highlighted while on bear tasks.
This commit changes matching to use regex to match string boundaries or
whitespace at either end of the task string, ensuring these substring
matches can only happen when word breaks occur. The only known existing
case where this would apply is for baby dragons and brutal dragons,
which are valid alternatives for their respective chromatic dragon
tasks.
If one plugin has multiple dependencies this would throw a concurrent
modification exception due to iterating the successors after removing
the edge
Fill out javadoc for topologicalSort
Co-authored-by: Adam <Adam@sigterm.info>
This allows different final messages being built for split chat vs
normal chat, fixing <colNORMAL> incorrectly applying the default chatbox
color to split chat.
The client has been recreated with a new builder off of the http-api
client for awhile anyway since runelite-client has multiple other
requirements (caching, tls, etc). This fully moves creation of the
okhttp client into both http-service and runelite-client separately.
I've kept the CLIENT field in http-api for now since a few external
plugins depend on it currently.
Thie removes the http-service hiscore api, which we haven't used in
awhile and doesn't work in practice due to upstream rate limits, as well
as the xp tracker which also hasn't been used in a long time since there
are now multiple quality community run xptrackers.
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.