Table of Contents

Class ProductInstance

Namespace
S1API.Products
Assembly
S1API.dll

Represents an instance of a product in the game.

public class ProductInstance : ItemInstance
Inheritance
ProductInstance
Derived
Inherited Members
Extension Methods

Remarks

This class defines specific properties and behaviors for a product instance, such as quality, packaging, and definition, derived from the S1API's item instance structure.

Properties

AppliedPackaging

Provides access to the packaging information applied to the product, represented as a specific packaging definition instance.

public PackagingDefinition AppliedPackaging { get; }

Property Value

PackagingDefinition

Definition

Gets the definition of the product associated with this instance.

public ProductDefinition Definition { get; }

Property Value

ProductDefinition

IsPackaged

Indicates whether the product instance has applied packaging.

public bool IsPackaged { get; }

Property Value

bool

Properties

Gets the list of properties associated with the product definition.

public IReadOnlyList<PropertyBase> Properties { get; }

Property Value

IReadOnlyList<PropertyBase>

Remarks

This property provides an unmodifiable list of properties associated with the underlying product definition. Each property represents a specific characteristic or behavior of the corresponding product.

Quality

Represents the quality level of the product instance.

public Quality Quality { get; }

Property Value

Quality

Remarks

Quality levels provide a measure of the product's grading, ranging from "Trash" to "Heavenly".