pub struct LuaLogisticSection;Expand description
Logistic section of a particular LuaLogisticPoint or LuaConstantCombinatorControlBehavior.
Implementations§
Source§impl LuaLogisticSection
impl LuaLogisticSection
Sourcepub fn active(&self) -> bool
pub fn active(&self) -> bool
Whether this section is active. This can only be written to when the section is manual.
Sourcepub fn filters(&self) -> Vec<LogisticFilter>
pub fn filters(&self) -> Vec<LogisticFilter>
The logistic filters for this section.
This can only be written to when the section is manual.
Sourcepub fn filters_count(&self) -> u32
pub fn filters_count(&self) -> u32
Amount of filters this section has
Sourcepub fn group(&self) -> &str
pub fn group(&self) -> &str
The group this section belongs to.
An empty string when in no group.
This can only be written to when the section is manual.
Sourcepub fn is_manual(&self) -> bool
pub fn is_manual(&self) -> bool
Shortcut to check whether LuaLogisticSection::type is equal to manual.
Sourcepub fn multiplier(&self) -> f32
pub fn multiplier(&self) -> f32
Multiplier applied to all filters before they are used by game. This can only be written to when the section is manual.
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 type(&self) -> &str
pub fn type(&self) -> &str
The type of this logistic section. Sections that are not manual are controlled by game itself and may not be allowed to be changed by script.
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 clear_slot(&self, slot_index: LuaAny)
pub fn clear_slot(&self, slot_index: LuaAny)
Clears the logistic request and auto-trash from the given slot.
This can only be called when the section is manual.
Sourcepub fn get_slot(&self, slot_index: LuaAny) -> LogisticFilter
pub fn get_slot(&self, slot_index: LuaAny) -> LogisticFilter
Gets current settings of logistic request and auto-trash from the given slot.
Trait Implementations§
Source§impl Clone for LuaLogisticSection
impl Clone for LuaLogisticSection
Source§fn clone(&self) -> LuaLogisticSection
fn clone(&self) -> LuaLogisticSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more