Skip to main content

LuaEntityPrototype

Struct LuaEntityPrototype 

Source
pub struct LuaEntityPrototype;
Expand description

Prototype of an entity.

Implementations§

Source§

impl LuaEntityPrototype

Source

pub fn custom_tooltip_fields(&self) -> Vec<CustomTooltipField>

Extra description items in the tooltip and Factoriopedia.

Source

pub fn factoriopedia_description(&self) -> &str

Provides additional description used in factoriopedia.

Source

pub fn group(&self) -> LuaGroup

Group of this prototype.

Source

pub fn hidden(&self) -> bool

Source

pub fn hidden_in_factoriopedia(&self) -> bool

Source

pub fn localised_description(&self) -> &str

Source

pub fn localised_name(&self) -> &str

Source

pub fn name(&self) -> &str

Name of this prototype.

Source

pub fn order(&self) -> &str

The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.

Source

pub fn parameter(&self) -> bool

Source

pub fn subgroup(&self) -> LuaGroup

Subgroup of this prototype.

Source

pub fn type(&self) -> &str

Type of this prototype.

Source

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

Source

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.

Source

pub fn acceleration(&self) -> f64

Source

pub fn acceleration_rate(&self) -> f64

Source

pub fn accepted_seeds(&self) -> Vec<&str>

Source

pub fn action(&self) -> Vec<TriggerItem>

Source

pub fn action_cooldown(&self) -> u32

Source

pub fn action_triggered_automatically(&self) -> bool

Source

pub fn activation_buffer_ratio(&self) -> LuaAny

Source

pub fn activation_distance(&self) -> f64

Source

pub fn active_energy_usage(&self) -> f64

The active energy usage of this rocket silo or combinator prototype.

Source

pub fn add_fuel_cooldown(&self) -> u32

Source

pub fn additional_pastable_entities(&self) -> Vec<LuaEntityPrototype>

Entities this entity can be pasted onto in addition to the normal allowed ones.

Source

pub fn affected_by_tiles(&self) -> bool

Whether this unit prototype is affected by tile walking speed modifiers.

Source

pub fn agricultural_tower_radius(&self) -> f64

Source

pub fn ai_settings(&self) -> UnitAISettings

Source

pub fn air_resistance(&self) -> f64

The air resistance of this rolling stock prototype.

Source

pub fn alarm_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn alert_after_time(&self) -> u32

Source

pub fn alert_icon_scale(&self) -> f32

The alert icon scale of this entity prototype.

Source

pub fn alert_icon_shift(&self) -> Vector

The alert icon shift of this entity prototype.

Source

pub fn alert_when_attacking(&self) -> bool

Whether this turret raises an alert when attacking

Source

pub fn alert_when_damaged(&self) -> bool

Whether this entity raises an alert when damaged.

Source

pub fn allow_access_to_all_forces(&self) -> bool

Whether this market allows access to all forces or just friendly ones.

Source

pub fn allow_blueprint_connection(&self) -> bool

Source

pub fn allow_burner_leech(&self) -> bool

Whether this inserter allows burner leeching.

Source

pub fn allow_clone_connection(&self) -> bool

Source

pub fn allow_container_interaction(&self) -> bool

Source

pub fn allow_copy_paste(&self) -> bool

When false copy-paste is not allowed for this entity.

Source

pub fn allow_custom_vectors(&self) -> bool

Whether this inserter allows custom pickup and drop vectors.

Source

pub fn allow_manual_color(&self) -> bool

Source

pub fn allow_passengers(&self) -> bool

Whether this vehicle allows passengers.

Source

pub fn allow_rail_interaction(&self) -> bool

Source

pub fn allow_robot_dispatch_in_automatic_mode(&self) -> bool

Source

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)

Source

pub fn allow_side_loading(&self) -> bool

Source

pub fn allow_turning_when_starting_attack(&self) -> bool

Source

pub fn allow_unloading(&self) -> bool

Source

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

The allowed module effects for this entity, if any.

Source

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

The allowed module categories for this entity, if any.

Source

pub fn always_on(&self) -> bool

Whether the lamp is always on (except when out of power or turned off by the circuit network).

Source

pub fn ammo_category(&self) -> &str

Name of the ammo category of this land mine.

Source

pub fn ammo_stack_limit(&self) -> u32

The max stack size of ammo in this artillery turret or artillery wagon.

Source

pub fn animation_speed_coefficient(&self) -> f64

The animation speed coefficient of this belt connectable prototype.

Source

pub fn arm_angular_speed_cap_base(&self) -> f32

Source

pub fn arm_angular_speed_cap_quality_scaling(&self) -> f32

Source

pub fn arm_color_gradient(&self) -> Vec<Color>

Source

pub fn arm_count_base(&self) -> u32

Source

pub fn arm_count_quality_scaling(&self) -> u32

Source

pub fn arm_energy_usage(&self) -> f64

Source

pub fn arm_inventory_size_quality_increase(&self) -> u16

Source

pub fn arm_slow_energy_usage(&self) -> f64

Source

pub fn arm_speed_base(&self) -> f32

Source

pub fn arm_speed_quality_scaling(&self) -> f32

Source

pub fn arms_speed_modifier_per_quality_level(&self) -> f64

Source

pub fn attach_to_target(&self) -> bool

Source

pub fn attack_parameters(&self) -> AttackParameters

The attack parameters for this entity, if any.

Source

pub fn attack_reaction(&self) -> Vec<AttackReactionItem>

Source

pub fn attack_result(&self) -> Vec<TriggerItem>

The attack result of this entity, if any.

Source

pub fn attack_target_mask(&self) -> LuaAny

Source

pub fn attacking_speed(&self) -> f64

Source

pub fn attractor_hit_effect(&self) -> Vec<TriggerItem>

Source

pub fn auto_connect_up_to_n_wires(&self) -> u8

Source

pub fn auto_setup_collision_box(&self) -> bool

Source

pub fn auto_sort_inventory(&self) -> bool

Source

pub fn automated_ammo_count(&self) -> u32

The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.

Source

pub fn automatic_weapon_cycling(&self) -> bool

Whether this spider vehicle prototype automatically cycles weapons.

Source

pub fn autoplace_specification(&self) -> AutoplaceSpecification

