Show / Hide Table of Contents

Class RecipeFamily

Inheritance
System.Object
RecipeFamily
Implements
IController
IViewController
IHasUniversalID
ILinkable
Namespace: Eco.Gameplay.Items.Recipes
Assembly: Eco.Gameplay.dll
Syntax
public abstract class RecipeFamily : Object, IController, IViewController, IHasUniversalID, ILinkable

Constructors

RecipeFamily()

Declaration
protected RecipeFamily()

Fields

ExperienceOnCraft

Declaration
public float ExperienceOnCraft
Field Value
Type Description
System.Single

Properties

ControllerID

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

CraftableDefault

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

CraftingTable

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

CraftMinutes

Declaration
public IDynamicValue CraftMinutes { get; protected set; }
Property Value
Type Description
IDynamicValue

DefaultRecipe

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

DisplayName

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

Ingredients

Declaration
public IngredientElement[] Ingredients { get; }
Property Value
Type Description
IngredientElement[]

IsDiscovered

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

Labor

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

LaborInCalories

Declaration
public IDynamicValue LaborInCalories { get; set; }
Property Value
Type Description
IDynamicValue

MarkedUpName

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

OverrideDurabilityUsedOnCraftingTablePerHour

Can set a specific durability cost on recipes that overrides the table defaults.

Declaration
public virtual Nullable<float> OverrideDurabilityUsedOnCraftingTablePerHour { get; }
Property Value
Type Description
System.Nullable<System.Single>

Product

Declaration
public CraftingElement[] Product { get; }
Property Value
Type Description
CraftingElement[]

RecipeItems

Declaration
public IEnumerable<Type> RecipeItems { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.Type>

RecipeName

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

Recipes

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

RequiredModules

Declaration
public RequiresModuleAttribute[] RequiredModules { get; protected set; }
Property Value
Type Description
RequiresModuleAttribute[]

RequiredSkills

Declaration
public RequiresSkillAttribute[] RequiredSkills { get; protected set; }
Property Value
Type Description
RequiresSkillAttribute[]

RequiredTalentName

Display name of the talent group that unlocks this recipe, with UILink for tooltip. Lazy-computed on first access from BonusManager.

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

RequiresTalentUnlock

When true, requires a talent-based CraftUnlock bonus to be craftable. Recipes without this flag are always craftable.

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

UnlockingTalentStrings

Talent type names that can unlock this recipe. Lazy-computed on first access from BonusManager.

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

Methods

Accepts(Item)

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

CanCraftNotify(User, RoomStats)

Declaration
public bool CanCraftNotify(User user, RoomStats roomStats)
Parameters
Type Name Description
User user
RoomStats roomStats
Returns
Type Description
System.Boolean

CreateCraftTimeValue(Single)

Declaration
protected static IDynamicValue CreateCraftTimeValue(float start)
Parameters
Type Name Description
System.Single start
Returns
Type Description
IDynamicValue

CreateCraftTimeValue(Type, Single, Type, Type[])

Declaration
protected static IDynamicValue CreateCraftTimeValue(Type beneficiary, float start, Type skillType, params Type[] talents)
Parameters
Type Name Description
System.Type beneficiary
System.Single start
System.Type skillType
System.Type[] talents
Returns
Type Description
IDynamicValue

CreateLaborInCaloriesValue(Single)

Declaration
protected static IDynamicValue CreateLaborInCaloriesValue(float start)
Parameters
Type Name Description
System.Single start
Returns
Type Description
IDynamicValue

CreateLaborInCaloriesValue(Single, Type)

Declaration
protected IDynamicValue CreateLaborInCaloriesValue(float start, Type skillType)
Parameters
Type Name Description
System.Single start
System.Type skillType
Returns
Type Description
IDynamicValue

DescribePreviewBonuses(User)

Describes all talent bonuses that would apply to this recipe for preview. Groups by talent — one foldout per talent across all craft actions.

Declaration
public IReadOnlyList<LocString> DescribePreviewBonuses(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Collections.Generic.IReadOnlyList<LocString>

EvaluateWithBonuses(IDynamicValue, User, BonusAction)

Evaluates an IDynamicValue for recipe preview, applying both skill/module and talent bonuses.

Declaration
public float EvaluateWithBonuses(IDynamicValue value, User user, BonusAction action)
Parameters
Type Name Description
IDynamicValue value
User user
BonusAction action
Returns
Type Description
System.Single

GetAvailableDescription(User, Recipe)

Declaration
public FormattableString GetAvailableDescription(User user, Recipe recipe)
Parameters
Type Name Description
User user
Recipe recipe
Returns
Type Description
System.FormattableString

GetClosestMatchingProduct(List<FractionalItemStack>, User)

Declaration
public Recipe GetClosestMatchingProduct(List<FractionalItemStack> input, User user)
Parameters
Type Name Description
System.Collections.Generic.List<FractionalItemStack> input
User user
Returns
Type Description
Recipe

GetRequiredSkillsWrappedString(User)

Declaration
public LocString GetRequiredSkillsWrappedString(User user)
Parameters
Type Name Description
User user
Returns
Type Description
LocString

Initialize(LocString, Type)

Declaration
protected void Initialize(LocString displayText, Type recipeType)
Parameters
Type Name Description
LocString displayText
System.Type recipeType

InputMatch(List<FractionalItemStack>, List<IngredientElement>, User)

Declaration
public static float InputMatch(List<FractionalItemStack> actual, List<IngredientElement> target, User user)
Parameters
Type Name Description
System.Collections.Generic.List<FractionalItemStack> actual
System.Collections.Generic.List<IngredientElement> target
User user
Returns
Type Description
System.Single

LaborDesc()

Declaration
public LocString LaborDesc()
Returns
Type Description
LocString

OnLinkClicked(TooltipOrigin, TooltipClickContext, User)

Declaration
public void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
Type Name Description
TooltipOrigin origin
TooltipClickContext clickContext
User user

SkillsNeeded()

Returns the skills that are needed to craft this recipe, as well as to craft the table this recipe is made on.

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

ToString()

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

UILinkContent()

Declaration
public LocString UILinkContent()
Returns
Type Description
LocString

Implements

IController
IViewController
IHasUniversalID
ILinkable

Extension Methods

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