pub struct LuaLogisticCell;Expand description
Logistic cell of a particular LuaEntity. A “Logistic Cell” is the given name for settings and properties used by what would normally be seen as a “Roboport”. A logistic cell however doesn’t have to be attached to the roboport entity (the character has one for the personal roboport).
Implementations§
Source§impl LuaLogisticCell
impl LuaLogisticCell
Sourcepub fn charge_approach_distance(&self) -> f32
pub fn charge_approach_distance(&self) -> f32
Radius at which the robots hover when waiting to be charged.
Sourcepub fn charging_robot_count(&self) -> u32
pub fn charging_robot_count(&self) -> u32
Number of robots currently charging.
Sourcepub fn charging_robots(&self) -> Vec<LuaEntity>
pub fn charging_robots(&self) -> Vec<LuaEntity>
Robots currently being charged.
Sourcepub fn construction_radius(&self) -> f32
pub fn construction_radius(&self) -> f32
Construction radius of this cell.
Sourcepub fn logistic_network(&self) -> LuaLogisticNetwork
pub fn logistic_network(&self) -> LuaLogisticNetwork
The network that owns this cell, if any.
Sourcepub fn logistic_radius(&self) -> f32
pub fn logistic_radius(&self) -> f32
Logistic radius of this cell.
Sourcepub fn logistics_connection_distance(&self) -> f32
pub fn logistics_connection_distance(&self) -> f32
Logistic connection distance of this cell.
Sourcepub fn mobile(&self) -> bool
pub fn mobile(&self) -> bool
true if this is a mobile cell. The logistic cell created by roboport equipment considered is mobile.
Sourcepub fn neighbours(&self) -> Vec<LuaLogisticCell>
pub fn neighbours(&self) -> Vec<LuaLogisticCell>
Neighbouring cells.
Sourcepub fn object_name(&self) -> &str
pub fn object_name(&self) -> &str
The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
Sourcepub fn stationed_construction_robot_count(&self) -> u32
pub fn stationed_construction_robot_count(&self) -> u32
Number of stationed construction robots in this cell.
Sourcepub fn stationed_logistic_robot_count(&self) -> u32
pub fn stationed_logistic_robot_count(&self) -> u32
Number of stationed logistic robots in this cell.
Sourcepub fn to_charge_robot_count(&self) -> u32
pub fn to_charge_robot_count(&self) -> u32
Number of robots waiting to charge.
Sourcepub fn to_charge_robots(&self) -> Vec<LuaEntity>
pub fn to_charge_robots(&self) -> Vec<LuaEntity>
Robots waiting to charge.
Sourcepub fn transmitting(&self) -> bool
pub fn transmitting(&self) -> bool
true if this cell is active.
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 is_in_construction_range(&self, position: MapPosition) -> bool
pub fn is_in_construction_range(&self, position: MapPosition) -> bool
Is a given position within the construction range of this cell?
Sourcepub fn is_in_logistic_range(&self, position: MapPosition) -> bool
pub fn is_in_logistic_range(&self, position: MapPosition) -> bool
Is a given position within the logistic range of this cell?
Sourcepub fn is_neighbour_with(&self, other: LuaLogisticCell) -> bool
pub fn is_neighbour_with(&self, other: LuaLogisticCell) -> bool
Are two cells neighbours?
Trait Implementations§
Source§impl Clone for LuaLogisticCell
impl Clone for LuaLogisticCell
Source§fn clone(&self) -> LuaLogisticCell
fn clone(&self) -> LuaLogisticCell
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more