This allows different final messages being built for split chat vs
normal chat, fixing <colNORMAL> incorrectly applying the default chatbox
color to split chat.
Searching the replacement isn't necessary since it won't ever have any
additional col tags except for the ones identified by getLastColor, which
would be identified even when searching the original message. Instead,
just search the original message up to and including the match.
This was an issue with multiple name matches, since it was applying the
replacement with its close color to all matches, even though only
scanning the message for the last color up until the first match
It is possible a clientscript can update the energy in between the last
game tick and the current frame, causing the text to flicker between run
energy and our replacement. This just sets the text before each frame.
The quest icons are also loaded on world map open, so all this has to do is
load the icons if the player is logged in with the map open at the time the
plugin is started.
This has not worked in the past, since the Examine option is not an inventory
action and so cannot ever be shift-click swapped, and causes a crash now if
set due to it subtracting the Examine menu op from ITEM_FIRST_OPTION.
This was queueing potentially multiple tasks if the config was changed on the
login screen, all waiting for the player to be logged in. Instead, use the game
state change event to load the icons.
Since c1aa0c4898 moved client startup to
be much earlier, the plugins can now start after the client is already
at the login screen. This causes the low detail plugin and chat icon
manager to not initialize correctly as they are waiting on the event
for the login screen.
Disposed frames are still reachable via Window.getWindows() until gcd, and can
receive and process events. We don't want the splash screen to close the app if
it receives a window close event after being disposed.
The quit strategy API existed in com.apple.eawt prior to Java 9, and was moved
into java.desktop in 9. This move makes our orange-extensions API incompatiable
with the 9 eawt package too, so we can not use Application.setQuitStrategy on
9+ either, without making orange-extensions multi-release too.
Since Desktop.setQuitStrategy is the new standard way of doing this, use it if
available, and otherwise use the Java 8 Application.setQuitStrategy instead.
Startup races with stretch mode plugin startup and clientui startup, so starting with stretched mode on doesn't reliably work. Just reset a few frames after startup to be sure.
This fixes the following issues:
1) resize events for the client not being propagated to the listener on
the canvas
2) resizing the client in fixed mode not triggering a resetSize due to
the underlying canvas size not changing
3) maximizing the client calling restSize too soon causing it to have no
effect
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.
logback-parent isn't really a bom but instead includes other unrelated
depenedncies like mockito and jodatime, and so I am just adding the
individual logback and slf4j dependencies themselves. Also add
slf4j-simple in dependencyManagement for the various test dependencies
we have on it.
If a swap is configured for the item, never enter into the built in swapping logic. Even if the swap was not applied for this entry, assume either it has already been applied or will be later.
Co-authored-by: sam <dasistkeinnamen@gmail.com>
Currently it is ambiguous if the configured action is the default action or there is no configured action because either way it prepends a * to the default op.
Co-authored-by: sam <dasistkeinnamen@gmail.com>
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.
The examine text, buy limit, trade price, and fee info does not fit on
the interface anymore since the addition of the fee info. This compacts
the examine text as well as places the limit / trade price on the same
line in order to prevent pushing the fee off of the bottom of the
border.
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.
The config service accepts in strings instead of json strings, however
this causes the normal control flow to throw a json parsing exception.
Since this happens so frequently it is using a measurable amount of CPU
time, so avoid it in the common case by testing if the string is json
first
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.