Skip to content

Conversation

@Sunny-P
Copy link
Contributor

@Sunny-P Sunny-P commented Jan 28, 2026

  • Replaced reference from int BANK_ITEM_CONTAINER (from ComponentID class) to a local int BANK_ITEM_CONTAINER with updated working value.
  • Fixed Rs2Bank.isOpen() method. Now correctly identifies if bank is open properly again.

May not fix all banking issues for other banking situations. But most basic banking situations should be fine with this.

# Replaced reference to int BANK_ITEM_CONTAINER to a local int BANK_ITEM_CONTAINER with updated working value.
## Fixed Rs2Bank.isOpen() method. Now correctly identifies if bank is open properly again.
### May not fix all banking issues for other banking situations.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

This pull request modifies Rs2Bank to introduce a new public constant BANK_ITEM_CONTAINER within the class and refactors the isOpen() method. The bank open state detection is changed from checking for the presence of "Rearrange mode" widget text via Rs2Widget.hasWidgetText() to using Rs2Widget.isWidgetVisible(12, 1). A corresponding static import is commented out to reflect the new in-class constant usage. The changes affect 7 lines added and 2 removed.

Possibly related PRs

  • issues with bank fixed #1637: Modifies the same Rs2Bank class to add updateLocalBank handling for bank container events, complementing the bank state detection changes in this PR.

Note: The shift from widget text detection ("Rearrange mode") to widget visibility checking (12, 1) represents a change in how the bank open state is determined. Verify that the widget ID and index (12, 1) reliably indicate the open state across all game states where the previous text-based check was used.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the Rs2Bank class with corrections to the bank open detection and BANK_ITEM_CONTAINER constant.
Description check ✅ Passed The PR description accurately describes the changes made: replacing BANK_ITEM_CONTAINER reference with a local constant and fixing the isOpen() method logic.

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

✨ Finishing touches
  • 📝 Generate docstrings

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 293ff11 into chsami:development Jan 28, 2026
2 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.

2 participants