Table of Contents

Class ProductInstance

Namespace
S1API.Products
Assembly
S1API.dll

Represents one product stack or item in the active game runtime.

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

Remarks

Product instances inherit quantity and base item behavior from ItemInstance. This wrapper adds product definition, quality, packaging, and property access without exposing runtime-specific native types.

Properties

AppliedPackaging

Gets the packaging applied to this instance.

public PackagingDefinition AppliedPackaging { get; }

Property Value

PackagingDefinition

Remarks

Check IsPackaged before reading this property. The native runtime only provides a packaging definition for packaged instances.

Definition

Gets the definition of the product associated with this instance.

public ProductDefinition Definition { get; }

Property Value

ProductDefinition

IsPackaged

Gets whether the instance currently has native packaging.

public bool IsPackaged { get; }

Property Value

bool

Properties

Gets runtime-agnostic wrappers for the properties on Definition.

public IReadOnlyList<PropertyBase> Properties { get; }

Property Value

IReadOnlyList<PropertyBase>

Remarks

Properties belong to the definition, not the individual stack. The returned list is a read-only snapshot from Properties.

Quality

Gets the runtime-agnostic quality level assigned to this instance.

public Quality Quality { get; }

Property Value

Quality

Remarks

This value comes from the native instance. Creating an instance through CreateInstance(int) uses the native standard quality.