pub struct LuaLogisticNetwork;Expand description
A single logistic network of a given force on a given surface.
Implementations§
Source§impl LuaLogisticNetwork
impl LuaLogisticNetwork
Sourcepub fn active_provider_points(&self) -> Vec<LuaLogisticPoint>
pub fn active_provider_points(&self) -> Vec<LuaLogisticPoint>
All active provider points in this network.
Sourcepub fn all_construction_robots(&self) -> u32
pub fn all_construction_robots(&self) -> u32
The total number of construction robots in the network (idle and active + in roboports).
Sourcepub fn all_logistic_robots(&self) -> u32
pub fn all_logistic_robots(&self) -> u32
The total number of logistic robots in the network (idle and active + in roboports).
Sourcepub fn available_construction_robots(&self) -> u32
pub fn available_construction_robots(&self) -> u32
Number of construction robots available for a job.
Sourcepub fn available_logistic_robots(&self) -> u32
pub fn available_logistic_robots(&self) -> u32
Number of logistic robots available for a job.
Sourcepub fn cells(&self) -> Vec<LuaLogisticCell>
pub fn cells(&self) -> Vec<LuaLogisticCell>
All cells in this network.
Sourcepub fn construction_robots(&self) -> Vec<LuaEntity>
pub fn construction_robots(&self) -> Vec<LuaEntity>
All currently deployed construction robots in this logistic network.
Sourcepub fn custom_name(&self) -> &str
pub fn custom_name(&self) -> &str
The custom logistic network name set by the player or by script, if any.
Sourcepub fn empty_provider_points(&self) -> Vec<LuaLogisticPoint>
pub fn empty_provider_points(&self) -> Vec<LuaLogisticPoint>
All things that have empty provider points in this network.
Sourcepub fn empty_providers(&self) -> Vec<LuaEntity>
pub fn empty_providers(&self) -> Vec<LuaEntity>
All entities that have empty logistic provider points in this network.
Sourcepub fn logistic_members(&self) -> Vec<LuaEntity>
pub fn logistic_members(&self) -> Vec<LuaEntity>
All other entities that have logistic points in this network (inserters mostly).
Sourcepub fn logistic_robots(&self) -> Vec<LuaEntity>
pub fn logistic_robots(&self) -> Vec<LuaEntity>
All currently deployed logistic robots in this logistic network.
Sourcepub fn network_id(&self) -> u32
pub fn network_id(&self) -> u32
The unique logistic network ID.
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 passive_provider_points(&self) -> Vec<LuaLogisticPoint>
pub fn passive_provider_points(&self) -> Vec<LuaLogisticPoint>
All passive provider points in this network.
Sourcepub fn provider_points(&self) -> Vec<LuaLogisticPoint>
pub fn provider_points(&self) -> Vec<LuaLogisticPoint>
All things that have provider points in this network.
Sourcepub fn providers(&self) -> Vec<LuaEntity>
pub fn providers(&self) -> Vec<LuaEntity>
All entities that have logistic provider points in this network.
Sourcepub fn requester_points(&self) -> Vec<LuaLogisticPoint>
pub fn requester_points(&self) -> Vec<LuaLogisticPoint>
All things that have requester points in this network.
Sourcepub fn requesters(&self) -> Vec<LuaEntity>
pub fn requesters(&self) -> Vec<LuaEntity>
All entities that have logistic requester points in this network.
Sourcepub fn robot_limit(&self) -> u32
pub fn robot_limit(&self) -> u32
Maximum number of robots the network can work with. Currently only used for the personal roboport.
Sourcepub fn storage_points(&self) -> Vec<LuaLogisticPoint>
pub fn storage_points(&self) -> Vec<LuaLogisticPoint>
All things that have storage points in this network.
Sourcepub fn storages(&self) -> Vec<LuaEntity>
pub fn storages(&self) -> Vec<LuaEntity>
All entities that have logistic storage points in this network.
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 can_satisfy_request(
&self,
count: Option<u32>,
include_buffers: Option<bool>,
item: LuaAny,
) -> bool
pub fn can_satisfy_request( &self, count: Option<u32>, include_buffers: Option<bool>, item: LuaAny, ) -> bool
Can the network satisfy a request for a given item and count.
Sourcepub fn find_cell_closest_to(
&self,
position: MapPosition,
) -> Option<LuaLogisticCell>
pub fn find_cell_closest_to( &self, position: MapPosition, ) -> Option<LuaLogisticCell>
Find logistic cell closest to a given position.
Sourcepub fn get_contents(
&self,
member: Option<LuaLogisticNetworkMember>,
) -> Vec<ItemWithQualityCount>
pub fn get_contents( &self, member: Option<LuaLogisticNetworkMember>, ) -> Vec<ItemWithQualityCount>
Get item counts for the entire network, similar to how LuaInventory::get_contents does.
Sourcepub fn get_item_count(
&self,
item: Option<LuaAny>,
member: Option<LuaLogisticNetworkMember>,
) -> i32
pub fn get_item_count( &self, item: Option<LuaAny>, member: Option<LuaLogisticNetworkMember>, ) -> i32
Count given or all items in the network or given members.
Sourcepub fn get_supply_counts(&self, item: LuaAny) -> LogisticsNetworkSupplyCounts
pub fn get_supply_counts(&self, item: LuaAny) -> LogisticsNetworkSupplyCounts
Get the amount of items of the given type indexed by the storage member.
Sourcepub fn get_supply_points(&self, item: LuaAny) -> LogisticsNetworkSupplyPoints
pub fn get_supply_points(&self, item: LuaAny) -> LogisticsNetworkSupplyPoints
Gets the logistic points with of the given type indexed by the storage member.
Sourcepub fn insert(
&self,
item: LuaAny,
members: Option<LuaLogisticNetworkMembers>,
) -> u32
pub fn insert( &self, item: LuaAny, members: Option<LuaLogisticNetworkMembers>, ) -> u32
Insert items into the logistic network. This will actually insert the items into some logistic chests.
Sourcepub fn remove_item(
&self,
item: LuaAny,
members: Option<LuaLogisticNetworkMembers2>,
) -> u32
pub fn remove_item( &self, item: LuaAny, members: Option<LuaLogisticNetworkMembers2>, ) -> u32
Remove items from the logistic network. This will actually remove the items from some logistic chests.
Sourcepub fn select_drop_point(
&self,
params: LuaLogisticNetworkSelectDropPointParams,
) -> Option<LuaLogisticPoint>
pub fn select_drop_point( &self, params: LuaLogisticNetworkSelectDropPointParams, ) -> Option<LuaLogisticPoint>
Find a logistic point to drop the specific item stack.
Sourcepub fn select_pickup_point(
&self,
params: LuaLogisticNetworkSelectPickupPointParams,
) -> Option<LuaLogisticPoint>
pub fn select_pickup_point( &self, params: LuaLogisticNetworkSelectPickupPointParams, ) -> Option<LuaLogisticPoint>
Find the ‘best’ logistic point with this item ID and from the given position or from given chest type.
Trait Implementations§
Source§impl Clone for LuaLogisticNetwork
impl Clone for LuaLogisticNetwork
Source§fn clone(&self) -> LuaLogisticNetwork
fn clone(&self) -> LuaLogisticNetwork
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more