#[derive(serde::Serialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InstrumentFlags {
#[prost(bool, optional, tag = "1")]
pub indefinite_pitch: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
pub placed_as_building: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "3")]
pub metal_mat: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "4")]
pub stone_mat: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "5")]
pub wood_mat: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "6")]
pub glass_mat: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "7")]
pub ceramic_mat: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "8")]
pub shell_mat: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "9")]
pub bone_mat: ::core::option::Option<bool>,
}
impl ::prost::Name for InstrumentFlags {
const NAME: &'static str = "InstrumentFlags";
const PACKAGE: &'static str = "ItemdefInstrument";
fn full_name() -> ::prost::alloc::string::String {
"ItemdefInstrument.InstrumentFlags".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ItemdefInstrument.InstrumentFlags".into()
}
}
#[derive(serde::Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InstrumentPiece {
#[prost(string, optional, tag = "1")]
pub r#type: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub name_plural: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for InstrumentPiece {
const NAME: &'static str = "InstrumentPiece";
const PACKAGE: &'static str = "ItemdefInstrument";
fn full_name() -> ::prost::alloc::string::String {
"ItemdefInstrument.InstrumentPiece".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ItemdefInstrument.InstrumentPiece".into()
}
}
#[derive(serde::Serialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InstrumentRegister {
#[prost(int32, optional, tag = "1")]
pub pitch_range_min: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "2")]
pub pitch_range_max: ::core::option::Option<i32>,
}
impl ::prost::Name for InstrumentRegister {
const NAME: &'static str = "InstrumentRegister";
const PACKAGE: &'static str = "ItemdefInstrument";
fn full_name() -> ::prost::alloc::string::String {
"ItemdefInstrument.InstrumentRegister".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ItemdefInstrument.InstrumentRegister".into()
}
}
#[derive(serde::Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstrumentDef {
#[prost(message, optional, tag = "1")]
pub flags: ::core::option::Option<InstrumentFlags>,
#[prost(int32, optional, tag = "2")]
pub size: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "3")]
pub value: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "4")]
pub material_size: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "5")]
pub pieces: ::prost::alloc::vec::Vec<InstrumentPiece>,
#[prost(int32, optional, tag = "6")]
pub pitch_range_min: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "7")]
pub pitch_range_max: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "8")]
pub volume_mb_min: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "9")]
pub volume_mb_max: ::core::option::Option<i32>,
#[prost(enumeration = "SoundProductionType", repeated, packed = "false", tag = "10")]
pub sound_production: ::prost::alloc::vec::Vec<i32>,
#[prost(string, repeated, tag = "11")]
pub sound_production_parm1: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "12")]
pub sound_production_parm2: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "PitchChoiceType", repeated, packed = "false", tag = "13")]
pub pitch_choice: ::prost::alloc::vec::Vec<i32>,
#[prost(string, repeated, tag = "14")]
pub pitch_choice_parm1: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "15")]
pub pitch_choice_parm2: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "TuningType", repeated, packed = "false", tag = "16")]
pub tuning: ::prost::alloc::vec::Vec<i32>,
#[prost(string, repeated, tag = "17")]
pub tuning_parm: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "18")]
pub registers: ::prost::alloc::vec::Vec<InstrumentRegister>,
#[prost(string, optional, tag = "19")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for InstrumentDef {
const NAME: &'static str = "InstrumentDef";
const PACKAGE: &'static str = "ItemdefInstrument";
fn full_name() -> ::prost::alloc::string::String {
"ItemdefInstrument.InstrumentDef".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ItemdefInstrument.InstrumentDef".into()
}
}
#[derive(serde::Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PitchChoiceType {
MembranePosition = 0,
SubpartChoice = 1,
Keyboard = 2,
StoppingFret = 3,
StoppingAgainstBody = 4,
StoppingHole = 5,
StoppingHoleKey = 6,
Slide = 7,
HarmonicSeries = 8,
ValveRoutesAir = 9,
BpInBell = 10,
FootPedals = 11,
}
impl PitchChoiceType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MembranePosition => "MEMBRANE_POSITION",
Self::SubpartChoice => "SUBPART_CHOICE",
Self::Keyboard => "KEYBOARD",
Self::StoppingFret => "STOPPING_FRET",
Self::StoppingAgainstBody => "STOPPING_AGAINST_BODY",
Self::StoppingHole => "STOPPING_HOLE",
Self::StoppingHoleKey => "STOPPING_HOLE_KEY",
Self::Slide => "SLIDE",
Self::HarmonicSeries => "HARMONIC_SERIES",
Self::ValveRoutesAir => "VALVE_ROUTES_AIR",
Self::BpInBell => "BP_IN_BELL",
Self::FootPedals => "FOOT_PEDALS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MEMBRANE_POSITION" => Some(Self::MembranePosition),
"SUBPART_CHOICE" => Some(Self::SubpartChoice),
"KEYBOARD" => Some(Self::Keyboard),
"STOPPING_FRET" => Some(Self::StoppingFret),
"STOPPING_AGAINST_BODY" => Some(Self::StoppingAgainstBody),
"STOPPING_HOLE" => Some(Self::StoppingHole),
"STOPPING_HOLE_KEY" => Some(Self::StoppingHoleKey),
"SLIDE" => Some(Self::Slide),
"HARMONIC_SERIES" => Some(Self::HarmonicSeries),
"VALVE_ROUTES_AIR" => Some(Self::ValveRoutesAir),
"BP_IN_BELL" => Some(Self::BpInBell),
"FOOT_PEDALS" => Some(Self::FootPedals),
_ => None,
}
}
}
#[derive(serde::Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SoundProductionType {
PluckedByBp = 0,
Plucked = 1,
Bowed = 2,
StruckByBp = 3,
Struck = 4,
VibrateBpAgainstOpening = 5,
BlowAgainstFipple = 6,
BlowOverOpeningSide = 7,
BlowOverOpeningEnd = 8,
BlowOverSingleReed = 9,
BlowOverDoubleReed = 10,
BlowOverFreeReed = 11,
StruckTogether = 12,
Shaken = 13,
Scraped = 14,
Friction = 15,
Resonator = 16,
BagOverReed = 17,
AirOverReed = 18,
AirOverFreeReed = 19,
AirAgainstFipple = 20,
}
impl SoundProductionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PluckedByBp => "PLUCKED_BY_BP",
Self::Plucked => "PLUCKED",
Self::Bowed => "BOWED",
Self::StruckByBp => "STRUCK_BY_BP",
Self::Struck => "STRUCK",
Self::VibrateBpAgainstOpening => "VIBRATE_BP_AGAINST_OPENING",
Self::BlowAgainstFipple => "BLOW_AGAINST_FIPPLE",
Self::BlowOverOpeningSide => "BLOW_OVER_OPENING_SIDE",
Self::BlowOverOpeningEnd => "BLOW_OVER_OPENING_END",
Self::BlowOverSingleReed => "BLOW_OVER_SINGLE_REED",
Self::BlowOverDoubleReed => "BLOW_OVER_DOUBLE_REED",
Self::BlowOverFreeReed => "BLOW_OVER_FREE_REED",
Self::StruckTogether => "STRUCK_TOGETHER",
Self::Shaken => "SHAKEN",
Self::Scraped => "SCRAPED",
Self::Friction => "FRICTION",
Self::Resonator => "RESONATOR",
Self::BagOverReed => "BAG_OVER_REED",
Self::AirOverReed => "AIR_OVER_REED",
Self::AirOverFreeReed => "AIR_OVER_FREE_REED",
Self::AirAgainstFipple => "AIR_AGAINST_FIPPLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PLUCKED_BY_BP" => Some(Self::PluckedByBp),
"PLUCKED" => Some(Self::Plucked),
"BOWED" => Some(Self::Bowed),
"STRUCK_BY_BP" => Some(Self::StruckByBp),
"STRUCK" => Some(Self::Struck),
"VIBRATE_BP_AGAINST_OPENING" => Some(Self::VibrateBpAgainstOpening),
"BLOW_AGAINST_FIPPLE" => Some(Self::BlowAgainstFipple),
"BLOW_OVER_OPENING_SIDE" => Some(Self::BlowOverOpeningSide),
"BLOW_OVER_OPENING_END" => Some(Self::BlowOverOpeningEnd),
"BLOW_OVER_SINGLE_REED" => Some(Self::BlowOverSingleReed),
"BLOW_OVER_DOUBLE_REED" => Some(Self::BlowOverDoubleReed),
"BLOW_OVER_FREE_REED" => Some(Self::BlowOverFreeReed),
"STRUCK_TOGETHER" => Some(Self::StruckTogether),
"SHAKEN" => Some(Self::Shaken),
"SCRAPED" => Some(Self::Scraped),
"FRICTION" => Some(Self::Friction),
"RESONATOR" => Some(Self::Resonator),
"BAG_OVER_REED" => Some(Self::BagOverReed),
"AIR_OVER_REED" => Some(Self::AirOverReed),
"AIR_OVER_FREE_REED" => Some(Self::AirOverFreeReed),
"AIR_AGAINST_FIPPLE" => Some(Self::AirAgainstFipple),
_ => None,
}
}
}
#[derive(serde::Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TuningType {
Pegs = 0,
AdjustableBridges = 1,
Crooks = 2,
Tightening = 3,
Levers = 4,
}
impl TuningType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Pegs => "PEGS",
Self::AdjustableBridges => "ADJUSTABLE_BRIDGES",
Self::Crooks => "CROOKS",
Self::Tightening => "TIGHTENING",
Self::Levers => "LEVERS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PEGS" => Some(Self::Pegs),
"ADJUSTABLE_BRIDGES" => Some(Self::AdjustableBridges),
"CROOKS" => Some(Self::Crooks),
"TIGHTENING" => Some(Self::Tightening),
"LEVERS" => Some(Self::Levers),
_ => None,
}
}
}