Table of Contents

Class ProductPackagingContentProfileRegistry

Namespace
S1API.Products
Assembly
S1API.dll

Registers process-lifetime packaging-content profiles by product and packaging ID.

public static class ProductPackagingContentProfileRegistry
Inheritance
ProductPackagingContentProfileRegistry
Inherited Members

Remarks

Keys are case-insensitive. Registration does not transmit assets; every participating peer must register matching product definitions and profiles locally.

Methods

Register(string, string, string, ProductPackagingContentProfile)

Registers content for one stable product and packaging pair.

public static ProductPackagingContentProfile Register(string ownerId, string productId, string packagingId, ProductPackagingContentProfile profile)

Parameters

ownerId string

The stable ID of the owning mod.

productId string

The stable, namespaced custom product ID.

packagingId string

The packaging definition ID, such as baggie.

profile ProductPackagingContentProfile

The immutable packaging-content profile.

Returns

ProductPackagingContentProfile

The retained profile.

Exceptions

ArgumentNullException

Thrown when an argument is null.

ArgumentException

Thrown when an ID is empty or productId is not namespaced.

InvalidOperationException

Thrown when the product/packaging pair has a conflicting owner or profile.

RegisterForProductKind(string, string, string, ProductPackagingContentProfile)

Registers packaging content as a fallback for every custom product of one logical kind.

public static ProductPackagingContentProfile RegisterForProductKind(string ownerId, string productKindId, string packagingId, ProductPackagingContentProfile profile)

Parameters

ownerId string
productKindId string
packagingId string
profile ProductPackagingContentProfile

Returns

ProductPackagingContentProfile

Remarks

A product-specific registration still wins. This fallback is useful for generated mixes, whose stable product IDs are allocated by the native mixing lifecycle.