pub struct LuaSurfaceCreateEntityParams {Show 126 fields
pub burner_fuel_inventory: Option<BlueprintInventoryWithFilters>,
pub cause: Option<LuaAny>,
pub character: Option<LuaEntity>,
pub create_build_effect_smoke: Option<bool>,
pub direction: Option<String>,
pub fast_replace: Option<bool>,
pub force: Option<ForceID>,
pub item: Option<LuaItemStack>,
pub mirror: Option<bool>,
pub move_stuck_players: Option<bool>,
pub name: EntityID,
pub player: Option<PlayerIdentification>,
pub position: MapPosition,
pub preserve_ghosts_and_corpses: Option<bool>,
pub quality: Option<QualityID>,
pub raise_built: Option<bool>,
pub register_plant: Option<bool>,
pub snap_to_grid: Option<bool>,
pub source: Option<LuaAny>,
pub spawn_decorations: Option<bool>,
pub spill: Option<bool>,
pub target: Option<LuaAny>,
pub undo_index: Option<u32>,
pub control_behavior: Option<AccumulatorBlueprintControlBehavior>,
pub ignore_unprioritised: Option<bool>,
pub priority_list: Option<Vec<SlotFilter>>,
pub player_description: Option<String>,
pub frame_speed: Option<f32>,
pub height: Option<f32>,
pub movement: Option<Vector>,
pub vertical_speed: Option<f32>,
pub speed: Option<f64>,
pub artillery_auto_targeting: Option<bool>,
pub auto_connect: Option<bool>,
pub color: Option<Color>,
pub copy_color_from_train_stop: Option<bool>,
pub enable_logistics_while_moving: Option<bool>,
pub grid: Option<Vec<BlueprintEquipment>>,
pub orientation: Option<RealOrientation>,
pub recipe: Option<String>,
pub recipe_quality: Option<String>,
pub velocity: Option<Vector>,
pub chunk_filter: Option<Vec<SlotFilter>>,
pub result_inventory: Option<LuaAny>,
pub duration: Option<u32>,
pub max_length: Option<u32>,
pub source_offset: Option<Vector>,
pub source_position: Option<MapPosition>,
pub target_position: Option<MapPosition>,
pub ammo_inventory: Option<BlueprintInventoryWithFilters>,
pub driver_is_main_gunner: Option<bool>,
pub request_filters: Option<BlueprintLogisticSections>,
pub selected_gun_index: Option<u16>,
pub trunk_inventory: Option<BlueprintInventoryWithFilters>,
pub bar: Option<u32>,
pub inventory: Option<BlueprintInventoryWithFilters>,
pub inventory_size: Option<u32>,
pub player_index: Option<u32>,
pub cliff_orientation: Option<CliffOrientation>,
pub filters: Option<Vec<BlueprintItemFilter>>,
pub proxy_type: Option<String>,
pub always_show: Option<bool>,
pub icon: Option<SignalID>,
pub show_in_chart: Option<bool>,
pub text: Option<String>,
pub buffer_size: Option<f64>,
pub power_production: Option<f64>,
pub power_usage: Option<f64>,
pub inner_name: Option<String>,
pub tags: Option<Tags>,
pub initial_ground_flame_count: Option<u8>,
pub mode: Option<HeatSettingMode>,
pub temperature: Option<f64>,
pub blink_interval: Option<u32>,
pub bounding_box: Option<BoundingBox>,
pub box_type: Option<CursorBoxRenderType>,
pub render_player_index: Option<u32>,
pub time_to_live: Option<u32>,
pub infinity_settings: Option<BlueprintInfinityInventorySettings>,
pub override_logistic_mode: Option<LogisticMode>,
pub saved_request_filters: Option<LogisticSections>,
pub saved_request_from_buffers: Option<bool>,
pub saved_set_requests: Option<bool>,
pub saved_storage_filters: Option<LogisticSections>,
pub drop_position: Option<Vector>,
pub filter_mode: Option<String>,
pub override_stack_size: Option<u8>,
pub pickup_position: Option<Vector>,
pub spoil_priority: Option<BlueprintSpoilPriority>,
pub use_filters: Option<bool>,
pub stack: Option<LuaAny>,
pub modules: Option<Vec<BlueprintInsertPlan>>,
pub removal_plan: Option<Vec<BlueprintInsertPlan>>,
pub always_on: Option<bool>,
pub filter: Option<ItemFilter>,
pub input_priority: Option<SplitterPriority>,
pub output_priority: Option<SplitterPriority>,
pub type: Option<BeltConnectionType>,
pub link_id: Option<u32>,
pub belt_stack_size_override: Option<u8>,
pub snap_to_train_stop: Option<bool>,
pub tick_grown: Option<u32>,
pub switch_state: Option<bool>,
pub alert_parameters: Option<ProgrammableSpeakerAlertParameters>,
pub parameters: Option<ProgrammableSpeakerParameters>,
pub base_damage_modifiers: Option<TriggerModifierData>,
pub bonus_damage_modifiers: Option<TriggerModifierData>,
pub max_range: Option<f64>,
pub fluid_filter: Option<String>,
pub rail_layer: Option<String>,
pub amount: Option<u32>,
pub enable_cliff_removal: Option<bool>,
pub enable_tree_removal: Option<bool>,
pub snap_to_tile_center: Option<bool>,
pub launch_to_orbit_automatically: Option<bool>,
pub use_transitional_requests: Option<bool>,
pub variation: Option<u8>,
pub providing_to_other_platforms: Option<bool>,
pub request_missing_construction_materials: Option<bool>,
pub lifetime: Option<u32>,
pub automatic_targeting_parameters: Option<VehicleAutomaticTargetingParameters>,
pub label: Option<String>,
pub manual_trains_limit: Option<u32>,
pub priority: Option<u8>,
pub station: Option<String>,
pub valve_threshold_override: Option<f32>,
}Expand description
Create an entity on this surface.
Fields§
§burner_fuel_inventory: Option<BlueprintInventoryWithFilters>Used by entities with a burner energy source.
cause: Option<LuaAny>Cause entity / force. The entity or force that triggered the chain of events that led to this entity being created. Used for beams, projectiles, stickers, etc. so that the damage receiver can know which entity or force to retaliate against. Defaults to the value of source.
character: Option<LuaEntity>If fast_replace is true simulate fast replace using this character.
create_build_effect_smoke: Option<bool>If false, the building effect smoke will not be shown around the new entity. Defaults to true.
direction: Option<String>Desired orientation of the entity after creation.
fast_replace: Option<bool>If true, building will attempt to simulate fast-replace building. Defaults to false.
force: Option<ForceID>Force of the entity, default is enemy.
item: Option<LuaItemStack>If provided, the entity will attempt to pull stored values from this item (for example; creating a spidertron from a previously named and mined spidertron)
mirror: Option<bool>Whether this entity is mirrored. Defaults to false.
move_stuck_players: Option<bool>If true, any characters that are in the way of the entity are teleported out of the way.
name: EntityIDThe entity prototype name to create.
player: Option<PlayerIdentification>If given set the last_user to this player. If fast_replace is true simulate fast replace using this player. Also the player whose undo queue this action should be added to.
position: MapPositionWhere to create the entity.
preserve_ghosts_and_corpses: Option<bool>If true, colliding ghosts and corpses will not be removed by the creation of some entity types. Defaults to false.
quality: Option<QualityID>Quality of the entity to be created. Defaults to normal.
raise_built: Option<bool>If true; defines.events.script_raised_built will be fired on successful entity creation. Defaults to false.
register_plant: Option<bool>If true, plants created will register in any in-range agricultural towers.
snap_to_grid: Option<bool>If false the exact position given is used to instead of snapping to the normal entity grid. This only applies if the entity normally snaps to the grid.
source: Option<LuaAny>Source entity. Used for beams, projectiles, and highlight-boxes.
spawn_decorations: Option<bool>If true, entity types that have spawn_decoration property will apply triggers defined in the property. Defaults to false.
spill: Option<bool>If false while fast_replace is true and player is nil any items from fast-replacing will be deleted instead of dropped on the ground. Defaults to true.
target: Option<LuaAny>Entity with health for the new entity to target.
undo_index: Option<u32>The index of the undo item to add this action to. An index of 0 creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.
control_behavior: Option<AccumulatorBlueprintControlBehavior>§ignore_unprioritised: Option<bool>Defaults to false.
priority_list: Option<Vec<SlotFilter>>§player_description: Option<String>§frame_speed: Option<f32>§height: Option<f32>§movement: Option<Vector>§vertical_speed: Option<f32>§speed: Option<f64>Defaults to 1.
artillery_auto_targeting: Option<bool>§auto_connect: Option<bool>True by default. If set to false, rolling stock will not connect to other rolling stocks nearby.
color: Option<Color>The color of this rolling stock, if it supports colors.
copy_color_from_train_stop: Option<bool>§enable_logistics_while_moving: Option<bool>§grid: Option<Vec<BlueprintEquipment>>§orientation: Option<RealOrientation>The orientation of this rolling stock.
recipe: Option<String>§recipe_quality: Option<String>§velocity: Option<Vector>§chunk_filter: Option<Vec<SlotFilter>>§result_inventory: Option<LuaAny>§duration: Option<u32>If set, beam will be destroyed after this value of ticks.
max_length: Option<u32>If set, beam will be destroyed when distance between source and target is greater than this value.
source_offset: Option<Vector>Source position will be offset by this value when rendering the beam.
source_position: Option<MapPosition>Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).
target_position: Option<MapPosition>Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).
ammo_inventory: Option<BlueprintInventoryWithFilters>§driver_is_main_gunner: Option<bool>§request_filters: Option<BlueprintLogisticSections>§selected_gun_index: Option<u16>§trunk_inventory: Option<BlueprintInventoryWithFilters>§bar: Option<u32>§inventory: Option<BlueprintInventoryWithFilters>§inventory_size: Option<u32>§player_index: Option<u32>§cliff_orientation: Option<CliffOrientation>If not specified, direction will be used instead.
filters: Option<Vec<BlueprintItemFilter>>§proxy_type: Option<String>§always_show: Option<bool>§icon: Option<SignalID>§show_in_chart: Option<bool>§text: Option<String>§buffer_size: Option<f64>§power_production: Option<f64>§power_usage: Option<f64>§inner_name: Option<String>The prototype name of the entity contained in the ghost.
The LuaEntity::tags associated with this entity ghost.
initial_ground_flame_count: Option<u8>With how many small flames should the fire on ground be created. Defaults to the initial flame count of the prototype.
mode: Option<HeatSettingMode>§temperature: Option<f64>§blink_interval: Option<u32>The blink interval for this highlight box. Makes it be shown every blink_interval ticks. Defaults to 0 (constantly shown).
bounding_box: Option<BoundingBox>The bounding box defining the highlight box using absolute map coordinates. If specified, the general position parameter still needs to be present, but will be ignored. If not specified, the game falls back to the source parameter first, then the target parameter second. One of these three parameters need to be specified.
box_type: Option<CursorBoxRenderType>Specifies the graphical appearance (color) of the highlight box. Defaults to "electricity".
render_player_index: Option<u32>The player to render the highlight box for. If not provided, it will be rendered for all players.
time_to_live: Option<u32>The amount of time in ticks that the highlight box will exist for. Defaults to existing forever.
infinity_settings: Option<BlueprintInfinityInventorySettings>§override_logistic_mode: Option<LogisticMode>§saved_request_filters: Option<LogisticSections>§saved_request_from_buffers: Option<bool>§saved_set_requests: Option<bool>§saved_storage_filters: Option<LogisticSections>§drop_position: Option<Vector>Used only if InserterPrototype::allow_custom_vectors is true.
filter_mode: Option<String>§override_stack_size: Option<u8>§pickup_position: Option<Vector>Used only if InserterPrototype::allow_custom_vectors is true.
spoil_priority: Option<BlueprintSpoilPriority>§use_filters: Option<bool>Defaults to false.
stack: Option<LuaAny>The stack of items to create. Either the name of an item, which will create a full stack, or a detailed item stack definition.
modules: Option<Vec<BlueprintInsertPlan>>Specification of items to be delivered to the target entity by the logistic network. While this is called “modules”, any item can be specified.
removal_plan: Option<Vec<BlueprintInsertPlan>>Specification of items to be removed from the target entity by the logistic network.
always_on: Option<bool>Defaults to false.
filter: Option<ItemFilter>§input_priority: Option<SplitterPriority>§output_priority: Option<SplitterPriority>§type: Option<BeltConnectionType>§link_id: Option<u32>§belt_stack_size_override: Option<u8>§snap_to_train_stop: Option<bool>Whether the locomotive should snap to an adjacent train stop. Defaults to true.
tick_grown: Option<u32>The tick the plant will be fully grown. If not specified, the plants normal growth time is used.
switch_state: Option<bool>§alert_parameters: Option<ProgrammableSpeakerAlertParameters>§parameters: Option<ProgrammableSpeakerParameters>§base_damage_modifiers: Option<TriggerModifierData>§bonus_damage_modifiers: Option<TriggerModifierData>§max_range: Option<f64>Defaults to 1000.
fluid_filter: Option<String>§rail_layer: Option<String>Defaults to defines.rail_layer.ground.
amount: Option<u32>§enable_cliff_removal: Option<bool>If colliding cliffs are removed. Default is true.
enable_tree_removal: Option<bool>If colliding trees are removed normally for this resource entity based off the prototype tree removal values. Default is true.
snap_to_tile_center: Option<bool>If true, the resource entity will be placed to center of a tile as map generator would place it, otherwise standard non-resource grid alignment rules will apply. Default is true.
launch_to_orbit_automatically: Option<bool>§use_transitional_requests: Option<bool>§variation: Option<u8>§providing_to_other_platforms: Option<bool>§request_missing_construction_materials: Option<bool>§lifetime: Option<u32>§automatic_targeting_parameters: Option<VehicleAutomaticTargetingParameters>§label: Option<String>§manual_trains_limit: Option<u32>§priority: Option<u8>§station: Option<String>§valve_threshold_override: Option<f32>Trait Implementations§
Source§impl Clone for LuaSurfaceCreateEntityParams
impl Clone for LuaSurfaceCreateEntityParams
Source§fn clone(&self) -> LuaSurfaceCreateEntityParams
fn clone(&self) -> LuaSurfaceCreateEntityParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more