pub struct LuaPrototypes;Expand description
Provides read-only access to prototypes. It is accessible through the global object named prototypes.
Implementations§
Source§impl LuaPrototypes
impl LuaPrototypes
Sourcepub fn achievement(&self) -> HashMap<String, Box<LuaAchievementPrototype>>
pub fn achievement(&self) -> HashMap<String, Box<LuaAchievementPrototype>>
A dictionary containing every LuaAchievementPrototype indexed by name.
Sourcepub fn active_trigger(&self) -> HashMap<String, Box<LuaActiveTriggerPrototype>>
pub fn active_trigger(&self) -> HashMap<String, Box<LuaActiveTriggerPrototype>>
A dictionary containing every LuaActiveTriggerPrototype indexed by name.
Sourcepub fn airborne_pollutant(
&self,
) -> HashMap<String, Box<LuaAirbornePollutantPrototype>>
pub fn airborne_pollutant( &self, ) -> HashMap<String, Box<LuaAirbornePollutantPrototype>>
A dictionary containing every LuaAirbornePollutantPrototype indexed by name.
Sourcepub fn ammo_category(&self) -> HashMap<String, Box<LuaAmmoCategoryPrototype>>
pub fn ammo_category(&self) -> HashMap<String, Box<LuaAmmoCategoryPrototype>>
A dictionary containing every LuaAmmoCategoryPrototype indexed by name.
Sourcepub fn asteroid_chunk(&self) -> HashMap<String, Box<LuaAsteroidChunkPrototype>>
pub fn asteroid_chunk(&self) -> HashMap<String, Box<LuaAsteroidChunkPrototype>>
A dictionary containing every LuaAsteroidChunkPrototype indexed by name.
Sourcepub fn autoplace_control(
&self,
) -> HashMap<String, Box<LuaAutoplaceControlPrototype>>
pub fn autoplace_control( &self, ) -> HashMap<String, Box<LuaAutoplaceControlPrototype>>
A dictionary containing every LuaAutoplaceControlPrototype indexed by name.
Sourcepub fn burner_usage(&self) -> HashMap<String, Box<LuaBurnerUsagePrototype>>
pub fn burner_usage(&self) -> HashMap<String, Box<LuaBurnerUsagePrototype>>
A dictionary containing every LuaBurnerUsagePrototype indexed by name.
Sourcepub fn collision_layer(
&self,
) -> HashMap<String, Box<LuaCollisionLayerPrototype>>
pub fn collision_layer( &self, ) -> HashMap<String, Box<LuaCollisionLayerPrototype>>
A dictionary containing every LuaCollisionLayerPrototype indexed by name.
Sourcepub fn custom_event(&self) -> HashMap<String, Box<LuaCustomEventPrototype>>
pub fn custom_event(&self) -> HashMap<String, Box<LuaCustomEventPrototype>>
A dictionary containing every defined custom event, indexed by name.
Sourcepub fn custom_input(&self) -> HashMap<String, Box<LuaCustomInputPrototype>>
pub fn custom_input(&self) -> HashMap<String, Box<LuaCustomInputPrototype>>
A dictionary containing every LuaCustomInputPrototype indexed by name.
Sourcepub fn damage(&self) -> HashMap<String, Box<LuaDamagePrototype>>
pub fn damage(&self) -> HashMap<String, Box<LuaDamagePrototype>>
A dictionary containing every LuaDamagePrototype indexed by name.
Sourcepub fn decorative(&self) -> HashMap<String, Box<LuaDecorativePrototype>>
pub fn decorative(&self) -> HashMap<String, Box<LuaDecorativePrototype>>
A dictionary containing every LuaDecorativePrototype indexed by name.
Sourcepub fn entity(&self) -> HashMap<String, Box<LuaEntityPrototype>>
pub fn entity(&self) -> HashMap<String, Box<LuaEntityPrototype>>
A dictionary containing every LuaEntityPrototype indexed by name.
Sourcepub fn equipment(&self) -> HashMap<String, Box<LuaEquipmentPrototype>>
pub fn equipment(&self) -> HashMap<String, Box<LuaEquipmentPrototype>>
A dictionary containing every LuaEquipmentPrototype indexed by name.
Sourcepub fn equipment_category(
&self,
) -> HashMap<String, Box<LuaEquipmentCategoryPrototype>>
pub fn equipment_category( &self, ) -> HashMap<String, Box<LuaEquipmentCategoryPrototype>>
A dictionary containing every LuaEquipmentCategoryPrototype indexed by name.
Sourcepub fn equipment_grid(&self) -> HashMap<String, Box<LuaEquipmentGridPrototype>>
pub fn equipment_grid(&self) -> HashMap<String, Box<LuaEquipmentGridPrototype>>
A dictionary containing every LuaEquipmentGridPrototype indexed by name.
Sourcepub fn fluid(&self) -> HashMap<String, Box<LuaFluidPrototype>>
pub fn fluid(&self) -> HashMap<String, Box<LuaFluidPrototype>>
A dictionary containing every LuaFluidPrototype indexed by name.
Sourcepub fn font(&self) -> HashMap<String, Box<LuaFontPrototype>>
pub fn font(&self) -> HashMap<String, Box<LuaFontPrototype>>
A dictionary containing every LuaFontPrototype indexed by name.
Sourcepub fn fuel_category(&self) -> HashMap<String, Box<LuaFuelCategoryPrototype>>
pub fn fuel_category(&self) -> HashMap<String, Box<LuaFuelCategoryPrototype>>
A dictionary containing every LuaFuelCategoryPrototype indexed by name.
Sourcepub fn item(&self) -> HashMap<String, Box<LuaItemPrototype>>
pub fn item(&self) -> HashMap<String, Box<LuaItemPrototype>>
A dictionary containing every LuaItemPrototype indexed by name.
Sourcepub fn item_group(&self) -> HashMap<String, Box<LuaGroup>>
pub fn item_group(&self) -> HashMap<String, Box<LuaGroup>>
A dictionary containing every ItemGroup indexed by name.
Sourcepub fn item_subgroup(&self) -> HashMap<String, Box<LuaGroup>>
pub fn item_subgroup(&self) -> HashMap<String, Box<LuaGroup>>
A dictionary containing every ItemSubgroup indexed by name.
Sourcepub fn map_gen_preset(&self) -> HashMap<String, MapGenPreset>
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.
pub fn max_beacon_supply_area_distance(&self) -> u32
pub fn max_electric_pole_connection_distance(&self) -> f64
pub fn max_electric_pole_supply_area_distance(&self) -> f32
pub fn max_force_distraction_chunk_distance(&self) -> u32
pub fn max_force_distraction_distance(&self) -> f64
pub fn max_gate_activation_distance(&self) -> f64
pub fn max_inserter_reach_distance(&self) -> f64
pub fn max_pipe_to_ground_distance(&self) -> u8
pub fn max_underground_belt_distance(&self) -> u8
Sourcepub fn mod_data(&self) -> HashMap<String, Box<LuaModData>>
pub fn mod_data(&self) -> HashMap<String, Box<LuaModData>>
A dictionary containing every LuaModData indexed by name.
Sourcepub fn mod_setting(&self) -> HashMap<String, Box<LuaModSettingPrototype>>
pub fn mod_setting(&self) -> HashMap<String, Box<LuaModSettingPrototype>>
A dictionary containing every LuaModSettingPrototype indexed by name.
Sourcepub fn module_category(
&self,
) -> HashMap<String, Box<LuaModuleCategoryPrototype>>
pub fn module_category( &self, ) -> HashMap<String, Box<LuaModuleCategoryPrototype>>
A dictionary containing every LuaModuleCategoryPrototype indexed by name.
Sourcepub fn named_noise_expression(
&self,
) -> HashMap<String, Box<LuaNamedNoiseExpression>>
pub fn named_noise_expression( &self, ) -> HashMap<String, Box<LuaNamedNoiseExpression>>
A dictionary containing every LuaNamedNoiseExpression indexed by name.
Sourcepub fn named_noise_function(
&self,
) -> HashMap<String, Box<LuaNamedNoiseFunction>>
pub fn named_noise_function( &self, ) -> HashMap<String, Box<LuaNamedNoiseFunction>>
A dictionary containing every LuaNamedNoiseFunction indexed by name.
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 particle(&self) -> HashMap<String, Box<LuaParticlePrototype>>
pub fn particle(&self) -> HashMap<String, Box<LuaParticlePrototype>>
A dictionary containing every LuaParticlePrototype indexed by name.
Sourcepub fn procession(&self) -> HashMap<String, Box<LuaProcessionPrototype>>
pub fn procession(&self) -> HashMap<String, Box<LuaProcessionPrototype>>
A dictionary containing every LuaProcessionPrototype indexed by name.
Sourcepub fn procession_layer_inheritance_group(
&self,
) -> HashMap<String, Box<LuaProcessionLayerInheritanceGroupPrototype>>
pub fn procession_layer_inheritance_group( &self, ) -> HashMap<String, Box<LuaProcessionLayerInheritanceGroupPrototype>>
A dictionary containing every LuaProcessionLayerInheritanceGroupPrototype indexed by name.
pub fn quality(&self) -> HashMap<String, Box<LuaQualityPrototype>>
Sourcepub fn recipe(&self) -> HashMap<String, Box<LuaRecipePrototype>>
pub fn recipe(&self) -> HashMap<String, Box<LuaRecipePrototype>>
A dictionary containing every LuaRecipePrototype indexed by name.
Sourcepub fn recipe_category(
&self,
) -> HashMap<String, Box<LuaRecipeCategoryPrototype>>
pub fn recipe_category( &self, ) -> HashMap<String, Box<LuaRecipeCategoryPrototype>>
A dictionary containing every LuaRecipeCategoryPrototype indexed by name.
Sourcepub fn resource_category(
&self,
) -> HashMap<String, Box<LuaResourceCategoryPrototype>>
pub fn resource_category( &self, ) -> HashMap<String, Box<LuaResourceCategoryPrototype>>
A dictionary containing every LuaResourceCategoryPrototype indexed by name.
Sourcepub fn shortcut(&self) -> HashMap<String, Box<LuaShortcutPrototype>>
pub fn shortcut(&self) -> HashMap<String, Box<LuaShortcutPrototype>>
A dictionary containing every LuaShortcutPrototype indexed by name.
pub fn space_connection( &self, ) -> HashMap<String, Box<LuaSpaceConnectionPrototype>>
pub fn space_location(&self) -> HashMap<String, Box<LuaSpaceLocationPrototype>>
Sourcepub fn style(&self) -> HashMap<String, String>
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.
Sourcepub fn surface(&self) -> HashMap<String, Box<LuaSurfacePrototype>>
pub fn surface(&self) -> HashMap<String, Box<LuaSurfacePrototype>>
A dictionary containing every LuaSurfacePrototype indexed by name.
pub fn surface_property( &self, ) -> HashMap<String, Box<LuaSurfacePropertyPrototype>>
Sourcepub fn technology(&self) -> HashMap<String, Box<LuaTechnologyPrototype>>
pub fn technology(&self) -> HashMap<String, Box<LuaTechnologyPrototype>>
A dictionary containing every LuaTechnologyPrototype indexed by name.
Sourcepub fn tile(&self) -> HashMap<String, Box<LuaTilePrototype>>
pub fn tile(&self) -> HashMap<String, Box<LuaTilePrototype>>
A dictionary containing every LuaTilePrototype indexed by name.
Sourcepub fn trivial_smoke(&self) -> HashMap<String, Box<LuaTrivialSmokePrototype>>
pub fn trivial_smoke(&self) -> HashMap<String, Box<LuaTrivialSmokePrototype>>
A dictionary containing every LuaTrivialSmokePrototype indexed by name.
Sourcepub fn utility_constants(&self) -> UtilityConstants
pub fn utility_constants(&self) -> UtilityConstants
All game-defined utility constants. Note that his is implemented as a LuaCustomTable.
Sourcepub fn virtual_signal(&self) -> HashMap<String, Box<LuaVirtualSignalPrototype>>
pub fn virtual_signal(&self) -> HashMap<String, Box<LuaVirtualSignalPrototype>>
A dictionary containing every LuaVirtualSignalPrototype indexed by name.
Sourcepub fn get_achievement_filtered(
&self,
filters: Vec<AchievementPrototypeFilter>,
) -> HashMap<String, Box<LuaAchievementPrototype>>
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.
Sourcepub fn get_decorative_filtered(
&self,
filters: Vec<DecorativePrototypeFilter>,
) -> HashMap<String, Box<LuaDecorativePrototype>>
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.
Sourcepub fn get_entity_filtered(
&self,
filters: Vec<EntityPrototypeFilter>,
) -> HashMap<String, Box<LuaEntityPrototype>>
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.
Sourcepub fn get_equipment_filtered(
&self,
filters: Vec<EquipmentPrototypeFilter>,
) -> HashMap<String, Box<LuaEquipmentPrototype>>
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.
Sourcepub fn get_fluid_filtered(
&self,
filters: Vec<FluidPrototypeFilter>,
) -> HashMap<String, Box<LuaFluidPrototype>>
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.
Sourcepub fn get_history(&self, name: &str, type: &str) -> PrototypeHistory
pub fn get_history(&self, name: &str, type: &str) -> PrototypeHistory
Gets the prototype history for the given type and name.
Sourcepub fn get_item_filtered(
&self,
filters: Vec<ItemPrototypeFilter>,
) -> HashMap<String, Box<LuaItemPrototype>>
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.
Sourcepub fn get_mod_setting_filtered(
&self,
filters: Vec<ModSettingPrototypeFilter>,
) -> HashMap<String, Box<LuaModSettingPrototype>>
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.
Sourcepub fn get_recipe_filtered(
&self,
filters: Vec<RecipePrototypeFilter>,
) -> HashMap<String, Box<LuaRecipePrototype>>
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.
Sourcepub fn get_technology_filtered(
&self,
filters: Vec<TechnologyPrototypeFilter>,
) -> HashMap<String, Box<LuaTechnologyPrototype>>
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.
Sourcepub fn get_tile_filtered(
&self,
filters: Vec<TilePrototypeFilter>,
) -> HashMap<String, Box<LuaTilePrototype>>
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
impl Clone for LuaPrototypes
Source§fn clone(&self) -> LuaPrototypes
fn clone(&self) -> LuaPrototypes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more