Class ItemTracker
Inheritance
System.Object
ItemTracker
Assembly: Eco.Gameplay.dll
Syntax
public sealed class ItemTracker : Object
Constructors
ItemTracker()
Declaration
ItemTracker(IEnumerable<ItemStack>, User, Vector3i, LocString, WorldObject)
Declaration
public ItemTracker(IEnumerable<ItemStack> stacks, User user, Vector3i pos, LocString prependText, WorldObject obj = null)
Parameters
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
DescribeOriginal
Declaration
public string DescribeOriginal { get; }
Property Value
| Type |
Description |
| System.String |
|
DescribeOriginalInline
Declaration
public LocString DescribeOriginalInline { get; }
Property Value
DescribeRemaining
Declaration
public string DescribeRemaining { get; }
Property Value
| Type |
Description |
| System.String |
|
DescribeRemainingInline
Declaration
public LocString DescribeRemainingInline { get; }
Property Value
FractionalDescription
Declaration
public string FractionalDescription { get; }
Property Value
| Type |
Description |
| System.String |
|
Position
Declaration
public Vector3i Position { get; set; }
Property Value
PrependText
Declaration
public string PrependText { get; set; }
Property Value
| Type |
Description |
| System.String |
|
RemainingStacks
Declaration
public ThreadSafeList<IStack> RemainingStacks { get; }
Property Value
RememberContributions
Declaration
public bool RememberContributions { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
TargetObject
Declaration
public WorldObjectHandle TargetObject { get; set; }
Property Value
TrackAction
Declaration
public InventoryActionType TrackAction { get; set; }
Property Value
TrackingStacks
Declaration
public ThreadSafeList<IStack> TrackingStacks { get; }
Property Value
Methods
Declaration
public bool ActionPerformed(GameAction action)
Parameters
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
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
Returns
| Type |
Description |
| System.Int32 |
|
Destroy()
Declaration
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
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
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
Returns
UpdateMarks()
Declaration
public void UpdateMarks()
UpdatePrependText(LocString)
Declaration
public void UpdatePrependText(LocString prependText)
Parameters
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