pub struct LuaEntityPrototype;Expand description
Prototype of an entity.
Implementations§
Source§impl LuaEntityPrototype
impl LuaEntityPrototype
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
pub fn absorptions_per_second(&self) -> HashMap<String, EnemySpawnerAbsorption>
Sourcepub fn absorptions_to_join_attack(&self) -> HashMap<String, f32>
pub fn absorptions_to_join_attack(&self) -> HashMap<String, f32>
A table of pollutions amounts that has to be absorbed by the unit’s spawner before the unit will leave the spawner and attack the source of the pollution, indexed by the name of each absorbed pollution type.
pub fn acceleration(&self) -> f64
pub fn acceleration_rate(&self) -> f64
pub fn accepted_seeds(&self) -> Vec<&str>
pub fn action(&self) -> Vec<TriggerItem>
pub fn action_cooldown(&self) -> u32
pub fn action_triggered_automatically(&self) -> bool
pub fn activation_buffer_ratio(&self) -> LuaAny
pub fn activation_distance(&self) -> f64
Sourcepub fn active_energy_usage(&self) -> f64
pub fn active_energy_usage(&self) -> f64
The active energy usage of this rocket silo or combinator prototype.
pub fn add_fuel_cooldown(&self) -> u32
Sourcepub fn additional_pastable_entities(&self) -> Vec<LuaEntityPrototype>
pub fn additional_pastable_entities(&self) -> Vec<LuaEntityPrototype>
Entities this entity can be pasted onto in addition to the normal allowed ones.
Sourcepub fn affected_by_tiles(&self) -> bool
pub fn affected_by_tiles(&self) -> bool
Whether this unit prototype is affected by tile walking speed modifiers.
pub fn agricultural_tower_radius(&self) -> f64
pub fn ai_settings(&self) -> UnitAISettings
Sourcepub fn air_resistance(&self) -> f64
pub fn air_resistance(&self) -> f64
The air resistance of this rolling stock prototype.
pub fn alarm_trigger(&self) -> Vec<TriggerEffectItem>
pub fn alert_after_time(&self) -> u32
Sourcepub fn alert_icon_scale(&self) -> f32
pub fn alert_icon_scale(&self) -> f32
The alert icon scale of this entity prototype.
Sourcepub fn alert_icon_shift(&self) -> Vector
pub fn alert_icon_shift(&self) -> Vector
The alert icon shift of this entity prototype.
Sourcepub fn alert_when_attacking(&self) -> bool
pub fn alert_when_attacking(&self) -> bool
Whether this turret raises an alert when attacking
Sourcepub fn alert_when_damaged(&self) -> bool
pub fn alert_when_damaged(&self) -> bool
Whether this entity raises an alert when damaged.
Sourcepub fn allow_access_to_all_forces(&self) -> bool
pub fn allow_access_to_all_forces(&self) -> bool
Whether this market allows access to all forces or just friendly ones.
pub fn allow_blueprint_connection(&self) -> bool
Sourcepub fn allow_burner_leech(&self) -> bool
pub fn allow_burner_leech(&self) -> bool
Whether this inserter allows burner leeching.
pub fn allow_clone_connection(&self) -> bool
pub fn allow_container_interaction(&self) -> bool
Sourcepub fn allow_copy_paste(&self) -> bool
pub fn allow_copy_paste(&self) -> bool
When false copy-paste is not allowed for this entity.
Sourcepub fn allow_custom_vectors(&self) -> bool
pub fn allow_custom_vectors(&self) -> bool
Whether this inserter allows custom pickup and drop vectors.
pub fn allow_manual_color(&self) -> bool
Sourcepub fn allow_passengers(&self) -> bool
pub fn allow_passengers(&self) -> bool
Whether this vehicle allows passengers.
pub fn allow_rail_interaction(&self) -> bool
pub fn allow_robot_dispatch_in_automatic_mode(&self) -> bool
Sourcepub fn allow_run_time_change_of_is_military_target(&self) -> bool
pub fn allow_run_time_change_of_is_military_target(&self) -> bool
True if this entity-with-owner’s is_military_target can be changed run-time (on the entity, not on the prototype itself)
pub fn allow_side_loading(&self) -> bool
pub fn allow_turning_when_starting_attack(&self) -> bool
pub fn allow_unloading(&self) -> bool
Sourcepub fn allowed_effects(&self) -> HashMap<String, bool>
pub fn allowed_effects(&self) -> HashMap<String, bool>
The allowed module effects for this entity, 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 entity, if any.
Sourcepub fn always_on(&self) -> bool
pub fn always_on(&self) -> bool
Whether the lamp is always on (except when out of power or turned off by the circuit network).
Sourcepub fn ammo_category(&self) -> &str
pub fn ammo_category(&self) -> &str
Name of the ammo category of this land mine.
Sourcepub fn ammo_stack_limit(&self) -> u32
pub fn ammo_stack_limit(&self) -> u32
The max stack size of ammo in this artillery turret or artillery wagon.
Sourcepub fn animation_speed_coefficient(&self) -> f64
pub fn animation_speed_coefficient(&self) -> f64
The animation speed coefficient of this belt connectable prototype.
pub fn arm_angular_speed_cap_base(&self) -> f32
pub fn arm_angular_speed_cap_quality_scaling(&self) -> f32
pub fn arm_color_gradient(&self) -> Vec<Color>
pub fn arm_count_base(&self) -> u32
pub fn arm_count_quality_scaling(&self) -> u32
pub fn arm_energy_usage(&self) -> f64
pub fn arm_inventory_size_quality_increase(&self) -> u16
pub fn arm_slow_energy_usage(&self) -> f64
pub fn arm_speed_base(&self) -> f32
pub fn arm_speed_quality_scaling(&self) -> f32
pub fn arms_speed_modifier_per_quality_level(&self) -> f64
pub fn attach_to_target(&self) -> bool
Sourcepub fn attack_parameters(&self) -> AttackParameters
pub fn attack_parameters(&self) -> AttackParameters
The attack parameters for this entity, if any.
pub fn attack_reaction(&self) -> Vec<AttackReactionItem>
Sourcepub fn attack_result(&self) -> Vec<TriggerItem>
pub fn attack_result(&self) -> Vec<TriggerItem>
The attack result of this entity, if any.
pub fn attack_target_mask(&self) -> LuaAny
pub fn attacking_speed(&self) -> f64
pub fn attractor_hit_effect(&self) -> Vec<TriggerItem>
pub fn auto_connect_up_to_n_wires(&self) -> u8
pub fn auto_setup_collision_box(&self) -> bool
pub fn auto_sort_inventory(&self) -> bool
Sourcepub fn automated_ammo_count(&self) -> u32
pub fn automated_ammo_count(&self) -> u32
The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.
Sourcepub fn automatic_weapon_cycling(&self) -> bool
pub fn automatic_weapon_cycling(&self) -> bool
Whether this spider vehicle prototype automatically cycles weapons.
Sourcepub fn autoplace_specification(&self) -> AutoplaceSpecification
pub fn autoplace_specification(&self) -> AutoplaceSpecification
Autoplace specification for this entity prototype, if any.
Sourcepub fn beacon_counter(&self) -> LuaEntityPrototypeBeaconCounter
pub fn beacon_counter(&self) -> LuaEntityPrototypeBeaconCounter
The beacon counter used by effect receiver when deciding which sample to take from beacon profile.
pub fn belt_distance(&self) -> f64
pub fn belt_length(&self) -> f64
Sourcepub fn belt_speed(&self) -> f64
pub fn belt_speed(&self) -> f64
The speed of this transport belt.
Sourcepub fn boiler_mode(&self) -> LuaEntityPrototypeBoilerMode
pub fn boiler_mode(&self) -> LuaEntityPrototypeBoilerMode
The boiler operation mode of this boiler prototype.
Sourcepub fn braking_force(&self) -> f64
pub fn braking_force(&self) -> f64
The braking force of this vehicle prototype.
pub fn build_distance(&self) -> u32
Sourcepub fn building_grid_bit_shift(&self) -> u32
pub fn building_grid_bit_shift(&self) -> u32
The log2 of grid size of the building.
Sourcepub fn burner_prototype(&self) -> LuaBurnerPrototype
pub fn burner_prototype(&self) -> LuaBurnerPrototype
The burner energy source prototype this entity uses, if any.
Sourcepub fn burns_fluid(&self) -> bool
pub fn burns_fluid(&self) -> bool
Whether this generator prototype burns fluid.
pub fn call_for_help_radius(&self) -> f64
pub fn can_launch_without_landing_pads(&self) -> bool
Sourcepub fn can_open_gates(&self) -> bool
pub fn can_open_gates(&self) -> bool
Whether this unit prototype can open gates.
pub fn can_retarget_while_starting_attack(&self) -> bool
pub fn cant_insert_at_source_message_key(&self) -> &str
pub fn capture_speed(&self) -> f64
pub fn captured_spawner_entity(&self) -> LuaEntityPrototype
pub fn cargo_pod_entity(&self) -> LuaEntityPrototype
pub fn cargo_station_parameters(&self) -> CargoStationParameters
Sourcepub fn chain_shooting_cooldown_modifier(&self) -> f64
pub fn chain_shooting_cooldown_modifier(&self) -> f64
The chain shooting cooldown modifier of this spider vehicle prototype.
pub fn character_corpse(&self) -> LuaEntityPrototype
Sourcepub fn chunk_exploration_radius(&self) -> f64
pub fn chunk_exploration_radius(&self) -> f64
The chunk exploration radius of this vehicle prototype.
pub fn clamps_off_trigger(&self) -> Vec<TriggerEffectItem>
pub fn clamps_on_trigger(&self) -> Vec<TriggerEffectItem>
Sourcepub fn cliff_explosive_prototype(&self) -> &str
pub fn cliff_explosive_prototype(&self) -> &str
The item prototype name used to destroy this cliff.
pub fn cliff_removal_probability(&self) -> f64
pub fn close_door_trigger_effect(&self) -> Vec<TriggerEffectItem>
pub fn collection_box_offset(&self) -> f32
Sourcepub fn collision_box(&self) -> BoundingBox
pub fn collision_box(&self) -> BoundingBox
The bounding box used for collision checking.
Sourcepub fn collision_mask(&self) -> CollisionMask
pub fn collision_mask(&self) -> CollisionMask
The collision masks this entity uses
pub fn collision_mask_allow_on_deep_oil_ocean(&self) -> CollisionMask
Sourcepub fn collision_mask_collides_with_self(&self) -> bool
pub fn collision_mask_collides_with_self(&self) -> bool
Does this prototype collision mask collide with itself?
Sourcepub fn collision_mask_collides_with_tiles_only(&self) -> bool
pub fn collision_mask_collides_with_tiles_only(&self) -> bool
Does this prototype collision mask collide with tiles only?
Sourcepub fn collision_mask_considers_tile_transitions(&self) -> bool
pub fn collision_mask_considers_tile_transitions(&self) -> bool
Does this prototype collision mask consider tile transitions?
pub fn combat_robot_friction(&self) -> f64
pub fn connectable_box(&self) -> BoundingBox
pub fn connection_category(&self) -> Vec<&str>
pub fn connection_distance(&self) -> f64
pub fn connects_to_other_radars(&self) -> bool
Sourcepub fn construction_radius(&self) -> f64
pub fn construction_radius(&self) -> f64
The construction radius for this roboport prototype.
Sourcepub fn consumption(&self) -> f64
pub fn consumption(&self) -> f64
The energy consumption of this car prototype.
pub fn container_distance(&self) -> f64
Sourcepub fn corpses(&self) -> HashMap<String, Box<LuaEntityPrototype>>
pub fn corpses(&self) -> HashMap<String, Box<LuaEntityPrototype>>
Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse’s prototype name.
Sourcepub fn count_as_rock_for_filtered_deconstruction(&self) -> bool
pub fn count_as_rock_for_filtered_deconstruction(&self) -> bool
If this simple-entity is counted as a rock for the deconstruction planner “trees and rocks only” filter.
Sourcepub fn crafting_categories(&self) -> HashMap<String, bool>
pub fn crafting_categories(&self) -> HashMap<String, bool>
The crafting categories this entity prototype supports.
The value in the dictionary is meaningless and exists just to allow for easy lookup.
pub fn crafting_speed_quality_multiplier(&self) -> LuaAny
Sourcepub fn crane_energy_usage(&self) -> f64
pub fn crane_energy_usage(&self) -> f64
The crane energy usage of this agricultural tower prototype.
Sourcepub fn create_ghost_on_death(&self) -> bool
pub fn create_ghost_on_death(&self) -> bool
If this prototype will attempt to create a ghost of itself on death.
If this is false then a ghost will never be made, if it’s true a ghost may be made.
Sourcepub fn created_effect(&self) -> Vec<TriggerItem>
pub fn created_effect(&self) -> Vec<TriggerItem>
The trigger to run when this entity is created, if any.
Sourcepub fn created_smoke(&self) -> LuaEntityPrototypeCreatedSmoke
pub fn created_smoke(&self) -> LuaEntityPrototypeCreatedSmoke
The smoke trigger run when this entity is built, if any.
pub fn creation_shift(&self) -> Vector
pub fn custom_input_slot_tooltip_key(&self) -> &str
Sourcepub fn damage(&self) -> DamageParameters
pub fn damage(&self) -> DamageParameters
When lightning strikes something that is not a lightning attractor, this damage is applied to the target.
For stickers the damage is applied every LuaEntityPrototype::damage_interval ticks.
pub fn damage_hit_tint(&self) -> Color
pub fn damage_interval(&self) -> u32
pub fn damage_multiplier_decrease_per_tick(&self) -> f32
pub fn damage_multiplier_increase_per_added_fuel(&self) -> f32
pub fn damage_per_hp(&self) -> f32
pub fn damage_per_tick(&self) -> DamageParameters
pub fn damaged_trigger_effect(&self) -> Vec<TriggerEffectItem>
Sourcepub fn darkness_for_all_lamps_off(&self) -> f32
pub fn darkness_for_all_lamps_off(&self) -> f32
Value between 0 and 1 darkness where all lamps of this lamp prototype are off.
Sourcepub fn darkness_for_all_lamps_on(&self) -> f32
pub fn darkness_for_all_lamps_on(&self) -> f32
Value between 0 and 1 darkness where all lamps of this lamp prototype are on.
pub fn default_available_construction_output_signal(&self) -> SignalID
pub fn default_available_logistic_output_signal(&self) -> SignalID
pub fn default_blue_output_signal(&self) -> SignalID
pub fn default_blue_signal(&self) -> SignalID
pub fn default_copy_color_from_train_stop(&self) -> bool
pub fn default_day_length_output_signal(&self) -> SignalID
pub fn default_day_tick_output_signal(&self) -> SignalID
pub fn default_game_tick_output_signal(&self) -> SignalID
pub fn default_green_output_signal(&self) -> SignalID
pub fn default_green_signal(&self) -> SignalID
pub fn default_orange_output_signal(&self) -> SignalID
pub fn default_output_signal(&self) -> SignalID
pub fn default_recipe_finished_signal(&self) -> SignalID
pub fn default_red_output_signal(&self) -> SignalID
pub fn default_red_signal(&self) -> SignalID
pub fn default_rgb_signal(&self) -> SignalID
pub fn default_roboport_count_output_signal(&self) -> SignalID
pub fn default_stack_control_input_signal(&self) -> SignalID
pub fn default_status(&self) -> &str
pub fn default_technology_level_signal(&self) -> SignalID
pub fn default_temperature_signal(&self) -> SignalID
pub fn default_total_construction_output_signal(&self) -> SignalID
pub fn default_total_logistic_output_signal(&self) -> SignalID
pub fn default_universe_channel(&self) -> SignalID
pub fn default_working_signal(&self) -> SignalID
pub fn delay_between_initial_flames(&self) -> u32
pub fn deposit_radius(&self) -> f32
pub fn destroy_action(&self) -> Vec<TriggerItem>
Sourcepub fn destroy_non_fuel_fluid(&self) -> bool
pub fn destroy_non_fuel_fluid(&self) -> bool
Whether this generator prototype destroys non-fuel fluids.
pub fn destroy_on_empty(&self) -> bool
pub fn direction_count(&self) -> u8
pub fn direction_only(&self) -> bool
Sourcepub fn disable_automatic_firing(&self) -> bool
pub fn disable_automatic_firing(&self) -> bool
If automatic firing is disabled for this artillery turret or artillery wagon.
pub fn disabled_when_recipe_not_researched(&self) -> bool
Sourcepub fn distraction_cooldown(&self) -> u32
pub fn distraction_cooldown(&self) -> u32
The distraction cooldown of this unit prototype.
Sourcepub fn distribution_effectivity(&self) -> f64
pub fn distribution_effectivity(&self) -> f64
The distribution effectivity for this beacon prototype.
Sourcepub fn distribution_effectivity_bonus_per_quality_level(&self) -> f64
pub fn distribution_effectivity_bonus_per_quality_level(&self) -> f64
The distribution effectivity bonus per quality level for this beacon prototype.
Sourcepub fn door_opening_speed(&self) -> f64
pub fn door_opening_speed(&self) -> f64
The door opening speed for this rocket silo prototype.
pub fn doors_trigger(&self) -> Vec<TriggerEffectItem>
Sourcepub fn draw_cargo(&self) -> bool
pub fn draw_cargo(&self) -> bool
Whether this logistics or construction robot renders its cargo when flying.
Sourcepub fn drawing_box_vertical_extension(&self) -> f64
pub fn drawing_box_vertical_extension(&self) -> f64
Extra vertical space needed to see the whole entity in GUIs. This is used to calculate the correct zoom and positioning in the entity info gui, for example in the entity tooltip.
pub fn drive_over_elevated_tie_trigger(&self) -> Vec<TriggerEffectItem>
pub fn drive_over_tie_trigger(&self) -> Vec<TriggerEffectItem>
pub fn drive_over_tie_trigger_minimal_speed(&self) -> f64
pub fn drop_item_distance(&self) -> u32
Sourcepub fn drops_full_belt_stacks(&self) -> bool
pub fn drops_full_belt_stacks(&self) -> bool
If this mining drill puts full belt stacks onto belts.
pub fn dying_explosion(&self) -> Vec<ExplosionDefinition>
Sourcepub fn dying_speed(&self) -> f32
pub fn dying_speed(&self) -> f32
The dying time of this corpse prototype.
pub fn dying_trigger_effect(&self) -> Vec<TriggerEffectItem>
pub fn early_death_ticks(&self) -> u32
pub fn effect_duration(&self) -> u16
Sourcepub fn effect_receiver(&self) -> EffectReceiver
pub fn effect_receiver(&self) -> EffectReceiver
Effect receiver prototype of crafting machine, lab, mining drill, or agricultural tower.
Sourcepub fn effectivity(&self) -> f64
pub fn effectivity(&self) -> f64
The effectivity of this car prototype, generator prototype.
Sourcepub fn electric_energy_source_prototype(
&self,
) -> LuaElectricEnergySourcePrototype
pub fn electric_energy_source_prototype( &self, ) -> LuaElectricEnergySourcePrototype
The electric energy source prototype this entity uses, if any.
pub fn elevated_collision_mask(&self) -> CollisionMask
pub fn elevated_selection_boxes(&self) -> Vec<BoundingBox>
pub fn elevated_selection_priority(&self) -> u8
Sourcepub fn emissions_per_second(&self) -> HashMap<String, f64>
pub fn emissions_per_second(&self) -> HashMap<String, f64>
A table of pollution emissions per second the entity will create, grouped by the name of the pollution type.
pub fn ended_in_water_trigger_effect(&self) -> Vec<TriggerEffectItem>
Sourcepub fn enemy_map_color(&self) -> Color
pub fn enemy_map_color(&self) -> Color
The enemy map color used when charting this entity.
Sourcepub fn energy(&self) -> f64
pub fn energy(&self) -> f64
When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.
pub fn energy_fraction_to_connect(&self) -> f32
pub fn energy_fraction_to_disconnect(&self) -> f32
Sourcepub fn energy_per_hit_point(&self) -> f64
pub fn energy_per_hit_point(&self) -> f64
The energy used per hit point taken for this vehicle during collisions.
pub fn energy_per_item(&self) -> f64
Sourcepub fn energy_per_move(&self) -> f64
pub fn energy_per_move(&self) -> f64
The energy consumed per tile moved for this flying robot.
pub fn energy_per_movement(&self) -> f64
pub fn energy_per_nearby_scan(&self) -> f64
pub fn energy_per_rotation(&self) -> f64
pub fn energy_per_sector(&self) -> f64
pub fn energy_per_shot(&self) -> f64
Sourcepub fn energy_per_tick(&self) -> f64
pub fn energy_per_tick(&self) -> f64
The energy consumed per tick for this flying robot.
Sourcepub fn energy_usage(&self) -> f64
pub fn energy_usage(&self) -> f64
The direct energy usage of this entity, if any.
pub fn energy_usage_quality_multiplier(&self) -> LuaAny
pub fn energy_usage_quality_scaling(&self) -> f32
Sourcepub fn engine_starting_speed(&self) -> f64
pub fn engine_starting_speed(&self) -> f64
The engine starting speed for this rocket silo rocket prototype.
pub fn enraged_duration(&self) -> u32
pub fn enraged_speed(&self) -> f64
pub fn enter_drop_mode_if_held_stack_spoiled(&self) -> bool
pub fn enter_vehicle_distance(&self) -> f64
pub fn erase_contents_when_mined(&self) -> bool
pub fn expires(&self) -> bool
Sourcepub fn explosion_beam(&self) -> f64
pub fn explosion_beam(&self) -> f64
Whether this explosion has a beam.
pub fn explosion_effect(&self) -> Vec<TriggerItem>
Sourcepub fn explosion_rotate(&self) -> f64
pub fn explosion_rotate(&self) -> f64
Whether this explosion rotates.
Sourcepub fn factoriopedia_alternative(&self) -> LuaEntityPrototype
pub fn factoriopedia_alternative(&self) -> LuaEntityPrototype
An alternative prototype that will be used to display info about this prototype in Factoriopedia.
Sourcepub fn fast_replaceable_group(&self) -> &str
pub fn fast_replaceable_group(&self) -> &str
The group of mutually fast-replaceable entities, if any.
Sourcepub fn filter_count(&self) -> u32
pub fn filter_count(&self) -> u32
The filter count of this inserter, loader, mining drill, roboport or logistic chest. For logistic containers, nil means no limit.
Sourcepub fn final_attack_result(&self) -> Vec<TriggerItem>
pub fn final_attack_result(&self) -> Vec<TriggerItem>
The final attack result for this entity if it has one.
pub fn fire_spread_cooldown(&self) -> u8
pub fn fire_spread_entity(&self) -> LuaEntityPrototype
pub fn fire_spread_radius(&self) -> f32
Sourcepub fn fixed_quality(&self) -> LuaQualityPrototype
pub fn fixed_quality(&self) -> LuaQualityPrototype
The fixed recipe quality for this assembling machine prototype, if any.
Sourcepub fn fixed_recipe(&self) -> LuaRecipePrototype
pub fn fixed_recipe(&self) -> LuaRecipePrototype
The fixed recipe for this assembling machine prototype, if any.
pub fn flow_scaling(&self) -> bool
pub fn fluid_boxes_off_when_no_fluid_recipe(&self) -> bool
pub fn fluid_buffer_input_flow(&self) -> LuaAny
pub fn fluid_buffer_size(&self) -> LuaAny
Sourcepub fn fluid_capacity(&self) -> f64
pub fn fluid_capacity(&self) -> f64
The fluid capacity of this entity or 0 if this entity doesn’t support fluids.
Crafting machines will report 0 due to their fluid capacity being whatever a given recipe needs.
Sourcepub fn fluid_energy_source_prototype(&self) -> LuaFluidEnergySourcePrototype
pub fn fluid_energy_source_prototype(&self) -> LuaFluidEnergySourcePrototype
The fluid energy source prototype this entity uses, if any.
pub fn fluid_source_offset(&self) -> Vector
pub fn fluid_wagon_connector_speed(&self) -> f64
pub fn fluid_wagon_tank_valve_max_distance(&self) -> f64
Sourcepub fn fluidbox_prototypes(&self) -> Vec<LuaFluidBoxPrototype>
pub fn fluidbox_prototypes(&self) -> Vec<LuaFluidBoxPrototype>
The fluidbox prototypes for this entity.
Sourcepub fn flying_acceleration(&self) -> f64
pub fn flying_acceleration(&self) -> f64
The flying acceleration for this rocket silo rocket prototype.
pub fn flying_collision_mask(&self) -> CollisionMask
Sourcepub fn flying_speed(&self) -> f64
pub fn flying_speed(&self) -> f64
The flying speed for this rocket silo rocket prototype.
pub fn flying_trigger(&self) -> Vec<TriggerEffectItem>
pub fn folded_turret_corpses(&self) -> HashMap<String, Box<LuaEntityPrototype>>
pub fn follows_player(&self) -> bool
pub fn footprint_particles(&self) -> LuaAny
pub fn footstep_particle_triggers(&self) -> LuaAny
pub fn force_die_on_attack(&self) -> bool
pub fn force_visibility(&self) -> ForceCondition
Sourcepub fn friction_force(&self) -> f64
pub fn friction_force(&self) -> f64
The friction of this vehicle prototype.
Sourcepub fn friendly_map_color(&self) -> Color
pub fn friendly_map_color(&self) -> Color
The friendly map color used when charting this entity.
pub fn grab_less_to_match_belt_stack(&self) -> bool
pub fn grid_offset(&self) -> Vector
Sourcepub fn grid_prototype(&self) -> LuaEquipmentGridPrototype
pub fn grid_prototype(&self) -> LuaEquipmentGridPrototype
The equipment grid prototype for this entity, if any.
pub fn grid_size(&self) -> Vector
pub fn grounded_landing_search_radius(&self) -> f64
pub fn growth_area_radius(&self) -> f64
pub fn growth_grid_tile_size(&self) -> u32
pub fn growth_ticks(&self) -> u32
pub fn gui_mode(&self) -> LuaEntityPrototypeGuiMode
pub fn gui_title_key(&self) -> &str
Sourcepub fn guns(&self) -> HashMap<String, Box<LuaItemPrototype>>
pub fn guns(&self) -> HashMap<String, Box<LuaItemPrototype>>
A mapping of the gun name to the gun prototype this prototype uses. nil if this entity prototype doesn’t use guns.
Sourcepub fn harvest_emissions(&self) -> HashMap<String, f64>
pub fn harvest_emissions(&self) -> HashMap<String, f64>
A table of pollutants that this plant will release when it is harvested.
Sourcepub fn has_belt_immunity(&self) -> bool
pub fn has_belt_immunity(&self) -> bool
Whether this unit, car, or character prototype has belt immunity.
pub fn has_direction(&self) -> bool
pub fn hatch_definitions(&self) -> Vec<CargoHatchDefinition>
pub fn head_collection_radius(&self) -> f32
Sourcepub fn healing_per_tick(&self) -> f32
pub fn healing_per_tick(&self) -> f32
Amount this entity can heal per tick, if any.
Sourcepub fn heat_buffer_prototype(&self) -> LuaHeatBufferPrototype
pub fn heat_buffer_prototype(&self) -> LuaHeatBufferPrototype
The heat buffer prototype this entity uses, if any.
Sourcepub fn heat_energy_source_prototype(&self) -> LuaHeatEnergySourcePrototype
pub fn heat_energy_source_prototype(&self) -> LuaHeatEnergySourcePrototype
The heat energy source prototype this entity uses, if any.
Sourcepub fn heating_energy(&self) -> f64
pub fn heating_energy(&self) -> f64
The energy required to keep this entity from freezing. Zero energy means it doesn’t freeze.
pub fn heating_radius(&self) -> f32
pub fn height_from_ground(&self) -> f32
pub fn held_items_display_count(&self) -> u8
pub fn held_items_offset(&self) -> f32
pub fn held_items_spread(&self) -> f32
pub fn hide_resistances(&self) -> bool
pub fn hit_at_collision_position(&self) -> bool
pub fn hit_collision_mask(&self) -> CollisionMask
Sourcepub fn icon_draw_specification(&self) -> IconDrawSpecification
pub fn icon_draw_specification(&self) -> IconDrawSpecification
The definition of where and how the alt-mode icons of this entity should be drawn.
Sourcepub fn icons_positioning(&self) -> Vec<IconSequencePositioning>
pub fn icons_positioning(&self) -> Vec<IconSequencePositioning>
The icon positioning for inventories of this entity, if defined.
pub fn ignore_target_mask(&self) -> LuaAny
pub fn immune_to_all_impacts(&self) -> bool
pub fn immune_to_cliff_impacts(&self) -> bool
pub fn immune_to_rock_impacts(&self) -> bool
pub fn immune_to_tree_impacts(&self) -> bool
Sourcepub fn indexed_guns(&self) -> Vec<LuaItemPrototype>
pub fn indexed_guns(&self) -> Vec<LuaItemPrototype>
A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
Sourcepub fn infinite_depletion_resource_amount(&self) -> u32
pub fn infinite_depletion_resource_amount(&self) -> u32
Every time this infinite resource ‘ticks’ down, it is reduced by this amount. Meaningless if this isn’t an infinite resource.
Sourcepub fn infinite_resource(&self) -> bool
pub fn infinite_resource(&self) -> bool
Whether this resource is infinite.
Sourcepub fn ingredient_count(&self) -> u32
pub fn ingredient_count(&self) -> u32
The max number of ingredients this crafting machine prototype supports.
pub fn initial_action(&self) -> Vec<TriggerItem>
pub fn initial_flame_count(&self) -> u8
pub fn initial_height(&self) -> f32
pub fn initial_lifetime(&self) -> u32
pub fn initial_speed(&self) -> Vector
pub fn initial_vertical_speed(&self) -> f32
pub fn input_connection_bounding_box(&self) -> BoundingBox
Sourcepub fn inserter_chases_belt_items(&self) -> bool
pub fn inserter_chases_belt_items(&self) -> bool
True if this inserter chases items on belts for pickup.
Sourcepub fn inserter_drop_position(&self) -> Vector
pub fn inserter_drop_position(&self) -> Vector
The drop position for this inserter.
Sourcepub fn inserter_max_belt_stack_size(&self) -> u8
pub fn inserter_max_belt_stack_size(&self) -> u8
The max belt stack size for this inserter.
Sourcepub fn inserter_pickup_position(&self) -> Vector
pub fn inserter_pickup_position(&self) -> Vector
The pickup position for this inserter.
Sourcepub fn inserter_stack_size_bonus(&self) -> u32
pub fn inserter_stack_size_bonus(&self) -> u32
The built-in stack size bonus of this inserter prototype.
Sourcepub fn instruments(&self) -> Vec<ProgrammableSpeakerInstrument>
pub fn instruments(&self) -> Vec<ProgrammableSpeakerInstrument>
The instruments for this programmable speaker.
Sourcepub fn inventory_properties(&self) -> InventoryWithCustomStackSizeSpecification
pub fn inventory_properties(&self) -> InventoryWithCustomStackSizeSpecification
Properties of custom inventory. Only provided if inventory_type is "with_custom_stack_size".
pub fn inventory_size_quality_increase(&self) -> u16
Sourcepub fn inventory_type(&self) -> LuaEntityPrototypeInventoryType
pub fn inventory_type(&self) -> LuaEntityPrototypeInventoryType
The inventory type this container or linked container uses.
Sourcepub fn inventory_weight_limit(&self) -> LuaAny
pub fn inventory_weight_limit(&self) -> LuaAny
Weight limit of the inventory if inventory_type is "with_weight_limit".
pub fn investigating_speed(&self) -> f64
pub fn is_building(&self) -> bool
Sourcepub fn is_entity_with_owner(&self) -> bool
pub fn is_entity_with_owner(&self) -> bool
True if this is entity-with-owner
Sourcepub fn is_military_target(&self) -> bool
pub fn is_military_target(&self) -> bool
True if this entity-with-owner is military target
pub fn item_pickup_distance(&self) -> f64
Sourcepub fn items_to_place_this(&self) -> Vec<ItemToPlace>
pub fn items_to_place_this(&self) -> Vec<ItemToPlace>
Items that when placed will produce this entity, if any. Construction bots will choose the first item in the list to build this entity.
pub fn joint_distance(&self) -> f64
Sourcepub fn lab_inputs(&self) -> Vec<&str>
pub fn lab_inputs(&self) -> Vec<&str>
The item prototype names that are the inputs of this lab prototype.
Sourcepub fn lamp_energy_usage(&self) -> f64
pub fn lamp_energy_usage(&self) -> f64
The lamp energy usage of this rocket silo prototype.
pub fn launch_to_space_platforms(&self) -> bool
Sourcepub fn launch_wait_time(&self) -> u8
pub fn launch_wait_time(&self) -> u8
The rocket launch delay for this rocket silo prototype.
pub fn leave_attacking_if_shoot_fails(&self) -> bool
pub fn life_time(&self) -> u16
pub fn lifetime_increase_by(&self) -> u32
pub fn lifetime_increase_cooldown(&self) -> u32
pub fn lift_weight(&self) -> LuaAny
Sourcepub fn light_blinking_speed(&self) -> f64
pub fn light_blinking_speed(&self) -> f64
The light blinking speed for this rocket silo prototype.
pub fn limit_overlapping_particles(&self) -> bool
Sourcepub fn loader_adjustable_belt_stack_size(&self) -> bool
pub fn loader_adjustable_belt_stack_size(&self) -> bool
True if this loader supports a runtime-adjustable belt stack size.
Sourcepub fn loader_max_belt_stack_size(&self) -> u8
pub fn loader_max_belt_stack_size(&self) -> u8
The max belt stack size for this loader.
pub fn loader_respect_insert_limits(&self) -> bool
Sourcepub fn loader_wait_for_full_stack(&self) -> bool
pub fn loader_wait_for_full_stack(&self) -> bool
True if this loader will not drop items for which total amount is less than a full belt stack.
Sourcepub fn logistic_mode(&self) -> LuaEntityPrototypeLogisticMode
pub fn logistic_mode(&self) -> LuaEntityPrototypeLogisticMode
The logistic mode of this logistic container.
Sourcepub fn logistic_parameters(&self) -> LuaEntityPrototypeLogisticParameters
pub fn logistic_parameters(&self) -> LuaEntityPrototypeLogisticParameters
The logistic parameters for this roboport.
Sourcepub fn logistic_radius(&self) -> f64
pub fn logistic_radius(&self) -> f64
The logistic radius for this roboport prototype.
Sourcepub fn loot(&self) -> Vec<ItemProduct>
pub fn loot(&self) -> Vec<ItemProduct>
Loot that will be dropped when this entity is killed, if any.
pub fn loot_pickup_distance(&self) -> f64
Sourcepub fn manual_range_modifier(&self) -> f64
pub fn manual_range_modifier(&self) -> f64
The manual range modifier for this artillery turret or wagon prototype.
Sourcepub fn map_color(&self) -> Color
pub fn map_color(&self) -> Color
The map color used when charting this entity if a friendly or enemy color isn’t defined, if any.
Sourcepub fn map_generator_bounding_box(&self) -> BoundingBox
pub fn map_generator_bounding_box(&self) -> BoundingBox
The bounding box used for map generator collision checking.
pub fn map_grid(&self) -> bool
Sourcepub fn max_count_of_owned_defensive_units(&self) -> f64
pub fn max_count_of_owned_defensive_units(&self) -> f64
Count of defensive enemies this spawner can sustain.
Sourcepub fn max_count_of_owned_units(&self) -> f64
pub fn max_count_of_owned_units(&self) -> f64
Count of enemies this spawner can sustain.
Sourcepub fn max_darkness_to_spawn(&self) -> f32
pub fn max_darkness_to_spawn(&self) -> f32
The maximum darkness at which this unit spawner can spawn entities.
Sourcepub fn max_defensive_friends_around_to_spawn(&self) -> f64
pub fn max_defensive_friends_around_to_spawn(&self) -> f64
How many defensive friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
Sourcepub fn max_friends_around_to_spawn(&self) -> f64
pub fn max_friends_around_to_spawn(&self) -> f64
How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
Sourcepub fn max_item_product_count(&self) -> u32
pub fn max_item_product_count(&self) -> u32
The max number of item products this crafting machine prototype supports.
Sourcepub fn max_payload_size(&self) -> u32
pub fn max_payload_size(&self) -> u32
The cargo carrying capacity of this logistics or construction robot.
Sourcepub fn max_payload_size_after_bonus(&self) -> u32
pub fn max_payload_size_after_bonus(&self) -> u32
The maximum possible cargo carrying capacity of this logistics or construction robot. Bonuses from technologies/forces can’t increase the carrying capacity beyond this number.
pub fn max_performance(&self) -> ThrusterPerformancePoint
Sourcepub fn max_polyphony(&self) -> u32
pub fn max_polyphony(&self) -> u32
The maximum polyphony for this programmable speaker.
Sourcepub fn max_pursue_distance(&self) -> f64
pub fn max_pursue_distance(&self) -> f64
The maximum pursue distance of this unit prototype.
pub fn max_records_count(&self) -> u32
pub fn max_richness_for_spawn_shift(&self) -> f64
pub fn max_separation_force(&self) -> f64
pub fn max_snap_to_train_stop_distance(&self) -> f32
pub fn max_text_length(&self) -> u32
pub fn max_text_width(&self) -> u32
Sourcepub fn max_to_charge(&self) -> f32
pub fn max_to_charge(&self) -> f32
The maximum energy for this flying robot above which it won’t try to recharge when stationing.
Sourcepub fn max_underground_distance(&self) -> u8
pub fn max_underground_distance(&self) -> u8
The max underground distance for underground belts and underground pipes.
pub fn maximum_corner_sliding_distance(&self) -> f64
pub fn maximum_damage_multiplier(&self) -> f32
pub fn maximum_lifetime(&self) -> u32
pub fn maximum_spread_count(&self) -> u16
Sourcepub fn maximum_temperature(&self) -> f64
pub fn maximum_temperature(&self) -> f64
The maximum fluid temperature of this generator prototype.
pub fn meltdown_action(&self) -> Vec<TriggerItem>
Sourcepub fn min_darkness_to_spawn(&self) -> f32
pub fn min_darkness_to_spawn(&self) -> f32
The minimum darkness at which this unit spawner can spawn entities.
pub fn min_performance(&self) -> ThrusterPerformancePoint
Sourcepub fn min_pursue_time(&self) -> u32
pub fn min_pursue_time(&self) -> u32
The minimum pursue time of this unit prototype.
Sourcepub fn min_to_charge(&self) -> f32
pub fn min_to_charge(&self) -> f32
The minimum energy for this flying robot before it tries to recharge.
Sourcepub fn mineable_properties(&self) -> MineableProperties
pub fn mineable_properties(&self) -> MineableProperties
Whether this entity is minable and what can be obtained by mining it.
pub fn minimal_arm_swing_segment_retraction(&self) -> u32
Sourcepub fn minimum_resource_amount(&self) -> u32
pub fn minimum_resource_amount(&self) -> u32
Minimum amount of this resource.
Sourcepub fn mining_drill_radius(&self) -> f64
pub fn mining_drill_radius(&self) -> f64
The mining radius of this mining drill prototype.
Sourcepub fn mining_speed(&self) -> f64
pub fn mining_speed(&self) -> f64
The mining speed of this mining drill/character prototype.
Sourcepub fn module_inventory_size(&self) -> u32
pub fn module_inventory_size(&self) -> u32
The module inventory size. nil if this entity doesn’t support modules.
Returns the inventory size if this entity is of normal quality. Use LuaEntityPrototype::get_inventory_size for other qualities.
pub fn module_slots_quality_bonus(&self) -> LuaAny
Sourcepub fn move_while_shooting(&self) -> bool
pub fn move_while_shooting(&self) -> bool
Whether this unit prototype can move while shooting.
pub fn movement_modifier(&self) -> f64
pub fn movement_modifier_when_on_ground(&self) -> f64
pub fn neighbour_bonus(&self) -> f64
pub fn neighbour_connectable(&self) -> NeighbourConnectable
Sourcepub fn next_upgrade(&self) -> LuaEntityPrototype
pub fn next_upgrade(&self) -> LuaEntityPrototype
The next upgrade for this entity, if any.
Sourcepub fn normal_resource_amount(&self) -> u32
pub fn normal_resource_amount(&self) -> u32
The normal amount for this resource.
pub fn not_buildable_if_no_rails(&self) -> bool
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.
pub fn on_damage_tick_effect(&self) -> Vec<TriggerItem>
pub fn on_fuel_added_action(&self) -> Vec<TriggerItem>
pub fn open_door_trigger_effect(&self) -> Vec<TriggerEffectItem>
pub fn opened_collision_mask(&self) -> CollisionMask
pub fn opening_speed(&self) -> f32
pub fn orientations(&self) -> OrientedCliffPrototypeSet
pub fn output_connection_bounding_box(&self) -> BoundingBox
pub fn overkill_fraction(&self) -> f32
pub fn particle(&self) -> LuaParticlePrototype
pub fn particle_buffer_size(&self) -> u16
pub fn particle_count(&self) -> u8
pub fn particle_height(&self) -> DeviatedValue
pub fn particle_horizontal_speed(&self) -> DeviatedValue
pub fn particle_spawn_interval(&self) -> u16
pub fn particle_spawn_timeout(&self) -> u16
pub fn particle_time_before_start(&self) -> DeviatedValue
pub fn particle_time_to_live(&self) -> DeviatedValue
pub fn particle_vertical_acceleration(&self) -> f32
pub fn particle_vertical_speed(&self) -> DeviatedValue
pub fn passive_energy_usage(&self) -> f64
pub fn patrolling_speed(&self) -> f64
pub fn patrolling_turn_radius(&self) -> f64
pub fn per_lane_filters(&self) -> bool
pub fn perceived_performance(&self) -> PerceivedPerformance
pub fn piercing_damage(&self) -> f32
pub fn place_as_crater(&self) -> CraterPlacementDefinition
Sourcepub fn platform_repair_speed_modifier(&self) -> f32
pub fn platform_repair_speed_modifier(&self) -> f32
Repair speed of entities is multiplied by this value when they are on a space platform with this hub prototype.
Sourcepub fn platform_weight(&self) -> LuaAny
pub fn platform_weight(&self) -> LuaAny
Weight which this entity adds to total space platform weight when placed.
pub fn prepare_with_no_ammo(&self) -> bool
pub fn preserve_contents_when_created(&self) -> bool
Sourcepub fn profile(&self) -> Vec<f64>
pub fn profile(&self) -> Vec<f64>
The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver
pub fn progress_to_create_smoke(&self) -> f32
Sourcepub fn protected_from_tile_building(&self) -> bool
pub fn protected_from_tile_building(&self) -> bool
True if this entity prototype should be included during tile collision checks with LuaTilePrototype::check_collision_with_entities enabled.
pub fn pulse_duration(&self) -> u32
pub fn quality_affects_capacity(&self) -> bool
pub fn quality_affects_energy_usage(&self) -> bool
pub fn quality_affects_inventory_size(&self) -> bool
pub fn quality_affects_max_speed(&self) -> bool
pub fn quality_affects_mining_radius(&self) -> bool
pub fn quality_affects_module_slots(&self) -> bool
pub fn quality_affects_supply_area_distance(&self) -> bool
pub fn radar_range(&self) -> u32
Sourcepub fn radius(&self) -> f64
pub fn radius(&self) -> f64
The radius of this entity prototype. The radius is defined as half the distance between the top left corner and bottom right corner of the collision box.
pub fn radius_visualisation_specification( &self, ) -> RadiusVisualisationSpecification
pub fn raise_rocket_trigger(&self) -> Vec<TriggerEffectItem>
pub fn random_corpse_variation(&self) -> bool
pub fn random_growth_offset(&self) -> f64
pub fn randomize_planting_tile(&self) -> bool
pub fn range_from_player(&self) -> f64
pub fn reach_distance(&self) -> u32
pub fn reach_resource_distance(&self) -> f64
pub fn recharge_minimum(&self) -> f64
pub fn regular_trigger_effect(&self) -> Vec<TriggerEffectItem>
pub fn regular_trigger_effect_frequency(&self) -> u32
Sourcepub fn remains_when_mined(&self) -> Vec<LuaEntityPrototype>
pub fn remains_when_mined(&self) -> Vec<LuaEntityPrototype>
The remains left behind when this entity is mined.
Sourcepub fn remove_decoratives(&self) -> LuaEntityPrototypeRemoveDecoratives
pub fn remove_decoratives(&self) -> LuaEntityPrototypeRemoveDecoratives
Whether this entity should remove decoratives that collide with it when this entity is built.
pub fn remove_on_entity_placement(&self) -> bool
pub fn remove_on_tile_collision(&self) -> bool
pub fn remove_on_tile_placement(&self) -> bool
Sourcepub fn repair_speed_modifier(&self) -> f32
pub fn repair_speed_modifier(&self) -> f32
Repair-speed modifier for this entity, if any. Actual repair speed will be tool_repair_speed * entity_repair_speed_modifier.
Sourcepub fn require_charge_to_mine(&self) -> bool
pub fn require_charge_to_mine(&self) -> bool
If this robot with logistic interface requires it be charged to manually mine.
Sourcepub fn require_resources_to_place(&self) -> bool
pub fn require_resources_to_place(&self) -> bool
If this drill requires minable resources before it can be placed.
Sourcepub fn resistances(&self) -> HashMap<String, Resistance>
pub fn resistances(&self) -> HashMap<String, Resistance>
List of resistances towards each damage type. It is a dictionary indexed by damage type names (see data/base/prototypes/damage-type.lua).
Sourcepub fn resource_categories(&self) -> HashMap<String, bool>
pub fn resource_categories(&self) -> HashMap<String, bool>
The resource categories this character or mining drill supports.
The value in the dictionary is meaningless and exists just to allow for easy lookup.
Sourcepub fn resource_category(&self) -> &str
pub fn resource_category(&self) -> &str
Name of the category of this resource.
During data stage, this property is named “category”.
Sourcepub fn resource_drain_rate_percent(&self) -> u8
pub fn resource_drain_rate_percent(&self) -> u8
The resource drain rate percent of this mining drill prototype.
pub fn resource_patch_search_radius(&self) -> u32
pub fn respawn_time(&self) -> u32
Sourcepub fn result_units(&self) -> Vec<UnitSpawnDefinition>
pub fn result_units(&self) -> Vec<UnitSpawnDefinition>
The result units and spawn points with weight and evolution factor for a biter spawner entity.
pub fn reveal_map(&self) -> bool
Sourcepub fn revenge_attack_parameters(&self) -> AttackParameters
pub fn revenge_attack_parameters(&self) -> AttackParameters
The revenge attack parameters for this entity, if any. These attack parameters are used in addition to LuaEntityPrototype::attack_parameters if the entity is attacking a target that has previously dealt damage to the entity.
pub fn reversing_power_modifier(&self) -> f64
pub fn rewire_neighbours_when_destroying(&self) -> bool
Sourcepub fn rising_speed(&self) -> f64
pub fn rising_speed(&self) -> f64
The rising speed for this rocket silo rocket prototype.
pub fn rocket_dying_explosion(&self) -> LuaEntityPrototype
pub fn rocket_engine_starting_speed_modifier_per_quality_level(&self) -> f64
Sourcepub fn rocket_entity_prototype(&self) -> LuaEntityPrototype
pub fn rocket_entity_prototype(&self) -> LuaEntityPrototype
The rocket entity prototype associated with this rocket silo prototype.
Sourcepub fn rocket_parts_required(&self) -> u32
pub fn rocket_parts_required(&self) -> u32
The rocket parts required for this rocket silo prototype.
pub fn rocket_parts_storage_cap(&self) -> u32
pub fn rocket_quick_relaunch_start_offset(&self) -> f64
Sourcepub fn rocket_rising_delay(&self) -> u8
pub fn rocket_rising_delay(&self) -> u8
The rocket rising delay for this rocket silo prototype.
pub fn rocket_rising_speed_modifier_per_quality_level(&self) -> f64
pub fn rotatable(&self) -> bool
Sourcepub fn rotation_snap_angle(&self) -> f64
pub fn rotation_snap_angle(&self) -> f64
The rotation snap angle of this car prototype.
Sourcepub fn rotation_speed(&self) -> f64
pub fn rotation_speed(&self) -> f64
The rotation speed of this car prototype.
Sourcepub fn running_speed(&self) -> f64
pub fn running_speed(&self) -> f64
The movement speed of this character prototype.
pub fn scale_energy_usage(&self) -> bool
Sourcepub fn scale_fluid_usage(&self) -> bool
pub fn scale_fluid_usage(&self) -> bool
Whether this generator prototype scales fluid usage.
Sourcepub fn science_pack_drain_rate_percent(&self) -> u8
pub fn science_pack_drain_rate_percent(&self) -> u8
How much science pack durability is required to research one science point.
pub fn search_radius(&self) -> f64
Sourcepub fn secondary_collision_box(&self) -> BoundingBox
pub fn secondary_collision_box(&self) -> BoundingBox
The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.
pub fn segment_engine(&self) -> SegmentEngineSpecification
Sourcepub fn selectable_in_game(&self) -> bool
pub fn selectable_in_game(&self) -> bool
Is this entity selectable?
Sourcepub fn selection_box(&self) -> BoundingBox
pub fn selection_box(&self) -> BoundingBox
The bounding box used for drawing selection.
Sourcepub fn selection_priority(&self) -> u32
pub fn selection_priority(&self) -> u32
The selection priority of this entity - a value between 0 and 255.
pub fn separation_force_factor(&self) -> f64
pub fn separation_range(&self) -> f64
pub fn shadow_slave_entity(&self) -> LuaEntityPrototype
pub fn shoot_in_prepare_state(&self) -> bool
Sourcepub fn shooting_cursor_size(&self) -> f32
pub fn shooting_cursor_size(&self) -> f32
The cursor size used when shooting at this entity.
pub fn shot_category(&self) -> LuaAmmoCategoryPrototype
pub fn shots_per_flare(&self) -> u32
pub fn should_ground_target(&self) -> bool
pub fn shuffle_resources_to_mine(&self) -> bool
pub fn smoke(&self) -> LuaTrivialSmokePrototype
pub fn smoke_count(&self) -> u16
pub fn smoke_sources(&self) -> Vec<SmokeSource>
pub fn snap_to_spots_distance(&self) -> f32
pub fn solar_panel_performance_at_day(&self) -> f64
pub fn solar_panel_performance_at_night(&self) -> f64
pub fn solar_panel_solar_coefficient_property( &self, ) -> LuaSurfacePropertyPrototype
pub fn source_offset(&self) -> Vector
pub fn source_variance(&self) -> Vector
pub fn spawn_blocked_trigger(&self) -> Vec<TriggerItem>
Sourcepub fn spawn_cooldown(&self) -> LuaEntityPrototypeSpawnCooldown
pub fn spawn_cooldown(&self) -> LuaEntityPrototypeSpawnCooldown
The spawning cooldown for this enemy spawner prototype.
pub fn spawn_decoration(&self) -> Vec<TriggerEffectItem>
pub fn spawn_decorations_on_expansion(&self) -> bool
pub fn spawn_entity(&self) -> LuaEntityPrototype
Sourcepub fn spawning_radius(&self) -> f64
pub fn spawning_radius(&self) -> f64
How far from the spawner can the units be spawned.
Sourcepub fn spawning_spacing(&self) -> f64
pub fn spawning_spacing(&self) -> f64
What spaces should be between the spawned units.
Sourcepub fn spawning_time_modifier(&self) -> f64
pub fn spawning_time_modifier(&self) -> f64
The spawning time modifier of this unit prototype.
pub fn special_neutral_target_damage(&self) -> DamageParameters
pub fn speed_modifier(&self) -> Vector
Sourcepub fn speed_multiplier_when_out_of_energy(&self) -> f32
pub fn speed_multiplier_when_out_of_energy(&self) -> f32
The speed multiplier when this flying robot is out of energy.
pub fn spent_fluid(&self) -> SpentFluidSpecification
pub fn spider_engine(&self) -> SpiderEngineSpecification
pub fn spread_delay(&self) -> u32
pub fn spread_delay_deviation(&self) -> u32
pub fn start_attacking_only_when_can_shoot(&self) -> bool
pub fn steering_settings(&self) -> SteeringSettings
Sourcepub fn sticker_box(&self) -> BoundingBox
pub fn sticker_box(&self) -> BoundingBox
The bounding box used to attach sticker type entities.
pub fn sticker_movement_modifiers( &self, ) -> LuaEntityPrototypeStickerMovementModifiers
pub fn sticker_vehicle_modifiers( &self, ) -> LuaEntityPrototypeStickerVehicleModifiers
pub fn stickers_per_square_meter(&self) -> f32
pub fn stream_particle_horizontal_speed(&self) -> f32
pub fn stream_particle_horizontal_speed_deviation(&self) -> f32
pub fn strike_effect(&self) -> Vec<TriggerItem>
pub fn support_range(&self) -> f32
Sourcepub fn supports_direction(&self) -> bool
pub fn supports_direction(&self) -> bool
Whether this entity prototype could possibly ever be rotated.
Sourcepub fn surface_conditions(&self) -> Vec<SurfaceCondition>
pub fn surface_conditions(&self) -> Vec<SurfaceCondition>
The surface conditions required to build this entity.
pub fn synced_footstep_particle_triggers(&self) -> LuaAny
Sourcepub fn tank_driving(&self) -> bool
pub fn tank_driving(&self) -> bool
If this car prototype uses tank controls to drive.
pub fn target_initial_position_only(&self) -> bool
pub fn target_position_deviation(&self) -> f64
Sourcepub fn target_temperature(&self) -> f32
pub fn target_temperature(&self) -> f32
The target temperature of this boiler or fusion reactor prototype. If nil on a fusion reactor, the target temperature is the default temperature of the output fluid.
Sourcepub fn terrain_friction_modifier(&self) -> f32
pub fn terrain_friction_modifier(&self) -> f32
The terrain friction modifier for this vehicle.
pub fn territory_radius(&self) -> u32
pub fn tether_size(&self) -> f32
pub fn ticks_per_scan(&self) -> u32
pub fn ticks_to_keep_aiming_direction(&self) -> u32
pub fn ticks_to_keep_gun(&self) -> u32
pub fn ticks_to_stay_in_combat(&self) -> u32
pub fn tie_distance(&self) -> f64
pub fn tile_buildability_rules(&self) -> Vec<TileBuildabilityRule>
Sourcepub fn tile_height(&self) -> u32
pub fn tile_height(&self) -> u32
Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
Sourcepub fn tile_width(&self) -> u32
pub fn tile_width(&self) -> u32
Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
pub fn time_to_capture(&self) -> u32
pub fn time_to_damage(&self) -> u16
Sourcepub fn time_to_live(&self) -> u32
pub fn time_to_live(&self) -> u32
The time to live for this prototype or 0 if prototype doesn’t have time_to_live or time_before_removed.
pub fn timeout_to_close(&self) -> u32
pub fn tool_attack_distance(&self) -> f64
pub fn tool_attack_result(&self) -> Vec<TriggerItem>
Sourcepub fn torso_bob_speed(&self) -> f64
pub fn torso_bob_speed(&self) -> f64
The torso bob speed of this spider vehicle prototype.
Sourcepub fn torso_rotation_speed(&self) -> f64
pub fn torso_rotation_speed(&self) -> f64
The torso rotation speed of this spider vehicle prototype.
pub fn track_coverage_during_drag_building(&self) -> bool
pub fn track_particle_triggers(&self) -> LuaAny
pub fn transition_collision_mask(&self) -> CollisionMask
Sourcepub fn tree_color_count(&self) -> u8
pub fn tree_color_count(&self) -> u8
If it is a tree, return the number of colors it supports.
pub fn tree_dying_factor(&self) -> f32
pub fn tree_removal_max_distance(&self) -> f64
pub fn tree_removal_probability(&self) -> f64
Sourcepub fn trigger_collision_mask(&self) -> CollisionMask
pub fn trigger_collision_mask(&self) -> CollisionMask
The collision mask entities must collide with to make this landmine blow up.
pub fn trigger_force(&self) -> ForceCondition
pub fn trigger_interval(&self) -> u32
pub fn trigger_radius(&self) -> f64
Sourcepub fn trigger_target_mask(&self) -> HashMap<String, bool>
pub fn trigger_target_mask(&self) -> HashMap<String, bool>
The trigger target mask for this entity prototype type.
The values in the dictionary are meaningless and exists just to allow the dictionary type for easy lookup.
pub fn turn_radius(&self) -> f64
pub fn turn_smoothing(&self) -> f64
pub fn turn_speed(&self) -> f32
pub fn turning_speed_increases_exponentially_with_projectile_speed( &self, ) -> bool
pub fn turret_base_has_direction(&self) -> bool
pub fn turret_prepare_range(&self) -> f64
Sourcepub fn turret_range(&self) -> u32
pub fn turret_range(&self) -> u32
The range of this turret.
Sourcepub fn turret_rotation_speed(&self) -> f32
pub fn turret_rotation_speed(&self) -> f32
The turret rotation speed of this prototype.
pub fn two_direction_only(&self) -> bool
pub fn unpowered_arm_speed_scale(&self) -> f32
Sourcepub fn update_effects(&self) -> Vec<TriggerEffectWithCooldown>
pub fn update_effects(&self) -> Vec<TriggerEffectWithCooldown>
The trigger effects to run every tick when on cooldown.
Sourcepub fn update_effects_while_enraged(&self) -> Vec<TriggerEffectWithCooldown>
pub fn update_effects_while_enraged(&self) -> Vec<TriggerEffectWithCooldown>
The trigger effects to run every tick when on cooldown while the owning LuaSegmentedUnit is enraged.
pub fn use_damage_substitute(&self) -> bool
pub fn use_easter_egg(&self) -> bool
Sourcepub fn use_exact_mode(&self) -> bool
pub fn use_exact_mode(&self) -> bool
Whether this logistic container prototype uses exact mode
pub fn use_mirroring(&self) -> bool
pub fn use_unloading_distance_limit(&self) -> bool
pub fn uses_alternative_behavior(&self) -> bool
Sourcepub fn uses_force_mining_productivity_bonus(&self) -> bool
pub fn uses_force_mining_productivity_bonus(&self) -> bool
If this drill uses force productivity bonus
pub fn uses_inserter_stack_size_bonus(&self) -> bool
Sourcepub fn uses_quality_drain_modifier(&self) -> bool
pub fn uses_quality_drain_modifier(&self) -> bool
If this lab uses the quality drain modifier when consuming science packs.
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 valve_mode(&self) -> ValveMode
pub fn valve_mode(&self) -> ValveMode
The mode of operation of this valve.
Sourcepub fn valve_threshold(&self) -> f32
pub fn valve_threshold(&self) -> f32
The default threshold of this valve.
pub fn vector_to_place_result(&self) -> Vector
Sourcepub fn vertical_selection_shift(&self) -> f64
pub fn vertical_selection_shift(&self) -> f64
Vertical selection shift used by rolling stocks. It affects selection box vertical position but is also used to shift rolling stock graphics along the rails to fine tune train’s look.
Sourcepub fn vision_distance(&self) -> f64
pub fn vision_distance(&self) -> f64
The vision distance of this unit prototype.
Sourcepub fn void_energy_source_prototype(&self) -> LuaVoidEnergySourcePrototype
pub fn void_energy_source_prototype(&self) -> LuaVoidEnergySourcePrototype
The void energy source prototype this entity uses, if any.
pub fn wait_for_full_hand(&self) -> bool
pub fn width(&self) -> f32
pub fn get_attraction_range_elongation( &self, quality: Option<LuaAny>, ) -> Option<f64>
Sourcepub fn get_crafting_speed(&self, quality: Option<LuaAny>) -> f64
pub fn get_crafting_speed(&self, quality: Option<LuaAny>) -> f64
The crafting speed of this crafting-machine or character.
pub fn get_duration(&self, quality: Option<LuaAny>) -> Option<u32>
pub fn get_energy_distribution_efficiency( &self, quality: Option<LuaAny>, ) -> Option<f64>
Sourcepub fn get_fluid_capacity(&self, quality: Option<LuaAny>) -> f64
pub fn get_fluid_capacity(&self, quality: Option<LuaAny>) -> f64
Gets the fluid capacity of this entity or 0 if this entity doesn’t support fluids.
Crafting machines will report 0 due to their fluid capacity being whatever a given recipe needs.
Sourcepub fn get_fluid_usage_per_tick(&self, quality: Option<LuaAny>) -> Option<f64>
pub fn get_fluid_usage_per_tick(&self, quality: Option<LuaAny>) -> Option<f64>
The fluid usage of this generator, fusion generator or fusion reactor prototype.
Sourcepub fn get_inserter_extension_speed(
&self,
quality: Option<LuaAny>,
) -> Option<f64>
pub fn get_inserter_extension_speed( &self, quality: Option<LuaAny>, ) -> Option<f64>
The extension speed of this inserter.
Sourcepub fn get_inserter_rotation_speed(
&self,
quality: Option<LuaAny>,
) -> Option<f64>
pub fn get_inserter_rotation_speed( &self, quality: Option<LuaAny>, ) -> Option<f64>
The rotation speed of this inserter.
Sourcepub fn get_inventory_size(
&self,
index: &str,
quality: Option<LuaAny>,
) -> Option<u16>
pub fn get_inventory_size( &self, index: &str, quality: Option<LuaAny>, ) -> Option<u16>
Gets the base size of the given inventory on this entity or nil if the given inventory doesn’t exist.
pub fn get_inventory_size_bonus(&self, quality: Option<LuaAny>) -> Option<u16>
Sourcepub fn get_max_circuit_wire_distance(&self, quality: Option<LuaAny>) -> f64
pub fn get_max_circuit_wire_distance(&self, quality: Option<LuaAny>) -> f64
The maximum circuit wire distance for this entity. 0 if the entity doesn’t support circuit wires.
Sourcepub fn get_max_distance_of_nearby_sector_revealed(
&self,
quality: Option<LuaAny>,
) -> Option<u32>
pub fn get_max_distance_of_nearby_sector_revealed( &self, quality: Option<LuaAny>, ) -> Option<u32>
The radius of the area constantly revealed by this radar, or cargo landing pad, in chunks.
Sourcepub fn get_max_distance_of_sector_revealed(
&self,
quality: Option<LuaAny>,
) -> Option<u32>
pub fn get_max_distance_of_sector_revealed( &self, quality: Option<LuaAny>, ) -> Option<u32>
The radius of the area this radar can chart, in chunks.
Sourcepub fn get_max_energy(&self, quality: Option<LuaAny>) -> Option<f64>
pub fn get_max_energy(&self, quality: Option<LuaAny>) -> Option<f64>
The max energy for this flying robot prototype.
Sourcepub fn get_max_energy_production(&self, quality: Option<LuaAny>) -> f64
pub fn get_max_energy_production(&self, quality: Option<LuaAny>) -> f64
The theoretical maximum energy production for this entity.
Sourcepub fn get_max_energy_usage(&self, quality: Option<LuaAny>) -> f64
pub fn get_max_energy_usage(&self, quality: Option<LuaAny>) -> f64
The theoretical maximum energy usage for this entity.
Sourcepub fn get_max_health(&self, quality: Option<LuaAny>) -> f32
pub fn get_max_health(&self, quality: Option<LuaAny>) -> f32
Max health of this entity. Will be 0 if this is not an entity with health.
Sourcepub fn get_max_power_output(&self, quality: Option<LuaAny>) -> Option<f64>
pub fn get_max_power_output(&self, quality: Option<LuaAny>) -> Option<f64>
The maximum power output of this burner generator or generator prototype.
Sourcepub fn get_max_speed(&self, quality: Option<LuaAny>) -> Option<f64>
pub fn get_max_speed(&self, quality: Option<LuaAny>) -> Option<f64>
The maximum speed of this rolling stock if defined.
Sourcepub fn get_max_wire_distance(&self, quality: Option<LuaAny>) -> f64
pub fn get_max_wire_distance(&self, quality: Option<LuaAny>) -> f64
The maximum wire distance for this entity. 0 if the entity doesn’t support wires.
Sourcepub fn get_mining_drill_radius(&self, quality: Option<LuaAny>) -> Option<f64>
pub fn get_mining_drill_radius(&self, quality: Option<LuaAny>) -> Option<f64>
The mining radius of this mining drill prototype.
Sourcepub fn get_pumping_speed(&self, quality: Option<LuaAny>) -> f64
pub fn get_pumping_speed(&self, quality: Option<LuaAny>) -> f64
The pumping speed of this offshore pump or normal pump.
Sourcepub fn get_researching_speed(&self, quality: Option<LuaAny>) -> Option<f64>
pub fn get_researching_speed(&self, quality: Option<LuaAny>) -> Option<f64>
The base researching speed of this lab prototype.
Sourcepub fn get_supply_area_distance(&self, quality: Option<LuaAny>) -> f64
pub fn get_supply_area_distance(&self, quality: Option<LuaAny>) -> f64
The supply area of this electric pole or beacon prototype.
Sourcepub fn get_valve_flow_rate(&self, quality: Option<LuaAny>) -> f64
pub fn get_valve_flow_rate(&self, quality: Option<LuaAny>) -> f64
The maximum flow rate through this valve.
Sourcepub fn has_flag(&self, flag: EntityPrototypeFlag) -> bool
pub fn has_flag(&self, flag: EntityPrototypeFlag) -> bool
Test whether this entity prototype has a certain flag set.
Trait Implementations§
Source§impl Clone for LuaEntityPrototype
impl Clone for LuaEntityPrototype
Source§fn clone(&self) -> LuaEntityPrototype
fn clone(&self) -> LuaEntityPrototype
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more