VRage.Game.ModAPI
IMyStoreItem
Assembly: VRage.Game.dll
public interface IMyStoreItem
Events
| Member | Description |
|---|---|
| OnCancel | When owner of store block cancels order/offer regarding this item |
| OnTransaction | When player makes an transaction regarding this item int - amount sold int - amount remaining int - price of transaction long - owner of block long - buyer/seller |
Properties
| Member | Description |
|---|---|
| Amount | The amount of the item that is available for purchase in the store |
| Id | The entity id of the store item |
| IsActive | Determines if Amount is greater than 0 |
| IsCustomStoreItem | Determines if the item should behave similar to how store items in Vanilla Economy Stations work (eg: doesn't require physical inventory). This is required when adding Gas / Grid items to a store. |
| Item | Definition Id of the item |
| ItemType | The type of item. eg: PhysicalItem, Grid, etc |
| PrefabName | The name of the Prefab Definition SubtypeId if the item is a Grid |
| PrefabTotalPcu | The PCU value of a Grid item |
| PreviousPricePerUnit | The previous price of the item. Used to calculate price trend. |
| PricePerUnit | The individual cost of a single item. |
| PricePerUnitDiscount | This governs the tooltip that appears when you hover your cursor over the price in the store (eg: 0.5 for 50% discount). This doesn't actually affect the price, use Amount to adjust that. |
| RemovedAmount | The amount that has been removed from the item through purchases (ie: Purchased Amount) |
| StoreItemType | Defines whether the item is an Offer (store is selling to you) or an Order (store is buying from you) |