ed_journals/modules/logs/content/log_event_content/
hull_damage_event.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Fired when the player received hull damage.

use serde::{Deserialize, Serialize};

/// Fired when the player received hull damage.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct HullDamageEvent {
    /// The current health of the ship.
    pub health: f32,
    pub player_pilot: bool,

    // TODO sometimes this is missing. Should check if it missing has special meaning
    #[serde(default)]
    pub fighter: bool,
}