feat(ebounty.lic): v1.10.0 enhance FORAGE BOUNTY support#2297
feat(ebounty.lic): v1.10.0 enhance FORAGE BOUNTY support#2297
Conversation
Updated version to 1.10.0 and added support for alternative BOUNTY text.
📝 Walkthrough🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/ebounty.lic`:
- Line 3717: Remove the trailing whitespace after the call
"EBounty.go2(return_room)" so the line ends exactly with
EBounty.go2(return_room) (no spaces or tabs at end); this will resolve the
Layout/TrailingWhitespace RuboCop offense.
- Around line 3700-3711: The current unguarded call to Bounty::Parser.parse and
Bounty::Task.new (when Script.current.vars[3] is present) can raise or return
invalid data and abort execution; wrap that parse+construction in a safe branch
that rescues parse/constructor errors (or checks for nil/invalid return) and on
failure emits a controlled EBounty.msg "error" with a clear message including
the raw input or bounty_info.inspect fallback, then exit or fall back to
Bounty.task; make the protective change around the block that sets bounty_info
(the code invoking Script.current.vars[3], Bounty::Parser.parse, and
Bounty::Task.new) so EBounty::Task.forage_bounty is only called with a valid
bounty_info for which bounty_info.herb? is true.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 268b4c7e-bfc5-4aae-b034-1b3e5b607d3a
📒 Files selected for processing (1)
scripts/ebounty.lic
Refactor bounty_info assignment for better error handling and clarity.
Refactor forage_bounty to use forage_amount for calculating amounts and improve code clarity.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai remove all previous comments and review again |
|
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/ebounty.lic`:
- Around line 2985-2992: The turn-in and return paths still search for the raw
herb name, causing failures for alias names; update Task.forage_turnin and
Task.forage_return to reuse the same normalized herb matcher logic used in
self.forage_amount (the alias mappings for "white mushroom" -> "white hook
mushroom", "trafel mushroom" -> "black trafel mushroom", "withered mushroom" ->
"withered black mushroom", "soft mushroom" -> "soft white mushroom") and then
search the default container with the same regex match (e.g., /#{herb}/) instead
of the raw input so the collected-vs-turn-in checks remain consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 654877ee-fe3d-44ce-ace8-550444fa08c3
📒 Files selected for processing (1)
scripts/ebounty.lic
|
@coderabbitai remove all previous comments and review again |
|
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/ebounty.lic`:
- Line 3727: The call to EBounty::Task.forage_bounty is incorrectly setting
bounty_bypass based on presence of manual BOUNTY text (Script.current.vars[3]),
causing manual-forage to skip turnin/return; change the logic so bounty_bypass
is only true when an explicit bypass flag is provided (add or use a dedicated
flag var) and not when manual text is present; keep the normal forage path for
manual text and simply override the parsed herb/number/area arguments before
calling EBounty::Task.forage_bounty (update the call site that constructs
bounty_info and the bounty_bypass argument accordingly).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 661eb458-086e-4dfc-87fb-cebe5485250d
📒 Files selected for processing (1)
scripts/ebounty.lic
Updated version to 1.10.0 and added support for alternative BOUNTY text.
Summary by CodeRabbit
New Features
;ebounty forage bounty "BOUNTY output", which is parsed and applied to the forage run (parse errors are reported).Bug Fixes
Documentation