pub struct OnSegmentedUnitDamagedEvent {
pub cause: LuaEntity,
pub damage_type: LuaDamagePrototype,
pub final_damage_amount: f32,
pub final_health: f32,
pub force: LuaForce,
pub name: &'static str,
pub original_damage_amount: f32,
pub segmented_unit: LuaSegmentedUnit,
pub source: LuaEntity,
pub tick: u32,
}Expand description
Called when a segmented unit is damaged. This is not called when a segmented unit’s health is set directly by another mod.
Fields§
§cause: LuaEntity§damage_type: LuaDamagePrototype§final_damage_amount: f32§final_health: f32§force: LuaForce§name: &'static str§original_damage_amount: f32§segmented_unit: LuaSegmentedUnit§source: LuaEntity§tick: u32Trait Implementations§
Source§impl Clone for OnSegmentedUnitDamagedEvent
impl Clone for OnSegmentedUnitDamagedEvent
Source§fn clone(&self) -> OnSegmentedUnitDamagedEvent
fn clone(&self) -> OnSegmentedUnitDamagedEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OnSegmentedUnitDamagedEvent
Source§impl Debug for OnSegmentedUnitDamagedEvent
impl Debug for OnSegmentedUnitDamagedEvent
Source§impl Default for OnSegmentedUnitDamagedEvent
impl Default for OnSegmentedUnitDamagedEvent
Source§fn default() -> OnSegmentedUnitDamagedEvent
fn default() -> OnSegmentedUnitDamagedEvent
Returns the “default value” for a type. Read more
impl StructuralPartialEq for OnSegmentedUnitDamagedEvent
Auto Trait Implementations§
impl Freeze for OnSegmentedUnitDamagedEvent
impl RefUnwindSafe for OnSegmentedUnitDamagedEvent
impl Send for OnSegmentedUnitDamagedEvent
impl Sync for OnSegmentedUnitDamagedEvent
impl Unpin for OnSegmentedUnitDamagedEvent
impl UnsafeUnpin for OnSegmentedUnitDamagedEvent
impl UnwindSafe for OnSegmentedUnitDamagedEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more