Skip to content

Fix Mahogany Homes Astral Contact casting - #549

Merged
chsami merged 4 commits into
chsami:developmentfrom
MuffinKid23:codex/fix-mahogany-astral-contact
Sep 16, 2026
Merged

chsami merged 4 commits into
chsami:developmentfrom
MuffinKid23:codex/fix-mahogany-astral-contact

Conversation

@MuffinKid23

Copy link
Copy Markdown
Contributor

Summary

  • update Mahogany Homes NPC contact flow to support the renamed Astral Contact spell while keeping fallback names for older clients
  • select Amy from the contact interface without relying only on the old Rs2Magic.npcContact("amy") helper
  • log full script-loop exceptions instead of only printing the exception message
  • bump Mahogany Homes plugin version to 0.0.12

Why

OSRS renamed the Lunar spell NPC Contact to Astral Contact. Mahogany Homes still relied on the old contact helper/name path, causing repeated Unable to cast Npc Contact logs 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=plain
  • packaged and locally verified the external plugin jar contains Mahogany Homes classes/resources and descriptor version 0.0.12

Note: the full Hub build currently fails on an unrelated Farming Contract compile error against Microbot 2.6.22 (Produce#getContractName() missing), so the plugin source set was compiled directly.

chsami and others added 2 commits August 13, 2026 21:18
Promote the validated Jewelry, Jad Helper, Herbiboar, and Auto Woodcutting fixes from development. Development Build passed for the exact merged branch head.

@chsami chsami left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chsami
chsami changed the base branch from main to development September 16, 2026 08:54
@chsami

chsami commented Sep 16, 2026

Copy link
Copy Markdown
Owner

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. ./gradlew build -PpluginList=MahoganyHomesPlugin passes against public client 2.6.22, including Gradle tests. This addresses my earlier widget-thread/base/build blockers; the new head still needs green CI before merge.

@chsami chsami left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chsami
chsami merged commit f8a6937 into chsami:development Sep 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants