ed_journals/modules/logs/content/log_event_content/
passengers_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
35
//! Fired when there is a change to the player's passenger manifest.

use serde::{Deserialize, Serialize};

/// Fired when there is a change to the player's passenger manifest.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct PassengersEvent {
    /// List of passengers that are on board.
    pub manifest: Vec<PassengersManifestEntry>,
}

/// An entry for passengers that are on board.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct PassengersManifestEntry {
    /// The id of the mission this entry is a part of.
    #[serde(rename = "MissionID")]
    mission_id: u64,

    // TODO replace with enum
    /// The kind of passenger.
    #[serde(rename = "Type")]
    kind: String,

    /// Whether the passengers are considered VIP passengers.
    #[serde(rename = "VIP")]
    vip: bool,

    /// Whether the passengers are wanted.
    wanted: bool,

    /// The number of passengers for this entry/mission.
    count: u8,
}