Class RecipeFamily
Inheritance
System.Object
RecipeFamily
Assembly: Eco.Gameplay.dll
Syntax
public abstract class RecipeFamily : Object, IController, IViewController, IHasUniversalID, ILinkable
Constructors
RecipeFamily()
Declaration
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
CraftMinutes
Declaration
public IDynamicValue CraftMinutes { get; protected set; }
Property Value
DefaultRecipe
Declaration
public Recipe DefaultRecipe { get; }
Property Value
DisplayName
Declaration
public LocString DisplayName { get; }
Property Value
Ingredients
Declaration
public IngredientElement[] Ingredients { get; }
Property Value
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
MarkedUpName
Declaration
public LocString MarkedUpName { get; }
Property Value
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
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
RequiredSkills
Declaration
public RequiresSkillAttribute[] RequiredSkills { get; protected set; }
Property Value
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
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
Returns
| Type |
Description |
| System.Boolean |
|
CreateCraftTimeValue(Single)
Declaration
protected static IDynamicValue CreateCraftTimeValue(float start)
Parameters
| Type |
Name |
Description |
| System.Single |
start |
|
Returns
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
CreateLaborInCaloriesValue(Single)
Declaration
protected static IDynamicValue CreateLaborInCaloriesValue(float start)
Parameters
| Type |
Name |
Description |
| System.Single |
start |
|
Returns
CreateLaborInCaloriesValue(Single, Type)
Declaration
protected IDynamicValue CreateLaborInCaloriesValue(float start, Type skillType)
Parameters
| Type |
Name |
Description |
| System.Single |
start |
|
| System.Type |
skillType |
|
Returns
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
Returns
| Type |
Description |
| System.Single |
|
GetAvailableDescription(User, Recipe)
Declaration
public FormattableString GetAvailableDescription(User user, Recipe recipe)
Parameters
Returns
| Type |
Description |
| System.FormattableString |
|
GetClosestMatchingProduct(List<FractionalItemStack>, User)
Declaration
public Recipe GetClosestMatchingProduct(List<FractionalItemStack> input, User user)
Parameters
Returns
GetRequiredSkillsWrappedString(User)
Declaration
public LocString GetRequiredSkillsWrappedString(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
Initialize(LocString, Type)
Declaration
protected void Initialize(LocString displayText, Type recipeType)
Parameters
| Type |
Name |
Description |
| LocString |
displayText |
|
| System.Type |
recipeType |
|
Declaration
public static float InputMatch(List<FractionalItemStack> actual, List<IngredientElement> target, User user)
Parameters
Returns
| Type |
Description |
| System.Single |
|
LaborDesc()
Declaration
public LocString LaborDesc()
Returns
OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
Declaration
public void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
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
Implements
Extension Methods