pub struct LuaRecipePrototype;Expand description
A crafting recipe prototype.
Implementations§
Source§impl LuaRecipePrototype
impl LuaRecipePrototype
Sourcepub fn custom_tooltip_fields(&self) -> Vec<CustomTooltipField>
pub fn custom_tooltip_fields(&self) -> Vec<CustomTooltipField>
Extra description items in the tooltip and Factoriopedia.
Sourcepub fn factoriopedia_description(&self) -> &str
pub fn factoriopedia_description(&self) -> &str
Provides additional description used in factoriopedia.
pub fn localised_description(&self) -> &str
pub fn localised_name(&self) -> &str
Sourcepub fn order(&self) -> &str
pub fn order(&self) -> &str
The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
pub fn parameter(&self) -> bool
Sourcepub fn allow_as_intermediate(&self) -> bool
pub fn allow_as_intermediate(&self) -> bool
If this recipe is enabled for the purpose of intermediate hand-crafting.
Sourcepub fn allow_decomposition(&self) -> bool
pub fn allow_decomposition(&self) -> bool
Whether this recipe is allowed to be broken down for the recipe tooltip “Total raw” calculations.
Sourcepub fn allow_inserter_overload(&self) -> bool
pub fn allow_inserter_overload(&self) -> bool
If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).
Sourcepub fn allow_intermediates(&self) -> bool
pub fn allow_intermediates(&self) -> bool
If this recipe is allowed to use intermediate recipes when hand-crafting.
Sourcepub fn allowed_effects(&self) -> HashMap<String, bool>
pub fn allowed_effects(&self) -> HashMap<String, bool>
The allowed module effects for this recipe, if any.
Sourcepub fn allowed_module_categories(&self) -> HashMap<String, bool>
pub fn allowed_module_categories(&self) -> HashMap<String, bool>
The allowed module categories for this recipe, if any.
Sourcepub fn alternative_unlock_methods(&self) -> Vec<LuaTechnologyPrototype>
pub fn alternative_unlock_methods(&self) -> Vec<LuaTechnologyPrototype>
Additional technologies listed under “Unlocked by” on a recipe’s Factoriopedia page.
Sourcepub fn always_show_made_in(&self) -> bool
pub fn always_show_made_in(&self) -> bool
Should this recipe always show “Made in” in the tooltip?
Sourcepub fn can_set_quality(&self) -> bool
pub fn can_set_quality(&self) -> bool
True if a player can set quality of the recipe to craft. False when only normal quality recipes can be crafted.
Sourcepub fn categories(&self) -> Vec<&str>
pub fn categories(&self) -> Vec<&str>
Categories of the recipe.
pub fn crafting_machine_tints(&self) -> Vec<Color>
pub fn effect_limitation_messages(&self) -> Vec<&str>
Sourcepub fn emissions_multiplier(&self) -> f64
pub fn emissions_multiplier(&self) -> f64
The emissions multiplier for this recipe.
Sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
If this recipe prototype is enabled by default (enabled at the beginning of a game).
Sourcepub fn energy(&self) -> f64
pub fn energy(&self) -> f64
Energy required to execute this recipe. This directly affects the crafting time: Recipe’s energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.
Sourcepub fn factoriopedia_alternative(&self) -> LuaRecipePrototype
pub fn factoriopedia_alternative(&self) -> LuaRecipePrototype
An alternative prototype that will be used to display info about this prototype in Factoriopedia.
Is the recipe hidden from flow statistics (item/fluid production statistics)?
Is the recipe hidden from player crafting? The recipe will still show up for selection in machines.
pub fn hide_from_bonus_gui(&self) -> bool
pub fn hide_from_flow_stats(&self) -> bool
pub fn hide_from_player_crafting(&self) -> bool
Sourcepub fn hide_from_signal_gui(&self) -> bool
pub fn hide_from_signal_gui(&self) -> bool
Whether this recipe is marked to be hidden from the signal GUI.
Sourcepub fn ingredients(&self) -> Vec<Ingredient>
pub fn ingredients(&self) -> Vec<Ingredient>
The ingredients to this recipe.
Sourcepub fn main_product(&self) -> LuaAny
pub fn main_product(&self) -> LuaAny
The main product of this recipe, if any.
Sourcepub fn maximum_productivity(&self) -> f64
pub fn maximum_productivity(&self) -> f64
The maximal productivity bonus that can be achieved with this recipe.
Sourcepub fn object_name(&self) -> &str
pub fn object_name(&self) -> &str
The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
Sourcepub fn overload_multiplier(&self) -> u32
pub fn overload_multiplier(&self) -> u32
Used to determine how many extra items are put into an assembling machine before it’s considered “full enough”.
pub fn preserve_products_in_machine_output(&self) -> bool
Sourcepub fn request_paste_multiplier(&self) -> u32
pub fn request_paste_multiplier(&self) -> u32
The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.
Sourcepub fn surface_conditions(&self) -> Vec<SurfaceCondition>
pub fn surface_conditions(&self) -> Vec<SurfaceCondition>
The surface conditions required to craft this recipe.
Sourcepub fn trash(&self) -> Vec<LuaItemPrototype>
pub fn trash(&self) -> Vec<LuaItemPrototype>
The ‘trash’ items that this recipe might produce as a result of spoiling.
Sourcepub fn unlock_results(&self) -> bool
pub fn unlock_results(&self) -> bool
Whether this recipe unlocks the result item(s) so they’re shown in filter-select GUIs.
Sourcepub fn valid(&self) -> bool
pub fn valid(&self) -> bool
Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
Sourcepub fn get_ingredient_quality(
&self,
ingredient_index: u32,
recipe_quality: Option<LuaAny>,
) -> LuaQualityPrototype
pub fn get_ingredient_quality( &self, ingredient_index: u32, recipe_quality: Option<LuaAny>, ) -> LuaQualityPrototype
Ingredient materials required to craft recipe when configured to a specific quality.
Sourcepub fn get_product_amount(
&self,
product_index: u32,
productivity: Option<f64>,
) -> f64
pub fn get_product_amount( &self, product_index: u32, productivity: Option<f64>, ) -> f64
Average amount of the product given.
Sourcepub fn get_product_quality(
&self,
product_index: u32,
recipe_quality: Option<LuaAny>,
) -> LuaQualityPrototype
pub fn get_product_quality( &self, product_index: u32, recipe_quality: Option<LuaAny>, ) -> LuaQualityPrototype
Quality of the product given when recipe is configured to a specific quality.
Sourcepub fn has_category(&self, category: LuaAny) -> bool
pub fn has_category(&self, category: LuaAny) -> bool
Checks if recipe has given category
Trait Implementations§
Source§impl Clone for LuaRecipePrototype
impl Clone for LuaRecipePrototype
Source§fn clone(&self) -> LuaRecipePrototype
fn clone(&self) -> LuaRecipePrototype
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more