# AttachNodeAdder

`AttachNodeAdder` adds new dynamic attach nodes, or updates an existing node with the same `nodeID`, for a single V-SwiFT variant.

## Purpose

Use this transformer when a variant needs a different attachment point layout without replacing the whole part definition. It is especially useful for optional mounts, alternate top nodes, or B9-style geometry variants that expose extra stack nodes.

## Type

Source-backed runtime type: `VSwift.Modules.Transformers.AttachNodeAdder`

## Fields

* `Nodes`: `List<AttachNodeDefinition>`
* Each node definition is expected to provide `nodeID`, `size`, `position`, and `orientation`

## Behavior

* `ApplyCommon`: no effect
* `ApplyInOab`: for each entry in `Nodes`, V-SwiFT looks for an existing node with the same tag. If it finds one, it updates that node's local position and size. If it does not, it creates a new dynamic stack node.
* `ApplyInFlight`: no effect

## State handling

* Reverter: yes, via a dynamic attach-node reverter scoped to the added node IDs
* Saves information: no
* Visualizes information: no

## Example

This is a minimal fragment with the real V-SwiFT field names. The exact vector/object literal form follows normal Patch Manager object syntax.

```patch
@use "VSwift:*"

@parts {
  #my_adapter_part {
    @include part-switch() {
      VariantSets +: [{
        VariantSetId: "mount",
        VariantSetLocalizationKey: "MyMod/VSwift/Mount",
        Variants: [{
          VariantId: "radial",
          VariantLocalizationKey: "MyMod/VSwift/Radial",
          Transformers: [{
            Name: "AttachNodeAdder",
            Nodes: [{
              nodeID: "radialMount",
              size: 1,
              position: { x: 0, y: 0.35, z: 0 },
              orientation: { x: 0, y: 1, z: 0 }
            }]
          }]
        }]
      }];
    }
  }
}
```

## Caveats

* This transformer only affects OAB-time part setup. It does not apply changes during flight.
* Existing nodes are matched by `nodeID`, so duplicate IDs will be treated as updates rather than separate nodes.
* For moving stock nodes without creating dynamic ones, use `AttachNodeMover` instead.

## Related

* [Getting started](https://docs.ksp2redux.org/doc/getting-started-LQvsb8EpPG)
* [Patch Manager integration](https://docs.ksp2redux.org/doc/patch-manager-integration-gBAA7yXoEM)
* [Mixins](https://docs.ksp2redux.org/doc/mixins-4Su5OeYkDO)