Skip to content

Simple Galaxy Gate: Added Treacherous Domain gate.#173

Merged
dm94 merged 8 commits into
Darkbot-Plugins:mainfrom
do-gamer:simple_gg_td
Jun 20, 2026
Merged

Simple Galaxy Gate: Added Treacherous Domain gate.#173
dm94 merged 8 commits into
Darkbot-Plugins:mainfrom
do-gamer:simple_gg_td

Conversation

@do-gamer

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

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Add support for the Treacherous Domain galaxy gate with time-based access and custom combat behavior.

New Features:

  • Register the Treacherous Domain map in the simple galaxy gate configuration so it is available as a selectable gate.
  • Introduce a TreacherousDomainGate handler that manages gate availability windows and orchestrates combat against tower and boss NPCs.

Enhancements:

  • Implement automatic waiting, temporary bot pausing, and auto-restart logic around the Treacherous Domain gate opening times based on server time.

@sourcery-ai

sourcery-ai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a new Treacherous Domain galaxy gate implementation and registers it in the map configuration, including time-window-based entry logic and NPC targeting priorities for gate behavior.

Flow diagram for TreacherousDomainGate time-window and auto-start logic

flowchart TD
    A[prepareTickModule] --> B{isGateAccessibleFromCurrentMap}
    B -- no --> Z[return false]
    B -- yes --> C{ServerTimeHelper.offsetUpdated}
    C -- no --> D[statusDetails fetching server time]
    D --> E[return true]
    C -- yes --> F[getWaitingDurationInSeconds]
    F --> G{seconds > 0}
    G -- no --> H[reset]
    H --> I[return false]
    G -- yes --> J{module.moveToRefinery}
    J -- yes --> K[StateStore MOVE_TO_SAFE_POSITION]
    J -- no --> L[StateStore WAITING]
    L --> M[setWaitingStatus]
    M --> N{seconds > PRE_START_WAIT_TIMEOUT}
    N -- no --> O[return true]
    N -- yes --> P[handleStopping]
    P --> O

    subgraph StoppedCycle
        S[stoppedTickModule] --> T{autoStart}
        T -- no --> U[return]
        T -- yes --> V[StateStore WAITING]
        V --> W[getWaitingDurationInSeconds]
        W --> X[setWaitingStatus]
        X --> Y{seconds <= PRE_START_WAIT_TIMEOUT}
        Y -- no --> AA[stopTimer disarm]
        AA --> AB[return]
        Y -- yes --> AC[module.bot.handleRefresh]
        AC --> AD[module.bot.setRunning true]
        AD --> AE[autoStart false]
        AE --> AF[stopTimer disarm]
        AF --> AG[return]
    end
Loading

File-Level Changes

Change Details Files
Register the new Treacherous Domain gate in the simple galaxy gate map configuration.
  • Add a MapInfo entry for Treacherous Domain with map id 482
  • Configure access maps using StarSystemAPI.BASE_MAPS
  • Associate the MapInfo with the new TreacherousDomainGate handler class
src/main/java/dev/shared/do_gamer/module/simple_galaxy_gate/config/Maps.java
Implement TreacherousDomainGate behavior, including NPC targeting order and time-window-based gate preparation logic.
  • Create TreacherousDomainGate class extending GateHandler with custom defaults (no auto jump/move-to-center, fetch server offset, etc.)
  • Implement attackTickModule and collectTickModule so towers are prioritized over boss NPCs and map jump is enabled only during collection
  • Add helper methods to identify, select, and attack Tower and Boss NPCs by name, preferring the nearest alive Tower
  • Implement prepareTickModule to wait for configured Treacherous Domain opening windows using server time, move to refinery/safe position while waiting, and optionally stop the bot for long waits
  • Add stoppedTickModule, waiting duration calculation, waiting status formatting, and timed auto-restart logic using Timer and ServerTimeHelper
  • Override reset to clear status details and flags while respecting autoStart
src/main/java/dev/shared/do_gamer/module/simple_galaxy_gate/gate/TreacherousDomainGate.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 reviewed your changes and they look great!


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

do-gamer commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@dm94 Tested and ready to merge.

@ImJimmyXD

Copy link
Copy Markdown

LGTM

@dm94 dm94 merged commit 674995b into Darkbot-Plugins:main Jun 20, 2026
3 of 4 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@do-gamer do-gamer deleted the simple_gg_td branch June 20, 2026 09:00
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.

3 participants