Show / Hide Table of Contents

Class WorkOrder

An item that represents a work order being performed at a crafting table.

Inheritance
System.Object
SimpleEntry
WorkOrder
Implements
ILinkableParameterized<System.Boolean>
ILinkableParameterized<SimpleEntry.NamingOptions>
ILinkable
IValidity
ICachesValidity
System.ComponentModel.INotifyPropertyChanged
IDescribable
ISuffixName
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasID
IController
IViewController
IHasUniversalID
INamed
IReInitializable
IHasReferenceableSerializableID
IHasSerializableID
ISharedWorkOrder
IHasPosition
Inherited Members
SimpleEntry.Description()
SimpleEntry.PostLoad()
SimpleEntry.CreatorText(Player)
SimpleEntry.SaveInRegistrar()
SimpleEntry.UILinkContent(SimpleEntry.NamingOptions)
SimpleEntry.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
SimpleEntry.ReInitialize()
SimpleEntry.MarkDirty()
SimpleEntry.UserDescription
SimpleEntry.Name
SimpleEntry.Creator
SimpleEntry.NameSuffix
SimpleEntry.CreationTime
SimpleEntry.CachedValidity
SimpleEntry.IsDestroyed
SimpleEntry.OnValidityChanged
SimpleEntry.Initialized
SimpleEntry.MarkedUpName
SimpleEntry.Id
SimpleEntry.IconName
SimpleEntry.Registrar
SimpleEntry.WorldTimeSinceCreation
SimpleEntry.CanBeDeleted
SimpleEntry.TextName
SimpleEntry.Scannable
SimpleEntry.Style
SimpleEntry.ControllerID
SimpleEntry.TrueResult
SimpleEntry.Subscriptions
SimpleEntry.PropertyChanged
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public class WorkOrder : SimpleEntry, ILinkableParameterized<bool>, ILinkableParameterized<SimpleEntry.NamingOptions>, ILinkable, IValidity, ICachesValidity, INotifyPropertyChanged, IDescribable, ISuffixName, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasID, IController, IViewController, IHasUniversalID, INamed, IReInitializable, IHasReferenceableSerializableID, IHasSerializableID, ISharedWorkOrder, IHasPosition

Constructors

WorkOrder()

Declaration
protected WorkOrder()

WorkOrder(User, Inventory, RecipeFamily, Int32, CraftingComponent)

Declaration
public WorkOrder(User creator, Inventory inventory, RecipeFamily recipe, int quantity, CraftingComponent parent)
Parameters
Type Name Description
User creator
Inventory inventory
RecipeFamily recipe
System.Int32 quantity
CraftingComponent parent

Fields

AddedIngredients

Declaration
public ThreadSafeList<FractionalItemStack> AddedIngredients
Field Value
Type Description
ThreadSafeList<FractionalItemStack>

CancelledWorkOrderEvent

Declaration
public static ThreadSafeAction<WorkOrder> CancelledWorkOrderEvent
Field Value
Type Description
ThreadSafeAction<WorkOrder>

MarkerVisibilityDistance

Declaration
public const float MarkerVisibilityDistance = 5F
Field Value
Type Description
System.Single

OnCollected

Declaration
public ThreadSafeAction OnCollected
Field Value
Type Description
ThreadSafeAction

StartedWorkOrderEvent

Declaration
public static ThreadSafeAction<WorkOrder> StartedWorkOrderEvent
Field Value
Type Description
ThreadSafeAction<WorkOrder>

Properties

AllowAutoselect

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

AllowedLabor

Declaration
public float AllowedLabor { get; }
Property Value
Type Description
System.Single

AllProducts

Declaration
public List<Recipe> AllProducts { get; }
Property Value
Type Description
System.Collections.Generic.List<Recipe>

AutoselectProduct

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

AvailableLabor

Declaration
public float AvailableLabor { get; }
Property Value
Type Description
System.Single

Blocked

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

BlockedForAwhile

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

BlockingType

Declaration
public CraftingBlockingType BlockingType { get; set; }
Property Value
Type Description
CraftingBlockingType

Byproduct

Declaration
public Item Byproduct { get; }
Property Value
Type Description
Item

CompletedProducts

Declaration
public ThreadSafeList<ItemStack> CompletedProducts { get; set; }
Property Value
Type Description
ThreadSafeList<ItemStack>

CompletedQuantity

Declaration
public int CompletedQuantity { get; }
Property Value
Type Description
System.Int32

ContributedCraftTime

Declaration
public ImmutableCountdown ContributedCraftTime { get; }
Property Value
Type Description
ImmutableCountdown

CraftingComponent

Declaration
public CraftingComponent CraftingComponent { get; }
Property Value
Type Description
CraftingComponent

CraftingFees

Declaration
public CraftingFees CraftingFees { get; set; }
Property Value
Type Description
CraftingFees

CraftingScrap

Declaration
public ThreadSafeList<FractionalItemStack> CraftingScrap { get; }
Property Value
Type Description
ThreadSafeList<FractionalItemStack>

CraftTime

Declaration
public float CraftTime { get; }
Property Value
Type Description
System.Single

CurrentIteration

Declaration
public int CurrentIteration { get; }
Property Value
Type Description
System.Int32

CurrentProductName

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

CurrentRecipe

Declaration
public Recipe CurrentRecipe { get; }
Property Value
Type Description
Recipe

DefaultInputInventory

Declaration
public InventoryCollection DefaultInputInventory { get; }
Property Value
Type Description
InventoryCollection

DefaultInventory

Declaration
public InventoryCollection DefaultInventory { get; }
Property Value
Type Description
InventoryCollection

DefaultOutputInventory

Declaration
public InventoryCollection DefaultOutputInventory { get; }
Property Value
Type Description
InventoryCollection

DescribeNeededSkills

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

DisplayName

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

Finished

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

Guid

Declaration
public Guid Guid { get; }
Property Value
Type Description
System.Guid

KnowledgeShare

Declaration
public ControllerHashSet<User> KnowledgeShare { get; set; }
Property Value
Type Description
ControllerHashSet<User>

LaborAndResourcePercentDoneForIteration

Declaration
public float LaborAndResourcePercentDoneForIteration { get; }
Property Value
Type Description
System.Single

LaborAndResourcePercentDoneTotal

Declaration
public float LaborAndResourcePercentDoneTotal { get; }
Property Value
Type Description
System.Single

LaborFullCost

Declaration
public float LaborFullCost { get; }
Property Value
Type Description
System.Single

LaborOnCurrentIteration

Declaration
public float LaborOnCurrentIteration { get; }
Property Value
Type Description
System.Single

LaborPercentage

Declaration
public float LaborPercentage { get; }
Property Value
Type Description
System.Single

LaborPerformed

Declaration
public float LaborPerformed { get; }
Property Value
Type Description
System.Single

LaborPerIteration

Declaration
public float LaborPerIteration { get; }
Property Value
Type Description
System.Single

LaborReservationMultiplier

Declaration
public float LaborReservationMultiplier { get; }
Property Value
Type Description
System.Single

LatestContribution

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

MissingIngredients

Declaration
public ControllerList<TagStack> MissingIngredients { get; }
Property Value
Type Description
ControllerList<TagStack>

NeededTags

Declaration
public TagStack[] NeededTags { get; }
Property Value
Type Description
TagStack[]

NeedsLiquid

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

OriginalQuantity

Declaration
public int OriginalQuantity { get; }
Property Value
Type Description
System.Int32

Owner

Declaration
public User Owner { get; }
Property Value
Type Description
User

Position

Declaration
public Vector3 Position { get; }
Property Value
Type Description
System.Numerics.Vector3

Product

Declaration
public Item Product { get; }
Property Value
Type Description
Item

Recipe

Declaration
public RecipeFamily Recipe { get; }
Property Value
Type Description
RecipeFamily

RecipeFriendlyName

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

RecipeName

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

ResourcePercentage

Declaration
public float ResourcePercentage { get; }
Property Value
Type Description
System.Single

State

Declaration
public WorkOrderState State { get; }
Property Value
Type Description
WorkOrderState

TimeLeft

Declaration
public double TimeLeft { get; }
Property Value
Type Description
System.Double

TimeOnCurrentIteration

Declaration
public double TimeOnCurrentIteration { get; }
Property Value
Type Description
System.Double

TotalContributedLabor

Declaration
public float TotalContributedLabor { get; }
Property Value
Type Description
System.Single

TotalTime

Declaration
public double TotalTime { get; }
Property Value
Type Description
System.Double

TotalTimeSpent

Declaration
public int TotalTimeSpent { get; }
Property Value
Type Description
System.Int32

