mirror of
https://github.com/runelite/plugin-hub.git
synced 2026-05-12 09:49:53 -04:00
update chance-man to v2.2.0 (#8088)
* Update chance-man to 2.2.0
feat: Implement NPC drop table viewer in music tab
This commit introduces a major UI feature that allows players to view NPC drop tables directly in-game by temporarily hijacking the music tab interface.
A "Show Drops" menu option has been added to the right-click menu for NPCs. When selected, the plugin fetches the NPC's drop data and dynamically replaces the content of the music tab with a custom drop viewer UI.
The new UI consists of several components:
- **`DropsTabUI`**: The main class that initializes and manages the lifecycle of this feature.
- **`DropsMenuListener`**: Injects the "Show Drops" option into the NPC context menu.
- **`MusicWidgetController`**: The core of the feature, responsible for:
- Backing up and hiding the original music widget elements.
- Drawing a new interface that displays the NPC's name, level, and a progress bar for rolled vs. total drops.
- Creating a scrollable grid of all possible drop items, with items the player has already "rolled" appearing faded.
- **`SpriteOverrideManager`**: Replaces the default music tab icon with a custom "drops" icon to indicate that the drop viewer is active.
- **`TabListener`**: Detects when the player navigates away from the music tab and restores its original content, ensuring the drop viewer is temporary.
- **`WidgetUtils`**: Provides helper functions for creating menu entries and managing widget children.
* Update chance-man
Fix dependency injection for Gson and OkHttpClient; add DropFetcher shutdown
* Update chance-man
Fix dependency injection for Gson and OkHttpClient; add DropFetcher shutdown
* Update chance-man
- Replace manual name-and-ID search fallback with MediaWiki’s Special:Lookup extension
(always queries by npcId first, then falls back to the provided name)
- Simplify `buildWikiUrl` to emit `/w/Special:Lookup?type=npc&id=<npcId>&name=<fallback>#Drops`
- Remove `findTitleByNpcId` and obsolete two-stage lookup logic
- Streamline `fetch()` to log the Special:Lookup URL, fetch HTML, and parse drop tables
* Update chance-man
Add Jsoup as implementation and thirdParty dependency
* Update chance-man
* Update build.gradle
* Update chance-man
update HTTP User-Agent to "RuneLite-ChanceMan/2.2.0"
This commit is contained in:
@@ -45,7 +45,7 @@ dependencies {
|
||||
because "discord-rare-drop-notifier, droptracker"
|
||||
}
|
||||
thirdParty("org.jsoup:jsoup:1.13.1") {
|
||||
because "discord-rare-drop-notifier, drop-simulator, fire-beats, loot-table, loot-lookup"
|
||||
because "discord-rare-drop-notifier, drop-simulator, fire-beats, loot-table, loot-lookup, chance-man"
|
||||
}
|
||||
thirdParty("com.miglayout:miglayout-swing:5.2") {
|
||||
because "drop-simulator"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
repository=https://github.com/ChunkyAtlas/chance-man.git
|
||||
commit=3b0a95d0797bd3db2f008ee9b888ee66d78157ff
|
||||
commit=d9d0808f6c103e5e10b0f24de762577d64e0114c
|
||||
|
||||
Reference in New Issue
Block a user