Fix Mahogany Homes Astral Contact casting - #549
Conversation
Promote the validated Jewelry, Jad Helper, Herbiboar, and Auto Woodcutting fixes from development. Development Build passed for the exact merged branch head.
chsami
left a comment
There was a problem hiding this comment.
P1 — MahoganyHomesScript.selectContactTarget now reads Widget.getBounds() directly from the scheduled script worker, including both Global.sleepUntil callbacks. Returning a Widget from Rs2Widget does not make its later live reads thread-safe; this violates the Hub client-thread boundary and can race interface updates during scrolling.
Snapshot the chooser/target rectangles together on the client thread on each poll, then perform sleeps and mouse input outside it. Validate the target becoming visible, disappearing during a poll, and timing out without selecting another interface's matching text.
Please also rebase/target development per the contribution workflow. The prescribed build -PpluginList=MahoganyHomesPlugin on this head currently fails in the older base's Farming Contracts code (Produce.getContractName() unavailable in the public client), so a clean targeted build is still needed.
|
Fixed Astral Contact widget access by reading fresh chooser/NPC bounds together on the client thread and returning rectangle copies. Scrolling and polling remain off the client thread. If widgets disappear, the wait ends; a final visibility/interrupt check prevents a click after timeout or disappearance. Synced current development with a clean merge and retargeted the PR there. |
chsami
left a comment
There was a problem hiding this comment.
Re-reviewed the current head under the instruction to fix and green-light small issues. The prior client-thread/base/build blockers are addressed: widget bounds are copied on the client thread, polling/scrolling stay off it, disappearance and timeout are checked before clicking, and the branch targets current development. Targeted MahoganyHomesPlugin build and fresh expected CI pass. Replacing my earlier changes-requested review.
Summary
Astral Contactspell while keeping fallback names for older clientsRs2Magic.npcContact("amy")helper0.0.12Why
OSRS renamed the Lunar spell
NPC ContacttoAstral Contact. Mahogany Homes still relied on the old contact helper/name path, causing repeatedUnable to cast Npc Contactlogs and preventing new contracts from being requested through Lunar contact.Testing
./gradlew.bat compileMahoganyhomezJava processMahoganyhomezResources -x compileJava -PpluginList=MahoganyHomesPlugin -PmicrobotClientPath=C:\Users\lobit\.microbot\microbot-2.6.22.jar --no-daemon --console=plain0.0.12Note: the full Hub
buildcurrently fails on an unrelated Farming Contract compile error against Microbot2.6.22(Produce#getContractName()missing), so the plugin source set was compiled directly.