Skip to content

ISSUE-042: fix Hunter Drones not exploding on dock, unrecallable, ign… - #60

Open
Sellafield wants to merge 1 commit into
developfrom
hunter-dronex-fix
Open

ISSUE-042: fix Hunter Drones not exploding on dock, unrecallable, ign…#60
Sellafield wants to merge 1 commit into
developfrom
hunter-dronex-fix

Conversation

@Sellafield

Copy link
Copy Markdown
Contributor

…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

…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
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