1#[derive(serde::Serialize)]
3#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct InstrumentFlags {
5 #[prost(bool, optional, tag = "1")]
6 pub indefinite_pitch: ::core::option::Option<bool>,
7 #[prost(bool, optional, tag = "2")]
8 pub placed_as_building: ::core::option::Option<bool>,
9 #[prost(bool, optional, tag = "3")]
10 pub metal_mat: ::core::option::Option<bool>,
11 #[prost(bool, optional, tag = "4")]
12 pub stone_mat: ::core::option::Option<bool>,
13 #[prost(bool, optional, tag = "5")]
14 pub wood_mat: ::core::option::Option<bool>,
15 #[prost(bool, optional, tag = "6")]
16 pub glass_mat: ::core::option::Option<bool>,
17 #[prost(bool, optional, tag = "7")]
18 pub ceramic_mat: ::core::option::Option<bool>,
19 #[prost(bool, optional, tag = "8")]
20 pub shell_mat: ::core::option::Option<bool>,
21 #[prost(bool, optional, tag = "9")]
22 pub bone_mat: ::core::option::Option<bool>,
23}
24impl ::prost::Name for InstrumentFlags {
25 const NAME: &'static str = "InstrumentFlags";
26 const PACKAGE: &'static str = "ItemdefInstrument";
27 fn full_name() -> ::prost::alloc::string::String {
28 "ItemdefInstrument.InstrumentFlags".into()
29 }
30 fn type_url() -> ::prost::alloc::string::String {
31 "/ItemdefInstrument.InstrumentFlags".into()
32 }
33}
34#[derive(serde::Serialize)]
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct InstrumentPiece {
37 #[prost(string, optional, tag = "1")]
38 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
39 #[prost(string, optional, tag = "2")]
40 pub id: ::core::option::Option<::prost::alloc::string::String>,
41 #[prost(string, optional, tag = "3")]
42 pub name: ::core::option::Option<::prost::alloc::string::String>,
43 #[prost(string, optional, tag = "4")]
44 pub name_plural: ::core::option::Option<::prost::alloc::string::String>,
45}
46impl ::prost::Name for InstrumentPiece {
47 const NAME: &'static str = "InstrumentPiece";
48 const PACKAGE: &'static str = "ItemdefInstrument";
49 fn full_name() -> ::prost::alloc::string::String {
50 "ItemdefInstrument.InstrumentPiece".into()
51 }
52 fn type_url() -> ::prost::alloc::string::String {
53 "/ItemdefInstrument.InstrumentPiece".into()
54 }
55}
56#[derive(serde::Serialize)]
57#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
58pub struct InstrumentRegister {
59 #[prost(int32, optional, tag = "1")]
60 pub pitch_range_min: ::core::option::Option<i32>,
61 #[prost(int32, optional, tag = "2")]
62 pub pitch_range_max: ::core::option::Option<i32>,
63}
64impl ::prost::Name for InstrumentRegister {
65 const NAME: &'static str = "InstrumentRegister";
66 const PACKAGE: &'static str = "ItemdefInstrument";
67 fn full_name() -> ::prost::alloc::string::String {
68 "ItemdefInstrument.InstrumentRegister".into()
69 }
70 fn type_url() -> ::prost::alloc::string::String {
71 "/ItemdefInstrument.InstrumentRegister".into()
72 }
73}
74#[derive(serde::Serialize)]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct InstrumentDef {
77 #[prost(message, optional, tag = "1")]
78 pub flags: ::core::option::Option<InstrumentFlags>,
79 #[prost(int32, optional, tag = "2")]
80 pub size: ::core::option::Option<i32>,
81 #[prost(int32, optional, tag = "3")]
82 pub value: ::core::option::Option<i32>,
83 #[prost(int32, optional, tag = "4")]
84 pub material_size: ::core::option::Option<i32>,
85 #[prost(message, repeated, tag = "5")]
86 pub pieces: ::prost::alloc::vec::Vec<InstrumentPiece>,
87 #[prost(int32, optional, tag = "6")]
88 pub pitch_range_min: ::core::option::Option<i32>,
89 #[prost(int32, optional, tag = "7")]
90 pub pitch_range_max: ::core::option::Option<i32>,
91 #[prost(int32, optional, tag = "8")]
92 pub volume_mb_min: ::core::option::Option<i32>,
93 #[prost(int32, optional, tag = "9")]
94 pub volume_mb_max: ::core::option::Option<i32>,
95 #[prost(enumeration = "SoundProductionType", repeated, packed = "false", tag = "10")]
96 pub sound_production: ::prost::alloc::vec::Vec<i32>,
97 #[prost(string, repeated, tag = "11")]
98 pub sound_production_parm1: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
99 #[prost(string, repeated, tag = "12")]
100 pub sound_production_parm2: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
101 #[prost(enumeration = "PitchChoiceType", repeated, packed = "false", tag = "13")]
102 pub pitch_choice: ::prost::alloc::vec::Vec<i32>,
103 #[prost(string, repeated, tag = "14")]
104 pub pitch_choice_parm1: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
105 #[prost(string, repeated, tag = "15")]
106 pub pitch_choice_parm2: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
107 #[prost(enumeration = "TuningType", repeated, packed = "false", tag = "16")]
108 pub tuning: ::prost::alloc::vec::Vec<i32>,
109 #[prost(string, repeated, tag = "17")]
110 pub tuning_parm: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
111 #[prost(message, repeated, tag = "18")]
112 pub registers: ::prost::alloc::vec::Vec<InstrumentRegister>,
113 #[prost(string, optional, tag = "19")]
114 pub description: ::core::option::Option<::prost::alloc::string::String>,
115}
116impl ::prost::Name for InstrumentDef {
117 const NAME: &'static str = "InstrumentDef";
118 const PACKAGE: &'static str = "ItemdefInstrument";
119 fn full_name() -> ::prost::alloc::string::String {
120 "ItemdefInstrument.InstrumentDef".into()
121 }
122 fn type_url() -> ::prost::alloc::string::String {
123 "/ItemdefInstrument.InstrumentDef".into()
124 }
125}
126#[derive(serde::Serialize)]
127#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
128#[repr(i32)]
129pub enum PitchChoiceType {
130 MembranePosition = 0,
131 SubpartChoice = 1,
132 Keyboard = 2,
133 StoppingFret = 3,
134 StoppingAgainstBody = 4,
135 StoppingHole = 5,
136 StoppingHoleKey = 6,
137 Slide = 7,
138 HarmonicSeries = 8,
139 ValveRoutesAir = 9,
140 BpInBell = 10,
141 FootPedals = 11,
142}
143impl PitchChoiceType {
144 pub fn as_str_name(&self) -> &'static str {
149 match self {
150 Self::MembranePosition => "MEMBRANE_POSITION",
151 Self::SubpartChoice => "SUBPART_CHOICE",
152 Self::Keyboard => "KEYBOARD",
153 Self::StoppingFret => "STOPPING_FRET",
154 Self::StoppingAgainstBody => "STOPPING_AGAINST_BODY",
155 Self::StoppingHole => "STOPPING_HOLE",
156 Self::StoppingHoleKey => "STOPPING_HOLE_KEY",
157 Self::Slide => "SLIDE",
158 Self::HarmonicSeries => "HARMONIC_SERIES",
159 Self::ValveRoutesAir => "VALVE_ROUTES_AIR",
160 Self::BpInBell => "BP_IN_BELL",
161 Self::FootPedals => "FOOT_PEDALS",
162 }
163 }
164 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
166 match value {
167 "MEMBRANE_POSITION" => Some(Self::MembranePosition),
168 "SUBPART_CHOICE" => Some(Self::SubpartChoice),
169 "KEYBOARD" => Some(Self::Keyboard),
170 "STOPPING_FRET" => Some(Self::StoppingFret),
171 "STOPPING_AGAINST_BODY" => Some(Self::StoppingAgainstBody),
172 "STOPPING_HOLE" => Some(Self::StoppingHole),
173 "STOPPING_HOLE_KEY" => Some(Self::StoppingHoleKey),
174 "SLIDE" => Some(Self::Slide),
175 "HARMONIC_SERIES" => Some(Self::HarmonicSeries),
176 "VALVE_ROUTES_AIR" => Some(Self::ValveRoutesAir),
177 "BP_IN_BELL" => Some(Self::BpInBell),
178 "FOOT_PEDALS" => Some(Self::FootPedals),
179 _ => None,
180 }
181 }
182}
183#[derive(serde::Serialize)]
184#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
185#[repr(i32)]
186pub enum SoundProductionType {
187 PluckedByBp = 0,
188 Plucked = 1,
189 Bowed = 2,
190 StruckByBp = 3,
191 Struck = 4,
192 VibrateBpAgainstOpening = 5,
193 BlowAgainstFipple = 6,
194 BlowOverOpeningSide = 7,
195 BlowOverOpeningEnd = 8,
196 BlowOverSingleReed = 9,
197 BlowOverDoubleReed = 10,
198 BlowOverFreeReed = 11,
199 StruckTogether = 12,
200 Shaken = 13,
201 Scraped = 14,
202 Friction = 15,
203 Resonator = 16,
204 BagOverReed = 17,
205 AirOverReed = 18,
206 AirOverFreeReed = 19,
207 AirAgainstFipple = 20,
208}
209impl SoundProductionType {
210 pub fn as_str_name(&self) -> &'static str {
215 match self {
216 Self::PluckedByBp => "PLUCKED_BY_BP",
217 Self::Plucked => "PLUCKED",
218 Self::Bowed => "BOWED",
219 Self::StruckByBp => "STRUCK_BY_BP",
220 Self::Struck => "STRUCK",
221 Self::VibrateBpAgainstOpening => "VIBRATE_BP_AGAINST_OPENING",
222 Self::BlowAgainstFipple => "BLOW_AGAINST_FIPPLE",
223 Self::BlowOverOpeningSide => "BLOW_OVER_OPENING_SIDE",
224 Self::BlowOverOpeningEnd => "BLOW_OVER_OPENING_END",
225 Self::BlowOverSingleReed => "BLOW_OVER_SINGLE_REED",
226 Self::BlowOverDoubleReed => "BLOW_OVER_DOUBLE_REED",
227 Self::BlowOverFreeReed => "BLOW_OVER_FREE_REED",
228 Self::StruckTogether => "STRUCK_TOGETHER",
229 Self::Shaken => "SHAKEN",
230 Self::Scraped => "SCRAPED",
231 Self::Friction => "FRICTION",
232 Self::Resonator => "RESONATOR",
233 Self::BagOverReed => "BAG_OVER_REED",
234 Self::AirOverReed => "AIR_OVER_REED",
235 Self::AirOverFreeReed => "AIR_OVER_FREE_REED",
236 Self::AirAgainstFipple => "AIR_AGAINST_FIPPLE",
237 }
238 }
239 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
241 match value {
242 "PLUCKED_BY_BP" => Some(Self::PluckedByBp),
243 "PLUCKED" => Some(Self::Plucked),
244 "BOWED" => Some(Self::Bowed),
245 "STRUCK_BY_BP" => Some(Self::StruckByBp),
246 "STRUCK" => Some(Self::Struck),
247 "VIBRATE_BP_AGAINST_OPENING" => Some(Self::VibrateBpAgainstOpening),
248 "BLOW_AGAINST_FIPPLE" => Some(Self::BlowAgainstFipple),
249 "BLOW_OVER_OPENING_SIDE" => Some(Self::BlowOverOpeningSide),
250 "BLOW_OVER_OPENING_END" => Some(Self::BlowOverOpeningEnd),
251 "BLOW_OVER_SINGLE_REED" => Some(Self::BlowOverSingleReed),
252 "BLOW_OVER_DOUBLE_REED" => Some(Self::BlowOverDoubleReed),
253 "BLOW_OVER_FREE_REED" => Some(Self::BlowOverFreeReed),
254 "STRUCK_TOGETHER" => Some(Self::StruckTogether),
255 "SHAKEN" => Some(Self::Shaken),
256 "SCRAPED" => Some(Self::Scraped),
257 "FRICTION" => Some(Self::Friction),
258 "RESONATOR" => Some(Self::Resonator),
259 "BAG_OVER_REED" => Some(Self::BagOverReed),
260 "AIR_OVER_REED" => Some(Self::AirOverReed),
261 "AIR_OVER_FREE_REED" => Some(Self::AirOverFreeReed),
262 "AIR_AGAINST_FIPPLE" => Some(Self::AirAgainstFipple),
263 _ => None,
264 }
265 }
266}
267#[derive(serde::Serialize)]
268#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
269#[repr(i32)]
270pub enum TuningType {
271 Pegs = 0,
272 AdjustableBridges = 1,
273 Crooks = 2,
274 Tightening = 3,
275 Levers = 4,
276}
277impl TuningType {
278 pub fn as_str_name(&self) -> &'static str {
283 match self {
284 Self::Pegs => "PEGS",
285 Self::AdjustableBridges => "ADJUSTABLE_BRIDGES",
286 Self::Crooks => "CROOKS",
287 Self::Tightening => "TIGHTENING",
288 Self::Levers => "LEVERS",
289 }
290 }
291 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
293 match value {
294 "PEGS" => Some(Self::Pegs),
295 "ADJUSTABLE_BRIDGES" => Some(Self::AdjustableBridges),
296 "CROOKS" => Some(Self::Crooks),
297 "TIGHTENING" => Some(Self::Tightening),
298 "LEVERS" => Some(Self::Levers),
299 _ => None,
300 }
301 }
302}