Autoplace specification for this entity prototype, if any.

Source

pub fn beacon_counter(&self) -> LuaEntityPrototypeBeaconCounter

The beacon counter used by effect receiver when deciding which sample to take from beacon profile.

Source

pub fn belt_distance(&self) -> f64

Source

pub fn belt_length(&self) -> f64

Source

pub fn belt_speed(&self) -> f64

The speed of this transport belt.

Source

pub fn boiler_mode(&self) -> LuaEntityPrototypeBoilerMode

The boiler operation mode of this boiler prototype.

Source

pub fn braking_force(&self) -> f64

The braking force of this vehicle prototype.

Source

pub fn build_distance(&self) -> u32

Source

pub fn building_grid_bit_shift(&self) -> u32

The log2 of grid size of the building.

Source

pub fn bulk(&self) -> bool

Whether this inserter is a bulk-type.

Source

pub fn burner_prototype(&self) -> LuaBurnerPrototype

The burner energy source prototype this entity uses, if any.

Source

pub fn burns_fluid(&self) -> bool

Whether this generator prototype burns fluid.

Source

pub fn call_for_help_radius(&self) -> f64

Source

pub fn can_launch_without_landing_pads(&self) -> bool

Source

pub fn can_open_gates(&self) -> bool

Whether this unit prototype can open gates.

Source

pub fn can_retarget_while_starting_attack(&self) -> bool

Source

pub fn cant_insert_at_source_message_key(&self) -> &str

Source

pub fn capture_speed(&self) -> f64

Source

pub fn captured_spawner_entity(&self) -> LuaEntityPrototype

Source

pub fn cargo_pod_entity(&self) -> LuaEntityPrototype

Source

pub fn cargo_station_parameters(&self) -> CargoStationParameters

Source

pub fn chain_shooting_cooldown_modifier(&self) -> f64

The chain shooting cooldown modifier of this spider vehicle prototype.

Source

pub fn character_corpse(&self) -> LuaEntityPrototype

Source

pub fn chunk_exploration_radius(&self) -> f64

The chunk exploration radius of this vehicle prototype.

Source

pub fn clamps_off_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn clamps_on_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn cliff_explosive_prototype(&self) -> &str

The item prototype name used to destroy this cliff.

Source

pub fn cliff_removal_probability(&self) -> f64

Source

pub fn close_door_trigger_effect(&self) -> Vec<TriggerEffectItem>

Source

pub fn collection_box_offset(&self) -> f32

Source

pub fn collision_box(&self) -> BoundingBox

The bounding box used for collision checking.

Source

pub fn collision_mask(&self) -> CollisionMask

The collision masks this entity uses

Source

pub fn collision_mask_allow_on_deep_oil_ocean(&self) -> CollisionMask

Source

pub fn collision_mask_collides_with_self(&self) -> bool

Does this prototype collision mask collide with itself?

Source

pub fn collision_mask_collides_with_tiles_only(&self) -> bool

Does this prototype collision mask collide with tiles only?

Source

pub fn collision_mask_considers_tile_transitions(&self) -> bool

Does this prototype collision mask consider tile transitions?

Source

pub fn color(&self) -> Color

The color of the prototype, if any.

Source

pub fn combat_robot_friction(&self) -> f64

Source

pub fn connectable_box(&self) -> BoundingBox

Source

pub fn connection_category(&self) -> Vec<&str>

Source

pub fn connection_distance(&self) -> f64

Source

pub fn connects_to_other_radars(&self) -> bool

Source

pub fn construction_radius(&self) -> f64

The construction radius for this roboport prototype.

Source

pub fn consumption(&self) -> f64

The energy consumption of this car prototype.

Source

pub fn container_distance(&self) -> f64

Source

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.

Source

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.

Source

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.

Source

pub fn crafting_speed_quality_multiplier(&self) -> LuaAny

Source

pub fn crane_energy_usage(&self) -> f64

The crane energy usage of this agricultural tower prototype.

Source

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.

Source

pub fn created_effect(&self) -> Vec<TriggerItem>

The trigger to run when this entity is created, if any.

Source

pub fn created_smoke(&self) -> LuaEntityPrototypeCreatedSmoke

The smoke trigger run when this entity is built, if any.

Source

pub fn creation_shift(&self) -> Vector

Source

pub fn custom_input_slot_tooltip_key(&self) -> &str

Source

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.

Source

pub fn damage_hit_tint(&self) -> Color

Source

pub fn damage_interval(&self) -> u32

Source

pub fn damage_multiplier_decrease_per_tick(&self) -> f32

Source

pub fn damage_multiplier_increase_per_added_fuel(&self) -> f32

Source

pub fn damage_per_hp(&self) -> f32

Source

pub fn damage_per_tick(&self) -> DamageParameters

Source

pub fn damaged_trigger_effect(&self) -> Vec<TriggerEffectItem>

Source

pub fn darkness_for_all_lamps_off(&self) -> f32

Value between 0 and 1 darkness where all lamps of this lamp prototype are off.

Source

pub fn darkness_for_all_lamps_on(&self) -> f32

Value between 0 and 1 darkness where all lamps of this lamp prototype are on.

Source

pub fn default_available_construction_output_signal(&self) -> SignalID

Source

pub fn default_available_logistic_output_signal(&self) -> SignalID

Source

pub fn default_blue_output_signal(&self) -> SignalID

Source

pub fn default_blue_signal(&self) -> SignalID

Source

pub fn default_copy_color_from_train_stop(&self) -> bool

Source

pub fn default_day_length_output_signal(&self) -> SignalID

Source

pub fn default_day_tick_output_signal(&self) -> SignalID

Source

pub fn default_game_tick_output_signal(&self) -> SignalID

Source

pub fn default_green_output_signal(&self) -> SignalID

Source

pub fn default_green_signal(&self) -> SignalID

Source

pub fn default_orange_output_signal(&self) -> SignalID

Source

pub fn default_output_signal(&self) -> SignalID

Source

pub fn default_recipe_finished_signal(&self) -> SignalID

Source

pub fn default_red_output_signal(&self) -> SignalID

Source

pub fn default_red_signal(&self) -> SignalID

Source

