Class ProductConsumptionContext
Describes one intrinsic consumption lifecycle transition for a registered custom product.
public sealed class ProductConsumptionContext
- Inheritance
-
ProductConsumptionContext
- Inherited Members
- Extension Methods
Remarks
Player callbacks are invoked only for the local player. NPC callbacks can receive an unavailable NPC wrapper for game-owned NPCs; use TargetId when behavior only needs the stable native target identifier.
Properties
Definition
Gets the registered custom product definition.
public CustomProductDefinition Definition { get; }
Property Value
IsLocalPlayer
Gets whether this transition targets the local player.
public bool IsLocalPlayer { get; }
Property Value
NPC
Gets the S1API NPC wrapper when one is available, or null for a game-owned NPC without an S1API wrapper.
public NPC? NPC { get; }
Property Value
Player
Gets the local player for player callbacks, or null for NPC callbacks.
public Player? Player { get; }
Property Value
Product
Gets the consumed product instance.
public ProductInstance Product { get; }
Property Value
ProductId
Gets the stable product identifier.
public string ProductId { get; }
Property Value
ProductKind
Gets the logical product kind retained by generated mixed products.
public ProductKind ProductKind { get; }
Property Value
Properties
Gets the ordinary product properties applied alongside this profile.
public IReadOnlyList<PropertyBase> Properties { get; }
Property Value
Quality
Gets the consumed product quality.
public Quality Quality { get; }
Property Value
TargetId
Gets the stable native target identifier: a player code for players or the NPC ID for NPCs.
public string TargetId { get; }