ed_journals/modules/logs/content/log_event_content/
buy_weapon_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
//! Fired when the player buys an (Odyssey) weapon.

use serde::{Deserialize, Serialize};

use crate::modules::odyssey::{Weapon, WeaponMod};

/// Fired when the player buys an (Odyssey) weapon.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct BuyWeaponEvent {
    /// The weapon the player bought.
    pub name: Weapon,

    /// The localized name of the weapon the player bought.
    #[serde(rename = "Name_Localised")]
    pub name_localized: Option<String>,

    /// The class of the weapon bought.
    pub class: u8,

    /// The cost in credits the player paid.
    pub price: u64,

    /// The id of the weapon.
    #[serde(rename = "SuitModuleID")]
    pub suit_module_id: u64,

    /// List of (pre-installed) weapons mods.
    pub weapon_mods: Vec<WeaponMod>,
}