pub fn default_rgb_signal(&self) -> SignalID

Source

pub fn default_roboport_count_output_signal(&self) -> SignalID

Source

pub fn default_stack_control_input_signal(&self) -> SignalID

Source

pub fn default_status(&self) -> &str

Source

pub fn default_technology_level_signal(&self) -> SignalID

Source

pub fn default_temperature_signal(&self) -> SignalID

Source

pub fn default_total_construction_output_signal(&self) -> SignalID

Source

pub fn default_total_logistic_output_signal(&self) -> SignalID

Source

pub fn default_universe_channel(&self) -> SignalID

Source

pub fn default_working_signal(&self) -> SignalID

Source

pub fn delay_between_initial_flames(&self) -> u32

Source

pub fn deposit_radius(&self) -> f32

Source

pub fn destroy_action(&self) -> Vec<TriggerItem>

Source

pub fn destroy_non_fuel_fluid(&self) -> bool

Whether this generator prototype destroys non-fuel fluids.

Source

pub fn destroy_on_empty(&self) -> bool

Source

pub fn direction_count(&self) -> u8

Source

pub fn direction_only(&self) -> bool

Source

pub fn disable_automatic_firing(&self) -> bool

If automatic firing is disabled for this artillery turret or artillery wagon.

Source

pub fn disabled_when_recipe_not_researched(&self) -> bool

Source

pub fn distraction_cooldown(&self) -> u32

The distraction cooldown of this unit prototype.

Source

pub fn distribution_effectivity(&self) -> f64

The distribution effectivity for this beacon prototype.

Source

pub fn distribution_effectivity_bonus_per_quality_level(&self) -> f64

The distribution effectivity bonus per quality level for this beacon prototype.

Source

pub fn door_opening_speed(&self) -> f64

The door opening speed for this rocket silo prototype.

Source

pub fn doors_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn draw_cargo(&self) -> bool

Whether this logistics or construction robot renders its cargo when flying.

Source

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.

Source

pub fn drive_over_elevated_tie_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn drive_over_tie_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn drive_over_tie_trigger_minimal_speed(&self) -> f64

Source

pub fn drop_item_distance(&self) -> u32

Source

pub fn drops_full_belt_stacks(&self) -> bool

If this mining drill puts full belt stacks onto belts.

Source

pub fn dying_explosion(&self) -> Vec<ExplosionDefinition>

Source

pub fn dying_speed(&self) -> f32

The dying time of this corpse prototype.

Source

pub fn dying_trigger_effect(&self) -> Vec<TriggerEffectItem>

Source

pub fn early_death_ticks(&self) -> u32

Source

pub fn effect_duration(&self) -> u16

Source

pub fn effect_receiver(&self) -> EffectReceiver

Effect receiver prototype of crafting machine, lab, mining drill, or agricultural tower.

Source

pub fn effectivity(&self) -> f64

The effectivity of this car prototype, generator prototype.

Source

pub fn electric_energy_source_prototype( &self, ) -> LuaElectricEnergySourcePrototype

The electric energy source prototype this entity uses, if any.

Source

pub fn elevated_collision_mask(&self) -> CollisionMask

Source

pub fn elevated_selection_boxes(&self) -> Vec<BoundingBox>

Source

pub fn elevated_selection_priority(&self) -> u8

Source

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.

Source

pub fn ended_in_water_trigger_effect(&self) -> Vec<TriggerEffectItem>

Source

pub fn enemy_map_color(&self) -> Color

The enemy map color used when charting this entity.

Source

pub fn energy(&self) -> f64

When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.

Source

pub fn energy_fraction_to_connect(&self) -> f32

Source

pub fn energy_fraction_to_disconnect(&self) -> f32

Source

pub fn energy_per_hit_point(&self) -> f64

The energy used per hit point taken for this vehicle during collisions.

Source

pub fn energy_per_item(&self) -> f64

Source

pub fn energy_per_move(&self) -> f64

The energy consumed per tile moved for this flying robot.

Source

pub fn energy_per_movement(&self) -> f64

Source

pub fn energy_per_nearby_scan(&self) -> f64

Source

pub fn energy_per_rotation(&self) -> f64

Source

pub fn energy_per_sector(&self) -> f64

Source

pub fn energy_per_shot(&self) -> f64

Source

pub fn energy_per_tick(&self) -> f64

The energy consumed per tick for this flying robot.

Source

pub fn energy_usage(&self) -> f64

The direct energy usage of this entity, if any.

Source

pub fn energy_usage_quality_multiplier(&self) -> LuaAny

Source

pub fn energy_usage_quality_scaling(&self) -> f32

Source

pub fn engine_starting_speed(&self) -> f64

The engine starting speed for this rocket silo rocket prototype.

Source

pub fn enraged_duration(&self) -> u32

Source

pub fn enraged_speed(&self) -> f64

Source

pub fn enter_drop_mode_if_held_stack_spoiled(&self) -> bool

Source

pub fn enter_vehicle_distance(&self) -> f64

Source

pub fn erase_contents_when_mined(&self) -> bool

Source

pub fn expires(&self) -> bool

Source

pub fn explosion_beam(&self) -> f64

Whether this explosion has a beam.

Source

pub fn explosion_effect(&self) -> Vec<TriggerItem>

Source

pub fn explosion_rotate(&self) -> f64

Whether this explosion rotates.

Source

pub fn factoriopedia_alternative(&self) -> LuaEntityPrototype

An alternative prototype that will be used to display info about this prototype in Factoriopedia.

Source

pub fn fast_replaceable_group(&self) -> &str

The group of mutually fast-replaceable entities, if any.

Source

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.

Source

pub fn final_attack_result(&self) -> Vec<TriggerItem>

The final attack result for this entity if it has one.

Source

pub fn fire_spread_cooldown(&self) -> u8

Source

pub fn fire_spread_entity(&self) -> LuaEntityPrototype

Source

pub fn fire_spread_radius(&self) -> f32

Source

pub fn fixed_quality(&self) -> LuaQualityPrototype

The fixed recipe quality for this assembling machine prototype, if any.

Source

pub fn fixed_recipe(&self) -> LuaRecipePrototype

The fixed recipe for this assembling machine prototype, if any.

Source

pub fn flags(&self) -> LuaAny

The flags for this entity prototype.

Source

pub fn flow_scaling(&self) -> bool

Source

pub fn fluid_boxes_off_when_no_fluid_recipe(&self) -> bool

Source

pub fn fluid_buffer_input_flow(&self) -> LuaAny

Source

pub fn fluid_buffer_size(&self) -> LuaAny

Source

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.

Source

pub fn fluid_energy_source_prototype(&self) -> LuaFluidEnergySourcePrototype

The fluid energy source prototype this entity uses, if any.

Source

pub fn fluid_source_offset(&self) -> Vector

Source

pub fn fluid_wagon_connector_speed(&self) -> f64

Source

pub fn fluid_wagon_tank_valve_max_distance(&self) -> f64

Source

pub fn fluidbox_prototypes(&self) -> Vec<LuaFluidBoxPrototype>

The fluidbox prototypes for this entity.

Source

pub fn flying_acceleration(&self) -> f64

The flying acceleration for this rocket silo rocket prototype.

Source

pub fn flying_collision_mask(&self) -> CollisionMask

Source

pub fn flying_speed(&self) -> f64

The flying speed for this rocket silo rocket prototype.

Source

pub fn flying_trigger(&self) -> Vec<TriggerEffectItem>

Source

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

Source

pub fn follows_player(&self) -> bool

Source

pub fn footprint_particles(&self) -> LuaAny

Source

pub fn footstep_particle_triggers(&self) -> LuaAny

Source

pub fn force_die_on_attack(&self) -> bool

Source

pub fn force_visibility(&self) -> ForceCondition

Source

pub fn friction_force(&self) -> f64

The friction of this vehicle prototype.

Source

pub fn friendly_map_color(&self) -> Color

The friendly map color used when charting this entity.

Source

pub fn grab_less_to_match_belt_stack(&self) -> bool

Source

pub fn grid_offset(&self) -> Vector

Source

pub fn grid_prototype(&self) -> LuaEquipmentGridPrototype

The equipment grid prototype for this entity, if any.

Source

pub fn grid_size(&self) -> Vector

Source

pub fn grounded_landing_search_radius(&self) -> f64

Source

pub fn growth_area_radius(&self) -> f64

Source

pub fn growth_grid_tile_size(&self) -> u32

Source

pub fn growth_ticks(&self) -> u32

Source

pub fn gui_mode(&self) -> LuaEntityPrototypeGuiMode

Source

pub fn gui_title_key(&self) -> &str

Source

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.

Source

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

A table of pollutants that this plant will release when it is harvested.

Source

pub fn has_belt_immunity(&self) -> bool

Whether this unit, car, or character prototype has belt immunity.

Source

pub fn has_direction(&self) -> bool

Source

pub fn hatch_definitions(&self) -> Vec<CargoHatchDefinition>

Source

pub fn head_collection_radius(&self) -> f32

Source

pub fn healing_per_tick(&self) -> f32

Amount this entity can heal per tick, if any.

Source

pub fn heat_buffer_prototype(&self) -> LuaHeatBufferPrototype

The heat buffer prototype this entity uses, if any.

Source

pub fn heat_energy_source_prototype(&self) -> LuaHeatEnergySourcePrototype

The heat energy source prototype this entity uses, if any.

Source

pub fn heating_energy(&self) -> f64

The energy required to keep this entity from freezing. Zero energy means it doesn’t freeze.

Source

pub fn heating_radius(&self) -> f32

Source

pub fn height(&self) -> f64

The height of this spider unit, spider vehicle or projectile.

Source

pub fn height_from_ground(&self) -> f32

Source

pub fn held_items_display_count(&self) -> u8

Source

pub fn held_items_offset(&self) -> f32

Source

pub fn held_items_spread(&self) -> f32

Source

pub fn hide_resistances(&self) -> bool

Source

pub fn hit_at_collision_position(&self) -> bool

Source

pub fn hit_collision_mask(&self) -> CollisionMask

Source

pub fn icon_draw_specification(&self) -> IconDrawSpecification

The definition of where and how the alt-mode icons of this entity should be drawn.

Source

pub fn icons_positioning(&self) -> Vec<IconSequencePositioning>

The icon positioning for inventories of this entity, if defined.

Source

pub fn ignore_target_mask(&self) -> LuaAny

Source

pub fn immune_to_all_impacts(&self) -> bool

Source

pub fn immune_to_cliff_impacts(&self) -> bool

Source

pub fn immune_to_rock_impacts(&self) -> bool

Source

pub fn immune_to_tree_impacts(&self) -> bool

Source

pub fn indexed_guns(&self) -> Vec<LuaItemPrototype>

A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.

Source

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.

Source

pub fn infinite_resource(&self) -> bool

Whether this resource is infinite.

Source

pub fn ingredient_count(&self) -> u32

The max number of ingredients this crafting machine prototype supports.

Source

pub fn initial_action(&self) -> Vec<TriggerItem>

Source

pub fn initial_flame_count(&self) -> u8

Source

pub fn initial_height(&self) -> f32

Source

pub fn initial_lifetime(&self) -> u32

Source

pub fn initial_speed(&self) -> Vector

Source

pub fn initial_vertical_speed(&self) -> f32

Source

pub fn input_connection_bounding_box(&self) -> BoundingBox

Source

pub fn inserter_chases_belt_items(&self) -> bool

True if this inserter chases items on belts for pickup.

Source

pub fn inserter_drop_position(&self) -> Vector

The drop position for this inserter.

Source

pub fn inserter_max_belt_stack_size(&self) -> u8

The max belt stack size for this inserter.

Source

pub fn inserter_pickup_position(&self) -> Vector

The pickup position for this inserter.

Source

pub fn inserter_stack_size_bonus(&self) -> u32

The built-in stack size bonus of this inserter prototype.

Source

pub fn instruments(&self) -> Vec<ProgrammableSpeakerInstrument>

The instruments for this programmable speaker.

Source

pub fn inventory_properties(&self) -> InventoryWithCustomStackSizeSpecification

Properties of custom inventory. Only provided if inventory_type is "with_custom_stack_size".

Source

pub fn inventory_size_quality_increase(&self) -> u16

Source

