Class StoreCategory
Subgroup of offers at the store. Each group will be showed and handled separated by UI, allowing users to group similar elements as they want.
Inheritance
System.Object
StoreCategory
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class StoreCategory : Object, IHasClientControlledContainers, IClearOnTrade, IOwned, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IRPCAuthChecks
Constructors
StoreCategory()
Declaration
StoreCategory(StoreComponent, Boolean)
Declaration
public StoreCategory(StoreComponent component, bool isBuy)
Parameters
Fields
ChangedEvent
Declaration
public ThreadSafeAction ChangedEvent
Field Value
OffersChangedEvent
Declaration
public readonly ThreadSafeAction OffersChangedEvent
Field Value
StoreComponent
Declaration
public StoreComponent StoreComponent
Field Value
Properties
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
GeneratedName
Declaration
public string GeneratedName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
IsBuy
Declaration
public bool IsBuy { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Name
Declaration
public string Name { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Offers
Declaration
public ControllerList<TradeOffer> Offers { get; set; }
Property Value
Owners
Declaration
public IAlias Owners { get; }
Property Value
Subscriptions
Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Methods
AddCallbacks()
Declaration
public void AddCallbacks()
AddTagTradeOffer(String, Single, Int32, Single, Single, Single, Single)
Adds a single tag-based trade offer. Used for drag and drop of tag offers between categories.
Declaration
public void AddTagTradeOffer(string tagName, float price, int limit, float minDurability, float maxDurability, float minIntegrity, float maxIntegrity)
Parameters
| Type |
Name |
Description |
| System.String |
tagName |
|
| System.Single |
price |
|
| System.Int32 |
limit |
|
| System.Single |
minDurability |
|
| System.Single |
maxDurability |
|
| System.Single |
minIntegrity |
|
| System.Single |
maxIntegrity |
|
AddTradeOffer(Int32, Single)
Declaration
public void AddTradeOffer(int itemId, float price)
Parameters
| Type |
Name |
Description |
| System.Int32 |
itemId |
|
| System.Single |
price |
|
AddTradeOffer(Int32, Single, ByteColor)
Declaration
public void AddTradeOffer(int itemId, float price, ByteColor color)
Parameters
| Type |
Name |
Description |
| System.Int32 |
itemId |
|
| System.Single |
price |
|
| ByteColor |
color |
|
AddTradeOffer(Int32, Single, Single, Single, Int32, Settlement, ByteColor, Single, Single)
Declaration
public void AddTradeOffer(int itemId, float minDurability, float maxDurability, float price, int limit, Settlement settlement, ByteColor color, float minIntegrity, float maxIntegrity)
Parameters
| Type |
Name |
Description |
| System.Int32 |
itemId |
|
| System.Single |
minDurability |
|
| System.Single |
maxDurability |
|
| System.Single |
price |
|
| System.Int32 |
limit |
|
| Settlement |
settlement |
|
| ByteColor |
color |
|
| System.Single |
minIntegrity |
|
| System.Single |
maxIntegrity |
|
GetBestName(List<Int32>, List<String>)
Choose the best title for the category based on the offers.
Declaration
public void GetBestName(List<int> itemIDs, List<string> tagNames)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<System.Int32> |
itemIDs |
|
| System.Collections.Generic.List<System.String> |
tagNames |
|
IsAuthorizedFullAccess(Player)
Declaration
protected bool IsAuthorizedFullAccess(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsRPCAuthorized(IWorldObserver, AccessType, Object[])
Declaration
public bool IsRPCAuthorized(IWorldObserver observer, AccessType requiredAccess, object[] args)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
OnDestroy()
Declaration
RemoveTrade(TradeOffer)
Declaration
public void RemoveTrade(TradeOffer offer)
Parameters
SetMixedTrades(Player, List<Int32>, List<String>)
Updates offers list to match the given item IDs and tag names, preserving the existing order of surviving offers.
Declaration
public bool SetMixedTrades(Player player, List<int> itemIDs, List<string> tagNames)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.Collections.Generic.List<System.Int32> |
itemIDs |
|
| System.Collections.Generic.List<System.String> |
tagNames |
|
Returns
| Type |
Description |
| System.Boolean |
|
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
Description |
| System.ComponentModel.PropertyChangedEventHandler |
|
Explicit Interface Implementations
IOwned.Deed
Declaration
Deed IOwned.Deed { get; }
Returns
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods