Class CraftingComponent
Inheritance
System.Object
CraftingComponent
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
[RequireComponent]
[RequireComponent]
[RequireComponent]
public class CraftingComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IOperatingWorldObjectComponent, INotifyPropertyChanged, IHasEnvVars, IPersistentData
Constructors
CraftingComponent()
Declaration
public CraftingComponent()
Fields
ActiveWorkOrder
Declaration
public WorkOrder ActiveWorkOrder
Field Value
OnActiveWorkOrderChanged
Declaration
public ThreadSafeAction OnActiveWorkOrderChanged
Field Value
WorldObjectToSkillsUsed
Declaration
public static Dictionary<Type, HashSet<Type>> WorldObjectToSkillsUsed
Field Value
| Type |
Description |
| System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.HashSet<System.Type>> |
|
Properties
AllRecipes
Declaration
public static IEnumerable<RecipeFamily> AllRecipes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<RecipeFamily> |
|
Availability
Declaration
public override WorldObjectComponentClientAvailability Availability { get; }
Property Value
Overrides
BottleNecked
Declaration
public bool BottleNecked { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
CurrentUnfinishedWorkOrder
Declaration
public WorkOrder CurrentUnfinishedWorkOrder { get; }
Property Value
CurrentWorkOrder
Declaration
public WorkOrder CurrentWorkOrder { get; }
Property Value
DecayDescription
Declaration
public virtual LocString DecayDescription { get; }
Property Value
DefaultDurabilityReduction
Declaration
public float DefaultDurabilityReduction { get; }
Property Value
| Type |
Description |
| System.Single |
|
LaborReservationModule
Declaration
public PluginModule LaborReservationModule { get; }
Property Value
Link
Declaration
public LinkComponent Link { get; set; }
Property Value
LinkedInventoryContentChangeEvent
Declaration
public ThreadSafeAction LinkedInventoryContentChangeEvent { get; }
Property Value
Operating
Declaration
public bool Operating { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
OverrideMaxQueuedOrders
Declaration
public Nullable<int> OverrideMaxQueuedOrders { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.Int32> |
|
Recipes
Declaration
public IEnumerable<RecipeFamily> Recipes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<RecipeFamily> |
|
ResourceEfficiencyModule
Declaration
public PluginModule ResourceEfficiencyModule { get; }
Property Value
SpeedEfficiencyModule
Declaration
public PluginModule SpeedEfficiencyModule { get; }
Property Value
TimeLeft
Declaration
public double TimeLeft { get; }
Property Value
| Type |
Description |
| System.Double |
|
TotalCraftTime
Declaration
public ImmutableCountdown TotalCraftTime { get; }
Property Value
ValidTalents
Declaration
public IEnumerable<string> ValidTalents { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.String> |
|
WorkOrders
Declaration
public ControllerList<WorkOrder> WorkOrders { get; }
Property Value
Methods
Add100Labor(Player, InteractionTriggerInfo, InteractionTarget)
Declaration
[Interaction]
public void Add100Labor(Player player, InteractionTriggerInfo trigger, InteractionTarget target)
Parameters
AddAllLabor(Player, InteractionTriggerInfo, InteractionTarget)
Declaration
[Interaction]
public void AddAllLabor(Player player, InteractionTriggerInfo trigger, InteractionTarget target)
Parameters
AddRecipe(Type, RecipeFamily)
Declaration
public static void AddRecipe(Type tableType, RecipeFamily recipeFamily)
Parameters
| Type |
Name |
Description |
| System.Type |
tableType |
|
| RecipeFamily |
recipeFamily |
|
AddTagProduct(Type, Type, Recipe)
Declaration
public static void AddTagProduct(Type tableType, Type recipeType, Recipe product)
Parameters
| Type |
Name |
Description |
| System.Type |
tableType |
|
| System.Type |
recipeType |
|
| Recipe |
product |
|
AddWorkOrderToBench(Player, WorkOrder, BankAccount)
Declaration
public bool AddWorkOrderToBench(Player player, WorkOrder workOrder, BankAccount account)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
AddWorkOrderToBench(User, WorkOrder, BankAccount)
Declaration
public Result AddWorkOrderToBench(User user, WorkOrder workOrder, BankAccount account)
Parameters
Returns
CancelPendingWorkOrder(Player)
Declaration
public void CancelPendingWorkOrder(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
CancelWorkOrder(Player, WorkOrder)
Declaration
public Task CancelWorkOrder(Player player, WorkOrder workOrder)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
ContributeSelectedItem(Player, InteractionTriggerInfo, InteractionTarget)
Contributes carried or selected item to the workorder
Declaration
[Interaction]
public void ContributeSelectedItem(Player player, InteractionTriggerInfo trigger, InteractionTarget target)
Parameters
CreateWorkOrder(Player, Recipe, Int32, BankAccount)
Declaration
public Task<bool> CreateWorkOrder(Player player, Recipe recipe, int quantity, BankAccount account)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
CreateWorkOrderResult(User, Recipe, Int32, BankAccount)
Declaration
public Result CreateWorkOrderResult(User user, Recipe recipe, int quantity, BankAccount account)
Parameters
Returns
CreateWorkOrderResult(User, RecipeFamily, Int32, BankAccount, Boolean)
Declaration
public Result CreateWorkOrderResult(User currentUser, RecipeFamily recipeFamily, int quantity, BankAccount bankAccount, bool automatic)
Parameters
| Type |
Name |
Description |
| User |
currentUser |
|
| RecipeFamily |
recipeFamily |
|
| System.Int32 |
quantity |
|
| BankAccount |
bankAccount |
|
| System.Boolean |
automatic |
|
Returns
Destroy()
Declaration
public override void Destroy()
Overrides
EvictPickup(User, Inventory)
Declaration
public void EvictPickup(User user, Inventory inv)
Parameters
GetBonusAdjustedIngredients(Player, Recipe)
Returns bonus-adjusted ingredient quantities for a recipe at this crafting table. Includes module and talent bonuses so the client can display accurate costs.
Declaration
public float[] GetBonusAdjustedIngredients(Player player, Recipe recipe)
Parameters
Returns
| Type |
Description |
| System.Single[] |
|
GetBonusAdjustedProducts(Player, Recipe)
Returns bonus-adjusted product quantities for a recipe at this crafting table. Includes module and talent yield bonuses so the client can display accurate output.
Declaration
public float[] GetBonusAdjustedProducts(Player player, Recipe recipe)
Parameters
Returns
| Type |
Description |
| System.Single[] |
|
GetConnectedInventories(User, Boolean, Boolean)
gets all valid inventories we can take/put items
Declaration
public InventoryCollection GetConnectedInventories(User user, bool input, bool output)
Parameters
| Type |
Name |
Description |
| User |
user |
|
| System.Boolean |
input |
require take ability from inventories
|
| System.Boolean |
output |
require put ability from inventories
|
Returns
GetSelectedFilter(Player)
Declaration
public string GetSelectedFilter(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
Returns
| Type |
Description |
| System.String |
|
GetValidTalents()
Declaration
public void GetValidTalents()
GetWorkOrder(Guid)
Declaration
public WorkOrder GetWorkOrder(Guid guid)
Parameters
| Type |
Name |
Description |
| System.Guid |
guid |
|
Returns
Initialize()
Declaration
public override void Initialize()
Overrides
ProcessWorkOrders()
Declaration
public WorkOrder ProcessWorkOrders()
Returns
RecipesForItem(Type)
Declaration
public static IEnumerable<RecipeFamily> RecipesForItem(Type itemType)
Parameters
| Type |
Name |
Description |
| System.Type |
itemType |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<RecipeFamily> |
|
RecipesOnWorldObject(Type)
Declaration
public static IEnumerable<RecipeFamily> RecipesOnWorldObject(Type worldObjectType)
Parameters
| Type |
Name |
Description |
| System.Type |
worldObjectType |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<RecipeFamily> |
|
ReducePartDurabilityPerHourOfUse(WorkOrder)
Determines how fast durability reduces, based on work order. By default, looks for a recipe durability override then locks to a default of 30
Declaration
public virtual double ReducePartDurabilityPerHourOfUse(WorkOrder order)
Parameters
Returns
| Type |
Description |
| System.Double |
|
ReorderWorkOrders(Player, List<WorkOrder>)
Declaration
public void ReorderWorkOrders(Player player, List<WorkOrder> sortedWorkOrders)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.Collections.Generic.List<WorkOrder> |
sortedWorkOrders |
|
SetSelectedFilter(Player, String)
Declaration
public void SetSelectedFilter(Player player, string filterKey)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.String |
filterKey |
|
SortRecipes()
Declaration
public static void SortRecipes()
TablesForRecipe(Type)
Declaration
public static IEnumerable<Type> TablesForRecipe(Type recipeType)
Parameters
| Type |
Name |
Description |
| System.Type |
recipeType |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Type> |
|
Tick()
Declaration
public override void Tick()
Overrides
TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
Declaration
public override InventoryMoveResult TryPickup(Player player, InventoryChangeSet playerInvChanges, Inventory targetInventory, bool force)
Parameters
Returns
Overrides
WorkOrderNeedsLabor(User)
Declaration
[EnvVar]
public string WorkOrderNeedsLabor(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
| Type |
Description |
| System.String |
|
WorkOrderNeedsSelectedItems(User)
Declaration
[EnvVar]
public string WorkOrderNeedsSelectedItems(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
| Type |
Description |
| System.String |
|
Explicit Interface Implementations
IPersistentData.PersistentData
Declaration
object IPersistentData.PersistentData { get; set; }
Returns
| Type |
Description |
| System.Object |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods