Skip to main content

LuaPrototypes

Struct LuaPrototypes 

Source
pub struct LuaPrototypes;
Expand description

Provides read-only access to prototypes. It is accessible through the global object named prototypes.

Implementations§

Source§

impl LuaPrototypes

Source

pub fn achievement(&self) -> HashMap<String, Box<LuaAchievementPrototype>>

A dictionary containing every LuaAchievementPrototype indexed by name.

Source

pub fn active_trigger(&self) -> HashMap<String, Box<LuaActiveTriggerPrototype>>

A dictionary containing every LuaActiveTriggerPrototype indexed by name.

Source

pub fn airborne_pollutant( &self, ) -> HashMap<String, Box<LuaAirbornePollutantPrototype>>

A dictionary containing every LuaAirbornePollutantPrototype indexed by name.

Source

pub fn ammo_category(&self) -> HashMap<String, Box<LuaAmmoCategoryPrototype>>

A dictionary containing every LuaAmmoCategoryPrototype indexed by name.

Source

pub fn asteroid_chunk(&self) -> HashMap<String, Box<LuaAsteroidChunkPrototype>>

A dictionary containing every LuaAsteroidChunkPrototype indexed by name.

Source

pub fn autoplace_control( &self, ) -> HashMap<String, Box<LuaAutoplaceControlPrototype>>

A dictionary containing every LuaAutoplaceControlPrototype indexed by name.

Source

pub fn burner_usage(&self) -> HashMap<String, Box<LuaBurnerUsagePrototype>>

A dictionary containing every LuaBurnerUsagePrototype indexed by name.

Source

pub fn collision_layer( &self, ) -> HashMap<String, Box<LuaCollisionLayerPrototype>>

A dictionary containing every LuaCollisionLayerPrototype indexed by name.

Source

pub fn custom_event(&self) -> HashMap<String, Box<LuaCustomEventPrototype>>

A dictionary containing every defined custom event, indexed by name.

Source

pub fn custom_input(&self) -> HashMap<String, Box<LuaCustomInputPrototype>>

A dictionary containing every LuaCustomInputPrototype indexed by name.

Source

pub fn damage(&self) -> HashMap<String, Box<LuaDamagePrototype>>

A dictionary containing every LuaDamagePrototype indexed by name.

Source

pub fn decorative(&self) -> HashMap<String, Box<LuaDecorativePrototype>>

A dictionary containing every LuaDecorativePrototype indexed by name.

Source

pub fn entity(&self) -> HashMap<String, Box<LuaEntityPrototype>>

A dictionary containing every LuaEntityPrototype indexed by name.

Source

pub fn equipment(&self) -> HashMap<String, Box<LuaEquipmentPrototype>>

A dictionary containing every LuaEquipmentPrototype indexed by name.

Source

pub fn equipment_category( &self, ) -> HashMap<String, Box<LuaEquipmentCategoryPrototype>>

A dictionary containing every LuaEquipmentCategoryPrototype indexed by name.

Source

pub fn equipment_grid(&self) -> HashMap<String, Box<LuaEquipmentGridPrototype>>

A dictionary containing every LuaEquipmentGridPrototype indexed by name.

Source

pub fn fluid(&self) -> HashMap<String, Box<LuaFluidPrototype>>

A dictionary containing every LuaFluidPrototype indexed by name.

Source

pub fn font(&self) -> HashMap<String, Box<LuaFontPrototype>>

A dictionary containing every LuaFontPrototype indexed by name.

Source

pub fn fuel_category(&self) -> HashMap<String, Box<LuaFuelCategoryPrototype>>

A dictionary containing every LuaFuelCategoryPrototype indexed by name.

Source

pub fn item(&self) -> HashMap<String, Box<LuaItemPrototype>>

A dictionary containing every LuaItemPrototype indexed by name.

Source

pub fn item_group(&self) -> HashMap<String, Box<LuaGroup>>

A dictionary containing every ItemGroup indexed by name.

Source

pub fn item_subgroup(&self) -> HashMap<String, Box<LuaGroup>>

A dictionary containing every ItemSubgroup indexed by name.

Source

pub fn map_gen_preset(&self) -> HashMap<String, MapGenPreset>

A dictionary containing every MapGenPreset indexed by name.

A MapGenPreset is an exact copy of the prototype table provided from the data stage.

Source

pub fn max_beacon_supply_area_distance(&self) -> u32

Source

pub fn max_electric_pole_connection_distance(&self) -> f64

Source

pub fn max_electric_pole_supply_area_distance(&self) -> f32

Source

pub fn max_force_distraction_chunk_distance(&self) -> u32

Source

pub fn max_force_distraction_distance(&self) -> f64

Source

pub fn max_gate_activation_distance(&self) -> f64

Source

pub fn max_inserter_reach_distance(&self) -> f64

Source

pub fn max_pipe_to_ground_distance(&self) -> u8

Source

pub fn max_underground_belt_distance(&self) -> u8

Source

pub fn mod_data(&self) -> HashMap<String, Box<LuaModData>>

A dictionary containing every LuaModData indexed by name.

Source

pub fn mod_setting(&self) -> HashMap<String, Box<LuaModSettingPrototype>>

A dictionary containing every LuaModSettingPrototype indexed by name.

Source

pub fn module_category( &self, ) -> HashMap<String, Box<LuaModuleCategoryPrototype>>

A dictionary containing every LuaModuleCategoryPrototype indexed by name.

Source

pub fn named_noise_expression( &self, ) -> HashMap<String, Box<LuaNamedNoiseExpression>>

A dictionary containing every LuaNamedNoiseExpression indexed by name.

Source

pub fn named_noise_function( &self, ) -> HashMap<String, Box<LuaNamedNoiseFunction>>

A dictionary containing every LuaNamedNoiseFunction indexed by name.

Source

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.

Source

pub fn particle(&self) -> HashMap<String, Box<LuaParticlePrototype>>

A dictionary containing every LuaParticlePrototype indexed by name.

Source

pub fn procession(&self) -> HashMap<String, Box<LuaProcessionPrototype>>

A dictionary containing every LuaProcessionPrototype indexed by name.

Source

pub fn procession_layer_inheritance_group( &self, ) -> HashMap<String, Box<LuaProcessionLayerInheritanceGroupPrototype>>

A dictionary containing every LuaProcessionLayerInheritanceGroupPrototype indexed by name.

Source

pub fn quality(&self) -> HashMap<String, Box<LuaQualityPrototype>>

Source

pub fn recipe(&self) -> HashMap<String, Box<LuaRecipePrototype>>

A dictionary containing every LuaRecipePrototype indexed by name.

Source

pub fn recipe_category( &self, ) -> HashMap<String, Box<LuaRecipeCategoryPrototype>>

A dictionary containing every LuaRecipeCategoryPrototype indexed by name.

Source

pub fn resource_category( &self, ) -> HashMap<String, Box<LuaResourceCategoryPrototype>>

A dictionary containing every LuaResourceCategoryPrototype indexed by name.

Source

pub fn shortcut(&self) -> HashMap<String, Box<LuaShortcutPrototype>>

A dictionary containing every LuaShortcutPrototype indexed by name.

Source

pub fn space_connection( &self, ) -> HashMap<String, Box<LuaSpaceConnectionPrototype>>

Source

pub fn space_location(&self) -> HashMap<String, Box<LuaSpaceLocationPrototype>>

Source

pub fn style(&self) -> HashMap<String, String>

A map of styles that LuaGuiElement can use.

Maps from the style’s name to its type, as seen on StyleSpecification.

Source

pub fn surface(&self) -> HashMap<String, Box<LuaSurfacePrototype>>

A dictionary containing every LuaSurfacePrototype indexed by name.

Source

pub fn surface_property( &self, ) -> HashMap<String, Box<LuaSurfacePropertyPrototype>>

Source

pub fn technology(&self) -> HashMap<String, Box<LuaTechnologyPrototype>>

A dictionary containing every LuaTechnologyPrototype indexed by name.

Source

pub fn tile(&self) -> HashMap<String, Box<LuaTilePrototype>>

A dictionary containing every LuaTilePrototype indexed by name.

Source

pub fn trivial_smoke(&self) -> HashMap<String, Box<LuaTrivialSmokePrototype>>

A dictionary containing every LuaTrivialSmokePrototype indexed by name.

Source

pub fn utility_constants(&self) -> UtilityConstants

All game-defined utility constants. Note that his is implemented as a LuaCustomTable.

Source

pub fn virtual_signal(&self) -> HashMap<String, Box<LuaVirtualSignalPrototype>>

A dictionary containing every LuaVirtualSignalPrototype indexed by name.

Source

pub fn get_achievement_filtered( &self, filters: Vec<AchievementPrototypeFilter>, ) -> HashMap<String, Box<LuaAchievementPrototype>>

Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_decorative_filtered( &self, filters: Vec<DecorativePrototypeFilter>, ) -> HashMap<String, Box<LuaDecorativePrototype>>

Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_entity_filtered( &self, filters: Vec<EntityPrototypeFilter>, ) -> HashMap<String, Box<LuaEntityPrototype>>

Returns a dictionary of all LuaEntityPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_equipment_filtered( &self, filters: Vec<EquipmentPrototypeFilter>, ) -> HashMap<String, Box<LuaEquipmentPrototype>>

Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_fluid_filtered( &self, filters: Vec<FluidPrototypeFilter>, ) -> HashMap<String, Box<LuaFluidPrototype>>

Returns a dictionary of all LuaFluidPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_history(&self, name: &str, type: &str) -> PrototypeHistory

Gets the prototype history for the given type and name.

Source

pub fn get_item_filtered( &self, filters: Vec<ItemPrototypeFilter>, ) -> HashMap<String, Box<LuaItemPrototype>>

Returns a dictionary of all LuaItemPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_mod_setting_filtered( &self, filters: Vec<ModSettingPrototypeFilter>, ) -> HashMap<String, Box<LuaModSettingPrototype>>

Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_recipe_filtered( &self, filters: Vec<RecipePrototypeFilter>, ) -> HashMap<String, Box<LuaRecipePrototype>>

Returns a dictionary of all LuaRecipePrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_technology_filtered( &self, filters: Vec<TechnologyPrototypeFilter>, ) -> HashMap<String, Box<LuaTechnologyPrototype>>

Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. The prototypes are indexed by name.

Source

pub fn get_tile_filtered( &self, filters: Vec<TilePrototypeFilter>, ) -> HashMap<String, Box<LuaTilePrototype>>

Returns a dictionary of all LuaTilePrototypes that fit the given filters. The prototypes are indexed by name.

Trait Implementations§

Source§

impl Clone for LuaPrototypes

Source§

fn clone(&self) -> LuaPrototypes

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LuaPrototypes

Source§

impl Debug for LuaPrototypes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LuaPrototypes

Source§

fn default() -> LuaPrototypes

Returns the “default value” for a type. Read more
Source§

impl Eq for LuaPrototypes

Source§

impl From<LuaPrototypes> for LuaAny

Source§

fn from(_: LuaPrototypes) -> Self

Converts to this type from the input type.
Source§

impl LuaObject for LuaPrototypes

Source§

impl PartialEq for LuaPrototypes

Source§

fn eq(&self, other: &LuaPrototypes) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LuaPrototypes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.