Skip to content

Fix TriggerZoneQuadPoint forwarding heading into the parent's radius slot#435

Merged
rp- merged 1 commit into
pydcs:masterfrom
MacrayBlackhand:fix-quadpoint-radius-arg-order
Jun 11, 2026
Merged

Fix TriggerZoneQuadPoint forwarding heading into the parent's radius slot#435
rp- merged 1 commit into
pydcs:masterfrom
MacrayBlackhand:fix-quadpoint-radius-arg-order

Conversation

@MacrayBlackhand

Copy link
Copy Markdown
Contributor

TriggerZoneQuadPoint.init forwards its arguments to the parent
TriggerZone.init positionally:

super().__init__(_id, position, hidden, name, color, properties, heading, link_unit_id)

Since PR #254 re-added radius as the parent's 7th positional parameter
_id, position, hidden, name, color, properties, radius, heading, link_unit_id),
this call is now misaligned: heading lands in the radius slot, link_unit_id
lands in heading, and link_unit_id is dropped. A quad zone constructed with a
non-default heading serializes "radius": (and "radius": null at
defaults), whereas the DCS Mission Editor writes "radius": 0 for quad zones.

This isn't covered by #251/#243/#254 -- those fixed TriggerZoneCircular's
forwarding when radius was re-exposed but didn't update TriggerZoneQuadPoint,
so the gap went unnoticed. The existing test_create_quad_point_zone never threads
a heading/link_unit_id through the quad path, so it doesn't exercise this.

Fix: forward to the parent by keyword and pass radius=0 (the DCS-canonical value
for quad zones). Keyword forwarding also prevents this class of positional
regression from recurring.

Adds a round-trip test that constructs a quad zone with an explicit heading and
link_unit_id and asserts radius == 0 with both surviving the save/load.

QuadPoint forwarded args to the parent positionally, so an explicit heading
landed in the parent's radius slot (added by PR pydcs#254) and link_unit_id was lost.
Forward by keyword and pass radius=0, the DCS-canonical value for quad zones.
@rp- rp- merged commit ef50a79 into pydcs:master Jun 11, 2026
2 checks passed
@MacrayBlackhand MacrayBlackhand deleted the fix-quadpoint-radius-arg-order branch June 11, 2026 17:46
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