Skip to main content

RocketSilo

Struct RocketSilo 

Source
pub struct RocketSilo {
Show 40 fields pub name: &'static str, pub crafting_categories: &'static [&'static str], pub crafting_speed: f64, pub energy_source: EnergySource, pub energy_usage: &'static str, pub active_energy_usage: &'static str, pub door_opening_speed: f64, pub hole_clipping_box: Option<BoundingBox>, pub lamp_energy_usage: &'static str, pub light_blinking_speed: f64, pub rocket_entity: &'static str, pub rocket_parts_required: i64, pub rocket_quick_relaunch_start_offset: f64, pub silo_fade_out_end_distance: f64, pub silo_fade_out_start_distance: f64, pub times_to_blink: i64, pub cargo_station_parameters: LuaAny, pub door_back_open_offset: LuaAny, pub door_front_open_offset: LuaAny, pub hidden: Option<bool>, pub order: Option<&'static str>, pub subgroup: Option<&'static str>, pub collision_box: Option<BoundingBox>, pub flags: Option<&'static [&'static str]>, pub icon: Option<&'static str>, pub minable: Option<MinableProperties>, pub selection_box: Option<BoundingBox>, pub max_health: Option<f64>, pub fluid_boxes: Option<LuaAny>, pub module_slots: Option<i64>, pub factoriopedia_description: Option<&'static str>, pub hidden_in_factoriopedia: Option<bool>, pub localised_description: Option<&'static str>, pub localised_name: Option<&'static str>, pub parameter: Option<bool>, pub factoriopedia_alternative: Option<&'static str>, pub additional_pastable_entities: Option<&'static [&'static str]>, pub alert_icon_scale: Option<f64>, pub allow_copy_paste: Option<bool>, pub ambient_sounds_group: Option<&'static str>,
}
Expand description

Minimal RocketSiloPrototype for data.extend.

A rocket silo.

type = "rocket-silo" is injected by the Lua generator.

Fields§

§name: &'static str

Unique textual identification of the prototype. May only contain alphanumeric characters, dashes and underscores. May not exceed a length of 200 characters.

For a list of all names used in vanilla, see data.raw.

§crafting_categories: &'static [&'static str]

A list of recipe categories this crafting machine can use.

§crafting_speed: f64

How fast this crafting machine can craft. 1 means that for example a 1 second long recipe take 1 second to craft. 0.5 means it takes 2 seconds, and 2 means it takes 0.5 seconds.

Crafting speed has to be positive.

§energy_source: EnergySource

Defines how the crafting machine is powered.

When using an electric energy source and drain is not specified, it will be set to energy_usage ÷ 30 automatically.

§energy_usage: &'static str

Sets how much energy this machine uses while crafting. Energy usage has to be positive.

§active_energy_usage: &'static str

Additional energy used during the following parts of the launch sequence: doors_opening, rocket_rising, arms_advance, engine_starting, arms_retract, doors_closing.

§door_opening_speed: f64

The inverse of the duration in ticks of doors_opening and closing.

§hole_clipping_box: Option<BoundingBox>

Prototype property hole_clipping_box.

§lamp_energy_usage: &'static str

May be 0.

Additional energy used during the night, that is when LuaSurface::darkness is larger than 0.3.

§light_blinking_speed: f64

The inverse of the duration in ticks of lights_blinking_open and lights_blinking_close.

§rocket_entity: &'static str§rocket_parts_required: i64

The number of crafts that must complete to produce a rocket. This includes bonus crafts from productivity. Recipe products are ignored.

§rocket_quick_relaunch_start_offset: f64

Prototype property rocket_quick_relaunch_start_offset.

§silo_fade_out_end_distance: f64

Prototype property silo_fade_out_end_distance.

§silo_fade_out_start_distance: f64

Prototype property silo_fade_out_start_distance.

§times_to_blink: i64

How many times the red_lights_back_sprites and red_lights_front_sprites should blink during lights_blinking_open and lights_blinking_close.

Does not affect the duration of the launch sequence.

§cargo_station_parameters: LuaAny

Must have exactly one entry in CargoStationParameters::hatch_definitions.

§door_back_open_offset: LuaAny

Prototype property door_back_open_offset.

§door_front_open_offset: LuaAny

Prototype property door_front_open_offset.

§hidden: Option<bool>

Prototype property hidden.

§order: Option<&'static str>

Used to order prototypes in inventory, recipes and GUIs. May not exceed a length of 200 characters.

§subgroup: Option<&'static str>

The name of an ItemSubGroup.

§collision_box: Option<BoundingBox>

Specification of the entity collision boundaries. Empty collision box means no collision and is used for smoke, projectiles, particles, explosions etc.

The {0,0} coordinate in the collision box will match the entity position. It should be near the center of the collision box, to keep correct entity drawing order. The bounding box must include the {0,0} coordinate.

Note, that for buildings, it is customary to leave 0.1 wide border between the edge of the tile and the edge of the building, this lets the player move between the building and electric poles/inserters etc.

§flags: Option<&'static [&'static str]>

Prototype property flags.

§icon: Option<&'static str>

Path to the icon file.

Either this or icons is mandatory for entities that have at least one of these flags active: "placeable-neutral", "placeable-player“, "placeable-enemy".

Only loaded if icons is not defined.

§minable: Option<MinableProperties>

The item given to the player when they mine the entity and other properties relevant to mining this entity.

§selection_box: Option<BoundingBox>

Specification of the entity selection area. When empty the entity will have no selection area (and thus is not selectable).

The selection box is usually a little bit bigger than the collision box. For tileable entities (like buildings) it should match the tile size of the building.

§max_health: Option<f64>

The unit health can never go over the maximum. Default health of units on creation is set to max. Must be greater than 0.

§fluid_boxes: Option<LuaAny>

The crafting machine’s fluid boxes. If an assembling machine has fluid boxes and AssemblingMachinePrototype::fluid_boxes_off_when_no_fluid_recipe is true, the assembling machine can only be rotated when a recipe consuming or producing fluid is set, or if it has one of the other properties listed at the top of this page.

For assembling machines, any filters set on the fluidboxes are ignored.

§module_slots: Option<i64>

The number of module slots in this machine.

§factoriopedia_description: Option<&'static str>

Provides additional description used in factoriopedia.

§hidden_in_factoriopedia: Option<bool>

Prototype property hidden_in_factoriopedia.

§localised_description: Option<&'static str>

Overwrites the description set in the locale file. The description is usually shown in the tooltip of the prototype.

§localised_name: Option<&'static str>

Overwrites the name set in the locale file. Can be used to easily set a procedurally-generated name because the LocalisedString format allows to insert parameters into the name directly from the Lua script.

§parameter: Option<bool>

Whether the prototype is a special type which can be used to parametrize blueprints and doesn’t have other function.

§factoriopedia_alternative: Option<&'static str>

The ID type corresponding to the prototype that inherits from this.

For example, if this is an EntityPrototype, this property’s type is EntityID.

§additional_pastable_entities: Option<&'static [&'static str]>

Names of the entity prototypes this entity prototype can be pasted on to in addition to the standard supported types.

This is used to allow copying between types that aren’t compatible on the C++ code side, by allowing mods to receive the on_entity_settings_pasted event for the given entity and do the setting pasting via script.

§alert_icon_scale: Option<f64>

Prototype property alert_icon_scale.

§allow_copy_paste: Option<bool>

Prototype property allow_copy_paste.

§ambient_sounds_group: Option<&'static str>

Prototype property ambient_sounds_group.

Trait Implementations§

Source§

impl Clone for RocketSilo

Source§

fn clone(&self) -> RocketSilo

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 RocketSilo

Source§

impl Debug for RocketSilo

Source§

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

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

impl Default for RocketSilo

Source§

fn default() -> RocketSilo

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

impl PartialEq for RocketSilo

Source§

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

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.