pub fn inventory_type(&self) -> LuaEntityPrototypeInventoryType

The inventory type this container or linked container uses.

Source

pub fn inventory_weight_limit(&self) -> LuaAny

Weight limit of the inventory if inventory_type is "with_weight_limit".

Source

pub fn investigating_speed(&self) -> f64

Source

pub fn is_building(&self) -> bool

Source

pub fn is_entity_with_owner(&self) -> bool

True if this is entity-with-owner

Source

pub fn is_military_target(&self) -> bool

True if this entity-with-owner is military target

Source

pub fn item_pickup_distance(&self) -> f64

Source

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.

Source

pub fn joint_distance(&self) -> f64

Source

pub fn lab_inputs(&self) -> Vec<&str>

The item prototype names that are the inputs of this lab prototype.

Source

pub fn lamp_energy_usage(&self) -> f64

The lamp energy usage of this rocket silo prototype.

Source

pub fn launch_to_space_platforms(&self) -> bool

Source

pub fn launch_wait_time(&self) -> u8

The rocket launch delay for this rocket silo prototype.

Source

pub fn leave_attacking_if_shoot_fails(&self) -> bool

Source

pub fn life_time(&self) -> u16

Source

pub fn lifetime_increase_by(&self) -> u32

Source

pub fn lifetime_increase_cooldown(&self) -> u32

Source

pub fn lift_weight(&self) -> LuaAny

Source

pub fn light_blinking_speed(&self) -> f64

The light blinking speed for this rocket silo prototype.

Source

pub fn limit_overlapping_particles(&self) -> bool

Source

pub fn loader_adjustable_belt_stack_size(&self) -> bool

True if this loader supports a runtime-adjustable belt stack size.

Source

pub fn loader_max_belt_stack_size(&self) -> u8

The max belt stack size for this loader.

Source

pub fn loader_respect_insert_limits(&self) -> bool

Source

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.

Source

pub fn logistic_mode(&self) -> LuaEntityPrototypeLogisticMode

The logistic mode of this logistic container.

Source

pub fn logistic_parameters(&self) -> LuaEntityPrototypeLogisticParameters

The logistic parameters for this roboport.

Source

pub fn logistic_radius(&self) -> f64

The logistic radius for this roboport prototype.

Source

pub fn loot(&self) -> Vec<ItemProduct>

Loot that will be dropped when this entity is killed, if any.

Source

pub fn loot_pickup_distance(&self) -> f64

Source

pub fn manual_range_modifier(&self) -> f64

The manual range modifier for this artillery turret or wagon prototype.

Source

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.

Source

pub fn map_generator_bounding_box(&self) -> BoundingBox

The bounding box used for map generator collision checking.

Source

pub fn map_grid(&self) -> bool

Source

pub fn max_count_of_owned_defensive_units(&self) -> f64

Count of defensive enemies this spawner can sustain.

Source

pub fn max_count_of_owned_units(&self) -> f64

Count of enemies this spawner can sustain.

Source

pub fn max_darkness_to_spawn(&self) -> f32

The maximum darkness at which this unit spawner can spawn entities.

Source

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.

Source

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.

Source

pub fn max_item_product_count(&self) -> u32

The max number of item products this crafting machine prototype supports.

Source

pub fn max_payload_size(&self) -> u32

The cargo carrying capacity of this logistics or construction robot.

Source

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.

Source

pub fn max_performance(&self) -> ThrusterPerformancePoint

Source

pub fn max_polyphony(&self) -> u32

The maximum polyphony for this programmable speaker.

Source

pub fn max_pursue_distance(&self) -> f64

The maximum pursue distance of this unit prototype.

Source

pub fn max_records_count(&self) -> u32

Source

pub fn max_richness_for_spawn_shift(&self) -> f64

Source

pub fn max_separation_force(&self) -> f64

Source

pub fn max_snap_to_train_stop_distance(&self) -> f32

Source

pub fn max_speed(&self) -> f64

The max speed of this projectile or flying robot prototype.

Source

pub fn max_text_length(&self) -> u32

Source

pub fn max_text_width(&self) -> u32

Source

pub fn max_to_charge(&self) -> f32

The maximum energy for this flying robot above which it won’t try to recharge when stationing.

Source

pub fn max_underground_distance(&self) -> u8

The max underground distance for underground belts and underground pipes.

Source

pub fn maximum_corner_sliding_distance(&self) -> f64

Source

pub fn maximum_damage_multiplier(&self) -> f32

Source

pub fn maximum_lifetime(&self) -> u32

Source

pub fn maximum_spread_count(&self) -> u16

Source

pub fn maximum_temperature(&self) -> f64

The maximum fluid temperature of this generator prototype.

Source

pub fn meltdown_action(&self) -> Vec<TriggerItem>

Source

pub fn min_darkness_to_spawn(&self) -> f32

The minimum darkness at which this unit spawner can spawn entities.

Source

pub fn min_performance(&self) -> ThrusterPerformancePoint

Source

pub fn min_pursue_time(&self) -> u32

The minimum pursue time of this unit prototype.

Source

pub fn min_to_charge(&self) -> f32

The minimum energy for this flying robot before it tries to recharge.

Source

pub fn mineable_properties(&self) -> MineableProperties

Whether this entity is minable and what can be obtained by mining it.

Source

pub fn minimal_arm_swing_segment_retraction(&self) -> u32

Source

pub fn minimum_resource_amount(&self) -> u32

Minimum amount of this resource.

Source

pub fn mining_drill_radius(&self) -> f64

The mining radius of this mining drill prototype.

Source

pub fn mining_speed(&self) -> f64

The mining speed of this mining drill/character prototype.

Source

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.

Source

pub fn module_slots_quality_bonus(&self) -> LuaAny

Source

pub fn move_while_shooting(&self) -> bool

Whether this unit prototype can move while shooting.

Source

pub fn movement_modifier(&self) -> f64

Source

pub fn movement_modifier_when_on_ground(&self) -> f64

Source

pub fn neighbour_bonus(&self) -> f64

Source

pub fn neighbour_connectable(&self) -> NeighbourConnectable

Source

pub fn next_upgrade(&self) -> LuaEntityPrototype

The next upgrade for this entity, if any.

