Patch Manager integration
This page documents how V-SwiFT exposes itself to Patch Manager.
Registered Patch Manager Library
On plugin startup, VSwiftPlugin.Awake() registers a Patch Manager library:
Universe.RegisterRawLibrary("VSwift", "mixins", VSWIFT_MIXINS)Patches can then use this to include it:
@use "VSwift:*";Included Mixins
The module ships these mixins:
@mixin ps-pam-override() {
PAMModuleVisualsOverride +: [
{
PartComponentModuleName: PartComponentModule_PartSwitch,
ModuleDisplayName: "VSwift/PartSwitch",
ShowHeader: true,
ShowFooter: false
}
];
}
@mixin part-switch() {
+Module_PartSwitch {
+Data_PartSwitch {
@mixin-slot
}
}
@include ps-pam-override()
}Selectable hierarchy
The runtime selectable tree for Data_PartSwitch is:
Data_PartSwitchPredefinedDynamicNodesone child per
VariantSetone child per
Variantone child per transformer
Symbolic transformer creation
When you add a transformer in a patch, V-SwiFT resolves the name from the transformer's [Transformer(nameof(...))] attribute. That means author-facing names are symbolic, for example:
+MassModifier+EngineModeSwapper+ResourceContainerAdder
Special adapters
Most transformers fall back to generic JSON token editing, but V-SwiFT provides special adapters for:
Data_PartSwitchviaPartSwitchSelectableAttachNodeAdderviaAttachNodeAdderSelectableEngineModeSwapperviaEngineModeTransformerSelectable
Those adapters expose nested child elements such as attach_node and engine_mode, and allow class capture by IDs such as nodeID or engineID.