pub struct NoiseExpression {
pub name: &'static str,
pub expression: LuaAny,
pub hidden: Option<bool>,
pub order: Option<&'static str>,
pub subgroup: Option<&'static str>,
pub factoriopedia_description: Option<&'static str>,
pub hidden_in_factoriopedia: Option<bool>,
pub localised_description: Option<&'static str>,
pub localised_name: Option<&'static str>,
pub parameter: Option<bool>,
pub factoriopedia_alternative: Option<&'static str>,
pub intended_property: Option<&'static str>,
}Expand description
Minimal NamedNoiseExpression for data.extend.
A NoiseExpression with a name. The base game uses named noise expressions to specify functions for many map properties to be used in map generation; e.g. the “elevation” expression is used to calculate elevation for every point on a map. For a list of the built-in named noise expressions, see data.raw.
Named noise expressions can be used by MapGenSettings and MapGenPreset to override which named expression is used to calculate a given property by having an entry in property_expression_names, e.g. elevation = "elevation_island".
Alternate expressions can be made available in the map generator GUI by setting their intended_property to the name of the property they should override.
Named noise expressions can also be used as noise variables e.g. var("my-noise-expression").
type = "noise-expression" is injected by the Lua generator.
Fields§
§name: &'static strUnique textual identification of the prototype. May only contain alphanumeric characters, dashes and underscores. May not exceed a length of 200 characters.
For a list of all names used in vanilla, see data.raw.
expression: LuaAnyThe noise expression itself. This is where most of the noise magic happens.
Prototype property hidden.
order: Option<&'static str>Used to order prototypes in inventory, recipes and GUIs. May not exceed a length of 200 characters.
subgroup: Option<&'static str>The name of an ItemSubGroup.
factoriopedia_description: Option<&'static str>Provides additional description used in factoriopedia.
Prototype property hidden_in_factoriopedia.
localised_description: Option<&'static str>Overwrites the description set in the locale file. The description is usually shown in the tooltip of the prototype.
localised_name: Option<&'static str>Overwrites the name set in the locale file. Can be used to easily set a procedurally-generated name because the LocalisedString format allows to insert parameters into the name directly from the Lua script.
parameter: Option<bool>Whether the prototype is a special type which can be used to parametrize blueprints and doesn’t have other function.
factoriopedia_alternative: Option<&'static str>The ID type corresponding to the prototype that inherits from this.
For example, if this is an EntityPrototype, this property’s type is EntityID.
intended_property: Option<&'static str>Names the property that this expression is intended to provide a value for, if any. This will make the expression show up as an option in the map generator GUI, unless it is the only expression with that intended property, in which case it will be hidden and selected by default.
For example if a noise expression is intended to be used as an alternative temperature generator, intended_property should be “temperature”.
Trait Implementations§
Source§impl Clone for NoiseExpression
impl Clone for NoiseExpression
Source§fn clone(&self) -> NoiseExpression
fn clone(&self) -> NoiseExpression
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more