Skip to main content

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

1//! Fired when the player sells a module.
2
3use serde::{Deserialize, Serialize};
4
5use crate::modules::ship::{ShipModule, ShipSlot, ShipType};
6
7/// Fired when the player sells a module.
8#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
9#[serde(rename_all = "PascalCase")]
10pub struct ModuleSellEvent {
11    /// The market id where the player sold the module.
12    #[serde(rename = "MarketID")]
13    pub market_id: u64,
14
15    /// The slot the module was installed in.
16    pub slot: ShipSlot,
17
18    /// The module that was sold.
19    pub sell_item: ShipModule,
20
21    /// The localized name of the module that was sold.
22    #[serde(rename = "SellItem_Localised")]
23    pub sell_item_localized: Option<String>,
24
25    /// The number of credits received from selling the module.
26    pub sell_price: u64,
27
28    /// The type of the current active ship that the module was installed onto.
29    pub ship: ShipType,
30
31    /// The id of the current active ship that the module was installed on.
32    #[serde(rename = "ShipID")]
33    pub ship_id: u64,
34}