Source

pub fn normal_resource_amount(&self) -> u32

The normal amount for this resource.

Source

pub fn not_buildable_if_no_rails(&self) -> bool

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 on_damage_tick_effect(&self) -> Vec<TriggerItem>

Source

pub fn on_fuel_added_action(&self) -> Vec<TriggerItem>

Source

pub fn open_door_trigger_effect(&self) -> Vec<TriggerEffectItem>

Source

pub fn opened_collision_mask(&self) -> CollisionMask

Source

pub fn opening_speed(&self) -> f32

Source

pub fn orientations(&self) -> OrientedCliffPrototypeSet

Source

pub fn output_connection_bounding_box(&self) -> BoundingBox

Source

pub fn overkill_fraction(&self) -> f32

Source

pub fn particle(&self) -> LuaParticlePrototype

Source

pub fn particle_buffer_size(&self) -> u16

Source

pub fn particle_count(&self) -> u8

Source

pub fn particle_height(&self) -> DeviatedValue

Source

pub fn particle_horizontal_speed(&self) -> DeviatedValue

Source

pub fn particle_spawn_interval(&self) -> u16

Source

pub fn particle_spawn_timeout(&self) -> u16

Source

pub fn particle_time_before_start(&self) -> DeviatedValue

Source

pub fn particle_time_to_live(&self) -> DeviatedValue

Source

pub fn particle_vertical_acceleration(&self) -> f32

Source

pub fn particle_vertical_speed(&self) -> DeviatedValue

Source

pub fn passive_energy_usage(&self) -> f64

Source

pub fn patrolling_speed(&self) -> f64

Source

pub fn patrolling_turn_radius(&self) -> f64

Source

pub fn per_lane_filters(&self) -> bool

Source

pub fn perceived_performance(&self) -> PerceivedPerformance

Source

pub fn piercing_damage(&self) -> f32

Source

pub fn place_as_crater(&self) -> CraterPlacementDefinition

Source

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.

Source

pub fn platform_weight(&self) -> LuaAny

Weight which this entity adds to total space platform weight when placed.

Source

pub fn prepare_with_no_ammo(&self) -> bool

Source

pub fn preserve_contents_when_created(&self) -> bool

Source

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

Source

pub fn progress_to_create_smoke(&self) -> f32

Source

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.

Source

pub fn pulse_duration(&self) -> u32

Source

pub fn quality_affects_capacity(&self) -> bool

Source

pub fn quality_affects_energy_usage(&self) -> bool

Source

pub fn quality_affects_inventory_size(&self) -> bool

Source

pub fn quality_affects_max_speed(&self) -> bool

Source

pub fn quality_affects_mining_radius(&self) -> bool

Source

pub fn quality_affects_module_slots(&self) -> bool

Source

pub fn quality_affects_supply_area_distance(&self) -> bool

Source

pub fn radar_range(&self) -> u32

Source

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.

Source

pub fn radius_visualisation_specification( &self, ) -> RadiusVisualisationSpecification

Source

pub fn raise_rocket_trigger(&self) -> Vec<TriggerEffectItem>

Source

pub fn random_corpse_variation(&self) -> bool

Source

pub fn random_growth_offset(&self) -> f64

Source

pub fn randomize_planting_tile(&self) -> bool

Source

pub fn range_from_player(&self) -> f64

Source

pub fn reach_distance(&self) -> u32

Source

pub fn reach_resource_distance(&self) -> f64

Source

pub fn recharge_minimum(&self) -> f64

Source

pub fn regular_trigger_effect(&self) -> Vec<TriggerEffectItem>

Source

pub fn regular_trigger_effect_frequency(&self) -> u32

Source

pub fn related_rail(&self) -> LuaEntityPrototype

Source

pub fn related_underground_belt(&self) -> LuaEntityPrototype

Source

pub fn remains_when_mined(&self) -> Vec<LuaEntityPrototype>

The remains left behind when this entity is mined.

Source

pub fn remove_decoratives(&self) -> LuaEntityPrototypeRemoveDecoratives

Whether this entity should remove decoratives that collide with it when this entity is built.

Source

pub fn remove_on_entity_placement(&self) -> bool

Source

pub fn remove_on_tile_collision(&self) -> bool

Source

pub fn remove_on_tile_placement(&self) -> bool

Source

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.

Source

pub fn require_charge_to_mine(&self) -> bool

If this robot with logistic interface requires it be charged to manually mine.

Source

pub fn require_resources_to_place(&self) -> bool

If this drill requires minable resources before it can be placed.

Source

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).

Source

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.

Source

pub fn resource_category(&self) -> &str

Name of the category of this resource.

During data stage, this property is named “category”.

Source

pub fn resource_drain_rate_percent(&self) -> u8

The resource drain rate percent of this mining drill prototype.

Source

pub fn resource_patch_search_radius(&self) -> u32

Source

pub fn respawn_time(&self) -> u32

Source

pub fn result_units(&self) -> Vec<UnitSpawnDefinition>

The result units and spawn points with weight and evolution factor for a biter spawner entity.

Source

pub fn reveal_map(&self) -> bool

Source

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.

Source

pub fn reversing_power_modifier(&self) -> f64

Source

pub fn rewire_neighbours_when_destroying(&self) -> bool

Source

pub fn rising_speed(&self) -> f64

The rising speed for this rocket silo rocket prototype.

Source

pub fn rocket_dying_explosion(&self) -> LuaEntityPrototype

Source

pub fn rocket_engine_starting_speed_modifier_per_quality_level(&self) -> f64

Source

pub fn rocket_entity_prototype(&self) -> LuaEntityPrototype

The rocket entity prototype associated with this rocket silo prototype.

Source

pub fn rocket_parts_required(&self) -> u32

The rocket parts required for this rocket silo prototype.

Source

pub fn rocket_parts_storage_cap(&self) -> u32

Source

pub fn rocket_quick_relaunch_start_offset(&self) -> f64

Source

pub fn rocket_rising_delay(&self) -> u8

The rocket rising delay for this rocket silo prototype.

Source

pub fn rocket_rising_speed_modifier_per_quality_level(&self) -> f64

Source

pub fn rotatable(&self) -> bool

Source

