Show / Hide Table of Contents

Class ItemTracker

Inheritance
System.Object
ItemTracker
Namespace: Eco.Gameplay.Utils
Assembly: Eco.Gameplay.dll
Syntax
public sealed class ItemTracker : Object

Constructors

ItemTracker()

Declaration
public ItemTracker()

ItemTracker(IEnumerable<ItemStack>, User, Vector3i, LocString, WorldObject)

Declaration
public ItemTracker(IEnumerable<ItemStack> stacks, User user, Vector3i pos, LocString prependText, WorldObject obj = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ItemStack> stacks
User user
Vector3i pos
LocString prependText
WorldObject obj

Properties

AnyLeft

Declaration
public bool AnyLeft { get; }
Property Value
Type Description
System.Boolean

AutocontrolMarker

Declaration
public bool AutocontrolMarker { get; set; }
Property Value
Type Description
System.Boolean

Contents

Declaration
public string Contents { get; }
Property Value
Type Description
System.String

ContributedStacks

Declaration
public ThreadSafeList<IStack> ContributedStacks { get; }
Property Value
Type Description
ThreadSafeList<IStack>

DescribeOriginal

Declaration
public string DescribeOriginal { get; }
Property Value
Type Description
System.String

DescribeOriginalInline

Declaration
public LocString DescribeOriginalInline { get; }
Property Value
Type Description
LocString

DescribeRemaining

Declaration
public string DescribeRemaining { get; }
Property Value
Type Description
System.String

DescribeRemainingInline

Declaration
public LocString DescribeRemainingInline { get; }
Property Value
Type Description
LocString

FractionalDescription

Declaration
public string FractionalDescription { get; }
Property Value
Type Description
System.String

Position

Declaration
public Vector3i Position { get; set; }
Property Value
Type Description
Vector3i

PrependText

Declaration
public string PrependText { get; set; }
Property Value
Type Description
System.String

RemainingStacks

Declaration
public ThreadSafeList<IStack> RemainingStacks { get; }
Property Value
Type Description
ThreadSafeList<IStack>

RememberContributions

Declaration
public bool RememberContributions { get; set; }
Property Value
Type Description
System.Boolean

TargetObject

Declaration
public WorldObjectHandle TargetObject { get; set; }
Property Value
Type Description
WorldObjectHandle

TrackAction

Declaration
public InventoryActionType TrackAction { get; set; }
Property Value
Type Description
InventoryActionType

TrackingStacks

Declaration
public ThreadSafeList<IStack> TrackingStacks { get; }
Property Value
Type Description
ThreadSafeList<IStack>

Methods

ActionPerformed(GameAction)

Declaration
public bool ActionPerformed(GameAction action)
Parameters
Type Name Description
GameAction action
Returns
Type Description
System.Boolean

AddRemainingItems(IEnumerable<ItemStack>)

Declaration
public void AddRemainingItems(IEnumerable<ItemStack> stacks)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ItemStack> stacks

AddToGroupMarker(User)

Declaration
public void AddToGroupMarker(User user)
Parameters
Type Name Description
User user

AddUser(User)

Declaration
public void AddUser(User user)
Parameters
Type Name Description
User user

AddUsers(IEnumerable<User>)

Declaration
public void AddUsers(IEnumerable<User> users)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<User> users

CaptureAction(GameAction)

Declaration
public bool CaptureAction(GameAction action)
Parameters
Type Name Description
GameAction action
Returns
Type Description
System.Boolean

ContributedItem(Int32, Item, WorkOrderContributionType)

Calculate contributed item amount base on contribution type to prevent re-counting when AutoContributed contribution

Declaration
public int ContributedItem(int itemMoved, Item item, WorkOrderContributionType contributionType)
Parameters
Type Name Description
System.Int32 itemMoved
Item item
WorkOrderContributionType contributionType
Returns
Type Description
System.Int32

Destroy()

Declaration
public void Destroy()

LockTracker(IEnumerable<IStack>, User, Vector3i, LocString, WorldObject, Boolean)

Declaration
public void LockTracker(IEnumerable<IStack> stacks, User user, Vector3i pos, LocString prependText, WorldObject obj = null, bool excludeContributed = false)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IStack> stacks
User user
Vector3i pos
LocString prependText
WorldObject obj
System.Boolean excludeContributed

Needed(Item)

Declaration
public int Needed(Item item)
Parameters
Type Name Description
Item item
Returns
Type Description
System.Int32

PercentDone()

Declaration
public float PercentDone()
Returns
Type Description
System.Single

ReduceRemainingStacks<TStack>(ICollection<TStack>)

Reduces remaining stacks using maxRemainingStacks. After this call remaining stacks will only have items from maxRemainingStacks and all quantities will be less or equal to quantities in maxRemainingStacks. If current quantity less than in maxRemainingStacks then it will stay untouched.

Declaration
public bool ReduceRemainingStacks<TStack>(ICollection<TStack> maxRemainingStacks)
    where TStack : IStack
Parameters
Type Name Description
System.Collections.Generic.ICollection<TStack> maxRemainingStacks
Returns
Type Description
System.Boolean

True if any of remaining stacks was modified.

Type Parameters
Name Description
TStack

RemoveFromGroupMarker(User)

Declaration
public void RemoveFromGroupMarker(User user)
Parameters
Type Name Description
User user

RemoveFromGroupMarker(IEnumerable<User>)

Declaration
public void RemoveFromGroupMarker(IEnumerable<User> users)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<User> users

RemoveUser(User)

Declaration
public void RemoveUser(User user)
Parameters
Type Name Description
User user

ResetContributions()

Declaration
public void ResetContributions()

SetStacks(IEnumerable<IStack>, Boolean)

Declaration
public void SetStacks(IEnumerable<IStack> stacks, bool excludeContributed = false)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IStack> stacks
System.Boolean excludeContributed

ShouldOverrideAuth(GameAction)

Declaration
public LazyResult ShouldOverrideAuth(GameAction action)
Parameters
Type Name Description
GameAction action
Returns
Type Description
LazyResult

UpdateMarks()

Declaration
public void UpdateMarks()

UpdatePrependText(LocString)

Declaration
public void UpdatePrependText(LocString prependText)
Parameters
Type Name Description
LocString prependText

Events

OnItemsAdded

Declaration
public event Action<User, Type, int, string> OnItemsAdded
Event Type
Type Description
System.Action<User, System.Type, System.Int32, System.String>

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