Skip to content

Save Region.Id instead of Region struct in PlayerConfig - #31

Open
Egezenn wants to merge 1 commit into
Silkroad-Developer-Community:mainfrom
Egezenn:fix/training-area-region-id
Open

Egezenn wants to merge 1 commit into
Silkroad-Developer-Community:mainfrom
Egezenn:fix/training-area-region-id

Conversation

@Egezenn

@Egezenn Egezenn commented Oct 15, 2026 •

Copy link
Copy Markdown
Member
  • Store numeric Region.Id (ushort) when setting RSBot.Area.Region in training areas
  • Ensures clean serialization and avoids type mismatch when parsing configuration

Summary by CodeRabbit

  • Bug Fixes
    • Fixed training-area region settings so they consistently save the region identifier when set through the interface, scripts, or commands.

- Store numeric Region.Id (ushort) when setting RSBot.Area.Region in training areas
- Ensures clean serialization and avoids type mismatch when parsing configuration
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 02504f3d-16d3-4dba-976d-11a14c48cb44
📥 Commits

Reviewing files that changed from the base of the PR and between 3333928 and 279d5bb.

📒 Files selected for processing: 7
  • Application/OasisBot/Views/Main.cs
  • Botbases/RSBot.Training/Components/TrainingAreaScriptCommand.cs
  • Botbases/RSBot.Training/TrainingManager.cs
  • Botbases/RSBot.Training/Views/Dialogs/TrainingAreasDialog.cs
  • Botbases/RSBot.Training/Views/Main.cs
  • Plugins/RSBot.CommandCenter/Components/Command/AreaCommandExecutor.cs
  • Plugins/RSBot.Python/Components/API/Core/Training/API.Training.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Training-area settings now store region IDs instead of region objects across application controls, training commands, and plugin APIs.

Changes: Training area region settings

Layer / File(s) Summary
Set training-area region IDs
Application/OasisBot/Views/Main.cs, Botbases/RSBot.Training/..., Plugins/RSBot.CommandCenter/..., Plugins/RSBot.Python/...
The training-area setting calls now pass region IDs. Four files also had their leading UTF-8 BOM removed.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 279d5

Training-area settings now pass numeric region IDs while preserving the existing stored value and restoration behavior. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: storing Region.Id instead of the Region object in PlayerConfig.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch has not been deployed

No deployments
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