pub fn rotation_snap_angle(&self) -> f64

The rotation snap angle of this car prototype.

Source

pub fn rotation_speed(&self) -> f64

The rotation speed of this car prototype.

Source

pub fn running_speed(&self) -> f64

The movement speed of this character prototype.

Source

pub fn scale_energy_usage(&self) -> bool

Source

pub fn scale_fluid_usage(&self) -> bool

Whether this generator prototype scales fluid usage.

Source

pub fn science_pack_drain_rate_percent(&self) -> u8

How much science pack durability is required to research one science point.

Source

pub fn search_radius(&self) -> f64

Source

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.

Source

pub fn segment_engine(&self) -> SegmentEngineSpecification

Source

pub fn selectable_in_game(&self) -> bool

Is this entity selectable?

Source

pub fn selection_box(&self) -> BoundingBox

The bounding box used for drawing selection.

Source

pub fn selection_priority(&self) -> u32

The selection priority of this entity - a value between 0 and 255.

Source

pub fn separation_force_factor(&self) -> f64

Source

pub fn separation_range(&self) -> f64

Source

pub fn shadow_slave_entity(&self) -> LuaEntityPrototype

Source

pub fn shoot_in_prepare_state(&self) -> bool

Source

pub fn shooting_cursor_size(&self) -> f32

The cursor size used when shooting at this entity.

Source

pub fn shot_category(&self) -> LuaAmmoCategoryPrototype

Source

pub fn shots_per_flare(&self) -> u32

Source

pub fn should_ground_target(&self) -> bool

Source

pub fn shuffle_resources_to_mine(&self) -> bool

Source

pub fn smoke(&self) -> LuaTrivialSmokePrototype

Source

pub fn smoke_count(&self) -> u16

Source

pub fn smoke_sources(&self) -> Vec<SmokeSource>

Source

pub fn snap_to_spots_distance(&self) -> f32

Source

pub fn solar_panel_performance_at_day(&self) -> f64

Source

pub fn solar_panel_performance_at_night(&self) -> f64

Source

pub fn solar_panel_solar_coefficient_property( &self, ) -> LuaSurfacePropertyPrototype

Source

pub fn source_offset(&self) -> Vector

Source

pub fn source_variance(&self) -> Vector

Source

pub fn spawn_blocked_trigger(&self) -> Vec<TriggerItem>

Source

pub fn spawn_cooldown(&self) -> LuaEntityPrototypeSpawnCooldown

The spawning cooldown for this enemy spawner prototype.

Source

pub fn spawn_decoration(&self) -> Vec<TriggerEffectItem>

Source

pub fn spawn_decorations_on_expansion(&self) -> bool

Source

pub fn spawn_entity(&self) -> LuaEntityPrototype

Source

pub fn spawning_radius(&self) -> f64

How far from the spawner can the units be spawned.

Source

pub fn spawning_spacing(&self) -> f64

What spaces should be between the spawned units.

Source

pub fn spawning_time_modifier(&self) -> f64

The spawning time modifier of this unit prototype.

Source

pub fn special_neutral_target_damage(&self) -> DamageParameters

Source

pub fn speed(&self) -> f64

The default speed of this flying robot, or unit.

Source

pub fn speed_modifier(&self) -> Vector

Source

pub fn speed_multiplier_when_out_of_energy(&self) -> f32

The speed multiplier when this flying robot is out of energy.

Source

pub fn spent_fluid(&self) -> SpentFluidSpecification

Source

pub fn spider_engine(&self) -> SpiderEngineSpecification

Source

pub fn spread_delay(&self) -> u32

Source

pub fn spread_delay_deviation(&self) -> u32

Source

pub fn start_attacking_only_when_can_shoot(&self) -> bool

Source

pub fn steering_settings(&self) -> SteeringSettings

Source

pub fn sticker_box(&self) -> BoundingBox

The bounding box used to attach sticker type entities.

Source

pub fn sticker_movement_modifiers( &self, ) -> LuaEntityPrototypeStickerMovementModifiers

Source

pub fn sticker_vehicle_modifiers( &self, ) -> LuaEntityPrototypeStickerVehicleModifiers

Source

pub fn stickers_per_square_meter(&self) -> f32

Source

pub fn stream_particle_horizontal_speed(&self) -> f32

Source

pub fn stream_particle_horizontal_speed_deviation(&self) -> f32

Source

pub fn strike_effect(&self) -> Vec<TriggerItem>

Source

pub fn support_range(&self) -> f32

Source

pub fn supports_direction(&self) -> bool

Whether this entity prototype could possibly ever be rotated.

Source

pub fn surface_conditions(&self) -> Vec<SurfaceCondition>

The surface conditions required to build this entity.

Source

pub fn synced_footstep_particle_triggers(&self) -> LuaAny

Source

pub fn tank_driving(&self) -> bool

If this car prototype uses tank controls to drive.

Source

pub fn target_initial_position_only(&self) -> bool

Source

pub fn target_position_deviation(&self) -> f64

Source

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.

Source

pub fn terrain_friction_modifier(&self) -> f32

The terrain friction modifier for this vehicle.

Source

pub fn territory_radius(&self) -> u32

Source

pub fn tether_size(&self) -> f32

Source

pub fn ticks_per_scan(&self) -> u32

Source

pub fn ticks_to_keep_aiming_direction(&self) -> u32

Source

pub fn ticks_to_keep_gun(&self) -> u32

Source

pub fn ticks_to_stay_in_combat(&self) -> u32

Source

pub fn tie_distance(&self) -> f64

Source

pub fn tile_buildability_rules(&self) -> Vec<TileBuildabilityRule>

Source

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)

Source

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)

Source

pub fn time_to_capture(&self) -> u32

Source

pub fn time_to_damage(&self) -> u16

Source

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.

Source

pub fn timeout(&self) -> u32

The time it takes this land mine to arm.

Source

pub fn timeout_to_close(&self) -> u32

Source

pub fn tool_attack_distance(&self) -> f64

Source

pub fn tool_attack_result(&self) -> Vec<TriggerItem>

Source

pub fn torso_bob_speed(&self) -> f64

The torso bob speed of this spider vehicle prototype.

Source

pub fn torso_rotation_speed(&self) -> f64

