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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
use serde::{Deserialize, Serialize};
use crate::modules::civilization::LocationInfo;
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct LocationEvent {
// TODO check when this is filled
#[serde(rename = "DistFromStarLS")]
pub dist_from_star_ls: Option<f32>,
pub docked: bool,
#[serde(default)]
pub taxi: bool,
#[serde(default)]
pub multicrew: bool,
#[serde(flatten)]
pub location_info: LocationInfo,
}
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventStationFaction {
// pub name: String,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventStationEconomy {
// pub name: String,
//
// #[serde(rename = "Name_Localised")]
// pub name_localized: String,
// pub proportion: f32,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventFaction {
// pub name: String,
// pub faction_state: FactionState,
// pub government: Government,
// pub influence: f32,
// pub allegiance: Superpower,
// pub happiness: String,
//
// #[serde(rename = "Happiness_Localised")]
// pub happiness_localized: String,
// pub my_reputation: f32,
//
// #[serde(default)]
// pub active_states: Vec<LocationEventFactionActiveState>,
//
// #[serde(default)]
// pub recovering_states: Vec<LocationEventFactionRecoveringState>,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventFactionActiveState {
// pub state: String,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventFactionRecoveringState {
// pub state: String,
// pub trend: u32,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventSystemFaction {
// pub name: String,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventConflict {
// pub war_type: String,
// pub status: String,
// pub faction_1: LocationEventConflictFaction,
// pub faction_2: LocationEventConflictFaction,
// }
//
// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
// #[serde(rename_all = "PascalCase")]
// pub struct LocationEventConflictFaction {
// pub name: String,
// pub stake: String,
// pub won_days: u32,
// }