ResourceContainerRemover

ResourceContainerRemover removes named resources from the part's container set for a variant.

Purpose

Use this transformer when a variant should strip resources from a base part, such as turning a wet tank into a dry structural shell or removing one propellant from a multi-resource layout.

Type

Source-backed runtime type: VSwift.Modules.Transformers.ResourceContainerRemover

Fields

  • Containers: List<string>

  • Each string is a resource name, not a container ID

Behavior

  • ApplyCommon: no effect

  • ApplyInOab: rebuilds the OAB part's resource-container array, filtering out resource definitions whose names match the entries in Containers, then reinitializes Module_ResourceCapacities

  • ApplyInFlight: no effect

State handling

  • Reverter: yes, via ResourceContainerReverter.Instance

  • Saves information: yes, through ResourceContainerRemoveLoader

  • Visualizes information: no

Example

Transformers: [
  {
    Name: "ResourceContainerRemover",
    Containers: ["Oxidizer", "MonoPropellant"]
  }
]

Caveats

  • Removal is based on resource names resolved through the game's resource database.

  • Like ResourceContainerAdder, this transformer rebuilds the resource-capacity module after editing containers.

  • It removes matching resources from every container on the part, so use it carefully on parts with multiple resource definitions.

Related