The torso rotation speed of this spider vehicle prototype.

Source

pub fn track_coverage_during_drag_building(&self) -> bool

Source

pub fn track_particle_triggers(&self) -> LuaAny

Source

pub fn transition_collision_mask(&self) -> CollisionMask

Source

pub fn tree_color_count(&self) -> u8

If it is a tree, return the number of colors it supports.

Source

pub fn tree_dying_factor(&self) -> f32

Source

pub fn tree_removal_max_distance(&self) -> f64

Source

pub fn tree_removal_probability(&self) -> f64

Source

pub fn trigger_collision_mask(&self) -> CollisionMask

The collision mask entities must collide with to make this landmine blow up.

Source

pub fn trigger_force(&self) -> ForceCondition

Source

pub fn trigger_interval(&self) -> u32

Source

pub fn trigger_radius(&self) -> f64

Source

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.

Source

pub fn turn_radius(&self) -> f64

Source

pub fn turn_smoothing(&self) -> f64

Source

pub fn turn_speed(&self) -> f32

Source

pub fn turning_speed_increases_exponentially_with_projectile_speed( &self, ) -> bool

Source

pub fn turret_base_has_direction(&self) -> bool

Source

pub fn turret_prepare_range(&self) -> f64

Source

pub fn turret_range(&self) -> u32

The range of this turret.

Source

pub fn turret_rotation_speed(&self) -> f32

The turret rotation speed of this prototype.

Source

pub fn two_direction_only(&self) -> bool

Source

pub fn unpowered_arm_speed_scale(&self) -> f32

Source

pub fn update_effects(&self) -> Vec<TriggerEffectWithCooldown>

The trigger effects to run every tick when on cooldown.

Source

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.

Source

pub fn use_damage_substitute(&self) -> bool

Source

pub fn use_easter_egg(&self) -> bool

Source

pub fn use_exact_mode(&self) -> bool

Whether this logistic container prototype uses exact mode

Source

pub fn use_mirroring(&self) -> bool

Source

pub fn use_unloading_distance_limit(&self) -> bool

Source

pub fn uses_alternative_behavior(&self) -> bool

Source

pub fn uses_force_mining_productivity_bonus(&self) -> bool

If this drill uses force productivity bonus

Source

pub fn uses_inserter_stack_size_bonus(&self) -> bool

Source

pub fn uses_quality_drain_modifier(&self) -> bool

If this lab uses the quality drain modifier when consuming science packs.

Source

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.

Source

pub fn valve_mode(&self) -> ValveMode

The mode of operation of this valve.

Source

pub fn valve_threshold(&self) -> f32

The default threshold of this valve.

Source

pub fn vector_to_place_result(&self) -> Vector

Source

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.

Source

pub fn vision_distance(&self) -> f64

The vision distance of this unit prototype.

Source

pub fn void_energy_source_prototype(&self) -> LuaVoidEnergySourcePrototype

The void energy source prototype this entity uses, if any.

Source

pub fn wait_for_full_hand(&self) -> bool

Source

pub fn weight(&self) -> f64

The weight of this vehicle prototype.

Source

pub fn width(&self) -> f32

Source

pub fn get_attraction_range_elongation( &self, quality: Option<LuaAny>, ) -> Option<f64>

Source

pub fn get_crafting_speed(&self, quality: Option<LuaAny>) -> f64

The crafting speed of this crafting-machine or character.

Source

pub fn get_duration(&self, quality: Option<LuaAny>) -> Option<u32>

Source

pub fn get_energy_distribution_efficiency( &self, quality: Option<LuaAny>, ) -> Option<f64>

Source

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.

Source

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.

Source

pub fn get_inserter_extension_speed( &self, quality: Option<LuaAny>, ) -> Option<f64>

The extension speed of this inserter.

Source

pub fn get_inserter_rotation_speed( &self, quality: Option<LuaAny>, ) -> Option<f64>

The rotation speed of this inserter.

Source

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.

Source

pub fn get_inventory_size_bonus(&self, quality: Option<LuaAny>) -> Option<u16>

Source

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.

Source

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.

Source

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.

Source

pub fn get_max_energy(&self, quality: Option<LuaAny>) -> Option<f64>

The max energy for this flying robot prototype.

Source

pub fn get_max_energy_production(&self, quality: Option<LuaAny>) -> f64

The theoretical maximum energy production for this entity.

Source

pub fn get_max_energy_usage(&self, quality: Option<LuaAny>) -> f64

The theoretical maximum energy usage for this entity.

Source

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.

Source

pub fn get_max_power_output(&self, quality: Option<LuaAny>) -> Option<f64>

The maximum power output of this burner generator or generator prototype.

Source

pub fn get_max_speed(&self, quality: Option<LuaAny>) -> Option<f64>

The maximum speed of this rolling stock if defined.

Source

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.

Source

pub fn get_mining_drill_radius(&self, quality: Option<LuaAny>) -> Option<f64>

The mining radius of this mining drill prototype.

Source

pub fn get_pumping_speed(&self, quality: Option<LuaAny>) -> f64

The pumping speed of this offshore pump or normal pump.

Source

pub fn get_researching_speed(&self, quality: Option<LuaAny>) -> Option<f64>

The base researching speed of this lab prototype.

Source

pub fn get_supply_area_distance(&self, quality: Option<LuaAny>) -> f64

The supply area of this electric pole or beacon prototype.

Source

pub fn get_valve_flow_rate(&self, quality: Option<LuaAny>) -> f64

The maximum flow rate through this valve.

Source

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

Source§

fn clone(&self) -> LuaEntityPrototype

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 LuaEntityPrototype

Source§

impl Debug for LuaEntityPrototype

Source§

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

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

impl Default for LuaEntityPrototype

Source§

fn default() -> LuaEntityPrototype

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

impl Eq for LuaEntityPrototype

Source§

impl From<LuaEntityPrototype> for LuaAny

Source§

fn from(_: LuaEntityPrototype) -> Self

Converts to this type from the input type.
Source§

impl LuaObject for LuaEntityPrototype

Source§

impl PartialEq for LuaEntityPrototype

Source§

fn eq(&self, other: &LuaEntityPrototype) -> 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 LuaEntityPrototype

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.