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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! Fired at times when the game loads in a location, usually when just starting the game or when
//! the player is moven between locations for example by using a fleet carrier escape pod or when
//! the player died.

use serde::{Deserialize, Serialize};

use crate::modules::civilization::LocationInfo;

/// Fired at times when the game loads in a location, usually when just starting the game or when
/// the player is moven between locations for example by using a fleet carrier escape pod or when
/// the player died.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct LocationEvent {
    // TODO check when this is filled
    /// Distance from the arrival star of the current system.
    #[serde(rename = "DistFromStarLS")]
    pub dist_from_star_ls: Option<f32>,

    /// Whether the player is currently docked.
    pub docked: bool,

    /// Whether the player is in a taxi.
    #[serde(default)]
    pub taxi: bool,

    /// Whether the player is currently in a multicrew.
    #[serde(default)]
    pub multicrew: bool,

    /// Detailed information about the current location.
    #[serde(flatten)]
    pub location_info: LocationInfo,
}