ISSUE-042: fix Hunter Drones not exploding on dock, unrecallable, ign… - #60
Open
Sellafield wants to merge 1 commit into
Open
ISSUE-042: fix Hunter Drones not exploding on dock, unrecallable, ign…#60Sellafield wants to merge 1 commit into
Sellafield wants to merge 1 commit into
Conversation
Sellafield
force-pushed
the
hunter-dronex-fix
branch
from
September 1, 2026 17:06
22d5891 to
efa8588
Compare
…ored by NPC aggro, and freezing once armed All four symptoms traced to root cause: - Robot.OnBeforeRemovedFromZone and RemoteCommandTranslatorModule both picked the robot's drone controller with FirstOrDefault(x => x is RemoteControllerModule), so a robot fitted with both a Hunter Drone controller and an ordinary drone controller only had one of them closed on dock or recalled via retreat command. Both now iterate every fitted controller. - HunterSelfDestructAI.LeashRange was written as a bare "50" transcribed from the design spec's "50m" leash, but raw position units are x10'd to real meters in this codebase, so the shipped leash was ~500m -- large enough that the repath-on-exceeding-leash condition never bound within the ~8s countdown, freezing the drone in place once armed. Changed to 5. - Both Hunter Drone chassis definitions (def_standard_hunter_drone_pve/pvp) have no faction option set in entitydefaults, so EntityDefaultOptions.Faction silently defaults to Faction.Niani -- the faction the PvE variant is designed to hunt -- causing Niani NPCs to treat them as friendly and skip body-pull aggro. Also missing packedTurretId, so a recalled drone never actually left the zone via Scoop(). Fixed via a new content migration (not applied by this commit -- needs to be run against the database separately), bringing both definitions in line with every other player-deployed drone chassis. Verified: dotnet build (0 errors) and dotnet test src/Perpetuum.Tests (99/99 passing, no regressions). No automated regression test added for the Robot/Module/HunterSelfDestructAI changes -- they sit on the EntityFramework/zone object graph docs/codebase/TESTING.md already documents as untested at the unit tier. Manual/live validation not yet performed; see docs/backlog/issues.md for the checklist. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PLgM4smatUY23uzz24G1qv
Sellafield
force-pushed
the
hunter-dronex-fix
branch
from
September 1, 2026 17:29
efa8588 to
4f5e542
Compare
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.
…ored by NPC aggro, and freezing once armed
All four symptoms traced to root cause:
Robot.OnBeforeRemovedFromZone and RemoteCommandTranslatorModule both picked the robot's drone controller with FirstOrDefault(x => x is RemoteControllerModule), so a robot fitted with both a Hunter Drone controller and an ordinary drone controller only had one of them closed on dock or recalled via retreat command. Both now iterate every fitted controller.
HunterSelfDestructAI.LeashRange was written as a bare "50" transcribed from the design spec's "50m" leash, but raw position units are x10'd to real meters in this codebase, so the shipped leash was ~500m -- large enough that the repath-on-exceeding-leash condition never bound within the ~8s countdown, freezing the drone in place once armed. Changed to 5.
Both Hunter Drone chassis definitions (def_standard_hunter_drone_pve/pvp) have no faction option set in entitydefaults, so EntityDefaultOptions.Faction silently defaults to Faction.Niani -- the faction the PvE variant is designed to hunt -- causing Niani NPCs to treat them as friendly and skip body-pull aggro. Also missing packedTurretId, so a recalled drone never actually left the zone via Scoop(). Fixed via a new content migration (not applied by this commit -- needs to be run against the database separately), bringing both definitions in line with every other player-deployed drone chassis.
Verified: dotnet build (0 errors) and dotnet test src/Perpetuum.Tests (99/99 passing, no regressions). No automated regression test added for the Robot/Module/HunterSelfDestructAI changes -- they sit on the EntityFramework/zone object graph docs/codebase/TESTING.md already documents as untested at the unit tier. Manual/live validation not yet performed; see docs/backlog/issues.md for the checklist.
Claude-Session: https://claude.ai/code/session_01PLgM4smatUY23uzz24G1qv