Table of Contents

Class ProductMixingOutput

Namespace
S1API.Products
Assembly
S1API.dll

Supplies deterministic, runtime-independent input to a custom mixing-output factory.

public sealed class ProductMixingOutput
Inheritance
ProductMixingOutput
Inherited Members
Extension Methods

Properties

MixName

Gets the player-selected display name for the output.

public string MixName { get; }

Property Value

string

OutputId

Gets the stable ID allocated by the native mixing flow.

public string OutputId { get; }

Property Value

string

Properties

Gets the effects the generated output will carry, in native order, after the native mixing calculation and any registered mixing reactions.

public IReadOnlyList<ProductMixingEffect> Properties { get; }

Property Value

IReadOnlyList<ProductMixingEffect>

Remarks

Empty when the input was not produced by the native mixing flow.

SourceKind

Gets the source logical product kind.

public ProductKind SourceKind { get; }

Property Value

ProductKind

SourcePrice

Gets the source product's current base price.

public float SourcePrice { get; }

Property Value

float

Remarks

For a source that is itself a generated mix, this is the price its output factory returned, so adding to it compounds across repeated mixes.

SourceProductId

Gets the source custom-product ID.

public string SourceProductId { get; }

Property Value

string

Methods

CalculateNativeValue(float)

Calculates a value for the output's Properties using the native product-value calculation, the same one that prices native mixes.

public float CalculateNativeValue(float baseValue)

Parameters

baseValue float

The finite base value the effects are applied to.

Returns

float

The native value of a product with these effects and base value.

Remarks

Native mixes are priced from their product family's fixed base price, not from the source product's price. Pass your kind's fixed base price to match that behavior. The result is not clamped; ProductMixingOutputDefinition accepts prices from 1 through 999.

Exceptions

ArgumentOutOfRangeException

Thrown when baseValue is NaN or infinite.

InvalidOperationException

Thrown when the input was not produced by the native mixing flow.