Add Sentinel group leader map-only tracking#294
Open
T9knauf wants to merge 1 commit into
Open
Conversation
|
😅 Ups... the issue does not have any reward yet! |
Contributor
Reviewer's GuideIntroduces an optional Sentinel "group leader map-only" tracking mode, refactors group target selection to be deterministic by Master ID > Tag > Group Leader, and wires the new option into configuration and i18n strings. Sequence diagram for deterministic group targeting and map-only trackingsequenceDiagram
actor Player
participant SentinelModule
participant Group
participant GroupMember
participant HeroApi
participant StarSystem
participant MapModule
Player->>SentinelModule: onTickModule()
SentinelModule->>Group: hasGroup()
alt has group
SentinelModule->>Group: getMembers()
SentinelModule->>SentinelModule: updateGroupLeaderId()
SentinelModule->>SentinelModule: hasSentinel()
alt sentinel present
SentinelModule->>SentinelModule: updateLastMap()
SentinelModule->>SentinelModule: isGroupLeaderMapOnlyActive()
alt group leader map-only active (sentinel view)
SentinelModule->>SentinelModule: trackLeaderMapOnly()
SentinelModule->>SentinelModule: setMode(configRoam)
SentinelModule->>SentinelModule: collectorModule.onTickModule() [if collectorActive]
else normal behavior
SentinelModule->>SentinelModule: isAttacking()
alt attacking
SentinelModule->>SentinelModule: attackLogic()
else not attacking
SentinelModule->>SentinelModule: followByPortals()
end
end
end
end
Player->>SentinelModule: goToGroup()
SentinelModule->>Group: getMembers()
SentinelModule->>SentinelModule: getGroupMaster()
alt master by MASTER_ID
SentinelModule->>GroupMember: isLivingGroupMember()
else master by SENTINEL_TAG
SentinelModule->>GroupMember: isLivingGroupMember()
else master by group leader
SentinelModule->>GroupMember: isLeader()
end
alt master found
SentinelModule->>GroupMember: isLeader()
alt member is leader
SentinelModule->>SentinelModule: groupLeaderID = member.id
end
SentinelModule->>SentinelModule: masterID = member.id
SentinelModule->>HeroApi: getMap()
alt same map
SentinelModule->>SentinelModule: lastSentinelLocation = member.location
SentinelModule->>SentinelModule: isGroupLeaderMapOnlyActive(member)
alt map-only active (member view)
SentinelModule->>SentinelModule: trackLeaderMapOnly()
else full follow
SentinelModule->>SentinelModule: movement.moveTo(member.location)
end
else different map
SentinelModule->>StarSystem: findMap(member.mapId)
StarSystem-->>SentinelModule: GameMap
SentinelModule->>MapModule: setTarget(map)
end
else no master
SentinelModule-->>Player: no movement (no valid master)
end
Class diagram for SentinelModule and SentinelConfig updatesclassDiagram
class SentinelModule {
- JLabel label
- State currentStatus
- long groupLeaderID
- long masterID
+ onTickModule() void
- trackLeaderMapOnly() void
- goToGroup() void
- getGroupMaster() GroupMember
- isLivingGroupMember(member GroupMember) boolean
- updateGroupLeaderId() void
- isGroupLeaderMapOnlyActive() boolean
- isGroupLeaderMapOnlyActive(member GroupMember) boolean
}
class State {
<<enum>>
INIT
WAIT
WAIT_GROUP_LOADING
TRAVELLING_TO_MASTER
TRACKING_LEADER_MAP
FOLLOWING_MASTER
HELPING_MASTER
TRAVELING_TO_WORKING_MAP
}
class SentinelConfig {
+ boolean followGroupLeader
+ boolean groupLeaderMapOnly
+ boolean ignoreSecurity
+ int MASTER_ID
+ Tag SENTINEL_TAG
+ Humanizer humanizer
}
class GroupMember {
+ long getId()
+ boolean isLeader()
+ boolean isDead()
+ int getMapId()
+ Location getLocation()
}
SentinelModule --> State
SentinelModule --> SentinelConfig
SentinelModule --> GroupMember
SentinelConfig --> Humanizer
SentinelConfig --> Tag
Flow diagram for group leader ID update and map-only activationflowchart TD
A[Start onTickModule] --> B[updateGroupLeaderId]
B --> C[Group hasGroup?]
C -->|No| D[Return]
C -->|Yes| E[Get members]
E --> F[Filter by isLivingGroupMember]
F --> G[Filter by isLeader]
G --> H[First leader present?]
H -->|Yes| I[Set groupLeaderID = leader.id]
H -->|No| D
I --> J[Set currentStatus and behavior]
J --> K[isGroupLeaderMapOnlyActive]
K -->|Yes| L[Set State.TRACKING_LEADER_MAP and trackLeaderMapOnly]
K -->|No| M[Proceed with normal attack or follow logic]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
groupLeaderMapOnlymode that travels to the group leader map without forcing coordinate-follow or attack mirroringVerification
git diff --checkgradle build --console=plainwas attempted with a local Gradle 8.7 distribution, but the repository currently cannot resolve existing dependencyeu.darkbot:DarkBot:97430f3417from Maven/JitPack./claim #224
Summary by Sourcery
Add an optional Sentinel mode that only tracks the group leader’s map while making group target selection follow a deterministic priority and localizing the new option.
New Features:
Enhancements:
Documentation: