1#[derive(serde::Serialize)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct SidebarState {
5 #[prost(
6 enumeration = "super::proto::enums::ui_sidebar_mode::UiSidebarMode",
7 optional,
8 tag = "1"
9 )]
10 pub mode: ::core::option::Option<i32>,
11 #[prost(message, repeated, tag = "2")]
12 pub menu_items: ::prost::alloc::vec::Vec<MenuItem>,
13 #[prost(message, optional, tag = "3")]
14 pub build_selector: ::core::option::Option<BuildSelector>,
15}
16impl ::prost::Name for SidebarState {
17 const NAME: &'static str = "SidebarState";
18 const PACKAGE: &'static str = "DwarfControl";
19 fn full_name() -> ::prost::alloc::string::String {
20 "DwarfControl.SidebarState".into()
21 }
22 fn type_url() -> ::prost::alloc::string::String {
23 "/DwarfControl.SidebarState".into()
24 }
25}
26#[derive(serde::Serialize)]
27#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
28pub struct MenuItem {
29 #[prost(message, optional, tag = "1")]
30 pub building_type: ::core::option::Option<
31 super::remote_fortress_reader::BuildingType,
32 >,
33 #[prost(int32, optional, tag = "2")]
34 pub existing_count: ::core::option::Option<i32>,
35 #[prost(enumeration = "BuildCategory", optional, tag = "3")]
36 pub build_category: ::core::option::Option<i32>,
37}
38impl ::prost::Name for MenuItem {
39 const NAME: &'static str = "MenuItem";
40 const PACKAGE: &'static str = "DwarfControl";
41 fn full_name() -> ::prost::alloc::string::String {
42 "DwarfControl.MenuItem".into()
43 }
44 fn type_url() -> ::prost::alloc::string::String {
45 "/DwarfControl.MenuItem".into()
46 }
47}
48#[derive(serde::Serialize)]
49#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
50pub struct SidebarCommand {
51 #[prost(
52 enumeration = "super::proto::enums::ui_sidebar_mode::UiSidebarMode",
53 optional,
54 tag = "1"
55 )]
56 pub mode: ::core::option::Option<i32>,
57 #[prost(int32, optional, tag = "2")]
58 pub menu_index: ::core::option::Option<i32>,
59 #[prost(enumeration = "MenuAction", optional, tag = "3")]
60 pub action: ::core::option::Option<i32>,
61 #[prost(message, optional, tag = "4")]
62 pub selection_coord: ::core::option::Option<super::remote_fortress_reader::Coord>,
63}
64impl ::prost::Name for SidebarCommand {
65 const NAME: &'static str = "SidebarCommand";
66 const PACKAGE: &'static str = "DwarfControl";
67 fn full_name() -> ::prost::alloc::string::String {
68 "DwarfControl.SidebarCommand".into()
69 }
70 fn type_url() -> ::prost::alloc::string::String {
71 "/DwarfControl.SidebarCommand".into()
72 }
73}
74#[derive(serde::Serialize)]
75#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
76pub struct BuiildReqChoice {
77 #[prost(int32, optional, tag = "1")]
78 pub distance: ::core::option::Option<i32>,
79 #[prost(string, optional, tag = "2")]
80 pub name: ::core::option::Option<::prost::alloc::string::String>,
81 #[prost(int32, optional, tag = "3")]
82 pub num_candidates: ::core::option::Option<i32>,
83 #[prost(int32, optional, tag = "4")]
84 pub used_count: ::core::option::Option<i32>,
85}
86impl ::prost::Name for BuiildReqChoice {
87 const NAME: &'static str = "BuiildReqChoice";
88 const PACKAGE: &'static str = "DwarfControl";
89 fn full_name() -> ::prost::alloc::string::String {
90 "DwarfControl.BuiildReqChoice".into()
91 }
92 fn type_url() -> ::prost::alloc::string::String {
93 "/DwarfControl.BuiildReqChoice".into()
94 }
95}
96#[derive(serde::Serialize)]
97#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
98pub struct BuildItemReq {
99 #[prost(int32, optional, tag = "2")]
101 pub count_required: ::core::option::Option<i32>,
102 #[prost(int32, optional, tag = "3")]
103 pub count_max: ::core::option::Option<i32>,
104 #[prost(int32, optional, tag = "4")]
105 pub count_provided: ::core::option::Option<i32>,
106}
107impl ::prost::Name for BuildItemReq {
108 const NAME: &'static str = "BuildItemReq";
109 const PACKAGE: &'static str = "DwarfControl";
110 fn full_name() -> ::prost::alloc::string::String {
111 "DwarfControl.BuildItemReq".into()
112 }
113 fn type_url() -> ::prost::alloc::string::String {
114 "/DwarfControl.BuildItemReq".into()
115 }
116}
117#[derive(serde::Serialize)]
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct BuildSelector {
120 #[prost(message, optional, tag = "1")]
121 pub building_type: ::core::option::Option<
122 super::remote_fortress_reader::BuildingType,
123 >,
124 #[prost(enumeration = "BuildSelectorStage", optional, tag = "2")]
125 pub stage: ::core::option::Option<i32>,
126 #[prost(message, repeated, tag = "3")]
127 pub choices: ::prost::alloc::vec::Vec<BuiildReqChoice>,
128 #[prost(int32, optional, tag = "4")]
129 pub sel_index: ::core::option::Option<i32>,
130 #[prost(message, repeated, tag = "5")]
131 pub requirements: ::prost::alloc::vec::Vec<BuildItemReq>,
132 #[prost(int32, optional, tag = "6")]
133 pub req_index: ::core::option::Option<i32>,
134 #[prost(string, repeated, tag = "7")]
135 pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
136 #[prost(int32, optional, tag = "8")]
137 pub radius_x_low: ::core::option::Option<i32>,
138 #[prost(int32, optional, tag = "9")]
139 pub radius_y_low: ::core::option::Option<i32>,
140 #[prost(int32, optional, tag = "10")]
141 pub radius_x_high: ::core::option::Option<i32>,
142 #[prost(int32, optional, tag = "11")]
143 pub radius_y_high: ::core::option::Option<i32>,
144 #[prost(message, optional, tag = "12")]
145 pub cursor: ::core::option::Option<super::remote_fortress_reader::Coord>,
146 #[prost(int32, repeated, packed = "false", tag = "13")]
147 pub tiles: ::prost::alloc::vec::Vec<i32>,
148}
149impl ::prost::Name for BuildSelector {
150 const NAME: &'static str = "BuildSelector";
151 const PACKAGE: &'static str = "DwarfControl";
152 fn full_name() -> ::prost::alloc::string::String {
153 "DwarfControl.BuildSelector".into()
154 }
155 fn type_url() -> ::prost::alloc::string::String {
156 "/DwarfControl.BuildSelector".into()
157 }
158}
159#[derive(serde::Serialize)]
160#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
161#[repr(i32)]
162pub enum BuildCategory {
163 NotCategory = 0,
164 SiegeEngines = 1,
165 Traps = 2,
166 Workshops = 3,
167 Furnaces = 4,
168 Constructions = 5,
169 MachineComponents = 6,
170 Track = 7,
171}
172impl BuildCategory {
173 pub fn as_str_name(&self) -> &'static str {
178 match self {
179 Self::NotCategory => "NotCategory",
180 Self::SiegeEngines => "SiegeEngines",
181 Self::Traps => "Traps",
182 Self::Workshops => "Workshops",
183 Self::Furnaces => "Furnaces",
184 Self::Constructions => "Constructions",
185 Self::MachineComponents => "MachineComponents",
186 Self::Track => "Track",
187 }
188 }
189 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
191 match value {
192 "NotCategory" => Some(Self::NotCategory),
193 "SiegeEngines" => Some(Self::SiegeEngines),
194 "Traps" => Some(Self::Traps),
195 "Workshops" => Some(Self::Workshops),
196 "Furnaces" => Some(Self::Furnaces),
197 "Constructions" => Some(Self::Constructions),
198 "MachineComponents" => Some(Self::MachineComponents),
199 "Track" => Some(Self::Track),
200 _ => None,
201 }
202 }
203}
204#[derive(serde::Serialize)]
205#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
206#[repr(i32)]
207pub enum MenuAction {
208 MenuNone = 0,
209 MenuSelect = 1,
210 MenuCancel = 2,
211 MenuSelectAll = 3,
212}
213impl MenuAction {
214 pub fn as_str_name(&self) -> &'static str {
219 match self {
220 Self::MenuNone => "MenuNone",
221 Self::MenuSelect => "MenuSelect",
222 Self::MenuCancel => "MenuCancel",
223 Self::MenuSelectAll => "MenuSelectAll",
224 }
225 }
226 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
228 match value {
229 "MenuNone" => Some(Self::MenuNone),
230 "MenuSelect" => Some(Self::MenuSelect),
231 "MenuCancel" => Some(Self::MenuCancel),
232 "MenuSelectAll" => Some(Self::MenuSelectAll),
233 _ => None,
234 }
235 }
236}
237#[derive(serde::Serialize)]
238#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
239#[repr(i32)]
240pub enum BuildSelectorStage {
241 StageNoMat = 0,
242 StagePlace = 1,
243 StageItemSelect = 2,
244}
245impl BuildSelectorStage {
246 pub fn as_str_name(&self) -> &'static str {
251 match self {
252 Self::StageNoMat => "StageNoMat",
253 Self::StagePlace => "StagePlace",
254 Self::StageItemSelect => "StageItemSelect",
255 }
256 }
257 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
259 match value {
260 "StageNoMat" => Some(Self::StageNoMat),
261 "StagePlace" => Some(Self::StagePlace),
262 "StageItemSelect" => Some(Self::StageItemSelect),
263 _ => None,
264 }
265 }
266}