Recipe

Recipe

class

Crafting-recipe prototype used by machines and crafting UIs

Fields

NameTypeDescription
ticks integer *Craft time* in engine ticks
default_locked boolean If **true**, the recipe starts hidden until research unlocks it.
locked boolean Currently locked if **true**
productivity integer Percentage bonus (e.g. `20` = +20 %)
input RecipeInventory Read-only container of required items
output RecipeInventory Read-only container of produced items
tier integer Recipe tier used for speed scaling: every tier **above** its dictionary's `start_tier` doubles craft time; below it the recipe is clamped to `start_tier`.
start_tier integer The dictionary's `start_tier`, copied to every recipe in it when the mods finish loading.
Standard members (5)

Generated for every class of this kind by the game's codegen, not written for Recipe.

Recipe.cast(object) Trying to cast Object into Recipe
Recipe.get_class() Return Recipe class object
Recipe.find(name) Looks Recipe up in db, nil when there is none
Recipe.get(name) Takes Recipe from db, reports a miss to the log
Recipe.reg(name) Register a new Recipe static object
Inherited from Prototype (2)
Inherited from Object (1)

Used by