Class ProductDefinition
Represents a product definition in the game.
public class ProductDefinition : ItemDefinition
- Inheritance
-
ProductDefinition
- Derived
- Inherited Members
- Extension Methods
Properties
BasePrice
The base price associated with this product.
public float BasePrice { get; }
Property Value
DrugType
The primary drug type for this product (convenience property).
public EDrugType DrugType { get; }
Property Value
- EDrugType
DrugTypes
The list of drug types associated with this product definition. Returns a C# list for IL2CPP builds to avoid type mismatches.
public List<DrugTypeContainer> DrugTypes { get; }
Property Value
- List<DrugTypeContainer>
Icon
Gets the in-game icon associated with the product.
public Sprite Icon { get; }
Property Value
- Sprite
MarketValue
The market value associated with this product.
public float MarketValue { get; }
Property Value
Price
The price associated with this product.
public float Price { get; }
Property Value
Properties
The list of product properties for this definition. Returns runtime-agnostic property wrappers that work on both Mono and IL2CPP.
public IReadOnlyList<PropertyBase> Properties { get; }
Property Value
Methods
CreateInstance(int)
Creates an instance of this product in-game.
public override ItemInstance CreateInstance(int quantity = 1)
Parameters
quantityintThe quantity of product.
Returns
- ItemInstance
An instance of the product.
CreatePackagedInstance(int, PackagingDefinition)
Creates a packaged instance of this product with the specified packaging.
public ProductInstance? CreatePackagedInstance(int quantity, PackagingDefinition packaging)
Parameters
quantityintThe quantity of the product.
packagingPackagingDefinitionThe packaging to apply to the product.
Returns
- ProductInstance
A packaged product instance, or null if packaging is not found.