Skip to content

Simple Galaxy Gate: Updated ABG gate IDs to reverse order (Gamma → Beta → Alpha).#174

Merged
dm94 merged 2 commits into
Darkbot-Plugins:mainfrom
do-gamer:simple_gg_abg_order
Jun 23, 2026
Merged

Simple Galaxy Gate: Updated ABG gate IDs to reverse order (Gamma → Beta → Alpha).#174
dm94 merged 2 commits into
Darkbot-Plugins:mainfrom
do-gamer:simple_gg_abg_order

Conversation

@do-gamer

@do-gamer do-gamer commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Reverse the configured ABG gate ID order and clarify ABG-related comments to better reflect the special handling of these gates.

Enhancements:

  • Reverse the ABG gate ID list to prioritize Gamma over Beta and Alpha when resolving gate access.
  • Improve documentation comments around ABG gate handling to describe wildcard behavior and accessibility checks more accurately.

@sourcery-ai

sourcery-ai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Reorders the ABG gate IDs to iterate Gamma → Beta → Alpha instead of Alpha → Beta → Gamma, and clarifies comments to reflect that ABG IDs are treated as a special wildcard group for map lookup and travel routing.

File-Level Changes

Change Details Files
Reordered ABG gate ID list to change the priority of ABG gate traversal from Alpha-first to Gamma-first and updated associated comments for clarity.
  • Changed ABG_IDS constant values from List.of(51, 52, 53) to List.of(53, 52, 51) to reverse the traversal order.
  • Updated the comment for ABG_IDS to document the new Gamma, Beta, Alpha ID ordering.
  • Clarified the comment in findMapInfo to describe map ID 0 as a special wildcard case for ABG gates.
  • Adjusted the comment in getMapForTravel to describe that the loop checks for any accessible ABG gate from the current map rather than implying a specific Alpha/Beta/Gamma order.
src/main/java/dev/shared/do_gamer/module/simple_galaxy_gate/config/Maps.java
src/main/java/dev/shared/do_gamer/module/simple_galaxy_gate/SimpleGalaxyGate.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • If the iteration order of ABG_IDS is now significant (Gamma → Beta → Alpha), consider either renaming the constant or expanding the comment to state explicitly that the list is ordered by priority to make this dependency clear to future readers.
  • The special handling for map ID 0 as an ABG wildcard is currently split between Maps and SimpleGalaxyGate; consider centralizing this logic (e.g., a helper in Maps) so the behavior for ID 0 cannot drift between call sites.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- If the iteration order of `ABG_IDS` is now significant (Gamma → Beta → Alpha), consider either renaming the constant or expanding the comment to state explicitly that the list is ordered by priority to make this dependency clear to future readers.
- The special handling for map ID 0 as an ABG wildcard is currently split between `Maps` and `SimpleGalaxyGate`; consider centralizing this logic (e.g., a helper in `Maps`) so the behavior for ID 0 cannot drift between call sites.

## Individual Comments

### Comment 1
<location path="src/main/java/dev/shared/do_gamer/module/simple_galaxy_gate/config/Maps.java" line_range="35" />
<code_context>
     }

-    public static final List<Integer> ABG_IDS = List.of(51, 52, 53); // Alpha, Beta, Gamma gate IDs
+    public static final List<Integer> ABG_IDS = List.of(53, 52, 51); // Gamma, Beta, Alpha gate IDs
     private static List<MapInfo> ggMaps;
     private static double mapCenterX = Defaults.MAP_CENTER_X;
</code_context>
<issue_to_address>
**issue (bug_risk):** Reversing ABG_IDS ordering may break any callers that rely on positional semantics instead of set membership.

Any positional access like `ABG_IDS.get(0)` will now return Gamma instead of Alpha. In this file you only use `contains`, so order doesn’t matter here, but please either (a) rename this to make the ordering/priority explicit (e.g. `ABG_PRIORITY_ORDER`), or (b) search for and verify any index-based uses of `ABG_IDS` elsewhere still behave correctly after this change.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@do-gamer

Copy link
Copy Markdown
Contributor Author

@dm94 Tested and ready to merge.

@dm94 dm94 merged commit bc110e1 into Darkbot-Plugins:main Jun 23, 2026
3 of 4 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@do-gamer do-gamer deleted the simple_gg_abg_order branch June 23, 2026 10:36
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