Skip to content

fix(player): handle null local player in cheerer creation#1707

Merged
chsami merged 1 commit intomainfrom
development
Mar 26, 2026
Merged

fix(player): handle null local player in cheerer creation#1707
chsami merged 1 commit intomainfrom
development

Conversation

@chsami
Copy link
Copy Markdown
Owner

@chsami chsami commented Mar 26, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This pull request updates Microbot to version 2.1.30 and systematically refactors player-location accessors across multiple utility classes. Changes include replacing direct calls to Microbot.getClient().getLocalPlayer().getWorldLocation() with Rs2Player.getWorldLocation(), wrapping client reads in Microbot.getClientThread() invocations for thread safety, and making shared caches volatile. Additional modifications add defensive null checks, refactor pathfinder logging, add integration tests for actor model and walker functionality, and introduce a ScreenshotAnalyzer utility for test diagnostics.

Possibly related PRs

  • Microbot#1533: Modifies Rs2Player implementation to add client-thread-safe accessors, which is extensively refactored throughout this PR as a replacement for direct player queries.
  • Microbot#1673: Modifies Rs2ActorModel.java with world-view and location-projection logic changes aligned with the world-view constant migration in this PR.
  • Microbot#1648: Modifies tile object and world-view related code, including logic for distinguishing top-level vs. instanced worlds, which is refactored in this PR via the WorldView.TOPLEVEL constant change.
🚥 Pre-merge checks | ❌ 3

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title focuses on null handling in cheerer creation, but the changeset contains numerous broader refactorings across multiple files including player location abstraction, thread safety improvements, and integration tests. Consider whether the title should reflect the broader scope of changes (e.g., 'refactor: consolidate player location access and add integration tests') or if this PR should be split into smaller, more focused changes.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the motivation for these changes, including why the null checks, player location refactoring, and integration tests are necessary.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chsami chsami merged commit 7a7c0b7 into main Mar 26, 2026
2 of 3 checks 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.

1 participant