pub struct Recipe {
pub name: &'static str,
pub ingredients: &'static [RecipeIngredient],
pub results: &'static [RecipeProduct],
pub energy_required: Option<f64>,
pub category: Option<&'static str>,
pub enabled: Option<bool>,
pub subgroup: Option<&'static str>,
pub order: Option<&'static str>,
}Expand description
Minimal RecipePrototype
for data.extend.
type = "recipe" is injected by the Lua generator. Ingredients and results
use RecipeIngredient / RecipeProduct (each injects type = "item").
Fields§
§name: &'static strInternal prototype name (e.g. "my-mod-widget").
ingredients: &'static [RecipeIngredient]Crafting ingredients.
results: &'static [RecipeProduct]Crafting products.
energy_required: Option<f64>Crafting energy in seconds. Factorio defaults to 0.5 when omitted.
category: Option<&'static str>Recipe category (e.g. "crafting").
enabled: Option<bool>Whether the recipe is unlocked at start. Defaults to true in Factorio when omitted.
subgroup: Option<&'static str>Item subgroup id.
order: Option<&'static str>Sort order within the subgroup.
Trait Implementations§
impl Copy for Recipe
impl StructuralPartialEq for Recipe
Auto Trait Implementations§
impl Freeze for Recipe
impl RefUnwindSafe for Recipe
impl Send for Recipe
impl Sync for Recipe
impl Unpin for Recipe
impl UnsafeUnpin for Recipe
impl UnwindSafe for Recipe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more