UncraftedQuantity

Declaration
public int UncraftedQuantity { get; }
Property Value
Type Description
System.Int32

ValidProducts

Declaration
public List<string> ValidProducts { get; set; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

WatchingUsers

Declaration
public ControllerHashSet<User> WatchingUsers { get; set; }
Property Value
Type Description
ControllerHashSet<User>

WorkParty

Declaration
public WorkParty WorkParty { get; set; }
Property Value
Type Description
WorkParty

WorldObject

Declaration
public WorldObject WorldObject { get; }
Property Value
Type Description
WorldObject

Methods

AddIngredientsToCurrentIteration(Player, ItemStack, Int32)

Declaration
public int AddIngredientsToCurrentIteration(Player player, ItemStack stack, int maxToContribute = 2147483647)
Parameters
Type Name Description
Player player
ItemStack stack
System.Int32 maxToContribute
Returns
Type Description
System.Int32

AddIngredientsToCurrentIteration(User, ItemStack, Int32)

Declaration
public int AddIngredientsToCurrentIteration(User user, ItemStack stack, int maxToContribute = 2147483647)
Parameters
Type Name Description
User user
ItemStack stack
System.Int32 maxToContribute
Returns
Type Description
System.Int32

AnyNeededInCurentIteration(ItemStack)

Declaration
public bool AnyNeededInCurentIteration(ItemStack item)
Parameters
Type Name Description
ItemStack item
Returns
Type Description
System.Boolean

BlockReason()

Declaration
public LocString BlockReason()
Returns
Type Description
LocString

Cancel(Player)

Declaration
public void Cancel(Player player)
Parameters
Type Name Description
Player player

ConsumeLiquid(Type, Int32)

Declaration
public int ConsumeLiquid(Type itemType, int amount)
Parameters
Type Name Description
System.Type itemType
System.Int32 amount
Returns
Type Description
System.Int32

ContributedLabor(User)

Declaration
public bool ContributedLabor(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Boolean

DescribeLabor(Single)

Declaration
public LocString DescribeLabor(float labor)
Parameters
Type Name Description
System.Single labor
Returns
Type Description
LocString

Destroyed()

Declaration
public override void Destroyed()
Overrides
SimpleEntry.Destroyed()

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

GetBottleneckType()

Declaration
public WorkOrder.BottleneckType GetBottleneckType()
Returns
Type Description
WorkOrder.BottleneckType

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

GetMaxIterationsForLaborReservation()

Returns max iterations for which labor may be reserved. For short crafts (less than Eco.Gameplay.Items.WorkOrder.CraftTimePerLaborReservationUnit) it will have more iterations per LaborReservationMultiplier unit. For long crafts (greater than or equal to Eco.Gameplay.Items.WorkOrder.CraftTimePerLaborReservationUnit) it will have one iteration per LaborReservationMultiplier unit.

Declaration
public int GetMaxIterationsForLaborReservation()
Returns
Type Description
System.Int32

GetMaxLaborReservation()

Returns max labor reservation.

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

IngredientsRemaningInAllIterations()

Declaration
public IEnumerable<IStack> IngredientsRemaningInAllIterations()
Returns
Type Description
System.Collections.Generic.IEnumerable<IStack>

Initialize()

Declaration
public override void Initialize()
Overrides
SimpleEntry.Initialize()

IsOwner(Player)

Declaration
public bool IsOwner(Player player)
Parameters
Type Name Description
Player player
Returns
Type Description
System.Boolean

NeededCount(ItemRepresentation, WorkOrder.IterationDesc)

Declaration
public int NeededCount(ItemRepresentation item, WorkOrder.IterationDesc check)
Parameters
Type Name Description
ItemRepresentation item
WorkOrder.IterationDesc check
Returns
Type Description
System.Int32

Needs(Item)

Return true if this or a future iteration needs the given item.

Declaration
public bool Needs(Item item)
Parameters
Type Name Description
Item item
Returns
Type Description
System.Boolean

OnInventoryChanged(User, CraftingComponent)

Declaration
public void OnInventoryChanged(User actor, CraftingComponent craftingComponent)
Parameters
Type Name Description
User actor
CraftingComponent craftingComponent

OnLinkedInventoryChange()

Declaration
public void OnLinkedInventoryChange()

OnRemovingDueVerifyFailed()

Declaration
public void OnRemovingDueVerifyFailed()

OwnershipTooltip(Boolean, Boolean)

Declaration
public LocString OwnershipTooltip(bool userIsOwner, bool userHasFullAccess)
Parameters
Type Name Description
System.Boolean userIsOwner
System.Boolean userHasFullAccess
Returns
Type Description
LocString

ParentDisabled()

Declaration
public void ParentDisabled()

PossibleLaborContributeAmount(User, Single, Boolean, out Single)

Declaration
public ValResult<float> PossibleLaborContributeAmount(User user, float contributionMultiplier, bool checkCalAndIngredients, out float requiredCalories)
Parameters
Type Name Description
User user
System.Single contributionMultiplier
System.Boolean checkCalAndIngredients
System.Single requiredCalories
Returns
Type Description
ValResult<System.Single>

RemoveUncrafted()

Declaration
public void RemoveUncrafted()

ScanInventoryAndContribute(User, Inventory, WorkOrderContributionType)

Declaration
public Result ScanInventoryAndContribute(User actor, Inventory inventory, WorkOrderContributionType contributionType)
Parameters
Type Name Description
User actor
Inventory inventory
WorkOrderContributionType contributionType
Returns
Type Description
Result

SendNotification(LocString, Boolean)

Declaration
public void SendNotification(LocString text, bool temporary = false)
Parameters
Type Name Description
LocString text
System.Boolean temporary

SetCurrentProduct(Recipe)

Declaration
public void SetCurrentProduct(Recipe recipe)
Parameters
Type Name Description
Recipe recipe

Start(Inventory)

Declaration
public void Start(Inventory inventory)
Parameters
Type Name Description
Inventory inventory

StartRecipe(Player, Recipe, BankAccount)

Declaration
public void StartRecipe(Player player, Recipe recipe, BankAccount bankAccount)
Parameters
Type Name Description
Player player
Recipe recipe
BankAccount bankAccount

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
SimpleEntry.ToString()

TryToCollectItems(Player)

Declaration
public void TryToCollectItems(Player collector)
Parameters
Type Name Description
Player collector

TryToContributeLabor(Player, InteractionModifier)

Declaration
public bool TryToContributeLabor(Player player, InteractionModifier modifier)
Parameters
Type Name Description
Player player
InteractionModifier modifier
Returns
Type Description
System.Boolean

TryToContributeLabor(User, Single)

Declaration
public Result TryToContributeLabor(User user, float contributionMultiplier = 1F)
Parameters
Type Name Description
User user
System.Single contributionMultiplier
Returns
Type Description
Result

UILinkContent()

Declaration
public override LocString UILinkContent()
Returns
Type Description
LocString
Overrides
SimpleEntry.UILinkContent()

UILinkContent(Boolean)

Declaration
public override LocString UILinkContent(bool iconsOnly)
Parameters
Type Name Description
System.Boolean iconsOnly
Returns
Type Description
LocString
Overrides
SimpleEntry.UILinkContent(Boolean)

UpdateProduct()

Declaration
public void UpdateProduct()

Verify()

Declaration
public Result Verify()
Returns
Type Description
Result

Implements

ILinkableParameterized<T>
ILinkableParameterized<T>
ILinkable
IValidity
ICachesValidity
System.ComponentModel.INotifyPropertyChanged
IDescribable
ISuffixName
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasID
IController
IViewController
IHasUniversalID
INamed
IReInitializable
IHasReferenceableSerializableID
IHasSerializableID
ISharedWorkOrder
IHasPosition

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
CraftingComponentTooltipLibrary.OwnershipTooltip(WorkOrder, User)
MiscTooltipLibrary.SimpleEntryTooltip(SimpleEntry, User)
MiscTooltipLibrary.SimpleEntryTitle(SimpleEntry)
WorkOrderTooltipLibrary.WorkOrderTooltipTitle(WorkOrder)
WorkOrderTooltipLibrary.WorkOrderCreator(WorkOrder)
WorkOrderTooltipLibrary.WorkOrderOwner(WorkOrder)
WorkOrderTooltipLibrary.WorkOrderCurrentRepetition(WorkOrder)
WorkOrderTooltipLibrary.WorkOrderRemainigRepetition(WorkOrder)
WorkOrderTooltipLibrary.WorkOrderKnowledgeShared(WorkOrder)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