Table of Contents

Class ProductConsumptionProfileRegistry

Namespace
S1API.Products
Assembly
S1API.dll

Registers process-lifetime intrinsic consumption profiles for custom products.

public static class ProductConsumptionProfileRegistry
Inheritance
ProductConsumptionProfileRegistry
Inherited Members

Remarks

Product IDs and product-kind IDs are case-insensitive. A product-specific profile takes deterministic precedence over a product-kind profile. Register matching providers on every multiplayer peer before custom-product manifest validation begins.

Methods

RegisterForProduct(string, ProductConsumptionProfile)

Registers a profile for one stable custom product ID.

public static ProductConsumptionProfile RegisterForProduct(string productId, ProductConsumptionProfile profile)

Parameters

productId string

The stable, namespaced product ID.

profile ProductConsumptionProfile

The immutable consumption profile.

Returns

ProductConsumptionProfile

The registered profile, or the existing profile on an idempotent call.

RegisterForProductKind(ProductKind, ProductConsumptionProfile)

Registers a profile for every registered custom product of one logical product kind.

public static ProductConsumptionProfile RegisterForProductKind(ProductKind productKind, ProductConsumptionProfile profile)

Parameters

productKind ProductKind

The immutable logical product kind.

profile ProductConsumptionProfile

The immutable consumption profile.

Returns

ProductConsumptionProfile

The registered profile, or the existing profile on an idempotent call.