Class ProductMixingProfileBuilder
Builds and registers an opt-in mixing profile for one logical product kind.
public sealed class ProductMixingProfileBuilder
- Inheritance
-
ProductMixingProfileBuilder
- Inherited Members
- Extension Methods
Constructors
ProductMixingProfileBuilder(ProductKind)
Creates a mixing-profile builder for a registered logical product kind.
public ProductMixingProfileBuilder(ProductKind productKind)
Parameters
productKindProductKindThe stable logical kind that opts into mixing.
Exceptions
- ArgumentNullException
Thrown when
productKindis null.
Methods
Build()
Builds and registers this immutable mixing profile.
public ProductMixingProfile Build()
Returns
- ProductMixingProfile
The registered profile, or the existing equivalent profile.
Exceptions
- InvalidOperationException
Thrown when no output factory was configured.
WithMixerMap(ProductMixingMap)
Sets the native mixer-map execution strategy.
public ProductMixingProfileBuilder WithMixerMap(ProductMixingMap mixerMap)
Parameters
mixerMapProductMixingMap
Returns
Remarks
This does not alter the logical product kind or require it to have a matching vanilla drug type. The selected map is only the explicit native seam used while mixing.
WithOutputFactory(Func<ProductMixingOutput, ProductMixingOutputDefinition>)
Sets the deterministic factory that names, prices, and optionally transforms generated outputs.
public ProductMixingProfileBuilder WithOutputFactory(Func<ProductMixingOutput, ProductMixingOutputDefinition> outputFactory)
Parameters
outputFactoryFunc<ProductMixingOutput, ProductMixingOutputDefinition>A deterministic factory invoked for each native mixing output.
Returns
- ProductMixingProfileBuilder
This builder.
Exceptions
- ArgumentNullException
Thrown when
outputFactoryis null.
WithOutputFactoryCompatibility(string, int)
Sets the stable compatibility identity for the configured output factory.
public ProductMixingProfileBuilder WithOutputFactoryCompatibility(string identity, int version)
Parameters
Returns
Remarks
Register the same identity and version on every peer. This identity is included in the multiplayer manifest so different output behavior is rejected before a mix can diverge.
WithPropertyColorMixing()
Colors each generated output from its mixed properties using the selected native mixer map's primary-color strategy.
public ProductMixingProfileBuilder WithPropertyColorMixing()
Returns
Remarks
This is opt-in. It affects only generated mixes and does not recolor the base custom product. The resulting color is persisted with the generated product so save reloads and peers render the same appearance.