Skip to main content

ActionItemHandlerCollection

A internal class in Root.Township, Alta.QuickAccessActions. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Internal: one player's quick access action item handlers, one per action index, made on first use. The client uses one; the server keeps one per player in ActionItemHandlerCollectionMap.

Constructors​

MemberWhat it is
ActionItemHandlerCollection(ActionItemData[] actionItems, Action<int, IPlayer> destroyItem)Creates an ActionItemHandlerCollection from actionItems and destroyItem.

Fields​

1 private and internal field
MemberWhat it is
private ActionItemHandler[] localPlayerActionItemsBacking field for LocalPlayerActionItems.

Properties​

1 private and internal property
MemberWhat it is
private ActionItemHandler[] LocalPlayerActionItems { get; }Handler array, created on first access.

Methods​

MemberWhat it is
ActionItemHandler GetHandlerForActionIndex(IPlayer player, int index)Returns the handler for a valid action index, or null.
bool IsSpawnedFor(IPlayer player, int index)Whether the item for that index has a handler and is active. Ignores the player.
void RemovePlayer(IPlayer player)Disposes every handler. Throws if no handler was ever made, as the array is still null.
1 private and internal method
MemberWhat it is
private ActionItemHandler GetHandler(IPlayer player, int index)Returns the handler for an index, creating it the first time.

Used in​

Members of other types that take, return or hold a ActionItemHandlerCollection: