pub struct LuaEquipment;Expand description
An item in a LuaEquipmentGrid, for example a fusion reactor placed in one’s power armor.
An equipment reference becomes invalid once the equipment is removed or the equipment grid it resides in is destroyed.
Implementations§
Source§impl LuaEquipment
impl LuaEquipment
Sourcepub fn electric_buffer_size(&self) -> f64
pub fn electric_buffer_size(&self) -> f64
The power buffer size of this ElectricEnergyInterfaceEquipment.
Sourcepub fn generator_power(&self) -> f64
pub fn generator_power(&self) -> f64
Energy generated per tick.
Sourcepub fn ghost_name(&self) -> &'static str
pub fn ghost_name(&self) -> &'static str
Name of the equipment contained in this ghost
Sourcepub fn ghost_prototype(&self) -> LuaEquipmentPrototype
pub fn ghost_prototype(&self) -> LuaEquipmentPrototype
The prototype of the equipment contained in this ghost.
Sourcepub fn ghost_type(&self) -> &'static str
pub fn ghost_type(&self) -> &'static str
Type of the equipment contained in this ghost.
Sourcepub fn inventory_bonus(&self) -> u32
pub fn inventory_bonus(&self) -> u32
Inventory size bonus.
Sourcepub fn max_energy(&self) -> f64
pub fn max_energy(&self) -> f64
Maximum amount of energy that can be stored in this equipment.
Sourcepub fn max_shield(&self) -> f64
pub fn max_shield(&self) -> f64
Maximum shield value. 0 if this equipment doesn’t have a shield.
Sourcepub fn max_solar_power(&self) -> f64
pub fn max_solar_power(&self) -> f64
Maximum energy per tick crated by this equipment on the current surface. Actual generated energy varies depending on the daylight levels.
Sourcepub fn movement_bonus(&self) -> f64
pub fn movement_bonus(&self) -> f64
Movement speed bonus.
Sourcepub fn object_name(&self) -> &'static str
pub fn object_name(&self) -> &'static 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 position(&self) -> EquipmentPosition
pub fn position(&self) -> EquipmentPosition
Position of this equipment in the equipment grid.
Sourcepub fn power_production(&self) -> f64
pub fn power_production(&self) -> f64
The power production specific to the ElectricEnergyInterfaceEquipment type.
Sourcepub fn power_usage(&self) -> f64
pub fn power_usage(&self) -> f64
The power usage specific to the ElectricEnergyInterfaceEquipment type.
pub fn prototype(&self) -> LuaEquipmentPrototype
Sourcepub fn quality(&self) -> LuaQualityPrototype
pub fn quality(&self) -> LuaQualityPrototype
Quality of this equipment.
Sourcepub fn shape(&self) -> LuaEquipmentShape
pub fn shape(&self) -> LuaEquipmentShape
Shape of this equipment.
Sourcepub fn shield(&self) -> f64
pub fn shield(&self) -> f64
Current shield value of the equipment. Can’t be set higher than LuaEquipment::max_shield.
Trying to write this value on non-shield equipment will throw an error.
Sourcepub fn to_be_removed(&self) -> bool
pub fn to_be_removed(&self) -> bool
If this equipment is marked to be removed.
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.
Trait Implementations§
Source§impl Clone for LuaEquipment
impl Clone for LuaEquipment
Source§fn clone(&self) -> LuaEquipment
fn clone(&self) -> LuaEquipment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more