diff --git a/Cargo.toml b/Cargo.toml index d8c9245..f4dd7f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,23 +18,22 @@ categories = ["api-bindings", "game-development", "games"] exclude = ["images/"] [dependencies] -protobuf = "=3.7.2" -byteorder = "1.5.0" -num_enum = "0.7.3" -log = "0.4.26" -derive_more = { version = "2.0", features = ["display"] } +prost = "0.14" +byteorder = "1" +num_enum = "0.7" +log = "0.4" +derive_more = { version = "2", features = ["display"] } dfhack-proto = { version = "0.11.0", path = "dfhack-proto" } thiserror = "2" [dev-dependencies] bmp = "0.5.0" -ctor = "0.4.1" +ctor = "0.6" lazy_static = "1.5.0" -rand = "0.9.0" -env_logger = "0.11.7" +rand = "0.10" +env_logger = "0.11" [features] -test-with-df = ["reflection"] -reflection = ["dfhack-proto/reflection"] +test-with-df = [] diff --git a/README.md b/README.md index f036d27..2fe92ca 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,12 @@ Displaying some information about the current world. ```no_run let mut client = dfhack_remote::connect().unwrap(); let world_info = client.core().get_world_info().unwrap(); +let world_name = world_info.world_name.clone().unwrap().clone(); println!( "Welcome to {} ({})", - world_info.world_name.last_name(), - world_info.world_name.english_name() + world_name.last_name(), + world_name.english_name() ); ``` diff --git a/dfhack-proto/Cargo.toml b/dfhack-proto/Cargo.toml index 0e96f8c..3332475 100644 --- a/dfhack-proto/Cargo.toml +++ b/dfhack-proto/Cargo.toml @@ -10,14 +10,14 @@ license = "MIT OR Apache-2.0" categories = ["api-bindings", "game-development", "games"] [features] -reflection = [] [dependencies] -protobuf = "=3.7.2" +prost = "0.14" +serde = { version = "1", features = ["derive"] } [build-dependencies] -protobuf-codegen = "=3.7.2" -protobuf = "=3.7.2" +prost = "0.14" +prost-build = "0.14" dfhack-proto-srcs = { version = "0.11.0", path = "../dfhack-proto-srcs" } regex = "1" heck = "0.5.0" @@ -25,3 +25,4 @@ quote = "1.0.18" prettyplease = "0.2.4" syn = "2.0.15" proc-macro2 = "1.0.56" +protoc-fetcher = "0.1" diff --git a/dfhack-proto/build.rs b/dfhack-proto/build.rs index 1c49baf..4861363 100644 --- a/dfhack-proto/build.rs +++ b/dfhack-proto/build.rs @@ -1,22 +1,23 @@ +use std::env; use std::path::Path; use std::{collections::HashMap, io::BufRead, path::PathBuf}; use heck::{ToPascalCase, ToSnakeCase}; use proc_macro2::TokenStream; -use protobuf::reflect::MessageDescriptor; -use protobuf_codegen::{Customize, CustomizeCallback}; use quote::format_ident; use quote::quote; use quote::ToTokens; use regex::Regex; use syn::Ident; +#[derive(Debug)] struct Rpc { pub name: String, pub input: String, pub output: String, } +#[derive(Debug)] struct Plugin { pub plugin_name: String, @@ -45,98 +46,67 @@ impl Plugin { } } -struct AddHash; - -impl CustomizeCallback for AddHash { - fn message(&self, message: &MessageDescriptor) -> Customize { - let mut customize = Customize::default(); - if message.name() == "MatPair" || message.name() == "Coord" { - customize = customize.before("#[derive(Hash, Eq)]"); - } - customize - } -} - fn main() { println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-env-changed=DFHACK_REGEN"); - let proto_include_dir = dfhack_proto_srcs::include_dir(); - let protos = dfhack_proto_srcs::protos(); + if std::env::var("DFHACK_REGEN").is_ok() { + let protoc = get_protoc(); - assert!(!protos.is_empty(), "No protobuf file for code generation."); + let proto_include_dir = dfhack_proto_srcs::include_dir(); + let protos = dfhack_proto_srcs::protos(); - // Generate in the sources if DFHACK_REGEN is set - // in OUT_DIR otherwise. - // TODO It should always be OUT_DIR, then expose macros. - let out_path = match std::env::var("DFHACK_REGEN") { - Ok(_) => { - let dst = PathBuf::from("src/generated"); - if dst.exists() { - std::fs::remove_dir_all(&dst).unwrap(); - } - std::fs::create_dir_all(&dst).unwrap(); - dst + assert!(!protos.is_empty(), "No protobuf file for code generation."); + + // Generate in the sources if DFHACK_REGEN is set + let out_path = PathBuf::from(format!("{}/src/generated", env!("CARGO_MANIFEST_DIR"))); + if out_path.exists() { + std::fs::remove_dir_all(&out_path).unwrap(); } - Err(_) => PathBuf::from(std::env::var("OUT_DIR").unwrap()), - }; + std::fs::create_dir_all(&out_path).unwrap(); + // Generate the protobuf message files + generate_messages_rs(&protoc, &protos, proto_include_dir, &out_path); - // Generate the protobuf message files - generate_messages_rs(&protos, proto_include_dir, &out_path); + // Generate the plugin stubs + generate_stubs_rs(&protos, &out_path) + } +} - // Generate the plugin stubs - generate_stubs_rs(&protos, &out_path) +fn get_protoc() -> PathBuf { + let protoc_version = "33.5"; + let out_dir = env::var("OUT_DIR").unwrap(); + protoc_fetcher::protoc(protoc_version, Path::new(&out_dir)).unwrap() } -fn generate_messages_rs(protos: &Vec, include_dir: &str, out_path: &Path) { +fn generate_messages_rs(protoc: &PathBuf, protos: &[PathBuf], include_dir: &str, out_path: &Path) { let mut out_path = out_path.to_path_buf(); out_path.push("messages"); std::fs::create_dir_all(&out_path).unwrap(); - messages_protoc_codegen(protos, include_dir, &out_path); - messages_generate_mod_rs(protos, &out_path); + messages_protoc_codegen(protoc, protos, include_dir, &out_path); } // Call the protoc code generation -fn messages_protoc_codegen(protos: &Vec, include_dir: &str, out_path: &Path) { - protobuf_codegen::Codegen::new() - .customize(Customize::default().lite_runtime(false)) - .customize_callback(AddHash) - .pure() - .include(include_dir) - .inputs(protos) +fn messages_protoc_codegen( + protoc: &PathBuf, + protos: &[PathBuf], + include_dir: &str, + out_path: &Path, +) { + let mut mod_path = out_path.to_path_buf(); + mod_path.push("includes.rs"); + println!("{}", mod_path.display()); + prost_build::Config::new() + .enable_type_names() + .type_attribute(".", "#[derive(serde::Serialize)]") + .protoc_executable(protoc) .out_dir(out_path) - .run_from_script(); -} - -fn messages_generate_mod_rs(protos: &Vec, out_path: &Path) { - let mut file = quote!(); - - for proto in protos { - let mod_name = proto - .with_extension("") - .file_name() - .unwrap() - .to_str() - .unwrap() - .to_string(); - - let mod_name: Ident = format_ident!("{}", mod_name); - - file.extend(quote! { - mod #mod_name; - pub use self::#mod_name::*; - }); - } - // Write mod.rs - let mut mod_rs_path = out_path.to_path_buf(); - mod_rs_path.push("mod.rs"); - let tree = syn::parse2(file).unwrap(); - let formatted = prettyplease::unparse(&tree); - - std::fs::write(mod_rs_path, formatted).unwrap(); + .include_file(&mod_path) + .compile_protos(protos, &[include_dir]) + .unwrap(); + //panic!("{}", mod_path.display()); } -fn generate_stubs_rs(protos: &Vec, out_path: &Path) { +fn generate_stubs_rs(protos: &[PathBuf], out_path: &Path) { let plugins = read_protos_rpcs(protos); let mut out_path = out_path.to_path_buf(); out_path.push("stubs"); @@ -162,8 +132,7 @@ fn generate_stubs_mod_rs(plugins: &Vec, file: &mut TokenStream) { file.extend(quote! { use crate::messages::*; - #[cfg(feature = "reflection")] - use protobuf::MessageFull; + use prost::Name; }); let mut reflection_vec_building = quote!(); @@ -181,7 +150,7 @@ fn generate_stubs_mod_rs(plugins: &Vec, file: &mut TokenStream) { let member_ident = plugin.member_ident.clone(); plugins_impl.extend(quote! { #[doc = #doc] - pub fn #member_ident(&mut self) -> crate::stubs::#struct_ident { + pub fn #member_ident(&'a mut self) -> crate::stubs::#struct_ident<'a, TChannel> { crate::stubs::#struct_ident::new(&mut self.channel) } }); @@ -199,11 +168,10 @@ fn generate_stubs_mod_rs(plugins: &Vec, file: &mut TokenStream) { } } - impl Stubs { + impl<'a, TChannel: crate::Channel> Stubs { #plugins_impl } - #[cfg(feature = "reflection")] impl crate::reflection::StubReflection for Stubs { fn list_methods() -> Vec { let mut methods = Vec::new(); @@ -262,7 +230,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { &mut self, }; prep = quote! { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); } } @@ -281,8 +249,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { value: i32, }; prep = quote! { - let mut request = IntMessage::new(); - request.set_value(value); + let request = IntMessage { value }; } } @@ -291,7 +258,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { i32 }; post = quote! { - let _response = crate::Reply { reply: _response.value(), fragments: _response.fragments }; + let _response = crate::Reply { reply: _response.value, fragments: _response.fragments }; } } @@ -301,8 +268,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { value: bool, }; prep = quote! { - let mut request = SingleBool::new(); - request.set_Value(value); + let request = SingleBool { value: Some(value) }; } } @@ -311,7 +277,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { bool }; post = quote! { - let _response = crate::Reply { reply: _response.Value(), fragments: _response.fragments }; + let _response = crate::Reply { reply: _response.value(), fragments: _response.fragments }; } } @@ -320,7 +286,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { String }; post = quote! { - let _response = crate::Reply { reply: _response.value().to_string(), fragments: _response.fragments }; + let _response = crate::Reply { reply: _response.value.clone(), fragments: _response.fragments }; } } @@ -331,8 +297,8 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { ) -> Result, TChannel::TError> { #prep let _response: crate::Reply<#output_ident> = self.channel.request( - #plugin_name.to_string(), - #function_name.to_string(), + #plugin_name, + #function_name, request, )?; #post @@ -342,14 +308,10 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { reflection_vec.extend(quote! { crate::reflection::RemoteProcedureDescriptor { - name: #function_name.to_string(), - plugin_name: #plugin_name.to_string(), - input_type: #input_ident::descriptor() - .full_name() - .to_string(), - output_type: #output_ident::descriptor() - .full_name() - .to_string(), + name: #function_name, + plugin_name: #plugin_name, + input_type: #input_ident::full_name(), + output_type: #output_ident::full_name(), }, }); } @@ -359,7 +321,6 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { #plugin_impl } - #[cfg(feature = "reflection")] impl crate::reflection::StubReflection for #struct_ident<'_, TChannel> { fn list_methods() -> Vec { vec![ @@ -370,7 +331,7 @@ fn generate_stub_rs(plugin: &Plugin, file: &mut TokenStream) { }); } -fn read_protos_rpcs(protos: &Vec) -> Vec { +fn read_protos_rpcs(protos: &[PathBuf]) -> Vec { let mut plugins = HashMap::::new(); for proto in protos { diff --git a/dfhack-proto/src/generated/messages/AdventureControl.rs b/dfhack-proto/src/generated/messages/AdventureControl.rs deleted file mode 100644 index ece07ba..0000000 --- a/dfhack-proto/src/generated/messages/AdventureControl.rs +++ /dev/null @@ -1,1206 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `AdventureControl.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:AdventureControl.MoveCommandParams) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MoveCommandParams { - // message fields - // @@protoc_insertion_point(field:AdventureControl.MoveCommandParams.direction) - pub direction: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:AdventureControl.MoveCommandParams.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MoveCommandParams { - fn default() -> &'a MoveCommandParams { - ::default_instance() - } -} - -impl MoveCommandParams { - pub fn new() -> MoveCommandParams { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::Coord>( - "direction", - |m: &MoveCommandParams| { &m.direction }, - |m: &mut MoveCommandParams| { &mut m.direction }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MoveCommandParams", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MoveCommandParams { - const NAME: &'static str = "MoveCommandParams"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.direction)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.direction.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.direction.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MoveCommandParams { - MoveCommandParams::new() - } - - fn clear(&mut self) { - self.direction.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static MoveCommandParams { - static instance: MoveCommandParams = MoveCommandParams { - direction: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MoveCommandParams { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MoveCommandParams").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MoveCommandParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MoveCommandParams { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:AdventureControl.MovementOption) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MovementOption { - // message fields - // @@protoc_insertion_point(field:AdventureControl.MovementOption.dest) - pub dest: ::protobuf::MessageField, - // @@protoc_insertion_point(field:AdventureControl.MovementOption.source) - pub source: ::protobuf::MessageField, - // @@protoc_insertion_point(field:AdventureControl.MovementOption.grab) - pub grab: ::protobuf::MessageField, - // @@protoc_insertion_point(field:AdventureControl.MovementOption.movement_type) - pub movement_type: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:AdventureControl.MovementOption.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MovementOption { - fn default() -> &'a MovementOption { - ::default_instance() - } -} - -impl MovementOption { - pub fn new() -> MovementOption { - ::std::default::Default::default() - } - - // optional .AdventureControl.CarefulMovementType movement_type = 4; - - pub fn movement_type(&self) -> CarefulMovementType { - match self.movement_type { - Some(e) => e.enum_value_or(CarefulMovementType::DEFAULT_MOVEMENT), - None => CarefulMovementType::DEFAULT_MOVEMENT, - } - } - - pub fn clear_movement_type(&mut self) { - self.movement_type = ::std::option::Option::None; - } - - pub fn has_movement_type(&self) -> bool { - self.movement_type.is_some() - } - - // Param is passed by value, moved - pub fn set_movement_type(&mut self, v: CarefulMovementType) { - self.movement_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::Coord>( - "dest", - |m: &MovementOption| { &m.dest }, - |m: &mut MovementOption| { &mut m.dest }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::Coord>( - "source", - |m: &MovementOption| { &m.source }, - |m: &mut MovementOption| { &mut m.source }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::Coord>( - "grab", - |m: &MovementOption| { &m.grab }, - |m: &mut MovementOption| { &mut m.grab }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "movement_type", - |m: &MovementOption| { &m.movement_type }, - |m: &mut MovementOption| { &mut m.movement_type }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MovementOption", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MovementOption { - const NAME: &'static str = "MovementOption"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.dest)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.source)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.grab)?; - }, - 32 => { - self.movement_type = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.dest.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.source.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.grab.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.movement_type { - my_size += ::protobuf::rt::int32_size(4, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.dest.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.source.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.grab.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.movement_type { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MovementOption { - MovementOption::new() - } - - fn clear(&mut self) { - self.dest.clear(); - self.source.clear(); - self.grab.clear(); - self.movement_type = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MovementOption { - static instance: MovementOption = MovementOption { - dest: ::protobuf::MessageField::none(), - source: ::protobuf::MessageField::none(), - grab: ::protobuf::MessageField::none(), - movement_type: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MovementOption { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MovementOption").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MovementOption { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MovementOption { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:AdventureControl.MenuContents) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MenuContents { - // message fields - // @@protoc_insertion_point(field:AdventureControl.MenuContents.current_menu) - pub current_menu: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:AdventureControl.MenuContents.movements) - pub movements: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:AdventureControl.MenuContents.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MenuContents { - fn default() -> &'a MenuContents { - ::default_instance() - } -} - -impl MenuContents { - pub fn new() -> MenuContents { - ::std::default::Default::default() - } - - // optional .AdventureControl.AdvmodeMenu current_menu = 1; - - pub fn current_menu(&self) -> AdvmodeMenu { - match self.current_menu { - Some(e) => e.enum_value_or(AdvmodeMenu::Default), - None => AdvmodeMenu::Default, - } - } - - pub fn clear_current_menu(&mut self) { - self.current_menu = ::std::option::Option::None; - } - - pub fn has_current_menu(&self) -> bool { - self.current_menu.is_some() - } - - // Param is passed by value, moved - pub fn set_current_menu(&mut self, v: AdvmodeMenu) { - self.current_menu = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "current_menu", - |m: &MenuContents| { &m.current_menu }, - |m: &mut MenuContents| { &mut m.current_menu }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "movements", - |m: &MenuContents| { &m.movements }, - |m: &mut MenuContents| { &mut m.movements }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MenuContents", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MenuContents { - const NAME: &'static str = "MenuContents"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.current_menu = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - self.movements.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.current_menu { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - for value in &self.movements { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.current_menu { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - for v in &self.movements { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MenuContents { - MenuContents::new() - } - - fn clear(&mut self) { - self.current_menu = ::std::option::Option::None; - self.movements.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static MenuContents { - static instance: MenuContents = MenuContents { - current_menu: ::std::option::Option::None, - movements: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MenuContents { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MenuContents").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MenuContents { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MenuContents { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:AdventureControl.MiscMoveParams) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MiscMoveParams { - // message fields - // @@protoc_insertion_point(field:AdventureControl.MiscMoveParams.type) - pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:AdventureControl.MiscMoveParams.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MiscMoveParams { - fn default() -> &'a MiscMoveParams { - ::default_instance() - } -} - -impl MiscMoveParams { - pub fn new() -> MiscMoveParams { - ::std::default::Default::default() - } - - // optional .AdventureControl.MiscMoveType type = 1; - - pub fn type_(&self) -> MiscMoveType { - match self.type_ { - Some(e) => e.enum_value_or(MiscMoveType::SET_CLIMB), - None => MiscMoveType::SET_CLIMB, - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: MiscMoveType) { - self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &MiscMoveParams| { &m.type_ }, - |m: &mut MiscMoveParams| { &mut m.type_ }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MiscMoveParams", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MiscMoveParams { - const NAME: &'static str = "MiscMoveParams"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_ { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MiscMoveParams { - MiscMoveParams::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MiscMoveParams { - static instance: MiscMoveParams = MiscMoveParams { - type_: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MiscMoveParams { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MiscMoveParams").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MiscMoveParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MiscMoveParams { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:AdventureControl.AdvmodeMenu) -pub enum AdvmodeMenu { - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Default) - Default = 0, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Look) - Look = 1, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.ConversationAddress) - ConversationAddress = 2, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.ConversationSelect) - ConversationSelect = 3, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.ConversationSpeak) - ConversationSpeak = 4, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Inventory) - Inventory = 5, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Drop) - Drop = 6, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.ThrowItem) - ThrowItem = 7, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Wear) - Wear = 8, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Remove) - Remove = 9, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Interact) - Interact = 10, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Put) - Put = 11, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.PutContainer) - PutContainer = 12, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Eat) - Eat = 13, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.ThrowAim) - ThrowAim = 14, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Fire) - Fire = 15, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Get) - Get = 16, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk17) - Unk17 = 17, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.CombatPrefs) - CombatPrefs = 18, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Companions) - Companions = 19, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.MovementPrefs) - MovementPrefs = 20, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.SpeedPrefs) - SpeedPrefs = 21, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.InteractAction) - InteractAction = 22, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.MoveCarefully) - MoveCarefully = 23, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Announcements) - Announcements = 24, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.UseBuilding) - UseBuilding = 25, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Travel) - Travel = 26, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk27) - Unk27 = 27, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk28) - Unk28 = 28, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.SleepConfirm) - SleepConfirm = 29, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.SelectInteractionTarget) - SelectInteractionTarget = 30, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk31) - Unk31 = 31, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk32) - Unk32 = 32, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.FallAction) - FallAction = 33, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.ViewTracks) - ViewTracks = 34, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Jump) - Jump = 35, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk36) - Unk36 = 36, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.AttackConfirm) - AttackConfirm = 37, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.AttackType) - AttackType = 38, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.AttackBodypart) - AttackBodypart = 39, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.AttackStrike) - AttackStrike = 40, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk41) - Unk41 = 41, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk42) - Unk42 = 42, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.DodgeDirection) - DodgeDirection = 43, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk44) - Unk44 = 44, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Unk45) - Unk45 = 45, - // @@protoc_insertion_point(enum_value:AdventureControl.AdvmodeMenu.Build) - Build = 46, -} - -impl ::protobuf::Enum for AdvmodeMenu { - const NAME: &'static str = "AdvmodeMenu"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AdvmodeMenu::Default), - 1 => ::std::option::Option::Some(AdvmodeMenu::Look), - 2 => ::std::option::Option::Some(AdvmodeMenu::ConversationAddress), - 3 => ::std::option::Option::Some(AdvmodeMenu::ConversationSelect), - 4 => ::std::option::Option::Some(AdvmodeMenu::ConversationSpeak), - 5 => ::std::option::Option::Some(AdvmodeMenu::Inventory), - 6 => ::std::option::Option::Some(AdvmodeMenu::Drop), - 7 => ::std::option::Option::Some(AdvmodeMenu::ThrowItem), - 8 => ::std::option::Option::Some(AdvmodeMenu::Wear), - 9 => ::std::option::Option::Some(AdvmodeMenu::Remove), - 10 => ::std::option::Option::Some(AdvmodeMenu::Interact), - 11 => ::std::option::Option::Some(AdvmodeMenu::Put), - 12 => ::std::option::Option::Some(AdvmodeMenu::PutContainer), - 13 => ::std::option::Option::Some(AdvmodeMenu::Eat), - 14 => ::std::option::Option::Some(AdvmodeMenu::ThrowAim), - 15 => ::std::option::Option::Some(AdvmodeMenu::Fire), - 16 => ::std::option::Option::Some(AdvmodeMenu::Get), - 17 => ::std::option::Option::Some(AdvmodeMenu::Unk17), - 18 => ::std::option::Option::Some(AdvmodeMenu::CombatPrefs), - 19 => ::std::option::Option::Some(AdvmodeMenu::Companions), - 20 => ::std::option::Option::Some(AdvmodeMenu::MovementPrefs), - 21 => ::std::option::Option::Some(AdvmodeMenu::SpeedPrefs), - 22 => ::std::option::Option::Some(AdvmodeMenu::InteractAction), - 23 => ::std::option::Option::Some(AdvmodeMenu::MoveCarefully), - 24 => ::std::option::Option::Some(AdvmodeMenu::Announcements), - 25 => ::std::option::Option::Some(AdvmodeMenu::UseBuilding), - 26 => ::std::option::Option::Some(AdvmodeMenu::Travel), - 27 => ::std::option::Option::Some(AdvmodeMenu::Unk27), - 28 => ::std::option::Option::Some(AdvmodeMenu::Unk28), - 29 => ::std::option::Option::Some(AdvmodeMenu::SleepConfirm), - 30 => ::std::option::Option::Some(AdvmodeMenu::SelectInteractionTarget), - 31 => ::std::option::Option::Some(AdvmodeMenu::Unk31), - 32 => ::std::option::Option::Some(AdvmodeMenu::Unk32), - 33 => ::std::option::Option::Some(AdvmodeMenu::FallAction), - 34 => ::std::option::Option::Some(AdvmodeMenu::ViewTracks), - 35 => ::std::option::Option::Some(AdvmodeMenu::Jump), - 36 => ::std::option::Option::Some(AdvmodeMenu::Unk36), - 37 => ::std::option::Option::Some(AdvmodeMenu::AttackConfirm), - 38 => ::std::option::Option::Some(AdvmodeMenu::AttackType), - 39 => ::std::option::Option::Some(AdvmodeMenu::AttackBodypart), - 40 => ::std::option::Option::Some(AdvmodeMenu::AttackStrike), - 41 => ::std::option::Option::Some(AdvmodeMenu::Unk41), - 42 => ::std::option::Option::Some(AdvmodeMenu::Unk42), - 43 => ::std::option::Option::Some(AdvmodeMenu::DodgeDirection), - 44 => ::std::option::Option::Some(AdvmodeMenu::Unk44), - 45 => ::std::option::Option::Some(AdvmodeMenu::Unk45), - 46 => ::std::option::Option::Some(AdvmodeMenu::Build), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "Default" => ::std::option::Option::Some(AdvmodeMenu::Default), - "Look" => ::std::option::Option::Some(AdvmodeMenu::Look), - "ConversationAddress" => ::std::option::Option::Some(AdvmodeMenu::ConversationAddress), - "ConversationSelect" => ::std::option::Option::Some(AdvmodeMenu::ConversationSelect), - "ConversationSpeak" => ::std::option::Option::Some(AdvmodeMenu::ConversationSpeak), - "Inventory" => ::std::option::Option::Some(AdvmodeMenu::Inventory), - "Drop" => ::std::option::Option::Some(AdvmodeMenu::Drop), - "ThrowItem" => ::std::option::Option::Some(AdvmodeMenu::ThrowItem), - "Wear" => ::std::option::Option::Some(AdvmodeMenu::Wear), - "Remove" => ::std::option::Option::Some(AdvmodeMenu::Remove), - "Interact" => ::std::option::Option::Some(AdvmodeMenu::Interact), - "Put" => ::std::option::Option::Some(AdvmodeMenu::Put), - "PutContainer" => ::std::option::Option::Some(AdvmodeMenu::PutContainer), - "Eat" => ::std::option::Option::Some(AdvmodeMenu::Eat), - "ThrowAim" => ::std::option::Option::Some(AdvmodeMenu::ThrowAim), - "Fire" => ::std::option::Option::Some(AdvmodeMenu::Fire), - "Get" => ::std::option::Option::Some(AdvmodeMenu::Get), - "Unk17" => ::std::option::Option::Some(AdvmodeMenu::Unk17), - "CombatPrefs" => ::std::option::Option::Some(AdvmodeMenu::CombatPrefs), - "Companions" => ::std::option::Option::Some(AdvmodeMenu::Companions), - "MovementPrefs" => ::std::option::Option::Some(AdvmodeMenu::MovementPrefs), - "SpeedPrefs" => ::std::option::Option::Some(AdvmodeMenu::SpeedPrefs), - "InteractAction" => ::std::option::Option::Some(AdvmodeMenu::InteractAction), - "MoveCarefully" => ::std::option::Option::Some(AdvmodeMenu::MoveCarefully), - "Announcements" => ::std::option::Option::Some(AdvmodeMenu::Announcements), - "UseBuilding" => ::std::option::Option::Some(AdvmodeMenu::UseBuilding), - "Travel" => ::std::option::Option::Some(AdvmodeMenu::Travel), - "Unk27" => ::std::option::Option::Some(AdvmodeMenu::Unk27), - "Unk28" => ::std::option::Option::Some(AdvmodeMenu::Unk28), - "SleepConfirm" => ::std::option::Option::Some(AdvmodeMenu::SleepConfirm), - "SelectInteractionTarget" => ::std::option::Option::Some(AdvmodeMenu::SelectInteractionTarget), - "Unk31" => ::std::option::Option::Some(AdvmodeMenu::Unk31), - "Unk32" => ::std::option::Option::Some(AdvmodeMenu::Unk32), - "FallAction" => ::std::option::Option::Some(AdvmodeMenu::FallAction), - "ViewTracks" => ::std::option::Option::Some(AdvmodeMenu::ViewTracks), - "Jump" => ::std::option::Option::Some(AdvmodeMenu::Jump), - "Unk36" => ::std::option::Option::Some(AdvmodeMenu::Unk36), - "AttackConfirm" => ::std::option::Option::Some(AdvmodeMenu::AttackConfirm), - "AttackType" => ::std::option::Option::Some(AdvmodeMenu::AttackType), - "AttackBodypart" => ::std::option::Option::Some(AdvmodeMenu::AttackBodypart), - "AttackStrike" => ::std::option::Option::Some(AdvmodeMenu::AttackStrike), - "Unk41" => ::std::option::Option::Some(AdvmodeMenu::Unk41), - "Unk42" => ::std::option::Option::Some(AdvmodeMenu::Unk42), - "DodgeDirection" => ::std::option::Option::Some(AdvmodeMenu::DodgeDirection), - "Unk44" => ::std::option::Option::Some(AdvmodeMenu::Unk44), - "Unk45" => ::std::option::Option::Some(AdvmodeMenu::Unk45), - "Build" => ::std::option::Option::Some(AdvmodeMenu::Build), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AdvmodeMenu] = &[ - AdvmodeMenu::Default, - AdvmodeMenu::Look, - AdvmodeMenu::ConversationAddress, - AdvmodeMenu::ConversationSelect, - AdvmodeMenu::ConversationSpeak, - AdvmodeMenu::Inventory, - AdvmodeMenu::Drop, - AdvmodeMenu::ThrowItem, - AdvmodeMenu::Wear, - AdvmodeMenu::Remove, - AdvmodeMenu::Interact, - AdvmodeMenu::Put, - AdvmodeMenu::PutContainer, - AdvmodeMenu::Eat, - AdvmodeMenu::ThrowAim, - AdvmodeMenu::Fire, - AdvmodeMenu::Get, - AdvmodeMenu::Unk17, - AdvmodeMenu::CombatPrefs, - AdvmodeMenu::Companions, - AdvmodeMenu::MovementPrefs, - AdvmodeMenu::SpeedPrefs, - AdvmodeMenu::InteractAction, - AdvmodeMenu::MoveCarefully, - AdvmodeMenu::Announcements, - AdvmodeMenu::UseBuilding, - AdvmodeMenu::Travel, - AdvmodeMenu::Unk27, - AdvmodeMenu::Unk28, - AdvmodeMenu::SleepConfirm, - AdvmodeMenu::SelectInteractionTarget, - AdvmodeMenu::Unk31, - AdvmodeMenu::Unk32, - AdvmodeMenu::FallAction, - AdvmodeMenu::ViewTracks, - AdvmodeMenu::Jump, - AdvmodeMenu::Unk36, - AdvmodeMenu::AttackConfirm, - AdvmodeMenu::AttackType, - AdvmodeMenu::AttackBodypart, - AdvmodeMenu::AttackStrike, - AdvmodeMenu::Unk41, - AdvmodeMenu::Unk42, - AdvmodeMenu::DodgeDirection, - AdvmodeMenu::Unk44, - AdvmodeMenu::Unk45, - AdvmodeMenu::Build, - ]; -} - -impl ::protobuf::EnumFull for AdvmodeMenu { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("AdvmodeMenu").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for AdvmodeMenu { - fn default() -> Self { - AdvmodeMenu::Default - } -} - -impl AdvmodeMenu { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("AdvmodeMenu") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:AdventureControl.CarefulMovementType) -pub enum CarefulMovementType { - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.DEFAULT_MOVEMENT) - DEFAULT_MOVEMENT = 0, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.RELEASE_ITEM_HOLD) - RELEASE_ITEM_HOLD = 1, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.RELEASE_TILE_HOLD) - RELEASE_TILE_HOLD = 2, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.ATTACK_CREATURE) - ATTACK_CREATURE = 3, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.HOLD_TILE) - HOLD_TILE = 4, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.MOVE) - MOVE = 5, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.CLIMB) - CLIMB = 6, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.HOLD_ITEM) - HOLD_ITEM = 7, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.BUILDING_INTERACT) - BUILDING_INTERACT = 8, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.ITEM_INTERACT) - ITEM_INTERACT = 9, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.ITEM_INTERACT_GUIDE) - ITEM_INTERACT_GUIDE = 10, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.ITEM_INTERACT_RIDE) - ITEM_INTERACT_RIDE = 11, - // @@protoc_insertion_point(enum_value:AdventureControl.CarefulMovementType.ITEM_INTERACT_PUSH) - ITEM_INTERACT_PUSH = 12, -} - -impl ::protobuf::Enum for CarefulMovementType { - const NAME: &'static str = "CarefulMovementType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(CarefulMovementType::DEFAULT_MOVEMENT), - 1 => ::std::option::Option::Some(CarefulMovementType::RELEASE_ITEM_HOLD), - 2 => ::std::option::Option::Some(CarefulMovementType::RELEASE_TILE_HOLD), - 3 => ::std::option::Option::Some(CarefulMovementType::ATTACK_CREATURE), - 4 => ::std::option::Option::Some(CarefulMovementType::HOLD_TILE), - 5 => ::std::option::Option::Some(CarefulMovementType::MOVE), - 6 => ::std::option::Option::Some(CarefulMovementType::CLIMB), - 7 => ::std::option::Option::Some(CarefulMovementType::HOLD_ITEM), - 8 => ::std::option::Option::Some(CarefulMovementType::BUILDING_INTERACT), - 9 => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT), - 10 => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT_GUIDE), - 11 => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT_RIDE), - 12 => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT_PUSH), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "DEFAULT_MOVEMENT" => ::std::option::Option::Some(CarefulMovementType::DEFAULT_MOVEMENT), - "RELEASE_ITEM_HOLD" => ::std::option::Option::Some(CarefulMovementType::RELEASE_ITEM_HOLD), - "RELEASE_TILE_HOLD" => ::std::option::Option::Some(CarefulMovementType::RELEASE_TILE_HOLD), - "ATTACK_CREATURE" => ::std::option::Option::Some(CarefulMovementType::ATTACK_CREATURE), - "HOLD_TILE" => ::std::option::Option::Some(CarefulMovementType::HOLD_TILE), - "MOVE" => ::std::option::Option::Some(CarefulMovementType::MOVE), - "CLIMB" => ::std::option::Option::Some(CarefulMovementType::CLIMB), - "HOLD_ITEM" => ::std::option::Option::Some(CarefulMovementType::HOLD_ITEM), - "BUILDING_INTERACT" => ::std::option::Option::Some(CarefulMovementType::BUILDING_INTERACT), - "ITEM_INTERACT" => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT), - "ITEM_INTERACT_GUIDE" => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT_GUIDE), - "ITEM_INTERACT_RIDE" => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT_RIDE), - "ITEM_INTERACT_PUSH" => ::std::option::Option::Some(CarefulMovementType::ITEM_INTERACT_PUSH), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [CarefulMovementType] = &[ - CarefulMovementType::DEFAULT_MOVEMENT, - CarefulMovementType::RELEASE_ITEM_HOLD, - CarefulMovementType::RELEASE_TILE_HOLD, - CarefulMovementType::ATTACK_CREATURE, - CarefulMovementType::HOLD_TILE, - CarefulMovementType::MOVE, - CarefulMovementType::CLIMB, - CarefulMovementType::HOLD_ITEM, - CarefulMovementType::BUILDING_INTERACT, - CarefulMovementType::ITEM_INTERACT, - CarefulMovementType::ITEM_INTERACT_GUIDE, - CarefulMovementType::ITEM_INTERACT_RIDE, - CarefulMovementType::ITEM_INTERACT_PUSH, - ]; -} - -impl ::protobuf::EnumFull for CarefulMovementType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("CarefulMovementType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for CarefulMovementType { - fn default() -> Self { - CarefulMovementType::DEFAULT_MOVEMENT - } -} - -impl CarefulMovementType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("CarefulMovementType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:AdventureControl.MiscMoveType) -pub enum MiscMoveType { - // @@protoc_insertion_point(enum_value:AdventureControl.MiscMoveType.SET_CLIMB) - SET_CLIMB = 0, - // @@protoc_insertion_point(enum_value:AdventureControl.MiscMoveType.SET_STAND) - SET_STAND = 1, - // @@protoc_insertion_point(enum_value:AdventureControl.MiscMoveType.SET_CANCEL) - SET_CANCEL = 2, -} - -impl ::protobuf::Enum for MiscMoveType { - const NAME: &'static str = "MiscMoveType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(MiscMoveType::SET_CLIMB), - 1 => ::std::option::Option::Some(MiscMoveType::SET_STAND), - 2 => ::std::option::Option::Some(MiscMoveType::SET_CANCEL), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "SET_CLIMB" => ::std::option::Option::Some(MiscMoveType::SET_CLIMB), - "SET_STAND" => ::std::option::Option::Some(MiscMoveType::SET_STAND), - "SET_CANCEL" => ::std::option::Option::Some(MiscMoveType::SET_CANCEL), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [MiscMoveType] = &[ - MiscMoveType::SET_CLIMB, - MiscMoveType::SET_STAND, - MiscMoveType::SET_CANCEL, - ]; -} - -impl ::protobuf::EnumFull for MiscMoveType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("MiscMoveType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for MiscMoveType { - fn default() -> Self { - MiscMoveType::SET_CLIMB - } -} - -impl MiscMoveType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("MiscMoveType") - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x16AdventureControl.proto\x12\x10AdventureControl\x1a\x1aRemoteFortre\ - ssReader.proto\"N\n\x11MoveCommandParams\x129\n\tdirection\x18\x01\x20\ - \x01(\x0b2\x1b.RemoteFortressReader.CoordR\tdirection\"\xf3\x01\n\x0eMov\ - ementOption\x12/\n\x04dest\x18\x01\x20\x01(\x0b2\x1b.RemoteFortressReade\ - r.CoordR\x04dest\x123\n\x06source\x18\x02\x20\x01(\x0b2\x1b.RemoteFortre\ - ssReader.CoordR\x06source\x12/\n\x04grab\x18\x03\x20\x01(\x0b2\x1b.Remot\ - eFortressReader.CoordR\x04grab\x12J\n\rmovement_type\x18\x04\x20\x01(\ - \x0e2%.AdventureControl.CarefulMovementTypeR\x0cmovementType\"\x90\x01\n\ - \x0cMenuContents\x12@\n\x0ccurrent_menu\x18\x01\x20\x01(\x0e2\x1d.Advent\ - ureControl.AdvmodeMenuR\x0bcurrentMenu\x12>\n\tmovements\x18\x02\x20\x03\ - (\x0b2\x20.AdventureControl.MovementOptionR\tmovements\"D\n\x0eMiscMoveP\ - arams\x122\n\x04type\x18\x01\x20\x01(\x0e2\x1e.AdventureControl.MiscMove\ - TypeR\x04type*\xc7\x05\n\x0bAdvmodeMenu\x12\x0b\n\x07Default\x10\0\x12\ - \x08\n\x04Look\x10\x01\x12\x17\n\x13ConversationAddress\x10\x02\x12\x16\ - \n\x12ConversationSelect\x10\x03\x12\x15\n\x11ConversationSpeak\x10\x04\ - \x12\r\n\tInventory\x10\x05\x12\x08\n\x04Drop\x10\x06\x12\r\n\tThrowItem\ - \x10\x07\x12\x08\n\x04Wear\x10\x08\x12\n\n\x06Remove\x10\t\x12\x0c\n\x08\ - Interact\x10\n\x12\x07\n\x03Put\x10\x0b\x12\x10\n\x0cPutContainer\x10\ - \x0c\x12\x07\n\x03Eat\x10\r\x12\x0c\n\x08ThrowAim\x10\x0e\x12\x08\n\x04F\ - ire\x10\x0f\x12\x07\n\x03Get\x10\x10\x12\t\n\x05Unk17\x10\x11\x12\x0f\n\ - \x0bCombatPrefs\x10\x12\x12\x0e\n\nCompanions\x10\x13\x12\x11\n\rMovemen\ - tPrefs\x10\x14\x12\x0e\n\nSpeedPrefs\x10\x15\x12\x12\n\x0eInteractAction\ - \x10\x16\x12\x11\n\rMoveCarefully\x10\x17\x12\x11\n\rAnnouncements\x10\ - \x18\x12\x0f\n\x0bUseBuilding\x10\x19\x12\n\n\x06Travel\x10\x1a\x12\t\n\ - \x05Unk27\x10\x1b\x12\t\n\x05Unk28\x10\x1c\x12\x10\n\x0cSleepConfirm\x10\ - \x1d\x12\x1b\n\x17SelectInteractionTarget\x10\x1e\x12\t\n\x05Unk31\x10\ - \x1f\x12\t\n\x05Unk32\x10\x20\x12\x0e\n\nFallAction\x10!\x12\x0e\n\nView\ - Tracks\x10\"\x12\x08\n\x04Jump\x10#\x12\t\n\x05Unk36\x10$\x12\x11\n\rAtt\ - ackConfirm\x10%\x12\x0e\n\nAttackType\x10&\x12\x12\n\x0eAttackBodypart\ - \x10'\x12\x10\n\x0cAttackStrike\x10(\x12\t\n\x05Unk41\x10)\x12\t\n\x05Un\ - k42\x10*\x12\x12\n\x0eDodgeDirection\x10+\x12\t\n\x05Unk44\x10,\x12\t\n\ - \x05Unk45\x10-\x12\t\n\x05Build\x10.*\x94\x02\n\x13CarefulMovementType\ - \x12\x14\n\x10DEFAULT_MOVEMENT\x10\0\x12\x15\n\x11RELEASE_ITEM_HOLD\x10\ - \x01\x12\x15\n\x11RELEASE_TILE_HOLD\x10\x02\x12\x13\n\x0fATTACK_CREATURE\ - \x10\x03\x12\r\n\tHOLD_TILE\x10\x04\x12\x08\n\x04MOVE\x10\x05\x12\t\n\ - \x05CLIMB\x10\x06\x12\r\n\tHOLD_ITEM\x10\x07\x12\x15\n\x11BUILDING_INTER\ - ACT\x10\x08\x12\x11\n\rITEM_INTERACT\x10\t\x12\x17\n\x13ITEM_INTERACT_GU\ - IDE\x10\n\x12\x16\n\x12ITEM_INTERACT_RIDE\x10\x0b\x12\x16\n\x12ITEM_INTE\ - RACT_PUSH\x10\x0c*<\n\x0cMiscMoveType\x12\r\n\tSET_CLIMB\x10\0\x12\r\n\t\ - SET_STAND\x10\x01\x12\x0e\n\nSET_CANCEL\x10\x02B\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::RemoteFortressReader::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(4); - messages.push(MoveCommandParams::generated_message_descriptor_data()); - messages.push(MovementOption::generated_message_descriptor_data()); - messages.push(MenuContents::generated_message_descriptor_data()); - messages.push(MiscMoveParams::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(3); - enums.push(AdvmodeMenu::generated_enum_descriptor_data()); - enums.push(CarefulMovementType::generated_enum_descriptor_data()); - enums.push(MiscMoveType::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/Basic.rs b/dfhack-proto/src/generated/messages/Basic.rs deleted file mode 100644 index 9929539..0000000 --- a/dfhack-proto/src/generated/messages/Basic.rs +++ /dev/null @@ -1,5777 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `Basic.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:dfproto.EnumItemName) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct EnumItemName { - // message fields - // @@protoc_insertion_point(field:dfproto.EnumItemName.value) - pub value: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.EnumItemName.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.EnumItemName.bit_size) - pub bit_size: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.EnumItemName.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a EnumItemName { - fn default() -> &'a EnumItemName { - ::default_instance() - } -} - -impl EnumItemName { - pub fn new() -> EnumItemName { - ::std::default::Default::default() - } - - // required int32 value = 1; - - pub fn value(&self) -> i32 { - self.value.unwrap_or(0) - } - - pub fn clear_value(&mut self) { - self.value = ::std::option::Option::None; - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: i32) { - self.value = ::std::option::Option::Some(v); - } - - // optional string name = 2; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 bit_size = 3; - - pub fn bit_size(&self) -> i32 { - self.bit_size.unwrap_or(1i32) - } - - pub fn clear_bit_size(&mut self) { - self.bit_size = ::std::option::Option::None; - } - - pub fn has_bit_size(&self) -> bool { - self.bit_size.is_some() - } - - // Param is passed by value, moved - pub fn set_bit_size(&mut self, v: i32) { - self.bit_size = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "value", - |m: &EnumItemName| { &m.value }, - |m: &mut EnumItemName| { &mut m.value }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &EnumItemName| { &m.name }, - |m: &mut EnumItemName| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "bit_size", - |m: &EnumItemName| { &m.bit_size }, - |m: &mut EnumItemName| { &mut m.bit_size }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "EnumItemName", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for EnumItemName { - const NAME: &'static str = "EnumItemName"; - - fn is_initialized(&self) -> bool { - if self.value.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.value = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 24 => { - self.bit_size = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.value { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.bit_size { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.value { - os.write_int32(1, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.bit_size { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> EnumItemName { - EnumItemName::new() - } - - fn clear(&mut self) { - self.value = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.bit_size = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static EnumItemName { - static instance: EnumItemName = EnumItemName { - value: ::std::option::Option::None, - name: ::std::option::Option::None, - bit_size: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for EnumItemName { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("EnumItemName").unwrap()).clone() - } -} - -impl ::std::fmt::Display for EnumItemName { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for EnumItemName { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.BasicMaterialId) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BasicMaterialId { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicMaterialId.type) - pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialId.index) - pub index: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicMaterialId.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BasicMaterialId { - fn default() -> &'a BasicMaterialId { - ::default_instance() - } -} - -impl BasicMaterialId { - pub fn new() -> BasicMaterialId { - ::std::default::Default::default() - } - - // required int32 type = 1; - - pub fn type_(&self) -> i32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: i32) { - self.type_ = ::std::option::Option::Some(v); - } - - // required sint32 index = 2; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &BasicMaterialId| { &m.type_ }, - |m: &mut BasicMaterialId| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &BasicMaterialId| { &m.index }, - |m: &mut BasicMaterialId| { &mut m.index }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicMaterialId", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BasicMaterialId { - const NAME: &'static str = "BasicMaterialId"; - - fn is_initialized(&self) -> bool { - if self.type_.is_none() { - return false; - } - if self.index.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.index = ::std::option::Option::Some(is.read_sint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.index { - my_size += ::protobuf::rt::sint32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_ { - os.write_int32(1, v)?; - } - if let Some(v) = self.index { - os.write_sint32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BasicMaterialId { - BasicMaterialId::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.index = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BasicMaterialId { - static instance: BasicMaterialId = BasicMaterialId { - type_: ::std::option::Option::None, - index: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BasicMaterialId { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BasicMaterialId").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BasicMaterialId { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BasicMaterialId { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.BasicMaterialInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BasicMaterialInfo { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.type) - pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.token) - pub token: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.flags) - pub flags: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.subtype) - pub subtype: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.creature_id) - pub creature_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.plant_id) - pub plant_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.histfig_id) - pub histfig_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.name_prefix) - pub name_prefix: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.state_color) - pub state_color: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.state_name) - pub state_name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.state_adj) - pub state_adj: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.reaction_class) - pub reaction_class: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.reaction_product) - pub reaction_product: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.inorganic_flags) - pub inorganic_flags: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicMaterialInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BasicMaterialInfo { - fn default() -> &'a BasicMaterialInfo { - ::default_instance() - } -} - -impl BasicMaterialInfo { - pub fn new() -> BasicMaterialInfo { - ::std::default::Default::default() - } - - // required int32 type = 1; - - pub fn type_(&self) -> i32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: i32) { - self.type_ = ::std::option::Option::Some(v); - } - - // required sint32 index = 2; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // required string token = 3; - - pub fn token(&self) -> &str { - match self.token.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_token(&mut self) { - self.token = ::std::option::Option::None; - } - - pub fn has_token(&self) -> bool { - self.token.is_some() - } - - // Param is passed by value, moved - pub fn set_token(&mut self, v: ::std::string::String) { - self.token = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_token(&mut self) -> &mut ::std::string::String { - if self.token.is_none() { - self.token = ::std::option::Option::Some(::std::string::String::new()); - } - self.token.as_mut().unwrap() - } - - // Take field - pub fn take_token(&mut self) -> ::std::string::String { - self.token.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 subtype = 5; - - pub fn subtype(&self) -> i32 { - self.subtype.unwrap_or(-1i32) - } - - pub fn clear_subtype(&mut self) { - self.subtype = ::std::option::Option::None; - } - - pub fn has_subtype(&self) -> bool { - self.subtype.is_some() - } - - // Param is passed by value, moved - pub fn set_subtype(&mut self, v: i32) { - self.subtype = ::std::option::Option::Some(v); - } - - // optional int32 creature_id = 6; - - pub fn creature_id(&self) -> i32 { - self.creature_id.unwrap_or(-1i32) - } - - pub fn clear_creature_id(&mut self) { - self.creature_id = ::std::option::Option::None; - } - - pub fn has_creature_id(&self) -> bool { - self.creature_id.is_some() - } - - // Param is passed by value, moved - pub fn set_creature_id(&mut self, v: i32) { - self.creature_id = ::std::option::Option::Some(v); - } - - // optional int32 plant_id = 7; - - pub fn plant_id(&self) -> i32 { - self.plant_id.unwrap_or(-1i32) - } - - pub fn clear_plant_id(&mut self) { - self.plant_id = ::std::option::Option::None; - } - - pub fn has_plant_id(&self) -> bool { - self.plant_id.is_some() - } - - // Param is passed by value, moved - pub fn set_plant_id(&mut self, v: i32) { - self.plant_id = ::std::option::Option::Some(v); - } - - // optional int32 histfig_id = 8; - - pub fn histfig_id(&self) -> i32 { - self.histfig_id.unwrap_or(-1i32) - } - - pub fn clear_histfig_id(&mut self) { - self.histfig_id = ::std::option::Option::None; - } - - pub fn has_histfig_id(&self) -> bool { - self.histfig_id.is_some() - } - - // Param is passed by value, moved - pub fn set_histfig_id(&mut self, v: i32) { - self.histfig_id = ::std::option::Option::Some(v); - } - - // optional string name_prefix = 9; - - pub fn name_prefix(&self) -> &str { - match self.name_prefix.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name_prefix(&mut self) { - self.name_prefix = ::std::option::Option::None; - } - - pub fn has_name_prefix(&self) -> bool { - self.name_prefix.is_some() - } - - // Param is passed by value, moved - pub fn set_name_prefix(&mut self, v: ::std::string::String) { - self.name_prefix = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name_prefix(&mut self) -> &mut ::std::string::String { - if self.name_prefix.is_none() { - self.name_prefix = ::std::option::Option::Some(::std::string::String::new()); - } - self.name_prefix.as_mut().unwrap() - } - - // Take field - pub fn take_name_prefix(&mut self) -> ::std::string::String { - self.name_prefix.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(15); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &BasicMaterialInfo| { &m.type_ }, - |m: &mut BasicMaterialInfo| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &BasicMaterialInfo| { &m.index }, - |m: &mut BasicMaterialInfo| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "token", - |m: &BasicMaterialInfo| { &m.token }, - |m: &mut BasicMaterialInfo| { &mut m.token }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "flags", - |m: &BasicMaterialInfo| { &m.flags }, - |m: &mut BasicMaterialInfo| { &mut m.flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subtype", - |m: &BasicMaterialInfo| { &m.subtype }, - |m: &mut BasicMaterialInfo| { &mut m.subtype }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "creature_id", - |m: &BasicMaterialInfo| { &m.creature_id }, - |m: &mut BasicMaterialInfo| { &mut m.creature_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "plant_id", - |m: &BasicMaterialInfo| { &m.plant_id }, - |m: &mut BasicMaterialInfo| { &mut m.plant_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "histfig_id", - |m: &BasicMaterialInfo| { &m.histfig_id }, - |m: &mut BasicMaterialInfo| { &mut m.histfig_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name_prefix", - |m: &BasicMaterialInfo| { &m.name_prefix }, - |m: &mut BasicMaterialInfo| { &mut m.name_prefix }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "state_color", - |m: &BasicMaterialInfo| { &m.state_color }, - |m: &mut BasicMaterialInfo| { &mut m.state_color }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "state_name", - |m: &BasicMaterialInfo| { &m.state_name }, - |m: &mut BasicMaterialInfo| { &mut m.state_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "state_adj", - |m: &BasicMaterialInfo| { &m.state_adj }, - |m: &mut BasicMaterialInfo| { &mut m.state_adj }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "reaction_class", - |m: &BasicMaterialInfo| { &m.reaction_class }, - |m: &mut BasicMaterialInfo| { &mut m.reaction_class }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "reaction_product", - |m: &BasicMaterialInfo| { &m.reaction_product }, - |m: &mut BasicMaterialInfo| { &mut m.reaction_product }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "inorganic_flags", - |m: &BasicMaterialInfo| { &m.inorganic_flags }, - |m: &mut BasicMaterialInfo| { &mut m.inorganic_flags }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicMaterialInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BasicMaterialInfo { - const NAME: &'static str = "BasicMaterialInfo"; - - fn is_initialized(&self) -> bool { - if self.type_.is_none() { - return false; - } - if self.index.is_none() { - return false; - } - if self.token.is_none() { - return false; - } - for v in &self.reaction_product { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.index = ::std::option::Option::Some(is.read_sint32()?); - }, - 26 => { - self.token = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - is.read_repeated_packed_int32_into(&mut self.flags)?; - }, - 32 => { - self.flags.push(is.read_int32()?); - }, - 40 => { - self.subtype = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.creature_id = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.plant_id = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.histfig_id = ::std::option::Option::Some(is.read_int32()?); - }, - 74 => { - self.name_prefix = ::std::option::Option::Some(is.read_string()?); - }, - 82 => { - is.read_repeated_packed_fixed32_into(&mut self.state_color)?; - }, - 85 => { - self.state_color.push(is.read_fixed32()?); - }, - 90 => { - self.state_name.push(is.read_string()?); - }, - 98 => { - self.state_adj.push(is.read_string()?); - }, - 106 => { - self.reaction_class.push(is.read_string()?); - }, - 114 => { - self.reaction_product.push(is.read_message()?); - }, - 122 => { - is.read_repeated_packed_int32_into(&mut self.inorganic_flags)?; - }, - 120 => { - self.inorganic_flags.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.index { - my_size += ::protobuf::rt::sint32_size(2, v); - } - if let Some(v) = self.token.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - for value in &self.flags { - my_size += ::protobuf::rt::int32_size(4, *value); - }; - if let Some(v) = self.subtype { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.creature_id { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.plant_id { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.histfig_id { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.name_prefix.as_ref() { - my_size += ::protobuf::rt::string_size(9, &v); - } - my_size += 5 * self.state_color.len() as u64; - for value in &self.state_name { - my_size += ::protobuf::rt::string_size(11, &value); - }; - for value in &self.state_adj { - my_size += ::protobuf::rt::string_size(12, &value); - }; - for value in &self.reaction_class { - my_size += ::protobuf::rt::string_size(13, &value); - }; - for value in &self.reaction_product { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.inorganic_flags { - my_size += ::protobuf::rt::int32_size(15, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_ { - os.write_int32(1, v)?; - } - if let Some(v) = self.index { - os.write_sint32(2, v)?; - } - if let Some(v) = self.token.as_ref() { - os.write_string(3, v)?; - } - for v in &self.flags { - os.write_int32(4, *v)?; - }; - if let Some(v) = self.subtype { - os.write_int32(5, v)?; - } - if let Some(v) = self.creature_id { - os.write_int32(6, v)?; - } - if let Some(v) = self.plant_id { - os.write_int32(7, v)?; - } - if let Some(v) = self.histfig_id { - os.write_int32(8, v)?; - } - if let Some(v) = self.name_prefix.as_ref() { - os.write_string(9, v)?; - } - for v in &self.state_color { - os.write_fixed32(10, *v)?; - }; - for v in &self.state_name { - os.write_string(11, &v)?; - }; - for v in &self.state_adj { - os.write_string(12, &v)?; - }; - for v in &self.reaction_class { - os.write_string(13, &v)?; - }; - for v in &self.reaction_product { - ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?; - }; - for v in &self.inorganic_flags { - os.write_int32(15, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BasicMaterialInfo { - BasicMaterialInfo::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.index = ::std::option::Option::None; - self.token = ::std::option::Option::None; - self.flags.clear(); - self.subtype = ::std::option::Option::None; - self.creature_id = ::std::option::Option::None; - self.plant_id = ::std::option::Option::None; - self.histfig_id = ::std::option::Option::None; - self.name_prefix = ::std::option::Option::None; - self.state_color.clear(); - self.state_name.clear(); - self.state_adj.clear(); - self.reaction_class.clear(); - self.reaction_product.clear(); - self.inorganic_flags.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BasicMaterialInfo { - static instance: BasicMaterialInfo = BasicMaterialInfo { - type_: ::std::option::Option::None, - index: ::std::option::Option::None, - token: ::std::option::Option::None, - flags: ::std::vec::Vec::new(), - subtype: ::std::option::Option::None, - creature_id: ::std::option::Option::None, - plant_id: ::std::option::Option::None, - histfig_id: ::std::option::Option::None, - name_prefix: ::std::option::Option::None, - state_color: ::std::vec::Vec::new(), - state_name: ::std::vec::Vec::new(), - state_adj: ::std::vec::Vec::new(), - reaction_class: ::std::vec::Vec::new(), - reaction_product: ::std::vec::Vec::new(), - inorganic_flags: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BasicMaterialInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BasicMaterialInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BasicMaterialInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BasicMaterialInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `BasicMaterialInfo` -pub mod basic_material_info { - // @@protoc_insertion_point(message:dfproto.BasicMaterialInfo.Product) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct Product { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.Product.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.Product.type) - pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfo.Product.index) - pub index: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicMaterialInfo.Product.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a Product { - fn default() -> &'a Product { - ::default_instance() - } - } - - impl Product { - pub fn new() -> Product { - ::std::default::Default::default() - } - - // required string id = 1; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required int32 type = 2; - - pub fn type_(&self) -> i32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: i32) { - self.type_ = ::std::option::Option::Some(v); - } - - // required sint32 index = 3; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &Product| { &m.id }, - |m: &mut Product| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &Product| { &m.type_ }, - |m: &mut Product| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &Product| { &m.index }, - |m: &mut Product| { &mut m.index }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicMaterialInfo.Product", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for Product { - const NAME: &'static str = "Product"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - if self.type_.is_none() { - return false; - } - if self.index.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.type_ = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.index = ::std::option::Option::Some(is.read_sint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.index { - my_size += ::protobuf::rt::sint32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.type_ { - os.write_int32(2, v)?; - } - if let Some(v) = self.index { - os.write_sint32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Product { - Product::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.type_ = ::std::option::Option::None; - self.index = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Product { - static instance: Product = Product { - id: ::std::option::Option::None, - type_: ::std::option::Option::None, - index: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for Product { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("BasicMaterialInfo.Product").unwrap()).clone() - } - } - - impl ::std::fmt::Display for Product { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for Product { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } -} - -// @@protoc_insertion_point(message:dfproto.BasicMaterialInfoMask) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BasicMaterialInfoMask { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfoMask.states) - pub states: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfoMask.temperature) - pub temperature: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfoMask.flags) - pub flags: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicMaterialInfoMask.reaction) - pub reaction: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicMaterialInfoMask.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BasicMaterialInfoMask { - fn default() -> &'a BasicMaterialInfoMask { - ::default_instance() - } -} - -impl BasicMaterialInfoMask { - pub fn new() -> BasicMaterialInfoMask { - ::std::default::Default::default() - } - - // optional int32 temperature = 4; - - pub fn temperature(&self) -> i32 { - self.temperature.unwrap_or(10015i32) - } - - pub fn clear_temperature(&mut self) { - self.temperature = ::std::option::Option::None; - } - - pub fn has_temperature(&self) -> bool { - self.temperature.is_some() - } - - // Param is passed by value, moved - pub fn set_temperature(&mut self, v: i32) { - self.temperature = ::std::option::Option::Some(v); - } - - // optional bool flags = 2; - - pub fn flags(&self) -> bool { - self.flags.unwrap_or(false) - } - - pub fn clear_flags(&mut self) { - self.flags = ::std::option::Option::None; - } - - pub fn has_flags(&self) -> bool { - self.flags.is_some() - } - - // Param is passed by value, moved - pub fn set_flags(&mut self, v: bool) { - self.flags = ::std::option::Option::Some(v); - } - - // optional bool reaction = 3; - - pub fn reaction(&self) -> bool { - self.reaction.unwrap_or(false) - } - - pub fn clear_reaction(&mut self) { - self.reaction = ::std::option::Option::None; - } - - pub fn has_reaction(&self) -> bool { - self.reaction.is_some() - } - - // Param is passed by value, moved - pub fn set_reaction(&mut self, v: bool) { - self.reaction = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "states", - |m: &BasicMaterialInfoMask| { &m.states }, - |m: &mut BasicMaterialInfoMask| { &mut m.states }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "temperature", - |m: &BasicMaterialInfoMask| { &m.temperature }, - |m: &mut BasicMaterialInfoMask| { &mut m.temperature }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags", - |m: &BasicMaterialInfoMask| { &m.flags }, - |m: &mut BasicMaterialInfoMask| { &mut m.flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "reaction", - |m: &BasicMaterialInfoMask| { &m.reaction }, - |m: &mut BasicMaterialInfoMask| { &mut m.reaction }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicMaterialInfoMask", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BasicMaterialInfoMask { - const NAME: &'static str = "BasicMaterialInfoMask"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.states.push(is.read_enum_or_unknown()?); - }, - 10 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.states)? - }, - 32 => { - self.temperature = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.flags = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.reaction = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.states { - my_size += ::protobuf::rt::int32_size(1, value.value()); - }; - if let Some(v) = self.temperature { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.flags { - my_size += 1 + 1; - } - if let Some(v) = self.reaction { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.states { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(v))?; - }; - if let Some(v) = self.temperature { - os.write_int32(4, v)?; - } - if let Some(v) = self.flags { - os.write_bool(2, v)?; - } - if let Some(v) = self.reaction { - os.write_bool(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BasicMaterialInfoMask { - BasicMaterialInfoMask::new() - } - - fn clear(&mut self) { - self.states.clear(); - self.temperature = ::std::option::Option::None; - self.flags = ::std::option::Option::None; - self.reaction = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BasicMaterialInfoMask { - static instance: BasicMaterialInfoMask = BasicMaterialInfoMask { - states: ::std::vec::Vec::new(), - temperature: ::std::option::Option::None, - flags: ::std::option::Option::None, - reaction: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BasicMaterialInfoMask { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BasicMaterialInfoMask").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BasicMaterialInfoMask { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BasicMaterialInfoMask { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `BasicMaterialInfoMask` -pub mod basic_material_info_mask { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:dfproto.BasicMaterialInfoMask.StateType) - pub enum StateType { - // @@protoc_insertion_point(enum_value:dfproto.BasicMaterialInfoMask.StateType.Solid) - Solid = 0, - // @@protoc_insertion_point(enum_value:dfproto.BasicMaterialInfoMask.StateType.Liquid) - Liquid = 1, - // @@protoc_insertion_point(enum_value:dfproto.BasicMaterialInfoMask.StateType.Gas) - Gas = 2, - // @@protoc_insertion_point(enum_value:dfproto.BasicMaterialInfoMask.StateType.Powder) - Powder = 3, - // @@protoc_insertion_point(enum_value:dfproto.BasicMaterialInfoMask.StateType.Paste) - Paste = 4, - // @@protoc_insertion_point(enum_value:dfproto.BasicMaterialInfoMask.StateType.Pressed) - Pressed = 5, - } - - impl ::protobuf::Enum for StateType { - const NAME: &'static str = "StateType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(StateType::Solid), - 1 => ::std::option::Option::Some(StateType::Liquid), - 2 => ::std::option::Option::Some(StateType::Gas), - 3 => ::std::option::Option::Some(StateType::Powder), - 4 => ::std::option::Option::Some(StateType::Paste), - 5 => ::std::option::Option::Some(StateType::Pressed), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "Solid" => ::std::option::Option::Some(StateType::Solid), - "Liquid" => ::std::option::Option::Some(StateType::Liquid), - "Gas" => ::std::option::Option::Some(StateType::Gas), - "Powder" => ::std::option::Option::Some(StateType::Powder), - "Paste" => ::std::option::Option::Some(StateType::Paste), - "Pressed" => ::std::option::Option::Some(StateType::Pressed), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [StateType] = &[ - StateType::Solid, - StateType::Liquid, - StateType::Gas, - StateType::Powder, - StateType::Paste, - StateType::Pressed, - ]; - } - - impl ::protobuf::EnumFull for StateType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BasicMaterialInfoMask.StateType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } - } - - impl ::std::default::Default for StateType { - fn default() -> Self { - StateType::Solid - } - } - - impl StateType { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BasicMaterialInfoMask.StateType") - } - } -} - -// @@protoc_insertion_point(message:dfproto.JobSkillAttr) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct JobSkillAttr { - // message fields - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.key) - pub key: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.caption) - pub caption: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.caption_noun) - pub caption_noun: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.profession) - pub profession: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.labor) - pub labor: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.JobSkillAttr.type) - pub type_: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.JobSkillAttr.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a JobSkillAttr { - fn default() -> &'a JobSkillAttr { - ::default_instance() - } -} - -impl JobSkillAttr { - pub fn new() -> JobSkillAttr { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // required string key = 2; - - pub fn key(&self) -> &str { - match self.key.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_key(&mut self) { - self.key = ::std::option::Option::None; - } - - pub fn has_key(&self) -> bool { - self.key.is_some() - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - if self.key.is_none() { - self.key = ::std::option::Option::Some(::std::string::String::new()); - } - self.key.as_mut().unwrap() - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - self.key.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string caption = 3; - - pub fn caption(&self) -> &str { - match self.caption.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_caption(&mut self) { - self.caption = ::std::option::Option::None; - } - - pub fn has_caption(&self) -> bool { - self.caption.is_some() - } - - // Param is passed by value, moved - pub fn set_caption(&mut self, v: ::std::string::String) { - self.caption = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_caption(&mut self) -> &mut ::std::string::String { - if self.caption.is_none() { - self.caption = ::std::option::Option::Some(::std::string::String::new()); - } - self.caption.as_mut().unwrap() - } - - // Take field - pub fn take_caption(&mut self) -> ::std::string::String { - self.caption.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string caption_noun = 4; - - pub fn caption_noun(&self) -> &str { - match self.caption_noun.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_caption_noun(&mut self) { - self.caption_noun = ::std::option::Option::None; - } - - pub fn has_caption_noun(&self) -> bool { - self.caption_noun.is_some() - } - - // Param is passed by value, moved - pub fn set_caption_noun(&mut self, v: ::std::string::String) { - self.caption_noun = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_caption_noun(&mut self) -> &mut ::std::string::String { - if self.caption_noun.is_none() { - self.caption_noun = ::std::option::Option::Some(::std::string::String::new()); - } - self.caption_noun.as_mut().unwrap() - } - - // Take field - pub fn take_caption_noun(&mut self) -> ::std::string::String { - self.caption_noun.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 profession = 5; - - pub fn profession(&self) -> i32 { - self.profession.unwrap_or(0) - } - - pub fn clear_profession(&mut self) { - self.profession = ::std::option::Option::None; - } - - pub fn has_profession(&self) -> bool { - self.profession.is_some() - } - - // Param is passed by value, moved - pub fn set_profession(&mut self, v: i32) { - self.profession = ::std::option::Option::Some(v); - } - - // optional int32 labor = 6; - - pub fn labor(&self) -> i32 { - self.labor.unwrap_or(0) - } - - pub fn clear_labor(&mut self) { - self.labor = ::std::option::Option::None; - } - - pub fn has_labor(&self) -> bool { - self.labor.is_some() - } - - // Param is passed by value, moved - pub fn set_labor(&mut self, v: i32) { - self.labor = ::std::option::Option::Some(v); - } - - // optional string type = 7; - - pub fn type_(&self) -> &str { - match self.type_.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: ::std::string::String) { - self.type_ = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_type(&mut self) -> &mut ::std::string::String { - if self.type_.is_none() { - self.type_ = ::std::option::Option::Some(::std::string::String::new()); - } - self.type_.as_mut().unwrap() - } - - // Take field - pub fn take_type_(&mut self) -> ::std::string::String { - self.type_.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(7); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &JobSkillAttr| { &m.id }, - |m: &mut JobSkillAttr| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "key", - |m: &JobSkillAttr| { &m.key }, - |m: &mut JobSkillAttr| { &mut m.key }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caption", - |m: &JobSkillAttr| { &m.caption }, - |m: &mut JobSkillAttr| { &mut m.caption }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caption_noun", - |m: &JobSkillAttr| { &m.caption_noun }, - |m: &mut JobSkillAttr| { &mut m.caption_noun }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "profession", - |m: &JobSkillAttr| { &m.profession }, - |m: &mut JobSkillAttr| { &mut m.profession }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "labor", - |m: &JobSkillAttr| { &m.labor }, - |m: &mut JobSkillAttr| { &mut m.labor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &JobSkillAttr| { &m.type_ }, - |m: &mut JobSkillAttr| { &mut m.type_ }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "JobSkillAttr", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for JobSkillAttr { - const NAME: &'static str = "JobSkillAttr"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - if self.key.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.key = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.caption = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.caption_noun = ::std::option::Option::Some(is.read_string()?); - }, - 40 => { - self.profession = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.labor = ::std::option::Option::Some(is.read_int32()?); - }, - 58 => { - self.type_ = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.key.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.caption.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.caption_noun.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - if let Some(v) = self.profession { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.labor { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.type_.as_ref() { - my_size += ::protobuf::rt::string_size(7, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.key.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.caption.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.caption_noun.as_ref() { - os.write_string(4, v)?; - } - if let Some(v) = self.profession { - os.write_int32(5, v)?; - } - if let Some(v) = self.labor { - os.write_int32(6, v)?; - } - if let Some(v) = self.type_.as_ref() { - os.write_string(7, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> JobSkillAttr { - JobSkillAttr::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.key = ::std::option::Option::None; - self.caption = ::std::option::Option::None; - self.caption_noun = ::std::option::Option::None; - self.profession = ::std::option::Option::None; - self.labor = ::std::option::Option::None; - self.type_ = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static JobSkillAttr { - static instance: JobSkillAttr = JobSkillAttr { - id: ::std::option::Option::None, - key: ::std::option::Option::None, - caption: ::std::option::Option::None, - caption_noun: ::std::option::Option::None, - profession: ::std::option::Option::None, - labor: ::std::option::Option::None, - type_: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for JobSkillAttr { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("JobSkillAttr").unwrap()).clone() - } -} - -impl ::std::fmt::Display for JobSkillAttr { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for JobSkillAttr { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ProfessionAttr) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ProfessionAttr { - // message fields - // @@protoc_insertion_point(field:dfproto.ProfessionAttr.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ProfessionAttr.key) - pub key: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.ProfessionAttr.caption) - pub caption: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.ProfessionAttr.military) - pub military: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ProfessionAttr.can_assign_labor) - pub can_assign_labor: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ProfessionAttr.parent) - pub parent: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ProfessionAttr.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ProfessionAttr { - fn default() -> &'a ProfessionAttr { - ::default_instance() - } -} - -impl ProfessionAttr { - pub fn new() -> ProfessionAttr { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // required string key = 2; - - pub fn key(&self) -> &str { - match self.key.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_key(&mut self) { - self.key = ::std::option::Option::None; - } - - pub fn has_key(&self) -> bool { - self.key.is_some() - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - if self.key.is_none() { - self.key = ::std::option::Option::Some(::std::string::String::new()); - } - self.key.as_mut().unwrap() - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - self.key.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string caption = 3; - - pub fn caption(&self) -> &str { - match self.caption.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_caption(&mut self) { - self.caption = ::std::option::Option::None; - } - - pub fn has_caption(&self) -> bool { - self.caption.is_some() - } - - // Param is passed by value, moved - pub fn set_caption(&mut self, v: ::std::string::String) { - self.caption = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_caption(&mut self) -> &mut ::std::string::String { - if self.caption.is_none() { - self.caption = ::std::option::Option::Some(::std::string::String::new()); - } - self.caption.as_mut().unwrap() - } - - // Take field - pub fn take_caption(&mut self) -> ::std::string::String { - self.caption.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional bool military = 4; - - pub fn military(&self) -> bool { - self.military.unwrap_or(false) - } - - pub fn clear_military(&mut self) { - self.military = ::std::option::Option::None; - } - - pub fn has_military(&self) -> bool { - self.military.is_some() - } - - // Param is passed by value, moved - pub fn set_military(&mut self, v: bool) { - self.military = ::std::option::Option::Some(v); - } - - // optional bool can_assign_labor = 5; - - pub fn can_assign_labor(&self) -> bool { - self.can_assign_labor.unwrap_or(false) - } - - pub fn clear_can_assign_labor(&mut self) { - self.can_assign_labor = ::std::option::Option::None; - } - - pub fn has_can_assign_labor(&self) -> bool { - self.can_assign_labor.is_some() - } - - // Param is passed by value, moved - pub fn set_can_assign_labor(&mut self, v: bool) { - self.can_assign_labor = ::std::option::Option::Some(v); - } - - // optional int32 parent = 6; - - pub fn parent(&self) -> i32 { - self.parent.unwrap_or(0) - } - - pub fn clear_parent(&mut self) { - self.parent = ::std::option::Option::None; - } - - pub fn has_parent(&self) -> bool { - self.parent.is_some() - } - - // Param is passed by value, moved - pub fn set_parent(&mut self, v: i32) { - self.parent = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &ProfessionAttr| { &m.id }, - |m: &mut ProfessionAttr| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "key", - |m: &ProfessionAttr| { &m.key }, - |m: &mut ProfessionAttr| { &mut m.key }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caption", - |m: &ProfessionAttr| { &m.caption }, - |m: &mut ProfessionAttr| { &mut m.caption }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "military", - |m: &ProfessionAttr| { &m.military }, - |m: &mut ProfessionAttr| { &mut m.military }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "can_assign_labor", - |m: &ProfessionAttr| { &m.can_assign_labor }, - |m: &mut ProfessionAttr| { &mut m.can_assign_labor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "parent", - |m: &ProfessionAttr| { &m.parent }, - |m: &mut ProfessionAttr| { &mut m.parent }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ProfessionAttr", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ProfessionAttr { - const NAME: &'static str = "ProfessionAttr"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - if self.key.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.key = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.caption = ::std::option::Option::Some(is.read_string()?); - }, - 32 => { - self.military = ::std::option::Option::Some(is.read_bool()?); - }, - 40 => { - self.can_assign_labor = ::std::option::Option::Some(is.read_bool()?); - }, - 48 => { - self.parent = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.key.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.caption.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.military { - my_size += 1 + 1; - } - if let Some(v) = self.can_assign_labor { - my_size += 1 + 1; - } - if let Some(v) = self.parent { - my_size += ::protobuf::rt::int32_size(6, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.key.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.caption.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.military { - os.write_bool(4, v)?; - } - if let Some(v) = self.can_assign_labor { - os.write_bool(5, v)?; - } - if let Some(v) = self.parent { - os.write_int32(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ProfessionAttr { - ProfessionAttr::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.key = ::std::option::Option::None; - self.caption = ::std::option::Option::None; - self.military = ::std::option::Option::None; - self.can_assign_labor = ::std::option::Option::None; - self.parent = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ProfessionAttr { - static instance: ProfessionAttr = ProfessionAttr { - id: ::std::option::Option::None, - key: ::std::option::Option::None, - caption: ::std::option::Option::None, - military: ::std::option::Option::None, - can_assign_labor: ::std::option::Option::None, - parent: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ProfessionAttr { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ProfessionAttr").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ProfessionAttr { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ProfessionAttr { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.UnitLaborAttr) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitLaborAttr { - // message fields - // @@protoc_insertion_point(field:dfproto.UnitLaborAttr.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitLaborAttr.key) - pub key: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.UnitLaborAttr.caption) - pub caption: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.UnitLaborAttr.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitLaborAttr { - fn default() -> &'a UnitLaborAttr { - ::default_instance() - } -} - -impl UnitLaborAttr { - pub fn new() -> UnitLaborAttr { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // required string key = 2; - - pub fn key(&self) -> &str { - match self.key.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_key(&mut self) { - self.key = ::std::option::Option::None; - } - - pub fn has_key(&self) -> bool { - self.key.is_some() - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - if self.key.is_none() { - self.key = ::std::option::Option::Some(::std::string::String::new()); - } - self.key.as_mut().unwrap() - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - self.key.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string caption = 3; - - pub fn caption(&self) -> &str { - match self.caption.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_caption(&mut self) { - self.caption = ::std::option::Option::None; - } - - pub fn has_caption(&self) -> bool { - self.caption.is_some() - } - - // Param is passed by value, moved - pub fn set_caption(&mut self, v: ::std::string::String) { - self.caption = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_caption(&mut self) -> &mut ::std::string::String { - if self.caption.is_none() { - self.caption = ::std::option::Option::Some(::std::string::String::new()); - } - self.caption.as_mut().unwrap() - } - - // Take field - pub fn take_caption(&mut self) -> ::std::string::String { - self.caption.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &UnitLaborAttr| { &m.id }, - |m: &mut UnitLaborAttr| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "key", - |m: &UnitLaborAttr| { &m.key }, - |m: &mut UnitLaborAttr| { &mut m.key }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caption", - |m: &UnitLaborAttr| { &m.caption }, - |m: &mut UnitLaborAttr| { &mut m.caption }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitLaborAttr", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitLaborAttr { - const NAME: &'static str = "UnitLaborAttr"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - if self.key.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.key = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.caption = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.key.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.caption.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.key.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.caption.as_ref() { - os.write_string(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitLaborAttr { - UnitLaborAttr::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.key = ::std::option::Option::None; - self.caption = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitLaborAttr { - static instance: UnitLaborAttr = UnitLaborAttr { - id: ::std::option::Option::None, - key: ::std::option::Option::None, - caption: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitLaborAttr { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitLaborAttr").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitLaborAttr { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitLaborAttr { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.NameInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct NameInfo { - // message fields - // @@protoc_insertion_point(field:dfproto.NameInfo.first_name) - pub first_name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.NameInfo.nickname) - pub nickname: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.NameInfo.language_id) - pub language_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.NameInfo.last_name) - pub last_name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.NameInfo.english_name) - pub english_name: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.NameInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NameInfo { - fn default() -> &'a NameInfo { - ::default_instance() - } -} - -impl NameInfo { - pub fn new() -> NameInfo { - ::std::default::Default::default() - } - - // optional string first_name = 1; - - pub fn first_name(&self) -> &str { - match self.first_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_first_name(&mut self) { - self.first_name = ::std::option::Option::None; - } - - pub fn has_first_name(&self) -> bool { - self.first_name.is_some() - } - - // Param is passed by value, moved - pub fn set_first_name(&mut self, v: ::std::string::String) { - self.first_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_first_name(&mut self) -> &mut ::std::string::String { - if self.first_name.is_none() { - self.first_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.first_name.as_mut().unwrap() - } - - // Take field - pub fn take_first_name(&mut self) -> ::std::string::String { - self.first_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string nickname = 2; - - pub fn nickname(&self) -> &str { - match self.nickname.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_nickname(&mut self) { - self.nickname = ::std::option::Option::None; - } - - pub fn has_nickname(&self) -> bool { - self.nickname.is_some() - } - - // Param is passed by value, moved - pub fn set_nickname(&mut self, v: ::std::string::String) { - self.nickname = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_nickname(&mut self) -> &mut ::std::string::String { - if self.nickname.is_none() { - self.nickname = ::std::option::Option::Some(::std::string::String::new()); - } - self.nickname.as_mut().unwrap() - } - - // Take field - pub fn take_nickname(&mut self) -> ::std::string::String { - self.nickname.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 language_id = 3; - - pub fn language_id(&self) -> i32 { - self.language_id.unwrap_or(-1i32) - } - - pub fn clear_language_id(&mut self) { - self.language_id = ::std::option::Option::None; - } - - pub fn has_language_id(&self) -> bool { - self.language_id.is_some() - } - - // Param is passed by value, moved - pub fn set_language_id(&mut self, v: i32) { - self.language_id = ::std::option::Option::Some(v); - } - - // optional string last_name = 4; - - pub fn last_name(&self) -> &str { - match self.last_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_last_name(&mut self) { - self.last_name = ::std::option::Option::None; - } - - pub fn has_last_name(&self) -> bool { - self.last_name.is_some() - } - - // Param is passed by value, moved - pub fn set_last_name(&mut self, v: ::std::string::String) { - self.last_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_last_name(&mut self) -> &mut ::std::string::String { - if self.last_name.is_none() { - self.last_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.last_name.as_mut().unwrap() - } - - // Take field - pub fn take_last_name(&mut self) -> ::std::string::String { - self.last_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string english_name = 5; - - pub fn english_name(&self) -> &str { - match self.english_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_english_name(&mut self) { - self.english_name = ::std::option::Option::None; - } - - pub fn has_english_name(&self) -> bool { - self.english_name.is_some() - } - - // Param is passed by value, moved - pub fn set_english_name(&mut self, v: ::std::string::String) { - self.english_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_english_name(&mut self) -> &mut ::std::string::String { - if self.english_name.is_none() { - self.english_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.english_name.as_mut().unwrap() - } - - // Take field - pub fn take_english_name(&mut self) -> ::std::string::String { - self.english_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "first_name", - |m: &NameInfo| { &m.first_name }, - |m: &mut NameInfo| { &mut m.first_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "nickname", - |m: &NameInfo| { &m.nickname }, - |m: &mut NameInfo| { &mut m.nickname }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "language_id", - |m: &NameInfo| { &m.language_id }, - |m: &mut NameInfo| { &mut m.language_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "last_name", - |m: &NameInfo| { &m.last_name }, - |m: &mut NameInfo| { &mut m.last_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "english_name", - |m: &NameInfo| { &m.english_name }, - |m: &mut NameInfo| { &mut m.english_name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "NameInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for NameInfo { - const NAME: &'static str = "NameInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.first_name = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.nickname = ::std::option::Option::Some(is.read_string()?); - }, - 24 => { - self.language_id = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - self.last_name = ::std::option::Option::Some(is.read_string()?); - }, - 42 => { - self.english_name = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.first_name.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.nickname.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.language_id { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.last_name.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - if let Some(v) = self.english_name.as_ref() { - my_size += ::protobuf::rt::string_size(5, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.first_name.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.nickname.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.language_id { - os.write_int32(3, v)?; - } - if let Some(v) = self.last_name.as_ref() { - os.write_string(4, v)?; - } - if let Some(v) = self.english_name.as_ref() { - os.write_string(5, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NameInfo { - NameInfo::new() - } - - fn clear(&mut self) { - self.first_name = ::std::option::Option::None; - self.nickname = ::std::option::Option::None; - self.language_id = ::std::option::Option::None; - self.last_name = ::std::option::Option::None; - self.english_name = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static NameInfo { - static instance: NameInfo = NameInfo { - first_name: ::std::option::Option::None, - nickname: ::std::option::Option::None, - language_id: ::std::option::Option::None, - last_name: ::std::option::Option::None, - english_name: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for NameInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("NameInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for NameInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for NameInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.NameTriple) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct NameTriple { - // message fields - // @@protoc_insertion_point(field:dfproto.NameTriple.normal) - pub normal: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.NameTriple.plural) - pub plural: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.NameTriple.adjective) - pub adjective: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.NameTriple.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NameTriple { - fn default() -> &'a NameTriple { - ::default_instance() - } -} - -impl NameTriple { - pub fn new() -> NameTriple { - ::std::default::Default::default() - } - - // required string normal = 1; - - pub fn normal(&self) -> &str { - match self.normal.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_normal(&mut self) { - self.normal = ::std::option::Option::None; - } - - pub fn has_normal(&self) -> bool { - self.normal.is_some() - } - - // Param is passed by value, moved - pub fn set_normal(&mut self, v: ::std::string::String) { - self.normal = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_normal(&mut self) -> &mut ::std::string::String { - if self.normal.is_none() { - self.normal = ::std::option::Option::Some(::std::string::String::new()); - } - self.normal.as_mut().unwrap() - } - - // Take field - pub fn take_normal(&mut self) -> ::std::string::String { - self.normal.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string plural = 2; - - pub fn plural(&self) -> &str { - match self.plural.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_plural(&mut self) { - self.plural = ::std::option::Option::None; - } - - pub fn has_plural(&self) -> bool { - self.plural.is_some() - } - - // Param is passed by value, moved - pub fn set_plural(&mut self, v: ::std::string::String) { - self.plural = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_plural(&mut self) -> &mut ::std::string::String { - if self.plural.is_none() { - self.plural = ::std::option::Option::Some(::std::string::String::new()); - } - self.plural.as_mut().unwrap() - } - - // Take field - pub fn take_plural(&mut self) -> ::std::string::String { - self.plural.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string adjective = 3; - - pub fn adjective(&self) -> &str { - match self.adjective.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_adjective(&mut self) { - self.adjective = ::std::option::Option::None; - } - - pub fn has_adjective(&self) -> bool { - self.adjective.is_some() - } - - // Param is passed by value, moved - pub fn set_adjective(&mut self, v: ::std::string::String) { - self.adjective = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_adjective(&mut self) -> &mut ::std::string::String { - if self.adjective.is_none() { - self.adjective = ::std::option::Option::Some(::std::string::String::new()); - } - self.adjective.as_mut().unwrap() - } - - // Take field - pub fn take_adjective(&mut self) -> ::std::string::String { - self.adjective.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "normal", - |m: &NameTriple| { &m.normal }, - |m: &mut NameTriple| { &mut m.normal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "plural", - |m: &NameTriple| { &m.plural }, - |m: &mut NameTriple| { &mut m.plural }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "adjective", - |m: &NameTriple| { &m.adjective }, - |m: &mut NameTriple| { &mut m.adjective }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "NameTriple", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for NameTriple { - const NAME: &'static str = "NameTriple"; - - fn is_initialized(&self) -> bool { - if self.normal.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.normal = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.plural = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.adjective = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.normal.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.plural.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.adjective.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.normal.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.plural.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.adjective.as_ref() { - os.write_string(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NameTriple { - NameTriple::new() - } - - fn clear(&mut self) { - self.normal = ::std::option::Option::None; - self.plural = ::std::option::Option::None; - self.adjective = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static NameTriple { - static instance: NameTriple = NameTriple { - normal: ::std::option::Option::None, - plural: ::std::option::Option::None, - adjective: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for NameTriple { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("NameTriple").unwrap()).clone() - } -} - -impl ::std::fmt::Display for NameTriple { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for NameTriple { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.UnitCurseInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitCurseInfo { - // message fields - // @@protoc_insertion_point(field:dfproto.UnitCurseInfo.add_tags1) - pub add_tags1: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitCurseInfo.rem_tags1) - pub rem_tags1: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitCurseInfo.add_tags2) - pub add_tags2: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitCurseInfo.rem_tags2) - pub rem_tags2: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitCurseInfo.name) - pub name: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:dfproto.UnitCurseInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitCurseInfo { - fn default() -> &'a UnitCurseInfo { - ::default_instance() - } -} - -impl UnitCurseInfo { - pub fn new() -> UnitCurseInfo { - ::std::default::Default::default() - } - - // required fixed32 add_tags1 = 1; - - pub fn add_tags1(&self) -> u32 { - self.add_tags1.unwrap_or(0) - } - - pub fn clear_add_tags1(&mut self) { - self.add_tags1 = ::std::option::Option::None; - } - - pub fn has_add_tags1(&self) -> bool { - self.add_tags1.is_some() - } - - // Param is passed by value, moved - pub fn set_add_tags1(&mut self, v: u32) { - self.add_tags1 = ::std::option::Option::Some(v); - } - - // required fixed32 rem_tags1 = 2; - - pub fn rem_tags1(&self) -> u32 { - self.rem_tags1.unwrap_or(0) - } - - pub fn clear_rem_tags1(&mut self) { - self.rem_tags1 = ::std::option::Option::None; - } - - pub fn has_rem_tags1(&self) -> bool { - self.rem_tags1.is_some() - } - - // Param is passed by value, moved - pub fn set_rem_tags1(&mut self, v: u32) { - self.rem_tags1 = ::std::option::Option::Some(v); - } - - // required fixed32 add_tags2 = 3; - - pub fn add_tags2(&self) -> u32 { - self.add_tags2.unwrap_or(0) - } - - pub fn clear_add_tags2(&mut self) { - self.add_tags2 = ::std::option::Option::None; - } - - pub fn has_add_tags2(&self) -> bool { - self.add_tags2.is_some() - } - - // Param is passed by value, moved - pub fn set_add_tags2(&mut self, v: u32) { - self.add_tags2 = ::std::option::Option::Some(v); - } - - // required fixed32 rem_tags2 = 4; - - pub fn rem_tags2(&self) -> u32 { - self.rem_tags2.unwrap_or(0) - } - - pub fn clear_rem_tags2(&mut self) { - self.rem_tags2 = ::std::option::Option::None; - } - - pub fn has_rem_tags2(&self) -> bool { - self.rem_tags2.is_some() - } - - // Param is passed by value, moved - pub fn set_rem_tags2(&mut self, v: u32) { - self.rem_tags2 = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "add_tags1", - |m: &UnitCurseInfo| { &m.add_tags1 }, - |m: &mut UnitCurseInfo| { &mut m.add_tags1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "rem_tags1", - |m: &UnitCurseInfo| { &m.rem_tags1 }, - |m: &mut UnitCurseInfo| { &mut m.rem_tags1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "add_tags2", - |m: &UnitCurseInfo| { &m.add_tags2 }, - |m: &mut UnitCurseInfo| { &mut m.add_tags2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "rem_tags2", - |m: &UnitCurseInfo| { &m.rem_tags2 }, - |m: &mut UnitCurseInfo| { &mut m.rem_tags2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, NameTriple>( - "name", - |m: &UnitCurseInfo| { &m.name }, - |m: &mut UnitCurseInfo| { &mut m.name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitCurseInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitCurseInfo { - const NAME: &'static str = "UnitCurseInfo"; - - fn is_initialized(&self) -> bool { - if self.add_tags1.is_none() { - return false; - } - if self.rem_tags1.is_none() { - return false; - } - if self.add_tags2.is_none() { - return false; - } - if self.rem_tags2.is_none() { - return false; - } - for v in &self.name { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 13 => { - self.add_tags1 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 21 => { - self.rem_tags1 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 29 => { - self.add_tags2 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 37 => { - self.rem_tags2 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.name)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.add_tags1 { - my_size += 1 + 4; - } - if let Some(v) = self.rem_tags1 { - my_size += 1 + 4; - } - if let Some(v) = self.add_tags2 { - my_size += 1 + 4; - } - if let Some(v) = self.rem_tags2 { - my_size += 1 + 4; - } - if let Some(v) = self.name.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.add_tags1 { - os.write_fixed32(1, v)?; - } - if let Some(v) = self.rem_tags1 { - os.write_fixed32(2, v)?; - } - if let Some(v) = self.add_tags2 { - os.write_fixed32(3, v)?; - } - if let Some(v) = self.rem_tags2 { - os.write_fixed32(4, v)?; - } - if let Some(v) = self.name.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitCurseInfo { - UnitCurseInfo::new() - } - - fn clear(&mut self) { - self.add_tags1 = ::std::option::Option::None; - self.rem_tags1 = ::std::option::Option::None; - self.add_tags2 = ::std::option::Option::None; - self.rem_tags2 = ::std::option::Option::None; - self.name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitCurseInfo { - static instance: UnitCurseInfo = UnitCurseInfo { - add_tags1: ::std::option::Option::None, - rem_tags1: ::std::option::Option::None, - add_tags2: ::std::option::Option::None, - rem_tags2: ::std::option::Option::None, - name: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitCurseInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitCurseInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitCurseInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitCurseInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.SkillInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SkillInfo { - // message fields - // @@protoc_insertion_point(field:dfproto.SkillInfo.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.SkillInfo.level) - pub level: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.SkillInfo.experience) - pub experience: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.SkillInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SkillInfo { - fn default() -> &'a SkillInfo { - ::default_instance() - } -} - -impl SkillInfo { - pub fn new() -> SkillInfo { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // required int32 level = 2; - - pub fn level(&self) -> i32 { - self.level.unwrap_or(0) - } - - pub fn clear_level(&mut self) { - self.level = ::std::option::Option::None; - } - - pub fn has_level(&self) -> bool { - self.level.is_some() - } - - // Param is passed by value, moved - pub fn set_level(&mut self, v: i32) { - self.level = ::std::option::Option::Some(v); - } - - // required int32 experience = 3; - - pub fn experience(&self) -> i32 { - self.experience.unwrap_or(0) - } - - pub fn clear_experience(&mut self) { - self.experience = ::std::option::Option::None; - } - - pub fn has_experience(&self) -> bool { - self.experience.is_some() - } - - // Param is passed by value, moved - pub fn set_experience(&mut self, v: i32) { - self.experience = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &SkillInfo| { &m.id }, - |m: &mut SkillInfo| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "level", - |m: &SkillInfo| { &m.level }, - |m: &mut SkillInfo| { &mut m.level }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "experience", - |m: &SkillInfo| { &m.experience }, - |m: &mut SkillInfo| { &mut m.experience }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SkillInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SkillInfo { - const NAME: &'static str = "SkillInfo"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - if self.level.is_none() { - return false; - } - if self.experience.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.level = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.experience = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.level { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.experience { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.level { - os.write_int32(2, v)?; - } - if let Some(v) = self.experience { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SkillInfo { - SkillInfo::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.level = ::std::option::Option::None; - self.experience = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SkillInfo { - static instance: SkillInfo = SkillInfo { - id: ::std::option::Option::None, - level: ::std::option::Option::None, - experience: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SkillInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SkillInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SkillInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SkillInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.UnitMiscTrait) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitMiscTrait { - // message fields - // @@protoc_insertion_point(field:dfproto.UnitMiscTrait.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitMiscTrait.value) - pub value: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.UnitMiscTrait.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitMiscTrait { - fn default() -> &'a UnitMiscTrait { - ::default_instance() - } -} - -impl UnitMiscTrait { - pub fn new() -> UnitMiscTrait { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // required int32 value = 2; - - pub fn value(&self) -> i32 { - self.value.unwrap_or(0) - } - - pub fn clear_value(&mut self) { - self.value = ::std::option::Option::None; - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: i32) { - self.value = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &UnitMiscTrait| { &m.id }, - |m: &mut UnitMiscTrait| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "value", - |m: &UnitMiscTrait| { &m.value }, - |m: &mut UnitMiscTrait| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitMiscTrait", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitMiscTrait { - const NAME: &'static str = "UnitMiscTrait"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - if self.value.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.value = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.value { - my_size += ::protobuf::rt::int32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.value { - os.write_int32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitMiscTrait { - UnitMiscTrait::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.value = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitMiscTrait { - static instance: UnitMiscTrait = UnitMiscTrait { - id: ::std::option::Option::None, - value: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitMiscTrait { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitMiscTrait").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitMiscTrait { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitMiscTrait { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.BasicUnitInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BasicUnitInfo { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.unit_id) - pub unit_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.pos_x) - pub pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.pos_y) - pub pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.pos_z) - pub pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.name) - pub name: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.flags1) - pub flags1: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.flags2) - pub flags2: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.flags3) - pub flags3: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.race) - pub race: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.caste) - pub caste: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.gender) - pub gender: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.civ_id) - pub civ_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.histfig_id) - pub histfig_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.death_id) - pub death_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.death_flags) - pub death_flags: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.squad_id) - pub squad_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.squad_position) - pub squad_position: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.profession) - pub profession: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.custom_profession) - pub custom_profession: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.labors) - pub labors: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.skills) - pub skills: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.misc_traits) - pub misc_traits: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.curse) - pub curse: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfo.burrows) - pub burrows: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicUnitInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BasicUnitInfo { - fn default() -> &'a BasicUnitInfo { - ::default_instance() - } -} - -impl BasicUnitInfo { - pub fn new() -> BasicUnitInfo { - ::std::default::Default::default() - } - - // required int32 unit_id = 1; - - pub fn unit_id(&self) -> i32 { - self.unit_id.unwrap_or(0) - } - - pub fn clear_unit_id(&mut self) { - self.unit_id = ::std::option::Option::None; - } - - pub fn has_unit_id(&self) -> bool { - self.unit_id.is_some() - } - - // Param is passed by value, moved - pub fn set_unit_id(&mut self, v: i32) { - self.unit_id = ::std::option::Option::Some(v); - } - - // required int32 pos_x = 13; - - pub fn pos_x(&self) -> i32 { - self.pos_x.unwrap_or(0) - } - - pub fn clear_pos_x(&mut self) { - self.pos_x = ::std::option::Option::None; - } - - pub fn has_pos_x(&self) -> bool { - self.pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x(&mut self, v: i32) { - self.pos_x = ::std::option::Option::Some(v); - } - - // required int32 pos_y = 14; - - pub fn pos_y(&self) -> i32 { - self.pos_y.unwrap_or(0) - } - - pub fn clear_pos_y(&mut self) { - self.pos_y = ::std::option::Option::None; - } - - pub fn has_pos_y(&self) -> bool { - self.pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y(&mut self, v: i32) { - self.pos_y = ::std::option::Option::Some(v); - } - - // required int32 pos_z = 15; - - pub fn pos_z(&self) -> i32 { - self.pos_z.unwrap_or(0) - } - - pub fn clear_pos_z(&mut self) { - self.pos_z = ::std::option::Option::None; - } - - pub fn has_pos_z(&self) -> bool { - self.pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_z(&mut self, v: i32) { - self.pos_z = ::std::option::Option::Some(v); - } - - // required fixed32 flags1 = 3; - - pub fn flags1(&self) -> u32 { - self.flags1.unwrap_or(0) - } - - pub fn clear_flags1(&mut self) { - self.flags1 = ::std::option::Option::None; - } - - pub fn has_flags1(&self) -> bool { - self.flags1.is_some() - } - - // Param is passed by value, moved - pub fn set_flags1(&mut self, v: u32) { - self.flags1 = ::std::option::Option::Some(v); - } - - // required fixed32 flags2 = 4; - - pub fn flags2(&self) -> u32 { - self.flags2.unwrap_or(0) - } - - pub fn clear_flags2(&mut self) { - self.flags2 = ::std::option::Option::None; - } - - pub fn has_flags2(&self) -> bool { - self.flags2.is_some() - } - - // Param is passed by value, moved - pub fn set_flags2(&mut self, v: u32) { - self.flags2 = ::std::option::Option::Some(v); - } - - // required fixed32 flags3 = 5; - - pub fn flags3(&self) -> u32 { - self.flags3.unwrap_or(0) - } - - pub fn clear_flags3(&mut self) { - self.flags3 = ::std::option::Option::None; - } - - pub fn has_flags3(&self) -> bool { - self.flags3.is_some() - } - - // Param is passed by value, moved - pub fn set_flags3(&mut self, v: u32) { - self.flags3 = ::std::option::Option::Some(v); - } - - // required int32 race = 6; - - pub fn race(&self) -> i32 { - self.race.unwrap_or(0) - } - - pub fn clear_race(&mut self) { - self.race = ::std::option::Option::None; - } - - pub fn has_race(&self) -> bool { - self.race.is_some() - } - - // Param is passed by value, moved - pub fn set_race(&mut self, v: i32) { - self.race = ::std::option::Option::Some(v); - } - - // required int32 caste = 7; - - pub fn caste(&self) -> i32 { - self.caste.unwrap_or(0) - } - - pub fn clear_caste(&mut self) { - self.caste = ::std::option::Option::None; - } - - pub fn has_caste(&self) -> bool { - self.caste.is_some() - } - - // Param is passed by value, moved - pub fn set_caste(&mut self, v: i32) { - self.caste = ::std::option::Option::Some(v); - } - - // optional int32 gender = 8; - - pub fn gender(&self) -> i32 { - self.gender.unwrap_or(-1i32) - } - - pub fn clear_gender(&mut self) { - self.gender = ::std::option::Option::None; - } - - pub fn has_gender(&self) -> bool { - self.gender.is_some() - } - - // Param is passed by value, moved - pub fn set_gender(&mut self, v: i32) { - self.gender = ::std::option::Option::Some(v); - } - - // optional int32 civ_id = 9; - - pub fn civ_id(&self) -> i32 { - self.civ_id.unwrap_or(-1i32) - } - - pub fn clear_civ_id(&mut self) { - self.civ_id = ::std::option::Option::None; - } - - pub fn has_civ_id(&self) -> bool { - self.civ_id.is_some() - } - - // Param is passed by value, moved - pub fn set_civ_id(&mut self, v: i32) { - self.civ_id = ::std::option::Option::Some(v); - } - - // optional int32 histfig_id = 10; - - pub fn histfig_id(&self) -> i32 { - self.histfig_id.unwrap_or(-1i32) - } - - pub fn clear_histfig_id(&mut self) { - self.histfig_id = ::std::option::Option::None; - } - - pub fn has_histfig_id(&self) -> bool { - self.histfig_id.is_some() - } - - // Param is passed by value, moved - pub fn set_histfig_id(&mut self, v: i32) { - self.histfig_id = ::std::option::Option::Some(v); - } - - // optional int32 death_id = 17; - - pub fn death_id(&self) -> i32 { - self.death_id.unwrap_or(-1i32) - } - - pub fn clear_death_id(&mut self) { - self.death_id = ::std::option::Option::None; - } - - pub fn has_death_id(&self) -> bool { - self.death_id.is_some() - } - - // Param is passed by value, moved - pub fn set_death_id(&mut self, v: i32) { - self.death_id = ::std::option::Option::Some(v); - } - - // optional uint32 death_flags = 18; - - pub fn death_flags(&self) -> u32 { - self.death_flags.unwrap_or(0) - } - - pub fn clear_death_flags(&mut self) { - self.death_flags = ::std::option::Option::None; - } - - pub fn has_death_flags(&self) -> bool { - self.death_flags.is_some() - } - - // Param is passed by value, moved - pub fn set_death_flags(&mut self, v: u32) { - self.death_flags = ::std::option::Option::Some(v); - } - - // optional int32 squad_id = 19; - - pub fn squad_id(&self) -> i32 { - self.squad_id.unwrap_or(-1i32) - } - - pub fn clear_squad_id(&mut self) { - self.squad_id = ::std::option::Option::None; - } - - pub fn has_squad_id(&self) -> bool { - self.squad_id.is_some() - } - - // Param is passed by value, moved - pub fn set_squad_id(&mut self, v: i32) { - self.squad_id = ::std::option::Option::Some(v); - } - - // optional int32 squad_position = 20; - - pub fn squad_position(&self) -> i32 { - self.squad_position.unwrap_or(-1i32) - } - - pub fn clear_squad_position(&mut self) { - self.squad_position = ::std::option::Option::None; - } - - pub fn has_squad_position(&self) -> bool { - self.squad_position.is_some() - } - - // Param is passed by value, moved - pub fn set_squad_position(&mut self, v: i32) { - self.squad_position = ::std::option::Option::Some(v); - } - - // optional int32 profession = 22; - - pub fn profession(&self) -> i32 { - self.profession.unwrap_or(-1i32) - } - - pub fn clear_profession(&mut self) { - self.profession = ::std::option::Option::None; - } - - pub fn has_profession(&self) -> bool { - self.profession.is_some() - } - - // Param is passed by value, moved - pub fn set_profession(&mut self, v: i32) { - self.profession = ::std::option::Option::Some(v); - } - - // optional string custom_profession = 23; - - pub fn custom_profession(&self) -> &str { - match self.custom_profession.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_custom_profession(&mut self) { - self.custom_profession = ::std::option::Option::None; - } - - pub fn has_custom_profession(&self) -> bool { - self.custom_profession.is_some() - } - - // Param is passed by value, moved - pub fn set_custom_profession(&mut self, v: ::std::string::String) { - self.custom_profession = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_custom_profession(&mut self) -> &mut ::std::string::String { - if self.custom_profession.is_none() { - self.custom_profession = ::std::option::Option::Some(::std::string::String::new()); - } - self.custom_profession.as_mut().unwrap() - } - - // Take field - pub fn take_custom_profession(&mut self) -> ::std::string::String { - self.custom_profession.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(24); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unit_id", - |m: &BasicUnitInfo| { &m.unit_id }, - |m: &mut BasicUnitInfo| { &mut m.unit_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x", - |m: &BasicUnitInfo| { &m.pos_x }, - |m: &mut BasicUnitInfo| { &mut m.pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y", - |m: &BasicUnitInfo| { &m.pos_y }, - |m: &mut BasicUnitInfo| { &mut m.pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_z", - |m: &BasicUnitInfo| { &m.pos_z }, - |m: &mut BasicUnitInfo| { &mut m.pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, NameInfo>( - "name", - |m: &BasicUnitInfo| { &m.name }, - |m: &mut BasicUnitInfo| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags1", - |m: &BasicUnitInfo| { &m.flags1 }, - |m: &mut BasicUnitInfo| { &mut m.flags1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags2", - |m: &BasicUnitInfo| { &m.flags2 }, - |m: &mut BasicUnitInfo| { &mut m.flags2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags3", - |m: &BasicUnitInfo| { &m.flags3 }, - |m: &mut BasicUnitInfo| { &mut m.flags3 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "race", - |m: &BasicUnitInfo| { &m.race }, - |m: &mut BasicUnitInfo| { &mut m.race }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caste", - |m: &BasicUnitInfo| { &m.caste }, - |m: &mut BasicUnitInfo| { &mut m.caste }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "gender", - |m: &BasicUnitInfo| { &m.gender }, - |m: &mut BasicUnitInfo| { &mut m.gender }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "civ_id", - |m: &BasicUnitInfo| { &m.civ_id }, - |m: &mut BasicUnitInfo| { &mut m.civ_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "histfig_id", - |m: &BasicUnitInfo| { &m.histfig_id }, - |m: &mut BasicUnitInfo| { &mut m.histfig_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "death_id", - |m: &BasicUnitInfo| { &m.death_id }, - |m: &mut BasicUnitInfo| { &mut m.death_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "death_flags", - |m: &BasicUnitInfo| { &m.death_flags }, - |m: &mut BasicUnitInfo| { &mut m.death_flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "squad_id", - |m: &BasicUnitInfo| { &m.squad_id }, - |m: &mut BasicUnitInfo| { &mut m.squad_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "squad_position", - |m: &BasicUnitInfo| { &m.squad_position }, - |m: &mut BasicUnitInfo| { &mut m.squad_position }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "profession", - |m: &BasicUnitInfo| { &m.profession }, - |m: &mut BasicUnitInfo| { &mut m.profession }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "custom_profession", - |m: &BasicUnitInfo| { &m.custom_profession }, - |m: &mut BasicUnitInfo| { &mut m.custom_profession }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "labors", - |m: &BasicUnitInfo| { &m.labors }, - |m: &mut BasicUnitInfo| { &mut m.labors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "skills", - |m: &BasicUnitInfo| { &m.skills }, - |m: &mut BasicUnitInfo| { &mut m.skills }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "misc_traits", - |m: &BasicUnitInfo| { &m.misc_traits }, - |m: &mut BasicUnitInfo| { &mut m.misc_traits }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, UnitCurseInfo>( - "curse", - |m: &BasicUnitInfo| { &m.curse }, - |m: &mut BasicUnitInfo| { &mut m.curse }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "burrows", - |m: &BasicUnitInfo| { &m.burrows }, - |m: &mut BasicUnitInfo| { &mut m.burrows }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicUnitInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BasicUnitInfo { - const NAME: &'static str = "BasicUnitInfo"; - - fn is_initialized(&self) -> bool { - if self.unit_id.is_none() { - return false; - } - if self.pos_x.is_none() { - return false; - } - if self.pos_y.is_none() { - return false; - } - if self.pos_z.is_none() { - return false; - } - if self.flags1.is_none() { - return false; - } - if self.flags2.is_none() { - return false; - } - if self.flags3.is_none() { - return false; - } - if self.race.is_none() { - return false; - } - if self.caste.is_none() { - return false; - } - for v in &self.name { - if !v.is_initialized() { - return false; - } - }; - for v in &self.skills { - if !v.is_initialized() { - return false; - } - }; - for v in &self.misc_traits { - if !v.is_initialized() { - return false; - } - }; - for v in &self.curse { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.unit_id = ::std::option::Option::Some(is.read_int32()?); - }, - 104 => { - self.pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 112 => { - self.pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 120 => { - self.pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.name)?; - }, - 29 => { - self.flags1 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 37 => { - self.flags2 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 45 => { - self.flags3 = ::std::option::Option::Some(is.read_fixed32()?); - }, - 48 => { - self.race = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.caste = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.gender = ::std::option::Option::Some(is.read_int32()?); - }, - 72 => { - self.civ_id = ::std::option::Option::Some(is.read_int32()?); - }, - 80 => { - self.histfig_id = ::std::option::Option::Some(is.read_int32()?); - }, - 136 => { - self.death_id = ::std::option::Option::Some(is.read_int32()?); - }, - 144 => { - self.death_flags = ::std::option::Option::Some(is.read_uint32()?); - }, - 152 => { - self.squad_id = ::std::option::Option::Some(is.read_int32()?); - }, - 160 => { - self.squad_position = ::std::option::Option::Some(is.read_int32()?); - }, - 176 => { - self.profession = ::std::option::Option::Some(is.read_int32()?); - }, - 186 => { - self.custom_profession = ::std::option::Option::Some(is.read_string()?); - }, - 90 => { - is.read_repeated_packed_int32_into(&mut self.labors)?; - }, - 88 => { - self.labors.push(is.read_int32()?); - }, - 98 => { - self.skills.push(is.read_message()?); - }, - 194 => { - self.misc_traits.push(is.read_message()?); - }, - 130 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.curse)?; - }, - 170 => { - is.read_repeated_packed_int32_into(&mut self.burrows)?; - }, - 168 => { - self.burrows.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.unit_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos_x { - my_size += ::protobuf::rt::int32_size(13, v); - } - if let Some(v) = self.pos_y { - my_size += ::protobuf::rt::int32_size(14, v); - } - if let Some(v) = self.pos_z { - my_size += ::protobuf::rt::int32_size(15, v); - } - if let Some(v) = self.name.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.flags1 { - my_size += 1 + 4; - } - if let Some(v) = self.flags2 { - my_size += 1 + 4; - } - if let Some(v) = self.flags3 { - my_size += 1 + 4; - } - if let Some(v) = self.race { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.caste { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.gender { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.civ_id { - my_size += ::protobuf::rt::int32_size(9, v); - } - if let Some(v) = self.histfig_id { - my_size += ::protobuf::rt::int32_size(10, v); - } - if let Some(v) = self.death_id { - my_size += ::protobuf::rt::int32_size(17, v); - } - if let Some(v) = self.death_flags { - my_size += ::protobuf::rt::uint32_size(18, v); - } - if let Some(v) = self.squad_id { - my_size += ::protobuf::rt::int32_size(19, v); - } - if let Some(v) = self.squad_position { - my_size += ::protobuf::rt::int32_size(20, v); - } - if let Some(v) = self.profession { - my_size += ::protobuf::rt::int32_size(22, v); - } - if let Some(v) = self.custom_profession.as_ref() { - my_size += ::protobuf::rt::string_size(23, &v); - } - for value in &self.labors { - my_size += ::protobuf::rt::int32_size(11, *value); - }; - for value in &self.skills { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.misc_traits { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.curse.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.burrows { - my_size += ::protobuf::rt::int32_size(21, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.unit_id { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos_x { - os.write_int32(13, v)?; - } - if let Some(v) = self.pos_y { - os.write_int32(14, v)?; - } - if let Some(v) = self.pos_z { - os.write_int32(15, v)?; - } - if let Some(v) = self.name.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.flags1 { - os.write_fixed32(3, v)?; - } - if let Some(v) = self.flags2 { - os.write_fixed32(4, v)?; - } - if let Some(v) = self.flags3 { - os.write_fixed32(5, v)?; - } - if let Some(v) = self.race { - os.write_int32(6, v)?; - } - if let Some(v) = self.caste { - os.write_int32(7, v)?; - } - if let Some(v) = self.gender { - os.write_int32(8, v)?; - } - if let Some(v) = self.civ_id { - os.write_int32(9, v)?; - } - if let Some(v) = self.histfig_id { - os.write_int32(10, v)?; - } - if let Some(v) = self.death_id { - os.write_int32(17, v)?; - } - if let Some(v) = self.death_flags { - os.write_uint32(18, v)?; - } - if let Some(v) = self.squad_id { - os.write_int32(19, v)?; - } - if let Some(v) = self.squad_position { - os.write_int32(20, v)?; - } - if let Some(v) = self.profession { - os.write_int32(22, v)?; - } - if let Some(v) = self.custom_profession.as_ref() { - os.write_string(23, v)?; - } - for v in &self.labors { - os.write_int32(11, *v)?; - }; - for v in &self.skills { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - }; - for v in &self.misc_traits { - ::protobuf::rt::write_message_field_with_cached_size(24, v, os)?; - }; - if let Some(v) = self.curse.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?; - } - for v in &self.burrows { - os.write_int32(21, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BasicUnitInfo { - BasicUnitInfo::new() - } - - fn clear(&mut self) { - self.unit_id = ::std::option::Option::None; - self.pos_x = ::std::option::Option::None; - self.pos_y = ::std::option::Option::None; - self.pos_z = ::std::option::Option::None; - self.name.clear(); - self.flags1 = ::std::option::Option::None; - self.flags2 = ::std::option::Option::None; - self.flags3 = ::std::option::Option::None; - self.race = ::std::option::Option::None; - self.caste = ::std::option::Option::None; - self.gender = ::std::option::Option::None; - self.civ_id = ::std::option::Option::None; - self.histfig_id = ::std::option::Option::None; - self.death_id = ::std::option::Option::None; - self.death_flags = ::std::option::Option::None; - self.squad_id = ::std::option::Option::None; - self.squad_position = ::std::option::Option::None; - self.profession = ::std::option::Option::None; - self.custom_profession = ::std::option::Option::None; - self.labors.clear(); - self.skills.clear(); - self.misc_traits.clear(); - self.curse.clear(); - self.burrows.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BasicUnitInfo { - static instance: BasicUnitInfo = BasicUnitInfo { - unit_id: ::std::option::Option::None, - pos_x: ::std::option::Option::None, - pos_y: ::std::option::Option::None, - pos_z: ::std::option::Option::None, - name: ::protobuf::MessageField::none(), - flags1: ::std::option::Option::None, - flags2: ::std::option::Option::None, - flags3: ::std::option::Option::None, - race: ::std::option::Option::None, - caste: ::std::option::Option::None, - gender: ::std::option::Option::None, - civ_id: ::std::option::Option::None, - histfig_id: ::std::option::Option::None, - death_id: ::std::option::Option::None, - death_flags: ::std::option::Option::None, - squad_id: ::std::option::Option::None, - squad_position: ::std::option::Option::None, - profession: ::std::option::Option::None, - custom_profession: ::std::option::Option::None, - labors: ::std::vec::Vec::new(), - skills: ::std::vec::Vec::new(), - misc_traits: ::std::vec::Vec::new(), - curse: ::protobuf::MessageField::none(), - burrows: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BasicUnitInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BasicUnitInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BasicUnitInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BasicUnitInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.BasicUnitInfoMask) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BasicUnitInfoMask { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicUnitInfoMask.labors) - pub labors: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfoMask.skills) - pub skills: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfoMask.profession) - pub profession: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicUnitInfoMask.misc_traits) - pub misc_traits: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicUnitInfoMask.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BasicUnitInfoMask { - fn default() -> &'a BasicUnitInfoMask { - ::default_instance() - } -} - -impl BasicUnitInfoMask { - pub fn new() -> BasicUnitInfoMask { - ::std::default::Default::default() - } - - // optional bool labors = 1; - - pub fn labors(&self) -> bool { - self.labors.unwrap_or(false) - } - - pub fn clear_labors(&mut self) { - self.labors = ::std::option::Option::None; - } - - pub fn has_labors(&self) -> bool { - self.labors.is_some() - } - - // Param is passed by value, moved - pub fn set_labors(&mut self, v: bool) { - self.labors = ::std::option::Option::Some(v); - } - - // optional bool skills = 2; - - pub fn skills(&self) -> bool { - self.skills.unwrap_or(false) - } - - pub fn clear_skills(&mut self) { - self.skills = ::std::option::Option::None; - } - - pub fn has_skills(&self) -> bool { - self.skills.is_some() - } - - // Param is passed by value, moved - pub fn set_skills(&mut self, v: bool) { - self.skills = ::std::option::Option::Some(v); - } - - // optional bool profession = 3; - - pub fn profession(&self) -> bool { - self.profession.unwrap_or(false) - } - - pub fn clear_profession(&mut self) { - self.profession = ::std::option::Option::None; - } - - pub fn has_profession(&self) -> bool { - self.profession.is_some() - } - - // Param is passed by value, moved - pub fn set_profession(&mut self, v: bool) { - self.profession = ::std::option::Option::Some(v); - } - - // optional bool misc_traits = 4; - - pub fn misc_traits(&self) -> bool { - self.misc_traits.unwrap_or(false) - } - - pub fn clear_misc_traits(&mut self) { - self.misc_traits = ::std::option::Option::None; - } - - pub fn has_misc_traits(&self) -> bool { - self.misc_traits.is_some() - } - - // Param is passed by value, moved - pub fn set_misc_traits(&mut self, v: bool) { - self.misc_traits = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "labors", - |m: &BasicUnitInfoMask| { &m.labors }, - |m: &mut BasicUnitInfoMask| { &mut m.labors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "skills", - |m: &BasicUnitInfoMask| { &m.skills }, - |m: &mut BasicUnitInfoMask| { &mut m.skills }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "profession", - |m: &BasicUnitInfoMask| { &m.profession }, - |m: &mut BasicUnitInfoMask| { &mut m.profession }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "misc_traits", - |m: &BasicUnitInfoMask| { &m.misc_traits }, - |m: &mut BasicUnitInfoMask| { &mut m.misc_traits }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicUnitInfoMask", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BasicUnitInfoMask { - const NAME: &'static str = "BasicUnitInfoMask"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.labors = ::std::option::Option::Some(is.read_bool()?); - }, - 16 => { - self.skills = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.profession = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.misc_traits = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.labors { - my_size += 1 + 1; - } - if let Some(v) = self.skills { - my_size += 1 + 1; - } - if let Some(v) = self.profession { - my_size += 1 + 1; - } - if let Some(v) = self.misc_traits { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.labors { - os.write_bool(1, v)?; - } - if let Some(v) = self.skills { - os.write_bool(2, v)?; - } - if let Some(v) = self.profession { - os.write_bool(3, v)?; - } - if let Some(v) = self.misc_traits { - os.write_bool(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BasicUnitInfoMask { - BasicUnitInfoMask::new() - } - - fn clear(&mut self) { - self.labors = ::std::option::Option::None; - self.skills = ::std::option::Option::None; - self.profession = ::std::option::Option::None; - self.misc_traits = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BasicUnitInfoMask { - static instance: BasicUnitInfoMask = BasicUnitInfoMask { - labors: ::std::option::Option::None, - skills: ::std::option::Option::None, - profession: ::std::option::Option::None, - misc_traits: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BasicUnitInfoMask { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BasicUnitInfoMask").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BasicUnitInfoMask { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BasicUnitInfoMask { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.BasicSquadInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BasicSquadInfo { - // message fields - // @@protoc_insertion_point(field:dfproto.BasicSquadInfo.squad_id) - pub squad_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.BasicSquadInfo.name) - pub name: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfproto.BasicSquadInfo.alias) - pub alias: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.BasicSquadInfo.members) - pub members: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.BasicSquadInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BasicSquadInfo { - fn default() -> &'a BasicSquadInfo { - ::default_instance() - } -} - -impl BasicSquadInfo { - pub fn new() -> BasicSquadInfo { - ::std::default::Default::default() - } - - // required int32 squad_id = 1; - - pub fn squad_id(&self) -> i32 { - self.squad_id.unwrap_or(0) - } - - pub fn clear_squad_id(&mut self) { - self.squad_id = ::std::option::Option::None; - } - - pub fn has_squad_id(&self) -> bool { - self.squad_id.is_some() - } - - // Param is passed by value, moved - pub fn set_squad_id(&mut self, v: i32) { - self.squad_id = ::std::option::Option::Some(v); - } - - // optional string alias = 3; - - pub fn alias(&self) -> &str { - match self.alias.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_alias(&mut self) { - self.alias = ::std::option::Option::None; - } - - pub fn has_alias(&self) -> bool { - self.alias.is_some() - } - - // Param is passed by value, moved - pub fn set_alias(&mut self, v: ::std::string::String) { - self.alias = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_alias(&mut self) -> &mut ::std::string::String { - if self.alias.is_none() { - self.alias = ::std::option::Option::Some(::std::string::String::new()); - } - self.alias.as_mut().unwrap() - } - - // Take field - pub fn take_alias(&mut self) -> ::std::string::String { - self.alias.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "squad_id", - |m: &BasicSquadInfo| { &m.squad_id }, - |m: &mut BasicSquadInfo| { &mut m.squad_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, NameInfo>( - "name", - |m: &BasicSquadInfo| { &m.name }, - |m: &mut BasicSquadInfo| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "alias", - |m: &BasicSquadInfo| { &m.alias }, - |m: &mut BasicSquadInfo| { &mut m.alias }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "members", - |m: &BasicSquadInfo| { &m.members }, - |m: &mut BasicSquadInfo| { &mut m.members }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BasicSquadInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BasicSquadInfo { - const NAME: &'static str = "BasicSquadInfo"; - - fn is_initialized(&self) -> bool { - if self.squad_id.is_none() { - return false; - } - for v in &self.name { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.squad_id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.name)?; - }, - 26 => { - self.alias = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - is.read_repeated_packed_sint32_into(&mut self.members)?; - }, - 32 => { - self.members.push(is.read_sint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.squad_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.name.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.alias.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - for value in &self.members { - my_size += ::protobuf::rt::sint32_size(4, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.squad_id { - os.write_int32(1, v)?; - } - if let Some(v) = self.name.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.alias.as_ref() { - os.write_string(3, v)?; - } - for v in &self.members { - os.write_sint32(4, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BasicSquadInfo { - BasicSquadInfo::new() - } - - fn clear(&mut self) { - self.squad_id = ::std::option::Option::None; - self.name.clear(); - self.alias = ::std::option::Option::None; - self.members.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BasicSquadInfo { - static instance: BasicSquadInfo = BasicSquadInfo { - squad_id: ::std::option::Option::None, - name: ::protobuf::MessageField::none(), - alias: ::std::option::Option::None, - members: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BasicSquadInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BasicSquadInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BasicSquadInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BasicSquadInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.UnitLaborState) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitLaborState { - // message fields - // @@protoc_insertion_point(field:dfproto.UnitLaborState.unit_id) - pub unit_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitLaborState.labor) - pub labor: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.UnitLaborState.value) - pub value: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.UnitLaborState.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitLaborState { - fn default() -> &'a UnitLaborState { - ::default_instance() - } -} - -impl UnitLaborState { - pub fn new() -> UnitLaborState { - ::std::default::Default::default() - } - - // required int32 unit_id = 1; - - pub fn unit_id(&self) -> i32 { - self.unit_id.unwrap_or(0) - } - - pub fn clear_unit_id(&mut self) { - self.unit_id = ::std::option::Option::None; - } - - pub fn has_unit_id(&self) -> bool { - self.unit_id.is_some() - } - - // Param is passed by value, moved - pub fn set_unit_id(&mut self, v: i32) { - self.unit_id = ::std::option::Option::Some(v); - } - - // required int32 labor = 2; - - pub fn labor(&self) -> i32 { - self.labor.unwrap_or(0) - } - - pub fn clear_labor(&mut self) { - self.labor = ::std::option::Option::None; - } - - pub fn has_labor(&self) -> bool { - self.labor.is_some() - } - - // Param is passed by value, moved - pub fn set_labor(&mut self, v: i32) { - self.labor = ::std::option::Option::Some(v); - } - - // required bool value = 3; - - pub fn value(&self) -> bool { - self.value.unwrap_or(false) - } - - pub fn clear_value(&mut self) { - self.value = ::std::option::Option::None; - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: bool) { - self.value = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unit_id", - |m: &UnitLaborState| { &m.unit_id }, - |m: &mut UnitLaborState| { &mut m.unit_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "labor", - |m: &UnitLaborState| { &m.labor }, - |m: &mut UnitLaborState| { &mut m.labor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "value", - |m: &UnitLaborState| { &m.value }, - |m: &mut UnitLaborState| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitLaborState", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitLaborState { - const NAME: &'static str = "UnitLaborState"; - - fn is_initialized(&self) -> bool { - if self.unit_id.is_none() { - return false; - } - if self.labor.is_none() { - return false; - } - if self.value.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.unit_id = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.labor = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.value = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.unit_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.labor { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.value { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.unit_id { - os.write_int32(1, v)?; - } - if let Some(v) = self.labor { - os.write_int32(2, v)?; - } - if let Some(v) = self.value { - os.write_bool(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitLaborState { - UnitLaborState::new() - } - - fn clear(&mut self) { - self.unit_id = ::std::option::Option::None; - self.labor = ::std::option::Option::None; - self.value = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitLaborState { - static instance: UnitLaborState = UnitLaborState { - unit_id: ::std::option::Option::None, - labor: ::std::option::Option::None, - value: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitLaborState { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitLaborState").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitLaborState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitLaborState { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0bBasic.proto\x12\x07dfproto\"X\n\x0cEnumItemName\x12\x14\n\x05value\ - \x18\x01\x20\x02(\x05R\x05value\x12\x12\n\x04name\x18\x02\x20\x01(\tR\ - \x04name\x12\x1e\n\x08bit_size\x18\x03\x20\x01(\x05:\x011R\x07bitSizeB\0\ - \";\n\x0fBasicMaterialId\x12\x12\n\x04type\x18\x01\x20\x02(\x05R\x04type\ - \x12\x14\n\x05index\x18\x02\x20\x02(\x11R\x05index\"\xdc\x04\n\x11BasicM\ - aterialInfo\x12\x12\n\x04type\x18\x01\x20\x02(\x05R\x04type\x12\x14\n\ - \x05index\x18\x02\x20\x02(\x11R\x05index\x12\x14\n\x05token\x18\x03\x20\ - \x02(\tR\x05token\x12\x14\n\x05flags\x18\x04\x20\x03(\x05R\x05flags\x12\ - \x1e\n\x07subtype\x18\x05\x20\x01(\x05:\x02-1R\x07subtypeB\0\x12%\n\x0bc\ - reature_id\x18\x06\x20\x01(\x05:\x02-1R\ncreatureIdB\0\x12\x1f\n\x08plan\ - t_id\x18\x07\x20\x01(\x05:\x02-1R\x07plantIdB\0\x12#\n\nhistfig_id\x18\ - \x08\x20\x01(\x05:\x02-1R\thistfigIdB\0\x12#\n\x0bname_prefix\x18\t\x20\ - \x01(\t:\0R\nnamePrefixB\0\x12\x1f\n\x0bstate_color\x18\n\x20\x03(\x07R\ - \nstateColor\x12\x1d\n\nstate_name\x18\x0b\x20\x03(\tR\tstateName\x12\ - \x1b\n\tstate_adj\x18\x0c\x20\x03(\tR\x08stateAdj\x12%\n\x0ereaction_cla\ - ss\x18\r\x20\x03(\tR\rreactionClass\x12M\n\x10reaction_product\x18\x0e\ - \x20\x03(\x0b2\".dfproto.BasicMaterialInfo.ProductR\x0freactionProduct\ - \x12'\n\x0finorganic_flags\x18\x0f\x20\x03(\x05R\x0einorganicFlags\x1aC\ - \n\x07Product\x12\x0e\n\x02id\x18\x01\x20\x02(\tR\x02id\x12\x12\n\x04typ\ - e\x18\x02\x20\x02(\x05R\x04type\x12\x14\n\x05index\x18\x03\x20\x02(\x11R\ - \x05index\"\x99\x02\n\x15BasicMaterialInfoMask\x12@\n\x06states\x18\x01\ - \x20\x03(\x0e2(.dfproto.BasicMaterialInfoMask.StateTypeR\x06states\x12)\ - \n\x0btemperature\x18\x04\x20\x01(\x05:\x0510015R\x0btemperatureB\0\x12\ - \x1d\n\x05flags\x18\x02\x20\x01(\x08:\x05falseR\x05flagsB\0\x12#\n\x08re\ - action\x18\x03\x20\x01(\x08:\x05falseR\x08reactionB\0\"O\n\tStateType\ - \x12\t\n\x05Solid\x10\0\x12\n\n\x06Liquid\x10\x01\x12\x07\n\x03Gas\x10\ - \x02\x12\n\n\x06Powder\x10\x03\x12\t\n\x05Paste\x10\x04\x12\x0b\n\x07Pre\ - ssed\x10\x05\"\xb7\x01\n\x0cJobSkillAttr\x12\x0e\n\x02id\x18\x01\x20\x02\ - (\x05R\x02id\x12\x10\n\x03key\x18\x02\x20\x02(\tR\x03key\x12\x18\n\x07ca\ - ption\x18\x03\x20\x01(\tR\x07caption\x12!\n\x0ccaption_noun\x18\x04\x20\ - \x01(\tR\x0bcaptionNoun\x12\x1e\n\nprofession\x18\x05\x20\x01(\x05R\npro\ - fession\x12\x14\n\x05labor\x18\x06\x20\x01(\x05R\x05labor\x12\x12\n\x04t\ - ype\x18\x07\x20\x01(\tR\x04type\"\xaa\x01\n\x0eProfessionAttr\x12\x0e\n\ - \x02id\x18\x01\x20\x02(\x05R\x02id\x12\x10\n\x03key\x18\x02\x20\x02(\tR\ - \x03key\x12\x18\n\x07caption\x18\x03\x20\x01(\tR\x07caption\x12\x1a\n\ - \x08military\x18\x04\x20\x01(\x08R\x08military\x12(\n\x10can_assign_labo\ - r\x18\x05\x20\x01(\x08R\x0ecanAssignLabor\x12\x16\n\x06parent\x18\x06\ - \x20\x01(\x05R\x06parent\"K\n\rUnitLaborAttr\x12\x0e\n\x02id\x18\x01\x20\ - \x02(\x05R\x02id\x12\x10\n\x03key\x18\x02\x20\x02(\tR\x03key\x12\x18\n\ - \x07caption\x18\x03\x20\x01(\tR\x07caption\"\xac\x01\n\x08NameInfo\x12\ - \x1d\n\nfirst_name\x18\x01\x20\x01(\tR\tfirstName\x12\x1a\n\x08nickname\ - \x18\x02\x20\x01(\tR\x08nickname\x12%\n\x0blanguage_id\x18\x03\x20\x01(\ - \x05:\x02-1R\nlanguageIdB\0\x12\x1b\n\tlast_name\x18\x04\x20\x01(\tR\x08\ - lastName\x12!\n\x0cenglish_name\x18\x05\x20\x01(\tR\x0benglishName\"Z\n\ - \nNameTriple\x12\x16\n\x06normal\x18\x01\x20\x02(\tR\x06normal\x12\x16\n\ - \x06plural\x18\x02\x20\x01(\tR\x06plural\x12\x1c\n\tadjective\x18\x03\ - \x20\x01(\tR\tadjective\"\xac\x01\n\rUnitCurseInfo\x12\x1b\n\tadd_tags1\ - \x18\x01\x20\x02(\x07R\x08addTags1\x12\x1b\n\trem_tags1\x18\x02\x20\x02(\ - \x07R\x08remTags1\x12\x1b\n\tadd_tags2\x18\x03\x20\x02(\x07R\x08addTags2\ - \x12\x1b\n\trem_tags2\x18\x04\x20\x02(\x07R\x08remTags2\x12'\n\x04name\ - \x18\x05\x20\x01(\x0b2\x13.dfproto.NameTripleR\x04name\"Q\n\tSkillInfo\ - \x12\x0e\n\x02id\x18\x01\x20\x02(\x05R\x02id\x12\x14\n\x05level\x18\x02\ - \x20\x02(\x05R\x05level\x12\x1e\n\nexperience\x18\x03\x20\x02(\x05R\nexp\ - erience\"5\n\rUnitMiscTrait\x12\x0e\n\x02id\x18\x01\x20\x02(\x05R\x02id\ - \x12\x14\n\x05value\x18\x02\x20\x02(\x05R\x05value\"\x88\x06\n\rBasicUni\ - tInfo\x12\x17\n\x07unit_id\x18\x01\x20\x02(\x05R\x06unitId\x12\x13\n\x05\ - pos_x\x18\r\x20\x02(\x05R\x04posX\x12\x13\n\x05pos_y\x18\x0e\x20\x02(\ - \x05R\x04posY\x12\x13\n\x05pos_z\x18\x0f\x20\x02(\x05R\x04posZ\x12%\n\ - \x04name\x18\x02\x20\x01(\x0b2\x11.dfproto.NameInfoR\x04name\x12\x16\n\ - \x06flags1\x18\x03\x20\x02(\x07R\x06flags1\x12\x16\n\x06flags2\x18\x04\ - \x20\x02(\x07R\x06flags2\x12\x16\n\x06flags3\x18\x05\x20\x02(\x07R\x06fl\ - ags3\x12\x12\n\x04race\x18\x06\x20\x02(\x05R\x04race\x12\x14\n\x05caste\ - \x18\x07\x20\x02(\x05R\x05caste\x12\x1c\n\x06gender\x18\x08\x20\x01(\x05\ - :\x02-1R\x06genderB\0\x12\x1b\n\x06civ_id\x18\t\x20\x01(\x05:\x02-1R\x05\ - civIdB\0\x12#\n\nhistfig_id\x18\n\x20\x01(\x05:\x02-1R\thistfigIdB\0\x12\ - \x1f\n\x08death_id\x18\x11\x20\x01(\x05:\x02-1R\x07deathIdB\0\x12\x1f\n\ - \x0bdeath_flags\x18\x12\x20\x01(\rR\ndeathFlags\x12\x1f\n\x08squad_id\ - \x18\x13\x20\x01(\x05:\x02-1R\x07squadIdB\0\x12+\n\x0esquad_position\x18\ - \x14\x20\x01(\x05:\x02-1R\rsquadPositionB\0\x12$\n\nprofession\x18\x16\ - \x20\x01(\x05:\x02-1R\nprofessionB\0\x12+\n\x11custom_profession\x18\x17\ - \x20\x01(\tR\x10customProfession\x12\x16\n\x06labors\x18\x0b\x20\x03(\ - \x05R\x06labors\x12*\n\x06skills\x18\x0c\x20\x03(\x0b2\x12.dfproto.Skill\ - InfoR\x06skills\x127\n\x0bmisc_traits\x18\x18\x20\x03(\x0b2\x16.dfproto.\ - UnitMiscTraitR\nmiscTraits\x12,\n\x05curse\x18\x10\x20\x01(\x0b2\x16.dfp\ - roto.UnitCurseInfoR\x05curse\x12\x18\n\x07burrows\x18\x15\x20\x03(\x05R\ - \x07burrows\"\xa8\x01\n\x11BasicUnitInfoMask\x12\x1f\n\x06labors\x18\x01\ - \x20\x01(\x08:\x05falseR\x06laborsB\0\x12\x1f\n\x06skills\x18\x02\x20\ - \x01(\x08:\x05falseR\x06skillsB\0\x12'\n\nprofession\x18\x03\x20\x01(\ - \x08:\x05falseR\nprofessionB\0\x12(\n\x0bmisc_traits\x18\x04\x20\x01(\ - \x08:\x05falseR\nmiscTraitsB\0\"\x82\x01\n\x0eBasicSquadInfo\x12\x19\n\ - \x08squad_id\x18\x01\x20\x02(\x05R\x07squadId\x12%\n\x04name\x18\x02\x20\ - \x01(\x0b2\x11.dfproto.NameInfoR\x04name\x12\x14\n\x05alias\x18\x03\x20\ - \x01(\tR\x05alias\x12\x18\n\x07members\x18\x04\x20\x03(\x11R\x07members\ - \"U\n\x0eUnitLaborState\x12\x17\n\x07unit_id\x18\x01\x20\x02(\x05R\x06un\ - itId\x12\x14\n\x05labor\x18\x02\x20\x02(\x05R\x05labor\x12\x14\n\x05valu\ - e\x18\x03\x20\x02(\x08R\x05valueB\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(17); - messages.push(EnumItemName::generated_message_descriptor_data()); - messages.push(BasicMaterialId::generated_message_descriptor_data()); - messages.push(BasicMaterialInfo::generated_message_descriptor_data()); - messages.push(BasicMaterialInfoMask::generated_message_descriptor_data()); - messages.push(JobSkillAttr::generated_message_descriptor_data()); - messages.push(ProfessionAttr::generated_message_descriptor_data()); - messages.push(UnitLaborAttr::generated_message_descriptor_data()); - messages.push(NameInfo::generated_message_descriptor_data()); - messages.push(NameTriple::generated_message_descriptor_data()); - messages.push(UnitCurseInfo::generated_message_descriptor_data()); - messages.push(SkillInfo::generated_message_descriptor_data()); - messages.push(UnitMiscTrait::generated_message_descriptor_data()); - messages.push(BasicUnitInfo::generated_message_descriptor_data()); - messages.push(BasicUnitInfoMask::generated_message_descriptor_data()); - messages.push(BasicSquadInfo::generated_message_descriptor_data()); - messages.push(UnitLaborState::generated_message_descriptor_data()); - messages.push(basic_material_info::Product::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(1); - enums.push(basic_material_info_mask::StateType::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/BasicApi.rs b/dfhack-proto/src/generated/messages/BasicApi.rs deleted file mode 100644 index 90c6fd9..0000000 --- a/dfhack-proto/src/generated/messages/BasicApi.rs +++ /dev/null @@ -1,2486 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `BasicApi.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:dfproto.GetWorldInfoOut) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct GetWorldInfoOut { - // message fields - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.mode) - pub mode: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.save_dir) - pub save_dir: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.world_name) - pub world_name: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.civ_id) - pub civ_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.site_id) - pub site_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.group_id) - pub group_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.race_id) - pub race_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.player_unit_id) - pub player_unit_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.player_histfig_id) - pub player_histfig_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.GetWorldInfoOut.companion_histfig_ids) - pub companion_histfig_ids: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.GetWorldInfoOut.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetWorldInfoOut { - fn default() -> &'a GetWorldInfoOut { - ::default_instance() - } -} - -impl GetWorldInfoOut { - pub fn new() -> GetWorldInfoOut { - ::std::default::Default::default() - } - - // required .dfproto.GetWorldInfoOut.Mode mode = 1; - - pub fn mode(&self) -> get_world_info_out::Mode { - match self.mode { - Some(e) => e.enum_value_or(get_world_info_out::Mode::MODE_DWARF), - None => get_world_info_out::Mode::MODE_DWARF, - } - } - - pub fn clear_mode(&mut self) { - self.mode = ::std::option::Option::None; - } - - pub fn has_mode(&self) -> bool { - self.mode.is_some() - } - - // Param is passed by value, moved - pub fn set_mode(&mut self, v: get_world_info_out::Mode) { - self.mode = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // required string save_dir = 2; - - pub fn save_dir(&self) -> &str { - match self.save_dir.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_save_dir(&mut self) { - self.save_dir = ::std::option::Option::None; - } - - pub fn has_save_dir(&self) -> bool { - self.save_dir.is_some() - } - - // Param is passed by value, moved - pub fn set_save_dir(&mut self, v: ::std::string::String) { - self.save_dir = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_save_dir(&mut self) -> &mut ::std::string::String { - if self.save_dir.is_none() { - self.save_dir = ::std::option::Option::Some(::std::string::String::new()); - } - self.save_dir.as_mut().unwrap() - } - - // Take field - pub fn take_save_dir(&mut self) -> ::std::string::String { - self.save_dir.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 civ_id = 4; - - pub fn civ_id(&self) -> i32 { - self.civ_id.unwrap_or(0) - } - - pub fn clear_civ_id(&mut self) { - self.civ_id = ::std::option::Option::None; - } - - pub fn has_civ_id(&self) -> bool { - self.civ_id.is_some() - } - - // Param is passed by value, moved - pub fn set_civ_id(&mut self, v: i32) { - self.civ_id = ::std::option::Option::Some(v); - } - - // optional int32 site_id = 5; - - pub fn site_id(&self) -> i32 { - self.site_id.unwrap_or(0) - } - - pub fn clear_site_id(&mut self) { - self.site_id = ::std::option::Option::None; - } - - pub fn has_site_id(&self) -> bool { - self.site_id.is_some() - } - - // Param is passed by value, moved - pub fn set_site_id(&mut self, v: i32) { - self.site_id = ::std::option::Option::Some(v); - } - - // optional int32 group_id = 6; - - pub fn group_id(&self) -> i32 { - self.group_id.unwrap_or(0) - } - - pub fn clear_group_id(&mut self) { - self.group_id = ::std::option::Option::None; - } - - pub fn has_group_id(&self) -> bool { - self.group_id.is_some() - } - - // Param is passed by value, moved - pub fn set_group_id(&mut self, v: i32) { - self.group_id = ::std::option::Option::Some(v); - } - - // optional int32 race_id = 7; - - pub fn race_id(&self) -> i32 { - self.race_id.unwrap_or(0) - } - - pub fn clear_race_id(&mut self) { - self.race_id = ::std::option::Option::None; - } - - pub fn has_race_id(&self) -> bool { - self.race_id.is_some() - } - - // Param is passed by value, moved - pub fn set_race_id(&mut self, v: i32) { - self.race_id = ::std::option::Option::Some(v); - } - - // optional int32 player_unit_id = 8; - - pub fn player_unit_id(&self) -> i32 { - self.player_unit_id.unwrap_or(0) - } - - pub fn clear_player_unit_id(&mut self) { - self.player_unit_id = ::std::option::Option::None; - } - - pub fn has_player_unit_id(&self) -> bool { - self.player_unit_id.is_some() - } - - // Param is passed by value, moved - pub fn set_player_unit_id(&mut self, v: i32) { - self.player_unit_id = ::std::option::Option::Some(v); - } - - // optional int32 player_histfig_id = 9; - - pub fn player_histfig_id(&self) -> i32 { - self.player_histfig_id.unwrap_or(0) - } - - pub fn clear_player_histfig_id(&mut self) { - self.player_histfig_id = ::std::option::Option::None; - } - - pub fn has_player_histfig_id(&self) -> bool { - self.player_histfig_id.is_some() - } - - // Param is passed by value, moved - pub fn set_player_histfig_id(&mut self, v: i32) { - self.player_histfig_id = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(10); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mode", - |m: &GetWorldInfoOut| { &m.mode }, - |m: &mut GetWorldInfoOut| { &mut m.mode }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "save_dir", - |m: &GetWorldInfoOut| { &m.save_dir }, - |m: &mut GetWorldInfoOut| { &mut m.save_dir }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::Basic::NameInfo>( - "world_name", - |m: &GetWorldInfoOut| { &m.world_name }, - |m: &mut GetWorldInfoOut| { &mut m.world_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "civ_id", - |m: &GetWorldInfoOut| { &m.civ_id }, - |m: &mut GetWorldInfoOut| { &mut m.civ_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "site_id", - |m: &GetWorldInfoOut| { &m.site_id }, - |m: &mut GetWorldInfoOut| { &mut m.site_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "group_id", - |m: &GetWorldInfoOut| { &m.group_id }, - |m: &mut GetWorldInfoOut| { &mut m.group_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "race_id", - |m: &GetWorldInfoOut| { &m.race_id }, - |m: &mut GetWorldInfoOut| { &mut m.race_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "player_unit_id", - |m: &GetWorldInfoOut| { &m.player_unit_id }, - |m: &mut GetWorldInfoOut| { &mut m.player_unit_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "player_histfig_id", - |m: &GetWorldInfoOut| { &m.player_histfig_id }, - |m: &mut GetWorldInfoOut| { &mut m.player_histfig_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "companion_histfig_ids", - |m: &GetWorldInfoOut| { &m.companion_histfig_ids }, - |m: &mut GetWorldInfoOut| { &mut m.companion_histfig_ids }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "GetWorldInfoOut", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for GetWorldInfoOut { - const NAME: &'static str = "GetWorldInfoOut"; - - fn is_initialized(&self) -> bool { - if self.mode.is_none() { - return false; - } - if self.save_dir.is_none() { - return false; - } - for v in &self.world_name { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.mode = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - self.save_dir = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.world_name)?; - }, - 32 => { - self.civ_id = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.site_id = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.group_id = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.race_id = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.player_unit_id = ::std::option::Option::Some(is.read_int32()?); - }, - 72 => { - self.player_histfig_id = ::std::option::Option::Some(is.read_int32()?); - }, - 82 => { - is.read_repeated_packed_int32_into(&mut self.companion_histfig_ids)?; - }, - 80 => { - self.companion_histfig_ids.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mode { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - if let Some(v) = self.save_dir.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.world_name.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.civ_id { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.site_id { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.group_id { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.race_id { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.player_unit_id { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.player_histfig_id { - my_size += ::protobuf::rt::int32_size(9, v); - } - for value in &self.companion_histfig_ids { - my_size += ::protobuf::rt::int32_size(10, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mode { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.save_dir.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.world_name.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.civ_id { - os.write_int32(4, v)?; - } - if let Some(v) = self.site_id { - os.write_int32(5, v)?; - } - if let Some(v) = self.group_id { - os.write_int32(6, v)?; - } - if let Some(v) = self.race_id { - os.write_int32(7, v)?; - } - if let Some(v) = self.player_unit_id { - os.write_int32(8, v)?; - } - if let Some(v) = self.player_histfig_id { - os.write_int32(9, v)?; - } - for v in &self.companion_histfig_ids { - os.write_int32(10, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetWorldInfoOut { - GetWorldInfoOut::new() - } - - fn clear(&mut self) { - self.mode = ::std::option::Option::None; - self.save_dir = ::std::option::Option::None; - self.world_name.clear(); - self.civ_id = ::std::option::Option::None; - self.site_id = ::std::option::Option::None; - self.group_id = ::std::option::Option::None; - self.race_id = ::std::option::Option::None; - self.player_unit_id = ::std::option::Option::None; - self.player_histfig_id = ::std::option::Option::None; - self.companion_histfig_ids.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetWorldInfoOut { - static instance: GetWorldInfoOut = GetWorldInfoOut { - mode: ::std::option::Option::None, - save_dir: ::std::option::Option::None, - world_name: ::protobuf::MessageField::none(), - civ_id: ::std::option::Option::None, - site_id: ::std::option::Option::None, - group_id: ::std::option::Option::None, - race_id: ::std::option::Option::None, - player_unit_id: ::std::option::Option::None, - player_histfig_id: ::std::option::Option::None, - companion_histfig_ids: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for GetWorldInfoOut { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("GetWorldInfoOut").unwrap()).clone() - } -} - -impl ::std::fmt::Display for GetWorldInfoOut { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for GetWorldInfoOut { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `GetWorldInfoOut` -pub mod get_world_info_out { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:dfproto.GetWorldInfoOut.Mode) - pub enum Mode { - // @@protoc_insertion_point(enum_value:dfproto.GetWorldInfoOut.Mode.MODE_DWARF) - MODE_DWARF = 1, - // @@protoc_insertion_point(enum_value:dfproto.GetWorldInfoOut.Mode.MODE_ADVENTURE) - MODE_ADVENTURE = 2, - // @@protoc_insertion_point(enum_value:dfproto.GetWorldInfoOut.Mode.MODE_LEGENDS) - MODE_LEGENDS = 3, - } - - impl ::protobuf::Enum for Mode { - const NAME: &'static str = "Mode"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 1 => ::std::option::Option::Some(Mode::MODE_DWARF), - 2 => ::std::option::Option::Some(Mode::MODE_ADVENTURE), - 3 => ::std::option::Option::Some(Mode::MODE_LEGENDS), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "MODE_DWARF" => ::std::option::Option::Some(Mode::MODE_DWARF), - "MODE_ADVENTURE" => ::std::option::Option::Some(Mode::MODE_ADVENTURE), - "MODE_LEGENDS" => ::std::option::Option::Some(Mode::MODE_LEGENDS), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [Mode] = &[ - Mode::MODE_DWARF, - Mode::MODE_ADVENTURE, - Mode::MODE_LEGENDS, - ]; - } - - impl ::protobuf::EnumFull for Mode { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("GetWorldInfoOut.Mode").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - Mode::MODE_DWARF => 0, - Mode::MODE_ADVENTURE => 1, - Mode::MODE_LEGENDS => 2, - }; - Self::enum_descriptor().value_by_index(index) - } - } - - // Note, `Default` is implemented although default value is not 0 - impl ::std::default::Default for Mode { - fn default() -> Self { - Mode::MODE_DWARF - } - } - - impl Mode { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("GetWorldInfoOut.Mode") - } - } -} - -// @@protoc_insertion_point(message:dfproto.ListEnumsOut) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListEnumsOut { - // message fields - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.material_flags) - pub material_flags: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.inorganic_flags) - pub inorganic_flags: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.unit_flags1) - pub unit_flags1: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.unit_flags2) - pub unit_flags2: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.unit_flags3) - pub unit_flags3: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.unit_labor) - pub unit_labor: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.job_skill) - pub job_skill: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.cie_add_tag_mask1) - pub cie_add_tag_mask1: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.cie_add_tag_mask2) - pub cie_add_tag_mask2: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.death_info_flags) - pub death_info_flags: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListEnumsOut.profession) - pub profession: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListEnumsOut.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListEnumsOut { - fn default() -> &'a ListEnumsOut { - ::default_instance() - } -} - -impl ListEnumsOut { - pub fn new() -> ListEnumsOut { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(11); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "material_flags", - |m: &ListEnumsOut| { &m.material_flags }, - |m: &mut ListEnumsOut| { &mut m.material_flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "inorganic_flags", - |m: &ListEnumsOut| { &m.inorganic_flags }, - |m: &mut ListEnumsOut| { &mut m.inorganic_flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "unit_flags1", - |m: &ListEnumsOut| { &m.unit_flags1 }, - |m: &mut ListEnumsOut| { &mut m.unit_flags1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "unit_flags2", - |m: &ListEnumsOut| { &m.unit_flags2 }, - |m: &mut ListEnumsOut| { &mut m.unit_flags2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "unit_flags3", - |m: &ListEnumsOut| { &m.unit_flags3 }, - |m: &mut ListEnumsOut| { &mut m.unit_flags3 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "unit_labor", - |m: &ListEnumsOut| { &m.unit_labor }, - |m: &mut ListEnumsOut| { &mut m.unit_labor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "job_skill", - |m: &ListEnumsOut| { &m.job_skill }, - |m: &mut ListEnumsOut| { &mut m.job_skill }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cie_add_tag_mask1", - |m: &ListEnumsOut| { &m.cie_add_tag_mask1 }, - |m: &mut ListEnumsOut| { &mut m.cie_add_tag_mask1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cie_add_tag_mask2", - |m: &ListEnumsOut| { &m.cie_add_tag_mask2 }, - |m: &mut ListEnumsOut| { &mut m.cie_add_tag_mask2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "death_info_flags", - |m: &ListEnumsOut| { &m.death_info_flags }, - |m: &mut ListEnumsOut| { &mut m.death_info_flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "profession", - |m: &ListEnumsOut| { &m.profession }, - |m: &mut ListEnumsOut| { &mut m.profession }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListEnumsOut", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListEnumsOut { - const NAME: &'static str = "ListEnumsOut"; - - fn is_initialized(&self) -> bool { - for v in &self.material_flags { - if !v.is_initialized() { - return false; - } - }; - for v in &self.inorganic_flags { - if !v.is_initialized() { - return false; - } - }; - for v in &self.unit_flags1 { - if !v.is_initialized() { - return false; - } - }; - for v in &self.unit_flags2 { - if !v.is_initialized() { - return false; - } - }; - for v in &self.unit_flags3 { - if !v.is_initialized() { - return false; - } - }; - for v in &self.unit_labor { - if !v.is_initialized() { - return false; - } - }; - for v in &self.job_skill { - if !v.is_initialized() { - return false; - } - }; - for v in &self.cie_add_tag_mask1 { - if !v.is_initialized() { - return false; - } - }; - for v in &self.cie_add_tag_mask2 { - if !v.is_initialized() { - return false; - } - }; - for v in &self.death_info_flags { - if !v.is_initialized() { - return false; - } - }; - for v in &self.profession { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.material_flags.push(is.read_message()?); - }, - 18 => { - self.inorganic_flags.push(is.read_message()?); - }, - 26 => { - self.unit_flags1.push(is.read_message()?); - }, - 34 => { - self.unit_flags2.push(is.read_message()?); - }, - 42 => { - self.unit_flags3.push(is.read_message()?); - }, - 50 => { - self.unit_labor.push(is.read_message()?); - }, - 58 => { - self.job_skill.push(is.read_message()?); - }, - 66 => { - self.cie_add_tag_mask1.push(is.read_message()?); - }, - 74 => { - self.cie_add_tag_mask2.push(is.read_message()?); - }, - 82 => { - self.death_info_flags.push(is.read_message()?); - }, - 90 => { - self.profession.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.material_flags { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.inorganic_flags { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.unit_flags1 { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.unit_flags2 { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.unit_flags3 { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.unit_labor { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.job_skill { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.cie_add_tag_mask1 { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.cie_add_tag_mask2 { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.death_info_flags { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.profession { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.material_flags { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.inorganic_flags { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - for v in &self.unit_flags1 { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - for v in &self.unit_flags2 { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }; - for v in &self.unit_flags3 { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - for v in &self.unit_labor { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }; - for v in &self.job_skill { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - for v in &self.cie_add_tag_mask1 { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - }; - for v in &self.cie_add_tag_mask2 { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - }; - for v in &self.death_info_flags { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - }; - for v in &self.profession { - ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListEnumsOut { - ListEnumsOut::new() - } - - fn clear(&mut self) { - self.material_flags.clear(); - self.inorganic_flags.clear(); - self.unit_flags1.clear(); - self.unit_flags2.clear(); - self.unit_flags3.clear(); - self.unit_labor.clear(); - self.job_skill.clear(); - self.cie_add_tag_mask1.clear(); - self.cie_add_tag_mask2.clear(); - self.death_info_flags.clear(); - self.profession.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListEnumsOut { - static instance: ListEnumsOut = ListEnumsOut { - material_flags: ::std::vec::Vec::new(), - inorganic_flags: ::std::vec::Vec::new(), - unit_flags1: ::std::vec::Vec::new(), - unit_flags2: ::std::vec::Vec::new(), - unit_flags3: ::std::vec::Vec::new(), - unit_labor: ::std::vec::Vec::new(), - job_skill: ::std::vec::Vec::new(), - cie_add_tag_mask1: ::std::vec::Vec::new(), - cie_add_tag_mask2: ::std::vec::Vec::new(), - death_info_flags: ::std::vec::Vec::new(), - profession: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListEnumsOut { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListEnumsOut").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListEnumsOut { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListEnumsOut { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListJobSkillsOut) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListJobSkillsOut { - // message fields - // @@protoc_insertion_point(field:dfproto.ListJobSkillsOut.skill) - pub skill: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListJobSkillsOut.profession) - pub profession: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListJobSkillsOut.labor) - pub labor: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListJobSkillsOut.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListJobSkillsOut { - fn default() -> &'a ListJobSkillsOut { - ::default_instance() - } -} - -impl ListJobSkillsOut { - pub fn new() -> ListJobSkillsOut { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "skill", - |m: &ListJobSkillsOut| { &m.skill }, - |m: &mut ListJobSkillsOut| { &mut m.skill }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "profession", - |m: &ListJobSkillsOut| { &m.profession }, - |m: &mut ListJobSkillsOut| { &mut m.profession }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "labor", - |m: &ListJobSkillsOut| { &m.labor }, - |m: &mut ListJobSkillsOut| { &mut m.labor }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListJobSkillsOut", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListJobSkillsOut { - const NAME: &'static str = "ListJobSkillsOut"; - - fn is_initialized(&self) -> bool { - for v in &self.skill { - if !v.is_initialized() { - return false; - } - }; - for v in &self.profession { - if !v.is_initialized() { - return false; - } - }; - for v in &self.labor { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.skill.push(is.read_message()?); - }, - 18 => { - self.profession.push(is.read_message()?); - }, - 26 => { - self.labor.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.skill { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.profession { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.labor { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.skill { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.profession { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - for v in &self.labor { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListJobSkillsOut { - ListJobSkillsOut::new() - } - - fn clear(&mut self) { - self.skill.clear(); - self.profession.clear(); - self.labor.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListJobSkillsOut { - static instance: ListJobSkillsOut = ListJobSkillsOut { - skill: ::std::vec::Vec::new(), - profession: ::std::vec::Vec::new(), - labor: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListJobSkillsOut { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListJobSkillsOut").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListJobSkillsOut { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListJobSkillsOut { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListMaterialsIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListMaterialsIn { - // message fields - // @@protoc_insertion_point(field:dfproto.ListMaterialsIn.mask) - pub mask: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfproto.ListMaterialsIn.id_list) - pub id_list: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListMaterialsIn.builtin) - pub builtin: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListMaterialsIn.inorganic) - pub inorganic: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListMaterialsIn.creatures) - pub creatures: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListMaterialsIn.plants) - pub plants: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListMaterialsIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListMaterialsIn { - fn default() -> &'a ListMaterialsIn { - ::default_instance() - } -} - -impl ListMaterialsIn { - pub fn new() -> ListMaterialsIn { - ::std::default::Default::default() - } - - // optional bool builtin = 3; - - pub fn builtin(&self) -> bool { - self.builtin.unwrap_or(false) - } - - pub fn clear_builtin(&mut self) { - self.builtin = ::std::option::Option::None; - } - - pub fn has_builtin(&self) -> bool { - self.builtin.is_some() - } - - // Param is passed by value, moved - pub fn set_builtin(&mut self, v: bool) { - self.builtin = ::std::option::Option::Some(v); - } - - // optional bool inorganic = 4; - - pub fn inorganic(&self) -> bool { - self.inorganic.unwrap_or(false) - } - - pub fn clear_inorganic(&mut self) { - self.inorganic = ::std::option::Option::None; - } - - pub fn has_inorganic(&self) -> bool { - self.inorganic.is_some() - } - - // Param is passed by value, moved - pub fn set_inorganic(&mut self, v: bool) { - self.inorganic = ::std::option::Option::Some(v); - } - - // optional bool creatures = 5; - - pub fn creatures(&self) -> bool { - self.creatures.unwrap_or(false) - } - - pub fn clear_creatures(&mut self) { - self.creatures = ::std::option::Option::None; - } - - pub fn has_creatures(&self) -> bool { - self.creatures.is_some() - } - - // Param is passed by value, moved - pub fn set_creatures(&mut self, v: bool) { - self.creatures = ::std::option::Option::Some(v); - } - - // optional bool plants = 6; - - pub fn plants(&self) -> bool { - self.plants.unwrap_or(false) - } - - pub fn clear_plants(&mut self) { - self.plants = ::std::option::Option::None; - } - - pub fn has_plants(&self) -> bool { - self.plants.is_some() - } - - // Param is passed by value, moved - pub fn set_plants(&mut self, v: bool) { - self.plants = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::Basic::BasicMaterialInfoMask>( - "mask", - |m: &ListMaterialsIn| { &m.mask }, - |m: &mut ListMaterialsIn| { &mut m.mask }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "id_list", - |m: &ListMaterialsIn| { &m.id_list }, - |m: &mut ListMaterialsIn| { &mut m.id_list }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "builtin", - |m: &ListMaterialsIn| { &m.builtin }, - |m: &mut ListMaterialsIn| { &mut m.builtin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "inorganic", - |m: &ListMaterialsIn| { &m.inorganic }, - |m: &mut ListMaterialsIn| { &mut m.inorganic }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "creatures", - |m: &ListMaterialsIn| { &m.creatures }, - |m: &mut ListMaterialsIn| { &mut m.creatures }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "plants", - |m: &ListMaterialsIn| { &m.plants }, - |m: &mut ListMaterialsIn| { &mut m.plants }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListMaterialsIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListMaterialsIn { - const NAME: &'static str = "ListMaterialsIn"; - - fn is_initialized(&self) -> bool { - for v in &self.mask { - if !v.is_initialized() { - return false; - } - }; - for v in &self.id_list { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.mask)?; - }, - 18 => { - self.id_list.push(is.read_message()?); - }, - 24 => { - self.builtin = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.inorganic = ::std::option::Option::Some(is.read_bool()?); - }, - 40 => { - self.creatures = ::std::option::Option::Some(is.read_bool()?); - }, - 48 => { - self.plants = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mask.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.id_list { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.builtin { - my_size += 1 + 1; - } - if let Some(v) = self.inorganic { - my_size += 1 + 1; - } - if let Some(v) = self.creatures { - my_size += 1 + 1; - } - if let Some(v) = self.plants { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mask.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - for v in &self.id_list { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - if let Some(v) = self.builtin { - os.write_bool(3, v)?; - } - if let Some(v) = self.inorganic { - os.write_bool(4, v)?; - } - if let Some(v) = self.creatures { - os.write_bool(5, v)?; - } - if let Some(v) = self.plants { - os.write_bool(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListMaterialsIn { - ListMaterialsIn::new() - } - - fn clear(&mut self) { - self.mask.clear(); - self.id_list.clear(); - self.builtin = ::std::option::Option::None; - self.inorganic = ::std::option::Option::None; - self.creatures = ::std::option::Option::None; - self.plants = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListMaterialsIn { - static instance: ListMaterialsIn = ListMaterialsIn { - mask: ::protobuf::MessageField::none(), - id_list: ::std::vec::Vec::new(), - builtin: ::std::option::Option::None, - inorganic: ::std::option::Option::None, - creatures: ::std::option::Option::None, - plants: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListMaterialsIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListMaterialsIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListMaterialsIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListMaterialsIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListMaterialsOut) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListMaterialsOut { - // message fields - // @@protoc_insertion_point(field:dfproto.ListMaterialsOut.value) - pub value: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListMaterialsOut.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListMaterialsOut { - fn default() -> &'a ListMaterialsOut { - ::default_instance() - } -} - -impl ListMaterialsOut { - pub fn new() -> ListMaterialsOut { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "value", - |m: &ListMaterialsOut| { &m.value }, - |m: &mut ListMaterialsOut| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListMaterialsOut", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListMaterialsOut { - const NAME: &'static str = "ListMaterialsOut"; - - fn is_initialized(&self) -> bool { - for v in &self.value { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.value.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.value { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.value { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListMaterialsOut { - ListMaterialsOut::new() - } - - fn clear(&mut self) { - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListMaterialsOut { - static instance: ListMaterialsOut = ListMaterialsOut { - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListMaterialsOut { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListMaterialsOut").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListMaterialsOut { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListMaterialsOut { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListUnitsIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListUnitsIn { - // message fields - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.mask) - pub mask: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.id_list) - pub id_list: ::std::vec::Vec, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.scan_all) - pub scan_all: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.race) - pub race: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.civ_id) - pub civ_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.dead) - pub dead: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.alive) - pub alive: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.ListUnitsIn.sane) - pub sane: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListUnitsIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListUnitsIn { - fn default() -> &'a ListUnitsIn { - ::default_instance() - } -} - -impl ListUnitsIn { - pub fn new() -> ListUnitsIn { - ::std::default::Default::default() - } - - // optional bool scan_all = 5; - - pub fn scan_all(&self) -> bool { - self.scan_all.unwrap_or(false) - } - - pub fn clear_scan_all(&mut self) { - self.scan_all = ::std::option::Option::None; - } - - pub fn has_scan_all(&self) -> bool { - self.scan_all.is_some() - } - - // Param is passed by value, moved - pub fn set_scan_all(&mut self, v: bool) { - self.scan_all = ::std::option::Option::Some(v); - } - - // optional int32 race = 3; - - pub fn race(&self) -> i32 { - self.race.unwrap_or(0) - } - - pub fn clear_race(&mut self) { - self.race = ::std::option::Option::None; - } - - pub fn has_race(&self) -> bool { - self.race.is_some() - } - - // Param is passed by value, moved - pub fn set_race(&mut self, v: i32) { - self.race = ::std::option::Option::Some(v); - } - - // optional int32 civ_id = 4; - - pub fn civ_id(&self) -> i32 { - self.civ_id.unwrap_or(0) - } - - pub fn clear_civ_id(&mut self) { - self.civ_id = ::std::option::Option::None; - } - - pub fn has_civ_id(&self) -> bool { - self.civ_id.is_some() - } - - // Param is passed by value, moved - pub fn set_civ_id(&mut self, v: i32) { - self.civ_id = ::std::option::Option::Some(v); - } - - // optional bool dead = 6; - - pub fn dead(&self) -> bool { - self.dead.unwrap_or(false) - } - - pub fn clear_dead(&mut self) { - self.dead = ::std::option::Option::None; - } - - pub fn has_dead(&self) -> bool { - self.dead.is_some() - } - - // Param is passed by value, moved - pub fn set_dead(&mut self, v: bool) { - self.dead = ::std::option::Option::Some(v); - } - - // optional bool alive = 7; - - pub fn alive(&self) -> bool { - self.alive.unwrap_or(false) - } - - pub fn clear_alive(&mut self) { - self.alive = ::std::option::Option::None; - } - - pub fn has_alive(&self) -> bool { - self.alive.is_some() - } - - // Param is passed by value, moved - pub fn set_alive(&mut self, v: bool) { - self.alive = ::std::option::Option::Some(v); - } - - // optional bool sane = 8; - - pub fn sane(&self) -> bool { - self.sane.unwrap_or(false) - } - - pub fn clear_sane(&mut self) { - self.sane = ::std::option::Option::None; - } - - pub fn has_sane(&self) -> bool { - self.sane.is_some() - } - - // Param is passed by value, moved - pub fn set_sane(&mut self, v: bool) { - self.sane = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::Basic::BasicUnitInfoMask>( - "mask", - |m: &ListUnitsIn| { &m.mask }, - |m: &mut ListUnitsIn| { &mut m.mask }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "id_list", - |m: &ListUnitsIn| { &m.id_list }, - |m: &mut ListUnitsIn| { &mut m.id_list }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "scan_all", - |m: &ListUnitsIn| { &m.scan_all }, - |m: &mut ListUnitsIn| { &mut m.scan_all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "race", - |m: &ListUnitsIn| { &m.race }, - |m: &mut ListUnitsIn| { &mut m.race }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "civ_id", - |m: &ListUnitsIn| { &m.civ_id }, - |m: &mut ListUnitsIn| { &mut m.civ_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dead", - |m: &ListUnitsIn| { &m.dead }, - |m: &mut ListUnitsIn| { &mut m.dead }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "alive", - |m: &ListUnitsIn| { &m.alive }, - |m: &mut ListUnitsIn| { &mut m.alive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sane", - |m: &ListUnitsIn| { &m.sane }, - |m: &mut ListUnitsIn| { &mut m.sane }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListUnitsIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListUnitsIn { - const NAME: &'static str = "ListUnitsIn"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.mask)?; - }, - 18 => { - is.read_repeated_packed_int32_into(&mut self.id_list)?; - }, - 16 => { - self.id_list.push(is.read_int32()?); - }, - 40 => { - self.scan_all = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.race = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.civ_id = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.dead = ::std::option::Option::Some(is.read_bool()?); - }, - 56 => { - self.alive = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.sane = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mask.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.id_list { - my_size += ::protobuf::rt::int32_size(2, *value); - }; - if let Some(v) = self.scan_all { - my_size += 1 + 1; - } - if let Some(v) = self.race { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.civ_id { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.dead { - my_size += 1 + 1; - } - if let Some(v) = self.alive { - my_size += 1 + 1; - } - if let Some(v) = self.sane { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mask.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - for v in &self.id_list { - os.write_int32(2, *v)?; - }; - if let Some(v) = self.scan_all { - os.write_bool(5, v)?; - } - if let Some(v) = self.race { - os.write_int32(3, v)?; - } - if let Some(v) = self.civ_id { - os.write_int32(4, v)?; - } - if let Some(v) = self.dead { - os.write_bool(6, v)?; - } - if let Some(v) = self.alive { - os.write_bool(7, v)?; - } - if let Some(v) = self.sane { - os.write_bool(8, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListUnitsIn { - ListUnitsIn::new() - } - - fn clear(&mut self) { - self.mask.clear(); - self.id_list.clear(); - self.scan_all = ::std::option::Option::None; - self.race = ::std::option::Option::None; - self.civ_id = ::std::option::Option::None; - self.dead = ::std::option::Option::None; - self.alive = ::std::option::Option::None; - self.sane = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListUnitsIn { - static instance: ListUnitsIn = ListUnitsIn { - mask: ::protobuf::MessageField::none(), - id_list: ::std::vec::Vec::new(), - scan_all: ::std::option::Option::None, - race: ::std::option::Option::None, - civ_id: ::std::option::Option::None, - dead: ::std::option::Option::None, - alive: ::std::option::Option::None, - sane: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListUnitsIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListUnitsIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListUnitsIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListUnitsIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListUnitsOut) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListUnitsOut { - // message fields - // @@protoc_insertion_point(field:dfproto.ListUnitsOut.value) - pub value: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListUnitsOut.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListUnitsOut { - fn default() -> &'a ListUnitsOut { - ::default_instance() - } -} - -impl ListUnitsOut { - pub fn new() -> ListUnitsOut { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "value", - |m: &ListUnitsOut| { &m.value }, - |m: &mut ListUnitsOut| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListUnitsOut", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListUnitsOut { - const NAME: &'static str = "ListUnitsOut"; - - fn is_initialized(&self) -> bool { - for v in &self.value { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.value.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.value { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.value { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListUnitsOut { - ListUnitsOut::new() - } - - fn clear(&mut self) { - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListUnitsOut { - static instance: ListUnitsOut = ListUnitsOut { - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListUnitsOut { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListUnitsOut").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListUnitsOut { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListUnitsOut { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListSquadsIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListSquadsIn { - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListSquadsIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListSquadsIn { - fn default() -> &'a ListSquadsIn { - ::default_instance() - } -} - -impl ListSquadsIn { - pub fn new() -> ListSquadsIn { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(0); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListSquadsIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListSquadsIn { - const NAME: &'static str = "ListSquadsIn"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListSquadsIn { - ListSquadsIn::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListSquadsIn { - static instance: ListSquadsIn = ListSquadsIn { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListSquadsIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListSquadsIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListSquadsIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListSquadsIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.ListSquadsOut) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListSquadsOut { - // message fields - // @@protoc_insertion_point(field:dfproto.ListSquadsOut.value) - pub value: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.ListSquadsOut.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListSquadsOut { - fn default() -> &'a ListSquadsOut { - ::default_instance() - } -} - -impl ListSquadsOut { - pub fn new() -> ListSquadsOut { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "value", - |m: &ListSquadsOut| { &m.value }, - |m: &mut ListSquadsOut| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListSquadsOut", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListSquadsOut { - const NAME: &'static str = "ListSquadsOut"; - - fn is_initialized(&self) -> bool { - for v in &self.value { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.value.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.value { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.value { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListSquadsOut { - ListSquadsOut::new() - } - - fn clear(&mut self) { - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListSquadsOut { - static instance: ListSquadsOut = ListSquadsOut { - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListSquadsOut { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListSquadsOut").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListSquadsOut { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListSquadsOut { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.SetUnitLaborsIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SetUnitLaborsIn { - // message fields - // @@protoc_insertion_point(field:dfproto.SetUnitLaborsIn.change) - pub change: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.SetUnitLaborsIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetUnitLaborsIn { - fn default() -> &'a SetUnitLaborsIn { - ::default_instance() - } -} - -impl SetUnitLaborsIn { - pub fn new() -> SetUnitLaborsIn { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "change", - |m: &SetUnitLaborsIn| { &m.change }, - |m: &mut SetUnitLaborsIn| { &mut m.change }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SetUnitLaborsIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SetUnitLaborsIn { - const NAME: &'static str = "SetUnitLaborsIn"; - - fn is_initialized(&self) -> bool { - for v in &self.change { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.change.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.change { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.change { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetUnitLaborsIn { - SetUnitLaborsIn::new() - } - - fn clear(&mut self) { - self.change.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetUnitLaborsIn { - static instance: SetUnitLaborsIn = SetUnitLaborsIn { - change: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SetUnitLaborsIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SetUnitLaborsIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SetUnitLaborsIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SetUnitLaborsIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0eBasicApi.proto\x12\x07dfproto\x1a\x0bBasic.proto\"\xb9\x03\n\x0fGe\ - tWorldInfoOut\x121\n\x04mode\x18\x01\x20\x02(\x0e2\x1d.dfproto.GetWorldI\ - nfoOut.ModeR\x04mode\x12\x19\n\x08save_dir\x18\x02\x20\x02(\tR\x07saveDi\ - r\x120\n\nworld_name\x18\x03\x20\x01(\x0b2\x11.dfproto.NameInfoR\tworldN\ - ame\x12\x15\n\x06civ_id\x18\x04\x20\x01(\x05R\x05civId\x12\x17\n\x07site\ - _id\x18\x05\x20\x01(\x05R\x06siteId\x12\x19\n\x08group_id\x18\x06\x20\ - \x01(\x05R\x07groupId\x12\x17\n\x07race_id\x18\x07\x20\x01(\x05R\x06race\ - Id\x12$\n\x0eplayer_unit_id\x18\x08\x20\x01(\x05R\x0cplayerUnitId\x12*\n\ - \x11player_histfig_id\x18\t\x20\x01(\x05R\x0fplayerHistfigId\x122\n\x15c\ - ompanion_histfig_ids\x18\n\x20\x03(\x05R\x13companionHistfigIds\"<\n\x04\ - Mode\x12\x0e\n\nMODE_DWARF\x10\x01\x12\x12\n\x0eMODE_ADVENTURE\x10\x02\ - \x12\x10\n\x0cMODE_LEGENDS\x10\x03\"\x9a\x05\n\x0cListEnumsOut\x12<\n\ - \x0ematerial_flags\x18\x01\x20\x03(\x0b2\x15.dfproto.EnumItemNameR\rmate\ - rialFlags\x12>\n\x0finorganic_flags\x18\x02\x20\x03(\x0b2\x15.dfproto.En\ - umItemNameR\x0einorganicFlags\x126\n\x0bunit_flags1\x18\x03\x20\x03(\x0b\ - 2\x15.dfproto.EnumItemNameR\nunitFlags1\x126\n\x0bunit_flags2\x18\x04\ - \x20\x03(\x0b2\x15.dfproto.EnumItemNameR\nunitFlags2\x126\n\x0bunit_flag\ - s3\x18\x05\x20\x03(\x0b2\x15.dfproto.EnumItemNameR\nunitFlags3\x124\n\nu\ - nit_labor\x18\x06\x20\x03(\x0b2\x15.dfproto.EnumItemNameR\tunitLabor\x12\ - 2\n\tjob_skill\x18\x07\x20\x03(\x0b2\x15.dfproto.EnumItemNameR\x08jobSki\ - ll\x12@\n\x11cie_add_tag_mask1\x18\x08\x20\x03(\x0b2\x15.dfproto.EnumIte\ - mNameR\x0ecieAddTagMask1\x12@\n\x11cie_add_tag_mask2\x18\t\x20\x03(\x0b2\ - \x15.dfproto.EnumItemNameR\x0ecieAddTagMask2\x12?\n\x10death_info_flags\ - \x18\n\x20\x03(\x0b2\x15.dfproto.EnumItemNameR\x0edeathInfoFlags\x125\n\ - \nprofession\x18\x0b\x20\x03(\x0b2\x15.dfproto.EnumItemNameR\nprofession\ - \"\xa6\x01\n\x10ListJobSkillsOut\x12+\n\x05skill\x18\x01\x20\x03(\x0b2\ - \x15.dfproto.JobSkillAttrR\x05skill\x127\n\nprofession\x18\x02\x20\x03(\ - \x0b2\x17.dfproto.ProfessionAttrR\nprofession\x12,\n\x05labor\x18\x03\ - \x20\x03(\x0b2\x16.dfproto.UnitLaborAttrR\x05labor\"\xe6\x01\n\x0fListMa\ - terialsIn\x122\n\x04mask\x18\x01\x20\x01(\x0b2\x1e.dfproto.BasicMaterial\ - InfoMaskR\x04mask\x121\n\x07id_list\x18\x02\x20\x03(\x0b2\x18.dfproto.Ba\ - sicMaterialIdR\x06idList\x12\x18\n\x07builtin\x18\x03\x20\x01(\x08R\x07b\ - uiltin\x12\x1c\n\tinorganic\x18\x04\x20\x01(\x08R\tinorganic\x12\x1c\n\t\ - creatures\x18\x05\x20\x01(\x08R\tcreatures\x12\x16\n\x06plants\x18\x06\ - \x20\x01(\x08R\x06plants\"D\n\x10ListMaterialsOut\x120\n\x05value\x18\ - \x01\x20\x03(\x0b2\x1a.dfproto.BasicMaterialInfoR\x05value\"\xda\x01\n\ - \x0bListUnitsIn\x12.\n\x04mask\x18\x01\x20\x01(\x0b2\x1a.dfproto.BasicUn\ - itInfoMaskR\x04mask\x12\x17\n\x07id_list\x18\x02\x20\x03(\x05R\x06idList\ - \x12\x19\n\x08scan_all\x18\x05\x20\x01(\x08R\x07scanAll\x12\x12\n\x04rac\ - e\x18\x03\x20\x01(\x05R\x04race\x12\x15\n\x06civ_id\x18\x04\x20\x01(\x05\ - R\x05civId\x12\x12\n\x04dead\x18\x06\x20\x01(\x08R\x04dead\x12\x14\n\x05\ - alive\x18\x07\x20\x01(\x08R\x05alive\x12\x12\n\x04sane\x18\x08\x20\x01(\ - \x08R\x04sane\"<\n\x0cListUnitsOut\x12,\n\x05value\x18\x01\x20\x03(\x0b2\ - \x16.dfproto.BasicUnitInfoR\x05value\"\x0e\n\x0cListSquadsIn\">\n\rListS\ - quadsOut\x12-\n\x05value\x18\x01\x20\x03(\x0b2\x17.dfproto.BasicSquadInf\ - oR\x05value\"B\n\x0fSetUnitLaborsIn\x12/\n\x06change\x18\x01\x20\x03(\ - \x0b2\x17.dfproto.UnitLaborStateR\x06changeB\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::Basic::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(10); - messages.push(GetWorldInfoOut::generated_message_descriptor_data()); - messages.push(ListEnumsOut::generated_message_descriptor_data()); - messages.push(ListJobSkillsOut::generated_message_descriptor_data()); - messages.push(ListMaterialsIn::generated_message_descriptor_data()); - messages.push(ListMaterialsOut::generated_message_descriptor_data()); - messages.push(ListUnitsIn::generated_message_descriptor_data()); - messages.push(ListUnitsOut::generated_message_descriptor_data()); - messages.push(ListSquadsIn::generated_message_descriptor_data()); - messages.push(ListSquadsOut::generated_message_descriptor_data()); - messages.push(SetUnitLaborsIn::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(1); - enums.push(get_world_info_out::Mode::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/CoreProtocol.rs b/dfhack-proto/src/generated/messages/CoreProtocol.rs deleted file mode 100644 index 78f9428..0000000 --- a/dfhack-proto/src/generated/messages/CoreProtocol.rs +++ /dev/null @@ -1,2356 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `CoreProtocol.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:dfproto.CoreTextFragment) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreTextFragment { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreTextFragment.text) - pub text: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreTextFragment.color) - pub color: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreTextFragment.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreTextFragment { - fn default() -> &'a CoreTextFragment { - ::default_instance() - } -} - -impl CoreTextFragment { - pub fn new() -> CoreTextFragment { - ::std::default::Default::default() - } - - // required string text = 1; - - pub fn text(&self) -> &str { - match self.text.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_text(&mut self) { - self.text = ::std::option::Option::None; - } - - pub fn has_text(&self) -> bool { - self.text.is_some() - } - - // Param is passed by value, moved - pub fn set_text(&mut self, v: ::std::string::String) { - self.text = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_text(&mut self) -> &mut ::std::string::String { - if self.text.is_none() { - self.text = ::std::option::Option::Some(::std::string::String::new()); - } - self.text.as_mut().unwrap() - } - - // Take field - pub fn take_text(&mut self) -> ::std::string::String { - self.text.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional .dfproto.CoreTextFragment.Color color = 2; - - pub fn color(&self) -> core_text_fragment::Color { - match self.color { - Some(e) => e.enum_value_or(core_text_fragment::Color::COLOR_BLACK), - None => core_text_fragment::Color::COLOR_BLACK, - } - } - - pub fn clear_color(&mut self) { - self.color = ::std::option::Option::None; - } - - pub fn has_color(&self) -> bool { - self.color.is_some() - } - - // Param is passed by value, moved - pub fn set_color(&mut self, v: core_text_fragment::Color) { - self.color = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "text", - |m: &CoreTextFragment| { &m.text }, - |m: &mut CoreTextFragment| { &mut m.text }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "color", - |m: &CoreTextFragment| { &m.color }, - |m: &mut CoreTextFragment| { &mut m.color }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreTextFragment", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreTextFragment { - const NAME: &'static str = "CoreTextFragment"; - - fn is_initialized(&self) -> bool { - if self.text.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.text = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.color = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.text.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.color { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.text.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.color { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreTextFragment { - CoreTextFragment::new() - } - - fn clear(&mut self) { - self.text = ::std::option::Option::None; - self.color = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreTextFragment { - static instance: CoreTextFragment = CoreTextFragment { - text: ::std::option::Option::None, - color: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreTextFragment { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreTextFragment").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreTextFragment { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreTextFragment { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `CoreTextFragment` -pub mod core_text_fragment { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:dfproto.CoreTextFragment.Color) - pub enum Color { - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_BLACK) - COLOR_BLACK = 0, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_BLUE) - COLOR_BLUE = 1, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_GREEN) - COLOR_GREEN = 2, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_CYAN) - COLOR_CYAN = 3, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_RED) - COLOR_RED = 4, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_MAGENTA) - COLOR_MAGENTA = 5, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_BROWN) - COLOR_BROWN = 6, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_GREY) - COLOR_GREY = 7, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_DARKGREY) - COLOR_DARKGREY = 8, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_LIGHTBLUE) - COLOR_LIGHTBLUE = 9, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_LIGHTGREEN) - COLOR_LIGHTGREEN = 10, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_LIGHTCYAN) - COLOR_LIGHTCYAN = 11, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_LIGHTRED) - COLOR_LIGHTRED = 12, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_LIGHTMAGENTA) - COLOR_LIGHTMAGENTA = 13, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_YELLOW) - COLOR_YELLOW = 14, - // @@protoc_insertion_point(enum_value:dfproto.CoreTextFragment.Color.COLOR_WHITE) - COLOR_WHITE = 15, - } - - impl ::protobuf::Enum for Color { - const NAME: &'static str = "Color"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(Color::COLOR_BLACK), - 1 => ::std::option::Option::Some(Color::COLOR_BLUE), - 2 => ::std::option::Option::Some(Color::COLOR_GREEN), - 3 => ::std::option::Option::Some(Color::COLOR_CYAN), - 4 => ::std::option::Option::Some(Color::COLOR_RED), - 5 => ::std::option::Option::Some(Color::COLOR_MAGENTA), - 6 => ::std::option::Option::Some(Color::COLOR_BROWN), - 7 => ::std::option::Option::Some(Color::COLOR_GREY), - 8 => ::std::option::Option::Some(Color::COLOR_DARKGREY), - 9 => ::std::option::Option::Some(Color::COLOR_LIGHTBLUE), - 10 => ::std::option::Option::Some(Color::COLOR_LIGHTGREEN), - 11 => ::std::option::Option::Some(Color::COLOR_LIGHTCYAN), - 12 => ::std::option::Option::Some(Color::COLOR_LIGHTRED), - 13 => ::std::option::Option::Some(Color::COLOR_LIGHTMAGENTA), - 14 => ::std::option::Option::Some(Color::COLOR_YELLOW), - 15 => ::std::option::Option::Some(Color::COLOR_WHITE), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "COLOR_BLACK" => ::std::option::Option::Some(Color::COLOR_BLACK), - "COLOR_BLUE" => ::std::option::Option::Some(Color::COLOR_BLUE), - "COLOR_GREEN" => ::std::option::Option::Some(Color::COLOR_GREEN), - "COLOR_CYAN" => ::std::option::Option::Some(Color::COLOR_CYAN), - "COLOR_RED" => ::std::option::Option::Some(Color::COLOR_RED), - "COLOR_MAGENTA" => ::std::option::Option::Some(Color::COLOR_MAGENTA), - "COLOR_BROWN" => ::std::option::Option::Some(Color::COLOR_BROWN), - "COLOR_GREY" => ::std::option::Option::Some(Color::COLOR_GREY), - "COLOR_DARKGREY" => ::std::option::Option::Some(Color::COLOR_DARKGREY), - "COLOR_LIGHTBLUE" => ::std::option::Option::Some(Color::COLOR_LIGHTBLUE), - "COLOR_LIGHTGREEN" => ::std::option::Option::Some(Color::COLOR_LIGHTGREEN), - "COLOR_LIGHTCYAN" => ::std::option::Option::Some(Color::COLOR_LIGHTCYAN), - "COLOR_LIGHTRED" => ::std::option::Option::Some(Color::COLOR_LIGHTRED), - "COLOR_LIGHTMAGENTA" => ::std::option::Option::Some(Color::COLOR_LIGHTMAGENTA), - "COLOR_YELLOW" => ::std::option::Option::Some(Color::COLOR_YELLOW), - "COLOR_WHITE" => ::std::option::Option::Some(Color::COLOR_WHITE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [Color] = &[ - Color::COLOR_BLACK, - Color::COLOR_BLUE, - Color::COLOR_GREEN, - Color::COLOR_CYAN, - Color::COLOR_RED, - Color::COLOR_MAGENTA, - Color::COLOR_BROWN, - Color::COLOR_GREY, - Color::COLOR_DARKGREY, - Color::COLOR_LIGHTBLUE, - Color::COLOR_LIGHTGREEN, - Color::COLOR_LIGHTCYAN, - Color::COLOR_LIGHTRED, - Color::COLOR_LIGHTMAGENTA, - Color::COLOR_YELLOW, - Color::COLOR_WHITE, - ]; - } - - impl ::protobuf::EnumFull for Color { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("CoreTextFragment.Color").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } - } - - impl ::std::default::Default for Color { - fn default() -> Self { - Color::COLOR_BLACK - } - } - - impl Color { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("CoreTextFragment.Color") - } - } -} - -// @@protoc_insertion_point(message:dfproto.CoreTextNotification) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreTextNotification { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreTextNotification.fragments) - pub fragments: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreTextNotification.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreTextNotification { - fn default() -> &'a CoreTextNotification { - ::default_instance() - } -} - -impl CoreTextNotification { - pub fn new() -> CoreTextNotification { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "fragments", - |m: &CoreTextNotification| { &m.fragments }, - |m: &mut CoreTextNotification| { &mut m.fragments }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreTextNotification", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreTextNotification { - const NAME: &'static str = "CoreTextNotification"; - - fn is_initialized(&self) -> bool { - for v in &self.fragments { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.fragments.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.fragments { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.fragments { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreTextNotification { - CoreTextNotification::new() - } - - fn clear(&mut self) { - self.fragments.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreTextNotification { - static instance: CoreTextNotification = CoreTextNotification { - fragments: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreTextNotification { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreTextNotification").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreTextNotification { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreTextNotification { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.CoreErrorNotification) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreErrorNotification { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreErrorNotification.code) - pub code: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreErrorNotification.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreErrorNotification { - fn default() -> &'a CoreErrorNotification { - ::default_instance() - } -} - -impl CoreErrorNotification { - pub fn new() -> CoreErrorNotification { - ::std::default::Default::default() - } - - // required .dfproto.CoreErrorNotification.ErrorCode code = 1; - - pub fn code(&self) -> core_error_notification::ErrorCode { - match self.code { - Some(e) => e.enum_value_or(core_error_notification::ErrorCode::CR_LINK_FAILURE), - None => core_error_notification::ErrorCode::CR_LINK_FAILURE, - } - } - - pub fn clear_code(&mut self) { - self.code = ::std::option::Option::None; - } - - pub fn has_code(&self) -> bool { - self.code.is_some() - } - - // Param is passed by value, moved - pub fn set_code(&mut self, v: core_error_notification::ErrorCode) { - self.code = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "code", - |m: &CoreErrorNotification| { &m.code }, - |m: &mut CoreErrorNotification| { &mut m.code }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreErrorNotification", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreErrorNotification { - const NAME: &'static str = "CoreErrorNotification"; - - fn is_initialized(&self) -> bool { - if self.code.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.code = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.code { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.code { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreErrorNotification { - CoreErrorNotification::new() - } - - fn clear(&mut self) { - self.code = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreErrorNotification { - static instance: CoreErrorNotification = CoreErrorNotification { - code: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreErrorNotification { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreErrorNotification").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreErrorNotification { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreErrorNotification { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `CoreErrorNotification` -pub mod core_error_notification { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:dfproto.CoreErrorNotification.ErrorCode) - pub enum ErrorCode { - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_LINK_FAILURE) - CR_LINK_FAILURE = -3, - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_WOULD_BREAK) - CR_WOULD_BREAK = -2, - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_NOT_IMPLEMENTED) - CR_NOT_IMPLEMENTED = -1, - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_OK) - CR_OK = 0, - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_FAILURE) - CR_FAILURE = 1, - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_WRONG_USAGE) - CR_WRONG_USAGE = 2, - // @@protoc_insertion_point(enum_value:dfproto.CoreErrorNotification.ErrorCode.CR_NOT_FOUND) - CR_NOT_FOUND = 3, - } - - impl ::protobuf::Enum for ErrorCode { - const NAME: &'static str = "ErrorCode"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - -3 => ::std::option::Option::Some(ErrorCode::CR_LINK_FAILURE), - -2 => ::std::option::Option::Some(ErrorCode::CR_WOULD_BREAK), - -1 => ::std::option::Option::Some(ErrorCode::CR_NOT_IMPLEMENTED), - 0 => ::std::option::Option::Some(ErrorCode::CR_OK), - 1 => ::std::option::Option::Some(ErrorCode::CR_FAILURE), - 2 => ::std::option::Option::Some(ErrorCode::CR_WRONG_USAGE), - 3 => ::std::option::Option::Some(ErrorCode::CR_NOT_FOUND), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "CR_LINK_FAILURE" => ::std::option::Option::Some(ErrorCode::CR_LINK_FAILURE), - "CR_WOULD_BREAK" => ::std::option::Option::Some(ErrorCode::CR_WOULD_BREAK), - "CR_NOT_IMPLEMENTED" => ::std::option::Option::Some(ErrorCode::CR_NOT_IMPLEMENTED), - "CR_OK" => ::std::option::Option::Some(ErrorCode::CR_OK), - "CR_FAILURE" => ::std::option::Option::Some(ErrorCode::CR_FAILURE), - "CR_WRONG_USAGE" => ::std::option::Option::Some(ErrorCode::CR_WRONG_USAGE), - "CR_NOT_FOUND" => ::std::option::Option::Some(ErrorCode::CR_NOT_FOUND), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ErrorCode] = &[ - ErrorCode::CR_LINK_FAILURE, - ErrorCode::CR_WOULD_BREAK, - ErrorCode::CR_NOT_IMPLEMENTED, - ErrorCode::CR_OK, - ErrorCode::CR_FAILURE, - ErrorCode::CR_WRONG_USAGE, - ErrorCode::CR_NOT_FOUND, - ]; - } - - impl ::protobuf::EnumFull for ErrorCode { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("CoreErrorNotification.ErrorCode").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - ErrorCode::CR_LINK_FAILURE => 0, - ErrorCode::CR_WOULD_BREAK => 1, - ErrorCode::CR_NOT_IMPLEMENTED => 2, - ErrorCode::CR_OK => 3, - ErrorCode::CR_FAILURE => 4, - ErrorCode::CR_WRONG_USAGE => 5, - ErrorCode::CR_NOT_FOUND => 6, - }; - Self::enum_descriptor().value_by_index(index) - } - } - - // Note, `Default` is implemented although default value is not 0 - impl ::std::default::Default for ErrorCode { - fn default() -> Self { - ErrorCode::CR_LINK_FAILURE - } - } - - impl ErrorCode { - pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("CoreErrorNotification.ErrorCode") - } - } -} - -// @@protoc_insertion_point(message:dfproto.EmptyMessage) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct EmptyMessage { - // special fields - // @@protoc_insertion_point(special_field:dfproto.EmptyMessage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a EmptyMessage { - fn default() -> &'a EmptyMessage { - ::default_instance() - } -} - -impl EmptyMessage { - pub fn new() -> EmptyMessage { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(0); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "EmptyMessage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for EmptyMessage { - const NAME: &'static str = "EmptyMessage"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> EmptyMessage { - EmptyMessage::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static EmptyMessage { - static instance: EmptyMessage = EmptyMessage { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for EmptyMessage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("EmptyMessage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for EmptyMessage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for EmptyMessage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.IntMessage) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct IntMessage { - // message fields - // @@protoc_insertion_point(field:dfproto.IntMessage.value) - pub value: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.IntMessage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a IntMessage { - fn default() -> &'a IntMessage { - ::default_instance() - } -} - -impl IntMessage { - pub fn new() -> IntMessage { - ::std::default::Default::default() - } - - // required int32 value = 1; - - pub fn value(&self) -> i32 { - self.value.unwrap_or(0) - } - - pub fn clear_value(&mut self) { - self.value = ::std::option::Option::None; - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: i32) { - self.value = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "value", - |m: &IntMessage| { &m.value }, - |m: &mut IntMessage| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "IntMessage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for IntMessage { - const NAME: &'static str = "IntMessage"; - - fn is_initialized(&self) -> bool { - if self.value.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.value = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.value { - my_size += ::protobuf::rt::int32_size(1, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.value { - os.write_int32(1, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> IntMessage { - IntMessage::new() - } - - fn clear(&mut self) { - self.value = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static IntMessage { - static instance: IntMessage = IntMessage { - value: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for IntMessage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("IntMessage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for IntMessage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for IntMessage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.IntListMessage) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct IntListMessage { - // message fields - // @@protoc_insertion_point(field:dfproto.IntListMessage.value) - pub value: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:dfproto.IntListMessage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a IntListMessage { - fn default() -> &'a IntListMessage { - ::default_instance() - } -} - -impl IntListMessage { - pub fn new() -> IntListMessage { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "value", - |m: &IntListMessage| { &m.value }, - |m: &mut IntListMessage| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "IntListMessage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for IntListMessage { - const NAME: &'static str = "IntListMessage"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - is.read_repeated_packed_int32_into(&mut self.value)?; - }, - 8 => { - self.value.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.value { - my_size += ::protobuf::rt::int32_size(1, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.value { - os.write_int32(1, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> IntListMessage { - IntListMessage::new() - } - - fn clear(&mut self) { - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static IntListMessage { - static instance: IntListMessage = IntListMessage { - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for IntListMessage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("IntListMessage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for IntListMessage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for IntListMessage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.StringMessage) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct StringMessage { - // message fields - // @@protoc_insertion_point(field:dfproto.StringMessage.value) - pub value: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.StringMessage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StringMessage { - fn default() -> &'a StringMessage { - ::default_instance() - } -} - -impl StringMessage { - pub fn new() -> StringMessage { - ::std::default::Default::default() - } - - // required string value = 1; - - pub fn value(&self) -> &str { - match self.value.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_value(&mut self) { - self.value = ::std::option::Option::None; - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - if self.value.is_none() { - self.value = ::std::option::Option::Some(::std::string::String::new()); - } - self.value.as_mut().unwrap() - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - self.value.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "value", - |m: &StringMessage| { &m.value }, - |m: &mut StringMessage| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StringMessage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StringMessage { - const NAME: &'static str = "StringMessage"; - - fn is_initialized(&self) -> bool { - if self.value.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.value = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.value.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.value.as_ref() { - os.write_string(1, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StringMessage { - StringMessage::new() - } - - fn clear(&mut self) { - self.value = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static StringMessage { - static instance: StringMessage = StringMessage { - value: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StringMessage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StringMessage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StringMessage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StringMessage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.StringListMessage) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct StringListMessage { - // message fields - // @@protoc_insertion_point(field:dfproto.StringListMessage.value) - pub value: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.StringListMessage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StringListMessage { - fn default() -> &'a StringListMessage { - ::default_instance() - } -} - -impl StringListMessage { - pub fn new() -> StringListMessage { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "value", - |m: &StringListMessage| { &m.value }, - |m: &mut StringListMessage| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StringListMessage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StringListMessage { - const NAME: &'static str = "StringListMessage"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.value.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.value { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.value { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StringListMessage { - StringListMessage::new() - } - - fn clear(&mut self) { - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StringListMessage { - static instance: StringListMessage = StringListMessage { - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StringListMessage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StringListMessage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StringListMessage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StringListMessage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.CoreBindRequest) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreBindRequest { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreBindRequest.method) - pub method: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreBindRequest.input_msg) - pub input_msg: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreBindRequest.output_msg) - pub output_msg: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreBindRequest.plugin) - pub plugin: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreBindRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreBindRequest { - fn default() -> &'a CoreBindRequest { - ::default_instance() - } -} - -impl CoreBindRequest { - pub fn new() -> CoreBindRequest { - ::std::default::Default::default() - } - - // required string method = 1; - - pub fn method(&self) -> &str { - match self.method.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_method(&mut self) { - self.method = ::std::option::Option::None; - } - - pub fn has_method(&self) -> bool { - self.method.is_some() - } - - // Param is passed by value, moved - pub fn set_method(&mut self, v: ::std::string::String) { - self.method = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_method(&mut self) -> &mut ::std::string::String { - if self.method.is_none() { - self.method = ::std::option::Option::Some(::std::string::String::new()); - } - self.method.as_mut().unwrap() - } - - // Take field - pub fn take_method(&mut self) -> ::std::string::String { - self.method.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required string input_msg = 2; - - pub fn input_msg(&self) -> &str { - match self.input_msg.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_input_msg(&mut self) { - self.input_msg = ::std::option::Option::None; - } - - pub fn has_input_msg(&self) -> bool { - self.input_msg.is_some() - } - - // Param is passed by value, moved - pub fn set_input_msg(&mut self, v: ::std::string::String) { - self.input_msg = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_input_msg(&mut self) -> &mut ::std::string::String { - if self.input_msg.is_none() { - self.input_msg = ::std::option::Option::Some(::std::string::String::new()); - } - self.input_msg.as_mut().unwrap() - } - - // Take field - pub fn take_input_msg(&mut self) -> ::std::string::String { - self.input_msg.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required string output_msg = 3; - - pub fn output_msg(&self) -> &str { - match self.output_msg.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_output_msg(&mut self) { - self.output_msg = ::std::option::Option::None; - } - - pub fn has_output_msg(&self) -> bool { - self.output_msg.is_some() - } - - // Param is passed by value, moved - pub fn set_output_msg(&mut self, v: ::std::string::String) { - self.output_msg = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_output_msg(&mut self) -> &mut ::std::string::String { - if self.output_msg.is_none() { - self.output_msg = ::std::option::Option::Some(::std::string::String::new()); - } - self.output_msg.as_mut().unwrap() - } - - // Take field - pub fn take_output_msg(&mut self) -> ::std::string::String { - self.output_msg.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string plugin = 4; - - pub fn plugin(&self) -> &str { - match self.plugin.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_plugin(&mut self) { - self.plugin = ::std::option::Option::None; - } - - pub fn has_plugin(&self) -> bool { - self.plugin.is_some() - } - - // Param is passed by value, moved - pub fn set_plugin(&mut self, v: ::std::string::String) { - self.plugin = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_plugin(&mut self) -> &mut ::std::string::String { - if self.plugin.is_none() { - self.plugin = ::std::option::Option::Some(::std::string::String::new()); - } - self.plugin.as_mut().unwrap() - } - - // Take field - pub fn take_plugin(&mut self) -> ::std::string::String { - self.plugin.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "method", - |m: &CoreBindRequest| { &m.method }, - |m: &mut CoreBindRequest| { &mut m.method }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "input_msg", - |m: &CoreBindRequest| { &m.input_msg }, - |m: &mut CoreBindRequest| { &mut m.input_msg }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "output_msg", - |m: &CoreBindRequest| { &m.output_msg }, - |m: &mut CoreBindRequest| { &mut m.output_msg }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "plugin", - |m: &CoreBindRequest| { &m.plugin }, - |m: &mut CoreBindRequest| { &mut m.plugin }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreBindRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreBindRequest { - const NAME: &'static str = "CoreBindRequest"; - - fn is_initialized(&self) -> bool { - if self.method.is_none() { - return false; - } - if self.input_msg.is_none() { - return false; - } - if self.output_msg.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.method = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.input_msg = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.output_msg = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.plugin = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.method.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.input_msg.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.output_msg.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.plugin.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.method.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.input_msg.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.output_msg.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.plugin.as_ref() { - os.write_string(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreBindRequest { - CoreBindRequest::new() - } - - fn clear(&mut self) { - self.method = ::std::option::Option::None; - self.input_msg = ::std::option::Option::None; - self.output_msg = ::std::option::Option::None; - self.plugin = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreBindRequest { - static instance: CoreBindRequest = CoreBindRequest { - method: ::std::option::Option::None, - input_msg: ::std::option::Option::None, - output_msg: ::std::option::Option::None, - plugin: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreBindRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreBindRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreBindRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreBindRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.CoreBindReply) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreBindReply { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreBindReply.assigned_id) - pub assigned_id: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreBindReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreBindReply { - fn default() -> &'a CoreBindReply { - ::default_instance() - } -} - -impl CoreBindReply { - pub fn new() -> CoreBindReply { - ::std::default::Default::default() - } - - // required int32 assigned_id = 1; - - pub fn assigned_id(&self) -> i32 { - self.assigned_id.unwrap_or(0) - } - - pub fn clear_assigned_id(&mut self) { - self.assigned_id = ::std::option::Option::None; - } - - pub fn has_assigned_id(&self) -> bool { - self.assigned_id.is_some() - } - - // Param is passed by value, moved - pub fn set_assigned_id(&mut self, v: i32) { - self.assigned_id = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "assigned_id", - |m: &CoreBindReply| { &m.assigned_id }, - |m: &mut CoreBindReply| { &mut m.assigned_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreBindReply", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreBindReply { - const NAME: &'static str = "CoreBindReply"; - - fn is_initialized(&self) -> bool { - if self.assigned_id.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.assigned_id = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.assigned_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.assigned_id { - os.write_int32(1, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreBindReply { - CoreBindReply::new() - } - - fn clear(&mut self) { - self.assigned_id = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreBindReply { - static instance: CoreBindReply = CoreBindReply { - assigned_id: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreBindReply { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreBindReply").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreBindReply { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreBindReply { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.CoreRunCommandRequest) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreRunCommandRequest { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreRunCommandRequest.command) - pub command: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreRunCommandRequest.arguments) - pub arguments: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreRunCommandRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreRunCommandRequest { - fn default() -> &'a CoreRunCommandRequest { - ::default_instance() - } -} - -impl CoreRunCommandRequest { - pub fn new() -> CoreRunCommandRequest { - ::std::default::Default::default() - } - - // required string command = 1; - - pub fn command(&self) -> &str { - match self.command.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_command(&mut self) { - self.command = ::std::option::Option::None; - } - - pub fn has_command(&self) -> bool { - self.command.is_some() - } - - // Param is passed by value, moved - pub fn set_command(&mut self, v: ::std::string::String) { - self.command = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_command(&mut self) -> &mut ::std::string::String { - if self.command.is_none() { - self.command = ::std::option::Option::Some(::std::string::String::new()); - } - self.command.as_mut().unwrap() - } - - // Take field - pub fn take_command(&mut self) -> ::std::string::String { - self.command.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "command", - |m: &CoreRunCommandRequest| { &m.command }, - |m: &mut CoreRunCommandRequest| { &mut m.command }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "arguments", - |m: &CoreRunCommandRequest| { &m.arguments }, - |m: &mut CoreRunCommandRequest| { &mut m.arguments }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreRunCommandRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreRunCommandRequest { - const NAME: &'static str = "CoreRunCommandRequest"; - - fn is_initialized(&self) -> bool { - if self.command.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.command = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.arguments.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.command.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - for value in &self.arguments { - my_size += ::protobuf::rt::string_size(2, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.command.as_ref() { - os.write_string(1, v)?; - } - for v in &self.arguments { - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreRunCommandRequest { - CoreRunCommandRequest::new() - } - - fn clear(&mut self) { - self.command = ::std::option::Option::None; - self.arguments.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreRunCommandRequest { - static instance: CoreRunCommandRequest = CoreRunCommandRequest { - command: ::std::option::Option::None, - arguments: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreRunCommandRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreRunCommandRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreRunCommandRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreRunCommandRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.CoreRunLuaRequest) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoreRunLuaRequest { - // message fields - // @@protoc_insertion_point(field:dfproto.CoreRunLuaRequest.module) - pub module: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreRunLuaRequest.function) - pub function: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.CoreRunLuaRequest.arguments) - pub arguments: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.CoreRunLuaRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CoreRunLuaRequest { - fn default() -> &'a CoreRunLuaRequest { - ::default_instance() - } -} - -impl CoreRunLuaRequest { - pub fn new() -> CoreRunLuaRequest { - ::std::default::Default::default() - } - - // required string module = 1; - - pub fn module(&self) -> &str { - match self.module.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_module(&mut self) { - self.module = ::std::option::Option::None; - } - - pub fn has_module(&self) -> bool { - self.module.is_some() - } - - // Param is passed by value, moved - pub fn set_module(&mut self, v: ::std::string::String) { - self.module = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_module(&mut self) -> &mut ::std::string::String { - if self.module.is_none() { - self.module = ::std::option::Option::Some(::std::string::String::new()); - } - self.module.as_mut().unwrap() - } - - // Take field - pub fn take_module(&mut self) -> ::std::string::String { - self.module.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required string function = 2; - - pub fn function(&self) -> &str { - match self.function.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_function(&mut self) { - self.function = ::std::option::Option::None; - } - - pub fn has_function(&self) -> bool { - self.function.is_some() - } - - // Param is passed by value, moved - pub fn set_function(&mut self, v: ::std::string::String) { - self.function = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_function(&mut self) -> &mut ::std::string::String { - if self.function.is_none() { - self.function = ::std::option::Option::Some(::std::string::String::new()); - } - self.function.as_mut().unwrap() - } - - // Take field - pub fn take_function(&mut self) -> ::std::string::String { - self.function.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "module", - |m: &CoreRunLuaRequest| { &m.module }, - |m: &mut CoreRunLuaRequest| { &mut m.module }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "function", - |m: &CoreRunLuaRequest| { &m.function }, - |m: &mut CoreRunLuaRequest| { &mut m.function }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "arguments", - |m: &CoreRunLuaRequest| { &m.arguments }, - |m: &mut CoreRunLuaRequest| { &mut m.arguments }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CoreRunLuaRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CoreRunLuaRequest { - const NAME: &'static str = "CoreRunLuaRequest"; - - fn is_initialized(&self) -> bool { - if self.module.is_none() { - return false; - } - if self.function.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.module = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.function = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.arguments.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.module.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.function.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - for value in &self.arguments { - my_size += ::protobuf::rt::string_size(3, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.module.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.function.as_ref() { - os.write_string(2, v)?; - } - for v in &self.arguments { - os.write_string(3, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoreRunLuaRequest { - CoreRunLuaRequest::new() - } - - fn clear(&mut self) { - self.module = ::std::option::Option::None; - self.function = ::std::option::Option::None; - self.arguments.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoreRunLuaRequest { - static instance: CoreRunLuaRequest = CoreRunLuaRequest { - module: ::std::option::Option::None, - function: ::std::option::Option::None, - arguments: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CoreRunLuaRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CoreRunLuaRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CoreRunLuaRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CoreRunLuaRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x12CoreProtocol.proto\x12\x07dfproto\"\x8f\x03\n\x10CoreTextFragment\ - \x12\x12\n\x04text\x18\x01\x20\x02(\tR\x04text\x125\n\x05color\x18\x02\ - \x20\x01(\x0e2\x1f.dfproto.CoreTextFragment.ColorR\x05color\"\xaf\x02\n\ - \x05Color\x12\x0f\n\x0bCOLOR_BLACK\x10\0\x12\x0e\n\nCOLOR_BLUE\x10\x01\ - \x12\x0f\n\x0bCOLOR_GREEN\x10\x02\x12\x0e\n\nCOLOR_CYAN\x10\x03\x12\r\n\ - \tCOLOR_RED\x10\x04\x12\x11\n\rCOLOR_MAGENTA\x10\x05\x12\x0f\n\x0bCOLOR_\ - BROWN\x10\x06\x12\x0e\n\nCOLOR_GREY\x10\x07\x12\x12\n\x0eCOLOR_DARKGREY\ - \x10\x08\x12\x13\n\x0fCOLOR_LIGHTBLUE\x10\t\x12\x14\n\x10COLOR_LIGHTGREE\ - N\x10\n\x12\x13\n\x0fCOLOR_LIGHTCYAN\x10\x0b\x12\x12\n\x0eCOLOR_LIGHTRED\ - \x10\x0c\x12\x16\n\x12COLOR_LIGHTMAGENTA\x10\r\x12\x10\n\x0cCOLOR_YELLOW\ - \x10\x0e\x12\x0f\n\x0bCOLOR_WHITE\x10\x0f\"O\n\x14CoreTextNotification\ - \x127\n\tfragments\x18\x01\x20\x03(\x0b2\x19.dfproto.CoreTextFragmentR\t\ - fragments\"\x80\x02\n\x15CoreErrorNotification\x12<\n\x04code\x18\x01\ - \x20\x02(\x0e2(.dfproto.CoreErrorNotification.ErrorCodeR\x04code\"\xa8\ - \x01\n\tErrorCode\x12\x1c\n\x0fCR_LINK_FAILURE\x10\xfd\xff\xff\xff\xff\ - \xff\xff\xff\xff\x01\x12\x1b\n\x0eCR_WOULD_BREAK\x10\xfe\xff\xff\xff\xff\ - \xff\xff\xff\xff\x01\x12\x1f\n\x12CR_NOT_IMPLEMENTED\x10\xff\xff\xff\xff\ - \xff\xff\xff\xff\xff\x01\x12\t\n\x05CR_OK\x10\0\x12\x0e\n\nCR_FAILURE\ - \x10\x01\x12\x12\n\x0eCR_WRONG_USAGE\x10\x02\x12\x10\n\x0cCR_NOT_FOUND\ - \x10\x03\"\x0e\n\x0cEmptyMessage\"\"\n\nIntMessage\x12\x14\n\x05value\ - \x18\x01\x20\x02(\x05R\x05value\"&\n\x0eIntListMessage\x12\x14\n\x05valu\ - e\x18\x01\x20\x03(\x05R\x05value\"%\n\rStringMessage\x12\x14\n\x05value\ - \x18\x01\x20\x02(\tR\x05value\")\n\x11StringListMessage\x12\x14\n\x05val\ - ue\x18\x01\x20\x03(\tR\x05value\"}\n\x0fCoreBindRequest\x12\x16\n\x06met\ - hod\x18\x01\x20\x02(\tR\x06method\x12\x1b\n\tinput_msg\x18\x02\x20\x02(\ - \tR\x08inputMsg\x12\x1d\n\noutput_msg\x18\x03\x20\x02(\tR\toutputMsg\x12\ - \x16\n\x06plugin\x18\x04\x20\x01(\tR\x06plugin\"0\n\rCoreBindReply\x12\ - \x1f\n\x0bassigned_id\x18\x01\x20\x02(\x05R\nassignedId\"O\n\x15CoreRunC\ - ommandRequest\x12\x18\n\x07command\x18\x01\x20\x02(\tR\x07command\x12\ - \x1c\n\targuments\x18\x02\x20\x03(\tR\targuments\"e\n\x11CoreRunLuaReque\ - st\x12\x16\n\x06module\x18\x01\x20\x02(\tR\x06module\x12\x1a\n\x08functi\ - on\x18\x02\x20\x02(\tR\x08function\x12\x1c\n\targuments\x18\x03\x20\x03(\ - \tR\targumentsB\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(12); - messages.push(CoreTextFragment::generated_message_descriptor_data()); - messages.push(CoreTextNotification::generated_message_descriptor_data()); - messages.push(CoreErrorNotification::generated_message_descriptor_data()); - messages.push(EmptyMessage::generated_message_descriptor_data()); - messages.push(IntMessage::generated_message_descriptor_data()); - messages.push(IntListMessage::generated_message_descriptor_data()); - messages.push(StringMessage::generated_message_descriptor_data()); - messages.push(StringListMessage::generated_message_descriptor_data()); - messages.push(CoreBindRequest::generated_message_descriptor_data()); - messages.push(CoreBindReply::generated_message_descriptor_data()); - messages.push(CoreRunCommandRequest::generated_message_descriptor_data()); - messages.push(CoreRunLuaRequest::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(2); - enums.push(core_text_fragment::Color::generated_enum_descriptor_data()); - enums.push(core_error_notification::ErrorCode::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/DwarfControl.rs b/dfhack-proto/src/generated/messages/DwarfControl.rs deleted file mode 100644 index d4761f7..0000000 --- a/dfhack-proto/src/generated/messages/DwarfControl.rs +++ /dev/null @@ -1,1962 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `DwarfControl.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:DwarfControl.SidebarState) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SidebarState { - // message fields - // @@protoc_insertion_point(field:DwarfControl.SidebarState.mode) - pub mode: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:DwarfControl.SidebarState.menu_items) - pub menu_items: ::std::vec::Vec, - // @@protoc_insertion_point(field:DwarfControl.SidebarState.build_selector) - pub build_selector: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:DwarfControl.SidebarState.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SidebarState { - fn default() -> &'a SidebarState { - ::default_instance() - } -} - -impl SidebarState { - pub fn new() -> SidebarState { - ::std::default::Default::default() - } - - // optional .proto.enums.ui_sidebar_mode.ui_sidebar_mode mode = 1; - - pub fn mode(&self) -> super::ui_sidebar_mode::Ui_sidebar_mode { - match self.mode { - Some(e) => e.enum_value_or(super::ui_sidebar_mode::Ui_sidebar_mode::Default), - None => super::ui_sidebar_mode::Ui_sidebar_mode::Default, - } - } - - pub fn clear_mode(&mut self) { - self.mode = ::std::option::Option::None; - } - - pub fn has_mode(&self) -> bool { - self.mode.is_some() - } - - // Param is passed by value, moved - pub fn set_mode(&mut self, v: super::ui_sidebar_mode::Ui_sidebar_mode) { - self.mode = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mode", - |m: &SidebarState| { &m.mode }, - |m: &mut SidebarState| { &mut m.mode }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "menu_items", - |m: &SidebarState| { &m.menu_items }, - |m: &mut SidebarState| { &mut m.menu_items }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, BuildSelector>( - "build_selector", - |m: &SidebarState| { &m.build_selector }, - |m: &mut SidebarState| { &mut m.build_selector }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SidebarState", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SidebarState { - const NAME: &'static str = "SidebarState"; - - fn is_initialized(&self) -> bool { - for v in &self.menu_items { - if !v.is_initialized() { - return false; - } - }; - for v in &self.build_selector { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.mode = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - self.menu_items.push(is.read_message()?); - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.build_selector)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mode { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - for value in &self.menu_items { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.build_selector.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mode { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - for v in &self.menu_items { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - if let Some(v) = self.build_selector.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SidebarState { - SidebarState::new() - } - - fn clear(&mut self) { - self.mode = ::std::option::Option::None; - self.menu_items.clear(); - self.build_selector.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SidebarState { - static instance: SidebarState = SidebarState { - mode: ::std::option::Option::None, - menu_items: ::std::vec::Vec::new(), - build_selector: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SidebarState { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SidebarState").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SidebarState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SidebarState { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:DwarfControl.MenuItem) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MenuItem { - // message fields - // @@protoc_insertion_point(field:DwarfControl.MenuItem.building_type) - pub building_type: ::protobuf::MessageField, - // @@protoc_insertion_point(field:DwarfControl.MenuItem.existing_count) - pub existing_count: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.MenuItem.build_category) - pub build_category: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:DwarfControl.MenuItem.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MenuItem { - fn default() -> &'a MenuItem { - ::default_instance() - } -} - -impl MenuItem { - pub fn new() -> MenuItem { - ::std::default::Default::default() - } - - // optional int32 existing_count = 2; - - pub fn existing_count(&self) -> i32 { - self.existing_count.unwrap_or(0) - } - - pub fn clear_existing_count(&mut self) { - self.existing_count = ::std::option::Option::None; - } - - pub fn has_existing_count(&self) -> bool { - self.existing_count.is_some() - } - - // Param is passed by value, moved - pub fn set_existing_count(&mut self, v: i32) { - self.existing_count = ::std::option::Option::Some(v); - } - - // optional .DwarfControl.BuildCategory build_category = 3; - - pub fn build_category(&self) -> BuildCategory { - match self.build_category { - Some(e) => e.enum_value_or(BuildCategory::NotCategory), - None => BuildCategory::NotCategory, - } - } - - pub fn clear_build_category(&mut self) { - self.build_category = ::std::option::Option::None; - } - - pub fn has_build_category(&self) -> bool { - self.build_category.is_some() - } - - // Param is passed by value, moved - pub fn set_build_category(&mut self, v: BuildCategory) { - self.build_category = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::BuildingType>( - "building_type", - |m: &MenuItem| { &m.building_type }, - |m: &mut MenuItem| { &mut m.building_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "existing_count", - |m: &MenuItem| { &m.existing_count }, - |m: &mut MenuItem| { &mut m.existing_count }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "build_category", - |m: &MenuItem| { &m.build_category }, - |m: &mut MenuItem| { &mut m.build_category }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MenuItem", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MenuItem { - const NAME: &'static str = "MenuItem"; - - fn is_initialized(&self) -> bool { - for v in &self.building_type { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.building_type)?; - }, - 16 => { - self.existing_count = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.build_category = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.building_type.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.existing_count { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.build_category { - my_size += ::protobuf::rt::int32_size(3, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.building_type.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.existing_count { - os.write_int32(2, v)?; - } - if let Some(v) = self.build_category { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MenuItem { - MenuItem::new() - } - - fn clear(&mut self) { - self.building_type.clear(); - self.existing_count = ::std::option::Option::None; - self.build_category = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MenuItem { - static instance: MenuItem = MenuItem { - building_type: ::protobuf::MessageField::none(), - existing_count: ::std::option::Option::None, - build_category: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MenuItem { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MenuItem").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MenuItem { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MenuItem { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:DwarfControl.SidebarCommand) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SidebarCommand { - // message fields - // @@protoc_insertion_point(field:DwarfControl.SidebarCommand.mode) - pub mode: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:DwarfControl.SidebarCommand.menu_index) - pub menu_index: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.SidebarCommand.action) - pub action: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:DwarfControl.SidebarCommand.selection_coord) - pub selection_coord: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:DwarfControl.SidebarCommand.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SidebarCommand { - fn default() -> &'a SidebarCommand { - ::default_instance() - } -} - -impl SidebarCommand { - pub fn new() -> SidebarCommand { - ::std::default::Default::default() - } - - // optional .proto.enums.ui_sidebar_mode.ui_sidebar_mode mode = 1; - - pub fn mode(&self) -> super::ui_sidebar_mode::Ui_sidebar_mode { - match self.mode { - Some(e) => e.enum_value_or(super::ui_sidebar_mode::Ui_sidebar_mode::Default), - None => super::ui_sidebar_mode::Ui_sidebar_mode::Default, - } - } - - pub fn clear_mode(&mut self) { - self.mode = ::std::option::Option::None; - } - - pub fn has_mode(&self) -> bool { - self.mode.is_some() - } - - // Param is passed by value, moved - pub fn set_mode(&mut self, v: super::ui_sidebar_mode::Ui_sidebar_mode) { - self.mode = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional int32 menu_index = 2; - - pub fn menu_index(&self) -> i32 { - self.menu_index.unwrap_or(0) - } - - pub fn clear_menu_index(&mut self) { - self.menu_index = ::std::option::Option::None; - } - - pub fn has_menu_index(&self) -> bool { - self.menu_index.is_some() - } - - // Param is passed by value, moved - pub fn set_menu_index(&mut self, v: i32) { - self.menu_index = ::std::option::Option::Some(v); - } - - // optional .DwarfControl.MenuAction action = 3; - - pub fn action(&self) -> MenuAction { - match self.action { - Some(e) => e.enum_value_or(MenuAction::MenuNone), - None => MenuAction::MenuNone, - } - } - - pub fn clear_action(&mut self) { - self.action = ::std::option::Option::None; - } - - pub fn has_action(&self) -> bool { - self.action.is_some() - } - - // Param is passed by value, moved - pub fn set_action(&mut self, v: MenuAction) { - self.action = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mode", - |m: &SidebarCommand| { &m.mode }, - |m: &mut SidebarCommand| { &mut m.mode }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "menu_index", - |m: &SidebarCommand| { &m.menu_index }, - |m: &mut SidebarCommand| { &mut m.menu_index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "action", - |m: &SidebarCommand| { &m.action }, - |m: &mut SidebarCommand| { &mut m.action }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::Coord>( - "selection_coord", - |m: &SidebarCommand| { &m.selection_coord }, - |m: &mut SidebarCommand| { &mut m.selection_coord }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SidebarCommand", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SidebarCommand { - const NAME: &'static str = "SidebarCommand"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.mode = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 16 => { - self.menu_index = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.action = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.selection_coord)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mode { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - if let Some(v) = self.menu_index { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.action { - my_size += ::protobuf::rt::int32_size(3, v.value()); - } - if let Some(v) = self.selection_coord.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mode { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.menu_index { - os.write_int32(2, v)?; - } - if let Some(v) = self.action { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.selection_coord.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SidebarCommand { - SidebarCommand::new() - } - - fn clear(&mut self) { - self.mode = ::std::option::Option::None; - self.menu_index = ::std::option::Option::None; - self.action = ::std::option::Option::None; - self.selection_coord.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SidebarCommand { - static instance: SidebarCommand = SidebarCommand { - mode: ::std::option::Option::None, - menu_index: ::std::option::Option::None, - action: ::std::option::Option::None, - selection_coord: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SidebarCommand { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SidebarCommand").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SidebarCommand { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SidebarCommand { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:DwarfControl.BuiildReqChoice) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuiildReqChoice { - // message fields - // @@protoc_insertion_point(field:DwarfControl.BuiildReqChoice.distance) - pub distance: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuiildReqChoice.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:DwarfControl.BuiildReqChoice.num_candidates) - pub num_candidates: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuiildReqChoice.used_count) - pub used_count: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:DwarfControl.BuiildReqChoice.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuiildReqChoice { - fn default() -> &'a BuiildReqChoice { - ::default_instance() - } -} - -impl BuiildReqChoice { - pub fn new() -> BuiildReqChoice { - ::std::default::Default::default() - } - - // optional int32 distance = 1; - - pub fn distance(&self) -> i32 { - self.distance.unwrap_or(0) - } - - pub fn clear_distance(&mut self) { - self.distance = ::std::option::Option::None; - } - - pub fn has_distance(&self) -> bool { - self.distance.is_some() - } - - // Param is passed by value, moved - pub fn set_distance(&mut self, v: i32) { - self.distance = ::std::option::Option::Some(v); - } - - // optional string name = 2; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 num_candidates = 3; - - pub fn num_candidates(&self) -> i32 { - self.num_candidates.unwrap_or(0) - } - - pub fn clear_num_candidates(&mut self) { - self.num_candidates = ::std::option::Option::None; - } - - pub fn has_num_candidates(&self) -> bool { - self.num_candidates.is_some() - } - - // Param is passed by value, moved - pub fn set_num_candidates(&mut self, v: i32) { - self.num_candidates = ::std::option::Option::Some(v); - } - - // optional int32 used_count = 4; - - pub fn used_count(&self) -> i32 { - self.used_count.unwrap_or(0) - } - - pub fn clear_used_count(&mut self) { - self.used_count = ::std::option::Option::None; - } - - pub fn has_used_count(&self) -> bool { - self.used_count.is_some() - } - - // Param is passed by value, moved - pub fn set_used_count(&mut self, v: i32) { - self.used_count = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "distance", - |m: &BuiildReqChoice| { &m.distance }, - |m: &mut BuiildReqChoice| { &mut m.distance }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &BuiildReqChoice| { &m.name }, - |m: &mut BuiildReqChoice| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "num_candidates", - |m: &BuiildReqChoice| { &m.num_candidates }, - |m: &mut BuiildReqChoice| { &mut m.num_candidates }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "used_count", - |m: &BuiildReqChoice| { &m.used_count }, - |m: &mut BuiildReqChoice| { &mut m.used_count }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuiildReqChoice", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuiildReqChoice { - const NAME: &'static str = "BuiildReqChoice"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.distance = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 24 => { - self.num_candidates = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.used_count = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.distance { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.num_candidates { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.used_count { - my_size += ::protobuf::rt::int32_size(4, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.distance { - os.write_int32(1, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.num_candidates { - os.write_int32(3, v)?; - } - if let Some(v) = self.used_count { - os.write_int32(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuiildReqChoice { - BuiildReqChoice::new() - } - - fn clear(&mut self) { - self.distance = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.num_candidates = ::std::option::Option::None; - self.used_count = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuiildReqChoice { - static instance: BuiildReqChoice = BuiildReqChoice { - distance: ::std::option::Option::None, - name: ::std::option::Option::None, - num_candidates: ::std::option::Option::None, - used_count: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuiildReqChoice { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuiildReqChoice").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuiildReqChoice { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuiildReqChoice { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:DwarfControl.BuildItemReq) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildItemReq { - // message fields - // @@protoc_insertion_point(field:DwarfControl.BuildItemReq.count_required) - pub count_required: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildItemReq.count_max) - pub count_max: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildItemReq.count_provided) - pub count_provided: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:DwarfControl.BuildItemReq.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildItemReq { - fn default() -> &'a BuildItemReq { - ::default_instance() - } -} - -impl BuildItemReq { - pub fn new() -> BuildItemReq { - ::std::default::Default::default() - } - - // optional int32 count_required = 2; - - pub fn count_required(&self) -> i32 { - self.count_required.unwrap_or(0) - } - - pub fn clear_count_required(&mut self) { - self.count_required = ::std::option::Option::None; - } - - pub fn has_count_required(&self) -> bool { - self.count_required.is_some() - } - - // Param is passed by value, moved - pub fn set_count_required(&mut self, v: i32) { - self.count_required = ::std::option::Option::Some(v); - } - - // optional int32 count_max = 3; - - pub fn count_max(&self) -> i32 { - self.count_max.unwrap_or(0) - } - - pub fn clear_count_max(&mut self) { - self.count_max = ::std::option::Option::None; - } - - pub fn has_count_max(&self) -> bool { - self.count_max.is_some() - } - - // Param is passed by value, moved - pub fn set_count_max(&mut self, v: i32) { - self.count_max = ::std::option::Option::Some(v); - } - - // optional int32 count_provided = 4; - - pub fn count_provided(&self) -> i32 { - self.count_provided.unwrap_or(0) - } - - pub fn clear_count_provided(&mut self) { - self.count_provided = ::std::option::Option::None; - } - - pub fn has_count_provided(&self) -> bool { - self.count_provided.is_some() - } - - // Param is passed by value, moved - pub fn set_count_provided(&mut self, v: i32) { - self.count_provided = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "count_required", - |m: &BuildItemReq| { &m.count_required }, - |m: &mut BuildItemReq| { &mut m.count_required }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "count_max", - |m: &BuildItemReq| { &m.count_max }, - |m: &mut BuildItemReq| { &mut m.count_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "count_provided", - |m: &BuildItemReq| { &m.count_provided }, - |m: &mut BuildItemReq| { &mut m.count_provided }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildItemReq", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildItemReq { - const NAME: &'static str = "BuildItemReq"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 16 => { - self.count_required = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.count_max = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.count_provided = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.count_required { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.count_max { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.count_provided { - my_size += ::protobuf::rt::int32_size(4, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.count_required { - os.write_int32(2, v)?; - } - if let Some(v) = self.count_max { - os.write_int32(3, v)?; - } - if let Some(v) = self.count_provided { - os.write_int32(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildItemReq { - BuildItemReq::new() - } - - fn clear(&mut self) { - self.count_required = ::std::option::Option::None; - self.count_max = ::std::option::Option::None; - self.count_provided = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildItemReq { - static instance: BuildItemReq = BuildItemReq { - count_required: ::std::option::Option::None, - count_max: ::std::option::Option::None, - count_provided: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildItemReq { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildItemReq").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildItemReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildItemReq { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:DwarfControl.BuildSelector) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildSelector { - // message fields - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.building_type) - pub building_type: ::protobuf::MessageField, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.stage) - pub stage: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.choices) - pub choices: ::std::vec::Vec, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.sel_index) - pub sel_index: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.requirements) - pub requirements: ::std::vec::Vec, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.req_index) - pub req_index: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.errors) - pub errors: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.radius_x_low) - pub radius_x_low: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.radius_y_low) - pub radius_y_low: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.radius_x_high) - pub radius_x_high: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.radius_y_high) - pub radius_y_high: ::std::option::Option, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.cursor) - pub cursor: ::protobuf::MessageField, - // @@protoc_insertion_point(field:DwarfControl.BuildSelector.tiles) - pub tiles: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:DwarfControl.BuildSelector.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildSelector { - fn default() -> &'a BuildSelector { - ::default_instance() - } -} - -impl BuildSelector { - pub fn new() -> BuildSelector { - ::std::default::Default::default() - } - - // optional .DwarfControl.BuildSelectorStage stage = 2; - - pub fn stage(&self) -> BuildSelectorStage { - match self.stage { - Some(e) => e.enum_value_or(BuildSelectorStage::StageNoMat), - None => BuildSelectorStage::StageNoMat, - } - } - - pub fn clear_stage(&mut self) { - self.stage = ::std::option::Option::None; - } - - pub fn has_stage(&self) -> bool { - self.stage.is_some() - } - - // Param is passed by value, moved - pub fn set_stage(&mut self, v: BuildSelectorStage) { - self.stage = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional int32 sel_index = 4; - - pub fn sel_index(&self) -> i32 { - self.sel_index.unwrap_or(0) - } - - pub fn clear_sel_index(&mut self) { - self.sel_index = ::std::option::Option::None; - } - - pub fn has_sel_index(&self) -> bool { - self.sel_index.is_some() - } - - // Param is passed by value, moved - pub fn set_sel_index(&mut self, v: i32) { - self.sel_index = ::std::option::Option::Some(v); - } - - // optional int32 req_index = 6; - - pub fn req_index(&self) -> i32 { - self.req_index.unwrap_or(0) - } - - pub fn clear_req_index(&mut self) { - self.req_index = ::std::option::Option::None; - } - - pub fn has_req_index(&self) -> bool { - self.req_index.is_some() - } - - // Param is passed by value, moved - pub fn set_req_index(&mut self, v: i32) { - self.req_index = ::std::option::Option::Some(v); - } - - // optional int32 radius_x_low = 8; - - pub fn radius_x_low(&self) -> i32 { - self.radius_x_low.unwrap_or(0) - } - - pub fn clear_radius_x_low(&mut self) { - self.radius_x_low = ::std::option::Option::None; - } - - pub fn has_radius_x_low(&self) -> bool { - self.radius_x_low.is_some() - } - - // Param is passed by value, moved - pub fn set_radius_x_low(&mut self, v: i32) { - self.radius_x_low = ::std::option::Option::Some(v); - } - - // optional int32 radius_y_low = 9; - - pub fn radius_y_low(&self) -> i32 { - self.radius_y_low.unwrap_or(0) - } - - pub fn clear_radius_y_low(&mut self) { - self.radius_y_low = ::std::option::Option::None; - } - - pub fn has_radius_y_low(&self) -> bool { - self.radius_y_low.is_some() - } - - // Param is passed by value, moved - pub fn set_radius_y_low(&mut self, v: i32) { - self.radius_y_low = ::std::option::Option::Some(v); - } - - // optional int32 radius_x_high = 10; - - pub fn radius_x_high(&self) -> i32 { - self.radius_x_high.unwrap_or(0) - } - - pub fn clear_radius_x_high(&mut self) { - self.radius_x_high = ::std::option::Option::None; - } - - pub fn has_radius_x_high(&self) -> bool { - self.radius_x_high.is_some() - } - - // Param is passed by value, moved - pub fn set_radius_x_high(&mut self, v: i32) { - self.radius_x_high = ::std::option::Option::Some(v); - } - - // optional int32 radius_y_high = 11; - - pub fn radius_y_high(&self) -> i32 { - self.radius_y_high.unwrap_or(0) - } - - pub fn clear_radius_y_high(&mut self) { - self.radius_y_high = ::std::option::Option::None; - } - - pub fn has_radius_y_high(&self) -> bool { - self.radius_y_high.is_some() - } - - // Param is passed by value, moved - pub fn set_radius_y_high(&mut self, v: i32) { - self.radius_y_high = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(13); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::BuildingType>( - "building_type", - |m: &BuildSelector| { &m.building_type }, - |m: &mut BuildSelector| { &mut m.building_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "stage", - |m: &BuildSelector| { &m.stage }, - |m: &mut BuildSelector| { &mut m.stage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "choices", - |m: &BuildSelector| { &m.choices }, - |m: &mut BuildSelector| { &mut m.choices }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sel_index", - |m: &BuildSelector| { &m.sel_index }, - |m: &mut BuildSelector| { &mut m.sel_index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "requirements", - |m: &BuildSelector| { &m.requirements }, - |m: &mut BuildSelector| { &mut m.requirements }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "req_index", - |m: &BuildSelector| { &m.req_index }, - |m: &mut BuildSelector| { &mut m.req_index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "errors", - |m: &BuildSelector| { &m.errors }, - |m: &mut BuildSelector| { &mut m.errors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "radius_x_low", - |m: &BuildSelector| { &m.radius_x_low }, - |m: &mut BuildSelector| { &mut m.radius_x_low }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "radius_y_low", - |m: &BuildSelector| { &m.radius_y_low }, - |m: &mut BuildSelector| { &mut m.radius_y_low }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "radius_x_high", - |m: &BuildSelector| { &m.radius_x_high }, - |m: &mut BuildSelector| { &mut m.radius_x_high }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "radius_y_high", - |m: &BuildSelector| { &m.radius_y_high }, - |m: &mut BuildSelector| { &mut m.radius_y_high }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::RemoteFortressReader::Coord>( - "cursor", - |m: &BuildSelector| { &m.cursor }, - |m: &mut BuildSelector| { &mut m.cursor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tiles", - |m: &BuildSelector| { &m.tiles }, - |m: &mut BuildSelector| { &mut m.tiles }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildSelector", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildSelector { - const NAME: &'static str = "BuildSelector"; - - fn is_initialized(&self) -> bool { - for v in &self.building_type { - if !v.is_initialized() { - return false; - } - }; - for v in &self.choices { - if !v.is_initialized() { - return false; - } - }; - for v in &self.requirements { - if !v.is_initialized() { - return false; - } - }; - for v in &self.cursor { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.building_type)?; - }, - 16 => { - self.stage = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 26 => { - self.choices.push(is.read_message()?); - }, - 32 => { - self.sel_index = ::std::option::Option::Some(is.read_int32()?); - }, - 42 => { - self.requirements.push(is.read_message()?); - }, - 48 => { - self.req_index = ::std::option::Option::Some(is.read_int32()?); - }, - 58 => { - self.errors.push(is.read_string()?); - }, - 64 => { - self.radius_x_low = ::std::option::Option::Some(is.read_int32()?); - }, - 72 => { - self.radius_y_low = ::std::option::Option::Some(is.read_int32()?); - }, - 80 => { - self.radius_x_high = ::std::option::Option::Some(is.read_int32()?); - }, - 88 => { - self.radius_y_high = ::std::option::Option::Some(is.read_int32()?); - }, - 98 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.cursor)?; - }, - 106 => { - is.read_repeated_packed_int32_into(&mut self.tiles)?; - }, - 104 => { - self.tiles.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.building_type.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.stage { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - for value in &self.choices { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.sel_index { - my_size += ::protobuf::rt::int32_size(4, v); - } - for value in &self.requirements { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.req_index { - my_size += ::protobuf::rt::int32_size(6, v); - } - for value in &self.errors { - my_size += ::protobuf::rt::string_size(7, &value); - }; - if let Some(v) = self.radius_x_low { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.radius_y_low { - my_size += ::protobuf::rt::int32_size(9, v); - } - if let Some(v) = self.radius_x_high { - my_size += ::protobuf::rt::int32_size(10, v); - } - if let Some(v) = self.radius_y_high { - my_size += ::protobuf::rt::int32_size(11, v); - } - if let Some(v) = self.cursor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.tiles { - my_size += ::protobuf::rt::int32_size(13, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.building_type.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.stage { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - for v in &self.choices { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - if let Some(v) = self.sel_index { - os.write_int32(4, v)?; - } - for v in &self.requirements { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - if let Some(v) = self.req_index { - os.write_int32(6, v)?; - } - for v in &self.errors { - os.write_string(7, &v)?; - }; - if let Some(v) = self.radius_x_low { - os.write_int32(8, v)?; - } - if let Some(v) = self.radius_y_low { - os.write_int32(9, v)?; - } - if let Some(v) = self.radius_x_high { - os.write_int32(10, v)?; - } - if let Some(v) = self.radius_y_high { - os.write_int32(11, v)?; - } - if let Some(v) = self.cursor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - } - for v in &self.tiles { - os.write_int32(13, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildSelector { - BuildSelector::new() - } - - fn clear(&mut self) { - self.building_type.clear(); - self.stage = ::std::option::Option::None; - self.choices.clear(); - self.sel_index = ::std::option::Option::None; - self.requirements.clear(); - self.req_index = ::std::option::Option::None; - self.errors.clear(); - self.radius_x_low = ::std::option::Option::None; - self.radius_y_low = ::std::option::Option::None; - self.radius_x_high = ::std::option::Option::None; - self.radius_y_high = ::std::option::Option::None; - self.cursor.clear(); - self.tiles.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildSelector { - static instance: BuildSelector = BuildSelector { - building_type: ::protobuf::MessageField::none(), - stage: ::std::option::Option::None, - choices: ::std::vec::Vec::new(), - sel_index: ::std::option::Option::None, - requirements: ::std::vec::Vec::new(), - req_index: ::std::option::Option::None, - errors: ::std::vec::Vec::new(), - radius_x_low: ::std::option::Option::None, - radius_y_low: ::std::option::Option::None, - radius_x_high: ::std::option::Option::None, - radius_y_high: ::std::option::Option::None, - cursor: ::protobuf::MessageField::none(), - tiles: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildSelector { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildSelector").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildSelector { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildSelector { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:DwarfControl.BuildCategory) -pub enum BuildCategory { - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.NotCategory) - NotCategory = 0, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.SiegeEngines) - SiegeEngines = 1, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.Traps) - Traps = 2, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.Workshops) - Workshops = 3, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.Furnaces) - Furnaces = 4, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.Constructions) - Constructions = 5, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.MachineComponents) - MachineComponents = 6, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildCategory.Track) - Track = 7, -} - -impl ::protobuf::Enum for BuildCategory { - const NAME: &'static str = "BuildCategory"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BuildCategory::NotCategory), - 1 => ::std::option::Option::Some(BuildCategory::SiegeEngines), - 2 => ::std::option::Option::Some(BuildCategory::Traps), - 3 => ::std::option::Option::Some(BuildCategory::Workshops), - 4 => ::std::option::Option::Some(BuildCategory::Furnaces), - 5 => ::std::option::Option::Some(BuildCategory::Constructions), - 6 => ::std::option::Option::Some(BuildCategory::MachineComponents), - 7 => ::std::option::Option::Some(BuildCategory::Track), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NotCategory" => ::std::option::Option::Some(BuildCategory::NotCategory), - "SiegeEngines" => ::std::option::Option::Some(BuildCategory::SiegeEngines), - "Traps" => ::std::option::Option::Some(BuildCategory::Traps), - "Workshops" => ::std::option::Option::Some(BuildCategory::Workshops), - "Furnaces" => ::std::option::Option::Some(BuildCategory::Furnaces), - "Constructions" => ::std::option::Option::Some(BuildCategory::Constructions), - "MachineComponents" => ::std::option::Option::Some(BuildCategory::MachineComponents), - "Track" => ::std::option::Option::Some(BuildCategory::Track), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [BuildCategory] = &[ - BuildCategory::NotCategory, - BuildCategory::SiegeEngines, - BuildCategory::Traps, - BuildCategory::Workshops, - BuildCategory::Furnaces, - BuildCategory::Constructions, - BuildCategory::MachineComponents, - BuildCategory::Track, - ]; -} - -impl ::protobuf::EnumFull for BuildCategory { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("BuildCategory").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for BuildCategory { - fn default() -> Self { - BuildCategory::NotCategory - } -} - -impl BuildCategory { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BuildCategory") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:DwarfControl.MenuAction) -pub enum MenuAction { - // @@protoc_insertion_point(enum_value:DwarfControl.MenuAction.MenuNone) - MenuNone = 0, - // @@protoc_insertion_point(enum_value:DwarfControl.MenuAction.MenuSelect) - MenuSelect = 1, - // @@protoc_insertion_point(enum_value:DwarfControl.MenuAction.MenuCancel) - MenuCancel = 2, - // @@protoc_insertion_point(enum_value:DwarfControl.MenuAction.MenuSelectAll) - MenuSelectAll = 3, -} - -impl ::protobuf::Enum for MenuAction { - const NAME: &'static str = "MenuAction"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(MenuAction::MenuNone), - 1 => ::std::option::Option::Some(MenuAction::MenuSelect), - 2 => ::std::option::Option::Some(MenuAction::MenuCancel), - 3 => ::std::option::Option::Some(MenuAction::MenuSelectAll), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "MenuNone" => ::std::option::Option::Some(MenuAction::MenuNone), - "MenuSelect" => ::std::option::Option::Some(MenuAction::MenuSelect), - "MenuCancel" => ::std::option::Option::Some(MenuAction::MenuCancel), - "MenuSelectAll" => ::std::option::Option::Some(MenuAction::MenuSelectAll), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [MenuAction] = &[ - MenuAction::MenuNone, - MenuAction::MenuSelect, - MenuAction::MenuCancel, - MenuAction::MenuSelectAll, - ]; -} - -impl ::protobuf::EnumFull for MenuAction { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("MenuAction").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for MenuAction { - fn default() -> Self { - MenuAction::MenuNone - } -} - -impl MenuAction { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("MenuAction") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:DwarfControl.BuildSelectorStage) -pub enum BuildSelectorStage { - // @@protoc_insertion_point(enum_value:DwarfControl.BuildSelectorStage.StageNoMat) - StageNoMat = 0, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildSelectorStage.StagePlace) - StagePlace = 1, - // @@protoc_insertion_point(enum_value:DwarfControl.BuildSelectorStage.StageItemSelect) - StageItemSelect = 2, -} - -impl ::protobuf::Enum for BuildSelectorStage { - const NAME: &'static str = "BuildSelectorStage"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BuildSelectorStage::StageNoMat), - 1 => ::std::option::Option::Some(BuildSelectorStage::StagePlace), - 2 => ::std::option::Option::Some(BuildSelectorStage::StageItemSelect), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "StageNoMat" => ::std::option::Option::Some(BuildSelectorStage::StageNoMat), - "StagePlace" => ::std::option::Option::Some(BuildSelectorStage::StagePlace), - "StageItemSelect" => ::std::option::Option::Some(BuildSelectorStage::StageItemSelect), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [BuildSelectorStage] = &[ - BuildSelectorStage::StageNoMat, - BuildSelectorStage::StagePlace, - BuildSelectorStage::StageItemSelect, - ]; -} - -impl ::protobuf::EnumFull for BuildSelectorStage { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("BuildSelectorStage").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for BuildSelectorStage { - fn default() -> Self { - BuildSelectorStage::StageNoMat - } -} - -impl BuildSelectorStage { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BuildSelectorStage") - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x12DwarfControl.proto\x12\x0cDwarfControl\x1a\x15ui_sidebar_mode.prot\ - o\x1a\x1aRemoteFortressReader.proto\"\xcb\x01\n\x0cSidebarState\x12@\n\ - \x04mode\x18\x01\x20\x01(\x0e2,.proto.enums.ui_sidebar_mode.ui_sidebar_m\ - odeR\x04mode\x125\n\nmenu_items\x18\x02\x20\x03(\x0b2\x16.DwarfControl.M\ - enuItemR\tmenuItems\x12B\n\x0ebuild_selector\x18\x03\x20\x01(\x0b2\x1b.D\ - warfControl.BuildSelectorR\rbuildSelector\"\xbe\x01\n\x08MenuItem\x12G\n\ - \rbuilding_type\x18\x01\x20\x01(\x0b2\".RemoteFortressReader.BuildingTyp\ - eR\x0cbuildingType\x12%\n\x0eexisting_count\x18\x02\x20\x01(\x05R\rexist\ - ingCount\x12B\n\x0ebuild_category\x18\x03\x20\x01(\x0e2\x1b.DwarfControl\ - .BuildCategoryR\rbuildCategory\"\xe9\x01\n\x0eSidebarCommand\x12@\n\x04m\ - ode\x18\x01\x20\x01(\x0e2,.proto.enums.ui_sidebar_mode.ui_sidebar_modeR\ - \x04mode\x12\x1d\n\nmenu_index\x18\x02\x20\x01(\x05R\tmenuIndex\x120\n\ - \x06action\x18\x03\x20\x01(\x0e2\x18.DwarfControl.MenuActionR\x06action\ - \x12D\n\x0fselection_coord\x18\x04\x20\x01(\x0b2\x1b.RemoteFortressReade\ - r.CoordR\x0eselectionCoord\"\x87\x01\n\x0fBuiildReqChoice\x12\x1a\n\x08d\ - istance\x18\x01\x20\x01(\x05R\x08distance\x12\x12\n\x04name\x18\x02\x20\ - \x01(\tR\x04name\x12%\n\x0enum_candidates\x18\x03\x20\x01(\x05R\rnumCand\ - idates\x12\x1d\n\nused_count\x18\x04\x20\x01(\x05R\tusedCount\"y\n\x0cBu\ - ildItemReq\x12%\n\x0ecount_required\x18\x02\x20\x01(\x05R\rcountRequired\ - \x12\x1b\n\tcount_max\x18\x03\x20\x01(\x05R\x08countMax\x12%\n\x0ecount_\ - provided\x18\x04\x20\x01(\x05R\rcountProvided\"\xb2\x04\n\rBuildSelector\ - \x12G\n\rbuilding_type\x18\x01\x20\x01(\x0b2\".RemoteFortressReader.Buil\ - dingTypeR\x0cbuildingType\x126\n\x05stage\x18\x02\x20\x01(\x0e2\x20.Dwar\ - fControl.BuildSelectorStageR\x05stage\x127\n\x07choices\x18\x03\x20\x03(\ - \x0b2\x1d.DwarfControl.BuiildReqChoiceR\x07choices\x12\x1b\n\tsel_index\ - \x18\x04\x20\x01(\x05R\x08selIndex\x12>\n\x0crequirements\x18\x05\x20\ - \x03(\x0b2\x1a.DwarfControl.BuildItemReqR\x0crequirements\x12\x1b\n\treq\ - _index\x18\x06\x20\x01(\x05R\x08reqIndex\x12\x16\n\x06errors\x18\x07\x20\ - \x03(\tR\x06errors\x12\x20\n\x0cradius_x_low\x18\x08\x20\x01(\x05R\nradi\ - usXLow\x12\x20\n\x0cradius_y_low\x18\t\x20\x01(\x05R\nradiusYLow\x12\"\n\ - \rradius_x_high\x18\n\x20\x01(\x05R\x0bradiusXHigh\x12\"\n\rradius_y_hig\ - h\x18\x0b\x20\x01(\x05R\x0bradiusYHigh\x123\n\x06cursor\x18\x0c\x20\x01(\ - \x0b2\x1b.RemoteFortressReader.CoordR\x06cursor\x12\x14\n\x05tiles\x18\r\ - \x20\x03(\x05R\x05tiles*\x8f\x01\n\rBuildCategory\x12\x0f\n\x0bNotCatego\ - ry\x10\0\x12\x10\n\x0cSiegeEngines\x10\x01\x12\t\n\x05Traps\x10\x02\x12\ - \r\n\tWorkshops\x10\x03\x12\x0c\n\x08Furnaces\x10\x04\x12\x11\n\rConstru\ - ctions\x10\x05\x12\x15\n\x11MachineComponents\x10\x06\x12\t\n\x05Track\ - \x10\x07*M\n\nMenuAction\x12\x0c\n\x08MenuNone\x10\0\x12\x0e\n\nMenuSele\ - ct\x10\x01\x12\x0e\n\nMenuCancel\x10\x02\x12\x11\n\rMenuSelectAll\x10\ - \x03*I\n\x12BuildSelectorStage\x12\x0e\n\nStageNoMat\x10\0\x12\x0e\n\nSt\ - agePlace\x10\x01\x12\x13\n\x0fStageItemSelect\x10\x02B\x02H\x03b\x06prot\ - o2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(2); - deps.push(super::ui_sidebar_mode::file_descriptor().clone()); - deps.push(super::RemoteFortressReader::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(6); - messages.push(SidebarState::generated_message_descriptor_data()); - messages.push(MenuItem::generated_message_descriptor_data()); - messages.push(SidebarCommand::generated_message_descriptor_data()); - messages.push(BuiildReqChoice::generated_message_descriptor_data()); - messages.push(BuildItemReq::generated_message_descriptor_data()); - messages.push(BuildSelector::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(3); - enums.push(BuildCategory::generated_enum_descriptor_data()); - enums.push(MenuAction::generated_enum_descriptor_data()); - enums.push(BuildSelectorStage::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/ItemdefInstrument.rs b/dfhack-proto/src/generated/messages/ItemdefInstrument.rs deleted file mode 100644 index d471117..0000000 --- a/dfhack-proto/src/generated/messages/ItemdefInstrument.rs +++ /dev/null @@ -1,2024 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `ItemdefInstrument.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentFlags) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct InstrumentFlags { - // message fields - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.indefinite_pitch) - pub indefinite_pitch: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.placed_as_building) - pub placed_as_building: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.metal_mat) - pub metal_mat: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.stone_mat) - pub stone_mat: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.wood_mat) - pub wood_mat: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.glass_mat) - pub glass_mat: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.ceramic_mat) - pub ceramic_mat: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.shell_mat) - pub shell_mat: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentFlags.bone_mat) - pub bone_mat: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentFlags.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstrumentFlags { - fn default() -> &'a InstrumentFlags { - ::default_instance() - } -} - -impl InstrumentFlags { - pub fn new() -> InstrumentFlags { - ::std::default::Default::default() - } - - // optional bool indefinite_pitch = 1; - - pub fn indefinite_pitch(&self) -> bool { - self.indefinite_pitch.unwrap_or(false) - } - - pub fn clear_indefinite_pitch(&mut self) { - self.indefinite_pitch = ::std::option::Option::None; - } - - pub fn has_indefinite_pitch(&self) -> bool { - self.indefinite_pitch.is_some() - } - - // Param is passed by value, moved - pub fn set_indefinite_pitch(&mut self, v: bool) { - self.indefinite_pitch = ::std::option::Option::Some(v); - } - - // optional bool placed_as_building = 2; - - pub fn placed_as_building(&self) -> bool { - self.placed_as_building.unwrap_or(false) - } - - pub fn clear_placed_as_building(&mut self) { - self.placed_as_building = ::std::option::Option::None; - } - - pub fn has_placed_as_building(&self) -> bool { - self.placed_as_building.is_some() - } - - // Param is passed by value, moved - pub fn set_placed_as_building(&mut self, v: bool) { - self.placed_as_building = ::std::option::Option::Some(v); - } - - // optional bool metal_mat = 3; - - pub fn metal_mat(&self) -> bool { - self.metal_mat.unwrap_or(false) - } - - pub fn clear_metal_mat(&mut self) { - self.metal_mat = ::std::option::Option::None; - } - - pub fn has_metal_mat(&self) -> bool { - self.metal_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_metal_mat(&mut self, v: bool) { - self.metal_mat = ::std::option::Option::Some(v); - } - - // optional bool stone_mat = 4; - - pub fn stone_mat(&self) -> bool { - self.stone_mat.unwrap_or(false) - } - - pub fn clear_stone_mat(&mut self) { - self.stone_mat = ::std::option::Option::None; - } - - pub fn has_stone_mat(&self) -> bool { - self.stone_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_stone_mat(&mut self, v: bool) { - self.stone_mat = ::std::option::Option::Some(v); - } - - // optional bool wood_mat = 5; - - pub fn wood_mat(&self) -> bool { - self.wood_mat.unwrap_or(false) - } - - pub fn clear_wood_mat(&mut self) { - self.wood_mat = ::std::option::Option::None; - } - - pub fn has_wood_mat(&self) -> bool { - self.wood_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_wood_mat(&mut self, v: bool) { - self.wood_mat = ::std::option::Option::Some(v); - } - - // optional bool glass_mat = 6; - - pub fn glass_mat(&self) -> bool { - self.glass_mat.unwrap_or(false) - } - - pub fn clear_glass_mat(&mut self) { - self.glass_mat = ::std::option::Option::None; - } - - pub fn has_glass_mat(&self) -> bool { - self.glass_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_glass_mat(&mut self, v: bool) { - self.glass_mat = ::std::option::Option::Some(v); - } - - // optional bool ceramic_mat = 7; - - pub fn ceramic_mat(&self) -> bool { - self.ceramic_mat.unwrap_or(false) - } - - pub fn clear_ceramic_mat(&mut self) { - self.ceramic_mat = ::std::option::Option::None; - } - - pub fn has_ceramic_mat(&self) -> bool { - self.ceramic_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_ceramic_mat(&mut self, v: bool) { - self.ceramic_mat = ::std::option::Option::Some(v); - } - - // optional bool shell_mat = 8; - - pub fn shell_mat(&self) -> bool { - self.shell_mat.unwrap_or(false) - } - - pub fn clear_shell_mat(&mut self) { - self.shell_mat = ::std::option::Option::None; - } - - pub fn has_shell_mat(&self) -> bool { - self.shell_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_shell_mat(&mut self, v: bool) { - self.shell_mat = ::std::option::Option::Some(v); - } - - // optional bool bone_mat = 9; - - pub fn bone_mat(&self) -> bool { - self.bone_mat.unwrap_or(false) - } - - pub fn clear_bone_mat(&mut self) { - self.bone_mat = ::std::option::Option::None; - } - - pub fn has_bone_mat(&self) -> bool { - self.bone_mat.is_some() - } - - // Param is passed by value, moved - pub fn set_bone_mat(&mut self, v: bool) { - self.bone_mat = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "indefinite_pitch", - |m: &InstrumentFlags| { &m.indefinite_pitch }, - |m: &mut InstrumentFlags| { &mut m.indefinite_pitch }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "placed_as_building", - |m: &InstrumentFlags| { &m.placed_as_building }, - |m: &mut InstrumentFlags| { &mut m.placed_as_building }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "metal_mat", - |m: &InstrumentFlags| { &m.metal_mat }, - |m: &mut InstrumentFlags| { &mut m.metal_mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "stone_mat", - |m: &InstrumentFlags| { &m.stone_mat }, - |m: &mut InstrumentFlags| { &mut m.stone_mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "wood_mat", - |m: &InstrumentFlags| { &m.wood_mat }, - |m: &mut InstrumentFlags| { &mut m.wood_mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "glass_mat", - |m: &InstrumentFlags| { &m.glass_mat }, - |m: &mut InstrumentFlags| { &mut m.glass_mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "ceramic_mat", - |m: &InstrumentFlags| { &m.ceramic_mat }, - |m: &mut InstrumentFlags| { &mut m.ceramic_mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "shell_mat", - |m: &InstrumentFlags| { &m.shell_mat }, - |m: &mut InstrumentFlags| { &mut m.shell_mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "bone_mat", - |m: &InstrumentFlags| { &m.bone_mat }, - |m: &mut InstrumentFlags| { &mut m.bone_mat }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "InstrumentFlags", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for InstrumentFlags { - const NAME: &'static str = "InstrumentFlags"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.indefinite_pitch = ::std::option::Option::Some(is.read_bool()?); - }, - 16 => { - self.placed_as_building = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.metal_mat = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.stone_mat = ::std::option::Option::Some(is.read_bool()?); - }, - 40 => { - self.wood_mat = ::std::option::Option::Some(is.read_bool()?); - }, - 48 => { - self.glass_mat = ::std::option::Option::Some(is.read_bool()?); - }, - 56 => { - self.ceramic_mat = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.shell_mat = ::std::option::Option::Some(is.read_bool()?); - }, - 72 => { - self.bone_mat = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.indefinite_pitch { - my_size += 1 + 1; - } - if let Some(v) = self.placed_as_building { - my_size += 1 + 1; - } - if let Some(v) = self.metal_mat { - my_size += 1 + 1; - } - if let Some(v) = self.stone_mat { - my_size += 1 + 1; - } - if let Some(v) = self.wood_mat { - my_size += 1 + 1; - } - if let Some(v) = self.glass_mat { - my_size += 1 + 1; - } - if let Some(v) = self.ceramic_mat { - my_size += 1 + 1; - } - if let Some(v) = self.shell_mat { - my_size += 1 + 1; - } - if let Some(v) = self.bone_mat { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.indefinite_pitch { - os.write_bool(1, v)?; - } - if let Some(v) = self.placed_as_building { - os.write_bool(2, v)?; - } - if let Some(v) = self.metal_mat { - os.write_bool(3, v)?; - } - if let Some(v) = self.stone_mat { - os.write_bool(4, v)?; - } - if let Some(v) = self.wood_mat { - os.write_bool(5, v)?; - } - if let Some(v) = self.glass_mat { - os.write_bool(6, v)?; - } - if let Some(v) = self.ceramic_mat { - os.write_bool(7, v)?; - } - if let Some(v) = self.shell_mat { - os.write_bool(8, v)?; - } - if let Some(v) = self.bone_mat { - os.write_bool(9, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstrumentFlags { - InstrumentFlags::new() - } - - fn clear(&mut self) { - self.indefinite_pitch = ::std::option::Option::None; - self.placed_as_building = ::std::option::Option::None; - self.metal_mat = ::std::option::Option::None; - self.stone_mat = ::std::option::Option::None; - self.wood_mat = ::std::option::Option::None; - self.glass_mat = ::std::option::Option::None; - self.ceramic_mat = ::std::option::Option::None; - self.shell_mat = ::std::option::Option::None; - self.bone_mat = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstrumentFlags { - static instance: InstrumentFlags = InstrumentFlags { - indefinite_pitch: ::std::option::Option::None, - placed_as_building: ::std::option::Option::None, - metal_mat: ::std::option::Option::None, - stone_mat: ::std::option::Option::None, - wood_mat: ::std::option::Option::None, - glass_mat: ::std::option::Option::None, - ceramic_mat: ::std::option::Option::None, - shell_mat: ::std::option::Option::None, - bone_mat: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for InstrumentFlags { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentFlags").unwrap()).clone() - } -} - -impl ::std::fmt::Display for InstrumentFlags { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for InstrumentFlags { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentPiece) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct InstrumentPiece { - // message fields - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.type) - pub type_: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentPiece.name_plural) - pub name_plural: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentPiece.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstrumentPiece { - fn default() -> &'a InstrumentPiece { - ::default_instance() - } -} - -impl InstrumentPiece { - pub fn new() -> InstrumentPiece { - ::std::default::Default::default() - } - - // optional string type = 1; - - pub fn type_(&self) -> &str { - match self.type_.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: ::std::string::String) { - self.type_ = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_type(&mut self) -> &mut ::std::string::String { - if self.type_.is_none() { - self.type_ = ::std::option::Option::Some(::std::string::String::new()); - } - self.type_.as_mut().unwrap() - } - - // Take field - pub fn take_type_(&mut self) -> ::std::string::String { - self.type_.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string id = 2; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name = 3; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name_plural = 4; - - pub fn name_plural(&self) -> &str { - match self.name_plural.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name_plural(&mut self) { - self.name_plural = ::std::option::Option::None; - } - - pub fn has_name_plural(&self) -> bool { - self.name_plural.is_some() - } - - // Param is passed by value, moved - pub fn set_name_plural(&mut self, v: ::std::string::String) { - self.name_plural = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name_plural(&mut self) -> &mut ::std::string::String { - if self.name_plural.is_none() { - self.name_plural = ::std::option::Option::Some(::std::string::String::new()); - } - self.name_plural.as_mut().unwrap() - } - - // Take field - pub fn take_name_plural(&mut self) -> ::std::string::String { - self.name_plural.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &InstrumentPiece| { &m.type_ }, - |m: &mut InstrumentPiece| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &InstrumentPiece| { &m.id }, - |m: &mut InstrumentPiece| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &InstrumentPiece| { &m.name }, - |m: &mut InstrumentPiece| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name_plural", - |m: &InstrumentPiece| { &m.name_plural }, - |m: &mut InstrumentPiece| { &mut m.name_plural }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "InstrumentPiece", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for InstrumentPiece { - const NAME: &'static str = "InstrumentPiece"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.type_ = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.name_plural = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.name_plural.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.id.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.name_plural.as_ref() { - os.write_string(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstrumentPiece { - InstrumentPiece::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.name_plural = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstrumentPiece { - static instance: InstrumentPiece = InstrumentPiece { - type_: ::std::option::Option::None, - id: ::std::option::Option::None, - name: ::std::option::Option::None, - name_plural: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for InstrumentPiece { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentPiece").unwrap()).clone() - } -} - -impl ::std::fmt::Display for InstrumentPiece { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for InstrumentPiece { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentRegister) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct InstrumentRegister { - // message fields - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentRegister.pitch_range_min) - pub pitch_range_min: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentRegister.pitch_range_max) - pub pitch_range_max: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentRegister.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstrumentRegister { - fn default() -> &'a InstrumentRegister { - ::default_instance() - } -} - -impl InstrumentRegister { - pub fn new() -> InstrumentRegister { - ::std::default::Default::default() - } - - // optional int32 pitch_range_min = 1; - - pub fn pitch_range_min(&self) -> i32 { - self.pitch_range_min.unwrap_or(0) - } - - pub fn clear_pitch_range_min(&mut self) { - self.pitch_range_min = ::std::option::Option::None; - } - - pub fn has_pitch_range_min(&self) -> bool { - self.pitch_range_min.is_some() - } - - // Param is passed by value, moved - pub fn set_pitch_range_min(&mut self, v: i32) { - self.pitch_range_min = ::std::option::Option::Some(v); - } - - // optional int32 pitch_range_max = 2; - - pub fn pitch_range_max(&self) -> i32 { - self.pitch_range_max.unwrap_or(0) - } - - pub fn clear_pitch_range_max(&mut self) { - self.pitch_range_max = ::std::option::Option::None; - } - - pub fn has_pitch_range_max(&self) -> bool { - self.pitch_range_max.is_some() - } - - // Param is passed by value, moved - pub fn set_pitch_range_max(&mut self, v: i32) { - self.pitch_range_max = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pitch_range_min", - |m: &InstrumentRegister| { &m.pitch_range_min }, - |m: &mut InstrumentRegister| { &mut m.pitch_range_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pitch_range_max", - |m: &InstrumentRegister| { &m.pitch_range_max }, - |m: &mut InstrumentRegister| { &mut m.pitch_range_max }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "InstrumentRegister", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for InstrumentRegister { - const NAME: &'static str = "InstrumentRegister"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pitch_range_min = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.pitch_range_max = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.pitch_range_min { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pitch_range_max { - my_size += ::protobuf::rt::int32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.pitch_range_min { - os.write_int32(1, v)?; - } - if let Some(v) = self.pitch_range_max { - os.write_int32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstrumentRegister { - InstrumentRegister::new() - } - - fn clear(&mut self) { - self.pitch_range_min = ::std::option::Option::None; - self.pitch_range_max = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstrumentRegister { - static instance: InstrumentRegister = InstrumentRegister { - pitch_range_min: ::std::option::Option::None, - pitch_range_max: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for InstrumentRegister { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentRegister").unwrap()).clone() - } -} - -impl ::std::fmt::Display for InstrumentRegister { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for InstrumentRegister { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:ItemdefInstrument.InstrumentDef) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct InstrumentDef { - // message fields - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.flags) - pub flags: ::protobuf::MessageField, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.size) - pub size: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.value) - pub value: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.material_size) - pub material_size: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pieces) - pub pieces: ::std::vec::Vec, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_range_min) - pub pitch_range_min: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_range_max) - pub pitch_range_max: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.volume_mb_min) - pub volume_mb_min: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.volume_mb_max) - pub volume_mb_max: ::std::option::Option, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.sound_production) - pub sound_production: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.sound_production_parm1) - pub sound_production_parm1: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.sound_production_parm2) - pub sound_production_parm2: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_choice) - pub pitch_choice: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_choice_parm1) - pub pitch_choice_parm1: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.pitch_choice_parm2) - pub pitch_choice_parm2: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.tuning) - pub tuning: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.tuning_parm) - pub tuning_parm: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.registers) - pub registers: ::std::vec::Vec, - // @@protoc_insertion_point(field:ItemdefInstrument.InstrumentDef.description) - pub description: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:ItemdefInstrument.InstrumentDef.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstrumentDef { - fn default() -> &'a InstrumentDef { - ::default_instance() - } -} - -impl InstrumentDef { - pub fn new() -> InstrumentDef { - ::std::default::Default::default() - } - - // optional int32 size = 2; - - pub fn size(&self) -> i32 { - self.size.unwrap_or(0) - } - - pub fn clear_size(&mut self) { - self.size = ::std::option::Option::None; - } - - pub fn has_size(&self) -> bool { - self.size.is_some() - } - - // Param is passed by value, moved - pub fn set_size(&mut self, v: i32) { - self.size = ::std::option::Option::Some(v); - } - - // optional int32 value = 3; - - pub fn value(&self) -> i32 { - self.value.unwrap_or(0) - } - - pub fn clear_value(&mut self) { - self.value = ::std::option::Option::None; - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: i32) { - self.value = ::std::option::Option::Some(v); - } - - // optional int32 material_size = 4; - - pub fn material_size(&self) -> i32 { - self.material_size.unwrap_or(0) - } - - pub fn clear_material_size(&mut self) { - self.material_size = ::std::option::Option::None; - } - - pub fn has_material_size(&self) -> bool { - self.material_size.is_some() - } - - // Param is passed by value, moved - pub fn set_material_size(&mut self, v: i32) { - self.material_size = ::std::option::Option::Some(v); - } - - // optional int32 pitch_range_min = 6; - - pub fn pitch_range_min(&self) -> i32 { - self.pitch_range_min.unwrap_or(0) - } - - pub fn clear_pitch_range_min(&mut self) { - self.pitch_range_min = ::std::option::Option::None; - } - - pub fn has_pitch_range_min(&self) -> bool { - self.pitch_range_min.is_some() - } - - // Param is passed by value, moved - pub fn set_pitch_range_min(&mut self, v: i32) { - self.pitch_range_min = ::std::option::Option::Some(v); - } - - // optional int32 pitch_range_max = 7; - - pub fn pitch_range_max(&self) -> i32 { - self.pitch_range_max.unwrap_or(0) - } - - pub fn clear_pitch_range_max(&mut self) { - self.pitch_range_max = ::std::option::Option::None; - } - - pub fn has_pitch_range_max(&self) -> bool { - self.pitch_range_max.is_some() - } - - // Param is passed by value, moved - pub fn set_pitch_range_max(&mut self, v: i32) { - self.pitch_range_max = ::std::option::Option::Some(v); - } - - // optional int32 volume_mb_min = 8; - - pub fn volume_mb_min(&self) -> i32 { - self.volume_mb_min.unwrap_or(0) - } - - pub fn clear_volume_mb_min(&mut self) { - self.volume_mb_min = ::std::option::Option::None; - } - - pub fn has_volume_mb_min(&self) -> bool { - self.volume_mb_min.is_some() - } - - // Param is passed by value, moved - pub fn set_volume_mb_min(&mut self, v: i32) { - self.volume_mb_min = ::std::option::Option::Some(v); - } - - // optional int32 volume_mb_max = 9; - - pub fn volume_mb_max(&self) -> i32 { - self.volume_mb_max.unwrap_or(0) - } - - pub fn clear_volume_mb_max(&mut self) { - self.volume_mb_max = ::std::option::Option::None; - } - - pub fn has_volume_mb_max(&self) -> bool { - self.volume_mb_max.is_some() - } - - // Param is passed by value, moved - pub fn set_volume_mb_max(&mut self, v: i32) { - self.volume_mb_max = ::std::option::Option::Some(v); - } - - // optional string description = 19; - - pub fn description(&self) -> &str { - match self.description.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_description(&mut self) { - self.description = ::std::option::Option::None; - } - - pub fn has_description(&self) -> bool { - self.description.is_some() - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - if self.description.is_none() { - self.description = ::std::option::Option::Some(::std::string::String::new()); - } - self.description.as_mut().unwrap() - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - self.description.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(19); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, InstrumentFlags>( - "flags", - |m: &InstrumentDef| { &m.flags }, - |m: &mut InstrumentDef| { &mut m.flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "size", - |m: &InstrumentDef| { &m.size }, - |m: &mut InstrumentDef| { &mut m.size }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "value", - |m: &InstrumentDef| { &m.value }, - |m: &mut InstrumentDef| { &mut m.value }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "material_size", - |m: &InstrumentDef| { &m.material_size }, - |m: &mut InstrumentDef| { &mut m.material_size }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "pieces", - |m: &InstrumentDef| { &m.pieces }, - |m: &mut InstrumentDef| { &mut m.pieces }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pitch_range_min", - |m: &InstrumentDef| { &m.pitch_range_min }, - |m: &mut InstrumentDef| { &mut m.pitch_range_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pitch_range_max", - |m: &InstrumentDef| { &m.pitch_range_max }, - |m: &mut InstrumentDef| { &mut m.pitch_range_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "volume_mb_min", - |m: &InstrumentDef| { &m.volume_mb_min }, - |m: &mut InstrumentDef| { &mut m.volume_mb_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "volume_mb_max", - |m: &InstrumentDef| { &m.volume_mb_max }, - |m: &mut InstrumentDef| { &mut m.volume_mb_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "sound_production", - |m: &InstrumentDef| { &m.sound_production }, - |m: &mut InstrumentDef| { &mut m.sound_production }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "sound_production_parm1", - |m: &InstrumentDef| { &m.sound_production_parm1 }, - |m: &mut InstrumentDef| { &mut m.sound_production_parm1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "sound_production_parm2", - |m: &InstrumentDef| { &m.sound_production_parm2 }, - |m: &mut InstrumentDef| { &mut m.sound_production_parm2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "pitch_choice", - |m: &InstrumentDef| { &m.pitch_choice }, - |m: &mut InstrumentDef| { &mut m.pitch_choice }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "pitch_choice_parm1", - |m: &InstrumentDef| { &m.pitch_choice_parm1 }, - |m: &mut InstrumentDef| { &mut m.pitch_choice_parm1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "pitch_choice_parm2", - |m: &InstrumentDef| { &m.pitch_choice_parm2 }, - |m: &mut InstrumentDef| { &mut m.pitch_choice_parm2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tuning", - |m: &InstrumentDef| { &m.tuning }, - |m: &mut InstrumentDef| { &mut m.tuning }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tuning_parm", - |m: &InstrumentDef| { &m.tuning_parm }, - |m: &mut InstrumentDef| { &mut m.tuning_parm }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "registers", - |m: &InstrumentDef| { &m.registers }, - |m: &mut InstrumentDef| { &mut m.registers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "description", - |m: &InstrumentDef| { &m.description }, - |m: &mut InstrumentDef| { &mut m.description }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "InstrumentDef", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for InstrumentDef { - const NAME: &'static str = "InstrumentDef"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.flags)?; - }, - 16 => { - self.size = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.value = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.material_size = ::std::option::Option::Some(is.read_int32()?); - }, - 42 => { - self.pieces.push(is.read_message()?); - }, - 48 => { - self.pitch_range_min = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.pitch_range_max = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.volume_mb_min = ::std::option::Option::Some(is.read_int32()?); - }, - 72 => { - self.volume_mb_max = ::std::option::Option::Some(is.read_int32()?); - }, - 80 => { - self.sound_production.push(is.read_enum_or_unknown()?); - }, - 82 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.sound_production)? - }, - 90 => { - self.sound_production_parm1.push(is.read_string()?); - }, - 98 => { - self.sound_production_parm2.push(is.read_string()?); - }, - 104 => { - self.pitch_choice.push(is.read_enum_or_unknown()?); - }, - 106 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.pitch_choice)? - }, - 114 => { - self.pitch_choice_parm1.push(is.read_string()?); - }, - 122 => { - self.pitch_choice_parm2.push(is.read_string()?); - }, - 128 => { - self.tuning.push(is.read_enum_or_unknown()?); - }, - 130 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.tuning)? - }, - 138 => { - self.tuning_parm.push(is.read_string()?); - }, - 146 => { - self.registers.push(is.read_message()?); - }, - 154 => { - self.description = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.flags.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.size { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.value { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.material_size { - my_size += ::protobuf::rt::int32_size(4, v); - } - for value in &self.pieces { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.pitch_range_min { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.pitch_range_max { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.volume_mb_min { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.volume_mb_max { - my_size += ::protobuf::rt::int32_size(9, v); - } - for value in &self.sound_production { - my_size += ::protobuf::rt::int32_size(10, value.value()); - }; - for value in &self.sound_production_parm1 { - my_size += ::protobuf::rt::string_size(11, &value); - }; - for value in &self.sound_production_parm2 { - my_size += ::protobuf::rt::string_size(12, &value); - }; - for value in &self.pitch_choice { - my_size += ::protobuf::rt::int32_size(13, value.value()); - }; - for value in &self.pitch_choice_parm1 { - my_size += ::protobuf::rt::string_size(14, &value); - }; - for value in &self.pitch_choice_parm2 { - my_size += ::protobuf::rt::string_size(15, &value); - }; - for value in &self.tuning { - my_size += ::protobuf::rt::int32_size(16, value.value()); - }; - for value in &self.tuning_parm { - my_size += ::protobuf::rt::string_size(17, &value); - }; - for value in &self.registers { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.description.as_ref() { - my_size += ::protobuf::rt::string_size(19, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.flags.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.size { - os.write_int32(2, v)?; - } - if let Some(v) = self.value { - os.write_int32(3, v)?; - } - if let Some(v) = self.material_size { - os.write_int32(4, v)?; - } - for v in &self.pieces { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - if let Some(v) = self.pitch_range_min { - os.write_int32(6, v)?; - } - if let Some(v) = self.pitch_range_max { - os.write_int32(7, v)?; - } - if let Some(v) = self.volume_mb_min { - os.write_int32(8, v)?; - } - if let Some(v) = self.volume_mb_max { - os.write_int32(9, v)?; - } - for v in &self.sound_production { - os.write_enum(10, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.sound_production_parm1 { - os.write_string(11, &v)?; - }; - for v in &self.sound_production_parm2 { - os.write_string(12, &v)?; - }; - for v in &self.pitch_choice { - os.write_enum(13, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.pitch_choice_parm1 { - os.write_string(14, &v)?; - }; - for v in &self.pitch_choice_parm2 { - os.write_string(15, &v)?; - }; - for v in &self.tuning { - os.write_enum(16, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.tuning_parm { - os.write_string(17, &v)?; - }; - for v in &self.registers { - ::protobuf::rt::write_message_field_with_cached_size(18, v, os)?; - }; - if let Some(v) = self.description.as_ref() { - os.write_string(19, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstrumentDef { - InstrumentDef::new() - } - - fn clear(&mut self) { - self.flags.clear(); - self.size = ::std::option::Option::None; - self.value = ::std::option::Option::None; - self.material_size = ::std::option::Option::None; - self.pieces.clear(); - self.pitch_range_min = ::std::option::Option::None; - self.pitch_range_max = ::std::option::Option::None; - self.volume_mb_min = ::std::option::Option::None; - self.volume_mb_max = ::std::option::Option::None; - self.sound_production.clear(); - self.sound_production_parm1.clear(); - self.sound_production_parm2.clear(); - self.pitch_choice.clear(); - self.pitch_choice_parm1.clear(); - self.pitch_choice_parm2.clear(); - self.tuning.clear(); - self.tuning_parm.clear(); - self.registers.clear(); - self.description = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstrumentDef { - static instance: InstrumentDef = InstrumentDef { - flags: ::protobuf::MessageField::none(), - size: ::std::option::Option::None, - value: ::std::option::Option::None, - material_size: ::std::option::Option::None, - pieces: ::std::vec::Vec::new(), - pitch_range_min: ::std::option::Option::None, - pitch_range_max: ::std::option::Option::None, - volume_mb_min: ::std::option::Option::None, - volume_mb_max: ::std::option::Option::None, - sound_production: ::std::vec::Vec::new(), - sound_production_parm1: ::std::vec::Vec::new(), - sound_production_parm2: ::std::vec::Vec::new(), - pitch_choice: ::std::vec::Vec::new(), - pitch_choice_parm1: ::std::vec::Vec::new(), - pitch_choice_parm2: ::std::vec::Vec::new(), - tuning: ::std::vec::Vec::new(), - tuning_parm: ::std::vec::Vec::new(), - registers: ::std::vec::Vec::new(), - description: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for InstrumentDef { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("InstrumentDef").unwrap()).clone() - } -} - -impl ::std::fmt::Display for InstrumentDef { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for InstrumentDef { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:ItemdefInstrument.PitchChoiceType) -pub enum PitchChoiceType { - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.MEMBRANE_POSITION) - MEMBRANE_POSITION = 0, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.SUBPART_CHOICE) - SUBPART_CHOICE = 1, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.KEYBOARD) - KEYBOARD = 2, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_FRET) - STOPPING_FRET = 3, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_AGAINST_BODY) - STOPPING_AGAINST_BODY = 4, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_HOLE) - STOPPING_HOLE = 5, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.STOPPING_HOLE_KEY) - STOPPING_HOLE_KEY = 6, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.SLIDE) - SLIDE = 7, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.HARMONIC_SERIES) - HARMONIC_SERIES = 8, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.VALVE_ROUTES_AIR) - VALVE_ROUTES_AIR = 9, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.BP_IN_BELL) - BP_IN_BELL = 10, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.PitchChoiceType.FOOT_PEDALS) - FOOT_PEDALS = 11, -} - -impl ::protobuf::Enum for PitchChoiceType { - const NAME: &'static str = "PitchChoiceType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(PitchChoiceType::MEMBRANE_POSITION), - 1 => ::std::option::Option::Some(PitchChoiceType::SUBPART_CHOICE), - 2 => ::std::option::Option::Some(PitchChoiceType::KEYBOARD), - 3 => ::std::option::Option::Some(PitchChoiceType::STOPPING_FRET), - 4 => ::std::option::Option::Some(PitchChoiceType::STOPPING_AGAINST_BODY), - 5 => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE), - 6 => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE_KEY), - 7 => ::std::option::Option::Some(PitchChoiceType::SLIDE), - 8 => ::std::option::Option::Some(PitchChoiceType::HARMONIC_SERIES), - 9 => ::std::option::Option::Some(PitchChoiceType::VALVE_ROUTES_AIR), - 10 => ::std::option::Option::Some(PitchChoiceType::BP_IN_BELL), - 11 => ::std::option::Option::Some(PitchChoiceType::FOOT_PEDALS), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "MEMBRANE_POSITION" => ::std::option::Option::Some(PitchChoiceType::MEMBRANE_POSITION), - "SUBPART_CHOICE" => ::std::option::Option::Some(PitchChoiceType::SUBPART_CHOICE), - "KEYBOARD" => ::std::option::Option::Some(PitchChoiceType::KEYBOARD), - "STOPPING_FRET" => ::std::option::Option::Some(PitchChoiceType::STOPPING_FRET), - "STOPPING_AGAINST_BODY" => ::std::option::Option::Some(PitchChoiceType::STOPPING_AGAINST_BODY), - "STOPPING_HOLE" => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE), - "STOPPING_HOLE_KEY" => ::std::option::Option::Some(PitchChoiceType::STOPPING_HOLE_KEY), - "SLIDE" => ::std::option::Option::Some(PitchChoiceType::SLIDE), - "HARMONIC_SERIES" => ::std::option::Option::Some(PitchChoiceType::HARMONIC_SERIES), - "VALVE_ROUTES_AIR" => ::std::option::Option::Some(PitchChoiceType::VALVE_ROUTES_AIR), - "BP_IN_BELL" => ::std::option::Option::Some(PitchChoiceType::BP_IN_BELL), - "FOOT_PEDALS" => ::std::option::Option::Some(PitchChoiceType::FOOT_PEDALS), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [PitchChoiceType] = &[ - PitchChoiceType::MEMBRANE_POSITION, - PitchChoiceType::SUBPART_CHOICE, - PitchChoiceType::KEYBOARD, - PitchChoiceType::STOPPING_FRET, - PitchChoiceType::STOPPING_AGAINST_BODY, - PitchChoiceType::STOPPING_HOLE, - PitchChoiceType::STOPPING_HOLE_KEY, - PitchChoiceType::SLIDE, - PitchChoiceType::HARMONIC_SERIES, - PitchChoiceType::VALVE_ROUTES_AIR, - PitchChoiceType::BP_IN_BELL, - PitchChoiceType::FOOT_PEDALS, - ]; -} - -impl ::protobuf::EnumFull for PitchChoiceType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("PitchChoiceType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for PitchChoiceType { - fn default() -> Self { - PitchChoiceType::MEMBRANE_POSITION - } -} - -impl PitchChoiceType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("PitchChoiceType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:ItemdefInstrument.SoundProductionType) -pub enum SoundProductionType { - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.PLUCKED_BY_BP) - PLUCKED_BY_BP = 0, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.PLUCKED) - PLUCKED = 1, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BOWED) - BOWED = 2, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.STRUCK_BY_BP) - STRUCK_BY_BP = 3, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.STRUCK) - STRUCK = 4, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.VIBRATE_BP_AGAINST_OPENING) - VIBRATE_BP_AGAINST_OPENING = 5, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_AGAINST_FIPPLE) - BLOW_AGAINST_FIPPLE = 6, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_OPENING_SIDE) - BLOW_OVER_OPENING_SIDE = 7, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_OPENING_END) - BLOW_OVER_OPENING_END = 8, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_SINGLE_REED) - BLOW_OVER_SINGLE_REED = 9, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_DOUBLE_REED) - BLOW_OVER_DOUBLE_REED = 10, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BLOW_OVER_FREE_REED) - BLOW_OVER_FREE_REED = 11, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.STRUCK_TOGETHER) - STRUCK_TOGETHER = 12, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.SHAKEN) - SHAKEN = 13, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.SCRAPED) - SCRAPED = 14, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.FRICTION) - FRICTION = 15, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.RESONATOR) - RESONATOR = 16, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.BAG_OVER_REED) - BAG_OVER_REED = 17, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.AIR_OVER_REED) - AIR_OVER_REED = 18, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.AIR_OVER_FREE_REED) - AIR_OVER_FREE_REED = 19, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.SoundProductionType.AIR_AGAINST_FIPPLE) - AIR_AGAINST_FIPPLE = 20, -} - -impl ::protobuf::Enum for SoundProductionType { - const NAME: &'static str = "SoundProductionType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(SoundProductionType::PLUCKED_BY_BP), - 1 => ::std::option::Option::Some(SoundProductionType::PLUCKED), - 2 => ::std::option::Option::Some(SoundProductionType::BOWED), - 3 => ::std::option::Option::Some(SoundProductionType::STRUCK_BY_BP), - 4 => ::std::option::Option::Some(SoundProductionType::STRUCK), - 5 => ::std::option::Option::Some(SoundProductionType::VIBRATE_BP_AGAINST_OPENING), - 6 => ::std::option::Option::Some(SoundProductionType::BLOW_AGAINST_FIPPLE), - 7 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_SIDE), - 8 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_END), - 9 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_SINGLE_REED), - 10 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_DOUBLE_REED), - 11 => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_FREE_REED), - 12 => ::std::option::Option::Some(SoundProductionType::STRUCK_TOGETHER), - 13 => ::std::option::Option::Some(SoundProductionType::SHAKEN), - 14 => ::std::option::Option::Some(SoundProductionType::SCRAPED), - 15 => ::std::option::Option::Some(SoundProductionType::FRICTION), - 16 => ::std::option::Option::Some(SoundProductionType::RESONATOR), - 17 => ::std::option::Option::Some(SoundProductionType::BAG_OVER_REED), - 18 => ::std::option::Option::Some(SoundProductionType::AIR_OVER_REED), - 19 => ::std::option::Option::Some(SoundProductionType::AIR_OVER_FREE_REED), - 20 => ::std::option::Option::Some(SoundProductionType::AIR_AGAINST_FIPPLE), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "PLUCKED_BY_BP" => ::std::option::Option::Some(SoundProductionType::PLUCKED_BY_BP), - "PLUCKED" => ::std::option::Option::Some(SoundProductionType::PLUCKED), - "BOWED" => ::std::option::Option::Some(SoundProductionType::BOWED), - "STRUCK_BY_BP" => ::std::option::Option::Some(SoundProductionType::STRUCK_BY_BP), - "STRUCK" => ::std::option::Option::Some(SoundProductionType::STRUCK), - "VIBRATE_BP_AGAINST_OPENING" => ::std::option::Option::Some(SoundProductionType::VIBRATE_BP_AGAINST_OPENING), - "BLOW_AGAINST_FIPPLE" => ::std::option::Option::Some(SoundProductionType::BLOW_AGAINST_FIPPLE), - "BLOW_OVER_OPENING_SIDE" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_SIDE), - "BLOW_OVER_OPENING_END" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_OPENING_END), - "BLOW_OVER_SINGLE_REED" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_SINGLE_REED), - "BLOW_OVER_DOUBLE_REED" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_DOUBLE_REED), - "BLOW_OVER_FREE_REED" => ::std::option::Option::Some(SoundProductionType::BLOW_OVER_FREE_REED), - "STRUCK_TOGETHER" => ::std::option::Option::Some(SoundProductionType::STRUCK_TOGETHER), - "SHAKEN" => ::std::option::Option::Some(SoundProductionType::SHAKEN), - "SCRAPED" => ::std::option::Option::Some(SoundProductionType::SCRAPED), - "FRICTION" => ::std::option::Option::Some(SoundProductionType::FRICTION), - "RESONATOR" => ::std::option::Option::Some(SoundProductionType::RESONATOR), - "BAG_OVER_REED" => ::std::option::Option::Some(SoundProductionType::BAG_OVER_REED), - "AIR_OVER_REED" => ::std::option::Option::Some(SoundProductionType::AIR_OVER_REED), - "AIR_OVER_FREE_REED" => ::std::option::Option::Some(SoundProductionType::AIR_OVER_FREE_REED), - "AIR_AGAINST_FIPPLE" => ::std::option::Option::Some(SoundProductionType::AIR_AGAINST_FIPPLE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [SoundProductionType] = &[ - SoundProductionType::PLUCKED_BY_BP, - SoundProductionType::PLUCKED, - SoundProductionType::BOWED, - SoundProductionType::STRUCK_BY_BP, - SoundProductionType::STRUCK, - SoundProductionType::VIBRATE_BP_AGAINST_OPENING, - SoundProductionType::BLOW_AGAINST_FIPPLE, - SoundProductionType::BLOW_OVER_OPENING_SIDE, - SoundProductionType::BLOW_OVER_OPENING_END, - SoundProductionType::BLOW_OVER_SINGLE_REED, - SoundProductionType::BLOW_OVER_DOUBLE_REED, - SoundProductionType::BLOW_OVER_FREE_REED, - SoundProductionType::STRUCK_TOGETHER, - SoundProductionType::SHAKEN, - SoundProductionType::SCRAPED, - SoundProductionType::FRICTION, - SoundProductionType::RESONATOR, - SoundProductionType::BAG_OVER_REED, - SoundProductionType::AIR_OVER_REED, - SoundProductionType::AIR_OVER_FREE_REED, - SoundProductionType::AIR_AGAINST_FIPPLE, - ]; -} - -impl ::protobuf::EnumFull for SoundProductionType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("SoundProductionType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for SoundProductionType { - fn default() -> Self { - SoundProductionType::PLUCKED_BY_BP - } -} - -impl SoundProductionType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("SoundProductionType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:ItemdefInstrument.TuningType) -pub enum TuningType { - // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.PEGS) - PEGS = 0, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.ADJUSTABLE_BRIDGES) - ADJUSTABLE_BRIDGES = 1, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.CROOKS) - CROOKS = 2, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.TIGHTENING) - TIGHTENING = 3, - // @@protoc_insertion_point(enum_value:ItemdefInstrument.TuningType.LEVERS) - LEVERS = 4, -} - -impl ::protobuf::Enum for TuningType { - const NAME: &'static str = "TuningType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(TuningType::PEGS), - 1 => ::std::option::Option::Some(TuningType::ADJUSTABLE_BRIDGES), - 2 => ::std::option::Option::Some(TuningType::CROOKS), - 3 => ::std::option::Option::Some(TuningType::TIGHTENING), - 4 => ::std::option::Option::Some(TuningType::LEVERS), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "PEGS" => ::std::option::Option::Some(TuningType::PEGS), - "ADJUSTABLE_BRIDGES" => ::std::option::Option::Some(TuningType::ADJUSTABLE_BRIDGES), - "CROOKS" => ::std::option::Option::Some(TuningType::CROOKS), - "TIGHTENING" => ::std::option::Option::Some(TuningType::TIGHTENING), - "LEVERS" => ::std::option::Option::Some(TuningType::LEVERS), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [TuningType] = &[ - TuningType::PEGS, - TuningType::ADJUSTABLE_BRIDGES, - TuningType::CROOKS, - TuningType::TIGHTENING, - TuningType::LEVERS, - ]; -} - -impl ::protobuf::EnumFull for TuningType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("TuningType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for TuningType { - fn default() -> Self { - TuningType::PEGS - } -} - -impl TuningType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TuningType") - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x17ItemdefInstrument.proto\x12\x11ItemdefInstrument\"\xb5\x02\n\x0fIn\ - strumentFlags\x12)\n\x10indefinite_pitch\x18\x01\x20\x01(\x08R\x0findefi\ - nitePitch\x12,\n\x12placed_as_building\x18\x02\x20\x01(\x08R\x10placedAs\ - Building\x12\x1b\n\tmetal_mat\x18\x03\x20\x01(\x08R\x08metalMat\x12\x1b\ - \n\tstone_mat\x18\x04\x20\x01(\x08R\x08stoneMat\x12\x19\n\x08wood_mat\ - \x18\x05\x20\x01(\x08R\x07woodMat\x12\x1b\n\tglass_mat\x18\x06\x20\x01(\ - \x08R\x08glassMat\x12\x1f\n\x0bceramic_mat\x18\x07\x20\x01(\x08R\ncerami\ - cMat\x12\x1b\n\tshell_mat\x18\x08\x20\x01(\x08R\x08shellMat\x12\x19\n\ - \x08bone_mat\x18\t\x20\x01(\x08R\x07boneMat\"j\n\x0fInstrumentPiece\x12\ - \x12\n\x04type\x18\x01\x20\x01(\tR\x04type\x12\x0e\n\x02id\x18\x02\x20\ - \x01(\tR\x02id\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x1f\n\ - \x0bname_plural\x18\x04\x20\x01(\tR\nnamePlural\"d\n\x12InstrumentRegist\ - er\x12&\n\x0fpitch_range_min\x18\x01\x20\x01(\x05R\rpitchRangeMin\x12&\n\ - \x0fpitch_range_max\x18\x02\x20\x01(\x05R\rpitchRangeMax\"\x8d\x07\n\rIn\ - strumentDef\x128\n\x05flags\x18\x01\x20\x01(\x0b2\".ItemdefInstrument.In\ - strumentFlagsR\x05flags\x12\x12\n\x04size\x18\x02\x20\x01(\x05R\x04size\ - \x12\x14\n\x05value\x18\x03\x20\x01(\x05R\x05value\x12#\n\rmaterial_size\ - \x18\x04\x20\x01(\x05R\x0cmaterialSize\x12:\n\x06pieces\x18\x05\x20\x03(\ - \x0b2\".ItemdefInstrument.InstrumentPieceR\x06pieces\x12&\n\x0fpitch_ran\ - ge_min\x18\x06\x20\x01(\x05R\rpitchRangeMin\x12&\n\x0fpitch_range_max\ - \x18\x07\x20\x01(\x05R\rpitchRangeMax\x12\"\n\rvolume_mb_min\x18\x08\x20\ - \x01(\x05R\x0bvolumeMbMin\x12\"\n\rvolume_mb_max\x18\t\x20\x01(\x05R\x0b\ - volumeMbMax\x12Q\n\x10sound_production\x18\n\x20\x03(\x0e2&.ItemdefInstr\ - ument.SoundProductionTypeR\x0fsoundProduction\x124\n\x16sound_production\ - _parm1\x18\x0b\x20\x03(\tR\x14soundProductionParm1\x124\n\x16sound_produ\ - ction_parm2\x18\x0c\x20\x03(\tR\x14soundProductionParm2\x12E\n\x0cpitch_\ - choice\x18\r\x20\x03(\x0e2\".ItemdefInstrument.PitchChoiceTypeR\x0bpitch\ - Choice\x12,\n\x12pitch_choice_parm1\x18\x0e\x20\x03(\tR\x10pitchChoicePa\ - rm1\x12,\n\x12pitch_choice_parm2\x18\x0f\x20\x03(\tR\x10pitchChoiceParm2\ - \x125\n\x06tuning\x18\x10\x20\x03(\x0e2\x1d.ItemdefInstrument.TuningType\ - R\x06tuning\x12\x1f\n\x0btuning_parm\x18\x11\x20\x03(\tR\ntuningParm\x12\ - C\n\tregisters\x18\x12\x20\x03(\x0b2%.ItemdefInstrument.InstrumentRegist\ - erR\tregisters\x12\x20\n\x0bdescription\x18\x13\x20\x01(\tR\x0bdescripti\ - on*\xf9\x01\n\x0fPitchChoiceType\x12\x15\n\x11MEMBRANE_POSITION\x10\0\ - \x12\x12\n\x0eSUBPART_CHOICE\x10\x01\x12\x0c\n\x08KEYBOARD\x10\x02\x12\ - \x11\n\rSTOPPING_FRET\x10\x03\x12\x19\n\x15STOPPING_AGAINST_BODY\x10\x04\ - \x12\x11\n\rSTOPPING_HOLE\x10\x05\x12\x15\n\x11STOPPING_HOLE_KEY\x10\x06\ - \x12\t\n\x05SLIDE\x10\x07\x12\x13\n\x0fHARMONIC_SERIES\x10\x08\x12\x14\n\ - \x10VALVE_ROUTES_AIR\x10\t\x12\x0e\n\nBP_IN_BELL\x10\n\x12\x0f\n\x0bFOOT\ - _PEDALS\x10\x0b*\xbe\x03\n\x13SoundProductionType\x12\x11\n\rPLUCKED_BY_\ - BP\x10\0\x12\x0b\n\x07PLUCKED\x10\x01\x12\t\n\x05BOWED\x10\x02\x12\x10\n\ - \x0cSTRUCK_BY_BP\x10\x03\x12\n\n\x06STRUCK\x10\x04\x12\x1e\n\x1aVIBRATE_\ - BP_AGAINST_OPENING\x10\x05\x12\x17\n\x13BLOW_AGAINST_FIPPLE\x10\x06\x12\ - \x1a\n\x16BLOW_OVER_OPENING_SIDE\x10\x07\x12\x19\n\x15BLOW_OVER_OPENING_\ - END\x10\x08\x12\x19\n\x15BLOW_OVER_SINGLE_REED\x10\t\x12\x19\n\x15BLOW_O\ - VER_DOUBLE_REED\x10\n\x12\x17\n\x13BLOW_OVER_FREE_REED\x10\x0b\x12\x13\n\ - \x0fSTRUCK_TOGETHER\x10\x0c\x12\n\n\x06SHAKEN\x10\r\x12\x0b\n\x07SCRAPED\ - \x10\x0e\x12\x0c\n\x08FRICTION\x10\x0f\x12\r\n\tRESONATOR\x10\x10\x12\ - \x11\n\rBAG_OVER_REED\x10\x11\x12\x11\n\rAIR_OVER_REED\x10\x12\x12\x16\n\ - \x12AIR_OVER_FREE_REED\x10\x13\x12\x16\n\x12AIR_AGAINST_FIPPLE\x10\x14*V\ - \n\nTuningType\x12\x08\n\x04PEGS\x10\0\x12\x16\n\x12ADJUSTABLE_BRIDGES\ - \x10\x01\x12\n\n\x06CROOKS\x10\x02\x12\x0e\n\nTIGHTENING\x10\x03\x12\n\n\ - \x06LEVERS\x10\x04B\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(4); - messages.push(InstrumentFlags::generated_message_descriptor_data()); - messages.push(InstrumentPiece::generated_message_descriptor_data()); - messages.push(InstrumentRegister::generated_message_descriptor_data()); - messages.push(InstrumentDef::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(3); - enums.push(PitchChoiceType::generated_enum_descriptor_data()); - enums.push(SoundProductionType::generated_enum_descriptor_data()); - enums.push(TuningType::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/RemoteFortressReader.rs b/dfhack-proto/src/generated/messages/RemoteFortressReader.rs deleted file mode 100644 index 47fdc3c..0000000 --- a/dfhack-proto/src/generated/messages/RemoteFortressReader.rs +++ /dev/null @@ -1,26841 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `RemoteFortressReader.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -#[derive(Hash, Eq)] -// @@protoc_insertion_point(message:RemoteFortressReader.Coord) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Coord { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Coord.x) - pub x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Coord.y) - pub y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Coord.z) - pub z: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Coord.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Coord { - fn default() -> &'a Coord { - ::default_instance() - } -} - -impl Coord { - pub fn new() -> Coord { - ::std::default::Default::default() - } - - // optional int32 x = 1; - - pub fn x(&self) -> i32 { - self.x.unwrap_or(0) - } - - pub fn clear_x(&mut self) { - self.x = ::std::option::Option::None; - } - - pub fn has_x(&self) -> bool { - self.x.is_some() - } - - // Param is passed by value, moved - pub fn set_x(&mut self, v: i32) { - self.x = ::std::option::Option::Some(v); - } - - // optional int32 y = 2; - - pub fn y(&self) -> i32 { - self.y.unwrap_or(0) - } - - pub fn clear_y(&mut self) { - self.y = ::std::option::Option::None; - } - - pub fn has_y(&self) -> bool { - self.y.is_some() - } - - // Param is passed by value, moved - pub fn set_y(&mut self, v: i32) { - self.y = ::std::option::Option::Some(v); - } - - // optional int32 z = 3; - - pub fn z(&self) -> i32 { - self.z.unwrap_or(0) - } - - pub fn clear_z(&mut self) { - self.z = ::std::option::Option::None; - } - - pub fn has_z(&self) -> bool { - self.z.is_some() - } - - // Param is passed by value, moved - pub fn set_z(&mut self, v: i32) { - self.z = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "x", - |m: &Coord| { &m.x }, - |m: &mut Coord| { &mut m.x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "y", - |m: &Coord| { &m.y }, - |m: &mut Coord| { &mut m.y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "z", - |m: &Coord| { &m.z }, - |m: &mut Coord| { &mut m.z }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Coord", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Coord { - const NAME: &'static str = "Coord"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.z = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.z { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.x { - os.write_int32(1, v)?; - } - if let Some(v) = self.y { - os.write_int32(2, v)?; - } - if let Some(v) = self.z { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Coord { - Coord::new() - } - - fn clear(&mut self) { - self.x = ::std::option::Option::None; - self.y = ::std::option::Option::None; - self.z = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Coord { - static instance: Coord = Coord { - x: ::std::option::Option::None, - y: ::std::option::Option::None, - z: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Coord { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Coord").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Coord { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Coord { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Tiletype) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Tiletype { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.caption) - pub caption: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.shape) - pub shape: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.special) - pub special: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.material) - pub material: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.variant) - pub variant: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Tiletype.direction) - pub direction: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Tiletype.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Tiletype { - fn default() -> &'a Tiletype { - ::default_instance() - } -} - -impl Tiletype { - pub fn new() -> Tiletype { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // optional string name = 2; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string caption = 3; - - pub fn caption(&self) -> &str { - match self.caption.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_caption(&mut self) { - self.caption = ::std::option::Option::None; - } - - pub fn has_caption(&self) -> bool { - self.caption.is_some() - } - - // Param is passed by value, moved - pub fn set_caption(&mut self, v: ::std::string::String) { - self.caption = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_caption(&mut self) -> &mut ::std::string::String { - if self.caption.is_none() { - self.caption = ::std::option::Option::Some(::std::string::String::new()); - } - self.caption.as_mut().unwrap() - } - - // Take field - pub fn take_caption(&mut self) -> ::std::string::String { - self.caption.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional .RemoteFortressReader.TiletypeShape shape = 4; - - pub fn shape(&self) -> TiletypeShape { - match self.shape { - Some(e) => e.enum_value_or(TiletypeShape::NO_SHAPE), - None => TiletypeShape::NO_SHAPE, - } - } - - pub fn clear_shape(&mut self) { - self.shape = ::std::option::Option::None; - } - - pub fn has_shape(&self) -> bool { - self.shape.is_some() - } - - // Param is passed by value, moved - pub fn set_shape(&mut self, v: TiletypeShape) { - self.shape = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional .RemoteFortressReader.TiletypeSpecial special = 5; - - pub fn special(&self) -> TiletypeSpecial { - match self.special { - Some(e) => e.enum_value_or(TiletypeSpecial::NO_SPECIAL), - None => TiletypeSpecial::NO_SPECIAL, - } - } - - pub fn clear_special(&mut self) { - self.special = ::std::option::Option::None; - } - - pub fn has_special(&self) -> bool { - self.special.is_some() - } - - // Param is passed by value, moved - pub fn set_special(&mut self, v: TiletypeSpecial) { - self.special = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional .RemoteFortressReader.TiletypeMaterial material = 6; - - pub fn material(&self) -> TiletypeMaterial { - match self.material { - Some(e) => e.enum_value_or(TiletypeMaterial::NO_MATERIAL), - None => TiletypeMaterial::NO_MATERIAL, - } - } - - pub fn clear_material(&mut self) { - self.material = ::std::option::Option::None; - } - - pub fn has_material(&self) -> bool { - self.material.is_some() - } - - // Param is passed by value, moved - pub fn set_material(&mut self, v: TiletypeMaterial) { - self.material = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional .RemoteFortressReader.TiletypeVariant variant = 7; - - pub fn variant(&self) -> TiletypeVariant { - match self.variant { - Some(e) => e.enum_value_or(TiletypeVariant::NO_VARIANT), - None => TiletypeVariant::NO_VARIANT, - } - } - - pub fn clear_variant(&mut self) { - self.variant = ::std::option::Option::None; - } - - pub fn has_variant(&self) -> bool { - self.variant.is_some() - } - - // Param is passed by value, moved - pub fn set_variant(&mut self, v: TiletypeVariant) { - self.variant = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional string direction = 8; - - pub fn direction(&self) -> &str { - match self.direction.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_direction(&mut self) { - self.direction = ::std::option::Option::None; - } - - pub fn has_direction(&self) -> bool { - self.direction.is_some() - } - - // Param is passed by value, moved - pub fn set_direction(&mut self, v: ::std::string::String) { - self.direction = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_direction(&mut self) -> &mut ::std::string::String { - if self.direction.is_none() { - self.direction = ::std::option::Option::Some(::std::string::String::new()); - } - self.direction.as_mut().unwrap() - } - - // Take field - pub fn take_direction(&mut self) -> ::std::string::String { - self.direction.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &Tiletype| { &m.id }, - |m: &mut Tiletype| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &Tiletype| { &m.name }, - |m: &mut Tiletype| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caption", - |m: &Tiletype| { &m.caption }, - |m: &mut Tiletype| { &mut m.caption }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "shape", - |m: &Tiletype| { &m.shape }, - |m: &mut Tiletype| { &mut m.shape }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "special", - |m: &Tiletype| { &m.special }, - |m: &mut Tiletype| { &mut m.special }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "material", - |m: &Tiletype| { &m.material }, - |m: &mut Tiletype| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "variant", - |m: &Tiletype| { &m.variant }, - |m: &mut Tiletype| { &mut m.variant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "direction", - |m: &Tiletype| { &m.direction }, - |m: &mut Tiletype| { &mut m.direction }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Tiletype", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Tiletype { - const NAME: &'static str = "Tiletype"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.caption = ::std::option::Option::Some(is.read_string()?); - }, - 32 => { - self.shape = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 40 => { - self.special = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 48 => { - self.material = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 56 => { - self.variant = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 66 => { - self.direction = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.caption.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.shape { - my_size += ::protobuf::rt::int32_size(4, v.value()); - } - if let Some(v) = self.special { - my_size += ::protobuf::rt::int32_size(5, v.value()); - } - if let Some(v) = self.material { - my_size += ::protobuf::rt::int32_size(6, v.value()); - } - if let Some(v) = self.variant { - my_size += ::protobuf::rt::int32_size(7, v.value()); - } - if let Some(v) = self.direction.as_ref() { - my_size += ::protobuf::rt::string_size(8, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.caption.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.shape { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.special { - os.write_enum(5, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.material { - os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.variant { - os.write_enum(7, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.direction.as_ref() { - os.write_string(8, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Tiletype { - Tiletype::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.caption = ::std::option::Option::None; - self.shape = ::std::option::Option::None; - self.special = ::std::option::Option::None; - self.material = ::std::option::Option::None; - self.variant = ::std::option::Option::None; - self.direction = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Tiletype { - static instance: Tiletype = Tiletype { - id: ::std::option::Option::None, - name: ::std::option::Option::None, - caption: ::std::option::Option::None, - shape: ::std::option::Option::None, - special: ::std::option::Option::None, - material: ::std::option::Option::None, - variant: ::std::option::Option::None, - direction: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Tiletype { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Tiletype").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Tiletype { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Tiletype { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.TiletypeList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TiletypeList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.TiletypeList.tiletype_list) - pub tiletype_list: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.TiletypeList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TiletypeList { - fn default() -> &'a TiletypeList { - ::default_instance() - } -} - -impl TiletypeList { - pub fn new() -> TiletypeList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tiletype_list", - |m: &TiletypeList| { &m.tiletype_list }, - |m: &mut TiletypeList| { &mut m.tiletype_list }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TiletypeList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TiletypeList { - const NAME: &'static str = "TiletypeList"; - - fn is_initialized(&self) -> bool { - for v in &self.tiletype_list { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.tiletype_list.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.tiletype_list { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.tiletype_list { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TiletypeList { - TiletypeList::new() - } - - fn clear(&mut self) { - self.tiletype_list.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TiletypeList { - static instance: TiletypeList = TiletypeList { - tiletype_list: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TiletypeList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TiletypeList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TiletypeList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TiletypeList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BuildingExtents) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildingExtents { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingExtents.pos_x) - pub pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingExtents.pos_y) - pub pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingExtents.width) - pub width: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingExtents.height) - pub height: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingExtents.extents) - pub extents: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BuildingExtents.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildingExtents { - fn default() -> &'a BuildingExtents { - ::default_instance() - } -} - -impl BuildingExtents { - pub fn new() -> BuildingExtents { - ::std::default::Default::default() - } - - // required int32 pos_x = 1; - - pub fn pos_x(&self) -> i32 { - self.pos_x.unwrap_or(0) - } - - pub fn clear_pos_x(&mut self) { - self.pos_x = ::std::option::Option::None; - } - - pub fn has_pos_x(&self) -> bool { - self.pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x(&mut self, v: i32) { - self.pos_x = ::std::option::Option::Some(v); - } - - // required int32 pos_y = 2; - - pub fn pos_y(&self) -> i32 { - self.pos_y.unwrap_or(0) - } - - pub fn clear_pos_y(&mut self) { - self.pos_y = ::std::option::Option::None; - } - - pub fn has_pos_y(&self) -> bool { - self.pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y(&mut self, v: i32) { - self.pos_y = ::std::option::Option::Some(v); - } - - // required int32 width = 3; - - pub fn width(&self) -> i32 { - self.width.unwrap_or(0) - } - - pub fn clear_width(&mut self) { - self.width = ::std::option::Option::None; - } - - pub fn has_width(&self) -> bool { - self.width.is_some() - } - - // Param is passed by value, moved - pub fn set_width(&mut self, v: i32) { - self.width = ::std::option::Option::Some(v); - } - - // required int32 height = 4; - - pub fn height(&self) -> i32 { - self.height.unwrap_or(0) - } - - pub fn clear_height(&mut self) { - self.height = ::std::option::Option::None; - } - - pub fn has_height(&self) -> bool { - self.height.is_some() - } - - // Param is passed by value, moved - pub fn set_height(&mut self, v: i32) { - self.height = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x", - |m: &BuildingExtents| { &m.pos_x }, - |m: &mut BuildingExtents| { &mut m.pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y", - |m: &BuildingExtents| { &m.pos_y }, - |m: &mut BuildingExtents| { &mut m.pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "width", - |m: &BuildingExtents| { &m.width }, - |m: &mut BuildingExtents| { &mut m.width }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "height", - |m: &BuildingExtents| { &m.height }, - |m: &mut BuildingExtents| { &mut m.height }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "extents", - |m: &BuildingExtents| { &m.extents }, - |m: &mut BuildingExtents| { &mut m.extents }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildingExtents", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildingExtents { - const NAME: &'static str = "BuildingExtents"; - - fn is_initialized(&self) -> bool { - if self.pos_x.is_none() { - return false; - } - if self.pos_y.is_none() { - return false; - } - if self.width.is_none() { - return false; - } - if self.height.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.width = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.height = ::std::option::Option::Some(is.read_int32()?); - }, - 42 => { - is.read_repeated_packed_int32_into(&mut self.extents)?; - }, - 40 => { - self.extents.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.pos_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.width { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.height { - my_size += ::protobuf::rt::int32_size(4, v); - } - for value in &self.extents { - my_size += ::protobuf::rt::int32_size(5, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.pos_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.width { - os.write_int32(3, v)?; - } - if let Some(v) = self.height { - os.write_int32(4, v)?; - } - for v in &self.extents { - os.write_int32(5, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildingExtents { - BuildingExtents::new() - } - - fn clear(&mut self) { - self.pos_x = ::std::option::Option::None; - self.pos_y = ::std::option::Option::None; - self.width = ::std::option::Option::None; - self.height = ::std::option::Option::None; - self.extents.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildingExtents { - static instance: BuildingExtents = BuildingExtents { - pos_x: ::std::option::Option::None, - pos_y: ::std::option::Option::None, - width: ::std::option::Option::None, - height: ::std::option::Option::None, - extents: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildingExtents { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildingExtents").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildingExtents { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildingExtents { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BuildingItem) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildingItem { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingItem.item) - pub item: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingItem.mode) - pub mode: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BuildingItem.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildingItem { - fn default() -> &'a BuildingItem { - ::default_instance() - } -} - -impl BuildingItem { - pub fn new() -> BuildingItem { - ::std::default::Default::default() - } - - // optional int32 mode = 2; - - pub fn mode(&self) -> i32 { - self.mode.unwrap_or(0) - } - - pub fn clear_mode(&mut self) { - self.mode = ::std::option::Option::None; - } - - pub fn has_mode(&self) -> bool { - self.mode.is_some() - } - - // Param is passed by value, moved - pub fn set_mode(&mut self, v: i32) { - self.mode = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Item>( - "item", - |m: &BuildingItem| { &m.item }, - |m: &mut BuildingItem| { &mut m.item }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mode", - |m: &BuildingItem| { &m.mode }, - |m: &mut BuildingItem| { &mut m.mode }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildingItem", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildingItem { - const NAME: &'static str = "BuildingItem"; - - fn is_initialized(&self) -> bool { - for v in &self.item { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.item)?; - }, - 16 => { - self.mode = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.item.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.mode { - my_size += ::protobuf::rt::int32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.item.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.mode { - os.write_int32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildingItem { - BuildingItem::new() - } - - fn clear(&mut self) { - self.item.clear(); - self.mode = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildingItem { - static instance: BuildingItem = BuildingItem { - item: ::protobuf::MessageField::none(), - mode: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildingItem { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildingItem").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildingItem { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildingItem { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BuildingInstance) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildingInstance { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.pos_x_min) - pub pos_x_min: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.pos_y_min) - pub pos_y_min: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.pos_z_min) - pub pos_z_min: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.pos_x_max) - pub pos_x_max: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.pos_y_max) - pub pos_y_max: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.pos_z_max) - pub pos_z_max: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.building_type) - pub building_type: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.building_flags) - pub building_flags: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.is_room) - pub is_room: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.room) - pub room: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.direction) - pub direction: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.items) - pub items: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingInstance.active) - pub active: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BuildingInstance.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildingInstance { - fn default() -> &'a BuildingInstance { - ::default_instance() - } -} - -impl BuildingInstance { - pub fn new() -> BuildingInstance { - ::std::default::Default::default() - } - - // required int32 index = 1; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // optional int32 pos_x_min = 2; - - pub fn pos_x_min(&self) -> i32 { - self.pos_x_min.unwrap_or(0) - } - - pub fn clear_pos_x_min(&mut self) { - self.pos_x_min = ::std::option::Option::None; - } - - pub fn has_pos_x_min(&self) -> bool { - self.pos_x_min.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x_min(&mut self, v: i32) { - self.pos_x_min = ::std::option::Option::Some(v); - } - - // optional int32 pos_y_min = 3; - - pub fn pos_y_min(&self) -> i32 { - self.pos_y_min.unwrap_or(0) - } - - pub fn clear_pos_y_min(&mut self) { - self.pos_y_min = ::std::option::Option::None; - } - - pub fn has_pos_y_min(&self) -> bool { - self.pos_y_min.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y_min(&mut self, v: i32) { - self.pos_y_min = ::std::option::Option::Some(v); - } - - // optional int32 pos_z_min = 4; - - pub fn pos_z_min(&self) -> i32 { - self.pos_z_min.unwrap_or(0) - } - - pub fn clear_pos_z_min(&mut self) { - self.pos_z_min = ::std::option::Option::None; - } - - pub fn has_pos_z_min(&self) -> bool { - self.pos_z_min.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_z_min(&mut self, v: i32) { - self.pos_z_min = ::std::option::Option::Some(v); - } - - // optional int32 pos_x_max = 5; - - pub fn pos_x_max(&self) -> i32 { - self.pos_x_max.unwrap_or(0) - } - - pub fn clear_pos_x_max(&mut self) { - self.pos_x_max = ::std::option::Option::None; - } - - pub fn has_pos_x_max(&self) -> bool { - self.pos_x_max.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x_max(&mut self, v: i32) { - self.pos_x_max = ::std::option::Option::Some(v); - } - - // optional int32 pos_y_max = 6; - - pub fn pos_y_max(&self) -> i32 { - self.pos_y_max.unwrap_or(0) - } - - pub fn clear_pos_y_max(&mut self) { - self.pos_y_max = ::std::option::Option::None; - } - - pub fn has_pos_y_max(&self) -> bool { - self.pos_y_max.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y_max(&mut self, v: i32) { - self.pos_y_max = ::std::option::Option::Some(v); - } - - // optional int32 pos_z_max = 7; - - pub fn pos_z_max(&self) -> i32 { - self.pos_z_max.unwrap_or(0) - } - - pub fn clear_pos_z_max(&mut self) { - self.pos_z_max = ::std::option::Option::None; - } - - pub fn has_pos_z_max(&self) -> bool { - self.pos_z_max.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_z_max(&mut self, v: i32) { - self.pos_z_max = ::std::option::Option::Some(v); - } - - // optional uint32 building_flags = 10; - - pub fn building_flags(&self) -> u32 { - self.building_flags.unwrap_or(0) - } - - pub fn clear_building_flags(&mut self) { - self.building_flags = ::std::option::Option::None; - } - - pub fn has_building_flags(&self) -> bool { - self.building_flags.is_some() - } - - // Param is passed by value, moved - pub fn set_building_flags(&mut self, v: u32) { - self.building_flags = ::std::option::Option::Some(v); - } - - // optional bool is_room = 11; - - pub fn is_room(&self) -> bool { - self.is_room.unwrap_or(false) - } - - pub fn clear_is_room(&mut self) { - self.is_room = ::std::option::Option::None; - } - - pub fn has_is_room(&self) -> bool { - self.is_room.is_some() - } - - // Param is passed by value, moved - pub fn set_is_room(&mut self, v: bool) { - self.is_room = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.BuildingDirection direction = 13; - - pub fn direction(&self) -> BuildingDirection { - match self.direction { - Some(e) => e.enum_value_or(BuildingDirection::NORTH), - None => BuildingDirection::NORTH, - } - } - - pub fn clear_direction(&mut self) { - self.direction = ::std::option::Option::None; - } - - pub fn has_direction(&self) -> bool { - self.direction.is_some() - } - - // Param is passed by value, moved - pub fn set_direction(&mut self, v: BuildingDirection) { - self.direction = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional int32 active = 15; - - pub fn active(&self) -> i32 { - self.active.unwrap_or(0) - } - - pub fn clear_active(&mut self) { - self.active = ::std::option::Option::None; - } - - pub fn has_active(&self) -> bool { - self.active.is_some() - } - - // Param is passed by value, moved - pub fn set_active(&mut self, v: i32) { - self.active = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(15); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &BuildingInstance| { &m.index }, - |m: &mut BuildingInstance| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x_min", - |m: &BuildingInstance| { &m.pos_x_min }, - |m: &mut BuildingInstance| { &mut m.pos_x_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y_min", - |m: &BuildingInstance| { &m.pos_y_min }, - |m: &mut BuildingInstance| { &mut m.pos_y_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_z_min", - |m: &BuildingInstance| { &m.pos_z_min }, - |m: &mut BuildingInstance| { &mut m.pos_z_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x_max", - |m: &BuildingInstance| { &m.pos_x_max }, - |m: &mut BuildingInstance| { &mut m.pos_x_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y_max", - |m: &BuildingInstance| { &m.pos_y_max }, - |m: &mut BuildingInstance| { &mut m.pos_y_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_z_max", - |m: &BuildingInstance| { &m.pos_z_max }, - |m: &mut BuildingInstance| { &mut m.pos_z_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, BuildingType>( - "building_type", - |m: &BuildingInstance| { &m.building_type }, - |m: &mut BuildingInstance| { &mut m.building_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &BuildingInstance| { &m.material }, - |m: &mut BuildingInstance| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "building_flags", - |m: &BuildingInstance| { &m.building_flags }, - |m: &mut BuildingInstance| { &mut m.building_flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "is_room", - |m: &BuildingInstance| { &m.is_room }, - |m: &mut BuildingInstance| { &mut m.is_room }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, BuildingExtents>( - "room", - |m: &BuildingInstance| { &m.room }, - |m: &mut BuildingInstance| { &mut m.room }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "direction", - |m: &BuildingInstance| { &m.direction }, - |m: &mut BuildingInstance| { &mut m.direction }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "items", - |m: &BuildingInstance| { &m.items }, - |m: &mut BuildingInstance| { &mut m.items }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "active", - |m: &BuildingInstance| { &m.active }, - |m: &mut BuildingInstance| { &mut m.active }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildingInstance", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildingInstance { - const NAME: &'static str = "BuildingInstance"; - - fn is_initialized(&self) -> bool { - if self.index.is_none() { - return false; - } - for v in &self.building_type { - if !v.is_initialized() { - return false; - } - }; - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.room { - if !v.is_initialized() { - return false; - } - }; - for v in &self.items { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.pos_x_min = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.pos_y_min = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.pos_z_min = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.pos_x_max = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.pos_y_max = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.pos_z_max = ::std::option::Option::Some(is.read_int32()?); - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.building_type)?; - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 80 => { - self.building_flags = ::std::option::Option::Some(is.read_uint32()?); - }, - 88 => { - self.is_room = ::std::option::Option::Some(is.read_bool()?); - }, - 98 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.room)?; - }, - 104 => { - self.direction = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 114 => { - self.items.push(is.read_message()?); - }, - 120 => { - self.active = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos_x_min { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.pos_y_min { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.pos_z_min { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.pos_x_max { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.pos_y_max { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.pos_z_max { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.building_type.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.building_flags { - my_size += ::protobuf::rt::uint32_size(10, v); - } - if let Some(v) = self.is_room { - my_size += 1 + 1; - } - if let Some(v) = self.room.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.direction { - my_size += ::protobuf::rt::int32_size(13, v.value()); - } - for value in &self.items { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.active { - my_size += ::protobuf::rt::int32_size(15, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.index { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos_x_min { - os.write_int32(2, v)?; - } - if let Some(v) = self.pos_y_min { - os.write_int32(3, v)?; - } - if let Some(v) = self.pos_z_min { - os.write_int32(4, v)?; - } - if let Some(v) = self.pos_x_max { - os.write_int32(5, v)?; - } - if let Some(v) = self.pos_y_max { - os.write_int32(6, v)?; - } - if let Some(v) = self.pos_z_max { - os.write_int32(7, v)?; - } - if let Some(v) = self.building_type.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if let Some(v) = self.building_flags { - os.write_uint32(10, v)?; - } - if let Some(v) = self.is_room { - os.write_bool(11, v)?; - } - if let Some(v) = self.room.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - } - if let Some(v) = self.direction { - os.write_enum(13, ::protobuf::EnumOrUnknown::value(&v))?; - } - for v in &self.items { - ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?; - }; - if let Some(v) = self.active { - os.write_int32(15, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildingInstance { - BuildingInstance::new() - } - - fn clear(&mut self) { - self.index = ::std::option::Option::None; - self.pos_x_min = ::std::option::Option::None; - self.pos_y_min = ::std::option::Option::None; - self.pos_z_min = ::std::option::Option::None; - self.pos_x_max = ::std::option::Option::None; - self.pos_y_max = ::std::option::Option::None; - self.pos_z_max = ::std::option::Option::None; - self.building_type.clear(); - self.material.clear(); - self.building_flags = ::std::option::Option::None; - self.is_room = ::std::option::Option::None; - self.room.clear(); - self.direction = ::std::option::Option::None; - self.items.clear(); - self.active = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildingInstance { - static instance: BuildingInstance = BuildingInstance { - index: ::std::option::Option::None, - pos_x_min: ::std::option::Option::None, - pos_y_min: ::std::option::Option::None, - pos_z_min: ::std::option::Option::None, - pos_x_max: ::std::option::Option::None, - pos_y_max: ::std::option::Option::None, - pos_z_max: ::std::option::Option::None, - building_type: ::protobuf::MessageField::none(), - material: ::protobuf::MessageField::none(), - building_flags: ::std::option::Option::None, - is_room: ::std::option::Option::None, - room: ::protobuf::MessageField::none(), - direction: ::std::option::Option::None, - items: ::std::vec::Vec::new(), - active: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildingInstance { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildingInstance").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildingInstance { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildingInstance { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.RiverEdge) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RiverEdge { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.RiverEdge.min_pos) - pub min_pos: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RiverEdge.max_pos) - pub max_pos: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RiverEdge.active) - pub active: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RiverEdge.elevation) - pub elevation: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.RiverEdge.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RiverEdge { - fn default() -> &'a RiverEdge { - ::default_instance() - } -} - -impl RiverEdge { - pub fn new() -> RiverEdge { - ::std::default::Default::default() - } - - // optional int32 min_pos = 1; - - pub fn min_pos(&self) -> i32 { - self.min_pos.unwrap_or(0) - } - - pub fn clear_min_pos(&mut self) { - self.min_pos = ::std::option::Option::None; - } - - pub fn has_min_pos(&self) -> bool { - self.min_pos.is_some() - } - - // Param is passed by value, moved - pub fn set_min_pos(&mut self, v: i32) { - self.min_pos = ::std::option::Option::Some(v); - } - - // optional int32 max_pos = 2; - - pub fn max_pos(&self) -> i32 { - self.max_pos.unwrap_or(0) - } - - pub fn clear_max_pos(&mut self) { - self.max_pos = ::std::option::Option::None; - } - - pub fn has_max_pos(&self) -> bool { - self.max_pos.is_some() - } - - // Param is passed by value, moved - pub fn set_max_pos(&mut self, v: i32) { - self.max_pos = ::std::option::Option::Some(v); - } - - // optional int32 active = 3; - - pub fn active(&self) -> i32 { - self.active.unwrap_or(0) - } - - pub fn clear_active(&mut self) { - self.active = ::std::option::Option::None; - } - - pub fn has_active(&self) -> bool { - self.active.is_some() - } - - // Param is passed by value, moved - pub fn set_active(&mut self, v: i32) { - self.active = ::std::option::Option::Some(v); - } - - // optional int32 elevation = 4; - - pub fn elevation(&self) -> i32 { - self.elevation.unwrap_or(0) - } - - pub fn clear_elevation(&mut self) { - self.elevation = ::std::option::Option::None; - } - - pub fn has_elevation(&self) -> bool { - self.elevation.is_some() - } - - // Param is passed by value, moved - pub fn set_elevation(&mut self, v: i32) { - self.elevation = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "min_pos", - |m: &RiverEdge| { &m.min_pos }, - |m: &mut RiverEdge| { &mut m.min_pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_pos", - |m: &RiverEdge| { &m.max_pos }, - |m: &mut RiverEdge| { &mut m.max_pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "active", - |m: &RiverEdge| { &m.active }, - |m: &mut RiverEdge| { &mut m.active }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "elevation", - |m: &RiverEdge| { &m.elevation }, - |m: &mut RiverEdge| { &mut m.elevation }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RiverEdge", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RiverEdge { - const NAME: &'static str = "RiverEdge"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.min_pos = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.max_pos = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.active = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.elevation = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.min_pos { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.max_pos { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.active { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.elevation { - my_size += ::protobuf::rt::int32_size(4, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.min_pos { - os.write_int32(1, v)?; - } - if let Some(v) = self.max_pos { - os.write_int32(2, v)?; - } - if let Some(v) = self.active { - os.write_int32(3, v)?; - } - if let Some(v) = self.elevation { - os.write_int32(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RiverEdge { - RiverEdge::new() - } - - fn clear(&mut self) { - self.min_pos = ::std::option::Option::None; - self.max_pos = ::std::option::Option::None; - self.active = ::std::option::Option::None; - self.elevation = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RiverEdge { - static instance: RiverEdge = RiverEdge { - min_pos: ::std::option::Option::None, - max_pos: ::std::option::Option::None, - active: ::std::option::Option::None, - elevation: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RiverEdge { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RiverEdge").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RiverEdge { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RiverEdge { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.RiverTile) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RiverTile { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.RiverTile.north) - pub north: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.RiverTile.south) - pub south: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.RiverTile.east) - pub east: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.RiverTile.west) - pub west: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.RiverTile.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RiverTile { - fn default() -> &'a RiverTile { - ::default_instance() - } -} - -impl RiverTile { - pub fn new() -> RiverTile { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RiverEdge>( - "north", - |m: &RiverTile| { &m.north }, - |m: &mut RiverTile| { &mut m.north }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RiverEdge>( - "south", - |m: &RiverTile| { &m.south }, - |m: &mut RiverTile| { &mut m.south }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RiverEdge>( - "east", - |m: &RiverTile| { &m.east }, - |m: &mut RiverTile| { &mut m.east }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RiverEdge>( - "west", - |m: &RiverTile| { &m.west }, - |m: &mut RiverTile| { &mut m.west }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RiverTile", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RiverTile { - const NAME: &'static str = "RiverTile"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.north)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.south)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.east)?; - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.west)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.north.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.south.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.east.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.west.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.north.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.south.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.east.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.west.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RiverTile { - RiverTile::new() - } - - fn clear(&mut self) { - self.north.clear(); - self.south.clear(); - self.east.clear(); - self.west.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RiverTile { - static instance: RiverTile = RiverTile { - north: ::protobuf::MessageField::none(), - south: ::protobuf::MessageField::none(), - east: ::protobuf::MessageField::none(), - west: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RiverTile { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RiverTile").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RiverTile { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RiverTile { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Spatter) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Spatter { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Spatter.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Spatter.amount) - pub amount: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Spatter.state) - pub state: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Spatter.item) - pub item: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Spatter.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Spatter { - fn default() -> &'a Spatter { - ::default_instance() - } -} - -impl Spatter { - pub fn new() -> Spatter { - ::std::default::Default::default() - } - - // optional int32 amount = 2; - - pub fn amount(&self) -> i32 { - self.amount.unwrap_or(0) - } - - pub fn clear_amount(&mut self) { - self.amount = ::std::option::Option::None; - } - - pub fn has_amount(&self) -> bool { - self.amount.is_some() - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: i32) { - self.amount = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.MatterState state = 3; - - pub fn state(&self) -> MatterState { - match self.state { - Some(e) => e.enum_value_or(MatterState::Solid), - None => MatterState::Solid, - } - } - - pub fn clear_state(&mut self) { - self.state = ::std::option::Option::None; - } - - pub fn has_state(&self) -> bool { - self.state.is_some() - } - - // Param is passed by value, moved - pub fn set_state(&mut self, v: MatterState) { - self.state = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &Spatter| { &m.material }, - |m: &mut Spatter| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "amount", - |m: &Spatter| { &m.amount }, - |m: &mut Spatter| { &mut m.amount }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "state", - |m: &Spatter| { &m.state }, - |m: &mut Spatter| { &mut m.state }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "item", - |m: &Spatter| { &m.item }, - |m: &mut Spatter| { &mut m.item }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Spatter", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Spatter { - const NAME: &'static str = "Spatter"; - - fn is_initialized(&self) -> bool { - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.item { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 16 => { - self.amount = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.state = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.item)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.amount { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.state { - my_size += ::protobuf::rt::int32_size(3, v.value()); - } - if let Some(v) = self.item.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.amount { - os.write_int32(2, v)?; - } - if let Some(v) = self.state { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.item.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Spatter { - Spatter::new() - } - - fn clear(&mut self) { - self.material.clear(); - self.amount = ::std::option::Option::None; - self.state = ::std::option::Option::None; - self.item.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Spatter { - static instance: Spatter = Spatter { - material: ::protobuf::MessageField::none(), - amount: ::std::option::Option::None, - state: ::std::option::Option::None, - item: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Spatter { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Spatter").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Spatter { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Spatter { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.SpatterPile) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpatterPile { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.SpatterPile.spatters) - pub spatters: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.SpatterPile.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SpatterPile { - fn default() -> &'a SpatterPile { - ::default_instance() - } -} - -impl SpatterPile { - pub fn new() -> SpatterPile { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "spatters", - |m: &SpatterPile| { &m.spatters }, - |m: &mut SpatterPile| { &mut m.spatters }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SpatterPile", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SpatterPile { - const NAME: &'static str = "SpatterPile"; - - fn is_initialized(&self) -> bool { - for v in &self.spatters { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.spatters.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.spatters { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.spatters { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SpatterPile { - SpatterPile::new() - } - - fn clear(&mut self) { - self.spatters.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SpatterPile { - static instance: SpatterPile = SpatterPile { - spatters: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SpatterPile { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SpatterPile").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SpatterPile { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SpatterPile { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Item) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Item { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Item.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.pos) - pub pos: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.flags1) - pub flags1: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.flags2) - pub flags2: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.type) - pub type_: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.dye) - pub dye: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.stack_size) - pub stack_size: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.subpos_x) - pub subpos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.subpos_y) - pub subpos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.subpos_z) - pub subpos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.projectile) - pub projectile: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.velocity_x) - pub velocity_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.velocity_y) - pub velocity_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.velocity_z) - pub velocity_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.volume) - pub volume: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.improvements) - pub improvements: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.Item.image) - pub image: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Item.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Item { - fn default() -> &'a Item { - ::default_instance() - } -} - -impl Item { - pub fn new() -> Item { - ::std::default::Default::default() - } - - // optional int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // optional uint32 flags1 = 3; - - pub fn flags1(&self) -> u32 { - self.flags1.unwrap_or(0) - } - - pub fn clear_flags1(&mut self) { - self.flags1 = ::std::option::Option::None; - } - - pub fn has_flags1(&self) -> bool { - self.flags1.is_some() - } - - // Param is passed by value, moved - pub fn set_flags1(&mut self, v: u32) { - self.flags1 = ::std::option::Option::Some(v); - } - - // optional uint32 flags2 = 4; - - pub fn flags2(&self) -> u32 { - self.flags2.unwrap_or(0) - } - - pub fn clear_flags2(&mut self) { - self.flags2 = ::std::option::Option::None; - } - - pub fn has_flags2(&self) -> bool { - self.flags2.is_some() - } - - // Param is passed by value, moved - pub fn set_flags2(&mut self, v: u32) { - self.flags2 = ::std::option::Option::Some(v); - } - - // optional int32 stack_size = 8; - - pub fn stack_size(&self) -> i32 { - self.stack_size.unwrap_or(0) - } - - pub fn clear_stack_size(&mut self) { - self.stack_size = ::std::option::Option::None; - } - - pub fn has_stack_size(&self) -> bool { - self.stack_size.is_some() - } - - // Param is passed by value, moved - pub fn set_stack_size(&mut self, v: i32) { - self.stack_size = ::std::option::Option::Some(v); - } - - // optional float subpos_x = 9; - - pub fn subpos_x(&self) -> f32 { - self.subpos_x.unwrap_or(0.) - } - - pub fn clear_subpos_x(&mut self) { - self.subpos_x = ::std::option::Option::None; - } - - pub fn has_subpos_x(&self) -> bool { - self.subpos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_subpos_x(&mut self, v: f32) { - self.subpos_x = ::std::option::Option::Some(v); - } - - // optional float subpos_y = 10; - - pub fn subpos_y(&self) -> f32 { - self.subpos_y.unwrap_or(0.) - } - - pub fn clear_subpos_y(&mut self) { - self.subpos_y = ::std::option::Option::None; - } - - pub fn has_subpos_y(&self) -> bool { - self.subpos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_subpos_y(&mut self, v: f32) { - self.subpos_y = ::std::option::Option::Some(v); - } - - // optional float subpos_z = 11; - - pub fn subpos_z(&self) -> f32 { - self.subpos_z.unwrap_or(0.) - } - - pub fn clear_subpos_z(&mut self) { - self.subpos_z = ::std::option::Option::None; - } - - pub fn has_subpos_z(&self) -> bool { - self.subpos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_subpos_z(&mut self, v: f32) { - self.subpos_z = ::std::option::Option::Some(v); - } - - // optional bool projectile = 12; - - pub fn projectile(&self) -> bool { - self.projectile.unwrap_or(false) - } - - pub fn clear_projectile(&mut self) { - self.projectile = ::std::option::Option::None; - } - - pub fn has_projectile(&self) -> bool { - self.projectile.is_some() - } - - // Param is passed by value, moved - pub fn set_projectile(&mut self, v: bool) { - self.projectile = ::std::option::Option::Some(v); - } - - // optional float velocity_x = 13; - - pub fn velocity_x(&self) -> f32 { - self.velocity_x.unwrap_or(0.) - } - - pub fn clear_velocity_x(&mut self) { - self.velocity_x = ::std::option::Option::None; - } - - pub fn has_velocity_x(&self) -> bool { - self.velocity_x.is_some() - } - - // Param is passed by value, moved - pub fn set_velocity_x(&mut self, v: f32) { - self.velocity_x = ::std::option::Option::Some(v); - } - - // optional float velocity_y = 14; - - pub fn velocity_y(&self) -> f32 { - self.velocity_y.unwrap_or(0.) - } - - pub fn clear_velocity_y(&mut self) { - self.velocity_y = ::std::option::Option::None; - } - - pub fn has_velocity_y(&self) -> bool { - self.velocity_y.is_some() - } - - // Param is passed by value, moved - pub fn set_velocity_y(&mut self, v: f32) { - self.velocity_y = ::std::option::Option::Some(v); - } - - // optional float velocity_z = 15; - - pub fn velocity_z(&self) -> f32 { - self.velocity_z.unwrap_or(0.) - } - - pub fn clear_velocity_z(&mut self) { - self.velocity_z = ::std::option::Option::None; - } - - pub fn has_velocity_z(&self) -> bool { - self.velocity_z.is_some() - } - - // Param is passed by value, moved - pub fn set_velocity_z(&mut self, v: f32) { - self.velocity_z = ::std::option::Option::Some(v); - } - - // optional int32 volume = 16; - - pub fn volume(&self) -> i32 { - self.volume.unwrap_or(0) - } - - pub fn clear_volume(&mut self) { - self.volume = ::std::option::Option::None; - } - - pub fn has_volume(&self) -> bool { - self.volume.is_some() - } - - // Param is passed by value, moved - pub fn set_volume(&mut self, v: i32) { - self.volume = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(18); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &Item| { &m.id }, - |m: &mut Item| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "pos", - |m: &Item| { &m.pos }, - |m: &mut Item| { &mut m.pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags1", - |m: &Item| { &m.flags1 }, - |m: &mut Item| { &mut m.flags1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags2", - |m: &Item| { &m.flags2 }, - |m: &mut Item| { &mut m.flags2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "type", - |m: &Item| { &m.type_ }, - |m: &mut Item| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &Item| { &m.material }, - |m: &mut Item| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ColorDefinition>( - "dye", - |m: &Item| { &m.dye }, - |m: &mut Item| { &mut m.dye }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "stack_size", - |m: &Item| { &m.stack_size }, - |m: &mut Item| { &mut m.stack_size }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subpos_x", - |m: &Item| { &m.subpos_x }, - |m: &mut Item| { &mut m.subpos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subpos_y", - |m: &Item| { &m.subpos_y }, - |m: &mut Item| { &mut m.subpos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subpos_z", - |m: &Item| { &m.subpos_z }, - |m: &mut Item| { &mut m.subpos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "projectile", - |m: &Item| { &m.projectile }, - |m: &mut Item| { &mut m.projectile }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "velocity_x", - |m: &Item| { &m.velocity_x }, - |m: &mut Item| { &mut m.velocity_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "velocity_y", - |m: &Item| { &m.velocity_y }, - |m: &mut Item| { &mut m.velocity_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "velocity_z", - |m: &Item| { &m.velocity_z }, - |m: &mut Item| { &mut m.velocity_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "volume", - |m: &Item| { &m.volume }, - |m: &mut Item| { &mut m.volume }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "improvements", - |m: &Item| { &m.improvements }, - |m: &mut Item| { &mut m.improvements }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ArtImage>( - "image", - |m: &Item| { &m.image }, - |m: &mut Item| { &mut m.image }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Item", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Item { - const NAME: &'static str = "Item"; - - fn is_initialized(&self) -> bool { - for v in &self.pos { - if !v.is_initialized() { - return false; - } - }; - for v in &self.type_ { - if !v.is_initialized() { - return false; - } - }; - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.dye { - if !v.is_initialized() { - return false; - } - }; - for v in &self.improvements { - if !v.is_initialized() { - return false; - } - }; - for v in &self.image { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pos)?; - }, - 24 => { - self.flags1 = ::std::option::Option::Some(is.read_uint32()?); - }, - 32 => { - self.flags2 = ::std::option::Option::Some(is.read_uint32()?); - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.type_)?; - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.dye)?; - }, - 64 => { - self.stack_size = ::std::option::Option::Some(is.read_int32()?); - }, - 77 => { - self.subpos_x = ::std::option::Option::Some(is.read_float()?); - }, - 85 => { - self.subpos_y = ::std::option::Option::Some(is.read_float()?); - }, - 93 => { - self.subpos_z = ::std::option::Option::Some(is.read_float()?); - }, - 96 => { - self.projectile = ::std::option::Option::Some(is.read_bool()?); - }, - 109 => { - self.velocity_x = ::std::option::Option::Some(is.read_float()?); - }, - 117 => { - self.velocity_y = ::std::option::Option::Some(is.read_float()?); - }, - 125 => { - self.velocity_z = ::std::option::Option::Some(is.read_float()?); - }, - 128 => { - self.volume = ::std::option::Option::Some(is.read_int32()?); - }, - 138 => { - self.improvements.push(is.read_message()?); - }, - 146 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.image)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.flags1 { - my_size += ::protobuf::rt::uint32_size(3, v); - } - if let Some(v) = self.flags2 { - my_size += ::protobuf::rt::uint32_size(4, v); - } - if let Some(v) = self.type_.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.dye.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.stack_size { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.subpos_x { - my_size += 1 + 4; - } - if let Some(v) = self.subpos_y { - my_size += 1 + 4; - } - if let Some(v) = self.subpos_z { - my_size += 1 + 4; - } - if let Some(v) = self.projectile { - my_size += 1 + 1; - } - if let Some(v) = self.velocity_x { - my_size += 1 + 4; - } - if let Some(v) = self.velocity_y { - my_size += 1 + 4; - } - if let Some(v) = self.velocity_z { - my_size += 1 + 4; - } - if let Some(v) = self.volume { - my_size += ::protobuf::rt::int32_size(16, v); - } - for value in &self.improvements { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.image.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.flags1 { - os.write_uint32(3, v)?; - } - if let Some(v) = self.flags2 { - os.write_uint32(4, v)?; - } - if let Some(v) = self.type_.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - if let Some(v) = self.dye.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - if let Some(v) = self.stack_size { - os.write_int32(8, v)?; - } - if let Some(v) = self.subpos_x { - os.write_float(9, v)?; - } - if let Some(v) = self.subpos_y { - os.write_float(10, v)?; - } - if let Some(v) = self.subpos_z { - os.write_float(11, v)?; - } - if let Some(v) = self.projectile { - os.write_bool(12, v)?; - } - if let Some(v) = self.velocity_x { - os.write_float(13, v)?; - } - if let Some(v) = self.velocity_y { - os.write_float(14, v)?; - } - if let Some(v) = self.velocity_z { - os.write_float(15, v)?; - } - if let Some(v) = self.volume { - os.write_int32(16, v)?; - } - for v in &self.improvements { - ::protobuf::rt::write_message_field_with_cached_size(17, v, os)?; - }; - if let Some(v) = self.image.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(18, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Item { - Item::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.pos.clear(); - self.flags1 = ::std::option::Option::None; - self.flags2 = ::std::option::Option::None; - self.type_.clear(); - self.material.clear(); - self.dye.clear(); - self.stack_size = ::std::option::Option::None; - self.subpos_x = ::std::option::Option::None; - self.subpos_y = ::std::option::Option::None; - self.subpos_z = ::std::option::Option::None; - self.projectile = ::std::option::Option::None; - self.velocity_x = ::std::option::Option::None; - self.velocity_y = ::std::option::Option::None; - self.velocity_z = ::std::option::Option::None; - self.volume = ::std::option::Option::None; - self.improvements.clear(); - self.image.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Item { - static instance: Item = Item { - id: ::std::option::Option::None, - pos: ::protobuf::MessageField::none(), - flags1: ::std::option::Option::None, - flags2: ::std::option::Option::None, - type_: ::protobuf::MessageField::none(), - material: ::protobuf::MessageField::none(), - dye: ::protobuf::MessageField::none(), - stack_size: ::std::option::Option::None, - subpos_x: ::std::option::Option::None, - subpos_y: ::std::option::Option::None, - subpos_z: ::std::option::Option::None, - projectile: ::std::option::Option::None, - velocity_x: ::std::option::Option::None, - velocity_y: ::std::option::Option::None, - velocity_z: ::std::option::Option::None, - volume: ::std::option::Option::None, - improvements: ::std::vec::Vec::new(), - image: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Item { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Item").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Item { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Item { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PlantTile) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PlantTile { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.trunk) - pub trunk: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.connection_east) - pub connection_east: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.connection_south) - pub connection_south: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.connection_west) - pub connection_west: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.connection_north) - pub connection_north: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.branches) - pub branches: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.twigs) - pub twigs: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantTile.tile_type) - pub tile_type: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PlantTile.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PlantTile { - fn default() -> &'a PlantTile { - ::default_instance() - } -} - -impl PlantTile { - pub fn new() -> PlantTile { - ::std::default::Default::default() - } - - // optional bool trunk = 1; - - pub fn trunk(&self) -> bool { - self.trunk.unwrap_or(false) - } - - pub fn clear_trunk(&mut self) { - self.trunk = ::std::option::Option::None; - } - - pub fn has_trunk(&self) -> bool { - self.trunk.is_some() - } - - // Param is passed by value, moved - pub fn set_trunk(&mut self, v: bool) { - self.trunk = ::std::option::Option::Some(v); - } - - // optional bool connection_east = 2; - - pub fn connection_east(&self) -> bool { - self.connection_east.unwrap_or(false) - } - - pub fn clear_connection_east(&mut self) { - self.connection_east = ::std::option::Option::None; - } - - pub fn has_connection_east(&self) -> bool { - self.connection_east.is_some() - } - - // Param is passed by value, moved - pub fn set_connection_east(&mut self, v: bool) { - self.connection_east = ::std::option::Option::Some(v); - } - - // optional bool connection_south = 3; - - pub fn connection_south(&self) -> bool { - self.connection_south.unwrap_or(false) - } - - pub fn clear_connection_south(&mut self) { - self.connection_south = ::std::option::Option::None; - } - - pub fn has_connection_south(&self) -> bool { - self.connection_south.is_some() - } - - // Param is passed by value, moved - pub fn set_connection_south(&mut self, v: bool) { - self.connection_south = ::std::option::Option::Some(v); - } - - // optional bool connection_west = 4; - - pub fn connection_west(&self) -> bool { - self.connection_west.unwrap_or(false) - } - - pub fn clear_connection_west(&mut self) { - self.connection_west = ::std::option::Option::None; - } - - pub fn has_connection_west(&self) -> bool { - self.connection_west.is_some() - } - - // Param is passed by value, moved - pub fn set_connection_west(&mut self, v: bool) { - self.connection_west = ::std::option::Option::Some(v); - } - - // optional bool connection_north = 5; - - pub fn connection_north(&self) -> bool { - self.connection_north.unwrap_or(false) - } - - pub fn clear_connection_north(&mut self) { - self.connection_north = ::std::option::Option::None; - } - - pub fn has_connection_north(&self) -> bool { - self.connection_north.is_some() - } - - // Param is passed by value, moved - pub fn set_connection_north(&mut self, v: bool) { - self.connection_north = ::std::option::Option::Some(v); - } - - // optional bool branches = 6; - - pub fn branches(&self) -> bool { - self.branches.unwrap_or(false) - } - - pub fn clear_branches(&mut self) { - self.branches = ::std::option::Option::None; - } - - pub fn has_branches(&self) -> bool { - self.branches.is_some() - } - - // Param is passed by value, moved - pub fn set_branches(&mut self, v: bool) { - self.branches = ::std::option::Option::Some(v); - } - - // optional bool twigs = 7; - - pub fn twigs(&self) -> bool { - self.twigs.unwrap_or(false) - } - - pub fn clear_twigs(&mut self) { - self.twigs = ::std::option::Option::None; - } - - pub fn has_twigs(&self) -> bool { - self.twigs.is_some() - } - - // Param is passed by value, moved - pub fn set_twigs(&mut self, v: bool) { - self.twigs = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.TiletypeSpecial tile_type = 8; - - pub fn tile_type(&self) -> TiletypeSpecial { - match self.tile_type { - Some(e) => e.enum_value_or(TiletypeSpecial::NO_SPECIAL), - None => TiletypeSpecial::NO_SPECIAL, - } - } - - pub fn clear_tile_type(&mut self) { - self.tile_type = ::std::option::Option::None; - } - - pub fn has_tile_type(&self) -> bool { - self.tile_type.is_some() - } - - // Param is passed by value, moved - pub fn set_tile_type(&mut self, v: TiletypeSpecial) { - self.tile_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "trunk", - |m: &PlantTile| { &m.trunk }, - |m: &mut PlantTile| { &mut m.trunk }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "connection_east", - |m: &PlantTile| { &m.connection_east }, - |m: &mut PlantTile| { &mut m.connection_east }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "connection_south", - |m: &PlantTile| { &m.connection_south }, - |m: &mut PlantTile| { &mut m.connection_south }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "connection_west", - |m: &PlantTile| { &m.connection_west }, - |m: &mut PlantTile| { &mut m.connection_west }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "connection_north", - |m: &PlantTile| { &m.connection_north }, - |m: &mut PlantTile| { &mut m.connection_north }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "branches", - |m: &PlantTile| { &m.branches }, - |m: &mut PlantTile| { &mut m.branches }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "twigs", - |m: &PlantTile| { &m.twigs }, - |m: &mut PlantTile| { &mut m.twigs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "tile_type", - |m: &PlantTile| { &m.tile_type }, - |m: &mut PlantTile| { &mut m.tile_type }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PlantTile", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PlantTile { - const NAME: &'static str = "PlantTile"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.trunk = ::std::option::Option::Some(is.read_bool()?); - }, - 16 => { - self.connection_east = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.connection_south = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.connection_west = ::std::option::Option::Some(is.read_bool()?); - }, - 40 => { - self.connection_north = ::std::option::Option::Some(is.read_bool()?); - }, - 48 => { - self.branches = ::std::option::Option::Some(is.read_bool()?); - }, - 56 => { - self.twigs = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.tile_type = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.trunk { - my_size += 1 + 1; - } - if let Some(v) = self.connection_east { - my_size += 1 + 1; - } - if let Some(v) = self.connection_south { - my_size += 1 + 1; - } - if let Some(v) = self.connection_west { - my_size += 1 + 1; - } - if let Some(v) = self.connection_north { - my_size += 1 + 1; - } - if let Some(v) = self.branches { - my_size += 1 + 1; - } - if let Some(v) = self.twigs { - my_size += 1 + 1; - } - if let Some(v) = self.tile_type { - my_size += ::protobuf::rt::int32_size(8, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.trunk { - os.write_bool(1, v)?; - } - if let Some(v) = self.connection_east { - os.write_bool(2, v)?; - } - if let Some(v) = self.connection_south { - os.write_bool(3, v)?; - } - if let Some(v) = self.connection_west { - os.write_bool(4, v)?; - } - if let Some(v) = self.connection_north { - os.write_bool(5, v)?; - } - if let Some(v) = self.branches { - os.write_bool(6, v)?; - } - if let Some(v) = self.twigs { - os.write_bool(7, v)?; - } - if let Some(v) = self.tile_type { - os.write_enum(8, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PlantTile { - PlantTile::new() - } - - fn clear(&mut self) { - self.trunk = ::std::option::Option::None; - self.connection_east = ::std::option::Option::None; - self.connection_south = ::std::option::Option::None; - self.connection_west = ::std::option::Option::None; - self.connection_north = ::std::option::Option::None; - self.branches = ::std::option::Option::None; - self.twigs = ::std::option::Option::None; - self.tile_type = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PlantTile { - static instance: PlantTile = PlantTile { - trunk: ::std::option::Option::None, - connection_east: ::std::option::Option::None, - connection_south: ::std::option::Option::None, - connection_west: ::std::option::Option::None, - connection_north: ::std::option::Option::None, - branches: ::std::option::Option::None, - twigs: ::std::option::Option::None, - tile_type: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PlantTile { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PlantTile").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PlantTile { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PlantTile { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.TreeInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TreeInfo { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.TreeInfo.size) - pub size: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeInfo.tiles) - pub tiles: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.TreeInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TreeInfo { - fn default() -> &'a TreeInfo { - ::default_instance() - } -} - -impl TreeInfo { - pub fn new() -> TreeInfo { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "size", - |m: &TreeInfo| { &m.size }, - |m: &mut TreeInfo| { &mut m.size }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tiles", - |m: &TreeInfo| { &m.tiles }, - |m: &mut TreeInfo| { &mut m.tiles }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TreeInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TreeInfo { - const NAME: &'static str = "TreeInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.size)?; - }, - 18 => { - self.tiles.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.size.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.tiles { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.size.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - for v in &self.tiles { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TreeInfo { - TreeInfo::new() - } - - fn clear(&mut self) { - self.size.clear(); - self.tiles.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TreeInfo { - static instance: TreeInfo = TreeInfo { - size: ::protobuf::MessageField::none(), - tiles: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TreeInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TreeInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TreeInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TreeInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PlantInstance) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PlantInstance { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PlantInstance.plant_type) - pub plant_type: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantInstance.pos) - pub pos: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantInstance.tree_info) - pub tree_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PlantInstance.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PlantInstance { - fn default() -> &'a PlantInstance { - ::default_instance() - } -} - -impl PlantInstance { - pub fn new() -> PlantInstance { - ::std::default::Default::default() - } - - // optional int32 plant_type = 1; - - pub fn plant_type(&self) -> i32 { - self.plant_type.unwrap_or(0) - } - - pub fn clear_plant_type(&mut self) { - self.plant_type = ::std::option::Option::None; - } - - pub fn has_plant_type(&self) -> bool { - self.plant_type.is_some() - } - - // Param is passed by value, moved - pub fn set_plant_type(&mut self, v: i32) { - self.plant_type = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "plant_type", - |m: &PlantInstance| { &m.plant_type }, - |m: &mut PlantInstance| { &mut m.plant_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "pos", - |m: &PlantInstance| { &m.pos }, - |m: &mut PlantInstance| { &mut m.pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, TreeInfo>( - "tree_info", - |m: &PlantInstance| { &m.tree_info }, - |m: &mut PlantInstance| { &mut m.tree_info }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PlantInstance", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PlantInstance { - const NAME: &'static str = "PlantInstance"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.plant_type = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pos)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.tree_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.plant_type { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.tree_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.plant_type { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.tree_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PlantInstance { - PlantInstance::new() - } - - fn clear(&mut self) { - self.plant_type = ::std::option::Option::None; - self.pos.clear(); - self.tree_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PlantInstance { - static instance: PlantInstance = PlantInstance { - plant_type: ::std::option::Option::None, - pos: ::protobuf::MessageField::none(), - tree_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PlantInstance { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PlantInstance").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PlantInstance { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PlantInstance { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.MapBlock) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MapBlock { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.map_x) - pub map_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.map_y) - pub map_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.map_z) - pub map_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tiles) - pub tiles: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.materials) - pub materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.layer_materials) - pub layer_materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.vein_materials) - pub vein_materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.base_materials) - pub base_materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.magma) - pub magma: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.water) - pub water: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.hidden) - pub hidden: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.light) - pub light: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.subterranean) - pub subterranean: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.outside) - pub outside: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.aquifer) - pub aquifer: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.water_stagnant) - pub water_stagnant: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.water_salt) - pub water_salt: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.construction_items) - pub construction_items: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.buildings) - pub buildings: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tree_percent) - pub tree_percent: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tree_x) - pub tree_x: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tree_y) - pub tree_y: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tree_z) - pub tree_z: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tile_dig_designation) - pub tile_dig_designation: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.spatterPile) - pub spatterPile: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.items) - pub items: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tile_dig_designation_marker) - pub tile_dig_designation_marker: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.tile_dig_designation_auto) - pub tile_dig_designation_auto: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.grass_percent) - pub grass_percent: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.MapBlock.flows) - pub flows: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.MapBlock.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MapBlock { - fn default() -> &'a MapBlock { - ::default_instance() - } -} - -impl MapBlock { - pub fn new() -> MapBlock { - ::std::default::Default::default() - } - - // required int32 map_x = 1; - - pub fn map_x(&self) -> i32 { - self.map_x.unwrap_or(0) - } - - pub fn clear_map_x(&mut self) { - self.map_x = ::std::option::Option::None; - } - - pub fn has_map_x(&self) -> bool { - self.map_x.is_some() - } - - // Param is passed by value, moved - pub fn set_map_x(&mut self, v: i32) { - self.map_x = ::std::option::Option::Some(v); - } - - // required int32 map_y = 2; - - pub fn map_y(&self) -> i32 { - self.map_y.unwrap_or(0) - } - - pub fn clear_map_y(&mut self) { - self.map_y = ::std::option::Option::None; - } - - pub fn has_map_y(&self) -> bool { - self.map_y.is_some() - } - - // Param is passed by value, moved - pub fn set_map_y(&mut self, v: i32) { - self.map_y = ::std::option::Option::Some(v); - } - - // required int32 map_z = 3; - - pub fn map_z(&self) -> i32 { - self.map_z.unwrap_or(0) - } - - pub fn clear_map_z(&mut self) { - self.map_z = ::std::option::Option::None; - } - - pub fn has_map_z(&self) -> bool { - self.map_z.is_some() - } - - // Param is passed by value, moved - pub fn set_map_z(&mut self, v: i32) { - self.map_z = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(30); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_x", - |m: &MapBlock| { &m.map_x }, - |m: &mut MapBlock| { &mut m.map_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_y", - |m: &MapBlock| { &m.map_y }, - |m: &mut MapBlock| { &mut m.map_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_z", - |m: &MapBlock| { &m.map_z }, - |m: &mut MapBlock| { &mut m.map_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tiles", - |m: &MapBlock| { &m.tiles }, - |m: &mut MapBlock| { &mut m.tiles }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "materials", - |m: &MapBlock| { &m.materials }, - |m: &mut MapBlock| { &mut m.materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "layer_materials", - |m: &MapBlock| { &m.layer_materials }, - |m: &mut MapBlock| { &mut m.layer_materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "vein_materials", - |m: &MapBlock| { &m.vein_materials }, - |m: &mut MapBlock| { &mut m.vein_materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "base_materials", - |m: &MapBlock| { &m.base_materials }, - |m: &mut MapBlock| { &mut m.base_materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "magma", - |m: &MapBlock| { &m.magma }, - |m: &mut MapBlock| { &mut m.magma }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "water", - |m: &MapBlock| { &m.water }, - |m: &mut MapBlock| { &mut m.water }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "hidden", - |m: &MapBlock| { &m.hidden }, - |m: &mut MapBlock| { &mut m.hidden }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "light", - |m: &MapBlock| { &m.light }, - |m: &mut MapBlock| { &mut m.light }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "subterranean", - |m: &MapBlock| { &m.subterranean }, - |m: &mut MapBlock| { &mut m.subterranean }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "outside", - |m: &MapBlock| { &m.outside }, - |m: &mut MapBlock| { &mut m.outside }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "aquifer", - |m: &MapBlock| { &m.aquifer }, - |m: &mut MapBlock| { &mut m.aquifer }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "water_stagnant", - |m: &MapBlock| { &m.water_stagnant }, - |m: &mut MapBlock| { &mut m.water_stagnant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "water_salt", - |m: &MapBlock| { &m.water_salt }, - |m: &mut MapBlock| { &mut m.water_salt }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "construction_items", - |m: &MapBlock| { &m.construction_items }, - |m: &mut MapBlock| { &mut m.construction_items }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "buildings", - |m: &MapBlock| { &m.buildings }, - |m: &mut MapBlock| { &mut m.buildings }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tree_percent", - |m: &MapBlock| { &m.tree_percent }, - |m: &mut MapBlock| { &mut m.tree_percent }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tree_x", - |m: &MapBlock| { &m.tree_x }, - |m: &mut MapBlock| { &mut m.tree_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tree_y", - |m: &MapBlock| { &m.tree_y }, - |m: &mut MapBlock| { &mut m.tree_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tree_z", - |m: &MapBlock| { &m.tree_z }, - |m: &mut MapBlock| { &mut m.tree_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tile_dig_designation", - |m: &MapBlock| { &m.tile_dig_designation }, - |m: &mut MapBlock| { &mut m.tile_dig_designation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "spatterPile", - |m: &MapBlock| { &m.spatterPile }, - |m: &mut MapBlock| { &mut m.spatterPile }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "items", - |m: &MapBlock| { &m.items }, - |m: &mut MapBlock| { &mut m.items }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tile_dig_designation_marker", - |m: &MapBlock| { &m.tile_dig_designation_marker }, - |m: &mut MapBlock| { &mut m.tile_dig_designation_marker }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tile_dig_designation_auto", - |m: &MapBlock| { &m.tile_dig_designation_auto }, - |m: &mut MapBlock| { &mut m.tile_dig_designation_auto }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "grass_percent", - |m: &MapBlock| { &m.grass_percent }, - |m: &mut MapBlock| { &mut m.grass_percent }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "flows", - |m: &MapBlock| { &m.flows }, - |m: &mut MapBlock| { &mut m.flows }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MapBlock", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MapBlock { - const NAME: &'static str = "MapBlock"; - - fn is_initialized(&self) -> bool { - if self.map_x.is_none() { - return false; - } - if self.map_y.is_none() { - return false; - } - if self.map_z.is_none() { - return false; - } - for v in &self.materials { - if !v.is_initialized() { - return false; - } - }; - for v in &self.layer_materials { - if !v.is_initialized() { - return false; - } - }; - for v in &self.vein_materials { - if !v.is_initialized() { - return false; - } - }; - for v in &self.base_materials { - if !v.is_initialized() { - return false; - } - }; - for v in &self.construction_items { - if !v.is_initialized() { - return false; - } - }; - for v in &self.buildings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.spatterPile { - if !v.is_initialized() { - return false; - } - }; - for v in &self.items { - if !v.is_initialized() { - return false; - } - }; - for v in &self.flows { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.map_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.map_y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.map_z = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - is.read_repeated_packed_int32_into(&mut self.tiles)?; - }, - 32 => { - self.tiles.push(is.read_int32()?); - }, - 42 => { - self.materials.push(is.read_message()?); - }, - 50 => { - self.layer_materials.push(is.read_message()?); - }, - 58 => { - self.vein_materials.push(is.read_message()?); - }, - 66 => { - self.base_materials.push(is.read_message()?); - }, - 74 => { - is.read_repeated_packed_int32_into(&mut self.magma)?; - }, - 72 => { - self.magma.push(is.read_int32()?); - }, - 82 => { - is.read_repeated_packed_int32_into(&mut self.water)?; - }, - 80 => { - self.water.push(is.read_int32()?); - }, - 90 => { - is.read_repeated_packed_bool_into(&mut self.hidden)?; - }, - 88 => { - self.hidden.push(is.read_bool()?); - }, - 98 => { - is.read_repeated_packed_bool_into(&mut self.light)?; - }, - 96 => { - self.light.push(is.read_bool()?); - }, - 106 => { - is.read_repeated_packed_bool_into(&mut self.subterranean)?; - }, - 104 => { - self.subterranean.push(is.read_bool()?); - }, - 114 => { - is.read_repeated_packed_bool_into(&mut self.outside)?; - }, - 112 => { - self.outside.push(is.read_bool()?); - }, - 122 => { - is.read_repeated_packed_bool_into(&mut self.aquifer)?; - }, - 120 => { - self.aquifer.push(is.read_bool()?); - }, - 130 => { - is.read_repeated_packed_bool_into(&mut self.water_stagnant)?; - }, - 128 => { - self.water_stagnant.push(is.read_bool()?); - }, - 138 => { - is.read_repeated_packed_bool_into(&mut self.water_salt)?; - }, - 136 => { - self.water_salt.push(is.read_bool()?); - }, - 146 => { - self.construction_items.push(is.read_message()?); - }, - 154 => { - self.buildings.push(is.read_message()?); - }, - 162 => { - is.read_repeated_packed_int32_into(&mut self.tree_percent)?; - }, - 160 => { - self.tree_percent.push(is.read_int32()?); - }, - 170 => { - is.read_repeated_packed_int32_into(&mut self.tree_x)?; - }, - 168 => { - self.tree_x.push(is.read_int32()?); - }, - 178 => { - is.read_repeated_packed_int32_into(&mut self.tree_y)?; - }, - 176 => { - self.tree_y.push(is.read_int32()?); - }, - 186 => { - is.read_repeated_packed_int32_into(&mut self.tree_z)?; - }, - 184 => { - self.tree_z.push(is.read_int32()?); - }, - 192 => { - self.tile_dig_designation.push(is.read_enum_or_unknown()?); - }, - 194 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.tile_dig_designation)? - }, - 202 => { - self.spatterPile.push(is.read_message()?); - }, - 210 => { - self.items.push(is.read_message()?); - }, - 218 => { - is.read_repeated_packed_bool_into(&mut self.tile_dig_designation_marker)?; - }, - 216 => { - self.tile_dig_designation_marker.push(is.read_bool()?); - }, - 226 => { - is.read_repeated_packed_bool_into(&mut self.tile_dig_designation_auto)?; - }, - 224 => { - self.tile_dig_designation_auto.push(is.read_bool()?); - }, - 234 => { - is.read_repeated_packed_int32_into(&mut self.grass_percent)?; - }, - 232 => { - self.grass_percent.push(is.read_int32()?); - }, - 242 => { - self.flows.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.map_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.map_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.map_z { - my_size += ::protobuf::rt::int32_size(3, v); - } - for value in &self.tiles { - my_size += ::protobuf::rt::int32_size(4, *value); - }; - for value in &self.materials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.layer_materials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.vein_materials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.base_materials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.magma { - my_size += ::protobuf::rt::int32_size(9, *value); - }; - for value in &self.water { - my_size += ::protobuf::rt::int32_size(10, *value); - }; - my_size += 2 * self.hidden.len() as u64; - my_size += 2 * self.light.len() as u64; - my_size += 2 * self.subterranean.len() as u64; - my_size += 2 * self.outside.len() as u64; - my_size += 2 * self.aquifer.len() as u64; - my_size += 3 * self.water_stagnant.len() as u64; - my_size += 3 * self.water_salt.len() as u64; - for value in &self.construction_items { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.buildings { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.tree_percent { - my_size += ::protobuf::rt::int32_size(20, *value); - }; - for value in &self.tree_x { - my_size += ::protobuf::rt::int32_size(21, *value); - }; - for value in &self.tree_y { - my_size += ::protobuf::rt::int32_size(22, *value); - }; - for value in &self.tree_z { - my_size += ::protobuf::rt::int32_size(23, *value); - }; - for value in &self.tile_dig_designation { - my_size += ::protobuf::rt::int32_size(24, value.value()); - }; - for value in &self.spatterPile { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.items { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += 3 * self.tile_dig_designation_marker.len() as u64; - my_size += 3 * self.tile_dig_designation_auto.len() as u64; - for value in &self.grass_percent { - my_size += ::protobuf::rt::int32_size(29, *value); - }; - for value in &self.flows { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.map_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.map_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.map_z { - os.write_int32(3, v)?; - } - for v in &self.tiles { - os.write_int32(4, *v)?; - }; - for v in &self.materials { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - for v in &self.layer_materials { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }; - for v in &self.vein_materials { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - for v in &self.base_materials { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - }; - for v in &self.magma { - os.write_int32(9, *v)?; - }; - for v in &self.water { - os.write_int32(10, *v)?; - }; - for v in &self.hidden { - os.write_bool(11, *v)?; - }; - for v in &self.light { - os.write_bool(12, *v)?; - }; - for v in &self.subterranean { - os.write_bool(13, *v)?; - }; - for v in &self.outside { - os.write_bool(14, *v)?; - }; - for v in &self.aquifer { - os.write_bool(15, *v)?; - }; - for v in &self.water_stagnant { - os.write_bool(16, *v)?; - }; - for v in &self.water_salt { - os.write_bool(17, *v)?; - }; - for v in &self.construction_items { - ::protobuf::rt::write_message_field_with_cached_size(18, v, os)?; - }; - for v in &self.buildings { - ::protobuf::rt::write_message_field_with_cached_size(19, v, os)?; - }; - for v in &self.tree_percent { - os.write_int32(20, *v)?; - }; - for v in &self.tree_x { - os.write_int32(21, *v)?; - }; - for v in &self.tree_y { - os.write_int32(22, *v)?; - }; - for v in &self.tree_z { - os.write_int32(23, *v)?; - }; - for v in &self.tile_dig_designation { - os.write_enum(24, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.spatterPile { - ::protobuf::rt::write_message_field_with_cached_size(25, v, os)?; - }; - for v in &self.items { - ::protobuf::rt::write_message_field_with_cached_size(26, v, os)?; - }; - for v in &self.tile_dig_designation_marker { - os.write_bool(27, *v)?; - }; - for v in &self.tile_dig_designation_auto { - os.write_bool(28, *v)?; - }; - for v in &self.grass_percent { - os.write_int32(29, *v)?; - }; - for v in &self.flows { - ::protobuf::rt::write_message_field_with_cached_size(30, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MapBlock { - MapBlock::new() - } - - fn clear(&mut self) { - self.map_x = ::std::option::Option::None; - self.map_y = ::std::option::Option::None; - self.map_z = ::std::option::Option::None; - self.tiles.clear(); - self.materials.clear(); - self.layer_materials.clear(); - self.vein_materials.clear(); - self.base_materials.clear(); - self.magma.clear(); - self.water.clear(); - self.hidden.clear(); - self.light.clear(); - self.subterranean.clear(); - self.outside.clear(); - self.aquifer.clear(); - self.water_stagnant.clear(); - self.water_salt.clear(); - self.construction_items.clear(); - self.buildings.clear(); - self.tree_percent.clear(); - self.tree_x.clear(); - self.tree_y.clear(); - self.tree_z.clear(); - self.tile_dig_designation.clear(); - self.spatterPile.clear(); - self.items.clear(); - self.tile_dig_designation_marker.clear(); - self.tile_dig_designation_auto.clear(); - self.grass_percent.clear(); - self.flows.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static MapBlock { - static instance: MapBlock = MapBlock { - map_x: ::std::option::Option::None, - map_y: ::std::option::Option::None, - map_z: ::std::option::Option::None, - tiles: ::std::vec::Vec::new(), - materials: ::std::vec::Vec::new(), - layer_materials: ::std::vec::Vec::new(), - vein_materials: ::std::vec::Vec::new(), - base_materials: ::std::vec::Vec::new(), - magma: ::std::vec::Vec::new(), - water: ::std::vec::Vec::new(), - hidden: ::std::vec::Vec::new(), - light: ::std::vec::Vec::new(), - subterranean: ::std::vec::Vec::new(), - outside: ::std::vec::Vec::new(), - aquifer: ::std::vec::Vec::new(), - water_stagnant: ::std::vec::Vec::new(), - water_salt: ::std::vec::Vec::new(), - construction_items: ::std::vec::Vec::new(), - buildings: ::std::vec::Vec::new(), - tree_percent: ::std::vec::Vec::new(), - tree_x: ::std::vec::Vec::new(), - tree_y: ::std::vec::Vec::new(), - tree_z: ::std::vec::Vec::new(), - tile_dig_designation: ::std::vec::Vec::new(), - spatterPile: ::std::vec::Vec::new(), - items: ::std::vec::Vec::new(), - tile_dig_designation_marker: ::std::vec::Vec::new(), - tile_dig_designation_auto: ::std::vec::Vec::new(), - grass_percent: ::std::vec::Vec::new(), - flows: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MapBlock { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MapBlock").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MapBlock { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MapBlock { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(Hash, Eq)] -// @@protoc_insertion_point(message:RemoteFortressReader.MatPair) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MatPair { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.MatPair.mat_type) - pub mat_type: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MatPair.mat_index) - pub mat_index: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.MatPair.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MatPair { - fn default() -> &'a MatPair { - ::default_instance() - } -} - -impl MatPair { - pub fn new() -> MatPair { - ::std::default::Default::default() - } - - // required int32 mat_type = 1; - - pub fn mat_type(&self) -> i32 { - self.mat_type.unwrap_or(0) - } - - pub fn clear_mat_type(&mut self) { - self.mat_type = ::std::option::Option::None; - } - - pub fn has_mat_type(&self) -> bool { - self.mat_type.is_some() - } - - // Param is passed by value, moved - pub fn set_mat_type(&mut self, v: i32) { - self.mat_type = ::std::option::Option::Some(v); - } - - // required int32 mat_index = 2; - - pub fn mat_index(&self) -> i32 { - self.mat_index.unwrap_or(0) - } - - pub fn clear_mat_index(&mut self) { - self.mat_index = ::std::option::Option::None; - } - - pub fn has_mat_index(&self) -> bool { - self.mat_index.is_some() - } - - // Param is passed by value, moved - pub fn set_mat_index(&mut self, v: i32) { - self.mat_index = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mat_type", - |m: &MatPair| { &m.mat_type }, - |m: &mut MatPair| { &mut m.mat_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mat_index", - |m: &MatPair| { &m.mat_index }, - |m: &mut MatPair| { &mut m.mat_index }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MatPair", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MatPair { - const NAME: &'static str = "MatPair"; - - fn is_initialized(&self) -> bool { - if self.mat_type.is_none() { - return false; - } - if self.mat_index.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.mat_type = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.mat_index = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mat_type { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.mat_index { - my_size += ::protobuf::rt::int32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mat_type { - os.write_int32(1, v)?; - } - if let Some(v) = self.mat_index { - os.write_int32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MatPair { - MatPair::new() - } - - fn clear(&mut self) { - self.mat_type = ::std::option::Option::None; - self.mat_index = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MatPair { - static instance: MatPair = MatPair { - mat_type: ::std::option::Option::None, - mat_index: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MatPair { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MatPair").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MatPair { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MatPair { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ColorDefinition) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ColorDefinition { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ColorDefinition.red) - pub red: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorDefinition.green) - pub green: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorDefinition.blue) - pub blue: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ColorDefinition.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ColorDefinition { - fn default() -> &'a ColorDefinition { - ::default_instance() - } -} - -impl ColorDefinition { - pub fn new() -> ColorDefinition { - ::std::default::Default::default() - } - - // required int32 red = 1; - - pub fn red(&self) -> i32 { - self.red.unwrap_or(0) - } - - pub fn clear_red(&mut self) { - self.red = ::std::option::Option::None; - } - - pub fn has_red(&self) -> bool { - self.red.is_some() - } - - // Param is passed by value, moved - pub fn set_red(&mut self, v: i32) { - self.red = ::std::option::Option::Some(v); - } - - // required int32 green = 2; - - pub fn green(&self) -> i32 { - self.green.unwrap_or(0) - } - - pub fn clear_green(&mut self) { - self.green = ::std::option::Option::None; - } - - pub fn has_green(&self) -> bool { - self.green.is_some() - } - - // Param is passed by value, moved - pub fn set_green(&mut self, v: i32) { - self.green = ::std::option::Option::Some(v); - } - - // required int32 blue = 3; - - pub fn blue(&self) -> i32 { - self.blue.unwrap_or(0) - } - - pub fn clear_blue(&mut self) { - self.blue = ::std::option::Option::None; - } - - pub fn has_blue(&self) -> bool { - self.blue.is_some() - } - - // Param is passed by value, moved - pub fn set_blue(&mut self, v: i32) { - self.blue = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "red", - |m: &ColorDefinition| { &m.red }, - |m: &mut ColorDefinition| { &mut m.red }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "green", - |m: &ColorDefinition| { &m.green }, - |m: &mut ColorDefinition| { &mut m.green }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "blue", - |m: &ColorDefinition| { &m.blue }, - |m: &mut ColorDefinition| { &mut m.blue }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ColorDefinition", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ColorDefinition { - const NAME: &'static str = "ColorDefinition"; - - fn is_initialized(&self) -> bool { - if self.red.is_none() { - return false; - } - if self.green.is_none() { - return false; - } - if self.blue.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.red = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.green = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.blue = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.red { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.green { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.blue { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.red { - os.write_int32(1, v)?; - } - if let Some(v) = self.green { - os.write_int32(2, v)?; - } - if let Some(v) = self.blue { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ColorDefinition { - ColorDefinition::new() - } - - fn clear(&mut self) { - self.red = ::std::option::Option::None; - self.green = ::std::option::Option::None; - self.blue = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ColorDefinition { - static instance: ColorDefinition = ColorDefinition { - red: ::std::option::Option::None, - green: ::std::option::Option::None, - blue: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ColorDefinition { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ColorDefinition").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ColorDefinition { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ColorDefinition { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.MaterialDefinition) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MaterialDefinition { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.mat_pair) - pub mat_pair: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.name) - pub name: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.state_color) - pub state_color: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.instrument) - pub instrument: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.up_step) - pub up_step: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.down_step) - pub down_step: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialDefinition.layer) - pub layer: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.MaterialDefinition.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MaterialDefinition { - fn default() -> &'a MaterialDefinition { - ::default_instance() - } -} - -impl MaterialDefinition { - pub fn new() -> MaterialDefinition { - ::std::default::Default::default() - } - - // optional string id = 2; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional bytes name = 3; - - pub fn name(&self) -> &[u8] { - match self.name.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::vec::Vec) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::vec::Vec { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::vec::Vec { - self.name.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - // optional int32 up_step = 6; - - pub fn up_step(&self) -> i32 { - self.up_step.unwrap_or(0) - } - - pub fn clear_up_step(&mut self) { - self.up_step = ::std::option::Option::None; - } - - pub fn has_up_step(&self) -> bool { - self.up_step.is_some() - } - - // Param is passed by value, moved - pub fn set_up_step(&mut self, v: i32) { - self.up_step = ::std::option::Option::Some(v); - } - - // optional int32 down_step = 7; - - pub fn down_step(&self) -> i32 { - self.down_step.unwrap_or(0) - } - - pub fn clear_down_step(&mut self) { - self.down_step = ::std::option::Option::None; - } - - pub fn has_down_step(&self) -> bool { - self.down_step.is_some() - } - - // Param is passed by value, moved - pub fn set_down_step(&mut self, v: i32) { - self.down_step = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.ArmorLayer layer = 8; - - pub fn layer(&self) -> ArmorLayer { - match self.layer { - Some(e) => e.enum_value_or(ArmorLayer::LAYER_UNDER), - None => ArmorLayer::LAYER_UNDER, - } - } - - pub fn clear_layer(&mut self) { - self.layer = ::std::option::Option::None; - } - - pub fn has_layer(&self) -> bool { - self.layer.is_some() - } - - // Param is passed by value, moved - pub fn set_layer(&mut self, v: ArmorLayer) { - self.layer = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "mat_pair", - |m: &MaterialDefinition| { &m.mat_pair }, - |m: &mut MaterialDefinition| { &mut m.mat_pair }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &MaterialDefinition| { &m.id }, - |m: &mut MaterialDefinition| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &MaterialDefinition| { &m.name }, - |m: &mut MaterialDefinition| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ColorDefinition>( - "state_color", - |m: &MaterialDefinition| { &m.state_color }, - |m: &mut MaterialDefinition| { &mut m.state_color }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::ItemdefInstrument::InstrumentDef>( - "instrument", - |m: &MaterialDefinition| { &m.instrument }, - |m: &mut MaterialDefinition| { &mut m.instrument }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "up_step", - |m: &MaterialDefinition| { &m.up_step }, - |m: &mut MaterialDefinition| { &mut m.up_step }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "down_step", - |m: &MaterialDefinition| { &m.down_step }, - |m: &mut MaterialDefinition| { &mut m.down_step }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "layer", - |m: &MaterialDefinition| { &m.layer }, - |m: &mut MaterialDefinition| { &mut m.layer }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MaterialDefinition", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MaterialDefinition { - const NAME: &'static str = "MaterialDefinition"; - - fn is_initialized(&self) -> bool { - if self.mat_pair.is_none() { - return false; - } - for v in &self.mat_pair { - if !v.is_initialized() { - return false; - } - }; - for v in &self.state_color { - if !v.is_initialized() { - return false; - } - }; - for v in &self.instrument { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.mat_pair)?; - }, - 18 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_bytes()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.state_color)?; - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.instrument)?; - }, - 48 => { - self.up_step = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.down_step = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.layer = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mat_pair.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::bytes_size(3, &v); - } - if let Some(v) = self.state_color.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.instrument.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.up_step { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.down_step { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.layer { - my_size += ::protobuf::rt::int32_size(8, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mat_pair.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.id.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_bytes(3, v)?; - } - if let Some(v) = self.state_color.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - if let Some(v) = self.instrument.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.up_step { - os.write_int32(6, v)?; - } - if let Some(v) = self.down_step { - os.write_int32(7, v)?; - } - if let Some(v) = self.layer { - os.write_enum(8, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MaterialDefinition { - MaterialDefinition::new() - } - - fn clear(&mut self) { - self.mat_pair.clear(); - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.state_color.clear(); - self.instrument.clear(); - self.up_step = ::std::option::Option::None; - self.down_step = ::std::option::Option::None; - self.layer = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MaterialDefinition { - static instance: MaterialDefinition = MaterialDefinition { - mat_pair: ::protobuf::MessageField::none(), - id: ::std::option::Option::None, - name: ::std::option::Option::None, - state_color: ::protobuf::MessageField::none(), - instrument: ::protobuf::MessageField::none(), - up_step: ::std::option::Option::None, - down_step: ::std::option::Option::None, - layer: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MaterialDefinition { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MaterialDefinition").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MaterialDefinition { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MaterialDefinition { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BuildingType) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildingType { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingType.building_type) - pub building_type: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingType.building_subtype) - pub building_subtype: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingType.building_custom) - pub building_custom: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BuildingType.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildingType { - fn default() -> &'a BuildingType { - ::default_instance() - } -} - -impl BuildingType { - pub fn new() -> BuildingType { - ::std::default::Default::default() - } - - // required int32 building_type = 1; - - pub fn building_type(&self) -> i32 { - self.building_type.unwrap_or(0) - } - - pub fn clear_building_type(&mut self) { - self.building_type = ::std::option::Option::None; - } - - pub fn has_building_type(&self) -> bool { - self.building_type.is_some() - } - - // Param is passed by value, moved - pub fn set_building_type(&mut self, v: i32) { - self.building_type = ::std::option::Option::Some(v); - } - - // required int32 building_subtype = 2; - - pub fn building_subtype(&self) -> i32 { - self.building_subtype.unwrap_or(0) - } - - pub fn clear_building_subtype(&mut self) { - self.building_subtype = ::std::option::Option::None; - } - - pub fn has_building_subtype(&self) -> bool { - self.building_subtype.is_some() - } - - // Param is passed by value, moved - pub fn set_building_subtype(&mut self, v: i32) { - self.building_subtype = ::std::option::Option::Some(v); - } - - // required int32 building_custom = 3; - - pub fn building_custom(&self) -> i32 { - self.building_custom.unwrap_or(0) - } - - pub fn clear_building_custom(&mut self) { - self.building_custom = ::std::option::Option::None; - } - - pub fn has_building_custom(&self) -> bool { - self.building_custom.is_some() - } - - // Param is passed by value, moved - pub fn set_building_custom(&mut self, v: i32) { - self.building_custom = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "building_type", - |m: &BuildingType| { &m.building_type }, - |m: &mut BuildingType| { &mut m.building_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "building_subtype", - |m: &BuildingType| { &m.building_subtype }, - |m: &mut BuildingType| { &mut m.building_subtype }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "building_custom", - |m: &BuildingType| { &m.building_custom }, - |m: &mut BuildingType| { &mut m.building_custom }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildingType", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildingType { - const NAME: &'static str = "BuildingType"; - - fn is_initialized(&self) -> bool { - if self.building_type.is_none() { - return false; - } - if self.building_subtype.is_none() { - return false; - } - if self.building_custom.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.building_type = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.building_subtype = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.building_custom = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.building_type { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.building_subtype { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.building_custom { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.building_type { - os.write_int32(1, v)?; - } - if let Some(v) = self.building_subtype { - os.write_int32(2, v)?; - } - if let Some(v) = self.building_custom { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildingType { - BuildingType::new() - } - - fn clear(&mut self) { - self.building_type = ::std::option::Option::None; - self.building_subtype = ::std::option::Option::None; - self.building_custom = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildingType { - static instance: BuildingType = BuildingType { - building_type: ::std::option::Option::None, - building_subtype: ::std::option::Option::None, - building_custom: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildingType { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildingType").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildingType { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildingType { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BuildingDefinition) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildingDefinition { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingDefinition.building_type) - pub building_type: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingDefinition.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingDefinition.name) - pub name: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BuildingDefinition.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildingDefinition { - fn default() -> &'a BuildingDefinition { - ::default_instance() - } -} - -impl BuildingDefinition { - pub fn new() -> BuildingDefinition { - ::std::default::Default::default() - } - - // optional string id = 2; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name = 3; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, BuildingType>( - "building_type", - |m: &BuildingDefinition| { &m.building_type }, - |m: &mut BuildingDefinition| { &mut m.building_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &BuildingDefinition| { &m.id }, - |m: &mut BuildingDefinition| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &BuildingDefinition| { &m.name }, - |m: &mut BuildingDefinition| { &mut m.name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildingDefinition", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildingDefinition { - const NAME: &'static str = "BuildingDefinition"; - - fn is_initialized(&self) -> bool { - if self.building_type.is_none() { - return false; - } - for v in &self.building_type { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.building_type)?; - }, - 18 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.building_type.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.building_type.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.id.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildingDefinition { - BuildingDefinition::new() - } - - fn clear(&mut self) { - self.building_type.clear(); - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildingDefinition { - static instance: BuildingDefinition = BuildingDefinition { - building_type: ::protobuf::MessageField::none(), - id: ::std::option::Option::None, - name: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildingDefinition { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildingDefinition").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildingDefinition { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildingDefinition { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BuildingList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BuildingList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BuildingList.building_list) - pub building_list: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BuildingList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BuildingList { - fn default() -> &'a BuildingList { - ::default_instance() - } -} - -impl BuildingList { - pub fn new() -> BuildingList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "building_list", - |m: &BuildingList| { &m.building_list }, - |m: &mut BuildingList| { &mut m.building_list }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BuildingList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BuildingList { - const NAME: &'static str = "BuildingList"; - - fn is_initialized(&self) -> bool { - for v in &self.building_list { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.building_list.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.building_list { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.building_list { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BuildingList { - BuildingList::new() - } - - fn clear(&mut self) { - self.building_list.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BuildingList { - static instance: BuildingList = BuildingList { - building_list: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BuildingList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BuildingList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BuildingList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BuildingList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.MaterialList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MaterialList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.MaterialList.material_list) - pub material_list: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.MaterialList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MaterialList { - fn default() -> &'a MaterialList { - ::default_instance() - } -} - -impl MaterialList { - pub fn new() -> MaterialList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "material_list", - |m: &MaterialList| { &m.material_list }, - |m: &mut MaterialList| { &mut m.material_list }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MaterialList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MaterialList { - const NAME: &'static str = "MaterialList"; - - fn is_initialized(&self) -> bool { - for v in &self.material_list { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.material_list.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.material_list { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.material_list { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MaterialList { - MaterialList::new() - } - - fn clear(&mut self) { - self.material_list.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static MaterialList { - static instance: MaterialList = MaterialList { - material_list: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MaterialList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MaterialList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MaterialList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MaterialList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Hair) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Hair { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Hair.length) - pub length: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Hair.style) - pub style: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Hair.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Hair { - fn default() -> &'a Hair { - ::default_instance() - } -} - -impl Hair { - pub fn new() -> Hair { - ::std::default::Default::default() - } - - // optional int32 length = 1; - - pub fn length(&self) -> i32 { - self.length.unwrap_or(0) - } - - pub fn clear_length(&mut self) { - self.length = ::std::option::Option::None; - } - - pub fn has_length(&self) -> bool { - self.length.is_some() - } - - // Param is passed by value, moved - pub fn set_length(&mut self, v: i32) { - self.length = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.HairStyle style = 2; - - pub fn style(&self) -> HairStyle { - match self.style { - Some(e) => e.enum_value_or(HairStyle::UNKEMPT), - None => HairStyle::UNKEMPT, - } - } - - pub fn clear_style(&mut self) { - self.style = ::std::option::Option::None; - } - - pub fn has_style(&self) -> bool { - self.style.is_some() - } - - // Param is passed by value, moved - pub fn set_style(&mut self, v: HairStyle) { - self.style = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "length", - |m: &Hair| { &m.length }, - |m: &mut Hair| { &mut m.length }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "style", - |m: &Hair| { &m.style }, - |m: &mut Hair| { &mut m.style }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Hair", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Hair { - const NAME: &'static str = "Hair"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.length = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.style = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.length { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.style { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.length { - os.write_int32(1, v)?; - } - if let Some(v) = self.style { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Hair { - Hair::new() - } - - fn clear(&mut self) { - self.length = ::std::option::Option::None; - self.style = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Hair { - static instance: Hair = Hair { - length: ::std::option::Option::None, - style: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Hair { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Hair").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Hair { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Hair { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BodySizeInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BodySizeInfo { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BodySizeInfo.size_cur) - pub size_cur: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodySizeInfo.size_base) - pub size_base: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodySizeInfo.area_cur) - pub area_cur: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodySizeInfo.area_base) - pub area_base: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodySizeInfo.length_cur) - pub length_cur: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodySizeInfo.length_base) - pub length_base: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BodySizeInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BodySizeInfo { - fn default() -> &'a BodySizeInfo { - ::default_instance() - } -} - -impl BodySizeInfo { - pub fn new() -> BodySizeInfo { - ::std::default::Default::default() - } - - // optional int32 size_cur = 1; - - pub fn size_cur(&self) -> i32 { - self.size_cur.unwrap_or(0) - } - - pub fn clear_size_cur(&mut self) { - self.size_cur = ::std::option::Option::None; - } - - pub fn has_size_cur(&self) -> bool { - self.size_cur.is_some() - } - - // Param is passed by value, moved - pub fn set_size_cur(&mut self, v: i32) { - self.size_cur = ::std::option::Option::Some(v); - } - - // optional int32 size_base = 2; - - pub fn size_base(&self) -> i32 { - self.size_base.unwrap_or(0) - } - - pub fn clear_size_base(&mut self) { - self.size_base = ::std::option::Option::None; - } - - pub fn has_size_base(&self) -> bool { - self.size_base.is_some() - } - - // Param is passed by value, moved - pub fn set_size_base(&mut self, v: i32) { - self.size_base = ::std::option::Option::Some(v); - } - - // optional int32 area_cur = 3; - - pub fn area_cur(&self) -> i32 { - self.area_cur.unwrap_or(0) - } - - pub fn clear_area_cur(&mut self) { - self.area_cur = ::std::option::Option::None; - } - - pub fn has_area_cur(&self) -> bool { - self.area_cur.is_some() - } - - // Param is passed by value, moved - pub fn set_area_cur(&mut self, v: i32) { - self.area_cur = ::std::option::Option::Some(v); - } - - // optional int32 area_base = 4; - - pub fn area_base(&self) -> i32 { - self.area_base.unwrap_or(0) - } - - pub fn clear_area_base(&mut self) { - self.area_base = ::std::option::Option::None; - } - - pub fn has_area_base(&self) -> bool { - self.area_base.is_some() - } - - // Param is passed by value, moved - pub fn set_area_base(&mut self, v: i32) { - self.area_base = ::std::option::Option::Some(v); - } - - // optional int32 length_cur = 5; - - pub fn length_cur(&self) -> i32 { - self.length_cur.unwrap_or(0) - } - - pub fn clear_length_cur(&mut self) { - self.length_cur = ::std::option::Option::None; - } - - pub fn has_length_cur(&self) -> bool { - self.length_cur.is_some() - } - - // Param is passed by value, moved - pub fn set_length_cur(&mut self, v: i32) { - self.length_cur = ::std::option::Option::Some(v); - } - - // optional int32 length_base = 6; - - pub fn length_base(&self) -> i32 { - self.length_base.unwrap_or(0) - } - - pub fn clear_length_base(&mut self) { - self.length_base = ::std::option::Option::None; - } - - pub fn has_length_base(&self) -> bool { - self.length_base.is_some() - } - - // Param is passed by value, moved - pub fn set_length_base(&mut self, v: i32) { - self.length_base = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "size_cur", - |m: &BodySizeInfo| { &m.size_cur }, - |m: &mut BodySizeInfo| { &mut m.size_cur }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "size_base", - |m: &BodySizeInfo| { &m.size_base }, - |m: &mut BodySizeInfo| { &mut m.size_base }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "area_cur", - |m: &BodySizeInfo| { &m.area_cur }, - |m: &mut BodySizeInfo| { &mut m.area_cur }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "area_base", - |m: &BodySizeInfo| { &m.area_base }, - |m: &mut BodySizeInfo| { &mut m.area_base }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "length_cur", - |m: &BodySizeInfo| { &m.length_cur }, - |m: &mut BodySizeInfo| { &mut m.length_cur }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "length_base", - |m: &BodySizeInfo| { &m.length_base }, - |m: &mut BodySizeInfo| { &mut m.length_base }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BodySizeInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BodySizeInfo { - const NAME: &'static str = "BodySizeInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.size_cur = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.size_base = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.area_cur = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.area_base = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.length_cur = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.length_base = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.size_cur { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.size_base { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.area_cur { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.area_base { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.length_cur { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.length_base { - my_size += ::protobuf::rt::int32_size(6, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.size_cur { - os.write_int32(1, v)?; - } - if let Some(v) = self.size_base { - os.write_int32(2, v)?; - } - if let Some(v) = self.area_cur { - os.write_int32(3, v)?; - } - if let Some(v) = self.area_base { - os.write_int32(4, v)?; - } - if let Some(v) = self.length_cur { - os.write_int32(5, v)?; - } - if let Some(v) = self.length_base { - os.write_int32(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BodySizeInfo { - BodySizeInfo::new() - } - - fn clear(&mut self) { - self.size_cur = ::std::option::Option::None; - self.size_base = ::std::option::Option::None; - self.area_cur = ::std::option::Option::None; - self.area_base = ::std::option::Option::None; - self.length_cur = ::std::option::Option::None; - self.length_base = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BodySizeInfo { - static instance: BodySizeInfo = BodySizeInfo { - size_cur: ::std::option::Option::None, - size_base: ::std::option::Option::None, - area_cur: ::std::option::Option::None, - area_base: ::std::option::Option::None, - length_cur: ::std::option::Option::None, - length_base: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BodySizeInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BodySizeInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BodySizeInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BodySizeInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.UnitAppearance) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitAppearance { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.body_modifiers) - pub body_modifiers: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.bp_modifiers) - pub bp_modifiers: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.size_modifier) - pub size_modifier: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.colors) - pub colors: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.hair) - pub hair: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.beard) - pub beard: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.moustache) - pub moustache: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.sideburns) - pub sideburns: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitAppearance.physical_description) - pub physical_description: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.UnitAppearance.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitAppearance { - fn default() -> &'a UnitAppearance { - ::default_instance() - } -} - -impl UnitAppearance { - pub fn new() -> UnitAppearance { - ::std::default::Default::default() - } - - // optional int32 size_modifier = 3; - - pub fn size_modifier(&self) -> i32 { - self.size_modifier.unwrap_or(0) - } - - pub fn clear_size_modifier(&mut self) { - self.size_modifier = ::std::option::Option::None; - } - - pub fn has_size_modifier(&self) -> bool { - self.size_modifier.is_some() - } - - // Param is passed by value, moved - pub fn set_size_modifier(&mut self, v: i32) { - self.size_modifier = ::std::option::Option::Some(v); - } - - // optional string physical_description = 9; - - pub fn physical_description(&self) -> &str { - match self.physical_description.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_physical_description(&mut self) { - self.physical_description = ::std::option::Option::None; - } - - pub fn has_physical_description(&self) -> bool { - self.physical_description.is_some() - } - - // Param is passed by value, moved - pub fn set_physical_description(&mut self, v: ::std::string::String) { - self.physical_description = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_physical_description(&mut self) -> &mut ::std::string::String { - if self.physical_description.is_none() { - self.physical_description = ::std::option::Option::Some(::std::string::String::new()); - } - self.physical_description.as_mut().unwrap() - } - - // Take field - pub fn take_physical_description(&mut self) -> ::std::string::String { - self.physical_description.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "body_modifiers", - |m: &UnitAppearance| { &m.body_modifiers }, - |m: &mut UnitAppearance| { &mut m.body_modifiers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "bp_modifiers", - |m: &UnitAppearance| { &m.bp_modifiers }, - |m: &mut UnitAppearance| { &mut m.bp_modifiers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "size_modifier", - |m: &UnitAppearance| { &m.size_modifier }, - |m: &mut UnitAppearance| { &mut m.size_modifier }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "colors", - |m: &UnitAppearance| { &m.colors }, - |m: &mut UnitAppearance| { &mut m.colors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Hair>( - "hair", - |m: &UnitAppearance| { &m.hair }, - |m: &mut UnitAppearance| { &mut m.hair }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Hair>( - "beard", - |m: &UnitAppearance| { &m.beard }, - |m: &mut UnitAppearance| { &mut m.beard }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Hair>( - "moustache", - |m: &UnitAppearance| { &m.moustache }, - |m: &mut UnitAppearance| { &mut m.moustache }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Hair>( - "sideburns", - |m: &UnitAppearance| { &m.sideburns }, - |m: &mut UnitAppearance| { &mut m.sideburns }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "physical_description", - |m: &UnitAppearance| { &m.physical_description }, - |m: &mut UnitAppearance| { &mut m.physical_description }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitAppearance", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitAppearance { - const NAME: &'static str = "UnitAppearance"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - is.read_repeated_packed_int32_into(&mut self.body_modifiers)?; - }, - 8 => { - self.body_modifiers.push(is.read_int32()?); - }, - 18 => { - is.read_repeated_packed_int32_into(&mut self.bp_modifiers)?; - }, - 16 => { - self.bp_modifiers.push(is.read_int32()?); - }, - 24 => { - self.size_modifier = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - is.read_repeated_packed_int32_into(&mut self.colors)?; - }, - 32 => { - self.colors.push(is.read_int32()?); - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.hair)?; - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.beard)?; - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.moustache)?; - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.sideburns)?; - }, - 74 => { - self.physical_description = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.body_modifiers { - my_size += ::protobuf::rt::int32_size(1, *value); - }; - for value in &self.bp_modifiers { - my_size += ::protobuf::rt::int32_size(2, *value); - }; - if let Some(v) = self.size_modifier { - my_size += ::protobuf::rt::int32_size(3, v); - } - for value in &self.colors { - my_size += ::protobuf::rt::int32_size(4, *value); - }; - if let Some(v) = self.hair.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.beard.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.moustache.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.sideburns.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.physical_description.as_ref() { - my_size += ::protobuf::rt::string_size(9, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.body_modifiers { - os.write_int32(1, *v)?; - }; - for v in &self.bp_modifiers { - os.write_int32(2, *v)?; - }; - if let Some(v) = self.size_modifier { - os.write_int32(3, v)?; - } - for v in &self.colors { - os.write_int32(4, *v)?; - }; - if let Some(v) = self.hair.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.beard.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - if let Some(v) = self.moustache.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - if let Some(v) = self.sideburns.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - if let Some(v) = self.physical_description.as_ref() { - os.write_string(9, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitAppearance { - UnitAppearance::new() - } - - fn clear(&mut self) { - self.body_modifiers.clear(); - self.bp_modifiers.clear(); - self.size_modifier = ::std::option::Option::None; - self.colors.clear(); - self.hair.clear(); - self.beard.clear(); - self.moustache.clear(); - self.sideburns.clear(); - self.physical_description = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitAppearance { - static instance: UnitAppearance = UnitAppearance { - body_modifiers: ::std::vec::Vec::new(), - bp_modifiers: ::std::vec::Vec::new(), - size_modifier: ::std::option::Option::None, - colors: ::std::vec::Vec::new(), - hair: ::protobuf::MessageField::none(), - beard: ::protobuf::MessageField::none(), - moustache: ::protobuf::MessageField::none(), - sideburns: ::protobuf::MessageField::none(), - physical_description: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitAppearance { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitAppearance").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitAppearance { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitAppearance { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.InventoryItem) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct InventoryItem { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.InventoryItem.mode) - pub mode: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.InventoryItem.item) - pub item: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.InventoryItem.body_part_id) - pub body_part_id: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.InventoryItem.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InventoryItem { - fn default() -> &'a InventoryItem { - ::default_instance() - } -} - -impl InventoryItem { - pub fn new() -> InventoryItem { - ::std::default::Default::default() - } - - // optional .RemoteFortressReader.InventoryMode mode = 1; - - pub fn mode(&self) -> InventoryMode { - match self.mode { - Some(e) => e.enum_value_or(InventoryMode::Hauled), - None => InventoryMode::Hauled, - } - } - - pub fn clear_mode(&mut self) { - self.mode = ::std::option::Option::None; - } - - pub fn has_mode(&self) -> bool { - self.mode.is_some() - } - - // Param is passed by value, moved - pub fn set_mode(&mut self, v: InventoryMode) { - self.mode = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional int32 body_part_id = 3; - - pub fn body_part_id(&self) -> i32 { - self.body_part_id.unwrap_or(0) - } - - pub fn clear_body_part_id(&mut self) { - self.body_part_id = ::std::option::Option::None; - } - - pub fn has_body_part_id(&self) -> bool { - self.body_part_id.is_some() - } - - // Param is passed by value, moved - pub fn set_body_part_id(&mut self, v: i32) { - self.body_part_id = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mode", - |m: &InventoryItem| { &m.mode }, - |m: &mut InventoryItem| { &mut m.mode }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Item>( - "item", - |m: &InventoryItem| { &m.item }, - |m: &mut InventoryItem| { &mut m.item }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "body_part_id", - |m: &InventoryItem| { &m.body_part_id }, - |m: &mut InventoryItem| { &mut m.body_part_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "InventoryItem", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for InventoryItem { - const NAME: &'static str = "InventoryItem"; - - fn is_initialized(&self) -> bool { - for v in &self.item { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.mode = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.item)?; - }, - 24 => { - self.body_part_id = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mode { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - if let Some(v) = self.item.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.body_part_id { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mode { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.item.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.body_part_id { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InventoryItem { - InventoryItem::new() - } - - fn clear(&mut self) { - self.mode = ::std::option::Option::None; - self.item.clear(); - self.body_part_id = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static InventoryItem { - static instance: InventoryItem = InventoryItem { - mode: ::std::option::Option::None, - item: ::protobuf::MessageField::none(), - body_part_id: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for InventoryItem { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("InventoryItem").unwrap()).clone() - } -} - -impl ::std::fmt::Display for InventoryItem { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for InventoryItem { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.WoundPart) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct WoundPart { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.WoundPart.global_layer_idx) - pub global_layer_idx: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WoundPart.body_part_id) - pub body_part_id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WoundPart.layer_idx) - pub layer_idx: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.WoundPart.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a WoundPart { - fn default() -> &'a WoundPart { - ::default_instance() - } -} - -impl WoundPart { - pub fn new() -> WoundPart { - ::std::default::Default::default() - } - - // optional int32 global_layer_idx = 1; - - pub fn global_layer_idx(&self) -> i32 { - self.global_layer_idx.unwrap_or(0) - } - - pub fn clear_global_layer_idx(&mut self) { - self.global_layer_idx = ::std::option::Option::None; - } - - pub fn has_global_layer_idx(&self) -> bool { - self.global_layer_idx.is_some() - } - - // Param is passed by value, moved - pub fn set_global_layer_idx(&mut self, v: i32) { - self.global_layer_idx = ::std::option::Option::Some(v); - } - - // optional int32 body_part_id = 2; - - pub fn body_part_id(&self) -> i32 { - self.body_part_id.unwrap_or(0) - } - - pub fn clear_body_part_id(&mut self) { - self.body_part_id = ::std::option::Option::None; - } - - pub fn has_body_part_id(&self) -> bool { - self.body_part_id.is_some() - } - - // Param is passed by value, moved - pub fn set_body_part_id(&mut self, v: i32) { - self.body_part_id = ::std::option::Option::Some(v); - } - - // optional int32 layer_idx = 3; - - pub fn layer_idx(&self) -> i32 { - self.layer_idx.unwrap_or(0) - } - - pub fn clear_layer_idx(&mut self) { - self.layer_idx = ::std::option::Option::None; - } - - pub fn has_layer_idx(&self) -> bool { - self.layer_idx.is_some() - } - - // Param is passed by value, moved - pub fn set_layer_idx(&mut self, v: i32) { - self.layer_idx = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "global_layer_idx", - |m: &WoundPart| { &m.global_layer_idx }, - |m: &mut WoundPart| { &mut m.global_layer_idx }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "body_part_id", - |m: &WoundPart| { &m.body_part_id }, - |m: &mut WoundPart| { &mut m.body_part_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "layer_idx", - |m: &WoundPart| { &m.layer_idx }, - |m: &mut WoundPart| { &mut m.layer_idx }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "WoundPart", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for WoundPart { - const NAME: &'static str = "WoundPart"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.global_layer_idx = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.body_part_id = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.layer_idx = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.global_layer_idx { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.body_part_id { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.layer_idx { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.global_layer_idx { - os.write_int32(1, v)?; - } - if let Some(v) = self.body_part_id { - os.write_int32(2, v)?; - } - if let Some(v) = self.layer_idx { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> WoundPart { - WoundPart::new() - } - - fn clear(&mut self) { - self.global_layer_idx = ::std::option::Option::None; - self.body_part_id = ::std::option::Option::None; - self.layer_idx = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static WoundPart { - static instance: WoundPart = WoundPart { - global_layer_idx: ::std::option::Option::None, - body_part_id: ::std::option::Option::None, - layer_idx: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for WoundPart { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("WoundPart").unwrap()).clone() - } -} - -impl ::std::fmt::Display for WoundPart { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for WoundPart { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.UnitWound) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitWound { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.UnitWound.parts) - pub parts: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitWound.severed_part) - pub severed_part: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.UnitWound.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitWound { - fn default() -> &'a UnitWound { - ::default_instance() - } -} - -impl UnitWound { - pub fn new() -> UnitWound { - ::std::default::Default::default() - } - - // optional bool severed_part = 2; - - pub fn severed_part(&self) -> bool { - self.severed_part.unwrap_or(false) - } - - pub fn clear_severed_part(&mut self) { - self.severed_part = ::std::option::Option::None; - } - - pub fn has_severed_part(&self) -> bool { - self.severed_part.is_some() - } - - // Param is passed by value, moved - pub fn set_severed_part(&mut self, v: bool) { - self.severed_part = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "parts", - |m: &UnitWound| { &m.parts }, - |m: &mut UnitWound| { &mut m.parts }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "severed_part", - |m: &UnitWound| { &m.severed_part }, - |m: &mut UnitWound| { &mut m.severed_part }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitWound", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitWound { - const NAME: &'static str = "UnitWound"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.parts.push(is.read_message()?); - }, - 16 => { - self.severed_part = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.parts { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.severed_part { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.parts { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - if let Some(v) = self.severed_part { - os.write_bool(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitWound { - UnitWound::new() - } - - fn clear(&mut self) { - self.parts.clear(); - self.severed_part = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitWound { - static instance: UnitWound = UnitWound { - parts: ::std::vec::Vec::new(), - severed_part: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitWound { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitWound").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitWound { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitWound { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.UnitDefinition) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitDefinition { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.isValid) - pub isValid: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.pos_x) - pub pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.pos_y) - pub pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.pos_z) - pub pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.race) - pub race: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.profession_color) - pub profession_color: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.flags1) - pub flags1: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.flags2) - pub flags2: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.flags3) - pub flags3: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.is_soldier) - pub is_soldier: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.size_info) - pub size_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.blood_max) - pub blood_max: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.blood_count) - pub blood_count: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.appearance) - pub appearance: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.profession_id) - pub profession_id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.noble_positions) - pub noble_positions: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.rider_id) - pub rider_id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.inventory) - pub inventory: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.subpos_x) - pub subpos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.subpos_y) - pub subpos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.subpos_z) - pub subpos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.facing) - pub facing: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.age) - pub age: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.UnitDefinition.wounds) - pub wounds: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.UnitDefinition.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitDefinition { - fn default() -> &'a UnitDefinition { - ::default_instance() - } -} - -impl UnitDefinition { - pub fn new() -> UnitDefinition { - ::std::default::Default::default() - } - - // required int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // optional bool isValid = 2; - - pub fn isValid(&self) -> bool { - self.isValid.unwrap_or(false) - } - - pub fn clear_isValid(&mut self) { - self.isValid = ::std::option::Option::None; - } - - pub fn has_isValid(&self) -> bool { - self.isValid.is_some() - } - - // Param is passed by value, moved - pub fn set_isValid(&mut self, v: bool) { - self.isValid = ::std::option::Option::Some(v); - } - - // optional int32 pos_x = 3; - - pub fn pos_x(&self) -> i32 { - self.pos_x.unwrap_or(0) - } - - pub fn clear_pos_x(&mut self) { - self.pos_x = ::std::option::Option::None; - } - - pub fn has_pos_x(&self) -> bool { - self.pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x(&mut self, v: i32) { - self.pos_x = ::std::option::Option::Some(v); - } - - // optional int32 pos_y = 4; - - pub fn pos_y(&self) -> i32 { - self.pos_y.unwrap_or(0) - } - - pub fn clear_pos_y(&mut self) { - self.pos_y = ::std::option::Option::None; - } - - pub fn has_pos_y(&self) -> bool { - self.pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y(&mut self, v: i32) { - self.pos_y = ::std::option::Option::Some(v); - } - - // optional int32 pos_z = 5; - - pub fn pos_z(&self) -> i32 { - self.pos_z.unwrap_or(0) - } - - pub fn clear_pos_z(&mut self) { - self.pos_z = ::std::option::Option::None; - } - - pub fn has_pos_z(&self) -> bool { - self.pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_z(&mut self, v: i32) { - self.pos_z = ::std::option::Option::Some(v); - } - - // optional uint32 flags1 = 8; - - pub fn flags1(&self) -> u32 { - self.flags1.unwrap_or(0) - } - - pub fn clear_flags1(&mut self) { - self.flags1 = ::std::option::Option::None; - } - - pub fn has_flags1(&self) -> bool { - self.flags1.is_some() - } - - // Param is passed by value, moved - pub fn set_flags1(&mut self, v: u32) { - self.flags1 = ::std::option::Option::Some(v); - } - - // optional uint32 flags2 = 9; - - pub fn flags2(&self) -> u32 { - self.flags2.unwrap_or(0) - } - - pub fn clear_flags2(&mut self) { - self.flags2 = ::std::option::Option::None; - } - - pub fn has_flags2(&self) -> bool { - self.flags2.is_some() - } - - // Param is passed by value, moved - pub fn set_flags2(&mut self, v: u32) { - self.flags2 = ::std::option::Option::Some(v); - } - - // optional uint32 flags3 = 10; - - pub fn flags3(&self) -> u32 { - self.flags3.unwrap_or(0) - } - - pub fn clear_flags3(&mut self) { - self.flags3 = ::std::option::Option::None; - } - - pub fn has_flags3(&self) -> bool { - self.flags3.is_some() - } - - // Param is passed by value, moved - pub fn set_flags3(&mut self, v: u32) { - self.flags3 = ::std::option::Option::Some(v); - } - - // optional bool is_soldier = 11; - - pub fn is_soldier(&self) -> bool { - self.is_soldier.unwrap_or(false) - } - - pub fn clear_is_soldier(&mut self) { - self.is_soldier = ::std::option::Option::None; - } - - pub fn has_is_soldier(&self) -> bool { - self.is_soldier.is_some() - } - - // Param is passed by value, moved - pub fn set_is_soldier(&mut self, v: bool) { - self.is_soldier = ::std::option::Option::Some(v); - } - - // optional string name = 13; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 blood_max = 14; - - pub fn blood_max(&self) -> i32 { - self.blood_max.unwrap_or(0) - } - - pub fn clear_blood_max(&mut self) { - self.blood_max = ::std::option::Option::None; - } - - pub fn has_blood_max(&self) -> bool { - self.blood_max.is_some() - } - - // Param is passed by value, moved - pub fn set_blood_max(&mut self, v: i32) { - self.blood_max = ::std::option::Option::Some(v); - } - - // optional int32 blood_count = 15; - - pub fn blood_count(&self) -> i32 { - self.blood_count.unwrap_or(0) - } - - pub fn clear_blood_count(&mut self) { - self.blood_count = ::std::option::Option::None; - } - - pub fn has_blood_count(&self) -> bool { - self.blood_count.is_some() - } - - // Param is passed by value, moved - pub fn set_blood_count(&mut self, v: i32) { - self.blood_count = ::std::option::Option::Some(v); - } - - // optional int32 profession_id = 17; - - pub fn profession_id(&self) -> i32 { - self.profession_id.unwrap_or(0) - } - - pub fn clear_profession_id(&mut self) { - self.profession_id = ::std::option::Option::None; - } - - pub fn has_profession_id(&self) -> bool { - self.profession_id.is_some() - } - - // Param is passed by value, moved - pub fn set_profession_id(&mut self, v: i32) { - self.profession_id = ::std::option::Option::Some(v); - } - - // optional int32 rider_id = 19; - - pub fn rider_id(&self) -> i32 { - self.rider_id.unwrap_or(0) - } - - pub fn clear_rider_id(&mut self) { - self.rider_id = ::std::option::Option::None; - } - - pub fn has_rider_id(&self) -> bool { - self.rider_id.is_some() - } - - // Param is passed by value, moved - pub fn set_rider_id(&mut self, v: i32) { - self.rider_id = ::std::option::Option::Some(v); - } - - // optional float subpos_x = 21; - - pub fn subpos_x(&self) -> f32 { - self.subpos_x.unwrap_or(0.) - } - - pub fn clear_subpos_x(&mut self) { - self.subpos_x = ::std::option::Option::None; - } - - pub fn has_subpos_x(&self) -> bool { - self.subpos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_subpos_x(&mut self, v: f32) { - self.subpos_x = ::std::option::Option::Some(v); - } - - // optional float subpos_y = 22; - - pub fn subpos_y(&self) -> f32 { - self.subpos_y.unwrap_or(0.) - } - - pub fn clear_subpos_y(&mut self) { - self.subpos_y = ::std::option::Option::None; - } - - pub fn has_subpos_y(&self) -> bool { - self.subpos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_subpos_y(&mut self, v: f32) { - self.subpos_y = ::std::option::Option::Some(v); - } - - // optional float subpos_z = 23; - - pub fn subpos_z(&self) -> f32 { - self.subpos_z.unwrap_or(0.) - } - - pub fn clear_subpos_z(&mut self) { - self.subpos_z = ::std::option::Option::None; - } - - pub fn has_subpos_z(&self) -> bool { - self.subpos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_subpos_z(&mut self, v: f32) { - self.subpos_z = ::std::option::Option::Some(v); - } - - // optional int32 age = 25; - - pub fn age(&self) -> i32 { - self.age.unwrap_or(0) - } - - pub fn clear_age(&mut self) { - self.age = ::std::option::Option::None; - } - - pub fn has_age(&self) -> bool { - self.age.is_some() - } - - // Param is passed by value, moved - pub fn set_age(&mut self, v: i32) { - self.age = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(26); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &UnitDefinition| { &m.id }, - |m: &mut UnitDefinition| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "isValid", - |m: &UnitDefinition| { &m.isValid }, - |m: &mut UnitDefinition| { &mut m.isValid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x", - |m: &UnitDefinition| { &m.pos_x }, - |m: &mut UnitDefinition| { &mut m.pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y", - |m: &UnitDefinition| { &m.pos_y }, - |m: &mut UnitDefinition| { &mut m.pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_z", - |m: &UnitDefinition| { &m.pos_z }, - |m: &mut UnitDefinition| { &mut m.pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "race", - |m: &UnitDefinition| { &m.race }, - |m: &mut UnitDefinition| { &mut m.race }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ColorDefinition>( - "profession_color", - |m: &UnitDefinition| { &m.profession_color }, - |m: &mut UnitDefinition| { &mut m.profession_color }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags1", - |m: &UnitDefinition| { &m.flags1 }, - |m: &mut UnitDefinition| { &mut m.flags1 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags2", - |m: &UnitDefinition| { &m.flags2 }, - |m: &mut UnitDefinition| { &mut m.flags2 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags3", - |m: &UnitDefinition| { &m.flags3 }, - |m: &mut UnitDefinition| { &mut m.flags3 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "is_soldier", - |m: &UnitDefinition| { &m.is_soldier }, - |m: &mut UnitDefinition| { &mut m.is_soldier }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, BodySizeInfo>( - "size_info", - |m: &UnitDefinition| { &m.size_info }, - |m: &mut UnitDefinition| { &mut m.size_info }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &UnitDefinition| { &m.name }, - |m: &mut UnitDefinition| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "blood_max", - |m: &UnitDefinition| { &m.blood_max }, - |m: &mut UnitDefinition| { &mut m.blood_max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "blood_count", - |m: &UnitDefinition| { &m.blood_count }, - |m: &mut UnitDefinition| { &mut m.blood_count }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, UnitAppearance>( - "appearance", - |m: &UnitDefinition| { &m.appearance }, - |m: &mut UnitDefinition| { &mut m.appearance }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "profession_id", - |m: &UnitDefinition| { &m.profession_id }, - |m: &mut UnitDefinition| { &mut m.profession_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "noble_positions", - |m: &UnitDefinition| { &m.noble_positions }, - |m: &mut UnitDefinition| { &mut m.noble_positions }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "rider_id", - |m: &UnitDefinition| { &m.rider_id }, - |m: &mut UnitDefinition| { &mut m.rider_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "inventory", - |m: &UnitDefinition| { &m.inventory }, - |m: &mut UnitDefinition| { &mut m.inventory }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subpos_x", - |m: &UnitDefinition| { &m.subpos_x }, - |m: &mut UnitDefinition| { &mut m.subpos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subpos_y", - |m: &UnitDefinition| { &m.subpos_y }, - |m: &mut UnitDefinition| { &mut m.subpos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subpos_z", - |m: &UnitDefinition| { &m.subpos_z }, - |m: &mut UnitDefinition| { &mut m.subpos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "facing", - |m: &UnitDefinition| { &m.facing }, - |m: &mut UnitDefinition| { &mut m.facing }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "age", - |m: &UnitDefinition| { &m.age }, - |m: &mut UnitDefinition| { &mut m.age }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "wounds", - |m: &UnitDefinition| { &m.wounds }, - |m: &mut UnitDefinition| { &mut m.wounds }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitDefinition", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitDefinition { - const NAME: &'static str = "UnitDefinition"; - - fn is_initialized(&self) -> bool { - if self.id.is_none() { - return false; - } - for v in &self.race { - if !v.is_initialized() { - return false; - } - }; - for v in &self.profession_color { - if !v.is_initialized() { - return false; - } - }; - for v in &self.size_info { - if !v.is_initialized() { - return false; - } - }; - for v in &self.appearance { - if !v.is_initialized() { - return false; - } - }; - for v in &self.inventory { - if !v.is_initialized() { - return false; - } - }; - for v in &self.facing { - if !v.is_initialized() { - return false; - } - }; - for v in &self.wounds { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.isValid = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.race)?; - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.profession_color)?; - }, - 64 => { - self.flags1 = ::std::option::Option::Some(is.read_uint32()?); - }, - 72 => { - self.flags2 = ::std::option::Option::Some(is.read_uint32()?); - }, - 80 => { - self.flags3 = ::std::option::Option::Some(is.read_uint32()?); - }, - 88 => { - self.is_soldier = ::std::option::Option::Some(is.read_bool()?); - }, - 98 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.size_info)?; - }, - 106 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 112 => { - self.blood_max = ::std::option::Option::Some(is.read_int32()?); - }, - 120 => { - self.blood_count = ::std::option::Option::Some(is.read_int32()?); - }, - 130 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.appearance)?; - }, - 136 => { - self.profession_id = ::std::option::Option::Some(is.read_int32()?); - }, - 146 => { - self.noble_positions.push(is.read_string()?); - }, - 152 => { - self.rider_id = ::std::option::Option::Some(is.read_int32()?); - }, - 162 => { - self.inventory.push(is.read_message()?); - }, - 173 => { - self.subpos_x = ::std::option::Option::Some(is.read_float()?); - }, - 181 => { - self.subpos_y = ::std::option::Option::Some(is.read_float()?); - }, - 189 => { - self.subpos_z = ::std::option::Option::Some(is.read_float()?); - }, - 194 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.facing)?; - }, - 200 => { - self.age = ::std::option::Option::Some(is.read_int32()?); - }, - 210 => { - self.wounds.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.isValid { - my_size += 1 + 1; - } - if let Some(v) = self.pos_x { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.pos_y { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.pos_z { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.race.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.profession_color.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.flags1 { - my_size += ::protobuf::rt::uint32_size(8, v); - } - if let Some(v) = self.flags2 { - my_size += ::protobuf::rt::uint32_size(9, v); - } - if let Some(v) = self.flags3 { - my_size += ::protobuf::rt::uint32_size(10, v); - } - if let Some(v) = self.is_soldier { - my_size += 1 + 1; - } - if let Some(v) = self.size_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(13, &v); - } - if let Some(v) = self.blood_max { - my_size += ::protobuf::rt::int32_size(14, v); - } - if let Some(v) = self.blood_count { - my_size += ::protobuf::rt::int32_size(15, v); - } - if let Some(v) = self.appearance.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.profession_id { - my_size += ::protobuf::rt::int32_size(17, v); - } - for value in &self.noble_positions { - my_size += ::protobuf::rt::string_size(18, &value); - }; - if let Some(v) = self.rider_id { - my_size += ::protobuf::rt::int32_size(19, v); - } - for value in &self.inventory { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.subpos_x { - my_size += 2 + 4; - } - if let Some(v) = self.subpos_y { - my_size += 2 + 4; - } - if let Some(v) = self.subpos_z { - my_size += 2 + 4; - } - if let Some(v) = self.facing.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.age { - my_size += ::protobuf::rt::int32_size(25, v); - } - for value in &self.wounds { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.isValid { - os.write_bool(2, v)?; - } - if let Some(v) = self.pos_x { - os.write_int32(3, v)?; - } - if let Some(v) = self.pos_y { - os.write_int32(4, v)?; - } - if let Some(v) = self.pos_z { - os.write_int32(5, v)?; - } - if let Some(v) = self.race.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - if let Some(v) = self.profession_color.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - if let Some(v) = self.flags1 { - os.write_uint32(8, v)?; - } - if let Some(v) = self.flags2 { - os.write_uint32(9, v)?; - } - if let Some(v) = self.flags3 { - os.write_uint32(10, v)?; - } - if let Some(v) = self.is_soldier { - os.write_bool(11, v)?; - } - if let Some(v) = self.size_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(13, v)?; - } - if let Some(v) = self.blood_max { - os.write_int32(14, v)?; - } - if let Some(v) = self.blood_count { - os.write_int32(15, v)?; - } - if let Some(v) = self.appearance.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?; - } - if let Some(v) = self.profession_id { - os.write_int32(17, v)?; - } - for v in &self.noble_positions { - os.write_string(18, &v)?; - }; - if let Some(v) = self.rider_id { - os.write_int32(19, v)?; - } - for v in &self.inventory { - ::protobuf::rt::write_message_field_with_cached_size(20, v, os)?; - }; - if let Some(v) = self.subpos_x { - os.write_float(21, v)?; - } - if let Some(v) = self.subpos_y { - os.write_float(22, v)?; - } - if let Some(v) = self.subpos_z { - os.write_float(23, v)?; - } - if let Some(v) = self.facing.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(24, v, os)?; - } - if let Some(v) = self.age { - os.write_int32(25, v)?; - } - for v in &self.wounds { - ::protobuf::rt::write_message_field_with_cached_size(26, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitDefinition { - UnitDefinition::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.isValid = ::std::option::Option::None; - self.pos_x = ::std::option::Option::None; - self.pos_y = ::std::option::Option::None; - self.pos_z = ::std::option::Option::None; - self.race.clear(); - self.profession_color.clear(); - self.flags1 = ::std::option::Option::None; - self.flags2 = ::std::option::Option::None; - self.flags3 = ::std::option::Option::None; - self.is_soldier = ::std::option::Option::None; - self.size_info.clear(); - self.name = ::std::option::Option::None; - self.blood_max = ::std::option::Option::None; - self.blood_count = ::std::option::Option::None; - self.appearance.clear(); - self.profession_id = ::std::option::Option::None; - self.noble_positions.clear(); - self.rider_id = ::std::option::Option::None; - self.inventory.clear(); - self.subpos_x = ::std::option::Option::None; - self.subpos_y = ::std::option::Option::None; - self.subpos_z = ::std::option::Option::None; - self.facing.clear(); - self.age = ::std::option::Option::None; - self.wounds.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitDefinition { - static instance: UnitDefinition = UnitDefinition { - id: ::std::option::Option::None, - isValid: ::std::option::Option::None, - pos_x: ::std::option::Option::None, - pos_y: ::std::option::Option::None, - pos_z: ::std::option::Option::None, - race: ::protobuf::MessageField::none(), - profession_color: ::protobuf::MessageField::none(), - flags1: ::std::option::Option::None, - flags2: ::std::option::Option::None, - flags3: ::std::option::Option::None, - is_soldier: ::std::option::Option::None, - size_info: ::protobuf::MessageField::none(), - name: ::std::option::Option::None, - blood_max: ::std::option::Option::None, - blood_count: ::std::option::Option::None, - appearance: ::protobuf::MessageField::none(), - profession_id: ::std::option::Option::None, - noble_positions: ::std::vec::Vec::new(), - rider_id: ::std::option::Option::None, - inventory: ::std::vec::Vec::new(), - subpos_x: ::std::option::Option::None, - subpos_y: ::std::option::Option::None, - subpos_z: ::std::option::Option::None, - facing: ::protobuf::MessageField::none(), - age: ::std::option::Option::None, - wounds: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitDefinition { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitDefinition").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitDefinition { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitDefinition { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.UnitList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UnitList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.UnitList.creature_list) - pub creature_list: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.UnitList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnitList { - fn default() -> &'a UnitList { - ::default_instance() - } -} - -impl UnitList { - pub fn new() -> UnitList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "creature_list", - |m: &UnitList| { &m.creature_list }, - |m: &mut UnitList| { &mut m.creature_list }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UnitList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UnitList { - const NAME: &'static str = "UnitList"; - - fn is_initialized(&self) -> bool { - for v in &self.creature_list { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.creature_list.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.creature_list { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.creature_list { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnitList { - UnitList::new() - } - - fn clear(&mut self) { - self.creature_list.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnitList { - static instance: UnitList = UnitList { - creature_list: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for UnitList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UnitList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UnitList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UnitList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BlockRequest) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BlockRequest { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.blocks_needed) - pub blocks_needed: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.min_x) - pub min_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.max_x) - pub max_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.min_y) - pub min_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.max_y) - pub max_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.min_z) - pub min_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.max_z) - pub max_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockRequest.force_reload) - pub force_reload: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BlockRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BlockRequest { - fn default() -> &'a BlockRequest { - ::default_instance() - } -} - -impl BlockRequest { - pub fn new() -> BlockRequest { - ::std::default::Default::default() - } - - // optional int32 blocks_needed = 1; - - pub fn blocks_needed(&self) -> i32 { - self.blocks_needed.unwrap_or(0) - } - - pub fn clear_blocks_needed(&mut self) { - self.blocks_needed = ::std::option::Option::None; - } - - pub fn has_blocks_needed(&self) -> bool { - self.blocks_needed.is_some() - } - - // Param is passed by value, moved - pub fn set_blocks_needed(&mut self, v: i32) { - self.blocks_needed = ::std::option::Option::Some(v); - } - - // optional int32 min_x = 2; - - pub fn min_x(&self) -> i32 { - self.min_x.unwrap_or(0) - } - - pub fn clear_min_x(&mut self) { - self.min_x = ::std::option::Option::None; - } - - pub fn has_min_x(&self) -> bool { - self.min_x.is_some() - } - - // Param is passed by value, moved - pub fn set_min_x(&mut self, v: i32) { - self.min_x = ::std::option::Option::Some(v); - } - - // optional int32 max_x = 3; - - pub fn max_x(&self) -> i32 { - self.max_x.unwrap_or(0) - } - - pub fn clear_max_x(&mut self) { - self.max_x = ::std::option::Option::None; - } - - pub fn has_max_x(&self) -> bool { - self.max_x.is_some() - } - - // Param is passed by value, moved - pub fn set_max_x(&mut self, v: i32) { - self.max_x = ::std::option::Option::Some(v); - } - - // optional int32 min_y = 4; - - pub fn min_y(&self) -> i32 { - self.min_y.unwrap_or(0) - } - - pub fn clear_min_y(&mut self) { - self.min_y = ::std::option::Option::None; - } - - pub fn has_min_y(&self) -> bool { - self.min_y.is_some() - } - - // Param is passed by value, moved - pub fn set_min_y(&mut self, v: i32) { - self.min_y = ::std::option::Option::Some(v); - } - - // optional int32 max_y = 5; - - pub fn max_y(&self) -> i32 { - self.max_y.unwrap_or(0) - } - - pub fn clear_max_y(&mut self) { - self.max_y = ::std::option::Option::None; - } - - pub fn has_max_y(&self) -> bool { - self.max_y.is_some() - } - - // Param is passed by value, moved - pub fn set_max_y(&mut self, v: i32) { - self.max_y = ::std::option::Option::Some(v); - } - - // optional int32 min_z = 6; - - pub fn min_z(&self) -> i32 { - self.min_z.unwrap_or(0) - } - - pub fn clear_min_z(&mut self) { - self.min_z = ::std::option::Option::None; - } - - pub fn has_min_z(&self) -> bool { - self.min_z.is_some() - } - - // Param is passed by value, moved - pub fn set_min_z(&mut self, v: i32) { - self.min_z = ::std::option::Option::Some(v); - } - - // optional int32 max_z = 7; - - pub fn max_z(&self) -> i32 { - self.max_z.unwrap_or(0) - } - - pub fn clear_max_z(&mut self) { - self.max_z = ::std::option::Option::None; - } - - pub fn has_max_z(&self) -> bool { - self.max_z.is_some() - } - - // Param is passed by value, moved - pub fn set_max_z(&mut self, v: i32) { - self.max_z = ::std::option::Option::Some(v); - } - - // optional bool force_reload = 8; - - pub fn force_reload(&self) -> bool { - self.force_reload.unwrap_or(false) - } - - pub fn clear_force_reload(&mut self) { - self.force_reload = ::std::option::Option::None; - } - - pub fn has_force_reload(&self) -> bool { - self.force_reload.is_some() - } - - // Param is passed by value, moved - pub fn set_force_reload(&mut self, v: bool) { - self.force_reload = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "blocks_needed", - |m: &BlockRequest| { &m.blocks_needed }, - |m: &mut BlockRequest| { &mut m.blocks_needed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "min_x", - |m: &BlockRequest| { &m.min_x }, - |m: &mut BlockRequest| { &mut m.min_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_x", - |m: &BlockRequest| { &m.max_x }, - |m: &mut BlockRequest| { &mut m.max_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "min_y", - |m: &BlockRequest| { &m.min_y }, - |m: &mut BlockRequest| { &mut m.min_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_y", - |m: &BlockRequest| { &m.max_y }, - |m: &mut BlockRequest| { &mut m.max_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "min_z", - |m: &BlockRequest| { &m.min_z }, - |m: &mut BlockRequest| { &mut m.min_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_z", - |m: &BlockRequest| { &m.max_z }, - |m: &mut BlockRequest| { &mut m.max_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "force_reload", - |m: &BlockRequest| { &m.force_reload }, - |m: &mut BlockRequest| { &mut m.force_reload }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BlockRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BlockRequest { - const NAME: &'static str = "BlockRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.blocks_needed = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.min_x = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.max_x = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.min_y = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.max_y = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.min_z = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.max_z = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.force_reload = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.blocks_needed { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.min_x { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.max_x { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.min_y { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.max_y { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.min_z { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.max_z { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.force_reload { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.blocks_needed { - os.write_int32(1, v)?; - } - if let Some(v) = self.min_x { - os.write_int32(2, v)?; - } - if let Some(v) = self.max_x { - os.write_int32(3, v)?; - } - if let Some(v) = self.min_y { - os.write_int32(4, v)?; - } - if let Some(v) = self.max_y { - os.write_int32(5, v)?; - } - if let Some(v) = self.min_z { - os.write_int32(6, v)?; - } - if let Some(v) = self.max_z { - os.write_int32(7, v)?; - } - if let Some(v) = self.force_reload { - os.write_bool(8, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BlockRequest { - BlockRequest::new() - } - - fn clear(&mut self) { - self.blocks_needed = ::std::option::Option::None; - self.min_x = ::std::option::Option::None; - self.max_x = ::std::option::Option::None; - self.min_y = ::std::option::Option::None; - self.max_y = ::std::option::Option::None; - self.min_z = ::std::option::Option::None; - self.max_z = ::std::option::Option::None; - self.force_reload = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BlockRequest { - static instance: BlockRequest = BlockRequest { - blocks_needed: ::std::option::Option::None, - min_x: ::std::option::Option::None, - max_x: ::std::option::Option::None, - min_y: ::std::option::Option::None, - max_y: ::std::option::Option::None, - min_z: ::std::option::Option::None, - max_z: ::std::option::Option::None, - force_reload: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BlockRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BlockRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BlockRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BlockRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BlockList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BlockList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BlockList.map_blocks) - pub map_blocks: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockList.map_x) - pub map_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockList.map_y) - pub map_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockList.engravings) - pub engravings: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.BlockList.ocean_waves) - pub ocean_waves: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BlockList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BlockList { - fn default() -> &'a BlockList { - ::default_instance() - } -} - -impl BlockList { - pub fn new() -> BlockList { - ::std::default::Default::default() - } - - // optional int32 map_x = 2; - - pub fn map_x(&self) -> i32 { - self.map_x.unwrap_or(0) - } - - pub fn clear_map_x(&mut self) { - self.map_x = ::std::option::Option::None; - } - - pub fn has_map_x(&self) -> bool { - self.map_x.is_some() - } - - // Param is passed by value, moved - pub fn set_map_x(&mut self, v: i32) { - self.map_x = ::std::option::Option::Some(v); - } - - // optional int32 map_y = 3; - - pub fn map_y(&self) -> i32 { - self.map_y.unwrap_or(0) - } - - pub fn clear_map_y(&mut self) { - self.map_y = ::std::option::Option::None; - } - - pub fn has_map_y(&self) -> bool { - self.map_y.is_some() - } - - // Param is passed by value, moved - pub fn set_map_y(&mut self, v: i32) { - self.map_y = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "map_blocks", - |m: &BlockList| { &m.map_blocks }, - |m: &mut BlockList| { &mut m.map_blocks }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_x", - |m: &BlockList| { &m.map_x }, - |m: &mut BlockList| { &mut m.map_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_y", - |m: &BlockList| { &m.map_y }, - |m: &mut BlockList| { &mut m.map_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "engravings", - |m: &BlockList| { &m.engravings }, - |m: &mut BlockList| { &mut m.engravings }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "ocean_waves", - |m: &BlockList| { &m.ocean_waves }, - |m: &mut BlockList| { &mut m.ocean_waves }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BlockList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BlockList { - const NAME: &'static str = "BlockList"; - - fn is_initialized(&self) -> bool { - for v in &self.map_blocks { - if !v.is_initialized() { - return false; - } - }; - for v in &self.engravings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.ocean_waves { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.map_blocks.push(is.read_message()?); - }, - 16 => { - self.map_x = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.map_y = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - self.engravings.push(is.read_message()?); - }, - 42 => { - self.ocean_waves.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.map_blocks { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.map_x { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.map_y { - my_size += ::protobuf::rt::int32_size(3, v); - } - for value in &self.engravings { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.ocean_waves { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.map_blocks { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - if let Some(v) = self.map_x { - os.write_int32(2, v)?; - } - if let Some(v) = self.map_y { - os.write_int32(3, v)?; - } - for v in &self.engravings { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }; - for v in &self.ocean_waves { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BlockList { - BlockList::new() - } - - fn clear(&mut self) { - self.map_blocks.clear(); - self.map_x = ::std::option::Option::None; - self.map_y = ::std::option::Option::None; - self.engravings.clear(); - self.ocean_waves.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BlockList { - static instance: BlockList = BlockList { - map_blocks: ::std::vec::Vec::new(), - map_x: ::std::option::Option::None, - map_y: ::std::option::Option::None, - engravings: ::std::vec::Vec::new(), - ocean_waves: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BlockList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BlockList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BlockList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BlockList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PlantDef) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PlantDef { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PlantDef.pos_x) - pub pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantDef.pos_y) - pub pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantDef.pos_z) - pub pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantDef.index) - pub index: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PlantDef.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PlantDef { - fn default() -> &'a PlantDef { - ::default_instance() - } -} - -impl PlantDef { - pub fn new() -> PlantDef { - ::std::default::Default::default() - } - - // required int32 pos_x = 1; - - pub fn pos_x(&self) -> i32 { - self.pos_x.unwrap_or(0) - } - - pub fn clear_pos_x(&mut self) { - self.pos_x = ::std::option::Option::None; - } - - pub fn has_pos_x(&self) -> bool { - self.pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x(&mut self, v: i32) { - self.pos_x = ::std::option::Option::Some(v); - } - - // required int32 pos_y = 2; - - pub fn pos_y(&self) -> i32 { - self.pos_y.unwrap_or(0) - } - - pub fn clear_pos_y(&mut self) { - self.pos_y = ::std::option::Option::None; - } - - pub fn has_pos_y(&self) -> bool { - self.pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y(&mut self, v: i32) { - self.pos_y = ::std::option::Option::Some(v); - } - - // required int32 pos_z = 3; - - pub fn pos_z(&self) -> i32 { - self.pos_z.unwrap_or(0) - } - - pub fn clear_pos_z(&mut self) { - self.pos_z = ::std::option::Option::None; - } - - pub fn has_pos_z(&self) -> bool { - self.pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_z(&mut self, v: i32) { - self.pos_z = ::std::option::Option::Some(v); - } - - // required int32 index = 4; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x", - |m: &PlantDef| { &m.pos_x }, - |m: &mut PlantDef| { &mut m.pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y", - |m: &PlantDef| { &m.pos_y }, - |m: &mut PlantDef| { &mut m.pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_z", - |m: &PlantDef| { &m.pos_z }, - |m: &mut PlantDef| { &mut m.pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &PlantDef| { &m.index }, - |m: &mut PlantDef| { &mut m.index }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PlantDef", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PlantDef { - const NAME: &'static str = "PlantDef"; - - fn is_initialized(&self) -> bool { - if self.pos_x.is_none() { - return false; - } - if self.pos_y.is_none() { - return false; - } - if self.pos_z.is_none() { - return false; - } - if self.index.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.pos_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.pos_z { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(4, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.pos_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.pos_z { - os.write_int32(3, v)?; - } - if let Some(v) = self.index { - os.write_int32(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PlantDef { - PlantDef::new() - } - - fn clear(&mut self) { - self.pos_x = ::std::option::Option::None; - self.pos_y = ::std::option::Option::None; - self.pos_z = ::std::option::Option::None; - self.index = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PlantDef { - static instance: PlantDef = PlantDef { - pos_x: ::std::option::Option::None, - pos_y: ::std::option::Option::None, - pos_z: ::std::option::Option::None, - index: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PlantDef { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PlantDef").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PlantDef { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PlantDef { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PlantList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PlantList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PlantList.plant_list) - pub plant_list: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PlantList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PlantList { - fn default() -> &'a PlantList { - ::default_instance() - } -} - -impl PlantList { - pub fn new() -> PlantList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "plant_list", - |m: &PlantList| { &m.plant_list }, - |m: &mut PlantList| { &mut m.plant_list }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PlantList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PlantList { - const NAME: &'static str = "PlantList"; - - fn is_initialized(&self) -> bool { - for v in &self.plant_list { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.plant_list.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.plant_list { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.plant_list { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PlantList { - PlantList::new() - } - - fn clear(&mut self) { - self.plant_list.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PlantList { - static instance: PlantList = PlantList { - plant_list: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PlantList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PlantList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PlantList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PlantList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ViewInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ViewInfo { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.view_pos_x) - pub view_pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.view_pos_y) - pub view_pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.view_pos_z) - pub view_pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.view_size_x) - pub view_size_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.view_size_y) - pub view_size_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.cursor_pos_x) - pub cursor_pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.cursor_pos_y) - pub cursor_pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.cursor_pos_z) - pub cursor_pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.follow_unit_id) - pub follow_unit_id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ViewInfo.follow_item_id) - pub follow_item_id: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ViewInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ViewInfo { - fn default() -> &'a ViewInfo { - ::default_instance() - } -} - -impl ViewInfo { - pub fn new() -> ViewInfo { - ::std::default::Default::default() - } - - // optional int32 view_pos_x = 1; - - pub fn view_pos_x(&self) -> i32 { - self.view_pos_x.unwrap_or(0) - } - - pub fn clear_view_pos_x(&mut self) { - self.view_pos_x = ::std::option::Option::None; - } - - pub fn has_view_pos_x(&self) -> bool { - self.view_pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_view_pos_x(&mut self, v: i32) { - self.view_pos_x = ::std::option::Option::Some(v); - } - - // optional int32 view_pos_y = 2; - - pub fn view_pos_y(&self) -> i32 { - self.view_pos_y.unwrap_or(0) - } - - pub fn clear_view_pos_y(&mut self) { - self.view_pos_y = ::std::option::Option::None; - } - - pub fn has_view_pos_y(&self) -> bool { - self.view_pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_view_pos_y(&mut self, v: i32) { - self.view_pos_y = ::std::option::Option::Some(v); - } - - // optional int32 view_pos_z = 3; - - pub fn view_pos_z(&self) -> i32 { - self.view_pos_z.unwrap_or(0) - } - - pub fn clear_view_pos_z(&mut self) { - self.view_pos_z = ::std::option::Option::None; - } - - pub fn has_view_pos_z(&self) -> bool { - self.view_pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_view_pos_z(&mut self, v: i32) { - self.view_pos_z = ::std::option::Option::Some(v); - } - - // optional int32 view_size_x = 4; - - pub fn view_size_x(&self) -> i32 { - self.view_size_x.unwrap_or(0) - } - - pub fn clear_view_size_x(&mut self) { - self.view_size_x = ::std::option::Option::None; - } - - pub fn has_view_size_x(&self) -> bool { - self.view_size_x.is_some() - } - - // Param is passed by value, moved - pub fn set_view_size_x(&mut self, v: i32) { - self.view_size_x = ::std::option::Option::Some(v); - } - - // optional int32 view_size_y = 5; - - pub fn view_size_y(&self) -> i32 { - self.view_size_y.unwrap_or(0) - } - - pub fn clear_view_size_y(&mut self) { - self.view_size_y = ::std::option::Option::None; - } - - pub fn has_view_size_y(&self) -> bool { - self.view_size_y.is_some() - } - - // Param is passed by value, moved - pub fn set_view_size_y(&mut self, v: i32) { - self.view_size_y = ::std::option::Option::Some(v); - } - - // optional int32 cursor_pos_x = 6; - - pub fn cursor_pos_x(&self) -> i32 { - self.cursor_pos_x.unwrap_or(0) - } - - pub fn clear_cursor_pos_x(&mut self) { - self.cursor_pos_x = ::std::option::Option::None; - } - - pub fn has_cursor_pos_x(&self) -> bool { - self.cursor_pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_cursor_pos_x(&mut self, v: i32) { - self.cursor_pos_x = ::std::option::Option::Some(v); - } - - // optional int32 cursor_pos_y = 7; - - pub fn cursor_pos_y(&self) -> i32 { - self.cursor_pos_y.unwrap_or(0) - } - - pub fn clear_cursor_pos_y(&mut self) { - self.cursor_pos_y = ::std::option::Option::None; - } - - pub fn has_cursor_pos_y(&self) -> bool { - self.cursor_pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_cursor_pos_y(&mut self, v: i32) { - self.cursor_pos_y = ::std::option::Option::Some(v); - } - - // optional int32 cursor_pos_z = 8; - - pub fn cursor_pos_z(&self) -> i32 { - self.cursor_pos_z.unwrap_or(0) - } - - pub fn clear_cursor_pos_z(&mut self) { - self.cursor_pos_z = ::std::option::Option::None; - } - - pub fn has_cursor_pos_z(&self) -> bool { - self.cursor_pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_cursor_pos_z(&mut self, v: i32) { - self.cursor_pos_z = ::std::option::Option::Some(v); - } - - // optional int32 follow_unit_id = 9; - - pub fn follow_unit_id(&self) -> i32 { - self.follow_unit_id.unwrap_or(-1i32) - } - - pub fn clear_follow_unit_id(&mut self) { - self.follow_unit_id = ::std::option::Option::None; - } - - pub fn has_follow_unit_id(&self) -> bool { - self.follow_unit_id.is_some() - } - - // Param is passed by value, moved - pub fn set_follow_unit_id(&mut self, v: i32) { - self.follow_unit_id = ::std::option::Option::Some(v); - } - - // optional int32 follow_item_id = 10; - - pub fn follow_item_id(&self) -> i32 { - self.follow_item_id.unwrap_or(-1i32) - } - - pub fn clear_follow_item_id(&mut self) { - self.follow_item_id = ::std::option::Option::None; - } - - pub fn has_follow_item_id(&self) -> bool { - self.follow_item_id.is_some() - } - - // Param is passed by value, moved - pub fn set_follow_item_id(&mut self, v: i32) { - self.follow_item_id = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(10); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "view_pos_x", - |m: &ViewInfo| { &m.view_pos_x }, - |m: &mut ViewInfo| { &mut m.view_pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "view_pos_y", - |m: &ViewInfo| { &m.view_pos_y }, - |m: &mut ViewInfo| { &mut m.view_pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "view_pos_z", - |m: &ViewInfo| { &m.view_pos_z }, - |m: &mut ViewInfo| { &mut m.view_pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "view_size_x", - |m: &ViewInfo| { &m.view_size_x }, - |m: &mut ViewInfo| { &mut m.view_size_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "view_size_y", - |m: &ViewInfo| { &m.view_size_y }, - |m: &mut ViewInfo| { &mut m.view_size_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cursor_pos_x", - |m: &ViewInfo| { &m.cursor_pos_x }, - |m: &mut ViewInfo| { &mut m.cursor_pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cursor_pos_y", - |m: &ViewInfo| { &m.cursor_pos_y }, - |m: &mut ViewInfo| { &mut m.cursor_pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cursor_pos_z", - |m: &ViewInfo| { &m.cursor_pos_z }, - |m: &mut ViewInfo| { &mut m.cursor_pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "follow_unit_id", - |m: &ViewInfo| { &m.follow_unit_id }, - |m: &mut ViewInfo| { &mut m.follow_unit_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "follow_item_id", - |m: &ViewInfo| { &m.follow_item_id }, - |m: &mut ViewInfo| { &mut m.follow_item_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ViewInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ViewInfo { - const NAME: &'static str = "ViewInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.view_pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.view_pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.view_pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.view_size_x = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.view_size_y = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.cursor_pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.cursor_pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.cursor_pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 72 => { - self.follow_unit_id = ::std::option::Option::Some(is.read_int32()?); - }, - 80 => { - self.follow_item_id = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.view_pos_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.view_pos_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.view_pos_z { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.view_size_x { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.view_size_y { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.cursor_pos_x { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.cursor_pos_y { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.cursor_pos_z { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.follow_unit_id { - my_size += ::protobuf::rt::int32_size(9, v); - } - if let Some(v) = self.follow_item_id { - my_size += ::protobuf::rt::int32_size(10, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.view_pos_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.view_pos_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.view_pos_z { - os.write_int32(3, v)?; - } - if let Some(v) = self.view_size_x { - os.write_int32(4, v)?; - } - if let Some(v) = self.view_size_y { - os.write_int32(5, v)?; - } - if let Some(v) = self.cursor_pos_x { - os.write_int32(6, v)?; - } - if let Some(v) = self.cursor_pos_y { - os.write_int32(7, v)?; - } - if let Some(v) = self.cursor_pos_z { - os.write_int32(8, v)?; - } - if let Some(v) = self.follow_unit_id { - os.write_int32(9, v)?; - } - if let Some(v) = self.follow_item_id { - os.write_int32(10, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ViewInfo { - ViewInfo::new() - } - - fn clear(&mut self) { - self.view_pos_x = ::std::option::Option::None; - self.view_pos_y = ::std::option::Option::None; - self.view_pos_z = ::std::option::Option::None; - self.view_size_x = ::std::option::Option::None; - self.view_size_y = ::std::option::Option::None; - self.cursor_pos_x = ::std::option::Option::None; - self.cursor_pos_y = ::std::option::Option::None; - self.cursor_pos_z = ::std::option::Option::None; - self.follow_unit_id = ::std::option::Option::None; - self.follow_item_id = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ViewInfo { - static instance: ViewInfo = ViewInfo { - view_pos_x: ::std::option::Option::None, - view_pos_y: ::std::option::Option::None, - view_pos_z: ::std::option::Option::None, - view_size_x: ::std::option::Option::None, - view_size_y: ::std::option::Option::None, - cursor_pos_x: ::std::option::Option::None, - cursor_pos_y: ::std::option::Option::None, - cursor_pos_z: ::std::option::Option::None, - follow_unit_id: ::std::option::Option::None, - follow_item_id: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ViewInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ViewInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ViewInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ViewInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.MapInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MapInfo { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.block_size_x) - pub block_size_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.block_size_y) - pub block_size_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.block_size_z) - pub block_size_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.block_pos_x) - pub block_pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.block_pos_y) - pub block_pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.block_pos_z) - pub block_pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.world_name) - pub world_name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.world_name_english) - pub world_name_english: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.MapInfo.save_name) - pub save_name: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.MapInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MapInfo { - fn default() -> &'a MapInfo { - ::default_instance() - } -} - -impl MapInfo { - pub fn new() -> MapInfo { - ::std::default::Default::default() - } - - // optional int32 block_size_x = 1; - - pub fn block_size_x(&self) -> i32 { - self.block_size_x.unwrap_or(0) - } - - pub fn clear_block_size_x(&mut self) { - self.block_size_x = ::std::option::Option::None; - } - - pub fn has_block_size_x(&self) -> bool { - self.block_size_x.is_some() - } - - // Param is passed by value, moved - pub fn set_block_size_x(&mut self, v: i32) { - self.block_size_x = ::std::option::Option::Some(v); - } - - // optional int32 block_size_y = 2; - - pub fn block_size_y(&self) -> i32 { - self.block_size_y.unwrap_or(0) - } - - pub fn clear_block_size_y(&mut self) { - self.block_size_y = ::std::option::Option::None; - } - - pub fn has_block_size_y(&self) -> bool { - self.block_size_y.is_some() - } - - // Param is passed by value, moved - pub fn set_block_size_y(&mut self, v: i32) { - self.block_size_y = ::std::option::Option::Some(v); - } - - // optional int32 block_size_z = 3; - - pub fn block_size_z(&self) -> i32 { - self.block_size_z.unwrap_or(0) - } - - pub fn clear_block_size_z(&mut self) { - self.block_size_z = ::std::option::Option::None; - } - - pub fn has_block_size_z(&self) -> bool { - self.block_size_z.is_some() - } - - // Param is passed by value, moved - pub fn set_block_size_z(&mut self, v: i32) { - self.block_size_z = ::std::option::Option::Some(v); - } - - // optional int32 block_pos_x = 4; - - pub fn block_pos_x(&self) -> i32 { - self.block_pos_x.unwrap_or(0) - } - - pub fn clear_block_pos_x(&mut self) { - self.block_pos_x = ::std::option::Option::None; - } - - pub fn has_block_pos_x(&self) -> bool { - self.block_pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_block_pos_x(&mut self, v: i32) { - self.block_pos_x = ::std::option::Option::Some(v); - } - - // optional int32 block_pos_y = 5; - - pub fn block_pos_y(&self) -> i32 { - self.block_pos_y.unwrap_or(0) - } - - pub fn clear_block_pos_y(&mut self) { - self.block_pos_y = ::std::option::Option::None; - } - - pub fn has_block_pos_y(&self) -> bool { - self.block_pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_block_pos_y(&mut self, v: i32) { - self.block_pos_y = ::std::option::Option::Some(v); - } - - // optional int32 block_pos_z = 6; - - pub fn block_pos_z(&self) -> i32 { - self.block_pos_z.unwrap_or(0) - } - - pub fn clear_block_pos_z(&mut self) { - self.block_pos_z = ::std::option::Option::None; - } - - pub fn has_block_pos_z(&self) -> bool { - self.block_pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_block_pos_z(&mut self, v: i32) { - self.block_pos_z = ::std::option::Option::Some(v); - } - - // optional string world_name = 7; - - pub fn world_name(&self) -> &str { - match self.world_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_world_name(&mut self) { - self.world_name = ::std::option::Option::None; - } - - pub fn has_world_name(&self) -> bool { - self.world_name.is_some() - } - - // Param is passed by value, moved - pub fn set_world_name(&mut self, v: ::std::string::String) { - self.world_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_world_name(&mut self) -> &mut ::std::string::String { - if self.world_name.is_none() { - self.world_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.world_name.as_mut().unwrap() - } - - // Take field - pub fn take_world_name(&mut self) -> ::std::string::String { - self.world_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string world_name_english = 8; - - pub fn world_name_english(&self) -> &str { - match self.world_name_english.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_world_name_english(&mut self) { - self.world_name_english = ::std::option::Option::None; - } - - pub fn has_world_name_english(&self) -> bool { - self.world_name_english.is_some() - } - - // Param is passed by value, moved - pub fn set_world_name_english(&mut self, v: ::std::string::String) { - self.world_name_english = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_world_name_english(&mut self) -> &mut ::std::string::String { - if self.world_name_english.is_none() { - self.world_name_english = ::std::option::Option::Some(::std::string::String::new()); - } - self.world_name_english.as_mut().unwrap() - } - - // Take field - pub fn take_world_name_english(&mut self) -> ::std::string::String { - self.world_name_english.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string save_name = 9; - - pub fn save_name(&self) -> &str { - match self.save_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_save_name(&mut self) { - self.save_name = ::std::option::Option::None; - } - - pub fn has_save_name(&self) -> bool { - self.save_name.is_some() - } - - // Param is passed by value, moved - pub fn set_save_name(&mut self, v: ::std::string::String) { - self.save_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_save_name(&mut self) -> &mut ::std::string::String { - if self.save_name.is_none() { - self.save_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.save_name.as_mut().unwrap() - } - - // Take field - pub fn take_save_name(&mut self) -> ::std::string::String { - self.save_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "block_size_x", - |m: &MapInfo| { &m.block_size_x }, - |m: &mut MapInfo| { &mut m.block_size_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "block_size_y", - |m: &MapInfo| { &m.block_size_y }, - |m: &mut MapInfo| { &mut m.block_size_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "block_size_z", - |m: &MapInfo| { &m.block_size_z }, - |m: &mut MapInfo| { &mut m.block_size_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "block_pos_x", - |m: &MapInfo| { &m.block_pos_x }, - |m: &mut MapInfo| { &mut m.block_pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "block_pos_y", - |m: &MapInfo| { &m.block_pos_y }, - |m: &mut MapInfo| { &mut m.block_pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "block_pos_z", - |m: &MapInfo| { &m.block_pos_z }, - |m: &mut MapInfo| { &mut m.block_pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "world_name", - |m: &MapInfo| { &m.world_name }, - |m: &mut MapInfo| { &mut m.world_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "world_name_english", - |m: &MapInfo| { &m.world_name_english }, - |m: &mut MapInfo| { &mut m.world_name_english }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "save_name", - |m: &MapInfo| { &m.save_name }, - |m: &mut MapInfo| { &mut m.save_name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MapInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MapInfo { - const NAME: &'static str = "MapInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.block_size_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.block_size_y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.block_size_z = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.block_pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.block_pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.block_pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 58 => { - self.world_name = ::std::option::Option::Some(is.read_string()?); - }, - 66 => { - self.world_name_english = ::std::option::Option::Some(is.read_string()?); - }, - 74 => { - self.save_name = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.block_size_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.block_size_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.block_size_z { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.block_pos_x { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.block_pos_y { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.block_pos_z { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.world_name.as_ref() { - my_size += ::protobuf::rt::string_size(7, &v); - } - if let Some(v) = self.world_name_english.as_ref() { - my_size += ::protobuf::rt::string_size(8, &v); - } - if let Some(v) = self.save_name.as_ref() { - my_size += ::protobuf::rt::string_size(9, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.block_size_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.block_size_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.block_size_z { - os.write_int32(3, v)?; - } - if let Some(v) = self.block_pos_x { - os.write_int32(4, v)?; - } - if let Some(v) = self.block_pos_y { - os.write_int32(5, v)?; - } - if let Some(v) = self.block_pos_z { - os.write_int32(6, v)?; - } - if let Some(v) = self.world_name.as_ref() { - os.write_string(7, v)?; - } - if let Some(v) = self.world_name_english.as_ref() { - os.write_string(8, v)?; - } - if let Some(v) = self.save_name.as_ref() { - os.write_string(9, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MapInfo { - MapInfo::new() - } - - fn clear(&mut self) { - self.block_size_x = ::std::option::Option::None; - self.block_size_y = ::std::option::Option::None; - self.block_size_z = ::std::option::Option::None; - self.block_pos_x = ::std::option::Option::None; - self.block_pos_y = ::std::option::Option::None; - self.block_pos_z = ::std::option::Option::None; - self.world_name = ::std::option::Option::None; - self.world_name_english = ::std::option::Option::None; - self.save_name = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MapInfo { - static instance: MapInfo = MapInfo { - block_size_x: ::std::option::Option::None, - block_size_y: ::std::option::Option::None, - block_size_z: ::std::option::Option::None, - block_pos_x: ::std::option::Option::None, - block_pos_y: ::std::option::Option::None, - block_pos_z: ::std::option::Option::None, - world_name: ::std::option::Option::None, - world_name_english: ::std::option::Option::None, - save_name: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MapInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MapInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MapInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MapInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Cloud) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Cloud { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Cloud.front) - pub front: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Cloud.cumulus) - pub cumulus: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Cloud.cirrus) - pub cirrus: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Cloud.stratus) - pub stratus: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.Cloud.fog) - pub fog: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Cloud.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Cloud { - fn default() -> &'a Cloud { - ::default_instance() - } -} - -impl Cloud { - pub fn new() -> Cloud { - ::std::default::Default::default() - } - - // optional .RemoteFortressReader.FrontType front = 1; - - pub fn front(&self) -> FrontType { - match self.front { - Some(e) => e.enum_value_or(FrontType::FRONT_NONE), - None => FrontType::FRONT_NONE, - } - } - - pub fn clear_front(&mut self) { - self.front = ::std::option::Option::None; - } - - pub fn has_front(&self) -> bool { - self.front.is_some() - } - - // Param is passed by value, moved - pub fn set_front(&mut self, v: FrontType) { - self.front = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional .RemoteFortressReader.CumulusType cumulus = 2; - - pub fn cumulus(&self) -> CumulusType { - match self.cumulus { - Some(e) => e.enum_value_or(CumulusType::CUMULUS_NONE), - None => CumulusType::CUMULUS_NONE, - } - } - - pub fn clear_cumulus(&mut self) { - self.cumulus = ::std::option::Option::None; - } - - pub fn has_cumulus(&self) -> bool { - self.cumulus.is_some() - } - - // Param is passed by value, moved - pub fn set_cumulus(&mut self, v: CumulusType) { - self.cumulus = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional bool cirrus = 3; - - pub fn cirrus(&self) -> bool { - self.cirrus.unwrap_or(false) - } - - pub fn clear_cirrus(&mut self) { - self.cirrus = ::std::option::Option::None; - } - - pub fn has_cirrus(&self) -> bool { - self.cirrus.is_some() - } - - // Param is passed by value, moved - pub fn set_cirrus(&mut self, v: bool) { - self.cirrus = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.StratusType stratus = 4; - - pub fn stratus(&self) -> StratusType { - match self.stratus { - Some(e) => e.enum_value_or(StratusType::STRATUS_NONE), - None => StratusType::STRATUS_NONE, - } - } - - pub fn clear_stratus(&mut self) { - self.stratus = ::std::option::Option::None; - } - - pub fn has_stratus(&self) -> bool { - self.stratus.is_some() - } - - // Param is passed by value, moved - pub fn set_stratus(&mut self, v: StratusType) { - self.stratus = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional .RemoteFortressReader.FogType fog = 5; - - pub fn fog(&self) -> FogType { - match self.fog { - Some(e) => e.enum_value_or(FogType::FOG_NONE), - None => FogType::FOG_NONE, - } - } - - pub fn clear_fog(&mut self) { - self.fog = ::std::option::Option::None; - } - - pub fn has_fog(&self) -> bool { - self.fog.is_some() - } - - // Param is passed by value, moved - pub fn set_fog(&mut self, v: FogType) { - self.fog = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "front", - |m: &Cloud| { &m.front }, - |m: &mut Cloud| { &mut m.front }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cumulus", - |m: &Cloud| { &m.cumulus }, - |m: &mut Cloud| { &mut m.cumulus }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cirrus", - |m: &Cloud| { &m.cirrus }, - |m: &mut Cloud| { &mut m.cirrus }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "stratus", - |m: &Cloud| { &m.stratus }, - |m: &mut Cloud| { &mut m.stratus }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "fog", - |m: &Cloud| { &m.fog }, - |m: &mut Cloud| { &mut m.fog }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Cloud", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Cloud { - const NAME: &'static str = "Cloud"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.front = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 16 => { - self.cumulus = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 24 => { - self.cirrus = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.stratus = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 40 => { - self.fog = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.front { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - if let Some(v) = self.cumulus { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - if let Some(v) = self.cirrus { - my_size += 1 + 1; - } - if let Some(v) = self.stratus { - my_size += ::protobuf::rt::int32_size(4, v.value()); - } - if let Some(v) = self.fog { - my_size += ::protobuf::rt::int32_size(5, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.front { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.cumulus { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.cirrus { - os.write_bool(3, v)?; - } - if let Some(v) = self.stratus { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.fog { - os.write_enum(5, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Cloud { - Cloud::new() - } - - fn clear(&mut self) { - self.front = ::std::option::Option::None; - self.cumulus = ::std::option::Option::None; - self.cirrus = ::std::option::Option::None; - self.stratus = ::std::option::Option::None; - self.fog = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Cloud { - static instance: Cloud = Cloud { - front: ::std::option::Option::None, - cumulus: ::std::option::Option::None, - cirrus: ::std::option::Option::None, - stratus: ::std::option::Option::None, - fog: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Cloud { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Cloud").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Cloud { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Cloud { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.WorldMap) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct WorldMap { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.world_width) - pub world_width: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.world_height) - pub world_height: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.name) - pub name: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.name_english) - pub name_english: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.elevation) - pub elevation: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.rainfall) - pub rainfall: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.vegetation) - pub vegetation: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.temperature) - pub temperature: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.evilness) - pub evilness: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.drainage) - pub drainage: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.volcanism) - pub volcanism: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.savagery) - pub savagery: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.clouds) - pub clouds: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.salinity) - pub salinity: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.map_x) - pub map_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.map_y) - pub map_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.center_x) - pub center_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.center_y) - pub center_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.center_z) - pub center_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.cur_year) - pub cur_year: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.cur_year_tick) - pub cur_year_tick: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.world_poles) - pub world_poles: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.river_tiles) - pub river_tiles: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.water_elevation) - pub water_elevation: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.WorldMap.region_tiles) - pub region_tiles: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.WorldMap.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a WorldMap { - fn default() -> &'a WorldMap { - ::default_instance() - } -} - -impl WorldMap { - pub fn new() -> WorldMap { - ::std::default::Default::default() - } - - // required int32 world_width = 1; - - pub fn world_width(&self) -> i32 { - self.world_width.unwrap_or(0) - } - - pub fn clear_world_width(&mut self) { - self.world_width = ::std::option::Option::None; - } - - pub fn has_world_width(&self) -> bool { - self.world_width.is_some() - } - - // Param is passed by value, moved - pub fn set_world_width(&mut self, v: i32) { - self.world_width = ::std::option::Option::Some(v); - } - - // required int32 world_height = 2; - - pub fn world_height(&self) -> i32 { - self.world_height.unwrap_or(0) - } - - pub fn clear_world_height(&mut self) { - self.world_height = ::std::option::Option::None; - } - - pub fn has_world_height(&self) -> bool { - self.world_height.is_some() - } - - // Param is passed by value, moved - pub fn set_world_height(&mut self, v: i32) { - self.world_height = ::std::option::Option::Some(v); - } - - // optional bytes name = 3; - - pub fn name(&self) -> &[u8] { - match self.name.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::vec::Vec) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::vec::Vec { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::vec::Vec { - self.name.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - // optional string name_english = 4; - - pub fn name_english(&self) -> &str { - match self.name_english.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name_english(&mut self) { - self.name_english = ::std::option::Option::None; - } - - pub fn has_name_english(&self) -> bool { - self.name_english.is_some() - } - - // Param is passed by value, moved - pub fn set_name_english(&mut self, v: ::std::string::String) { - self.name_english = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name_english(&mut self) -> &mut ::std::string::String { - if self.name_english.is_none() { - self.name_english = ::std::option::Option::Some(::std::string::String::new()); - } - self.name_english.as_mut().unwrap() - } - - // Take field - pub fn take_name_english(&mut self) -> ::std::string::String { - self.name_english.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 map_x = 15; - - pub fn map_x(&self) -> i32 { - self.map_x.unwrap_or(0) - } - - pub fn clear_map_x(&mut self) { - self.map_x = ::std::option::Option::None; - } - - pub fn has_map_x(&self) -> bool { - self.map_x.is_some() - } - - // Param is passed by value, moved - pub fn set_map_x(&mut self, v: i32) { - self.map_x = ::std::option::Option::Some(v); - } - - // optional int32 map_y = 16; - - pub fn map_y(&self) -> i32 { - self.map_y.unwrap_or(0) - } - - pub fn clear_map_y(&mut self) { - self.map_y = ::std::option::Option::None; - } - - pub fn has_map_y(&self) -> bool { - self.map_y.is_some() - } - - // Param is passed by value, moved - pub fn set_map_y(&mut self, v: i32) { - self.map_y = ::std::option::Option::Some(v); - } - - // optional int32 center_x = 17; - - pub fn center_x(&self) -> i32 { - self.center_x.unwrap_or(0) - } - - pub fn clear_center_x(&mut self) { - self.center_x = ::std::option::Option::None; - } - - pub fn has_center_x(&self) -> bool { - self.center_x.is_some() - } - - // Param is passed by value, moved - pub fn set_center_x(&mut self, v: i32) { - self.center_x = ::std::option::Option::Some(v); - } - - // optional int32 center_y = 18; - - pub fn center_y(&self) -> i32 { - self.center_y.unwrap_or(0) - } - - pub fn clear_center_y(&mut self) { - self.center_y = ::std::option::Option::None; - } - - pub fn has_center_y(&self) -> bool { - self.center_y.is_some() - } - - // Param is passed by value, moved - pub fn set_center_y(&mut self, v: i32) { - self.center_y = ::std::option::Option::Some(v); - } - - // optional int32 center_z = 19; - - pub fn center_z(&self) -> i32 { - self.center_z.unwrap_or(0) - } - - pub fn clear_center_z(&mut self) { - self.center_z = ::std::option::Option::None; - } - - pub fn has_center_z(&self) -> bool { - self.center_z.is_some() - } - - // Param is passed by value, moved - pub fn set_center_z(&mut self, v: i32) { - self.center_z = ::std::option::Option::Some(v); - } - - // optional int32 cur_year = 20; - - pub fn cur_year(&self) -> i32 { - self.cur_year.unwrap_or(0) - } - - pub fn clear_cur_year(&mut self) { - self.cur_year = ::std::option::Option::None; - } - - pub fn has_cur_year(&self) -> bool { - self.cur_year.is_some() - } - - // Param is passed by value, moved - pub fn set_cur_year(&mut self, v: i32) { - self.cur_year = ::std::option::Option::Some(v); - } - - // optional int32 cur_year_tick = 21; - - pub fn cur_year_tick(&self) -> i32 { - self.cur_year_tick.unwrap_or(0) - } - - pub fn clear_cur_year_tick(&mut self) { - self.cur_year_tick = ::std::option::Option::None; - } - - pub fn has_cur_year_tick(&self) -> bool { - self.cur_year_tick.is_some() - } - - // Param is passed by value, moved - pub fn set_cur_year_tick(&mut self, v: i32) { - self.cur_year_tick = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.WorldPoles world_poles = 22; - - pub fn world_poles(&self) -> WorldPoles { - match self.world_poles { - Some(e) => e.enum_value_or(WorldPoles::NO_POLES), - None => WorldPoles::NO_POLES, - } - } - - pub fn clear_world_poles(&mut self) { - self.world_poles = ::std::option::Option::None; - } - - pub fn has_world_poles(&self) -> bool { - self.world_poles.is_some() - } - - // Param is passed by value, moved - pub fn set_world_poles(&mut self, v: WorldPoles) { - self.world_poles = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(25); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "world_width", - |m: &WorldMap| { &m.world_width }, - |m: &mut WorldMap| { &mut m.world_width }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "world_height", - |m: &WorldMap| { &m.world_height }, - |m: &mut WorldMap| { &mut m.world_height }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &WorldMap| { &m.name }, - |m: &mut WorldMap| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name_english", - |m: &WorldMap| { &m.name_english }, - |m: &mut WorldMap| { &mut m.name_english }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "elevation", - |m: &WorldMap| { &m.elevation }, - |m: &mut WorldMap| { &mut m.elevation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "rainfall", - |m: &WorldMap| { &m.rainfall }, - |m: &mut WorldMap| { &mut m.rainfall }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "vegetation", - |m: &WorldMap| { &m.vegetation }, - |m: &mut WorldMap| { &mut m.vegetation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "temperature", - |m: &WorldMap| { &m.temperature }, - |m: &mut WorldMap| { &mut m.temperature }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "evilness", - |m: &WorldMap| { &m.evilness }, - |m: &mut WorldMap| { &mut m.evilness }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "drainage", - |m: &WorldMap| { &m.drainage }, - |m: &mut WorldMap| { &mut m.drainage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "volcanism", - |m: &WorldMap| { &m.volcanism }, - |m: &mut WorldMap| { &mut m.volcanism }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "savagery", - |m: &WorldMap| { &m.savagery }, - |m: &mut WorldMap| { &mut m.savagery }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "clouds", - |m: &WorldMap| { &m.clouds }, - |m: &mut WorldMap| { &mut m.clouds }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "salinity", - |m: &WorldMap| { &m.salinity }, - |m: &mut WorldMap| { &mut m.salinity }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_x", - |m: &WorldMap| { &m.map_x }, - |m: &mut WorldMap| { &mut m.map_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_y", - |m: &WorldMap| { &m.map_y }, - |m: &mut WorldMap| { &mut m.map_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "center_x", - |m: &WorldMap| { &m.center_x }, - |m: &mut WorldMap| { &mut m.center_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "center_y", - |m: &WorldMap| { &m.center_y }, - |m: &mut WorldMap| { &mut m.center_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "center_z", - |m: &WorldMap| { &m.center_z }, - |m: &mut WorldMap| { &mut m.center_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cur_year", - |m: &WorldMap| { &m.cur_year }, - |m: &mut WorldMap| { &mut m.cur_year }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cur_year_tick", - |m: &WorldMap| { &m.cur_year_tick }, - |m: &mut WorldMap| { &mut m.cur_year_tick }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "world_poles", - |m: &WorldMap| { &m.world_poles }, - |m: &mut WorldMap| { &mut m.world_poles }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "river_tiles", - |m: &WorldMap| { &m.river_tiles }, - |m: &mut WorldMap| { &mut m.river_tiles }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "water_elevation", - |m: &WorldMap| { &m.water_elevation }, - |m: &mut WorldMap| { &mut m.water_elevation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "region_tiles", - |m: &WorldMap| { &m.region_tiles }, - |m: &mut WorldMap| { &mut m.region_tiles }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "WorldMap", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for WorldMap { - const NAME: &'static str = "WorldMap"; - - fn is_initialized(&self) -> bool { - if self.world_width.is_none() { - return false; - } - if self.world_height.is_none() { - return false; - } - for v in &self.clouds { - if !v.is_initialized() { - return false; - } - }; - for v in &self.river_tiles { - if !v.is_initialized() { - return false; - } - }; - for v in &self.region_tiles { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.world_width = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.world_height = ::std::option::Option::Some(is.read_int32()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_bytes()?); - }, - 34 => { - self.name_english = ::std::option::Option::Some(is.read_string()?); - }, - 42 => { - is.read_repeated_packed_int32_into(&mut self.elevation)?; - }, - 40 => { - self.elevation.push(is.read_int32()?); - }, - 50 => { - is.read_repeated_packed_int32_into(&mut self.rainfall)?; - }, - 48 => { - self.rainfall.push(is.read_int32()?); - }, - 58 => { - is.read_repeated_packed_int32_into(&mut self.vegetation)?; - }, - 56 => { - self.vegetation.push(is.read_int32()?); - }, - 66 => { - is.read_repeated_packed_int32_into(&mut self.temperature)?; - }, - 64 => { - self.temperature.push(is.read_int32()?); - }, - 74 => { - is.read_repeated_packed_int32_into(&mut self.evilness)?; - }, - 72 => { - self.evilness.push(is.read_int32()?); - }, - 82 => { - is.read_repeated_packed_int32_into(&mut self.drainage)?; - }, - 80 => { - self.drainage.push(is.read_int32()?); - }, - 90 => { - is.read_repeated_packed_int32_into(&mut self.volcanism)?; - }, - 88 => { - self.volcanism.push(is.read_int32()?); - }, - 98 => { - is.read_repeated_packed_int32_into(&mut self.savagery)?; - }, - 96 => { - self.savagery.push(is.read_int32()?); - }, - 106 => { - self.clouds.push(is.read_message()?); - }, - 114 => { - is.read_repeated_packed_int32_into(&mut self.salinity)?; - }, - 112 => { - self.salinity.push(is.read_int32()?); - }, - 120 => { - self.map_x = ::std::option::Option::Some(is.read_int32()?); - }, - 128 => { - self.map_y = ::std::option::Option::Some(is.read_int32()?); - }, - 136 => { - self.center_x = ::std::option::Option::Some(is.read_int32()?); - }, - 144 => { - self.center_y = ::std::option::Option::Some(is.read_int32()?); - }, - 152 => { - self.center_z = ::std::option::Option::Some(is.read_int32()?); - }, - 160 => { - self.cur_year = ::std::option::Option::Some(is.read_int32()?); - }, - 168 => { - self.cur_year_tick = ::std::option::Option::Some(is.read_int32()?); - }, - 176 => { - self.world_poles = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 186 => { - self.river_tiles.push(is.read_message()?); - }, - 194 => { - is.read_repeated_packed_int32_into(&mut self.water_elevation)?; - }, - 192 => { - self.water_elevation.push(is.read_int32()?); - }, - 202 => { - self.region_tiles.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.world_width { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.world_height { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::bytes_size(3, &v); - } - if let Some(v) = self.name_english.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - for value in &self.elevation { - my_size += ::protobuf::rt::int32_size(5, *value); - }; - for value in &self.rainfall { - my_size += ::protobuf::rt::int32_size(6, *value); - }; - for value in &self.vegetation { - my_size += ::protobuf::rt::int32_size(7, *value); - }; - for value in &self.temperature { - my_size += ::protobuf::rt::int32_size(8, *value); - }; - for value in &self.evilness { - my_size += ::protobuf::rt::int32_size(9, *value); - }; - for value in &self.drainage { - my_size += ::protobuf::rt::int32_size(10, *value); - }; - for value in &self.volcanism { - my_size += ::protobuf::rt::int32_size(11, *value); - }; - for value in &self.savagery { - my_size += ::protobuf::rt::int32_size(12, *value); - }; - for value in &self.clouds { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.salinity { - my_size += ::protobuf::rt::int32_size(14, *value); - }; - if let Some(v) = self.map_x { - my_size += ::protobuf::rt::int32_size(15, v); - } - if let Some(v) = self.map_y { - my_size += ::protobuf::rt::int32_size(16, v); - } - if let Some(v) = self.center_x { - my_size += ::protobuf::rt::int32_size(17, v); - } - if let Some(v) = self.center_y { - my_size += ::protobuf::rt::int32_size(18, v); - } - if let Some(v) = self.center_z { - my_size += ::protobuf::rt::int32_size(19, v); - } - if let Some(v) = self.cur_year { - my_size += ::protobuf::rt::int32_size(20, v); - } - if let Some(v) = self.cur_year_tick { - my_size += ::protobuf::rt::int32_size(21, v); - } - if let Some(v) = self.world_poles { - my_size += ::protobuf::rt::int32_size(22, v.value()); - } - for value in &self.river_tiles { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.water_elevation { - my_size += ::protobuf::rt::int32_size(24, *value); - }; - for value in &self.region_tiles { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.world_width { - os.write_int32(1, v)?; - } - if let Some(v) = self.world_height { - os.write_int32(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_bytes(3, v)?; - } - if let Some(v) = self.name_english.as_ref() { - os.write_string(4, v)?; - } - for v in &self.elevation { - os.write_int32(5, *v)?; - }; - for v in &self.rainfall { - os.write_int32(6, *v)?; - }; - for v in &self.vegetation { - os.write_int32(7, *v)?; - }; - for v in &self.temperature { - os.write_int32(8, *v)?; - }; - for v in &self.evilness { - os.write_int32(9, *v)?; - }; - for v in &self.drainage { - os.write_int32(10, *v)?; - }; - for v in &self.volcanism { - os.write_int32(11, *v)?; - }; - for v in &self.savagery { - os.write_int32(12, *v)?; - }; - for v in &self.clouds { - ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?; - }; - for v in &self.salinity { - os.write_int32(14, *v)?; - }; - if let Some(v) = self.map_x { - os.write_int32(15, v)?; - } - if let Some(v) = self.map_y { - os.write_int32(16, v)?; - } - if let Some(v) = self.center_x { - os.write_int32(17, v)?; - } - if let Some(v) = self.center_y { - os.write_int32(18, v)?; - } - if let Some(v) = self.center_z { - os.write_int32(19, v)?; - } - if let Some(v) = self.cur_year { - os.write_int32(20, v)?; - } - if let Some(v) = self.cur_year_tick { - os.write_int32(21, v)?; - } - if let Some(v) = self.world_poles { - os.write_enum(22, ::protobuf::EnumOrUnknown::value(&v))?; - } - for v in &self.river_tiles { - ::protobuf::rt::write_message_field_with_cached_size(23, v, os)?; - }; - for v in &self.water_elevation { - os.write_int32(24, *v)?; - }; - for v in &self.region_tiles { - ::protobuf::rt::write_message_field_with_cached_size(25, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> WorldMap { - WorldMap::new() - } - - fn clear(&mut self) { - self.world_width = ::std::option::Option::None; - self.world_height = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.name_english = ::std::option::Option::None; - self.elevation.clear(); - self.rainfall.clear(); - self.vegetation.clear(); - self.temperature.clear(); - self.evilness.clear(); - self.drainage.clear(); - self.volcanism.clear(); - self.savagery.clear(); - self.clouds.clear(); - self.salinity.clear(); - self.map_x = ::std::option::Option::None; - self.map_y = ::std::option::Option::None; - self.center_x = ::std::option::Option::None; - self.center_y = ::std::option::Option::None; - self.center_z = ::std::option::Option::None; - self.cur_year = ::std::option::Option::None; - self.cur_year_tick = ::std::option::Option::None; - self.world_poles = ::std::option::Option::None; - self.river_tiles.clear(); - self.water_elevation.clear(); - self.region_tiles.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static WorldMap { - static instance: WorldMap = WorldMap { - world_width: ::std::option::Option::None, - world_height: ::std::option::Option::None, - name: ::std::option::Option::None, - name_english: ::std::option::Option::None, - elevation: ::std::vec::Vec::new(), - rainfall: ::std::vec::Vec::new(), - vegetation: ::std::vec::Vec::new(), - temperature: ::std::vec::Vec::new(), - evilness: ::std::vec::Vec::new(), - drainage: ::std::vec::Vec::new(), - volcanism: ::std::vec::Vec::new(), - savagery: ::std::vec::Vec::new(), - clouds: ::std::vec::Vec::new(), - salinity: ::std::vec::Vec::new(), - map_x: ::std::option::Option::None, - map_y: ::std::option::Option::None, - center_x: ::std::option::Option::None, - center_y: ::std::option::Option::None, - center_z: ::std::option::Option::None, - cur_year: ::std::option::Option::None, - cur_year_tick: ::std::option::Option::None, - world_poles: ::std::option::Option::None, - river_tiles: ::std::vec::Vec::new(), - water_elevation: ::std::vec::Vec::new(), - region_tiles: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for WorldMap { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("WorldMap").unwrap()).clone() - } -} - -impl ::std::fmt::Display for WorldMap { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for WorldMap { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.SiteRealizationBuildingWall) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SiteRealizationBuildingWall { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingWall.start_x) - pub start_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingWall.start_y) - pub start_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingWall.start_z) - pub start_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingWall.end_x) - pub end_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingWall.end_y) - pub end_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingWall.end_z) - pub end_z: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.SiteRealizationBuildingWall.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SiteRealizationBuildingWall { - fn default() -> &'a SiteRealizationBuildingWall { - ::default_instance() - } -} - -impl SiteRealizationBuildingWall { - pub fn new() -> SiteRealizationBuildingWall { - ::std::default::Default::default() - } - - // optional int32 start_x = 1; - - pub fn start_x(&self) -> i32 { - self.start_x.unwrap_or(0) - } - - pub fn clear_start_x(&mut self) { - self.start_x = ::std::option::Option::None; - } - - pub fn has_start_x(&self) -> bool { - self.start_x.is_some() - } - - // Param is passed by value, moved - pub fn set_start_x(&mut self, v: i32) { - self.start_x = ::std::option::Option::Some(v); - } - - // optional int32 start_y = 2; - - pub fn start_y(&self) -> i32 { - self.start_y.unwrap_or(0) - } - - pub fn clear_start_y(&mut self) { - self.start_y = ::std::option::Option::None; - } - - pub fn has_start_y(&self) -> bool { - self.start_y.is_some() - } - - // Param is passed by value, moved - pub fn set_start_y(&mut self, v: i32) { - self.start_y = ::std::option::Option::Some(v); - } - - // optional int32 start_z = 3; - - pub fn start_z(&self) -> i32 { - self.start_z.unwrap_or(0) - } - - pub fn clear_start_z(&mut self) { - self.start_z = ::std::option::Option::None; - } - - pub fn has_start_z(&self) -> bool { - self.start_z.is_some() - } - - // Param is passed by value, moved - pub fn set_start_z(&mut self, v: i32) { - self.start_z = ::std::option::Option::Some(v); - } - - // optional int32 end_x = 4; - - pub fn end_x(&self) -> i32 { - self.end_x.unwrap_or(0) - } - - pub fn clear_end_x(&mut self) { - self.end_x = ::std::option::Option::None; - } - - pub fn has_end_x(&self) -> bool { - self.end_x.is_some() - } - - // Param is passed by value, moved - pub fn set_end_x(&mut self, v: i32) { - self.end_x = ::std::option::Option::Some(v); - } - - // optional int32 end_y = 5; - - pub fn end_y(&self) -> i32 { - self.end_y.unwrap_or(0) - } - - pub fn clear_end_y(&mut self) { - self.end_y = ::std::option::Option::None; - } - - pub fn has_end_y(&self) -> bool { - self.end_y.is_some() - } - - // Param is passed by value, moved - pub fn set_end_y(&mut self, v: i32) { - self.end_y = ::std::option::Option::Some(v); - } - - // optional int32 end_z = 6; - - pub fn end_z(&self) -> i32 { - self.end_z.unwrap_or(0) - } - - pub fn clear_end_z(&mut self) { - self.end_z = ::std::option::Option::None; - } - - pub fn has_end_z(&self) -> bool { - self.end_z.is_some() - } - - // Param is passed by value, moved - pub fn set_end_z(&mut self, v: i32) { - self.end_z = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "start_x", - |m: &SiteRealizationBuildingWall| { &m.start_x }, - |m: &mut SiteRealizationBuildingWall| { &mut m.start_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "start_y", - |m: &SiteRealizationBuildingWall| { &m.start_y }, - |m: &mut SiteRealizationBuildingWall| { &mut m.start_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "start_z", - |m: &SiteRealizationBuildingWall| { &m.start_z }, - |m: &mut SiteRealizationBuildingWall| { &mut m.start_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "end_x", - |m: &SiteRealizationBuildingWall| { &m.end_x }, - |m: &mut SiteRealizationBuildingWall| { &mut m.end_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "end_y", - |m: &SiteRealizationBuildingWall| { &m.end_y }, - |m: &mut SiteRealizationBuildingWall| { &mut m.end_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "end_z", - |m: &SiteRealizationBuildingWall| { &m.end_z }, - |m: &mut SiteRealizationBuildingWall| { &mut m.end_z }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SiteRealizationBuildingWall", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SiteRealizationBuildingWall { - const NAME: &'static str = "SiteRealizationBuildingWall"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.start_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.start_y = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.start_z = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.end_x = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.end_y = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.end_z = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.start_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.start_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.start_z { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.end_x { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.end_y { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.end_z { - my_size += ::protobuf::rt::int32_size(6, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.start_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.start_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.start_z { - os.write_int32(3, v)?; - } - if let Some(v) = self.end_x { - os.write_int32(4, v)?; - } - if let Some(v) = self.end_y { - os.write_int32(5, v)?; - } - if let Some(v) = self.end_z { - os.write_int32(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SiteRealizationBuildingWall { - SiteRealizationBuildingWall::new() - } - - fn clear(&mut self) { - self.start_x = ::std::option::Option::None; - self.start_y = ::std::option::Option::None; - self.start_z = ::std::option::Option::None; - self.end_x = ::std::option::Option::None; - self.end_y = ::std::option::Option::None; - self.end_z = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SiteRealizationBuildingWall { - static instance: SiteRealizationBuildingWall = SiteRealizationBuildingWall { - start_x: ::std::option::Option::None, - start_y: ::std::option::Option::None, - start_z: ::std::option::Option::None, - end_x: ::std::option::Option::None, - end_y: ::std::option::Option::None, - end_z: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SiteRealizationBuildingWall { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SiteRealizationBuildingWall").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SiteRealizationBuildingWall { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SiteRealizationBuildingWall { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.SiteRealizationBuildingTower) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SiteRealizationBuildingTower { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingTower.roof_z) - pub roof_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingTower.round) - pub round: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingTower.goblin) - pub goblin: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.SiteRealizationBuildingTower.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SiteRealizationBuildingTower { - fn default() -> &'a SiteRealizationBuildingTower { - ::default_instance() - } -} - -impl SiteRealizationBuildingTower { - pub fn new() -> SiteRealizationBuildingTower { - ::std::default::Default::default() - } - - // optional int32 roof_z = 1; - - pub fn roof_z(&self) -> i32 { - self.roof_z.unwrap_or(0) - } - - pub fn clear_roof_z(&mut self) { - self.roof_z = ::std::option::Option::None; - } - - pub fn has_roof_z(&self) -> bool { - self.roof_z.is_some() - } - - // Param is passed by value, moved - pub fn set_roof_z(&mut self, v: i32) { - self.roof_z = ::std::option::Option::Some(v); - } - - // optional bool round = 2; - - pub fn round(&self) -> bool { - self.round.unwrap_or(false) - } - - pub fn clear_round(&mut self) { - self.round = ::std::option::Option::None; - } - - pub fn has_round(&self) -> bool { - self.round.is_some() - } - - // Param is passed by value, moved - pub fn set_round(&mut self, v: bool) { - self.round = ::std::option::Option::Some(v); - } - - // optional bool goblin = 3; - - pub fn goblin(&self) -> bool { - self.goblin.unwrap_or(false) - } - - pub fn clear_goblin(&mut self) { - self.goblin = ::std::option::Option::None; - } - - pub fn has_goblin(&self) -> bool { - self.goblin.is_some() - } - - // Param is passed by value, moved - pub fn set_goblin(&mut self, v: bool) { - self.goblin = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "roof_z", - |m: &SiteRealizationBuildingTower| { &m.roof_z }, - |m: &mut SiteRealizationBuildingTower| { &mut m.roof_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "round", - |m: &SiteRealizationBuildingTower| { &m.round }, - |m: &mut SiteRealizationBuildingTower| { &mut m.round }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "goblin", - |m: &SiteRealizationBuildingTower| { &m.goblin }, - |m: &mut SiteRealizationBuildingTower| { &mut m.goblin }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SiteRealizationBuildingTower", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SiteRealizationBuildingTower { - const NAME: &'static str = "SiteRealizationBuildingTower"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.roof_z = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.round = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.goblin = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.roof_z { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.round { - my_size += 1 + 1; - } - if let Some(v) = self.goblin { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.roof_z { - os.write_int32(1, v)?; - } - if let Some(v) = self.round { - os.write_bool(2, v)?; - } - if let Some(v) = self.goblin { - os.write_bool(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SiteRealizationBuildingTower { - SiteRealizationBuildingTower::new() - } - - fn clear(&mut self) { - self.roof_z = ::std::option::Option::None; - self.round = ::std::option::Option::None; - self.goblin = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SiteRealizationBuildingTower { - static instance: SiteRealizationBuildingTower = SiteRealizationBuildingTower { - roof_z: ::std::option::Option::None, - round: ::std::option::Option::None, - goblin: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SiteRealizationBuildingTower { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SiteRealizationBuildingTower").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SiteRealizationBuildingTower { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SiteRealizationBuildingTower { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.TrenchSpoke) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TrenchSpoke { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.TrenchSpoke.mound_start) - pub mound_start: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TrenchSpoke.trench_start) - pub trench_start: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TrenchSpoke.trench_end) - pub trench_end: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TrenchSpoke.mound_end) - pub mound_end: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.TrenchSpoke.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TrenchSpoke { - fn default() -> &'a TrenchSpoke { - ::default_instance() - } -} - -impl TrenchSpoke { - pub fn new() -> TrenchSpoke { - ::std::default::Default::default() - } - - // optional int32 mound_start = 1; - - pub fn mound_start(&self) -> i32 { - self.mound_start.unwrap_or(0) - } - - pub fn clear_mound_start(&mut self) { - self.mound_start = ::std::option::Option::None; - } - - pub fn has_mound_start(&self) -> bool { - self.mound_start.is_some() - } - - // Param is passed by value, moved - pub fn set_mound_start(&mut self, v: i32) { - self.mound_start = ::std::option::Option::Some(v); - } - - // optional int32 trench_start = 2; - - pub fn trench_start(&self) -> i32 { - self.trench_start.unwrap_or(0) - } - - pub fn clear_trench_start(&mut self) { - self.trench_start = ::std::option::Option::None; - } - - pub fn has_trench_start(&self) -> bool { - self.trench_start.is_some() - } - - // Param is passed by value, moved - pub fn set_trench_start(&mut self, v: i32) { - self.trench_start = ::std::option::Option::Some(v); - } - - // optional int32 trench_end = 3; - - pub fn trench_end(&self) -> i32 { - self.trench_end.unwrap_or(0) - } - - pub fn clear_trench_end(&mut self) { - self.trench_end = ::std::option::Option::None; - } - - pub fn has_trench_end(&self) -> bool { - self.trench_end.is_some() - } - - // Param is passed by value, moved - pub fn set_trench_end(&mut self, v: i32) { - self.trench_end = ::std::option::Option::Some(v); - } - - // optional int32 mound_end = 4; - - pub fn mound_end(&self) -> i32 { - self.mound_end.unwrap_or(0) - } - - pub fn clear_mound_end(&mut self) { - self.mound_end = ::std::option::Option::None; - } - - pub fn has_mound_end(&self) -> bool { - self.mound_end.is_some() - } - - // Param is passed by value, moved - pub fn set_mound_end(&mut self, v: i32) { - self.mound_end = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mound_start", - |m: &TrenchSpoke| { &m.mound_start }, - |m: &mut TrenchSpoke| { &mut m.mound_start }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "trench_start", - |m: &TrenchSpoke| { &m.trench_start }, - |m: &mut TrenchSpoke| { &mut m.trench_start }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "trench_end", - |m: &TrenchSpoke| { &m.trench_end }, - |m: &mut TrenchSpoke| { &mut m.trench_end }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mound_end", - |m: &TrenchSpoke| { &m.mound_end }, - |m: &mut TrenchSpoke| { &mut m.mound_end }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TrenchSpoke", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TrenchSpoke { - const NAME: &'static str = "TrenchSpoke"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.mound_start = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.trench_start = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.trench_end = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.mound_end = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.mound_start { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.trench_start { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.trench_end { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.mound_end { - my_size += ::protobuf::rt::int32_size(4, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.mound_start { - os.write_int32(1, v)?; - } - if let Some(v) = self.trench_start { - os.write_int32(2, v)?; - } - if let Some(v) = self.trench_end { - os.write_int32(3, v)?; - } - if let Some(v) = self.mound_end { - os.write_int32(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TrenchSpoke { - TrenchSpoke::new() - } - - fn clear(&mut self) { - self.mound_start = ::std::option::Option::None; - self.trench_start = ::std::option::Option::None; - self.trench_end = ::std::option::Option::None; - self.mound_end = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TrenchSpoke { - static instance: TrenchSpoke = TrenchSpoke { - mound_start: ::std::option::Option::None, - trench_start: ::std::option::Option::None, - trench_end: ::std::option::Option::None, - mound_end: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TrenchSpoke { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TrenchSpoke").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TrenchSpoke { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TrenchSpoke { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.SiteRealizationBuildingTrenches) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SiteRealizationBuildingTrenches { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuildingTrenches.spokes) - pub spokes: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.SiteRealizationBuildingTrenches.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SiteRealizationBuildingTrenches { - fn default() -> &'a SiteRealizationBuildingTrenches { - ::default_instance() - } -} - -impl SiteRealizationBuildingTrenches { - pub fn new() -> SiteRealizationBuildingTrenches { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "spokes", - |m: &SiteRealizationBuildingTrenches| { &m.spokes }, - |m: &mut SiteRealizationBuildingTrenches| { &mut m.spokes }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SiteRealizationBuildingTrenches", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SiteRealizationBuildingTrenches { - const NAME: &'static str = "SiteRealizationBuildingTrenches"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.spokes.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.spokes { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.spokes { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SiteRealizationBuildingTrenches { - SiteRealizationBuildingTrenches::new() - } - - fn clear(&mut self) { - self.spokes.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SiteRealizationBuildingTrenches { - static instance: SiteRealizationBuildingTrenches = SiteRealizationBuildingTrenches { - spokes: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SiteRealizationBuildingTrenches { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SiteRealizationBuildingTrenches").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SiteRealizationBuildingTrenches { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SiteRealizationBuildingTrenches { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.SiteRealizationBuilding) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SiteRealizationBuilding { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.min_x) - pub min_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.min_y) - pub min_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.max_x) - pub max_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.max_y) - pub max_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.wall_info) - pub wall_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.tower_info) - pub tower_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.trench_info) - pub trench_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.SiteRealizationBuilding.type) - pub type_: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.SiteRealizationBuilding.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SiteRealizationBuilding { - fn default() -> &'a SiteRealizationBuilding { - ::default_instance() - } -} - -impl SiteRealizationBuilding { - pub fn new() -> SiteRealizationBuilding { - ::std::default::Default::default() - } - - // optional int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // optional int32 min_x = 3; - - pub fn min_x(&self) -> i32 { - self.min_x.unwrap_or(0) - } - - pub fn clear_min_x(&mut self) { - self.min_x = ::std::option::Option::None; - } - - pub fn has_min_x(&self) -> bool { - self.min_x.is_some() - } - - // Param is passed by value, moved - pub fn set_min_x(&mut self, v: i32) { - self.min_x = ::std::option::Option::Some(v); - } - - // optional int32 min_y = 4; - - pub fn min_y(&self) -> i32 { - self.min_y.unwrap_or(0) - } - - pub fn clear_min_y(&mut self) { - self.min_y = ::std::option::Option::None; - } - - pub fn has_min_y(&self) -> bool { - self.min_y.is_some() - } - - // Param is passed by value, moved - pub fn set_min_y(&mut self, v: i32) { - self.min_y = ::std::option::Option::Some(v); - } - - // optional int32 max_x = 5; - - pub fn max_x(&self) -> i32 { - self.max_x.unwrap_or(0) - } - - pub fn clear_max_x(&mut self) { - self.max_x = ::std::option::Option::None; - } - - pub fn has_max_x(&self) -> bool { - self.max_x.is_some() - } - - // Param is passed by value, moved - pub fn set_max_x(&mut self, v: i32) { - self.max_x = ::std::option::Option::Some(v); - } - - // optional int32 max_y = 6; - - pub fn max_y(&self) -> i32 { - self.max_y.unwrap_or(0) - } - - pub fn clear_max_y(&mut self) { - self.max_y = ::std::option::Option::None; - } - - pub fn has_max_y(&self) -> bool { - self.max_y.is_some() - } - - // Param is passed by value, moved - pub fn set_max_y(&mut self, v: i32) { - self.max_y = ::std::option::Option::Some(v); - } - - // optional int32 type = 11; - - pub fn type_(&self) -> i32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: i32) { - self.type_ = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(10); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &SiteRealizationBuilding| { &m.id }, - |m: &mut SiteRealizationBuilding| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "min_x", - |m: &SiteRealizationBuilding| { &m.min_x }, - |m: &mut SiteRealizationBuilding| { &mut m.min_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "min_y", - |m: &SiteRealizationBuilding| { &m.min_y }, - |m: &mut SiteRealizationBuilding| { &mut m.min_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_x", - |m: &SiteRealizationBuilding| { &m.max_x }, - |m: &mut SiteRealizationBuilding| { &mut m.max_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_y", - |m: &SiteRealizationBuilding| { &m.max_y }, - |m: &mut SiteRealizationBuilding| { &mut m.max_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &SiteRealizationBuilding| { &m.material }, - |m: &mut SiteRealizationBuilding| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SiteRealizationBuildingWall>( - "wall_info", - |m: &SiteRealizationBuilding| { &m.wall_info }, - |m: &mut SiteRealizationBuilding| { &mut m.wall_info }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SiteRealizationBuildingTower>( - "tower_info", - |m: &SiteRealizationBuilding| { &m.tower_info }, - |m: &mut SiteRealizationBuilding| { &mut m.tower_info }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SiteRealizationBuildingTrenches>( - "trench_info", - |m: &SiteRealizationBuilding| { &m.trench_info }, - |m: &mut SiteRealizationBuilding| { &mut m.trench_info }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &SiteRealizationBuilding| { &m.type_ }, - |m: &mut SiteRealizationBuilding| { &mut m.type_ }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SiteRealizationBuilding", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SiteRealizationBuilding { - const NAME: &'static str = "SiteRealizationBuilding"; - - fn is_initialized(&self) -> bool { - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.wall_info { - if !v.is_initialized() { - return false; - } - }; - for v in &self.tower_info { - if !v.is_initialized() { - return false; - } - }; - for v in &self.trench_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.min_x = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.min_y = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.max_x = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.max_y = ::std::option::Option::Some(is.read_int32()?); - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.wall_info)?; - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.tower_info)?; - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.trench_info)?; - }, - 88 => { - self.type_ = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.min_x { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.min_y { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.max_x { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.max_y { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.wall_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.tower_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.trench_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(11, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.min_x { - os.write_int32(3, v)?; - } - if let Some(v) = self.min_y { - os.write_int32(4, v)?; - } - if let Some(v) = self.max_x { - os.write_int32(5, v)?; - } - if let Some(v) = self.max_y { - os.write_int32(6, v)?; - } - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - if let Some(v) = self.wall_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - if let Some(v) = self.tower_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if let Some(v) = self.trench_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - if let Some(v) = self.type_ { - os.write_int32(11, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SiteRealizationBuilding { - SiteRealizationBuilding::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.min_x = ::std::option::Option::None; - self.min_y = ::std::option::Option::None; - self.max_x = ::std::option::Option::None; - self.max_y = ::std::option::Option::None; - self.material.clear(); - self.wall_info.clear(); - self.tower_info.clear(); - self.trench_info.clear(); - self.type_ = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SiteRealizationBuilding { - static instance: SiteRealizationBuilding = SiteRealizationBuilding { - id: ::std::option::Option::None, - min_x: ::std::option::Option::None, - min_y: ::std::option::Option::None, - max_x: ::std::option::Option::None, - max_y: ::std::option::Option::None, - material: ::protobuf::MessageField::none(), - wall_info: ::protobuf::MessageField::none(), - tower_info: ::protobuf::MessageField::none(), - trench_info: ::protobuf::MessageField::none(), - type_: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SiteRealizationBuilding { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SiteRealizationBuilding").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SiteRealizationBuilding { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SiteRealizationBuilding { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.RegionTile) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RegionTile { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.elevation) - pub elevation: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.rainfall) - pub rainfall: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.vegetation) - pub vegetation: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.temperature) - pub temperature: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.evilness) - pub evilness: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.drainage) - pub drainage: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.volcanism) - pub volcanism: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.savagery) - pub savagery: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.salinity) - pub salinity: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.river_tiles) - pub river_tiles: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.water_elevation) - pub water_elevation: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.surface_material) - pub surface_material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.plant_materials) - pub plant_materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.buildings) - pub buildings: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.stone_materials) - pub stone_materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.tree_materials) - pub tree_materials: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionTile.snow) - pub snow: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.RegionTile.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RegionTile { - fn default() -> &'a RegionTile { - ::default_instance() - } -} - -impl RegionTile { - pub fn new() -> RegionTile { - ::std::default::Default::default() - } - - // optional int32 elevation = 1; - - pub fn elevation(&self) -> i32 { - self.elevation.unwrap_or(0) - } - - pub fn clear_elevation(&mut self) { - self.elevation = ::std::option::Option::None; - } - - pub fn has_elevation(&self) -> bool { - self.elevation.is_some() - } - - // Param is passed by value, moved - pub fn set_elevation(&mut self, v: i32) { - self.elevation = ::std::option::Option::Some(v); - } - - // optional int32 rainfall = 2; - - pub fn rainfall(&self) -> i32 { - self.rainfall.unwrap_or(0) - } - - pub fn clear_rainfall(&mut self) { - self.rainfall = ::std::option::Option::None; - } - - pub fn has_rainfall(&self) -> bool { - self.rainfall.is_some() - } - - // Param is passed by value, moved - pub fn set_rainfall(&mut self, v: i32) { - self.rainfall = ::std::option::Option::Some(v); - } - - // optional int32 vegetation = 3; - - pub fn vegetation(&self) -> i32 { - self.vegetation.unwrap_or(0) - } - - pub fn clear_vegetation(&mut self) { - self.vegetation = ::std::option::Option::None; - } - - pub fn has_vegetation(&self) -> bool { - self.vegetation.is_some() - } - - // Param is passed by value, moved - pub fn set_vegetation(&mut self, v: i32) { - self.vegetation = ::std::option::Option::Some(v); - } - - // optional int32 temperature = 4; - - pub fn temperature(&self) -> i32 { - self.temperature.unwrap_or(0) - } - - pub fn clear_temperature(&mut self) { - self.temperature = ::std::option::Option::None; - } - - pub fn has_temperature(&self) -> bool { - self.temperature.is_some() - } - - // Param is passed by value, moved - pub fn set_temperature(&mut self, v: i32) { - self.temperature = ::std::option::Option::Some(v); - } - - // optional int32 evilness = 5; - - pub fn evilness(&self) -> i32 { - self.evilness.unwrap_or(0) - } - - pub fn clear_evilness(&mut self) { - self.evilness = ::std::option::Option::None; - } - - pub fn has_evilness(&self) -> bool { - self.evilness.is_some() - } - - // Param is passed by value, moved - pub fn set_evilness(&mut self, v: i32) { - self.evilness = ::std::option::Option::Some(v); - } - - // optional int32 drainage = 6; - - pub fn drainage(&self) -> i32 { - self.drainage.unwrap_or(0) - } - - pub fn clear_drainage(&mut self) { - self.drainage = ::std::option::Option::None; - } - - pub fn has_drainage(&self) -> bool { - self.drainage.is_some() - } - - // Param is passed by value, moved - pub fn set_drainage(&mut self, v: i32) { - self.drainage = ::std::option::Option::Some(v); - } - - // optional int32 volcanism = 7; - - pub fn volcanism(&self) -> i32 { - self.volcanism.unwrap_or(0) - } - - pub fn clear_volcanism(&mut self) { - self.volcanism = ::std::option::Option::None; - } - - pub fn has_volcanism(&self) -> bool { - self.volcanism.is_some() - } - - // Param is passed by value, moved - pub fn set_volcanism(&mut self, v: i32) { - self.volcanism = ::std::option::Option::Some(v); - } - - // optional int32 savagery = 8; - - pub fn savagery(&self) -> i32 { - self.savagery.unwrap_or(0) - } - - pub fn clear_savagery(&mut self) { - self.savagery = ::std::option::Option::None; - } - - pub fn has_savagery(&self) -> bool { - self.savagery.is_some() - } - - // Param is passed by value, moved - pub fn set_savagery(&mut self, v: i32) { - self.savagery = ::std::option::Option::Some(v); - } - - // optional int32 salinity = 9; - - pub fn salinity(&self) -> i32 { - self.salinity.unwrap_or(0) - } - - pub fn clear_salinity(&mut self) { - self.salinity = ::std::option::Option::None; - } - - pub fn has_salinity(&self) -> bool { - self.salinity.is_some() - } - - // Param is passed by value, moved - pub fn set_salinity(&mut self, v: i32) { - self.salinity = ::std::option::Option::Some(v); - } - - // optional int32 water_elevation = 11; - - pub fn water_elevation(&self) -> i32 { - self.water_elevation.unwrap_or(0) - } - - pub fn clear_water_elevation(&mut self) { - self.water_elevation = ::std::option::Option::None; - } - - pub fn has_water_elevation(&self) -> bool { - self.water_elevation.is_some() - } - - // Param is passed by value, moved - pub fn set_water_elevation(&mut self, v: i32) { - self.water_elevation = ::std::option::Option::Some(v); - } - - // optional int32 snow = 17; - - pub fn snow(&self) -> i32 { - self.snow.unwrap_or(0) - } - - pub fn clear_snow(&mut self) { - self.snow = ::std::option::Option::None; - } - - pub fn has_snow(&self) -> bool { - self.snow.is_some() - } - - // Param is passed by value, moved - pub fn set_snow(&mut self, v: i32) { - self.snow = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(17); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "elevation", - |m: &RegionTile| { &m.elevation }, - |m: &mut RegionTile| { &mut m.elevation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "rainfall", - |m: &RegionTile| { &m.rainfall }, - |m: &mut RegionTile| { &mut m.rainfall }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "vegetation", - |m: &RegionTile| { &m.vegetation }, - |m: &mut RegionTile| { &mut m.vegetation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "temperature", - |m: &RegionTile| { &m.temperature }, - |m: &mut RegionTile| { &mut m.temperature }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "evilness", - |m: &RegionTile| { &m.evilness }, - |m: &mut RegionTile| { &mut m.evilness }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "drainage", - |m: &RegionTile| { &m.drainage }, - |m: &mut RegionTile| { &mut m.drainage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "volcanism", - |m: &RegionTile| { &m.volcanism }, - |m: &mut RegionTile| { &mut m.volcanism }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "savagery", - |m: &RegionTile| { &m.savagery }, - |m: &mut RegionTile| { &mut m.savagery }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "salinity", - |m: &RegionTile| { &m.salinity }, - |m: &mut RegionTile| { &mut m.salinity }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RiverTile>( - "river_tiles", - |m: &RegionTile| { &m.river_tiles }, - |m: &mut RegionTile| { &mut m.river_tiles }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "water_elevation", - |m: &RegionTile| { &m.water_elevation }, - |m: &mut RegionTile| { &mut m.water_elevation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "surface_material", - |m: &RegionTile| { &m.surface_material }, - |m: &mut RegionTile| { &mut m.surface_material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "plant_materials", - |m: &RegionTile| { &m.plant_materials }, - |m: &mut RegionTile| { &mut m.plant_materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "buildings", - |m: &RegionTile| { &m.buildings }, - |m: &mut RegionTile| { &mut m.buildings }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "stone_materials", - |m: &RegionTile| { &m.stone_materials }, - |m: &mut RegionTile| { &mut m.stone_materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tree_materials", - |m: &RegionTile| { &m.tree_materials }, - |m: &mut RegionTile| { &mut m.tree_materials }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "snow", - |m: &RegionTile| { &m.snow }, - |m: &mut RegionTile| { &mut m.snow }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RegionTile", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RegionTile { - const NAME: &'static str = "RegionTile"; - - fn is_initialized(&self) -> bool { - for v in &self.river_tiles { - if !v.is_initialized() { - return false; - } - }; - for v in &self.surface_material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.plant_materials { - if !v.is_initialized() { - return false; - } - }; - for v in &self.buildings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.stone_materials { - if !v.is_initialized() { - return false; - } - }; - for v in &self.tree_materials { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.elevation = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.rainfall = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.vegetation = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.temperature = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.evilness = ::std::option::Option::Some(is.read_int32()?); - }, - 48 => { - self.drainage = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.volcanism = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.savagery = ::std::option::Option::Some(is.read_int32()?); - }, - 72 => { - self.salinity = ::std::option::Option::Some(is.read_int32()?); - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.river_tiles)?; - }, - 88 => { - self.water_elevation = ::std::option::Option::Some(is.read_int32()?); - }, - 98 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.surface_material)?; - }, - 106 => { - self.plant_materials.push(is.read_message()?); - }, - 114 => { - self.buildings.push(is.read_message()?); - }, - 122 => { - self.stone_materials.push(is.read_message()?); - }, - 130 => { - self.tree_materials.push(is.read_message()?); - }, - 136 => { - self.snow = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.elevation { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.rainfall { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.vegetation { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.temperature { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.evilness { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.drainage { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.volcanism { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.savagery { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.salinity { - my_size += ::protobuf::rt::int32_size(9, v); - } - if let Some(v) = self.river_tiles.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.water_elevation { - my_size += ::protobuf::rt::int32_size(11, v); - } - if let Some(v) = self.surface_material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.plant_materials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.buildings { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.stone_materials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.tree_materials { - let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.snow { - my_size += ::protobuf::rt::int32_size(17, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.elevation { - os.write_int32(1, v)?; - } - if let Some(v) = self.rainfall { - os.write_int32(2, v)?; - } - if let Some(v) = self.vegetation { - os.write_int32(3, v)?; - } - if let Some(v) = self.temperature { - os.write_int32(4, v)?; - } - if let Some(v) = self.evilness { - os.write_int32(5, v)?; - } - if let Some(v) = self.drainage { - os.write_int32(6, v)?; - } - if let Some(v) = self.volcanism { - os.write_int32(7, v)?; - } - if let Some(v) = self.savagery { - os.write_int32(8, v)?; - } - if let Some(v) = self.salinity { - os.write_int32(9, v)?; - } - if let Some(v) = self.river_tiles.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - if let Some(v) = self.water_elevation { - os.write_int32(11, v)?; - } - if let Some(v) = self.surface_material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - } - for v in &self.plant_materials { - ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?; - }; - for v in &self.buildings { - ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?; - }; - for v in &self.stone_materials { - ::protobuf::rt::write_message_field_with_cached_size(15, v, os)?; - }; - for v in &self.tree_materials { - ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?; - }; - if let Some(v) = self.snow { - os.write_int32(17, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RegionTile { - RegionTile::new() - } - - fn clear(&mut self) { - self.elevation = ::std::option::Option::None; - self.rainfall = ::std::option::Option::None; - self.vegetation = ::std::option::Option::None; - self.temperature = ::std::option::Option::None; - self.evilness = ::std::option::Option::None; - self.drainage = ::std::option::Option::None; - self.volcanism = ::std::option::Option::None; - self.savagery = ::std::option::Option::None; - self.salinity = ::std::option::Option::None; - self.river_tiles.clear(); - self.water_elevation = ::std::option::Option::None; - self.surface_material.clear(); - self.plant_materials.clear(); - self.buildings.clear(); - self.stone_materials.clear(); - self.tree_materials.clear(); - self.snow = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RegionTile { - static instance: RegionTile = RegionTile { - elevation: ::std::option::Option::None, - rainfall: ::std::option::Option::None, - vegetation: ::std::option::Option::None, - temperature: ::std::option::Option::None, - evilness: ::std::option::Option::None, - drainage: ::std::option::Option::None, - volcanism: ::std::option::Option::None, - savagery: ::std::option::Option::None, - salinity: ::std::option::Option::None, - river_tiles: ::protobuf::MessageField::none(), - water_elevation: ::std::option::Option::None, - surface_material: ::protobuf::MessageField::none(), - plant_materials: ::std::vec::Vec::new(), - buildings: ::std::vec::Vec::new(), - stone_materials: ::std::vec::Vec::new(), - tree_materials: ::std::vec::Vec::new(), - snow: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RegionTile { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RegionTile").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RegionTile { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RegionTile { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.RegionMap) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RegionMap { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMap.map_x) - pub map_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMap.map_y) - pub map_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMap.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMap.name_english) - pub name_english: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMap.tiles) - pub tiles: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.RegionMap.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RegionMap { - fn default() -> &'a RegionMap { - ::default_instance() - } -} - -impl RegionMap { - pub fn new() -> RegionMap { - ::std::default::Default::default() - } - - // optional int32 map_x = 1; - - pub fn map_x(&self) -> i32 { - self.map_x.unwrap_or(0) - } - - pub fn clear_map_x(&mut self) { - self.map_x = ::std::option::Option::None; - } - - pub fn has_map_x(&self) -> bool { - self.map_x.is_some() - } - - // Param is passed by value, moved - pub fn set_map_x(&mut self, v: i32) { - self.map_x = ::std::option::Option::Some(v); - } - - // optional int32 map_y = 2; - - pub fn map_y(&self) -> i32 { - self.map_y.unwrap_or(0) - } - - pub fn clear_map_y(&mut self) { - self.map_y = ::std::option::Option::None; - } - - pub fn has_map_y(&self) -> bool { - self.map_y.is_some() - } - - // Param is passed by value, moved - pub fn set_map_y(&mut self, v: i32) { - self.map_y = ::std::option::Option::Some(v); - } - - // optional string name = 3; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name_english = 4; - - pub fn name_english(&self) -> &str { - match self.name_english.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name_english(&mut self) { - self.name_english = ::std::option::Option::None; - } - - pub fn has_name_english(&self) -> bool { - self.name_english.is_some() - } - - // Param is passed by value, moved - pub fn set_name_english(&mut self, v: ::std::string::String) { - self.name_english = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name_english(&mut self) -> &mut ::std::string::String { - if self.name_english.is_none() { - self.name_english = ::std::option::Option::Some(::std::string::String::new()); - } - self.name_english.as_mut().unwrap() - } - - // Take field - pub fn take_name_english(&mut self) -> ::std::string::String { - self.name_english.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_x", - |m: &RegionMap| { &m.map_x }, - |m: &mut RegionMap| { &mut m.map_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "map_y", - |m: &RegionMap| { &m.map_y }, - |m: &mut RegionMap| { &mut m.map_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &RegionMap| { &m.name }, - |m: &mut RegionMap| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name_english", - |m: &RegionMap| { &m.name_english }, - |m: &mut RegionMap| { &mut m.name_english }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tiles", - |m: &RegionMap| { &m.tiles }, - |m: &mut RegionMap| { &mut m.tiles }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RegionMap", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RegionMap { - const NAME: &'static str = "RegionMap"; - - fn is_initialized(&self) -> bool { - for v in &self.tiles { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.map_x = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.map_y = ::std::option::Option::Some(is.read_int32()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.name_english = ::std::option::Option::Some(is.read_string()?); - }, - 42 => { - self.tiles.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.map_x { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.map_y { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.name_english.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - for value in &self.tiles { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.map_x { - os.write_int32(1, v)?; - } - if let Some(v) = self.map_y { - os.write_int32(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.name_english.as_ref() { - os.write_string(4, v)?; - } - for v in &self.tiles { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RegionMap { - RegionMap::new() - } - - fn clear(&mut self) { - self.map_x = ::std::option::Option::None; - self.map_y = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.name_english = ::std::option::Option::None; - self.tiles.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RegionMap { - static instance: RegionMap = RegionMap { - map_x: ::std::option::Option::None, - map_y: ::std::option::Option::None, - name: ::std::option::Option::None, - name_english: ::std::option::Option::None, - tiles: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RegionMap { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RegionMap").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RegionMap { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RegionMap { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.RegionMaps) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RegionMaps { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMaps.world_maps) - pub world_maps: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.RegionMaps.region_maps) - pub region_maps: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.RegionMaps.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RegionMaps { - fn default() -> &'a RegionMaps { - ::default_instance() - } -} - -impl RegionMaps { - pub fn new() -> RegionMaps { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "world_maps", - |m: &RegionMaps| { &m.world_maps }, - |m: &mut RegionMaps| { &mut m.world_maps }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "region_maps", - |m: &RegionMaps| { &m.region_maps }, - |m: &mut RegionMaps| { &mut m.region_maps }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RegionMaps", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RegionMaps { - const NAME: &'static str = "RegionMaps"; - - fn is_initialized(&self) -> bool { - for v in &self.world_maps { - if !v.is_initialized() { - return false; - } - }; - for v in &self.region_maps { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.world_maps.push(is.read_message()?); - }, - 18 => { - self.region_maps.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.world_maps { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.region_maps { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.world_maps { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.region_maps { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RegionMaps { - RegionMaps::new() - } - - fn clear(&mut self) { - self.world_maps.clear(); - self.region_maps.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RegionMaps { - static instance: RegionMaps = RegionMaps { - world_maps: ::std::vec::Vec::new(), - region_maps: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RegionMaps { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RegionMaps").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RegionMaps { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RegionMaps { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PatternDescriptor) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PatternDescriptor { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PatternDescriptor.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.PatternDescriptor.colors) - pub colors: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.PatternDescriptor.pattern) - pub pattern: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PatternDescriptor.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PatternDescriptor { - fn default() -> &'a PatternDescriptor { - ::default_instance() - } -} - -impl PatternDescriptor { - pub fn new() -> PatternDescriptor { - ::std::default::Default::default() - } - - // optional string id = 1; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional .RemoteFortressReader.PatternType pattern = 3; - - pub fn pattern(&self) -> PatternType { - match self.pattern { - Some(e) => e.enum_value_or(PatternType::MONOTONE), - None => PatternType::MONOTONE, - } - } - - pub fn clear_pattern(&mut self) { - self.pattern = ::std::option::Option::None; - } - - pub fn has_pattern(&self) -> bool { - self.pattern.is_some() - } - - // Param is passed by value, moved - pub fn set_pattern(&mut self, v: PatternType) { - self.pattern = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &PatternDescriptor| { &m.id }, - |m: &mut PatternDescriptor| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "colors", - |m: &PatternDescriptor| { &m.colors }, - |m: &mut PatternDescriptor| { &mut m.colors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pattern", - |m: &PatternDescriptor| { &m.pattern }, - |m: &mut PatternDescriptor| { &mut m.pattern }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PatternDescriptor", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PatternDescriptor { - const NAME: &'static str = "PatternDescriptor"; - - fn is_initialized(&self) -> bool { - for v in &self.colors { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.colors.push(is.read_message()?); - }, - 24 => { - self.pattern = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - for value in &self.colors { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.pattern { - my_size += ::protobuf::rt::int32_size(3, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id.as_ref() { - os.write_string(1, v)?; - } - for v in &self.colors { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - if let Some(v) = self.pattern { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PatternDescriptor { - PatternDescriptor::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.colors.clear(); - self.pattern = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PatternDescriptor { - static instance: PatternDescriptor = PatternDescriptor { - id: ::std::option::Option::None, - colors: ::std::vec::Vec::new(), - pattern: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PatternDescriptor { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PatternDescriptor").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PatternDescriptor { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PatternDescriptor { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ColorModifierRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ColorModifierRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ColorModifierRaw.patterns) - pub patterns: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorModifierRaw.body_part_id) - pub body_part_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorModifierRaw.tissue_layer_id) - pub tissue_layer_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorModifierRaw.start_date) - pub start_date: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorModifierRaw.end_date) - pub end_date: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ColorModifierRaw.part) - pub part: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ColorModifierRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ColorModifierRaw { - fn default() -> &'a ColorModifierRaw { - ::default_instance() - } -} - -impl ColorModifierRaw { - pub fn new() -> ColorModifierRaw { - ::std::default::Default::default() - } - - // optional int32 start_date = 4; - - pub fn start_date(&self) -> i32 { - self.start_date.unwrap_or(0) - } - - pub fn clear_start_date(&mut self) { - self.start_date = ::std::option::Option::None; - } - - pub fn has_start_date(&self) -> bool { - self.start_date.is_some() - } - - // Param is passed by value, moved - pub fn set_start_date(&mut self, v: i32) { - self.start_date = ::std::option::Option::Some(v); - } - - // optional int32 end_date = 5; - - pub fn end_date(&self) -> i32 { - self.end_date.unwrap_or(0) - } - - pub fn clear_end_date(&mut self) { - self.end_date = ::std::option::Option::None; - } - - pub fn has_end_date(&self) -> bool { - self.end_date.is_some() - } - - // Param is passed by value, moved - pub fn set_end_date(&mut self, v: i32) { - self.end_date = ::std::option::Option::Some(v); - } - - // optional string part = 6; - - pub fn part(&self) -> &str { - match self.part.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_part(&mut self) { - self.part = ::std::option::Option::None; - } - - pub fn has_part(&self) -> bool { - self.part.is_some() - } - - // Param is passed by value, moved - pub fn set_part(&mut self, v: ::std::string::String) { - self.part = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_part(&mut self) -> &mut ::std::string::String { - if self.part.is_none() { - self.part = ::std::option::Option::Some(::std::string::String::new()); - } - self.part.as_mut().unwrap() - } - - // Take field - pub fn take_part(&mut self) -> ::std::string::String { - self.part.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "patterns", - |m: &ColorModifierRaw| { &m.patterns }, - |m: &mut ColorModifierRaw| { &mut m.patterns }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "body_part_id", - |m: &ColorModifierRaw| { &m.body_part_id }, - |m: &mut ColorModifierRaw| { &mut m.body_part_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tissue_layer_id", - |m: &ColorModifierRaw| { &m.tissue_layer_id }, - |m: &mut ColorModifierRaw| { &mut m.tissue_layer_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "start_date", - |m: &ColorModifierRaw| { &m.start_date }, - |m: &mut ColorModifierRaw| { &mut m.start_date }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "end_date", - |m: &ColorModifierRaw| { &m.end_date }, - |m: &mut ColorModifierRaw| { &mut m.end_date }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "part", - |m: &ColorModifierRaw| { &m.part }, - |m: &mut ColorModifierRaw| { &mut m.part }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ColorModifierRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ColorModifierRaw { - const NAME: &'static str = "ColorModifierRaw"; - - fn is_initialized(&self) -> bool { - for v in &self.patterns { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.patterns.push(is.read_message()?); - }, - 18 => { - is.read_repeated_packed_int32_into(&mut self.body_part_id)?; - }, - 16 => { - self.body_part_id.push(is.read_int32()?); - }, - 26 => { - is.read_repeated_packed_int32_into(&mut self.tissue_layer_id)?; - }, - 24 => { - self.tissue_layer_id.push(is.read_int32()?); - }, - 32 => { - self.start_date = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.end_date = ::std::option::Option::Some(is.read_int32()?); - }, - 50 => { - self.part = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.patterns { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.body_part_id { - my_size += ::protobuf::rt::int32_size(2, *value); - }; - for value in &self.tissue_layer_id { - my_size += ::protobuf::rt::int32_size(3, *value); - }; - if let Some(v) = self.start_date { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.end_date { - my_size += ::protobuf::rt::int32_size(5, v); - } - if let Some(v) = self.part.as_ref() { - my_size += ::protobuf::rt::string_size(6, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.patterns { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.body_part_id { - os.write_int32(2, *v)?; - }; - for v in &self.tissue_layer_id { - os.write_int32(3, *v)?; - }; - if let Some(v) = self.start_date { - os.write_int32(4, v)?; - } - if let Some(v) = self.end_date { - os.write_int32(5, v)?; - } - if let Some(v) = self.part.as_ref() { - os.write_string(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ColorModifierRaw { - ColorModifierRaw::new() - } - - fn clear(&mut self) { - self.patterns.clear(); - self.body_part_id.clear(); - self.tissue_layer_id.clear(); - self.start_date = ::std::option::Option::None; - self.end_date = ::std::option::Option::None; - self.part = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ColorModifierRaw { - static instance: ColorModifierRaw = ColorModifierRaw { - patterns: ::std::vec::Vec::new(), - body_part_id: ::std::vec::Vec::new(), - tissue_layer_id: ::std::vec::Vec::new(), - start_date: ::std::option::Option::None, - end_date: ::std::option::Option::None, - part: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ColorModifierRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ColorModifierRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ColorModifierRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ColorModifierRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BodyPartLayerRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BodyPartLayerRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartLayerRaw.layer_name) - pub layer_name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartLayerRaw.tissue_id) - pub tissue_id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartLayerRaw.layer_depth) - pub layer_depth: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartLayerRaw.bp_modifiers) - pub bp_modifiers: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BodyPartLayerRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BodyPartLayerRaw { - fn default() -> &'a BodyPartLayerRaw { - ::default_instance() - } -} - -impl BodyPartLayerRaw { - pub fn new() -> BodyPartLayerRaw { - ::std::default::Default::default() - } - - // optional string layer_name = 1; - - pub fn layer_name(&self) -> &str { - match self.layer_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_layer_name(&mut self) { - self.layer_name = ::std::option::Option::None; - } - - pub fn has_layer_name(&self) -> bool { - self.layer_name.is_some() - } - - // Param is passed by value, moved - pub fn set_layer_name(&mut self, v: ::std::string::String) { - self.layer_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_layer_name(&mut self) -> &mut ::std::string::String { - if self.layer_name.is_none() { - self.layer_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.layer_name.as_mut().unwrap() - } - - // Take field - pub fn take_layer_name(&mut self) -> ::std::string::String { - self.layer_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 tissue_id = 2; - - pub fn tissue_id(&self) -> i32 { - self.tissue_id.unwrap_or(0) - } - - pub fn clear_tissue_id(&mut self) { - self.tissue_id = ::std::option::Option::None; - } - - pub fn has_tissue_id(&self) -> bool { - self.tissue_id.is_some() - } - - // Param is passed by value, moved - pub fn set_tissue_id(&mut self, v: i32) { - self.tissue_id = ::std::option::Option::Some(v); - } - - // optional int32 layer_depth = 3; - - pub fn layer_depth(&self) -> i32 { - self.layer_depth.unwrap_or(0) - } - - pub fn clear_layer_depth(&mut self) { - self.layer_depth = ::std::option::Option::None; - } - - pub fn has_layer_depth(&self) -> bool { - self.layer_depth.is_some() - } - - // Param is passed by value, moved - pub fn set_layer_depth(&mut self, v: i32) { - self.layer_depth = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "layer_name", - |m: &BodyPartLayerRaw| { &m.layer_name }, - |m: &mut BodyPartLayerRaw| { &mut m.layer_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "tissue_id", - |m: &BodyPartLayerRaw| { &m.tissue_id }, - |m: &mut BodyPartLayerRaw| { &mut m.tissue_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "layer_depth", - |m: &BodyPartLayerRaw| { &m.layer_depth }, - |m: &mut BodyPartLayerRaw| { &mut m.layer_depth }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "bp_modifiers", - |m: &BodyPartLayerRaw| { &m.bp_modifiers }, - |m: &mut BodyPartLayerRaw| { &mut m.bp_modifiers }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BodyPartLayerRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BodyPartLayerRaw { - const NAME: &'static str = "BodyPartLayerRaw"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.layer_name = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.tissue_id = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.layer_depth = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - is.read_repeated_packed_int32_into(&mut self.bp_modifiers)?; - }, - 32 => { - self.bp_modifiers.push(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.layer_name.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.tissue_id { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.layer_depth { - my_size += ::protobuf::rt::int32_size(3, v); - } - for value in &self.bp_modifiers { - my_size += ::protobuf::rt::int32_size(4, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.layer_name.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.tissue_id { - os.write_int32(2, v)?; - } - if let Some(v) = self.layer_depth { - os.write_int32(3, v)?; - } - for v in &self.bp_modifiers { - os.write_int32(4, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BodyPartLayerRaw { - BodyPartLayerRaw::new() - } - - fn clear(&mut self) { - self.layer_name = ::std::option::Option::None; - self.tissue_id = ::std::option::Option::None; - self.layer_depth = ::std::option::Option::None; - self.bp_modifiers.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BodyPartLayerRaw { - static instance: BodyPartLayerRaw = BodyPartLayerRaw { - layer_name: ::std::option::Option::None, - tissue_id: ::std::option::Option::None, - layer_depth: ::std::option::Option::None, - bp_modifiers: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BodyPartLayerRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BodyPartLayerRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BodyPartLayerRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BodyPartLayerRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BodyPartRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BodyPartRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartRaw.token) - pub token: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartRaw.category) - pub category: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartRaw.parent) - pub parent: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartRaw.flags) - pub flags: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartRaw.layers) - pub layers: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.BodyPartRaw.relsize) - pub relsize: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BodyPartRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BodyPartRaw { - fn default() -> &'a BodyPartRaw { - ::default_instance() - } -} - -impl BodyPartRaw { - pub fn new() -> BodyPartRaw { - ::std::default::Default::default() - } - - // optional string token = 1; - - pub fn token(&self) -> &str { - match self.token.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_token(&mut self) { - self.token = ::std::option::Option::None; - } - - pub fn has_token(&self) -> bool { - self.token.is_some() - } - - // Param is passed by value, moved - pub fn set_token(&mut self, v: ::std::string::String) { - self.token = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_token(&mut self) -> &mut ::std::string::String { - if self.token.is_none() { - self.token = ::std::option::Option::Some(::std::string::String::new()); - } - self.token.as_mut().unwrap() - } - - // Take field - pub fn take_token(&mut self) -> ::std::string::String { - self.token.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string category = 2; - - pub fn category(&self) -> &str { - match self.category.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_category(&mut self) { - self.category = ::std::option::Option::None; - } - - pub fn has_category(&self) -> bool { - self.category.is_some() - } - - // Param is passed by value, moved - pub fn set_category(&mut self, v: ::std::string::String) { - self.category = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_category(&mut self) -> &mut ::std::string::String { - if self.category.is_none() { - self.category = ::std::option::Option::Some(::std::string::String::new()); - } - self.category.as_mut().unwrap() - } - - // Take field - pub fn take_category(&mut self) -> ::std::string::String { - self.category.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 parent = 3; - - pub fn parent(&self) -> i32 { - self.parent.unwrap_or(0) - } - - pub fn clear_parent(&mut self) { - self.parent = ::std::option::Option::None; - } - - pub fn has_parent(&self) -> bool { - self.parent.is_some() - } - - // Param is passed by value, moved - pub fn set_parent(&mut self, v: i32) { - self.parent = ::std::option::Option::Some(v); - } - - // optional int32 relsize = 6; - - pub fn relsize(&self) -> i32 { - self.relsize.unwrap_or(0) - } - - pub fn clear_relsize(&mut self) { - self.relsize = ::std::option::Option::None; - } - - pub fn has_relsize(&self) -> bool { - self.relsize.is_some() - } - - // Param is passed by value, moved - pub fn set_relsize(&mut self, v: i32) { - self.relsize = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "token", - |m: &BodyPartRaw| { &m.token }, - |m: &mut BodyPartRaw| { &mut m.token }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "category", - |m: &BodyPartRaw| { &m.category }, - |m: &mut BodyPartRaw| { &mut m.category }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "parent", - |m: &BodyPartRaw| { &m.parent }, - |m: &mut BodyPartRaw| { &mut m.parent }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "flags", - |m: &BodyPartRaw| { &m.flags }, - |m: &mut BodyPartRaw| { &mut m.flags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "layers", - |m: &BodyPartRaw| { &m.layers }, - |m: &mut BodyPartRaw| { &mut m.layers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "relsize", - |m: &BodyPartRaw| { &m.relsize }, - |m: &mut BodyPartRaw| { &mut m.relsize }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BodyPartRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BodyPartRaw { - const NAME: &'static str = "BodyPartRaw"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.token = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.category = ::std::option::Option::Some(is.read_string()?); - }, - 24 => { - self.parent = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - is.read_repeated_packed_bool_into(&mut self.flags)?; - }, - 32 => { - self.flags.push(is.read_bool()?); - }, - 42 => { - self.layers.push(is.read_message()?); - }, - 48 => { - self.relsize = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.token.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.category.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.parent { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += 2 * self.flags.len() as u64; - for value in &self.layers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.relsize { - my_size += ::protobuf::rt::int32_size(6, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.token.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.category.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.parent { - os.write_int32(3, v)?; - } - for v in &self.flags { - os.write_bool(4, *v)?; - }; - for v in &self.layers { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - if let Some(v) = self.relsize { - os.write_int32(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BodyPartRaw { - BodyPartRaw::new() - } - - fn clear(&mut self) { - self.token = ::std::option::Option::None; - self.category = ::std::option::Option::None; - self.parent = ::std::option::Option::None; - self.flags.clear(); - self.layers.clear(); - self.relsize = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BodyPartRaw { - static instance: BodyPartRaw = BodyPartRaw { - token: ::std::option::Option::None, - category: ::std::option::Option::None, - parent: ::std::option::Option::None, - flags: ::std::vec::Vec::new(), - layers: ::std::vec::Vec::new(), - relsize: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BodyPartRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BodyPartRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BodyPartRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BodyPartRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.BpAppearanceModifier) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BpAppearanceModifier { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.BpAppearanceModifier.type) - pub type_: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.BpAppearanceModifier.mod_min) - pub mod_min: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.BpAppearanceModifier.mod_max) - pub mod_max: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.BpAppearanceModifier.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BpAppearanceModifier { - fn default() -> &'a BpAppearanceModifier { - ::default_instance() - } -} - -impl BpAppearanceModifier { - pub fn new() -> BpAppearanceModifier { - ::std::default::Default::default() - } - - // optional string type = 1; - - pub fn type_(&self) -> &str { - match self.type_.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: ::std::string::String) { - self.type_ = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_type(&mut self) -> &mut ::std::string::String { - if self.type_.is_none() { - self.type_ = ::std::option::Option::Some(::std::string::String::new()); - } - self.type_.as_mut().unwrap() - } - - // Take field - pub fn take_type_(&mut self) -> ::std::string::String { - self.type_.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 mod_min = 2; - - pub fn mod_min(&self) -> i32 { - self.mod_min.unwrap_or(0) - } - - pub fn clear_mod_min(&mut self) { - self.mod_min = ::std::option::Option::None; - } - - pub fn has_mod_min(&self) -> bool { - self.mod_min.is_some() - } - - // Param is passed by value, moved - pub fn set_mod_min(&mut self, v: i32) { - self.mod_min = ::std::option::Option::Some(v); - } - - // optional int32 mod_max = 3; - - pub fn mod_max(&self) -> i32 { - self.mod_max.unwrap_or(0) - } - - pub fn clear_mod_max(&mut self) { - self.mod_max = ::std::option::Option::None; - } - - pub fn has_mod_max(&self) -> bool { - self.mod_max.is_some() - } - - // Param is passed by value, moved - pub fn set_mod_max(&mut self, v: i32) { - self.mod_max = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &BpAppearanceModifier| { &m.type_ }, - |m: &mut BpAppearanceModifier| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mod_min", - |m: &BpAppearanceModifier| { &m.mod_min }, - |m: &mut BpAppearanceModifier| { &mut m.mod_min }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mod_max", - |m: &BpAppearanceModifier| { &m.mod_max }, - |m: &mut BpAppearanceModifier| { &mut m.mod_max }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BpAppearanceModifier", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BpAppearanceModifier { - const NAME: &'static str = "BpAppearanceModifier"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.type_ = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.mod_min = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.mod_max = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.mod_min { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.mod_max { - my_size += ::protobuf::rt::int32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.mod_min { - os.write_int32(2, v)?; - } - if let Some(v) = self.mod_max { - os.write_int32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BpAppearanceModifier { - BpAppearanceModifier::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.mod_min = ::std::option::Option::None; - self.mod_max = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BpAppearanceModifier { - static instance: BpAppearanceModifier = BpAppearanceModifier { - type_: ::std::option::Option::None, - mod_min: ::std::option::Option::None, - mod_max: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BpAppearanceModifier { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BpAppearanceModifier").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BpAppearanceModifier { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BpAppearanceModifier { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.TissueRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TissueRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.TissueRaw.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.TissueRaw.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.TissueRaw.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.TissueRaw.subordinate_to_tissue) - pub subordinate_to_tissue: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.TissueRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TissueRaw { - fn default() -> &'a TissueRaw { - ::default_instance() - } -} - -impl TissueRaw { - pub fn new() -> TissueRaw { - ::std::default::Default::default() - } - - // optional string id = 1; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name = 2; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string subordinate_to_tissue = 4; - - pub fn subordinate_to_tissue(&self) -> &str { - match self.subordinate_to_tissue.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_subordinate_to_tissue(&mut self) { - self.subordinate_to_tissue = ::std::option::Option::None; - } - - pub fn has_subordinate_to_tissue(&self) -> bool { - self.subordinate_to_tissue.is_some() - } - - // Param is passed by value, moved - pub fn set_subordinate_to_tissue(&mut self, v: ::std::string::String) { - self.subordinate_to_tissue = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subordinate_to_tissue(&mut self) -> &mut ::std::string::String { - if self.subordinate_to_tissue.is_none() { - self.subordinate_to_tissue = ::std::option::Option::Some(::std::string::String::new()); - } - self.subordinate_to_tissue.as_mut().unwrap() - } - - // Take field - pub fn take_subordinate_to_tissue(&mut self) -> ::std::string::String { - self.subordinate_to_tissue.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &TissueRaw| { &m.id }, - |m: &mut TissueRaw| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &TissueRaw| { &m.name }, - |m: &mut TissueRaw| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &TissueRaw| { &m.material }, - |m: &mut TissueRaw| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subordinate_to_tissue", - |m: &TissueRaw| { &m.subordinate_to_tissue }, - |m: &mut TissueRaw| { &mut m.subordinate_to_tissue }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TissueRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TissueRaw { - const NAME: &'static str = "TissueRaw"; - - fn is_initialized(&self) -> bool { - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 34 => { - self.subordinate_to_tissue = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.subordinate_to_tissue.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.subordinate_to_tissue.as_ref() { - os.write_string(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TissueRaw { - TissueRaw::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.material.clear(); - self.subordinate_to_tissue = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TissueRaw { - static instance: TissueRaw = TissueRaw { - id: ::std::option::Option::None, - name: ::std::option::Option::None, - material: ::protobuf::MessageField::none(), - subordinate_to_tissue: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TissueRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TissueRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TissueRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TissueRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.CasteRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CasteRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.caste_id) - pub caste_id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.caste_name) - pub caste_name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.baby_name) - pub baby_name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.child_name) - pub child_name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.gender) - pub gender: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.body_parts) - pub body_parts: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.total_relsize) - pub total_relsize: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.modifiers) - pub modifiers: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.modifier_idx) - pub modifier_idx: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.part_idx) - pub part_idx: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.layer_idx) - pub layer_idx: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.body_appearance_modifiers) - pub body_appearance_modifiers: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.color_modifiers) - pub color_modifiers: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.description) - pub description: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CasteRaw.adult_size) - pub adult_size: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.CasteRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CasteRaw { - fn default() -> &'a CasteRaw { - ::default_instance() - } -} - -impl CasteRaw { - pub fn new() -> CasteRaw { - ::std::default::Default::default() - } - - // optional int32 index = 1; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // optional string caste_id = 2; - - pub fn caste_id(&self) -> &str { - match self.caste_id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_caste_id(&mut self) { - self.caste_id = ::std::option::Option::None; - } - - pub fn has_caste_id(&self) -> bool { - self.caste_id.is_some() - } - - // Param is passed by value, moved - pub fn set_caste_id(&mut self, v: ::std::string::String) { - self.caste_id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_caste_id(&mut self) -> &mut ::std::string::String { - if self.caste_id.is_none() { - self.caste_id = ::std::option::Option::Some(::std::string::String::new()); - } - self.caste_id.as_mut().unwrap() - } - - // Take field - pub fn take_caste_id(&mut self) -> ::std::string::String { - self.caste_id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 gender = 6; - - pub fn gender(&self) -> i32 { - self.gender.unwrap_or(0) - } - - pub fn clear_gender(&mut self) { - self.gender = ::std::option::Option::None; - } - - pub fn has_gender(&self) -> bool { - self.gender.is_some() - } - - // Param is passed by value, moved - pub fn set_gender(&mut self, v: i32) { - self.gender = ::std::option::Option::Some(v); - } - - // optional int32 total_relsize = 8; - - pub fn total_relsize(&self) -> i32 { - self.total_relsize.unwrap_or(0) - } - - pub fn clear_total_relsize(&mut self) { - self.total_relsize = ::std::option::Option::None; - } - - pub fn has_total_relsize(&self) -> bool { - self.total_relsize.is_some() - } - - // Param is passed by value, moved - pub fn set_total_relsize(&mut self, v: i32) { - self.total_relsize = ::std::option::Option::Some(v); - } - - // optional string description = 15; - - pub fn description(&self) -> &str { - match self.description.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_description(&mut self) { - self.description = ::std::option::Option::None; - } - - pub fn has_description(&self) -> bool { - self.description.is_some() - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - if self.description.is_none() { - self.description = ::std::option::Option::Some(::std::string::String::new()); - } - self.description.as_mut().unwrap() - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - self.description.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 adult_size = 16; - - pub fn adult_size(&self) -> i32 { - self.adult_size.unwrap_or(0) - } - - pub fn clear_adult_size(&mut self) { - self.adult_size = ::std::option::Option::None; - } - - pub fn has_adult_size(&self) -> bool { - self.adult_size.is_some() - } - - // Param is passed by value, moved - pub fn set_adult_size(&mut self, v: i32) { - self.adult_size = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(16); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &CasteRaw| { &m.index }, - |m: &mut CasteRaw| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "caste_id", - |m: &CasteRaw| { &m.caste_id }, - |m: &mut CasteRaw| { &mut m.caste_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "caste_name", - |m: &CasteRaw| { &m.caste_name }, - |m: &mut CasteRaw| { &mut m.caste_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "baby_name", - |m: &CasteRaw| { &m.baby_name }, - |m: &mut CasteRaw| { &mut m.baby_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "child_name", - |m: &CasteRaw| { &m.child_name }, - |m: &mut CasteRaw| { &mut m.child_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "gender", - |m: &CasteRaw| { &m.gender }, - |m: &mut CasteRaw| { &mut m.gender }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "body_parts", - |m: &CasteRaw| { &m.body_parts }, - |m: &mut CasteRaw| { &mut m.body_parts }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "total_relsize", - |m: &CasteRaw| { &m.total_relsize }, - |m: &mut CasteRaw| { &mut m.total_relsize }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "modifiers", - |m: &CasteRaw| { &m.modifiers }, - |m: &mut CasteRaw| { &mut m.modifiers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "modifier_idx", - |m: &CasteRaw| { &m.modifier_idx }, - |m: &mut CasteRaw| { &mut m.modifier_idx }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "part_idx", - |m: &CasteRaw| { &m.part_idx }, - |m: &mut CasteRaw| { &mut m.part_idx }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "layer_idx", - |m: &CasteRaw| { &m.layer_idx }, - |m: &mut CasteRaw| { &mut m.layer_idx }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "body_appearance_modifiers", - |m: &CasteRaw| { &m.body_appearance_modifiers }, - |m: &mut CasteRaw| { &mut m.body_appearance_modifiers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "color_modifiers", - |m: &CasteRaw| { &m.color_modifiers }, - |m: &mut CasteRaw| { &mut m.color_modifiers }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "description", - |m: &CasteRaw| { &m.description }, - |m: &mut CasteRaw| { &mut m.description }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "adult_size", - |m: &CasteRaw| { &m.adult_size }, - |m: &mut CasteRaw| { &mut m.adult_size }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CasteRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CasteRaw { - const NAME: &'static str = "CasteRaw"; - - fn is_initialized(&self) -> bool { - for v in &self.body_parts { - if !v.is_initialized() { - return false; - } - }; - for v in &self.modifiers { - if !v.is_initialized() { - return false; - } - }; - for v in &self.body_appearance_modifiers { - if !v.is_initialized() { - return false; - } - }; - for v in &self.color_modifiers { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.caste_id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.caste_name.push(is.read_string()?); - }, - 34 => { - self.baby_name.push(is.read_string()?); - }, - 42 => { - self.child_name.push(is.read_string()?); - }, - 48 => { - self.gender = ::std::option::Option::Some(is.read_int32()?); - }, - 58 => { - self.body_parts.push(is.read_message()?); - }, - 64 => { - self.total_relsize = ::std::option::Option::Some(is.read_int32()?); - }, - 74 => { - self.modifiers.push(is.read_message()?); - }, - 82 => { - is.read_repeated_packed_int32_into(&mut self.modifier_idx)?; - }, - 80 => { - self.modifier_idx.push(is.read_int32()?); - }, - 90 => { - is.read_repeated_packed_int32_into(&mut self.part_idx)?; - }, - 88 => { - self.part_idx.push(is.read_int32()?); - }, - 98 => { - is.read_repeated_packed_int32_into(&mut self.layer_idx)?; - }, - 96 => { - self.layer_idx.push(is.read_int32()?); - }, - 106 => { - self.body_appearance_modifiers.push(is.read_message()?); - }, - 114 => { - self.color_modifiers.push(is.read_message()?); - }, - 122 => { - self.description = ::std::option::Option::Some(is.read_string()?); - }, - 128 => { - self.adult_size = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.caste_id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - for value in &self.caste_name { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.baby_name { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.child_name { - my_size += ::protobuf::rt::string_size(5, &value); - }; - if let Some(v) = self.gender { - my_size += ::protobuf::rt::int32_size(6, v); - } - for value in &self.body_parts { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.total_relsize { - my_size += ::protobuf::rt::int32_size(8, v); - } - for value in &self.modifiers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.modifier_idx { - my_size += ::protobuf::rt::int32_size(10, *value); - }; - for value in &self.part_idx { - my_size += ::protobuf::rt::int32_size(11, *value); - }; - for value in &self.layer_idx { - my_size += ::protobuf::rt::int32_size(12, *value); - }; - for value in &self.body_appearance_modifiers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.color_modifiers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.description.as_ref() { - my_size += ::protobuf::rt::string_size(15, &v); - } - if let Some(v) = self.adult_size { - my_size += ::protobuf::rt::int32_size(16, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.index { - os.write_int32(1, v)?; - } - if let Some(v) = self.caste_id.as_ref() { - os.write_string(2, v)?; - } - for v in &self.caste_name { - os.write_string(3, &v)?; - }; - for v in &self.baby_name { - os.write_string(4, &v)?; - }; - for v in &self.child_name { - os.write_string(5, &v)?; - }; - if let Some(v) = self.gender { - os.write_int32(6, v)?; - } - for v in &self.body_parts { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - if let Some(v) = self.total_relsize { - os.write_int32(8, v)?; - } - for v in &self.modifiers { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - }; - for v in &self.modifier_idx { - os.write_int32(10, *v)?; - }; - for v in &self.part_idx { - os.write_int32(11, *v)?; - }; - for v in &self.layer_idx { - os.write_int32(12, *v)?; - }; - for v in &self.body_appearance_modifiers { - ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?; - }; - for v in &self.color_modifiers { - ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?; - }; - if let Some(v) = self.description.as_ref() { - os.write_string(15, v)?; - } - if let Some(v) = self.adult_size { - os.write_int32(16, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CasteRaw { - CasteRaw::new() - } - - fn clear(&mut self) { - self.index = ::std::option::Option::None; - self.caste_id = ::std::option::Option::None; - self.caste_name.clear(); - self.baby_name.clear(); - self.child_name.clear(); - self.gender = ::std::option::Option::None; - self.body_parts.clear(); - self.total_relsize = ::std::option::Option::None; - self.modifiers.clear(); - self.modifier_idx.clear(); - self.part_idx.clear(); - self.layer_idx.clear(); - self.body_appearance_modifiers.clear(); - self.color_modifiers.clear(); - self.description = ::std::option::Option::None; - self.adult_size = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CasteRaw { - static instance: CasteRaw = CasteRaw { - index: ::std::option::Option::None, - caste_id: ::std::option::Option::None, - caste_name: ::std::vec::Vec::new(), - baby_name: ::std::vec::Vec::new(), - child_name: ::std::vec::Vec::new(), - gender: ::std::option::Option::None, - body_parts: ::std::vec::Vec::new(), - total_relsize: ::std::option::Option::None, - modifiers: ::std::vec::Vec::new(), - modifier_idx: ::std::vec::Vec::new(), - part_idx: ::std::vec::Vec::new(), - layer_idx: ::std::vec::Vec::new(), - body_appearance_modifiers: ::std::vec::Vec::new(), - color_modifiers: ::std::vec::Vec::new(), - description: ::std::option::Option::None, - adult_size: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CasteRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CasteRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CasteRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CasteRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.CreatureRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CreatureRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.creature_id) - pub creature_id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.name) - pub name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.general_baby_name) - pub general_baby_name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.general_child_name) - pub general_child_name: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.creature_tile) - pub creature_tile: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.creature_soldier_tile) - pub creature_soldier_tile: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.color) - pub color: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.adultsize) - pub adultsize: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.caste) - pub caste: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.tissues) - pub tissues: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRaw.flags) - pub flags: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.CreatureRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreatureRaw { - fn default() -> &'a CreatureRaw { - ::default_instance() - } -} - -impl CreatureRaw { - pub fn new() -> CreatureRaw { - ::std::default::Default::default() - } - - // optional int32 index = 1; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // optional string creature_id = 2; - - pub fn creature_id(&self) -> &str { - match self.creature_id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_creature_id(&mut self) { - self.creature_id = ::std::option::Option::None; - } - - pub fn has_creature_id(&self) -> bool { - self.creature_id.is_some() - } - - // Param is passed by value, moved - pub fn set_creature_id(&mut self, v: ::std::string::String) { - self.creature_id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_creature_id(&mut self) -> &mut ::std::string::String { - if self.creature_id.is_none() { - self.creature_id = ::std::option::Option::Some(::std::string::String::new()); - } - self.creature_id.as_mut().unwrap() - } - - // Take field - pub fn take_creature_id(&mut self) -> ::std::string::String { - self.creature_id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 creature_tile = 6; - - pub fn creature_tile(&self) -> i32 { - self.creature_tile.unwrap_or(0) - } - - pub fn clear_creature_tile(&mut self) { - self.creature_tile = ::std::option::Option::None; - } - - pub fn has_creature_tile(&self) -> bool { - self.creature_tile.is_some() - } - - // Param is passed by value, moved - pub fn set_creature_tile(&mut self, v: i32) { - self.creature_tile = ::std::option::Option::Some(v); - } - - // optional int32 creature_soldier_tile = 7; - - pub fn creature_soldier_tile(&self) -> i32 { - self.creature_soldier_tile.unwrap_or(0) - } - - pub fn clear_creature_soldier_tile(&mut self) { - self.creature_soldier_tile = ::std::option::Option::None; - } - - pub fn has_creature_soldier_tile(&self) -> bool { - self.creature_soldier_tile.is_some() - } - - // Param is passed by value, moved - pub fn set_creature_soldier_tile(&mut self, v: i32) { - self.creature_soldier_tile = ::std::option::Option::Some(v); - } - - // optional int32 adultsize = 9; - - pub fn adultsize(&self) -> i32 { - self.adultsize.unwrap_or(0) - } - - pub fn clear_adultsize(&mut self) { - self.adultsize = ::std::option::Option::None; - } - - pub fn has_adultsize(&self) -> bool { - self.adultsize.is_some() - } - - // Param is passed by value, moved - pub fn set_adultsize(&mut self, v: i32) { - self.adultsize = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(12); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &CreatureRaw| { &m.index }, - |m: &mut CreatureRaw| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "creature_id", - |m: &CreatureRaw| { &m.creature_id }, - |m: &mut CreatureRaw| { &mut m.creature_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "name", - |m: &CreatureRaw| { &m.name }, - |m: &mut CreatureRaw| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "general_baby_name", - |m: &CreatureRaw| { &m.general_baby_name }, - |m: &mut CreatureRaw| { &mut m.general_baby_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "general_child_name", - |m: &CreatureRaw| { &m.general_child_name }, - |m: &mut CreatureRaw| { &mut m.general_child_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "creature_tile", - |m: &CreatureRaw| { &m.creature_tile }, - |m: &mut CreatureRaw| { &mut m.creature_tile }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "creature_soldier_tile", - |m: &CreatureRaw| { &m.creature_soldier_tile }, - |m: &mut CreatureRaw| { &mut m.creature_soldier_tile }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ColorDefinition>( - "color", - |m: &CreatureRaw| { &m.color }, - |m: &mut CreatureRaw| { &mut m.color }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "adultsize", - |m: &CreatureRaw| { &m.adultsize }, - |m: &mut CreatureRaw| { &mut m.adultsize }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "caste", - |m: &CreatureRaw| { &m.caste }, - |m: &mut CreatureRaw| { &mut m.caste }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tissues", - |m: &CreatureRaw| { &m.tissues }, - |m: &mut CreatureRaw| { &mut m.tissues }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "flags", - |m: &CreatureRaw| { &m.flags }, - |m: &mut CreatureRaw| { &mut m.flags }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CreatureRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CreatureRaw { - const NAME: &'static str = "CreatureRaw"; - - fn is_initialized(&self) -> bool { - for v in &self.color { - if !v.is_initialized() { - return false; - } - }; - for v in &self.caste { - if !v.is_initialized() { - return false; - } - }; - for v in &self.tissues { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.creature_id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.name.push(is.read_string()?); - }, - 34 => { - self.general_baby_name.push(is.read_string()?); - }, - 42 => { - self.general_child_name.push(is.read_string()?); - }, - 48 => { - self.creature_tile = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.creature_soldier_tile = ::std::option::Option::Some(is.read_int32()?); - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.color)?; - }, - 72 => { - self.adultsize = ::std::option::Option::Some(is.read_int32()?); - }, - 82 => { - self.caste.push(is.read_message()?); - }, - 90 => { - self.tissues.push(is.read_message()?); - }, - 98 => { - is.read_repeated_packed_bool_into(&mut self.flags)?; - }, - 96 => { - self.flags.push(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.creature_id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - for value in &self.name { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.general_baby_name { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.general_child_name { - my_size += ::protobuf::rt::string_size(5, &value); - }; - if let Some(v) = self.creature_tile { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.creature_soldier_tile { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.color.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.adultsize { - my_size += ::protobuf::rt::int32_size(9, v); - } - for value in &self.caste { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.tissues { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += 2 * self.flags.len() as u64; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.index { - os.write_int32(1, v)?; - } - if let Some(v) = self.creature_id.as_ref() { - os.write_string(2, v)?; - } - for v in &self.name { - os.write_string(3, &v)?; - }; - for v in &self.general_baby_name { - os.write_string(4, &v)?; - }; - for v in &self.general_child_name { - os.write_string(5, &v)?; - }; - if let Some(v) = self.creature_tile { - os.write_int32(6, v)?; - } - if let Some(v) = self.creature_soldier_tile { - os.write_int32(7, v)?; - } - if let Some(v) = self.color.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - if let Some(v) = self.adultsize { - os.write_int32(9, v)?; - } - for v in &self.caste { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - }; - for v in &self.tissues { - ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; - }; - for v in &self.flags { - os.write_bool(12, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreatureRaw { - CreatureRaw::new() - } - - fn clear(&mut self) { - self.index = ::std::option::Option::None; - self.creature_id = ::std::option::Option::None; - self.name.clear(); - self.general_baby_name.clear(); - self.general_child_name.clear(); - self.creature_tile = ::std::option::Option::None; - self.creature_soldier_tile = ::std::option::Option::None; - self.color.clear(); - self.adultsize = ::std::option::Option::None; - self.caste.clear(); - self.tissues.clear(); - self.flags.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreatureRaw { - static instance: CreatureRaw = CreatureRaw { - index: ::std::option::Option::None, - creature_id: ::std::option::Option::None, - name: ::std::vec::Vec::new(), - general_baby_name: ::std::vec::Vec::new(), - general_child_name: ::std::vec::Vec::new(), - creature_tile: ::std::option::Option::None, - creature_soldier_tile: ::std::option::Option::None, - color: ::protobuf::MessageField::none(), - adultsize: ::std::option::Option::None, - caste: ::std::vec::Vec::new(), - tissues: ::std::vec::Vec::new(), - flags: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CreatureRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CreatureRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CreatureRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreatureRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.CreatureRawList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CreatureRawList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.CreatureRawList.creature_raws) - pub creature_raws: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.CreatureRawList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreatureRawList { - fn default() -> &'a CreatureRawList { - ::default_instance() - } -} - -impl CreatureRawList { - pub fn new() -> CreatureRawList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "creature_raws", - |m: &CreatureRawList| { &m.creature_raws }, - |m: &mut CreatureRawList| { &mut m.creature_raws }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CreatureRawList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CreatureRawList { - const NAME: &'static str = "CreatureRawList"; - - fn is_initialized(&self) -> bool { - for v in &self.creature_raws { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.creature_raws.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.creature_raws { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.creature_raws { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreatureRawList { - CreatureRawList::new() - } - - fn clear(&mut self) { - self.creature_raws.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreatureRawList { - static instance: CreatureRawList = CreatureRawList { - creature_raws: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CreatureRawList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CreatureRawList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CreatureRawList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreatureRawList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Army) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Army { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Army.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Army.pos_x) - pub pos_x: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Army.pos_y) - pub pos_y: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Army.pos_z) - pub pos_z: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Army.leader) - pub leader: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Army.members) - pub members: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.Army.flags) - pub flags: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Army.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Army { - fn default() -> &'a Army { - ::default_instance() - } -} - -impl Army { - pub fn new() -> Army { - ::std::default::Default::default() - } - - // optional int32 id = 1; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // optional int32 pos_x = 2; - - pub fn pos_x(&self) -> i32 { - self.pos_x.unwrap_or(0) - } - - pub fn clear_pos_x(&mut self) { - self.pos_x = ::std::option::Option::None; - } - - pub fn has_pos_x(&self) -> bool { - self.pos_x.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_x(&mut self, v: i32) { - self.pos_x = ::std::option::Option::Some(v); - } - - // optional int32 pos_y = 3; - - pub fn pos_y(&self) -> i32 { - self.pos_y.unwrap_or(0) - } - - pub fn clear_pos_y(&mut self) { - self.pos_y = ::std::option::Option::None; - } - - pub fn has_pos_y(&self) -> bool { - self.pos_y.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_y(&mut self, v: i32) { - self.pos_y = ::std::option::Option::Some(v); - } - - // optional int32 pos_z = 4; - - pub fn pos_z(&self) -> i32 { - self.pos_z.unwrap_or(0) - } - - pub fn clear_pos_z(&mut self) { - self.pos_z = ::std::option::Option::None; - } - - pub fn has_pos_z(&self) -> bool { - self.pos_z.is_some() - } - - // Param is passed by value, moved - pub fn set_pos_z(&mut self, v: i32) { - self.pos_z = ::std::option::Option::Some(v); - } - - // optional uint32 flags = 7; - - pub fn flags(&self) -> u32 { - self.flags.unwrap_or(0) - } - - pub fn clear_flags(&mut self) { - self.flags = ::std::option::Option::None; - } - - pub fn has_flags(&self) -> bool { - self.flags.is_some() - } - - // Param is passed by value, moved - pub fn set_flags(&mut self, v: u32) { - self.flags = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(7); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &Army| { &m.id }, - |m: &mut Army| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_x", - |m: &Army| { &m.pos_x }, - |m: &mut Army| { &mut m.pos_x }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_y", - |m: &Army| { &m.pos_y }, - |m: &mut Army| { &mut m.pos_y }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "pos_z", - |m: &Army| { &m.pos_z }, - |m: &mut Army| { &mut m.pos_z }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, UnitDefinition>( - "leader", - |m: &Army| { &m.leader }, - |m: &mut Army| { &mut m.leader }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "members", - |m: &Army| { &m.members }, - |m: &mut Army| { &mut m.members }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "flags", - |m: &Army| { &m.flags }, - |m: &mut Army| { &mut m.flags }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Army", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Army { - const NAME: &'static str = "Army"; - - fn is_initialized(&self) -> bool { - for v in &self.leader { - if !v.is_initialized() { - return false; - } - }; - for v in &self.members { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.pos_x = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.pos_y = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.pos_z = ::std::option::Option::Some(is.read_int32()?); - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.leader)?; - }, - 50 => { - self.members.push(is.read_message()?); - }, - 56 => { - self.flags = ::std::option::Option::Some(is.read_uint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.pos_x { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.pos_y { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.pos_z { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.leader.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.members { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.flags { - my_size += ::protobuf::rt::uint32_size(7, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id { - os.write_int32(1, v)?; - } - if let Some(v) = self.pos_x { - os.write_int32(2, v)?; - } - if let Some(v) = self.pos_y { - os.write_int32(3, v)?; - } - if let Some(v) = self.pos_z { - os.write_int32(4, v)?; - } - if let Some(v) = self.leader.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - for v in &self.members { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }; - if let Some(v) = self.flags { - os.write_uint32(7, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Army { - Army::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.pos_x = ::std::option::Option::None; - self.pos_y = ::std::option::Option::None; - self.pos_z = ::std::option::Option::None; - self.leader.clear(); - self.members.clear(); - self.flags = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Army { - static instance: Army = Army { - id: ::std::option::Option::None, - pos_x: ::std::option::Option::None, - pos_y: ::std::option::Option::None, - pos_z: ::std::option::Option::None, - leader: ::protobuf::MessageField::none(), - members: ::std::vec::Vec::new(), - flags: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Army { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Army").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Army { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Army { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ArmyList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ArmyList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ArmyList.armies) - pub armies: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ArmyList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ArmyList { - fn default() -> &'a ArmyList { - ::default_instance() - } -} - -impl ArmyList { - pub fn new() -> ArmyList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "armies", - |m: &ArmyList| { &m.armies }, - |m: &mut ArmyList| { &mut m.armies }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ArmyList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ArmyList { - const NAME: &'static str = "ArmyList"; - - fn is_initialized(&self) -> bool { - for v in &self.armies { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.armies.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.armies { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.armies { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ArmyList { - ArmyList::new() - } - - fn clear(&mut self) { - self.armies.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ArmyList { - static instance: ArmyList = ArmyList { - armies: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ArmyList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ArmyList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ArmyList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ArmyList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.GrowthPrint) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct GrowthPrint { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.GrowthPrint.priority) - pub priority: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.GrowthPrint.color) - pub color: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.GrowthPrint.timing_start) - pub timing_start: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.GrowthPrint.timing_end) - pub timing_end: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.GrowthPrint.tile) - pub tile: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.GrowthPrint.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GrowthPrint { - fn default() -> &'a GrowthPrint { - ::default_instance() - } -} - -impl GrowthPrint { - pub fn new() -> GrowthPrint { - ::std::default::Default::default() - } - - // optional int32 priority = 1; - - pub fn priority(&self) -> i32 { - self.priority.unwrap_or(0) - } - - pub fn clear_priority(&mut self) { - self.priority = ::std::option::Option::None; - } - - pub fn has_priority(&self) -> bool { - self.priority.is_some() - } - - // Param is passed by value, moved - pub fn set_priority(&mut self, v: i32) { - self.priority = ::std::option::Option::Some(v); - } - - // optional int32 color = 2; - - pub fn color(&self) -> i32 { - self.color.unwrap_or(0) - } - - pub fn clear_color(&mut self) { - self.color = ::std::option::Option::None; - } - - pub fn has_color(&self) -> bool { - self.color.is_some() - } - - // Param is passed by value, moved - pub fn set_color(&mut self, v: i32) { - self.color = ::std::option::Option::Some(v); - } - - // optional int32 timing_start = 3; - - pub fn timing_start(&self) -> i32 { - self.timing_start.unwrap_or(0) - } - - pub fn clear_timing_start(&mut self) { - self.timing_start = ::std::option::Option::None; - } - - pub fn has_timing_start(&self) -> bool { - self.timing_start.is_some() - } - - // Param is passed by value, moved - pub fn set_timing_start(&mut self, v: i32) { - self.timing_start = ::std::option::Option::Some(v); - } - - // optional int32 timing_end = 4; - - pub fn timing_end(&self) -> i32 { - self.timing_end.unwrap_or(0) - } - - pub fn clear_timing_end(&mut self) { - self.timing_end = ::std::option::Option::None; - } - - pub fn has_timing_end(&self) -> bool { - self.timing_end.is_some() - } - - // Param is passed by value, moved - pub fn set_timing_end(&mut self, v: i32) { - self.timing_end = ::std::option::Option::Some(v); - } - - // optional int32 tile = 5; - - pub fn tile(&self) -> i32 { - self.tile.unwrap_or(0) - } - - pub fn clear_tile(&mut self) { - self.tile = ::std::option::Option::None; - } - - pub fn has_tile(&self) -> bool { - self.tile.is_some() - } - - // Param is passed by value, moved - pub fn set_tile(&mut self, v: i32) { - self.tile = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "priority", - |m: &GrowthPrint| { &m.priority }, - |m: &mut GrowthPrint| { &mut m.priority }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "color", - |m: &GrowthPrint| { &m.color }, - |m: &mut GrowthPrint| { &mut m.color }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "timing_start", - |m: &GrowthPrint| { &m.timing_start }, - |m: &mut GrowthPrint| { &mut m.timing_start }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "timing_end", - |m: &GrowthPrint| { &m.timing_end }, - |m: &mut GrowthPrint| { &mut m.timing_end }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "tile", - |m: &GrowthPrint| { &m.tile }, - |m: &mut GrowthPrint| { &mut m.tile }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "GrowthPrint", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for GrowthPrint { - const NAME: &'static str = "GrowthPrint"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.priority = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.color = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.timing_start = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.timing_end = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.tile = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.priority { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.color { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.timing_start { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.timing_end { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.tile { - my_size += ::protobuf::rt::int32_size(5, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.priority { - os.write_int32(1, v)?; - } - if let Some(v) = self.color { - os.write_int32(2, v)?; - } - if let Some(v) = self.timing_start { - os.write_int32(3, v)?; - } - if let Some(v) = self.timing_end { - os.write_int32(4, v)?; - } - if let Some(v) = self.tile { - os.write_int32(5, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GrowthPrint { - GrowthPrint::new() - } - - fn clear(&mut self) { - self.priority = ::std::option::Option::None; - self.color = ::std::option::Option::None; - self.timing_start = ::std::option::Option::None; - self.timing_end = ::std::option::Option::None; - self.tile = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GrowthPrint { - static instance: GrowthPrint = GrowthPrint { - priority: ::std::option::Option::None, - color: ::std::option::Option::None, - timing_start: ::std::option::Option::None, - timing_end: ::std::option::Option::None, - tile: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for GrowthPrint { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("GrowthPrint").unwrap()).clone() - } -} - -impl ::std::fmt::Display for GrowthPrint { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for GrowthPrint { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.TreeGrowth) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TreeGrowth { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.mat) - pub mat: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.prints) - pub prints: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.timing_start) - pub timing_start: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.timing_end) - pub timing_end: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.twigs) - pub twigs: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.light_branches) - pub light_branches: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.heavy_branches) - pub heavy_branches: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.trunk) - pub trunk: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.roots) - pub roots: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.cap) - pub cap: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.sapling) - pub sapling: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.trunk_height_start) - pub trunk_height_start: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.TreeGrowth.trunk_height_end) - pub trunk_height_end: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.TreeGrowth.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TreeGrowth { - fn default() -> &'a TreeGrowth { - ::default_instance() - } -} - -impl TreeGrowth { - pub fn new() -> TreeGrowth { - ::std::default::Default::default() - } - - // optional int32 index = 1; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // optional string id = 2; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name = 3; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 timing_start = 6; - - pub fn timing_start(&self) -> i32 { - self.timing_start.unwrap_or(0) - } - - pub fn clear_timing_start(&mut self) { - self.timing_start = ::std::option::Option::None; - } - - pub fn has_timing_start(&self) -> bool { - self.timing_start.is_some() - } - - // Param is passed by value, moved - pub fn set_timing_start(&mut self, v: i32) { - self.timing_start = ::std::option::Option::Some(v); - } - - // optional int32 timing_end = 7; - - pub fn timing_end(&self) -> i32 { - self.timing_end.unwrap_or(0) - } - - pub fn clear_timing_end(&mut self) { - self.timing_end = ::std::option::Option::None; - } - - pub fn has_timing_end(&self) -> bool { - self.timing_end.is_some() - } - - // Param is passed by value, moved - pub fn set_timing_end(&mut self, v: i32) { - self.timing_end = ::std::option::Option::Some(v); - } - - // optional bool twigs = 8; - - pub fn twigs(&self) -> bool { - self.twigs.unwrap_or(false) - } - - pub fn clear_twigs(&mut self) { - self.twigs = ::std::option::Option::None; - } - - pub fn has_twigs(&self) -> bool { - self.twigs.is_some() - } - - // Param is passed by value, moved - pub fn set_twigs(&mut self, v: bool) { - self.twigs = ::std::option::Option::Some(v); - } - - // optional bool light_branches = 9; - - pub fn light_branches(&self) -> bool { - self.light_branches.unwrap_or(false) - } - - pub fn clear_light_branches(&mut self) { - self.light_branches = ::std::option::Option::None; - } - - pub fn has_light_branches(&self) -> bool { - self.light_branches.is_some() - } - - // Param is passed by value, moved - pub fn set_light_branches(&mut self, v: bool) { - self.light_branches = ::std::option::Option::Some(v); - } - - // optional bool heavy_branches = 10; - - pub fn heavy_branches(&self) -> bool { - self.heavy_branches.unwrap_or(false) - } - - pub fn clear_heavy_branches(&mut self) { - self.heavy_branches = ::std::option::Option::None; - } - - pub fn has_heavy_branches(&self) -> bool { - self.heavy_branches.is_some() - } - - // Param is passed by value, moved - pub fn set_heavy_branches(&mut self, v: bool) { - self.heavy_branches = ::std::option::Option::Some(v); - } - - // optional bool trunk = 11; - - pub fn trunk(&self) -> bool { - self.trunk.unwrap_or(false) - } - - pub fn clear_trunk(&mut self) { - self.trunk = ::std::option::Option::None; - } - - pub fn has_trunk(&self) -> bool { - self.trunk.is_some() - } - - // Param is passed by value, moved - pub fn set_trunk(&mut self, v: bool) { - self.trunk = ::std::option::Option::Some(v); - } - - // optional bool roots = 12; - - pub fn roots(&self) -> bool { - self.roots.unwrap_or(false) - } - - pub fn clear_roots(&mut self) { - self.roots = ::std::option::Option::None; - } - - pub fn has_roots(&self) -> bool { - self.roots.is_some() - } - - // Param is passed by value, moved - pub fn set_roots(&mut self, v: bool) { - self.roots = ::std::option::Option::Some(v); - } - - // optional bool cap = 13; - - pub fn cap(&self) -> bool { - self.cap.unwrap_or(false) - } - - pub fn clear_cap(&mut self) { - self.cap = ::std::option::Option::None; - } - - pub fn has_cap(&self) -> bool { - self.cap.is_some() - } - - // Param is passed by value, moved - pub fn set_cap(&mut self, v: bool) { - self.cap = ::std::option::Option::Some(v); - } - - // optional bool sapling = 14; - - pub fn sapling(&self) -> bool { - self.sapling.unwrap_or(false) - } - - pub fn clear_sapling(&mut self) { - self.sapling = ::std::option::Option::None; - } - - pub fn has_sapling(&self) -> bool { - self.sapling.is_some() - } - - // Param is passed by value, moved - pub fn set_sapling(&mut self, v: bool) { - self.sapling = ::std::option::Option::Some(v); - } - - // optional int32 trunk_height_start = 15; - - pub fn trunk_height_start(&self) -> i32 { - self.trunk_height_start.unwrap_or(0) - } - - pub fn clear_trunk_height_start(&mut self) { - self.trunk_height_start = ::std::option::Option::None; - } - - pub fn has_trunk_height_start(&self) -> bool { - self.trunk_height_start.is_some() - } - - // Param is passed by value, moved - pub fn set_trunk_height_start(&mut self, v: i32) { - self.trunk_height_start = ::std::option::Option::Some(v); - } - - // optional int32 trunk_height_end = 16; - - pub fn trunk_height_end(&self) -> i32 { - self.trunk_height_end.unwrap_or(0) - } - - pub fn clear_trunk_height_end(&mut self) { - self.trunk_height_end = ::std::option::Option::None; - } - - pub fn has_trunk_height_end(&self) -> bool { - self.trunk_height_end.is_some() - } - - // Param is passed by value, moved - pub fn set_trunk_height_end(&mut self, v: i32) { - self.trunk_height_end = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(16); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &TreeGrowth| { &m.index }, - |m: &mut TreeGrowth| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &TreeGrowth| { &m.id }, - |m: &mut TreeGrowth| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &TreeGrowth| { &m.name }, - |m: &mut TreeGrowth| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "mat", - |m: &TreeGrowth| { &m.mat }, - |m: &mut TreeGrowth| { &mut m.mat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "prints", - |m: &TreeGrowth| { &m.prints }, - |m: &mut TreeGrowth| { &mut m.prints }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "timing_start", - |m: &TreeGrowth| { &m.timing_start }, - |m: &mut TreeGrowth| { &mut m.timing_start }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "timing_end", - |m: &TreeGrowth| { &m.timing_end }, - |m: &mut TreeGrowth| { &mut m.timing_end }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "twigs", - |m: &TreeGrowth| { &m.twigs }, - |m: &mut TreeGrowth| { &mut m.twigs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "light_branches", - |m: &TreeGrowth| { &m.light_branches }, - |m: &mut TreeGrowth| { &mut m.light_branches }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "heavy_branches", - |m: &TreeGrowth| { &m.heavy_branches }, - |m: &mut TreeGrowth| { &mut m.heavy_branches }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "trunk", - |m: &TreeGrowth| { &m.trunk }, - |m: &mut TreeGrowth| { &mut m.trunk }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "roots", - |m: &TreeGrowth| { &m.roots }, - |m: &mut TreeGrowth| { &mut m.roots }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "cap", - |m: &TreeGrowth| { &m.cap }, - |m: &mut TreeGrowth| { &mut m.cap }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sapling", - |m: &TreeGrowth| { &m.sapling }, - |m: &mut TreeGrowth| { &mut m.sapling }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "trunk_height_start", - |m: &TreeGrowth| { &m.trunk_height_start }, - |m: &mut TreeGrowth| { &mut m.trunk_height_start }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "trunk_height_end", - |m: &TreeGrowth| { &m.trunk_height_end }, - |m: &mut TreeGrowth| { &mut m.trunk_height_end }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TreeGrowth", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TreeGrowth { - const NAME: &'static str = "TreeGrowth"; - - fn is_initialized(&self) -> bool { - for v in &self.mat { - if !v.is_initialized() { - return false; - } - }; - for v in &self.prints { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.mat)?; - }, - 42 => { - self.prints.push(is.read_message()?); - }, - 48 => { - self.timing_start = ::std::option::Option::Some(is.read_int32()?); - }, - 56 => { - self.timing_end = ::std::option::Option::Some(is.read_int32()?); - }, - 64 => { - self.twigs = ::std::option::Option::Some(is.read_bool()?); - }, - 72 => { - self.light_branches = ::std::option::Option::Some(is.read_bool()?); - }, - 80 => { - self.heavy_branches = ::std::option::Option::Some(is.read_bool()?); - }, - 88 => { - self.trunk = ::std::option::Option::Some(is.read_bool()?); - }, - 96 => { - self.roots = ::std::option::Option::Some(is.read_bool()?); - }, - 104 => { - self.cap = ::std::option::Option::Some(is.read_bool()?); - }, - 112 => { - self.sapling = ::std::option::Option::Some(is.read_bool()?); - }, - 120 => { - self.trunk_height_start = ::std::option::Option::Some(is.read_int32()?); - }, - 128 => { - self.trunk_height_end = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.mat.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.prints { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.timing_start { - my_size += ::protobuf::rt::int32_size(6, v); - } - if let Some(v) = self.timing_end { - my_size += ::protobuf::rt::int32_size(7, v); - } - if let Some(v) = self.twigs { - my_size += 1 + 1; - } - if let Some(v) = self.light_branches { - my_size += 1 + 1; - } - if let Some(v) = self.heavy_branches { - my_size += 1 + 1; - } - if let Some(v) = self.trunk { - my_size += 1 + 1; - } - if let Some(v) = self.roots { - my_size += 1 + 1; - } - if let Some(v) = self.cap { - my_size += 1 + 1; - } - if let Some(v) = self.sapling { - my_size += 1 + 1; - } - if let Some(v) = self.trunk_height_start { - my_size += ::protobuf::rt::int32_size(15, v); - } - if let Some(v) = self.trunk_height_end { - my_size += ::protobuf::rt::int32_size(16, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.index { - os.write_int32(1, v)?; - } - if let Some(v) = self.id.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.mat.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - for v in &self.prints { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - if let Some(v) = self.timing_start { - os.write_int32(6, v)?; - } - if let Some(v) = self.timing_end { - os.write_int32(7, v)?; - } - if let Some(v) = self.twigs { - os.write_bool(8, v)?; - } - if let Some(v) = self.light_branches { - os.write_bool(9, v)?; - } - if let Some(v) = self.heavy_branches { - os.write_bool(10, v)?; - } - if let Some(v) = self.trunk { - os.write_bool(11, v)?; - } - if let Some(v) = self.roots { - os.write_bool(12, v)?; - } - if let Some(v) = self.cap { - os.write_bool(13, v)?; - } - if let Some(v) = self.sapling { - os.write_bool(14, v)?; - } - if let Some(v) = self.trunk_height_start { - os.write_int32(15, v)?; - } - if let Some(v) = self.trunk_height_end { - os.write_int32(16, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TreeGrowth { - TreeGrowth::new() - } - - fn clear(&mut self) { - self.index = ::std::option::Option::None; - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.mat.clear(); - self.prints.clear(); - self.timing_start = ::std::option::Option::None; - self.timing_end = ::std::option::Option::None; - self.twigs = ::std::option::Option::None; - self.light_branches = ::std::option::Option::None; - self.heavy_branches = ::std::option::Option::None; - self.trunk = ::std::option::Option::None; - self.roots = ::std::option::Option::None; - self.cap = ::std::option::Option::None; - self.sapling = ::std::option::Option::None; - self.trunk_height_start = ::std::option::Option::None; - self.trunk_height_end = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TreeGrowth { - static instance: TreeGrowth = TreeGrowth { - index: ::std::option::Option::None, - id: ::std::option::Option::None, - name: ::std::option::Option::None, - mat: ::protobuf::MessageField::none(), - prints: ::std::vec::Vec::new(), - timing_start: ::std::option::Option::None, - timing_end: ::std::option::Option::None, - twigs: ::std::option::Option::None, - light_branches: ::std::option::Option::None, - heavy_branches: ::std::option::Option::None, - trunk: ::std::option::Option::None, - roots: ::std::option::Option::None, - cap: ::std::option::Option::None, - sapling: ::std::option::Option::None, - trunk_height_start: ::std::option::Option::None, - trunk_height_end: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TreeGrowth { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TreeGrowth").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TreeGrowth { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TreeGrowth { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PlantRaw) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PlantRaw { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PlantRaw.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantRaw.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantRaw.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantRaw.growths) - pub growths: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.PlantRaw.tile) - pub tile: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PlantRaw.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PlantRaw { - fn default() -> &'a PlantRaw { - ::default_instance() - } -} - -impl PlantRaw { - pub fn new() -> PlantRaw { - ::std::default::Default::default() - } - - // optional int32 index = 1; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // optional string id = 2; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string name = 3; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 tile = 5; - - pub fn tile(&self) -> i32 { - self.tile.unwrap_or(0) - } - - pub fn clear_tile(&mut self) { - self.tile = ::std::option::Option::None; - } - - pub fn has_tile(&self) -> bool { - self.tile.is_some() - } - - // Param is passed by value, moved - pub fn set_tile(&mut self, v: i32) { - self.tile = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &PlantRaw| { &m.index }, - |m: &mut PlantRaw| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &PlantRaw| { &m.id }, - |m: &mut PlantRaw| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &PlantRaw| { &m.name }, - |m: &mut PlantRaw| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "growths", - |m: &PlantRaw| { &m.growths }, - |m: &mut PlantRaw| { &mut m.growths }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "tile", - |m: &PlantRaw| { &m.tile }, - |m: &mut PlantRaw| { &mut m.tile }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PlantRaw", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PlantRaw { - const NAME: &'static str = "PlantRaw"; - - fn is_initialized(&self) -> bool { - for v in &self.growths { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.growths.push(is.read_message()?); - }, - 40 => { - self.tile = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - for value in &self.growths { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.tile { - my_size += ::protobuf::rt::int32_size(5, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.index { - os.write_int32(1, v)?; - } - if let Some(v) = self.id.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(3, v)?; - } - for v in &self.growths { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }; - if let Some(v) = self.tile { - os.write_int32(5, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PlantRaw { - PlantRaw::new() - } - - fn clear(&mut self) { - self.index = ::std::option::Option::None; - self.id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.growths.clear(); - self.tile = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PlantRaw { - static instance: PlantRaw = PlantRaw { - index: ::std::option::Option::None, - id: ::std::option::Option::None, - name: ::std::option::Option::None, - growths: ::std::vec::Vec::new(), - tile: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PlantRaw { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PlantRaw").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PlantRaw { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PlantRaw { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.PlantRawList) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PlantRawList { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.PlantRawList.plant_raws) - pub plant_raws: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.PlantRawList.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PlantRawList { - fn default() -> &'a PlantRawList { - ::default_instance() - } -} - -impl PlantRawList { - pub fn new() -> PlantRawList { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "plant_raws", - |m: &PlantRawList| { &m.plant_raws }, - |m: &mut PlantRawList| { &mut m.plant_raws }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PlantRawList", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PlantRawList { - const NAME: &'static str = "PlantRawList"; - - fn is_initialized(&self) -> bool { - for v in &self.plant_raws { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.plant_raws.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.plant_raws { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.plant_raws { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PlantRawList { - PlantRawList::new() - } - - fn clear(&mut self) { - self.plant_raws.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PlantRawList { - static instance: PlantRawList = PlantRawList { - plant_raws: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PlantRawList { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PlantRawList").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PlantRawList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PlantRawList { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ScreenTile) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ScreenTile { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ScreenTile.character) - pub character: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ScreenTile.foreground) - pub foreground: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ScreenTile.background) - pub background: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ScreenTile.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ScreenTile { - fn default() -> &'a ScreenTile { - ::default_instance() - } -} - -impl ScreenTile { - pub fn new() -> ScreenTile { - ::std::default::Default::default() - } - - // optional uint32 character = 1; - - pub fn character(&self) -> u32 { - self.character.unwrap_or(0) - } - - pub fn clear_character(&mut self) { - self.character = ::std::option::Option::None; - } - - pub fn has_character(&self) -> bool { - self.character.is_some() - } - - // Param is passed by value, moved - pub fn set_character(&mut self, v: u32) { - self.character = ::std::option::Option::Some(v); - } - - // optional uint32 foreground = 2; - - pub fn foreground(&self) -> u32 { - self.foreground.unwrap_or(0) - } - - pub fn clear_foreground(&mut self) { - self.foreground = ::std::option::Option::None; - } - - pub fn has_foreground(&self) -> bool { - self.foreground.is_some() - } - - // Param is passed by value, moved - pub fn set_foreground(&mut self, v: u32) { - self.foreground = ::std::option::Option::Some(v); - } - - // optional uint32 background = 3; - - pub fn background(&self) -> u32 { - self.background.unwrap_or(0) - } - - pub fn clear_background(&mut self) { - self.background = ::std::option::Option::None; - } - - pub fn has_background(&self) -> bool { - self.background.is_some() - } - - // Param is passed by value, moved - pub fn set_background(&mut self, v: u32) { - self.background = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "character", - |m: &ScreenTile| { &m.character }, - |m: &mut ScreenTile| { &mut m.character }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "foreground", - |m: &ScreenTile| { &m.foreground }, - |m: &mut ScreenTile| { &mut m.foreground }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "background", - |m: &ScreenTile| { &m.background }, - |m: &mut ScreenTile| { &mut m.background }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ScreenTile", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ScreenTile { - const NAME: &'static str = "ScreenTile"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.character = ::std::option::Option::Some(is.read_uint32()?); - }, - 16 => { - self.foreground = ::std::option::Option::Some(is.read_uint32()?); - }, - 24 => { - self.background = ::std::option::Option::Some(is.read_uint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.character { - my_size += ::protobuf::rt::uint32_size(1, v); - } - if let Some(v) = self.foreground { - my_size += ::protobuf::rt::uint32_size(2, v); - } - if let Some(v) = self.background { - my_size += ::protobuf::rt::uint32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.character { - os.write_uint32(1, v)?; - } - if let Some(v) = self.foreground { - os.write_uint32(2, v)?; - } - if let Some(v) = self.background { - os.write_uint32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ScreenTile { - ScreenTile::new() - } - - fn clear(&mut self) { - self.character = ::std::option::Option::None; - self.foreground = ::std::option::Option::None; - self.background = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ScreenTile { - static instance: ScreenTile = ScreenTile { - character: ::std::option::Option::None, - foreground: ::std::option::Option::None, - background: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ScreenTile { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ScreenTile").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ScreenTile { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ScreenTile { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ScreenCapture) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ScreenCapture { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ScreenCapture.width) - pub width: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ScreenCapture.height) - pub height: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ScreenCapture.tiles) - pub tiles: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ScreenCapture.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ScreenCapture { - fn default() -> &'a ScreenCapture { - ::default_instance() - } -} - -impl ScreenCapture { - pub fn new() -> ScreenCapture { - ::std::default::Default::default() - } - - // optional uint32 width = 1; - - pub fn width(&self) -> u32 { - self.width.unwrap_or(0) - } - - pub fn clear_width(&mut self) { - self.width = ::std::option::Option::None; - } - - pub fn has_width(&self) -> bool { - self.width.is_some() - } - - // Param is passed by value, moved - pub fn set_width(&mut self, v: u32) { - self.width = ::std::option::Option::Some(v); - } - - // optional uint32 height = 2; - - pub fn height(&self) -> u32 { - self.height.unwrap_or(0) - } - - pub fn clear_height(&mut self) { - self.height = ::std::option::Option::None; - } - - pub fn has_height(&self) -> bool { - self.height.is_some() - } - - // Param is passed by value, moved - pub fn set_height(&mut self, v: u32) { - self.height = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "width", - |m: &ScreenCapture| { &m.width }, - |m: &mut ScreenCapture| { &mut m.width }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "height", - |m: &ScreenCapture| { &m.height }, - |m: &mut ScreenCapture| { &mut m.height }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tiles", - |m: &ScreenCapture| { &m.tiles }, - |m: &mut ScreenCapture| { &mut m.tiles }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ScreenCapture", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ScreenCapture { - const NAME: &'static str = "ScreenCapture"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.width = ::std::option::Option::Some(is.read_uint32()?); - }, - 16 => { - self.height = ::std::option::Option::Some(is.read_uint32()?); - }, - 26 => { - self.tiles.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.width { - my_size += ::protobuf::rt::uint32_size(1, v); - } - if let Some(v) = self.height { - my_size += ::protobuf::rt::uint32_size(2, v); - } - for value in &self.tiles { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.width { - os.write_uint32(1, v)?; - } - if let Some(v) = self.height { - os.write_uint32(2, v)?; - } - for v in &self.tiles { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ScreenCapture { - ScreenCapture::new() - } - - fn clear(&mut self) { - self.width = ::std::option::Option::None; - self.height = ::std::option::Option::None; - self.tiles.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ScreenCapture { - static instance: ScreenCapture = ScreenCapture { - width: ::std::option::Option::None, - height: ::std::option::Option::None, - tiles: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ScreenCapture { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ScreenCapture").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ScreenCapture { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ScreenCapture { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.KeyboardEvent) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct KeyboardEvent { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.type) - pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.which) - pub which: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.state) - pub state: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.scancode) - pub scancode: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.sym) - pub sym: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.mod) - pub mod_: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.KeyboardEvent.unicode) - pub unicode: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.KeyboardEvent.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyboardEvent { - fn default() -> &'a KeyboardEvent { - ::default_instance() - } -} - -impl KeyboardEvent { - pub fn new() -> KeyboardEvent { - ::std::default::Default::default() - } - - // optional uint32 type = 1; - - pub fn type_(&self) -> u32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: u32) { - self.type_ = ::std::option::Option::Some(v); - } - - // optional uint32 which = 2; - - pub fn which(&self) -> u32 { - self.which.unwrap_or(0) - } - - pub fn clear_which(&mut self) { - self.which = ::std::option::Option::None; - } - - pub fn has_which(&self) -> bool { - self.which.is_some() - } - - // Param is passed by value, moved - pub fn set_which(&mut self, v: u32) { - self.which = ::std::option::Option::Some(v); - } - - // optional uint32 state = 3; - - pub fn state(&self) -> u32 { - self.state.unwrap_or(0) - } - - pub fn clear_state(&mut self) { - self.state = ::std::option::Option::None; - } - - pub fn has_state(&self) -> bool { - self.state.is_some() - } - - // Param is passed by value, moved - pub fn set_state(&mut self, v: u32) { - self.state = ::std::option::Option::Some(v); - } - - // optional uint32 scancode = 4; - - pub fn scancode(&self) -> u32 { - self.scancode.unwrap_or(0) - } - - pub fn clear_scancode(&mut self) { - self.scancode = ::std::option::Option::None; - } - - pub fn has_scancode(&self) -> bool { - self.scancode.is_some() - } - - // Param is passed by value, moved - pub fn set_scancode(&mut self, v: u32) { - self.scancode = ::std::option::Option::Some(v); - } - - // optional uint32 sym = 5; - - pub fn sym(&self) -> u32 { - self.sym.unwrap_or(0) - } - - pub fn clear_sym(&mut self) { - self.sym = ::std::option::Option::None; - } - - pub fn has_sym(&self) -> bool { - self.sym.is_some() - } - - // Param is passed by value, moved - pub fn set_sym(&mut self, v: u32) { - self.sym = ::std::option::Option::Some(v); - } - - // optional uint32 mod = 6; - - pub fn mod_(&self) -> u32 { - self.mod_.unwrap_or(0) - } - - pub fn clear_mod_(&mut self) { - self.mod_ = ::std::option::Option::None; - } - - pub fn has_mod(&self) -> bool { - self.mod_.is_some() - } - - // Param is passed by value, moved - pub fn set_mod(&mut self, v: u32) { - self.mod_ = ::std::option::Option::Some(v); - } - - // optional uint32 unicode = 7; - - pub fn unicode(&self) -> u32 { - self.unicode.unwrap_or(0) - } - - pub fn clear_unicode(&mut self) { - self.unicode = ::std::option::Option::None; - } - - pub fn has_unicode(&self) -> bool { - self.unicode.is_some() - } - - // Param is passed by value, moved - pub fn set_unicode(&mut self, v: u32) { - self.unicode = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(7); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &KeyboardEvent| { &m.type_ }, - |m: &mut KeyboardEvent| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "which", - |m: &KeyboardEvent| { &m.which }, - |m: &mut KeyboardEvent| { &mut m.which }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "state", - |m: &KeyboardEvent| { &m.state }, - |m: &mut KeyboardEvent| { &mut m.state }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "scancode", - |m: &KeyboardEvent| { &m.scancode }, - |m: &mut KeyboardEvent| { &mut m.scancode }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "sym", - |m: &KeyboardEvent| { &m.sym }, - |m: &mut KeyboardEvent| { &mut m.sym }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "mod", - |m: &KeyboardEvent| { &m.mod_ }, - |m: &mut KeyboardEvent| { &mut m.mod_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unicode", - |m: &KeyboardEvent| { &m.unicode }, - |m: &mut KeyboardEvent| { &mut m.unicode }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "KeyboardEvent", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for KeyboardEvent { - const NAME: &'static str = "KeyboardEvent"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = ::std::option::Option::Some(is.read_uint32()?); - }, - 16 => { - self.which = ::std::option::Option::Some(is.read_uint32()?); - }, - 24 => { - self.state = ::std::option::Option::Some(is.read_uint32()?); - }, - 32 => { - self.scancode = ::std::option::Option::Some(is.read_uint32()?); - }, - 40 => { - self.sym = ::std::option::Option::Some(is.read_uint32()?); - }, - 48 => { - self.mod_ = ::std::option::Option::Some(is.read_uint32()?); - }, - 56 => { - self.unicode = ::std::option::Option::Some(is.read_uint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::uint32_size(1, v); - } - if let Some(v) = self.which { - my_size += ::protobuf::rt::uint32_size(2, v); - } - if let Some(v) = self.state { - my_size += ::protobuf::rt::uint32_size(3, v); - } - if let Some(v) = self.scancode { - my_size += ::protobuf::rt::uint32_size(4, v); - } - if let Some(v) = self.sym { - my_size += ::protobuf::rt::uint32_size(5, v); - } - if let Some(v) = self.mod_ { - my_size += ::protobuf::rt::uint32_size(6, v); - } - if let Some(v) = self.unicode { - my_size += ::protobuf::rt::uint32_size(7, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_ { - os.write_uint32(1, v)?; - } - if let Some(v) = self.which { - os.write_uint32(2, v)?; - } - if let Some(v) = self.state { - os.write_uint32(3, v)?; - } - if let Some(v) = self.scancode { - os.write_uint32(4, v)?; - } - if let Some(v) = self.sym { - os.write_uint32(5, v)?; - } - if let Some(v) = self.mod_ { - os.write_uint32(6, v)?; - } - if let Some(v) = self.unicode { - os.write_uint32(7, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyboardEvent { - KeyboardEvent::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.which = ::std::option::Option::None; - self.state = ::std::option::Option::None; - self.scancode = ::std::option::Option::None; - self.sym = ::std::option::Option::None; - self.mod_ = ::std::option::Option::None; - self.unicode = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyboardEvent { - static instance: KeyboardEvent = KeyboardEvent { - type_: ::std::option::Option::None, - which: ::std::option::Option::None, - state: ::std::option::Option::None, - scancode: ::std::option::Option::None, - sym: ::std::option::Option::None, - mod_: ::std::option::Option::None, - unicode: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for KeyboardEvent { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("KeyboardEvent").unwrap()).clone() - } -} - -impl ::std::fmt::Display for KeyboardEvent { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for KeyboardEvent { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.DigCommand) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DigCommand { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.DigCommand.designation) - pub designation: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.DigCommand.locations) - pub locations: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.DigCommand.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a DigCommand { - fn default() -> &'a DigCommand { - ::default_instance() - } -} - -impl DigCommand { - pub fn new() -> DigCommand { - ::std::default::Default::default() - } - - // optional .RemoteFortressReader.TileDigDesignation designation = 1; - - pub fn designation(&self) -> TileDigDesignation { - match self.designation { - Some(e) => e.enum_value_or(TileDigDesignation::NO_DIG), - None => TileDigDesignation::NO_DIG, - } - } - - pub fn clear_designation(&mut self) { - self.designation = ::std::option::Option::None; - } - - pub fn has_designation(&self) -> bool { - self.designation.is_some() - } - - // Param is passed by value, moved - pub fn set_designation(&mut self, v: TileDigDesignation) { - self.designation = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "designation", - |m: &DigCommand| { &m.designation }, - |m: &mut DigCommand| { &mut m.designation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "locations", - |m: &DigCommand| { &m.locations }, - |m: &mut DigCommand| { &mut m.locations }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "DigCommand", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for DigCommand { - const NAME: &'static str = "DigCommand"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.designation = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - self.locations.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.designation { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - for value in &self.locations { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.designation { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - for v in &self.locations { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> DigCommand { - DigCommand::new() - } - - fn clear(&mut self) { - self.designation = ::std::option::Option::None; - self.locations.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static DigCommand { - static instance: DigCommand = DigCommand { - designation: ::std::option::Option::None, - locations: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for DigCommand { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("DigCommand").unwrap()).clone() - } -} - -impl ::std::fmt::Display for DigCommand { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for DigCommand { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.SingleBool) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SingleBool { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.SingleBool.Value) - pub Value: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.SingleBool.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SingleBool { - fn default() -> &'a SingleBool { - ::default_instance() - } -} - -impl SingleBool { - pub fn new() -> SingleBool { - ::std::default::Default::default() - } - - // optional bool Value = 1; - - pub fn Value(&self) -> bool { - self.Value.unwrap_or(false) - } - - pub fn clear_Value(&mut self) { - self.Value = ::std::option::Option::None; - } - - pub fn has_Value(&self) -> bool { - self.Value.is_some() - } - - // Param is passed by value, moved - pub fn set_Value(&mut self, v: bool) { - self.Value = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "Value", - |m: &SingleBool| { &m.Value }, - |m: &mut SingleBool| { &mut m.Value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SingleBool", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SingleBool { - const NAME: &'static str = "SingleBool"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.Value = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.Value { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.Value { - os.write_bool(1, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SingleBool { - SingleBool::new() - } - - fn clear(&mut self) { - self.Value = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SingleBool { - static instance: SingleBool = SingleBool { - Value: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SingleBool { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SingleBool").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SingleBool { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SingleBool { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.VersionInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct VersionInfo { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.VersionInfo.dwarf_fortress_version) - pub dwarf_fortress_version: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.VersionInfo.dfhack_version) - pub dfhack_version: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.VersionInfo.remote_fortress_reader_version) - pub remote_fortress_reader_version: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.VersionInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a VersionInfo { - fn default() -> &'a VersionInfo { - ::default_instance() - } -} - -impl VersionInfo { - pub fn new() -> VersionInfo { - ::std::default::Default::default() - } - - // optional string dwarf_fortress_version = 1; - - pub fn dwarf_fortress_version(&self) -> &str { - match self.dwarf_fortress_version.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_dwarf_fortress_version(&mut self) { - self.dwarf_fortress_version = ::std::option::Option::None; - } - - pub fn has_dwarf_fortress_version(&self) -> bool { - self.dwarf_fortress_version.is_some() - } - - // Param is passed by value, moved - pub fn set_dwarf_fortress_version(&mut self, v: ::std::string::String) { - self.dwarf_fortress_version = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dwarf_fortress_version(&mut self) -> &mut ::std::string::String { - if self.dwarf_fortress_version.is_none() { - self.dwarf_fortress_version = ::std::option::Option::Some(::std::string::String::new()); - } - self.dwarf_fortress_version.as_mut().unwrap() - } - - // Take field - pub fn take_dwarf_fortress_version(&mut self) -> ::std::string::String { - self.dwarf_fortress_version.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string dfhack_version = 2; - - pub fn dfhack_version(&self) -> &str { - match self.dfhack_version.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_dfhack_version(&mut self) { - self.dfhack_version = ::std::option::Option::None; - } - - pub fn has_dfhack_version(&self) -> bool { - self.dfhack_version.is_some() - } - - // Param is passed by value, moved - pub fn set_dfhack_version(&mut self, v: ::std::string::String) { - self.dfhack_version = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dfhack_version(&mut self) -> &mut ::std::string::String { - if self.dfhack_version.is_none() { - self.dfhack_version = ::std::option::Option::Some(::std::string::String::new()); - } - self.dfhack_version.as_mut().unwrap() - } - - // Take field - pub fn take_dfhack_version(&mut self) -> ::std::string::String { - self.dfhack_version.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string remote_fortress_reader_version = 3; - - pub fn remote_fortress_reader_version(&self) -> &str { - match self.remote_fortress_reader_version.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_remote_fortress_reader_version(&mut self) { - self.remote_fortress_reader_version = ::std::option::Option::None; - } - - pub fn has_remote_fortress_reader_version(&self) -> bool { - self.remote_fortress_reader_version.is_some() - } - - // Param is passed by value, moved - pub fn set_remote_fortress_reader_version(&mut self, v: ::std::string::String) { - self.remote_fortress_reader_version = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_remote_fortress_reader_version(&mut self) -> &mut ::std::string::String { - if self.remote_fortress_reader_version.is_none() { - self.remote_fortress_reader_version = ::std::option::Option::Some(::std::string::String::new()); - } - self.remote_fortress_reader_version.as_mut().unwrap() - } - - // Take field - pub fn take_remote_fortress_reader_version(&mut self) -> ::std::string::String { - self.remote_fortress_reader_version.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dwarf_fortress_version", - |m: &VersionInfo| { &m.dwarf_fortress_version }, - |m: &mut VersionInfo| { &mut m.dwarf_fortress_version }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dfhack_version", - |m: &VersionInfo| { &m.dfhack_version }, - |m: &mut VersionInfo| { &mut m.dfhack_version }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "remote_fortress_reader_version", - |m: &VersionInfo| { &m.remote_fortress_reader_version }, - |m: &mut VersionInfo| { &mut m.remote_fortress_reader_version }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "VersionInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for VersionInfo { - const NAME: &'static str = "VersionInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.dwarf_fortress_version = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.dfhack_version = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.remote_fortress_reader_version = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.dwarf_fortress_version.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.dfhack_version.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.remote_fortress_reader_version.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.dwarf_fortress_version.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.dfhack_version.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.remote_fortress_reader_version.as_ref() { - os.write_string(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> VersionInfo { - VersionInfo::new() - } - - fn clear(&mut self) { - self.dwarf_fortress_version = ::std::option::Option::None; - self.dfhack_version = ::std::option::Option::None; - self.remote_fortress_reader_version = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static VersionInfo { - static instance: VersionInfo = VersionInfo { - dwarf_fortress_version: ::std::option::Option::None, - dfhack_version: ::std::option::Option::None, - remote_fortress_reader_version: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for VersionInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("VersionInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for VersionInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for VersionInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ListRequest) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ListRequest { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ListRequest.list_start) - pub list_start: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ListRequest.list_end) - pub list_end: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ListRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListRequest { - fn default() -> &'a ListRequest { - ::default_instance() - } -} - -impl ListRequest { - pub fn new() -> ListRequest { - ::std::default::Default::default() - } - - // optional int32 list_start = 1; - - pub fn list_start(&self) -> i32 { - self.list_start.unwrap_or(0) - } - - pub fn clear_list_start(&mut self) { - self.list_start = ::std::option::Option::None; - } - - pub fn has_list_start(&self) -> bool { - self.list_start.is_some() - } - - // Param is passed by value, moved - pub fn set_list_start(&mut self, v: i32) { - self.list_start = ::std::option::Option::Some(v); - } - - // optional int32 list_end = 2; - - pub fn list_end(&self) -> i32 { - self.list_end.unwrap_or(0) - } - - pub fn clear_list_end(&mut self) { - self.list_end = ::std::option::Option::None; - } - - pub fn has_list_end(&self) -> bool { - self.list_end.is_some() - } - - // Param is passed by value, moved - pub fn set_list_end(&mut self, v: i32) { - self.list_end = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "list_start", - |m: &ListRequest| { &m.list_start }, - |m: &mut ListRequest| { &mut m.list_start }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "list_end", - |m: &ListRequest| { &m.list_end }, - |m: &mut ListRequest| { &mut m.list_end }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ListRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ListRequest { - const NAME: &'static str = "ListRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.list_start = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.list_end = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.list_start { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.list_end { - my_size += ::protobuf::rt::int32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.list_start { - os.write_int32(1, v)?; - } - if let Some(v) = self.list_end { - os.write_int32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListRequest { - ListRequest::new() - } - - fn clear(&mut self) { - self.list_start = ::std::option::Option::None; - self.list_end = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListRequest { - static instance: ListRequest = ListRequest { - list_start: ::std::option::Option::None, - list_end: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ListRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ListRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ListRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ListRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Report) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Report { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Report.type) - pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.text) - pub text: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.color) - pub color: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.duration) - pub duration: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.continuation) - pub continuation: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.unconscious) - pub unconscious: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.announcement) - pub announcement: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.repeat_count) - pub repeat_count: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.pos) - pub pos: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.id) - pub id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.year) - pub year: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Report.time) - pub time: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Report.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Report { - fn default() -> &'a Report { - ::default_instance() - } -} - -impl Report { - pub fn new() -> Report { - ::std::default::Default::default() - } - - // optional int32 type = 1; - - pub fn type_(&self) -> i32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: i32) { - self.type_ = ::std::option::Option::Some(v); - } - - // optional string text = 2; - - pub fn text(&self) -> &str { - match self.text.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_text(&mut self) { - self.text = ::std::option::Option::None; - } - - pub fn has_text(&self) -> bool { - self.text.is_some() - } - - // Param is passed by value, moved - pub fn set_text(&mut self, v: ::std::string::String) { - self.text = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_text(&mut self) -> &mut ::std::string::String { - if self.text.is_none() { - self.text = ::std::option::Option::Some(::std::string::String::new()); - } - self.text.as_mut().unwrap() - } - - // Take field - pub fn take_text(&mut self) -> ::std::string::String { - self.text.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 duration = 4; - - pub fn duration(&self) -> i32 { - self.duration.unwrap_or(0) - } - - pub fn clear_duration(&mut self) { - self.duration = ::std::option::Option::None; - } - - pub fn has_duration(&self) -> bool { - self.duration.is_some() - } - - // Param is passed by value, moved - pub fn set_duration(&mut self, v: i32) { - self.duration = ::std::option::Option::Some(v); - } - - // optional bool continuation = 5; - - pub fn continuation(&self) -> bool { - self.continuation.unwrap_or(false) - } - - pub fn clear_continuation(&mut self) { - self.continuation = ::std::option::Option::None; - } - - pub fn has_continuation(&self) -> bool { - self.continuation.is_some() - } - - // Param is passed by value, moved - pub fn set_continuation(&mut self, v: bool) { - self.continuation = ::std::option::Option::Some(v); - } - - // optional bool unconscious = 6; - - pub fn unconscious(&self) -> bool { - self.unconscious.unwrap_or(false) - } - - pub fn clear_unconscious(&mut self) { - self.unconscious = ::std::option::Option::None; - } - - pub fn has_unconscious(&self) -> bool { - self.unconscious.is_some() - } - - // Param is passed by value, moved - pub fn set_unconscious(&mut self, v: bool) { - self.unconscious = ::std::option::Option::Some(v); - } - - // optional bool announcement = 7; - - pub fn announcement(&self) -> bool { - self.announcement.unwrap_or(false) - } - - pub fn clear_announcement(&mut self) { - self.announcement = ::std::option::Option::None; - } - - pub fn has_announcement(&self) -> bool { - self.announcement.is_some() - } - - // Param is passed by value, moved - pub fn set_announcement(&mut self, v: bool) { - self.announcement = ::std::option::Option::Some(v); - } - - // optional int32 repeat_count = 8; - - pub fn repeat_count(&self) -> i32 { - self.repeat_count.unwrap_or(0) - } - - pub fn clear_repeat_count(&mut self) { - self.repeat_count = ::std::option::Option::None; - } - - pub fn has_repeat_count(&self) -> bool { - self.repeat_count.is_some() - } - - // Param is passed by value, moved - pub fn set_repeat_count(&mut self, v: i32) { - self.repeat_count = ::std::option::Option::Some(v); - } - - // optional int32 id = 10; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - // optional int32 year = 11; - - pub fn year(&self) -> i32 { - self.year.unwrap_or(0) - } - - pub fn clear_year(&mut self) { - self.year = ::std::option::Option::None; - } - - pub fn has_year(&self) -> bool { - self.year.is_some() - } - - // Param is passed by value, moved - pub fn set_year(&mut self, v: i32) { - self.year = ::std::option::Option::Some(v); - } - - // optional int32 time = 12; - - pub fn time(&self) -> i32 { - self.time.unwrap_or(0) - } - - pub fn clear_time(&mut self) { - self.time = ::std::option::Option::None; - } - - pub fn has_time(&self) -> bool { - self.time.is_some() - } - - // Param is passed by value, moved - pub fn set_time(&mut self, v: i32) { - self.time = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(12); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &Report| { &m.type_ }, - |m: &mut Report| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "text", - |m: &Report| { &m.text }, - |m: &mut Report| { &mut m.text }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ColorDefinition>( - "color", - |m: &Report| { &m.color }, - |m: &mut Report| { &mut m.color }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "duration", - |m: &Report| { &m.duration }, - |m: &mut Report| { &mut m.duration }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "continuation", - |m: &Report| { &m.continuation }, - |m: &mut Report| { &mut m.continuation }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unconscious", - |m: &Report| { &m.unconscious }, - |m: &mut Report| { &mut m.unconscious }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "announcement", - |m: &Report| { &m.announcement }, - |m: &mut Report| { &mut m.announcement }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "repeat_count", - |m: &Report| { &m.repeat_count }, - |m: &mut Report| { &mut m.repeat_count }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "pos", - |m: &Report| { &m.pos }, - |m: &mut Report| { &mut m.pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &Report| { &m.id }, - |m: &mut Report| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "year", - |m: &Report| { &m.year }, - |m: &mut Report| { &mut m.year }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "time", - |m: &Report| { &m.time }, - |m: &mut Report| { &mut m.time }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Report", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Report { - const NAME: &'static str = "Report"; - - fn is_initialized(&self) -> bool { - for v in &self.color { - if !v.is_initialized() { - return false; - } - }; - for v in &self.pos { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.text = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.color)?; - }, - 32 => { - self.duration = ::std::option::Option::Some(is.read_int32()?); - }, - 40 => { - self.continuation = ::std::option::Option::Some(is.read_bool()?); - }, - 48 => { - self.unconscious = ::std::option::Option::Some(is.read_bool()?); - }, - 56 => { - self.announcement = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.repeat_count = ::std::option::Option::Some(is.read_int32()?); - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pos)?; - }, - 80 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - 88 => { - self.year = ::std::option::Option::Some(is.read_int32()?); - }, - 96 => { - self.time = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.text.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.color.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.duration { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.continuation { - my_size += 1 + 1; - } - if let Some(v) = self.unconscious { - my_size += 1 + 1; - } - if let Some(v) = self.announcement { - my_size += 1 + 1; - } - if let Some(v) = self.repeat_count { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.pos.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(10, v); - } - if let Some(v) = self.year { - my_size += ::protobuf::rt::int32_size(11, v); - } - if let Some(v) = self.time { - my_size += ::protobuf::rt::int32_size(12, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_ { - os.write_int32(1, v)?; - } - if let Some(v) = self.text.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.color.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.duration { - os.write_int32(4, v)?; - } - if let Some(v) = self.continuation { - os.write_bool(5, v)?; - } - if let Some(v) = self.unconscious { - os.write_bool(6, v)?; - } - if let Some(v) = self.announcement { - os.write_bool(7, v)?; - } - if let Some(v) = self.repeat_count { - os.write_int32(8, v)?; - } - if let Some(v) = self.pos.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if let Some(v) = self.id { - os.write_int32(10, v)?; - } - if let Some(v) = self.year { - os.write_int32(11, v)?; - } - if let Some(v) = self.time { - os.write_int32(12, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Report { - Report::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.text = ::std::option::Option::None; - self.color.clear(); - self.duration = ::std::option::Option::None; - self.continuation = ::std::option::Option::None; - self.unconscious = ::std::option::Option::None; - self.announcement = ::std::option::Option::None; - self.repeat_count = ::std::option::Option::None; - self.pos.clear(); - self.id = ::std::option::Option::None; - self.year = ::std::option::Option::None; - self.time = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Report { - static instance: Report = Report { - type_: ::std::option::Option::None, - text: ::std::option::Option::None, - color: ::protobuf::MessageField::none(), - duration: ::std::option::Option::None, - continuation: ::std::option::Option::None, - unconscious: ::std::option::Option::None, - announcement: ::std::option::Option::None, - repeat_count: ::std::option::Option::None, - pos: ::protobuf::MessageField::none(), - id: ::std::option::Option::None, - year: ::std::option::Option::None, - time: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Report { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Report").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Report { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Report { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Status) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Status { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Status.reports) - pub reports: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Status.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Status { - fn default() -> &'a Status { - ::default_instance() - } -} - -impl Status { - pub fn new() -> Status { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "reports", - |m: &Status| { &m.reports }, - |m: &mut Status| { &mut m.reports }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Status", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Status { - const NAME: &'static str = "Status"; - - fn is_initialized(&self) -> bool { - for v in &self.reports { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.reports.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.reports { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.reports { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Status { - Status::new() - } - - fn clear(&mut self) { - self.reports.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Status { - static instance: Status = Status { - reports: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Status { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Status").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Status { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Status { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ShapeDescriptior) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ShapeDescriptior { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ShapeDescriptior.id) - pub id: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:RemoteFortressReader.ShapeDescriptior.tile) - pub tile: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ShapeDescriptior.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ShapeDescriptior { - fn default() -> &'a ShapeDescriptior { - ::default_instance() - } -} - -impl ShapeDescriptior { - pub fn new() -> ShapeDescriptior { - ::std::default::Default::default() - } - - // optional string id = 1; - - pub fn id(&self) -> &str { - match self.id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - if self.id.is_none() { - self.id = ::std::option::Option::Some(::std::string::String::new()); - } - self.id.as_mut().unwrap() - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - self.id.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int32 tile = 2; - - pub fn tile(&self) -> i32 { - self.tile.unwrap_or(0) - } - - pub fn clear_tile(&mut self) { - self.tile = ::std::option::Option::None; - } - - pub fn has_tile(&self) -> bool { - self.tile.is_some() - } - - // Param is passed by value, moved - pub fn set_tile(&mut self, v: i32) { - self.tile = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &ShapeDescriptior| { &m.id }, - |m: &mut ShapeDescriptior| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "tile", - |m: &ShapeDescriptior| { &m.tile }, - |m: &mut ShapeDescriptior| { &mut m.tile }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ShapeDescriptior", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ShapeDescriptior { - const NAME: &'static str = "ShapeDescriptior"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.tile = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.id.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.tile { - my_size += ::protobuf::rt::int32_size(2, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.id.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.tile { - os.write_int32(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ShapeDescriptior { - ShapeDescriptior::new() - } - - fn clear(&mut self) { - self.id = ::std::option::Option::None; - self.tile = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ShapeDescriptior { - static instance: ShapeDescriptior = ShapeDescriptior { - id: ::std::option::Option::None, - tile: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ShapeDescriptior { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ShapeDescriptior").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ShapeDescriptior { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ShapeDescriptior { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Language) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Language { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Language.shapes) - pub shapes: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Language.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Language { - fn default() -> &'a Language { - ::default_instance() - } -} - -impl Language { - pub fn new() -> Language { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "shapes", - |m: &Language| { &m.shapes }, - |m: &mut Language| { &mut m.shapes }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Language", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Language { - const NAME: &'static str = "Language"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.shapes.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.shapes { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.shapes { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Language { - Language::new() - } - - fn clear(&mut self) { - self.shapes.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Language { - static instance: Language = Language { - shapes: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Language { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Language").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Language { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Language { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ItemImprovement) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ItemImprovement { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ItemImprovement.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.ItemImprovement.shape) - pub shape: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ItemImprovement.specific_type) - pub specific_type: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ItemImprovement.image) - pub image: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.ItemImprovement.type) - pub type_: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ItemImprovement.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ItemImprovement { - fn default() -> &'a ItemImprovement { - ::default_instance() - } -} - -impl ItemImprovement { - pub fn new() -> ItemImprovement { - ::std::default::Default::default() - } - - // optional int32 shape = 3; - - pub fn shape(&self) -> i32 { - self.shape.unwrap_or(0) - } - - pub fn clear_shape(&mut self) { - self.shape = ::std::option::Option::None; - } - - pub fn has_shape(&self) -> bool { - self.shape.is_some() - } - - // Param is passed by value, moved - pub fn set_shape(&mut self, v: i32) { - self.shape = ::std::option::Option::Some(v); - } - - // optional int32 specific_type = 4; - - pub fn specific_type(&self) -> i32 { - self.specific_type.unwrap_or(0) - } - - pub fn clear_specific_type(&mut self) { - self.specific_type = ::std::option::Option::None; - } - - pub fn has_specific_type(&self) -> bool { - self.specific_type.is_some() - } - - // Param is passed by value, moved - pub fn set_specific_type(&mut self, v: i32) { - self.specific_type = ::std::option::Option::Some(v); - } - - // optional int32 type = 6; - - pub fn type_(&self) -> i32 { - self.type_.unwrap_or(0) - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: i32) { - self.type_ = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &ItemImprovement| { &m.material }, - |m: &mut ItemImprovement| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "shape", - |m: &ItemImprovement| { &m.shape }, - |m: &mut ItemImprovement| { &mut m.shape }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "specific_type", - |m: &ItemImprovement| { &m.specific_type }, - |m: &mut ItemImprovement| { &mut m.specific_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ArtImage>( - "image", - |m: &ItemImprovement| { &m.image }, - |m: &mut ItemImprovement| { &mut m.image }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &ItemImprovement| { &m.type_ }, - |m: &mut ItemImprovement| { &mut m.type_ }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ItemImprovement", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ItemImprovement { - const NAME: &'static str = "ItemImprovement"; - - fn is_initialized(&self) -> bool { - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.image { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 24 => { - self.shape = ::std::option::Option::Some(is.read_int32()?); - }, - 32 => { - self.specific_type = ::std::option::Option::Some(is.read_int32()?); - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.image)?; - }, - 48 => { - self.type_ = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.shape { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.specific_type { - my_size += ::protobuf::rt::int32_size(4, v); - } - if let Some(v) = self.image.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(6, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.shape { - os.write_int32(3, v)?; - } - if let Some(v) = self.specific_type { - os.write_int32(4, v)?; - } - if let Some(v) = self.image.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.type_ { - os.write_int32(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ItemImprovement { - ItemImprovement::new() - } - - fn clear(&mut self) { - self.material.clear(); - self.shape = ::std::option::Option::None; - self.specific_type = ::std::option::Option::None; - self.image.clear(); - self.type_ = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ItemImprovement { - static instance: ItemImprovement = ItemImprovement { - material: ::protobuf::MessageField::none(), - shape: ::std::option::Option::None, - specific_type: ::std::option::Option::None, - image: ::protobuf::MessageField::none(), - type_: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ItemImprovement { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ItemImprovement").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ItemImprovement { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ItemImprovement { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ArtImageElement) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ArtImageElement { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageElement.count) - pub count: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageElement.type) - pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageElement.creature_item) - pub creature_item: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageElement.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageElement.id) - pub id: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ArtImageElement.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ArtImageElement { - fn default() -> &'a ArtImageElement { - ::default_instance() - } -} - -impl ArtImageElement { - pub fn new() -> ArtImageElement { - ::std::default::Default::default() - } - - // optional int32 count = 1; - - pub fn count(&self) -> i32 { - self.count.unwrap_or(0) - } - - pub fn clear_count(&mut self) { - self.count = ::std::option::Option::None; - } - - pub fn has_count(&self) -> bool { - self.count.is_some() - } - - // Param is passed by value, moved - pub fn set_count(&mut self, v: i32) { - self.count = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.ArtImageElementType type = 2; - - pub fn type_(&self) -> ArtImageElementType { - match self.type_ { - Some(e) => e.enum_value_or(ArtImageElementType::IMAGE_CREATURE), - None => ArtImageElementType::IMAGE_CREATURE, - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: ArtImageElementType) { - self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional int32 id = 6; - - pub fn id(&self) -> i32 { - self.id.unwrap_or(0) - } - - pub fn clear_id(&mut self) { - self.id = ::std::option::Option::None; - } - - pub fn has_id(&self) -> bool { - self.id.is_some() - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: i32) { - self.id = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "count", - |m: &ArtImageElement| { &m.count }, - |m: &mut ArtImageElement| { &mut m.count }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &ArtImageElement| { &m.type_ }, - |m: &mut ArtImageElement| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "creature_item", - |m: &ArtImageElement| { &m.creature_item }, - |m: &mut ArtImageElement| { &mut m.creature_item }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &ArtImageElement| { &m.material }, - |m: &mut ArtImageElement| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "id", - |m: &ArtImageElement| { &m.id }, - |m: &mut ArtImageElement| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ArtImageElement", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ArtImageElement { - const NAME: &'static str = "ArtImageElement"; - - fn is_initialized(&self) -> bool { - for v in &self.creature_item { - if !v.is_initialized() { - return false; - } - }; - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.count = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.creature_item)?; - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 48 => { - self.id = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.count { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - if let Some(v) = self.creature_item.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.id { - my_size += ::protobuf::rt::int32_size(6, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.count { - os.write_int32(1, v)?; - } - if let Some(v) = self.type_ { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.creature_item.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.id { - os.write_int32(6, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ArtImageElement { - ArtImageElement::new() - } - - fn clear(&mut self) { - self.count = ::std::option::Option::None; - self.type_ = ::std::option::Option::None; - self.creature_item.clear(); - self.material.clear(); - self.id = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ArtImageElement { - static instance: ArtImageElement = ArtImageElement { - count: ::std::option::Option::None, - type_: ::std::option::Option::None, - creature_item: ::protobuf::MessageField::none(), - material: ::protobuf::MessageField::none(), - id: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ArtImageElement { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ArtImageElement").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ArtImageElement { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ArtImageElement { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ArtImageProperty) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ArtImageProperty { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageProperty.subject) - pub subject: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageProperty.object) - pub object: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageProperty.verb) - pub verb: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImageProperty.type) - pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ArtImageProperty.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ArtImageProperty { - fn default() -> &'a ArtImageProperty { - ::default_instance() - } -} - -impl ArtImageProperty { - pub fn new() -> ArtImageProperty { - ::std::default::Default::default() - } - - // optional int32 subject = 1; - - pub fn subject(&self) -> i32 { - self.subject.unwrap_or(0) - } - - pub fn clear_subject(&mut self) { - self.subject = ::std::option::Option::None; - } - - pub fn has_subject(&self) -> bool { - self.subject.is_some() - } - - // Param is passed by value, moved - pub fn set_subject(&mut self, v: i32) { - self.subject = ::std::option::Option::Some(v); - } - - // optional int32 object = 2; - - pub fn object(&self) -> i32 { - self.object.unwrap_or(0) - } - - pub fn clear_object(&mut self) { - self.object = ::std::option::Option::None; - } - - pub fn has_object(&self) -> bool { - self.object.is_some() - } - - // Param is passed by value, moved - pub fn set_object(&mut self, v: i32) { - self.object = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.ArtImageVerb verb = 3; - - pub fn verb(&self) -> ArtImageVerb { - match self.verb { - Some(e) => e.enum_value_or(ArtImageVerb::VERB_WITHERING), - None => ArtImageVerb::VERB_WITHERING, - } - } - - pub fn clear_verb(&mut self) { - self.verb = ::std::option::Option::None; - } - - pub fn has_verb(&self) -> bool { - self.verb.is_some() - } - - // Param is passed by value, moved - pub fn set_verb(&mut self, v: ArtImageVerb) { - self.verb = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional .RemoteFortressReader.ArtImagePropertyType type = 4; - - pub fn type_(&self) -> ArtImagePropertyType { - match self.type_ { - Some(e) => e.enum_value_or(ArtImagePropertyType::TRANSITIVE_VERB), - None => ArtImagePropertyType::TRANSITIVE_VERB, - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: ArtImagePropertyType) { - self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "subject", - |m: &ArtImageProperty| { &m.subject }, - |m: &mut ArtImageProperty| { &mut m.subject }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "object", - |m: &ArtImageProperty| { &m.object }, - |m: &mut ArtImageProperty| { &mut m.object }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "verb", - |m: &ArtImageProperty| { &m.verb }, - |m: &mut ArtImageProperty| { &mut m.verb }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &ArtImageProperty| { &m.type_ }, - |m: &mut ArtImageProperty| { &mut m.type_ }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ArtImageProperty", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ArtImageProperty { - const NAME: &'static str = "ArtImageProperty"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.subject = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.object = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.verb = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 32 => { - self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.subject { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.object { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.verb { - my_size += ::protobuf::rt::int32_size(3, v.value()); - } - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(4, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.subject { - os.write_int32(1, v)?; - } - if let Some(v) = self.object { - os.write_int32(2, v)?; - } - if let Some(v) = self.verb { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.type_ { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ArtImageProperty { - ArtImageProperty::new() - } - - fn clear(&mut self) { - self.subject = ::std::option::Option::None; - self.object = ::std::option::Option::None; - self.verb = ::std::option::Option::None; - self.type_ = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ArtImageProperty { - static instance: ArtImageProperty = ArtImageProperty { - subject: ::std::option::Option::None, - object: ::std::option::Option::None, - verb: ::std::option::Option::None, - type_: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ArtImageProperty { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ArtImageProperty").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ArtImageProperty { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ArtImageProperty { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.ArtImage) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ArtImage { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImage.elements) - pub elements: ::std::vec::Vec, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImage.id) - pub id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.ArtImage.properties) - pub properties: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.ArtImage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ArtImage { - fn default() -> &'a ArtImage { - ::default_instance() - } -} - -impl ArtImage { - pub fn new() -> ArtImage { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "elements", - |m: &ArtImage| { &m.elements }, - |m: &mut ArtImage| { &mut m.elements }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "id", - |m: &ArtImage| { &m.id }, - |m: &mut ArtImage| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "properties", - |m: &ArtImage| { &m.properties }, - |m: &mut ArtImage| { &mut m.properties }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ArtImage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ArtImage { - const NAME: &'static str = "ArtImage"; - - fn is_initialized(&self) -> bool { - for v in &self.elements { - if !v.is_initialized() { - return false; - } - }; - for v in &self.id { - if !v.is_initialized() { - return false; - } - }; - for v in &self.properties { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.elements.push(is.read_message()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.id)?; - }, - 26 => { - self.properties.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.elements { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.properties { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.elements { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - if let Some(v) = self.id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - for v in &self.properties { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ArtImage { - ArtImage::new() - } - - fn clear(&mut self) { - self.elements.clear(); - self.id.clear(); - self.properties.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ArtImage { - static instance: ArtImage = ArtImage { - elements: ::std::vec::Vec::new(), - id: ::protobuf::MessageField::none(), - properties: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ArtImage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ArtImage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ArtImage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ArtImage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Engraving) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Engraving { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.pos) - pub pos: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.quality) - pub quality: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.tile) - pub tile: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.image) - pub image: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.floor) - pub floor: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.west) - pub west: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.east) - pub east: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.north) - pub north: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.south) - pub south: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.hidden) - pub hidden: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.northwest) - pub northwest: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.northeast) - pub northeast: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.southwest) - pub southwest: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.Engraving.southeast) - pub southeast: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Engraving.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Engraving { - fn default() -> &'a Engraving { - ::default_instance() - } -} - -impl Engraving { - pub fn new() -> Engraving { - ::std::default::Default::default() - } - - // optional int32 quality = 2; - - pub fn quality(&self) -> i32 { - self.quality.unwrap_or(0) - } - - pub fn clear_quality(&mut self) { - self.quality = ::std::option::Option::None; - } - - pub fn has_quality(&self) -> bool { - self.quality.is_some() - } - - // Param is passed by value, moved - pub fn set_quality(&mut self, v: i32) { - self.quality = ::std::option::Option::Some(v); - } - - // optional int32 tile = 3; - - pub fn tile(&self) -> i32 { - self.tile.unwrap_or(0) - } - - pub fn clear_tile(&mut self) { - self.tile = ::std::option::Option::None; - } - - pub fn has_tile(&self) -> bool { - self.tile.is_some() - } - - // Param is passed by value, moved - pub fn set_tile(&mut self, v: i32) { - self.tile = ::std::option::Option::Some(v); - } - - // optional bool floor = 5; - - pub fn floor(&self) -> bool { - self.floor.unwrap_or(false) - } - - pub fn clear_floor(&mut self) { - self.floor = ::std::option::Option::None; - } - - pub fn has_floor(&self) -> bool { - self.floor.is_some() - } - - // Param is passed by value, moved - pub fn set_floor(&mut self, v: bool) { - self.floor = ::std::option::Option::Some(v); - } - - // optional bool west = 6; - - pub fn west(&self) -> bool { - self.west.unwrap_or(false) - } - - pub fn clear_west(&mut self) { - self.west = ::std::option::Option::None; - } - - pub fn has_west(&self) -> bool { - self.west.is_some() - } - - // Param is passed by value, moved - pub fn set_west(&mut self, v: bool) { - self.west = ::std::option::Option::Some(v); - } - - // optional bool east = 7; - - pub fn east(&self) -> bool { - self.east.unwrap_or(false) - } - - pub fn clear_east(&mut self) { - self.east = ::std::option::Option::None; - } - - pub fn has_east(&self) -> bool { - self.east.is_some() - } - - // Param is passed by value, moved - pub fn set_east(&mut self, v: bool) { - self.east = ::std::option::Option::Some(v); - } - - // optional bool north = 8; - - pub fn north(&self) -> bool { - self.north.unwrap_or(false) - } - - pub fn clear_north(&mut self) { - self.north = ::std::option::Option::None; - } - - pub fn has_north(&self) -> bool { - self.north.is_some() - } - - // Param is passed by value, moved - pub fn set_north(&mut self, v: bool) { - self.north = ::std::option::Option::Some(v); - } - - // optional bool south = 9; - - pub fn south(&self) -> bool { - self.south.unwrap_or(false) - } - - pub fn clear_south(&mut self) { - self.south = ::std::option::Option::None; - } - - pub fn has_south(&self) -> bool { - self.south.is_some() - } - - // Param is passed by value, moved - pub fn set_south(&mut self, v: bool) { - self.south = ::std::option::Option::Some(v); - } - - // optional bool hidden = 10; - - pub fn hidden(&self) -> bool { - self.hidden.unwrap_or(false) - } - - pub fn clear_hidden(&mut self) { - self.hidden = ::std::option::Option::None; - } - - pub fn has_hidden(&self) -> bool { - self.hidden.is_some() - } - - // Param is passed by value, moved - pub fn set_hidden(&mut self, v: bool) { - self.hidden = ::std::option::Option::Some(v); - } - - // optional bool northwest = 11; - - pub fn northwest(&self) -> bool { - self.northwest.unwrap_or(false) - } - - pub fn clear_northwest(&mut self) { - self.northwest = ::std::option::Option::None; - } - - pub fn has_northwest(&self) -> bool { - self.northwest.is_some() - } - - // Param is passed by value, moved - pub fn set_northwest(&mut self, v: bool) { - self.northwest = ::std::option::Option::Some(v); - } - - // optional bool northeast = 12; - - pub fn northeast(&self) -> bool { - self.northeast.unwrap_or(false) - } - - pub fn clear_northeast(&mut self) { - self.northeast = ::std::option::Option::None; - } - - pub fn has_northeast(&self) -> bool { - self.northeast.is_some() - } - - // Param is passed by value, moved - pub fn set_northeast(&mut self, v: bool) { - self.northeast = ::std::option::Option::Some(v); - } - - // optional bool southwest = 13; - - pub fn southwest(&self) -> bool { - self.southwest.unwrap_or(false) - } - - pub fn clear_southwest(&mut self) { - self.southwest = ::std::option::Option::None; - } - - pub fn has_southwest(&self) -> bool { - self.southwest.is_some() - } - - // Param is passed by value, moved - pub fn set_southwest(&mut self, v: bool) { - self.southwest = ::std::option::Option::Some(v); - } - - // optional bool southeast = 14; - - pub fn southeast(&self) -> bool { - self.southeast.unwrap_or(false) - } - - pub fn clear_southeast(&mut self) { - self.southeast = ::std::option::Option::None; - } - - pub fn has_southeast(&self) -> bool { - self.southeast.is_some() - } - - // Param is passed by value, moved - pub fn set_southeast(&mut self, v: bool) { - self.southeast = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(14); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "pos", - |m: &Engraving| { &m.pos }, - |m: &mut Engraving| { &mut m.pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "quality", - |m: &Engraving| { &m.quality }, - |m: &mut Engraving| { &mut m.quality }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "tile", - |m: &Engraving| { &m.tile }, - |m: &mut Engraving| { &mut m.tile }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ArtImage>( - "image", - |m: &Engraving| { &m.image }, - |m: &mut Engraving| { &mut m.image }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "floor", - |m: &Engraving| { &m.floor }, - |m: &mut Engraving| { &mut m.floor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "west", - |m: &Engraving| { &m.west }, - |m: &mut Engraving| { &mut m.west }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "east", - |m: &Engraving| { &m.east }, - |m: &mut Engraving| { &mut m.east }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "north", - |m: &Engraving| { &m.north }, - |m: &mut Engraving| { &mut m.north }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "south", - |m: &Engraving| { &m.south }, - |m: &mut Engraving| { &mut m.south }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "hidden", - |m: &Engraving| { &m.hidden }, - |m: &mut Engraving| { &mut m.hidden }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "northwest", - |m: &Engraving| { &m.northwest }, - |m: &mut Engraving| { &mut m.northwest }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "northeast", - |m: &Engraving| { &m.northeast }, - |m: &mut Engraving| { &mut m.northeast }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "southwest", - |m: &Engraving| { &m.southwest }, - |m: &mut Engraving| { &mut m.southwest }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "southeast", - |m: &Engraving| { &m.southeast }, - |m: &mut Engraving| { &mut m.southeast }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Engraving", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Engraving { - const NAME: &'static str = "Engraving"; - - fn is_initialized(&self) -> bool { - for v in &self.pos { - if !v.is_initialized() { - return false; - } - }; - for v in &self.image { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pos)?; - }, - 16 => { - self.quality = ::std::option::Option::Some(is.read_int32()?); - }, - 24 => { - self.tile = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.image)?; - }, - 40 => { - self.floor = ::std::option::Option::Some(is.read_bool()?); - }, - 48 => { - self.west = ::std::option::Option::Some(is.read_bool()?); - }, - 56 => { - self.east = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.north = ::std::option::Option::Some(is.read_bool()?); - }, - 72 => { - self.south = ::std::option::Option::Some(is.read_bool()?); - }, - 80 => { - self.hidden = ::std::option::Option::Some(is.read_bool()?); - }, - 88 => { - self.northwest = ::std::option::Option::Some(is.read_bool()?); - }, - 96 => { - self.northeast = ::std::option::Option::Some(is.read_bool()?); - }, - 104 => { - self.southwest = ::std::option::Option::Some(is.read_bool()?); - }, - 112 => { - self.southeast = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.pos.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.quality { - my_size += ::protobuf::rt::int32_size(2, v); - } - if let Some(v) = self.tile { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.image.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.floor { - my_size += 1 + 1; - } - if let Some(v) = self.west { - my_size += 1 + 1; - } - if let Some(v) = self.east { - my_size += 1 + 1; - } - if let Some(v) = self.north { - my_size += 1 + 1; - } - if let Some(v) = self.south { - my_size += 1 + 1; - } - if let Some(v) = self.hidden { - my_size += 1 + 1; - } - if let Some(v) = self.northwest { - my_size += 1 + 1; - } - if let Some(v) = self.northeast { - my_size += 1 + 1; - } - if let Some(v) = self.southwest { - my_size += 1 + 1; - } - if let Some(v) = self.southeast { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.pos.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.quality { - os.write_int32(2, v)?; - } - if let Some(v) = self.tile { - os.write_int32(3, v)?; - } - if let Some(v) = self.image.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - if let Some(v) = self.floor { - os.write_bool(5, v)?; - } - if let Some(v) = self.west { - os.write_bool(6, v)?; - } - if let Some(v) = self.east { - os.write_bool(7, v)?; - } - if let Some(v) = self.north { - os.write_bool(8, v)?; - } - if let Some(v) = self.south { - os.write_bool(9, v)?; - } - if let Some(v) = self.hidden { - os.write_bool(10, v)?; - } - if let Some(v) = self.northwest { - os.write_bool(11, v)?; - } - if let Some(v) = self.northeast { - os.write_bool(12, v)?; - } - if let Some(v) = self.southwest { - os.write_bool(13, v)?; - } - if let Some(v) = self.southeast { - os.write_bool(14, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Engraving { - Engraving::new() - } - - fn clear(&mut self) { - self.pos.clear(); - self.quality = ::std::option::Option::None; - self.tile = ::std::option::Option::None; - self.image.clear(); - self.floor = ::std::option::Option::None; - self.west = ::std::option::Option::None; - self.east = ::std::option::Option::None; - self.north = ::std::option::Option::None; - self.south = ::std::option::Option::None; - self.hidden = ::std::option::Option::None; - self.northwest = ::std::option::Option::None; - self.northeast = ::std::option::Option::None; - self.southwest = ::std::option::Option::None; - self.southeast = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Engraving { - static instance: Engraving = Engraving { - pos: ::protobuf::MessageField::none(), - quality: ::std::option::Option::None, - tile: ::std::option::Option::None, - image: ::protobuf::MessageField::none(), - floor: ::std::option::Option::None, - west: ::std::option::Option::None, - east: ::std::option::Option::None, - north: ::std::option::Option::None, - south: ::std::option::Option::None, - hidden: ::std::option::Option::None, - northwest: ::std::option::Option::None, - northeast: ::std::option::Option::None, - southwest: ::std::option::Option::None, - southeast: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Engraving { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Engraving").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Engraving { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Engraving { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.FlowInfo) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct FlowInfo { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.index) - pub index: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.type) - pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.density) - pub density: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.pos) - pub pos: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.dest) - pub dest: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.expanding) - pub expanding: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.reuse) - pub reuse: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.guide_id) - pub guide_id: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.material) - pub material: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.item) - pub item: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.dead) - pub dead: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.fast) - pub fast: ::std::option::Option, - // @@protoc_insertion_point(field:RemoteFortressReader.FlowInfo.creeping) - pub creeping: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.FlowInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FlowInfo { - fn default() -> &'a FlowInfo { - ::default_instance() - } -} - -impl FlowInfo { - pub fn new() -> FlowInfo { - ::std::default::Default::default() - } - - // optional int32 index = 1; - - pub fn index(&self) -> i32 { - self.index.unwrap_or(0) - } - - pub fn clear_index(&mut self) { - self.index = ::std::option::Option::None; - } - - pub fn has_index(&self) -> bool { - self.index.is_some() - } - - // Param is passed by value, moved - pub fn set_index(&mut self, v: i32) { - self.index = ::std::option::Option::Some(v); - } - - // optional .RemoteFortressReader.FlowType type = 2; - - pub fn type_(&self) -> FlowType { - match self.type_ { - Some(e) => e.enum_value_or(FlowType::Miasma), - None => FlowType::Miasma, - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: FlowType) { - self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional int32 density = 3; - - pub fn density(&self) -> i32 { - self.density.unwrap_or(0) - } - - pub fn clear_density(&mut self) { - self.density = ::std::option::Option::None; - } - - pub fn has_density(&self) -> bool { - self.density.is_some() - } - - // Param is passed by value, moved - pub fn set_density(&mut self, v: i32) { - self.density = ::std::option::Option::Some(v); - } - - // optional bool expanding = 6; - - pub fn expanding(&self) -> bool { - self.expanding.unwrap_or(false) - } - - pub fn clear_expanding(&mut self) { - self.expanding = ::std::option::Option::None; - } - - pub fn has_expanding(&self) -> bool { - self.expanding.is_some() - } - - // Param is passed by value, moved - pub fn set_expanding(&mut self, v: bool) { - self.expanding = ::std::option::Option::Some(v); - } - - // optional bool reuse = 7; - - pub fn reuse(&self) -> bool { - self.reuse.unwrap_or(false) - } - - pub fn clear_reuse(&mut self) { - self.reuse = ::std::option::Option::None; - } - - pub fn has_reuse(&self) -> bool { - self.reuse.is_some() - } - - // Param is passed by value, moved - pub fn set_reuse(&mut self, v: bool) { - self.reuse = ::std::option::Option::Some(v); - } - - // optional int32 guide_id = 8; - - pub fn guide_id(&self) -> i32 { - self.guide_id.unwrap_or(0) - } - - pub fn clear_guide_id(&mut self) { - self.guide_id = ::std::option::Option::None; - } - - pub fn has_guide_id(&self) -> bool { - self.guide_id.is_some() - } - - // Param is passed by value, moved - pub fn set_guide_id(&mut self, v: i32) { - self.guide_id = ::std::option::Option::Some(v); - } - - // optional bool dead = 11; - - pub fn dead(&self) -> bool { - self.dead.unwrap_or(false) - } - - pub fn clear_dead(&mut self) { - self.dead = ::std::option::Option::None; - } - - pub fn has_dead(&self) -> bool { - self.dead.is_some() - } - - // Param is passed by value, moved - pub fn set_dead(&mut self, v: bool) { - self.dead = ::std::option::Option::Some(v); - } - - // optional bool fast = 12; - - pub fn fast(&self) -> bool { - self.fast.unwrap_or(false) - } - - pub fn clear_fast(&mut self) { - self.fast = ::std::option::Option::None; - } - - pub fn has_fast(&self) -> bool { - self.fast.is_some() - } - - // Param is passed by value, moved - pub fn set_fast(&mut self, v: bool) { - self.fast = ::std::option::Option::Some(v); - } - - // optional bool creeping = 13; - - pub fn creeping(&self) -> bool { - self.creeping.unwrap_or(false) - } - - pub fn clear_creeping(&mut self) { - self.creeping = ::std::option::Option::None; - } - - pub fn has_creeping(&self) -> bool { - self.creeping.is_some() - } - - // Param is passed by value, moved - pub fn set_creeping(&mut self, v: bool) { - self.creeping = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(13); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "index", - |m: &FlowInfo| { &m.index }, - |m: &mut FlowInfo| { &mut m.index }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "type", - |m: &FlowInfo| { &m.type_ }, - |m: &mut FlowInfo| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "density", - |m: &FlowInfo| { &m.density }, - |m: &mut FlowInfo| { &mut m.density }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "pos", - |m: &FlowInfo| { &m.pos }, - |m: &mut FlowInfo| { &mut m.pos }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "dest", - |m: &FlowInfo| { &m.dest }, - |m: &mut FlowInfo| { &mut m.dest }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "expanding", - |m: &FlowInfo| { &m.expanding }, - |m: &mut FlowInfo| { &mut m.expanding }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "reuse", - |m: &FlowInfo| { &m.reuse }, - |m: &mut FlowInfo| { &mut m.reuse }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "guide_id", - |m: &FlowInfo| { &m.guide_id }, - |m: &mut FlowInfo| { &mut m.guide_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "material", - |m: &FlowInfo| { &m.material }, - |m: &mut FlowInfo| { &mut m.material }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MatPair>( - "item", - |m: &FlowInfo| { &m.item }, - |m: &mut FlowInfo| { &mut m.item }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dead", - |m: &FlowInfo| { &m.dead }, - |m: &mut FlowInfo| { &mut m.dead }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "fast", - |m: &FlowInfo| { &m.fast }, - |m: &mut FlowInfo| { &mut m.fast }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "creeping", - |m: &FlowInfo| { &m.creeping }, - |m: &mut FlowInfo| { &mut m.creeping }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "FlowInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for FlowInfo { - const NAME: &'static str = "FlowInfo"; - - fn is_initialized(&self) -> bool { - for v in &self.pos { - if !v.is_initialized() { - return false; - } - }; - for v in &self.dest { - if !v.is_initialized() { - return false; - } - }; - for v in &self.material { - if !v.is_initialized() { - return false; - } - }; - for v in &self.item { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.index = ::std::option::Option::Some(is.read_int32()?); - }, - 16 => { - self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 24 => { - self.density = ::std::option::Option::Some(is.read_int32()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pos)?; - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.dest)?; - }, - 48 => { - self.expanding = ::std::option::Option::Some(is.read_bool()?); - }, - 56 => { - self.reuse = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.guide_id = ::std::option::Option::Some(is.read_int32()?); - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.material)?; - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.item)?; - }, - 88 => { - self.dead = ::std::option::Option::Some(is.read_bool()?); - }, - 96 => { - self.fast = ::std::option::Option::Some(is.read_bool()?); - }, - 104 => { - self.creeping = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.index { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(2, v.value()); - } - if let Some(v) = self.density { - my_size += ::protobuf::rt::int32_size(3, v); - } - if let Some(v) = self.pos.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.dest.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.expanding { - my_size += 1 + 1; - } - if let Some(v) = self.reuse { - my_size += 1 + 1; - } - if let Some(v) = self.guide_id { - my_size += ::protobuf::rt::int32_size(8, v); - } - if let Some(v) = self.material.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.item.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.dead { - my_size += 1 + 1; - } - if let Some(v) = self.fast { - my_size += 1 + 1; - } - if let Some(v) = self.creeping { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.index { - os.write_int32(1, v)?; - } - if let Some(v) = self.type_ { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.density { - os.write_int32(3, v)?; - } - if let Some(v) = self.pos.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - if let Some(v) = self.dest.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.expanding { - os.write_bool(6, v)?; - } - if let Some(v) = self.reuse { - os.write_bool(7, v)?; - } - if let Some(v) = self.guide_id { - os.write_int32(8, v)?; - } - if let Some(v) = self.material.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if let Some(v) = self.item.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - if let Some(v) = self.dead { - os.write_bool(11, v)?; - } - if let Some(v) = self.fast { - os.write_bool(12, v)?; - } - if let Some(v) = self.creeping { - os.write_bool(13, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FlowInfo { - FlowInfo::new() - } - - fn clear(&mut self) { - self.index = ::std::option::Option::None; - self.type_ = ::std::option::Option::None; - self.density = ::std::option::Option::None; - self.pos.clear(); - self.dest.clear(); - self.expanding = ::std::option::Option::None; - self.reuse = ::std::option::Option::None; - self.guide_id = ::std::option::Option::None; - self.material.clear(); - self.item.clear(); - self.dead = ::std::option::Option::None; - self.fast = ::std::option::Option::None; - self.creeping = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static FlowInfo { - static instance: FlowInfo = FlowInfo { - index: ::std::option::Option::None, - type_: ::std::option::Option::None, - density: ::std::option::Option::None, - pos: ::protobuf::MessageField::none(), - dest: ::protobuf::MessageField::none(), - expanding: ::std::option::Option::None, - reuse: ::std::option::Option::None, - guide_id: ::std::option::Option::None, - material: ::protobuf::MessageField::none(), - item: ::protobuf::MessageField::none(), - dead: ::std::option::Option::None, - fast: ::std::option::Option::None, - creeping: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for FlowInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("FlowInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for FlowInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for FlowInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:RemoteFortressReader.Wave) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Wave { - // message fields - // @@protoc_insertion_point(field:RemoteFortressReader.Wave.dest) - pub dest: ::protobuf::MessageField, - // @@protoc_insertion_point(field:RemoteFortressReader.Wave.pos) - pub pos: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:RemoteFortressReader.Wave.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Wave { - fn default() -> &'a Wave { - ::default_instance() - } -} - -impl Wave { - pub fn new() -> Wave { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "dest", - |m: &Wave| { &m.dest }, - |m: &mut Wave| { &mut m.dest }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coord>( - "pos", - |m: &Wave| { &m.pos }, - |m: &mut Wave| { &mut m.pos }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Wave", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Wave { - const NAME: &'static str = "Wave"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.dest)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pos)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.dest.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.pos.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.dest.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.pos.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Wave { - Wave::new() - } - - fn clear(&mut self) { - self.dest.clear(); - self.pos.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Wave { - static instance: Wave = Wave { - dest: ::protobuf::MessageField::none(), - pos: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Wave { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Wave").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Wave { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Wave { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.TiletypeShape) -pub enum TiletypeShape { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.NO_SHAPE) - NO_SHAPE = -1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.EMPTY) - EMPTY = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.FLOOR) - FLOOR = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.BOULDER) - BOULDER = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.PEBBLES) - PEBBLES = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.WALL) - WALL = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.FORTIFICATION) - FORTIFICATION = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.STAIR_UP) - STAIR_UP = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.STAIR_DOWN) - STAIR_DOWN = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.STAIR_UPDOWN) - STAIR_UPDOWN = 8, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.RAMP) - RAMP = 9, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.RAMP_TOP) - RAMP_TOP = 10, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.BROOK_BED) - BROOK_BED = 11, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.BROOK_TOP) - BROOK_TOP = 12, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.TREE_SHAPE) - TREE_SHAPE = 13, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.SAPLING) - SAPLING = 14, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.SHRUB) - SHRUB = 15, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.ENDLESS_PIT) - ENDLESS_PIT = 16, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.BRANCH) - BRANCH = 17, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.TRUNK_BRANCH) - TRUNK_BRANCH = 18, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeShape.TWIG) - TWIG = 19, -} - -impl ::protobuf::Enum for TiletypeShape { - const NAME: &'static str = "TiletypeShape"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - -1 => ::std::option::Option::Some(TiletypeShape::NO_SHAPE), - 0 => ::std::option::Option::Some(TiletypeShape::EMPTY), - 1 => ::std::option::Option::Some(TiletypeShape::FLOOR), - 2 => ::std::option::Option::Some(TiletypeShape::BOULDER), - 3 => ::std::option::Option::Some(TiletypeShape::PEBBLES), - 4 => ::std::option::Option::Some(TiletypeShape::WALL), - 5 => ::std::option::Option::Some(TiletypeShape::FORTIFICATION), - 6 => ::std::option::Option::Some(TiletypeShape::STAIR_UP), - 7 => ::std::option::Option::Some(TiletypeShape::STAIR_DOWN), - 8 => ::std::option::Option::Some(TiletypeShape::STAIR_UPDOWN), - 9 => ::std::option::Option::Some(TiletypeShape::RAMP), - 10 => ::std::option::Option::Some(TiletypeShape::RAMP_TOP), - 11 => ::std::option::Option::Some(TiletypeShape::BROOK_BED), - 12 => ::std::option::Option::Some(TiletypeShape::BROOK_TOP), - 13 => ::std::option::Option::Some(TiletypeShape::TREE_SHAPE), - 14 => ::std::option::Option::Some(TiletypeShape::SAPLING), - 15 => ::std::option::Option::Some(TiletypeShape::SHRUB), - 16 => ::std::option::Option::Some(TiletypeShape::ENDLESS_PIT), - 17 => ::std::option::Option::Some(TiletypeShape::BRANCH), - 18 => ::std::option::Option::Some(TiletypeShape::TRUNK_BRANCH), - 19 => ::std::option::Option::Some(TiletypeShape::TWIG), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NO_SHAPE" => ::std::option::Option::Some(TiletypeShape::NO_SHAPE), - "EMPTY" => ::std::option::Option::Some(TiletypeShape::EMPTY), - "FLOOR" => ::std::option::Option::Some(TiletypeShape::FLOOR), - "BOULDER" => ::std::option::Option::Some(TiletypeShape::BOULDER), - "PEBBLES" => ::std::option::Option::Some(TiletypeShape::PEBBLES), - "WALL" => ::std::option::Option::Some(TiletypeShape::WALL), - "FORTIFICATION" => ::std::option::Option::Some(TiletypeShape::FORTIFICATION), - "STAIR_UP" => ::std::option::Option::Some(TiletypeShape::STAIR_UP), - "STAIR_DOWN" => ::std::option::Option::Some(TiletypeShape::STAIR_DOWN), - "STAIR_UPDOWN" => ::std::option::Option::Some(TiletypeShape::STAIR_UPDOWN), - "RAMP" => ::std::option::Option::Some(TiletypeShape::RAMP), - "RAMP_TOP" => ::std::option::Option::Some(TiletypeShape::RAMP_TOP), - "BROOK_BED" => ::std::option::Option::Some(TiletypeShape::BROOK_BED), - "BROOK_TOP" => ::std::option::Option::Some(TiletypeShape::BROOK_TOP), - "TREE_SHAPE" => ::std::option::Option::Some(TiletypeShape::TREE_SHAPE), - "SAPLING" => ::std::option::Option::Some(TiletypeShape::SAPLING), - "SHRUB" => ::std::option::Option::Some(TiletypeShape::SHRUB), - "ENDLESS_PIT" => ::std::option::Option::Some(TiletypeShape::ENDLESS_PIT), - "BRANCH" => ::std::option::Option::Some(TiletypeShape::BRANCH), - "TRUNK_BRANCH" => ::std::option::Option::Some(TiletypeShape::TRUNK_BRANCH), - "TWIG" => ::std::option::Option::Some(TiletypeShape::TWIG), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [TiletypeShape] = &[ - TiletypeShape::NO_SHAPE, - TiletypeShape::EMPTY, - TiletypeShape::FLOOR, - TiletypeShape::BOULDER, - TiletypeShape::PEBBLES, - TiletypeShape::WALL, - TiletypeShape::FORTIFICATION, - TiletypeShape::STAIR_UP, - TiletypeShape::STAIR_DOWN, - TiletypeShape::STAIR_UPDOWN, - TiletypeShape::RAMP, - TiletypeShape::RAMP_TOP, - TiletypeShape::BROOK_BED, - TiletypeShape::BROOK_TOP, - TiletypeShape::TREE_SHAPE, - TiletypeShape::SAPLING, - TiletypeShape::SHRUB, - TiletypeShape::ENDLESS_PIT, - TiletypeShape::BRANCH, - TiletypeShape::TRUNK_BRANCH, - TiletypeShape::TWIG, - ]; -} - -impl ::protobuf::EnumFull for TiletypeShape { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("TiletypeShape").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - TiletypeShape::NO_SHAPE => 0, - TiletypeShape::EMPTY => 1, - TiletypeShape::FLOOR => 2, - TiletypeShape::BOULDER => 3, - TiletypeShape::PEBBLES => 4, - TiletypeShape::WALL => 5, - TiletypeShape::FORTIFICATION => 6, - TiletypeShape::STAIR_UP => 7, - TiletypeShape::STAIR_DOWN => 8, - TiletypeShape::STAIR_UPDOWN => 9, - TiletypeShape::RAMP => 10, - TiletypeShape::RAMP_TOP => 11, - TiletypeShape::BROOK_BED => 12, - TiletypeShape::BROOK_TOP => 13, - TiletypeShape::TREE_SHAPE => 14, - TiletypeShape::SAPLING => 15, - TiletypeShape::SHRUB => 16, - TiletypeShape::ENDLESS_PIT => 17, - TiletypeShape::BRANCH => 18, - TiletypeShape::TRUNK_BRANCH => 19, - TiletypeShape::TWIG => 20, - }; - Self::enum_descriptor().value_by_index(index) - } -} - -// Note, `Default` is implemented although default value is not 0 -impl ::std::default::Default for TiletypeShape { - fn default() -> Self { - TiletypeShape::NO_SHAPE - } -} - -impl TiletypeShape { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TiletypeShape") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.TiletypeSpecial) -pub enum TiletypeSpecial { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.NO_SPECIAL) - NO_SPECIAL = -1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.NORMAL) - NORMAL = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.RIVER_SOURCE) - RIVER_SOURCE = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.WATERFALL) - WATERFALL = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.SMOOTH) - SMOOTH = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.FURROWED) - FURROWED = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.WET) - WET = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.DEAD) - DEAD = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.WORN_1) - WORN_1 = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.WORN_2) - WORN_2 = 8, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.WORN_3) - WORN_3 = 9, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.TRACK) - TRACK = 10, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeSpecial.SMOOTH_DEAD) - SMOOTH_DEAD = 11, -} - -impl ::protobuf::Enum for TiletypeSpecial { - const NAME: &'static str = "TiletypeSpecial"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - -1 => ::std::option::Option::Some(TiletypeSpecial::NO_SPECIAL), - 0 => ::std::option::Option::Some(TiletypeSpecial::NORMAL), - 1 => ::std::option::Option::Some(TiletypeSpecial::RIVER_SOURCE), - 2 => ::std::option::Option::Some(TiletypeSpecial::WATERFALL), - 3 => ::std::option::Option::Some(TiletypeSpecial::SMOOTH), - 4 => ::std::option::Option::Some(TiletypeSpecial::FURROWED), - 5 => ::std::option::Option::Some(TiletypeSpecial::WET), - 6 => ::std::option::Option::Some(TiletypeSpecial::DEAD), - 7 => ::std::option::Option::Some(TiletypeSpecial::WORN_1), - 8 => ::std::option::Option::Some(TiletypeSpecial::WORN_2), - 9 => ::std::option::Option::Some(TiletypeSpecial::WORN_3), - 10 => ::std::option::Option::Some(TiletypeSpecial::TRACK), - 11 => ::std::option::Option::Some(TiletypeSpecial::SMOOTH_DEAD), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NO_SPECIAL" => ::std::option::Option::Some(TiletypeSpecial::NO_SPECIAL), - "NORMAL" => ::std::option::Option::Some(TiletypeSpecial::NORMAL), - "RIVER_SOURCE" => ::std::option::Option::Some(TiletypeSpecial::RIVER_SOURCE), - "WATERFALL" => ::std::option::Option::Some(TiletypeSpecial::WATERFALL), - "SMOOTH" => ::std::option::Option::Some(TiletypeSpecial::SMOOTH), - "FURROWED" => ::std::option::Option::Some(TiletypeSpecial::FURROWED), - "WET" => ::std::option::Option::Some(TiletypeSpecial::WET), - "DEAD" => ::std::option::Option::Some(TiletypeSpecial::DEAD), - "WORN_1" => ::std::option::Option::Some(TiletypeSpecial::WORN_1), - "WORN_2" => ::std::option::Option::Some(TiletypeSpecial::WORN_2), - "WORN_3" => ::std::option::Option::Some(TiletypeSpecial::WORN_3), - "TRACK" => ::std::option::Option::Some(TiletypeSpecial::TRACK), - "SMOOTH_DEAD" => ::std::option::Option::Some(TiletypeSpecial::SMOOTH_DEAD), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [TiletypeSpecial] = &[ - TiletypeSpecial::NO_SPECIAL, - TiletypeSpecial::NORMAL, - TiletypeSpecial::RIVER_SOURCE, - TiletypeSpecial::WATERFALL, - TiletypeSpecial::SMOOTH, - TiletypeSpecial::FURROWED, - TiletypeSpecial::WET, - TiletypeSpecial::DEAD, - TiletypeSpecial::WORN_1, - TiletypeSpecial::WORN_2, - TiletypeSpecial::WORN_3, - TiletypeSpecial::TRACK, - TiletypeSpecial::SMOOTH_DEAD, - ]; -} - -impl ::protobuf::EnumFull for TiletypeSpecial { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("TiletypeSpecial").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - TiletypeSpecial::NO_SPECIAL => 0, - TiletypeSpecial::NORMAL => 1, - TiletypeSpecial::RIVER_SOURCE => 2, - TiletypeSpecial::WATERFALL => 3, - TiletypeSpecial::SMOOTH => 4, - TiletypeSpecial::FURROWED => 5, - TiletypeSpecial::WET => 6, - TiletypeSpecial::DEAD => 7, - TiletypeSpecial::WORN_1 => 8, - TiletypeSpecial::WORN_2 => 9, - TiletypeSpecial::WORN_3 => 10, - TiletypeSpecial::TRACK => 11, - TiletypeSpecial::SMOOTH_DEAD => 12, - }; - Self::enum_descriptor().value_by_index(index) - } -} - -// Note, `Default` is implemented although default value is not 0 -impl ::std::default::Default for TiletypeSpecial { - fn default() -> Self { - TiletypeSpecial::NO_SPECIAL - } -} - -impl TiletypeSpecial { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TiletypeSpecial") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.TiletypeMaterial) -pub enum TiletypeMaterial { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.NO_MATERIAL) - NO_MATERIAL = -1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.AIR) - AIR = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.SOIL) - SOIL = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.STONE) - STONE = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.FEATURE) - FEATURE = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.LAVA_STONE) - LAVA_STONE = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.MINERAL) - MINERAL = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.FROZEN_LIQUID) - FROZEN_LIQUID = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.CONSTRUCTION) - CONSTRUCTION = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.GRASS_LIGHT) - GRASS_LIGHT = 8, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.GRASS_DARK) - GRASS_DARK = 9, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.GRASS_DRY) - GRASS_DRY = 10, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.GRASS_DEAD) - GRASS_DEAD = 11, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.PLANT) - PLANT = 12, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.HFS) - HFS = 13, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.CAMPFIRE) - CAMPFIRE = 14, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.FIRE) - FIRE = 15, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.ASHES) - ASHES = 16, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.MAGMA) - MAGMA = 17, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.DRIFTWOOD) - DRIFTWOOD = 18, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.POOL) - POOL = 19, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.BROOK) - BROOK = 20, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.RIVER) - RIVER = 21, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.ROOT) - ROOT = 22, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.TREE_MATERIAL) - TREE_MATERIAL = 23, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.MUSHROOM) - MUSHROOM = 24, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeMaterial.UNDERWORLD_GATE) - UNDERWORLD_GATE = 25, -} - -impl ::protobuf::Enum for TiletypeMaterial { - const NAME: &'static str = "TiletypeMaterial"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - -1 => ::std::option::Option::Some(TiletypeMaterial::NO_MATERIAL), - 0 => ::std::option::Option::Some(TiletypeMaterial::AIR), - 1 => ::std::option::Option::Some(TiletypeMaterial::SOIL), - 2 => ::std::option::Option::Some(TiletypeMaterial::STONE), - 3 => ::std::option::Option::Some(TiletypeMaterial::FEATURE), - 4 => ::std::option::Option::Some(TiletypeMaterial::LAVA_STONE), - 5 => ::std::option::Option::Some(TiletypeMaterial::MINERAL), - 6 => ::std::option::Option::Some(TiletypeMaterial::FROZEN_LIQUID), - 7 => ::std::option::Option::Some(TiletypeMaterial::CONSTRUCTION), - 8 => ::std::option::Option::Some(TiletypeMaterial::GRASS_LIGHT), - 9 => ::std::option::Option::Some(TiletypeMaterial::GRASS_DARK), - 10 => ::std::option::Option::Some(TiletypeMaterial::GRASS_DRY), - 11 => ::std::option::Option::Some(TiletypeMaterial::GRASS_DEAD), - 12 => ::std::option::Option::Some(TiletypeMaterial::PLANT), - 13 => ::std::option::Option::Some(TiletypeMaterial::HFS), - 14 => ::std::option::Option::Some(TiletypeMaterial::CAMPFIRE), - 15 => ::std::option::Option::Some(TiletypeMaterial::FIRE), - 16 => ::std::option::Option::Some(TiletypeMaterial::ASHES), - 17 => ::std::option::Option::Some(TiletypeMaterial::MAGMA), - 18 => ::std::option::Option::Some(TiletypeMaterial::DRIFTWOOD), - 19 => ::std::option::Option::Some(TiletypeMaterial::POOL), - 20 => ::std::option::Option::Some(TiletypeMaterial::BROOK), - 21 => ::std::option::Option::Some(TiletypeMaterial::RIVER), - 22 => ::std::option::Option::Some(TiletypeMaterial::ROOT), - 23 => ::std::option::Option::Some(TiletypeMaterial::TREE_MATERIAL), - 24 => ::std::option::Option::Some(TiletypeMaterial::MUSHROOM), - 25 => ::std::option::Option::Some(TiletypeMaterial::UNDERWORLD_GATE), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NO_MATERIAL" => ::std::option::Option::Some(TiletypeMaterial::NO_MATERIAL), - "AIR" => ::std::option::Option::Some(TiletypeMaterial::AIR), - "SOIL" => ::std::option::Option::Some(TiletypeMaterial::SOIL), - "STONE" => ::std::option::Option::Some(TiletypeMaterial::STONE), - "FEATURE" => ::std::option::Option::Some(TiletypeMaterial::FEATURE), - "LAVA_STONE" => ::std::option::Option::Some(TiletypeMaterial::LAVA_STONE), - "MINERAL" => ::std::option::Option::Some(TiletypeMaterial::MINERAL), - "FROZEN_LIQUID" => ::std::option::Option::Some(TiletypeMaterial::FROZEN_LIQUID), - "CONSTRUCTION" => ::std::option::Option::Some(TiletypeMaterial::CONSTRUCTION), - "GRASS_LIGHT" => ::std::option::Option::Some(TiletypeMaterial::GRASS_LIGHT), - "GRASS_DARK" => ::std::option::Option::Some(TiletypeMaterial::GRASS_DARK), - "GRASS_DRY" => ::std::option::Option::Some(TiletypeMaterial::GRASS_DRY), - "GRASS_DEAD" => ::std::option::Option::Some(TiletypeMaterial::GRASS_DEAD), - "PLANT" => ::std::option::Option::Some(TiletypeMaterial::PLANT), - "HFS" => ::std::option::Option::Some(TiletypeMaterial::HFS), - "CAMPFIRE" => ::std::option::Option::Some(TiletypeMaterial::CAMPFIRE), - "FIRE" => ::std::option::Option::Some(TiletypeMaterial::FIRE), - "ASHES" => ::std::option::Option::Some(TiletypeMaterial::ASHES), - "MAGMA" => ::std::option::Option::Some(TiletypeMaterial::MAGMA), - "DRIFTWOOD" => ::std::option::Option::Some(TiletypeMaterial::DRIFTWOOD), - "POOL" => ::std::option::Option::Some(TiletypeMaterial::POOL), - "BROOK" => ::std::option::Option::Some(TiletypeMaterial::BROOK), - "RIVER" => ::std::option::Option::Some(TiletypeMaterial::RIVER), - "ROOT" => ::std::option::Option::Some(TiletypeMaterial::ROOT), - "TREE_MATERIAL" => ::std::option::Option::Some(TiletypeMaterial::TREE_MATERIAL), - "MUSHROOM" => ::std::option::Option::Some(TiletypeMaterial::MUSHROOM), - "UNDERWORLD_GATE" => ::std::option::Option::Some(TiletypeMaterial::UNDERWORLD_GATE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [TiletypeMaterial] = &[ - TiletypeMaterial::NO_MATERIAL, - TiletypeMaterial::AIR, - TiletypeMaterial::SOIL, - TiletypeMaterial::STONE, - TiletypeMaterial::FEATURE, - TiletypeMaterial::LAVA_STONE, - TiletypeMaterial::MINERAL, - TiletypeMaterial::FROZEN_LIQUID, - TiletypeMaterial::CONSTRUCTION, - TiletypeMaterial::GRASS_LIGHT, - TiletypeMaterial::GRASS_DARK, - TiletypeMaterial::GRASS_DRY, - TiletypeMaterial::GRASS_DEAD, - TiletypeMaterial::PLANT, - TiletypeMaterial::HFS, - TiletypeMaterial::CAMPFIRE, - TiletypeMaterial::FIRE, - TiletypeMaterial::ASHES, - TiletypeMaterial::MAGMA, - TiletypeMaterial::DRIFTWOOD, - TiletypeMaterial::POOL, - TiletypeMaterial::BROOK, - TiletypeMaterial::RIVER, - TiletypeMaterial::ROOT, - TiletypeMaterial::TREE_MATERIAL, - TiletypeMaterial::MUSHROOM, - TiletypeMaterial::UNDERWORLD_GATE, - ]; -} - -impl ::protobuf::EnumFull for TiletypeMaterial { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("TiletypeMaterial").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - TiletypeMaterial::NO_MATERIAL => 0, - TiletypeMaterial::AIR => 1, - TiletypeMaterial::SOIL => 2, - TiletypeMaterial::STONE => 3, - TiletypeMaterial::FEATURE => 4, - TiletypeMaterial::LAVA_STONE => 5, - TiletypeMaterial::MINERAL => 6, - TiletypeMaterial::FROZEN_LIQUID => 7, - TiletypeMaterial::CONSTRUCTION => 8, - TiletypeMaterial::GRASS_LIGHT => 9, - TiletypeMaterial::GRASS_DARK => 10, - TiletypeMaterial::GRASS_DRY => 11, - TiletypeMaterial::GRASS_DEAD => 12, - TiletypeMaterial::PLANT => 13, - TiletypeMaterial::HFS => 14, - TiletypeMaterial::CAMPFIRE => 15, - TiletypeMaterial::FIRE => 16, - TiletypeMaterial::ASHES => 17, - TiletypeMaterial::MAGMA => 18, - TiletypeMaterial::DRIFTWOOD => 19, - TiletypeMaterial::POOL => 20, - TiletypeMaterial::BROOK => 21, - TiletypeMaterial::RIVER => 22, - TiletypeMaterial::ROOT => 23, - TiletypeMaterial::TREE_MATERIAL => 24, - TiletypeMaterial::MUSHROOM => 25, - TiletypeMaterial::UNDERWORLD_GATE => 26, - }; - Self::enum_descriptor().value_by_index(index) - } -} - -// Note, `Default` is implemented although default value is not 0 -impl ::std::default::Default for TiletypeMaterial { - fn default() -> Self { - TiletypeMaterial::NO_MATERIAL - } -} - -impl TiletypeMaterial { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TiletypeMaterial") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.TiletypeVariant) -pub enum TiletypeVariant { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeVariant.NO_VARIANT) - NO_VARIANT = -1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeVariant.VAR_1) - VAR_1 = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeVariant.VAR_2) - VAR_2 = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeVariant.VAR_3) - VAR_3 = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TiletypeVariant.VAR_4) - VAR_4 = 3, -} - -impl ::protobuf::Enum for TiletypeVariant { - const NAME: &'static str = "TiletypeVariant"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - -1 => ::std::option::Option::Some(TiletypeVariant::NO_VARIANT), - 0 => ::std::option::Option::Some(TiletypeVariant::VAR_1), - 1 => ::std::option::Option::Some(TiletypeVariant::VAR_2), - 2 => ::std::option::Option::Some(TiletypeVariant::VAR_3), - 3 => ::std::option::Option::Some(TiletypeVariant::VAR_4), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NO_VARIANT" => ::std::option::Option::Some(TiletypeVariant::NO_VARIANT), - "VAR_1" => ::std::option::Option::Some(TiletypeVariant::VAR_1), - "VAR_2" => ::std::option::Option::Some(TiletypeVariant::VAR_2), - "VAR_3" => ::std::option::Option::Some(TiletypeVariant::VAR_3), - "VAR_4" => ::std::option::Option::Some(TiletypeVariant::VAR_4), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [TiletypeVariant] = &[ - TiletypeVariant::NO_VARIANT, - TiletypeVariant::VAR_1, - TiletypeVariant::VAR_2, - TiletypeVariant::VAR_3, - TiletypeVariant::VAR_4, - ]; -} - -impl ::protobuf::EnumFull for TiletypeVariant { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("TiletypeVariant").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - TiletypeVariant::NO_VARIANT => 0, - TiletypeVariant::VAR_1 => 1, - TiletypeVariant::VAR_2 => 2, - TiletypeVariant::VAR_3 => 3, - TiletypeVariant::VAR_4 => 4, - }; - Self::enum_descriptor().value_by_index(index) - } -} - -// Note, `Default` is implemented although default value is not 0 -impl ::std::default::Default for TiletypeVariant { - fn default() -> Self { - TiletypeVariant::NO_VARIANT - } -} - -impl TiletypeVariant { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TiletypeVariant") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.WorldPoles) -pub enum WorldPoles { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.WorldPoles.NO_POLES) - NO_POLES = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.WorldPoles.NORTH_POLE) - NORTH_POLE = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.WorldPoles.SOUTH_POLE) - SOUTH_POLE = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.WorldPoles.BOTH_POLES) - BOTH_POLES = 3, -} - -impl ::protobuf::Enum for WorldPoles { - const NAME: &'static str = "WorldPoles"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(WorldPoles::NO_POLES), - 1 => ::std::option::Option::Some(WorldPoles::NORTH_POLE), - 2 => ::std::option::Option::Some(WorldPoles::SOUTH_POLE), - 3 => ::std::option::Option::Some(WorldPoles::BOTH_POLES), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NO_POLES" => ::std::option::Option::Some(WorldPoles::NO_POLES), - "NORTH_POLE" => ::std::option::Option::Some(WorldPoles::NORTH_POLE), - "SOUTH_POLE" => ::std::option::Option::Some(WorldPoles::SOUTH_POLE), - "BOTH_POLES" => ::std::option::Option::Some(WorldPoles::BOTH_POLES), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [WorldPoles] = &[ - WorldPoles::NO_POLES, - WorldPoles::NORTH_POLE, - WorldPoles::SOUTH_POLE, - WorldPoles::BOTH_POLES, - ]; -} - -impl ::protobuf::EnumFull for WorldPoles { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("WorldPoles").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for WorldPoles { - fn default() -> Self { - WorldPoles::NO_POLES - } -} - -impl WorldPoles { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("WorldPoles") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.BuildingDirection) -pub enum BuildingDirection { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.NORTH) - NORTH = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.EAST) - EAST = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.SOUTH) - SOUTH = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.WEST) - WEST = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.NORTHEAST) - NORTHEAST = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.SOUTHEAST) - SOUTHEAST = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.SOUTHWEST) - SOUTHWEST = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.NORTHWEST) - NORTHWEST = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.BuildingDirection.NONE) - NONE = 8, -} - -impl ::protobuf::Enum for BuildingDirection { - const NAME: &'static str = "BuildingDirection"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BuildingDirection::NORTH), - 1 => ::std::option::Option::Some(BuildingDirection::EAST), - 2 => ::std::option::Option::Some(BuildingDirection::SOUTH), - 3 => ::std::option::Option::Some(BuildingDirection::WEST), - 4 => ::std::option::Option::Some(BuildingDirection::NORTHEAST), - 5 => ::std::option::Option::Some(BuildingDirection::SOUTHEAST), - 6 => ::std::option::Option::Some(BuildingDirection::SOUTHWEST), - 7 => ::std::option::Option::Some(BuildingDirection::NORTHWEST), - 8 => ::std::option::Option::Some(BuildingDirection::NONE), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NORTH" => ::std::option::Option::Some(BuildingDirection::NORTH), - "EAST" => ::std::option::Option::Some(BuildingDirection::EAST), - "SOUTH" => ::std::option::Option::Some(BuildingDirection::SOUTH), - "WEST" => ::std::option::Option::Some(BuildingDirection::WEST), - "NORTHEAST" => ::std::option::Option::Some(BuildingDirection::NORTHEAST), - "SOUTHEAST" => ::std::option::Option::Some(BuildingDirection::SOUTHEAST), - "SOUTHWEST" => ::std::option::Option::Some(BuildingDirection::SOUTHWEST), - "NORTHWEST" => ::std::option::Option::Some(BuildingDirection::NORTHWEST), - "NONE" => ::std::option::Option::Some(BuildingDirection::NONE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [BuildingDirection] = &[ - BuildingDirection::NORTH, - BuildingDirection::EAST, - BuildingDirection::SOUTH, - BuildingDirection::WEST, - BuildingDirection::NORTHEAST, - BuildingDirection::SOUTHEAST, - BuildingDirection::SOUTHWEST, - BuildingDirection::NORTHWEST, - BuildingDirection::NONE, - ]; -} - -impl ::protobuf::EnumFull for BuildingDirection { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("BuildingDirection").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for BuildingDirection { - fn default() -> Self { - BuildingDirection::NORTH - } -} - -impl BuildingDirection { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BuildingDirection") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.TileDigDesignation) -pub enum TileDigDesignation { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.NO_DIG) - NO_DIG = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.DEFAULT_DIG) - DEFAULT_DIG = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.UP_DOWN_STAIR_DIG) - UP_DOWN_STAIR_DIG = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.CHANNEL_DIG) - CHANNEL_DIG = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.RAMP_DIG) - RAMP_DIG = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.DOWN_STAIR_DIG) - DOWN_STAIR_DIG = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.TileDigDesignation.UP_STAIR_DIG) - UP_STAIR_DIG = 6, -} - -impl ::protobuf::Enum for TileDigDesignation { - const NAME: &'static str = "TileDigDesignation"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(TileDigDesignation::NO_DIG), - 1 => ::std::option::Option::Some(TileDigDesignation::DEFAULT_DIG), - 2 => ::std::option::Option::Some(TileDigDesignation::UP_DOWN_STAIR_DIG), - 3 => ::std::option::Option::Some(TileDigDesignation::CHANNEL_DIG), - 4 => ::std::option::Option::Some(TileDigDesignation::RAMP_DIG), - 5 => ::std::option::Option::Some(TileDigDesignation::DOWN_STAIR_DIG), - 6 => ::std::option::Option::Some(TileDigDesignation::UP_STAIR_DIG), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "NO_DIG" => ::std::option::Option::Some(TileDigDesignation::NO_DIG), - "DEFAULT_DIG" => ::std::option::Option::Some(TileDigDesignation::DEFAULT_DIG), - "UP_DOWN_STAIR_DIG" => ::std::option::Option::Some(TileDigDesignation::UP_DOWN_STAIR_DIG), - "CHANNEL_DIG" => ::std::option::Option::Some(TileDigDesignation::CHANNEL_DIG), - "RAMP_DIG" => ::std::option::Option::Some(TileDigDesignation::RAMP_DIG), - "DOWN_STAIR_DIG" => ::std::option::Option::Some(TileDigDesignation::DOWN_STAIR_DIG), - "UP_STAIR_DIG" => ::std::option::Option::Some(TileDigDesignation::UP_STAIR_DIG), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [TileDigDesignation] = &[ - TileDigDesignation::NO_DIG, - TileDigDesignation::DEFAULT_DIG, - TileDigDesignation::UP_DOWN_STAIR_DIG, - TileDigDesignation::CHANNEL_DIG, - TileDigDesignation::RAMP_DIG, - TileDigDesignation::DOWN_STAIR_DIG, - TileDigDesignation::UP_STAIR_DIG, - ]; -} - -impl ::protobuf::EnumFull for TileDigDesignation { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("TileDigDesignation").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for TileDigDesignation { - fn default() -> Self { - TileDigDesignation::NO_DIG - } -} - -impl TileDigDesignation { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TileDigDesignation") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.HairStyle) -pub enum HairStyle { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.HairStyle.UNKEMPT) - UNKEMPT = -1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.HairStyle.NEATLY_COMBED) - NEATLY_COMBED = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.HairStyle.BRAIDED) - BRAIDED = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.HairStyle.DOUBLE_BRAID) - DOUBLE_BRAID = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.HairStyle.PONY_TAILS) - PONY_TAILS = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.HairStyle.CLEAN_SHAVEN) - CLEAN_SHAVEN = 4, -} - -impl ::protobuf::Enum for HairStyle { - const NAME: &'static str = "HairStyle"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - -1 => ::std::option::Option::Some(HairStyle::UNKEMPT), - 0 => ::std::option::Option::Some(HairStyle::NEATLY_COMBED), - 1 => ::std::option::Option::Some(HairStyle::BRAIDED), - 2 => ::std::option::Option::Some(HairStyle::DOUBLE_BRAID), - 3 => ::std::option::Option::Some(HairStyle::PONY_TAILS), - 4 => ::std::option::Option::Some(HairStyle::CLEAN_SHAVEN), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "UNKEMPT" => ::std::option::Option::Some(HairStyle::UNKEMPT), - "NEATLY_COMBED" => ::std::option::Option::Some(HairStyle::NEATLY_COMBED), - "BRAIDED" => ::std::option::Option::Some(HairStyle::BRAIDED), - "DOUBLE_BRAID" => ::std::option::Option::Some(HairStyle::DOUBLE_BRAID), - "PONY_TAILS" => ::std::option::Option::Some(HairStyle::PONY_TAILS), - "CLEAN_SHAVEN" => ::std::option::Option::Some(HairStyle::CLEAN_SHAVEN), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [HairStyle] = &[ - HairStyle::UNKEMPT, - HairStyle::NEATLY_COMBED, - HairStyle::BRAIDED, - HairStyle::DOUBLE_BRAID, - HairStyle::PONY_TAILS, - HairStyle::CLEAN_SHAVEN, - ]; -} - -impl ::protobuf::EnumFull for HairStyle { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("HairStyle").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - HairStyle::UNKEMPT => 0, - HairStyle::NEATLY_COMBED => 1, - HairStyle::BRAIDED => 2, - HairStyle::DOUBLE_BRAID => 3, - HairStyle::PONY_TAILS => 4, - HairStyle::CLEAN_SHAVEN => 5, - }; - Self::enum_descriptor().value_by_index(index) - } -} - -// Note, `Default` is implemented although default value is not 0 -impl ::std::default::Default for HairStyle { - fn default() -> Self { - HairStyle::UNKEMPT - } -} - -impl HairStyle { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("HairStyle") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.InventoryMode) -pub enum InventoryMode { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Hauled) - Hauled = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Weapon) - Weapon = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Worn) - Worn = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Piercing) - Piercing = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Flask) - Flask = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.WrappedAround) - WrappedAround = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.StuckIn) - StuckIn = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.InMouth) - InMouth = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Pet) - Pet = 8, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.SewnInto) - SewnInto = 9, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.InventoryMode.Strapped) - Strapped = 10, -} - -impl ::protobuf::Enum for InventoryMode { - const NAME: &'static str = "InventoryMode"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(InventoryMode::Hauled), - 1 => ::std::option::Option::Some(InventoryMode::Weapon), - 2 => ::std::option::Option::Some(InventoryMode::Worn), - 3 => ::std::option::Option::Some(InventoryMode::Piercing), - 4 => ::std::option::Option::Some(InventoryMode::Flask), - 5 => ::std::option::Option::Some(InventoryMode::WrappedAround), - 6 => ::std::option::Option::Some(InventoryMode::StuckIn), - 7 => ::std::option::Option::Some(InventoryMode::InMouth), - 8 => ::std::option::Option::Some(InventoryMode::Pet), - 9 => ::std::option::Option::Some(InventoryMode::SewnInto), - 10 => ::std::option::Option::Some(InventoryMode::Strapped), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "Hauled" => ::std::option::Option::Some(InventoryMode::Hauled), - "Weapon" => ::std::option::Option::Some(InventoryMode::Weapon), - "Worn" => ::std::option::Option::Some(InventoryMode::Worn), - "Piercing" => ::std::option::Option::Some(InventoryMode::Piercing), - "Flask" => ::std::option::Option::Some(InventoryMode::Flask), - "WrappedAround" => ::std::option::Option::Some(InventoryMode::WrappedAround), - "StuckIn" => ::std::option::Option::Some(InventoryMode::StuckIn), - "InMouth" => ::std::option::Option::Some(InventoryMode::InMouth), - "Pet" => ::std::option::Option::Some(InventoryMode::Pet), - "SewnInto" => ::std::option::Option::Some(InventoryMode::SewnInto), - "Strapped" => ::std::option::Option::Some(InventoryMode::Strapped), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [InventoryMode] = &[ - InventoryMode::Hauled, - InventoryMode::Weapon, - InventoryMode::Worn, - InventoryMode::Piercing, - InventoryMode::Flask, - InventoryMode::WrappedAround, - InventoryMode::StuckIn, - InventoryMode::InMouth, - InventoryMode::Pet, - InventoryMode::SewnInto, - InventoryMode::Strapped, - ]; -} - -impl ::protobuf::EnumFull for InventoryMode { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("InventoryMode").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for InventoryMode { - fn default() -> Self { - InventoryMode::Hauled - } -} - -impl InventoryMode { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("InventoryMode") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.ArmorLayer) -pub enum ArmorLayer { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArmorLayer.LAYER_UNDER) - LAYER_UNDER = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArmorLayer.LAYER_OVER) - LAYER_OVER = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArmorLayer.LAYER_ARMOR) - LAYER_ARMOR = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArmorLayer.LAYER_COVER) - LAYER_COVER = 3, -} - -impl ::protobuf::Enum for ArmorLayer { - const NAME: &'static str = "ArmorLayer"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ArmorLayer::LAYER_UNDER), - 1 => ::std::option::Option::Some(ArmorLayer::LAYER_OVER), - 2 => ::std::option::Option::Some(ArmorLayer::LAYER_ARMOR), - 3 => ::std::option::Option::Some(ArmorLayer::LAYER_COVER), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "LAYER_UNDER" => ::std::option::Option::Some(ArmorLayer::LAYER_UNDER), - "LAYER_OVER" => ::std::option::Option::Some(ArmorLayer::LAYER_OVER), - "LAYER_ARMOR" => ::std::option::Option::Some(ArmorLayer::LAYER_ARMOR), - "LAYER_COVER" => ::std::option::Option::Some(ArmorLayer::LAYER_COVER), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ArmorLayer] = &[ - ArmorLayer::LAYER_UNDER, - ArmorLayer::LAYER_OVER, - ArmorLayer::LAYER_ARMOR, - ArmorLayer::LAYER_COVER, - ]; -} - -impl ::protobuf::EnumFull for ArmorLayer { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("ArmorLayer").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for ArmorLayer { - fn default() -> Self { - ArmorLayer::LAYER_UNDER - } -} - -impl ArmorLayer { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ArmorLayer") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.MatterState) -pub enum MatterState { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.MatterState.Solid) - Solid = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.MatterState.Liquid) - Liquid = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.MatterState.Gas) - Gas = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.MatterState.Powder) - Powder = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.MatterState.Paste) - Paste = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.MatterState.Pressed) - Pressed = 5, -} - -impl ::protobuf::Enum for MatterState { - const NAME: &'static str = "MatterState"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(MatterState::Solid), - 1 => ::std::option::Option::Some(MatterState::Liquid), - 2 => ::std::option::Option::Some(MatterState::Gas), - 3 => ::std::option::Option::Some(MatterState::Powder), - 4 => ::std::option::Option::Some(MatterState::Paste), - 5 => ::std::option::Option::Some(MatterState::Pressed), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "Solid" => ::std::option::Option::Some(MatterState::Solid), - "Liquid" => ::std::option::Option::Some(MatterState::Liquid), - "Gas" => ::std::option::Option::Some(MatterState::Gas), - "Powder" => ::std::option::Option::Some(MatterState::Powder), - "Paste" => ::std::option::Option::Some(MatterState::Paste), - "Pressed" => ::std::option::Option::Some(MatterState::Pressed), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [MatterState] = &[ - MatterState::Solid, - MatterState::Liquid, - MatterState::Gas, - MatterState::Powder, - MatterState::Paste, - MatterState::Pressed, - ]; -} - -impl ::protobuf::EnumFull for MatterState { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("MatterState").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for MatterState { - fn default() -> Self { - MatterState::Solid - } -} - -impl MatterState { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("MatterState") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.FrontType) -pub enum FrontType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FrontType.FRONT_NONE) - FRONT_NONE = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FrontType.FRONT_WARM) - FRONT_WARM = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FrontType.FRONT_COLD) - FRONT_COLD = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FrontType.FRONT_OCCLUDED) - FRONT_OCCLUDED = 3, -} - -impl ::protobuf::Enum for FrontType { - const NAME: &'static str = "FrontType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(FrontType::FRONT_NONE), - 1 => ::std::option::Option::Some(FrontType::FRONT_WARM), - 2 => ::std::option::Option::Some(FrontType::FRONT_COLD), - 3 => ::std::option::Option::Some(FrontType::FRONT_OCCLUDED), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "FRONT_NONE" => ::std::option::Option::Some(FrontType::FRONT_NONE), - "FRONT_WARM" => ::std::option::Option::Some(FrontType::FRONT_WARM), - "FRONT_COLD" => ::std::option::Option::Some(FrontType::FRONT_COLD), - "FRONT_OCCLUDED" => ::std::option::Option::Some(FrontType::FRONT_OCCLUDED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [FrontType] = &[ - FrontType::FRONT_NONE, - FrontType::FRONT_WARM, - FrontType::FRONT_COLD, - FrontType::FRONT_OCCLUDED, - ]; -} - -impl ::protobuf::EnumFull for FrontType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("FrontType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for FrontType { - fn default() -> Self { - FrontType::FRONT_NONE - } -} - -impl FrontType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("FrontType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.CumulusType) -pub enum CumulusType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.CumulusType.CUMULUS_NONE) - CUMULUS_NONE = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.CumulusType.CUMULUS_MEDIUM) - CUMULUS_MEDIUM = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.CumulusType.CUMULUS_MULTI) - CUMULUS_MULTI = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.CumulusType.CUMULUS_NIMBUS) - CUMULUS_NIMBUS = 3, -} - -impl ::protobuf::Enum for CumulusType { - const NAME: &'static str = "CumulusType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(CumulusType::CUMULUS_NONE), - 1 => ::std::option::Option::Some(CumulusType::CUMULUS_MEDIUM), - 2 => ::std::option::Option::Some(CumulusType::CUMULUS_MULTI), - 3 => ::std::option::Option::Some(CumulusType::CUMULUS_NIMBUS), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "CUMULUS_NONE" => ::std::option::Option::Some(CumulusType::CUMULUS_NONE), - "CUMULUS_MEDIUM" => ::std::option::Option::Some(CumulusType::CUMULUS_MEDIUM), - "CUMULUS_MULTI" => ::std::option::Option::Some(CumulusType::CUMULUS_MULTI), - "CUMULUS_NIMBUS" => ::std::option::Option::Some(CumulusType::CUMULUS_NIMBUS), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [CumulusType] = &[ - CumulusType::CUMULUS_NONE, - CumulusType::CUMULUS_MEDIUM, - CumulusType::CUMULUS_MULTI, - CumulusType::CUMULUS_NIMBUS, - ]; -} - -impl ::protobuf::EnumFull for CumulusType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("CumulusType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for CumulusType { - fn default() -> Self { - CumulusType::CUMULUS_NONE - } -} - -impl CumulusType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("CumulusType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.StratusType) -pub enum StratusType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.StratusType.STRATUS_NONE) - STRATUS_NONE = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.StratusType.STRATUS_ALTO) - STRATUS_ALTO = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.StratusType.STRATUS_PROPER) - STRATUS_PROPER = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.StratusType.STRATUS_NIMBUS) - STRATUS_NIMBUS = 3, -} - -impl ::protobuf::Enum for StratusType { - const NAME: &'static str = "StratusType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(StratusType::STRATUS_NONE), - 1 => ::std::option::Option::Some(StratusType::STRATUS_ALTO), - 2 => ::std::option::Option::Some(StratusType::STRATUS_PROPER), - 3 => ::std::option::Option::Some(StratusType::STRATUS_NIMBUS), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "STRATUS_NONE" => ::std::option::Option::Some(StratusType::STRATUS_NONE), - "STRATUS_ALTO" => ::std::option::Option::Some(StratusType::STRATUS_ALTO), - "STRATUS_PROPER" => ::std::option::Option::Some(StratusType::STRATUS_PROPER), - "STRATUS_NIMBUS" => ::std::option::Option::Some(StratusType::STRATUS_NIMBUS), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [StratusType] = &[ - StratusType::STRATUS_NONE, - StratusType::STRATUS_ALTO, - StratusType::STRATUS_PROPER, - StratusType::STRATUS_NIMBUS, - ]; -} - -impl ::protobuf::EnumFull for StratusType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("StratusType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for StratusType { - fn default() -> Self { - StratusType::STRATUS_NONE - } -} - -impl StratusType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("StratusType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.FogType) -pub enum FogType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FogType.FOG_NONE) - FOG_NONE = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FogType.FOG_MIST) - FOG_MIST = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FogType.FOG_NORMAL) - FOG_NORMAL = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FogType.F0G_THICK) - F0G_THICK = 3, -} - -impl ::protobuf::Enum for FogType { - const NAME: &'static str = "FogType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(FogType::FOG_NONE), - 1 => ::std::option::Option::Some(FogType::FOG_MIST), - 2 => ::std::option::Option::Some(FogType::FOG_NORMAL), - 3 => ::std::option::Option::Some(FogType::F0G_THICK), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "FOG_NONE" => ::std::option::Option::Some(FogType::FOG_NONE), - "FOG_MIST" => ::std::option::Option::Some(FogType::FOG_MIST), - "FOG_NORMAL" => ::std::option::Option::Some(FogType::FOG_NORMAL), - "F0G_THICK" => ::std::option::Option::Some(FogType::F0G_THICK), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [FogType] = &[ - FogType::FOG_NONE, - FogType::FOG_MIST, - FogType::FOG_NORMAL, - FogType::F0G_THICK, - ]; -} - -impl ::protobuf::EnumFull for FogType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("FogType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for FogType { - fn default() -> Self { - FogType::FOG_NONE - } -} - -impl FogType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("FogType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.PatternType) -pub enum PatternType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.PatternType.MONOTONE) - MONOTONE = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.PatternType.STRIPES) - STRIPES = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.PatternType.IRIS_EYE) - IRIS_EYE = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.PatternType.SPOTS) - SPOTS = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.PatternType.PUPIL_EYE) - PUPIL_EYE = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.PatternType.MOTTLED) - MOTTLED = 5, -} - -impl ::protobuf::Enum for PatternType { - const NAME: &'static str = "PatternType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(PatternType::MONOTONE), - 1 => ::std::option::Option::Some(PatternType::STRIPES), - 2 => ::std::option::Option::Some(PatternType::IRIS_EYE), - 3 => ::std::option::Option::Some(PatternType::SPOTS), - 4 => ::std::option::Option::Some(PatternType::PUPIL_EYE), - 5 => ::std::option::Option::Some(PatternType::MOTTLED), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "MONOTONE" => ::std::option::Option::Some(PatternType::MONOTONE), - "STRIPES" => ::std::option::Option::Some(PatternType::STRIPES), - "IRIS_EYE" => ::std::option::Option::Some(PatternType::IRIS_EYE), - "SPOTS" => ::std::option::Option::Some(PatternType::SPOTS), - "PUPIL_EYE" => ::std::option::Option::Some(PatternType::PUPIL_EYE), - "MOTTLED" => ::std::option::Option::Some(PatternType::MOTTLED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [PatternType] = &[ - PatternType::MONOTONE, - PatternType::STRIPES, - PatternType::IRIS_EYE, - PatternType::SPOTS, - PatternType::PUPIL_EYE, - PatternType::MOTTLED, - ]; -} - -impl ::protobuf::EnumFull for PatternType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("PatternType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for PatternType { - fn default() -> Self { - PatternType::MONOTONE - } -} - -impl PatternType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("PatternType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.ArtImageElementType) -pub enum ArtImageElementType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageElementType.IMAGE_CREATURE) - IMAGE_CREATURE = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageElementType.IMAGE_PLANT) - IMAGE_PLANT = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageElementType.IMAGE_TREE) - IMAGE_TREE = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageElementType.IMAGE_SHAPE) - IMAGE_SHAPE = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageElementType.IMAGE_ITEM) - IMAGE_ITEM = 4, -} - -impl ::protobuf::Enum for ArtImageElementType { - const NAME: &'static str = "ArtImageElementType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ArtImageElementType::IMAGE_CREATURE), - 1 => ::std::option::Option::Some(ArtImageElementType::IMAGE_PLANT), - 2 => ::std::option::Option::Some(ArtImageElementType::IMAGE_TREE), - 3 => ::std::option::Option::Some(ArtImageElementType::IMAGE_SHAPE), - 4 => ::std::option::Option::Some(ArtImageElementType::IMAGE_ITEM), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "IMAGE_CREATURE" => ::std::option::Option::Some(ArtImageElementType::IMAGE_CREATURE), - "IMAGE_PLANT" => ::std::option::Option::Some(ArtImageElementType::IMAGE_PLANT), - "IMAGE_TREE" => ::std::option::Option::Some(ArtImageElementType::IMAGE_TREE), - "IMAGE_SHAPE" => ::std::option::Option::Some(ArtImageElementType::IMAGE_SHAPE), - "IMAGE_ITEM" => ::std::option::Option::Some(ArtImageElementType::IMAGE_ITEM), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ArtImageElementType] = &[ - ArtImageElementType::IMAGE_CREATURE, - ArtImageElementType::IMAGE_PLANT, - ArtImageElementType::IMAGE_TREE, - ArtImageElementType::IMAGE_SHAPE, - ArtImageElementType::IMAGE_ITEM, - ]; -} - -impl ::protobuf::EnumFull for ArtImageElementType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("ArtImageElementType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for ArtImageElementType { - fn default() -> Self { - ArtImageElementType::IMAGE_CREATURE - } -} - -impl ArtImageElementType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ArtImageElementType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.ArtImagePropertyType) -pub enum ArtImagePropertyType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImagePropertyType.TRANSITIVE_VERB) - TRANSITIVE_VERB = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImagePropertyType.INTRANSITIVE_VERB) - INTRANSITIVE_VERB = 1, -} - -impl ::protobuf::Enum for ArtImagePropertyType { - const NAME: &'static str = "ArtImagePropertyType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ArtImagePropertyType::TRANSITIVE_VERB), - 1 => ::std::option::Option::Some(ArtImagePropertyType::INTRANSITIVE_VERB), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "TRANSITIVE_VERB" => ::std::option::Option::Some(ArtImagePropertyType::TRANSITIVE_VERB), - "INTRANSITIVE_VERB" => ::std::option::Option::Some(ArtImagePropertyType::INTRANSITIVE_VERB), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ArtImagePropertyType] = &[ - ArtImagePropertyType::TRANSITIVE_VERB, - ArtImagePropertyType::INTRANSITIVE_VERB, - ]; -} - -impl ::protobuf::EnumFull for ArtImagePropertyType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("ArtImagePropertyType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for ArtImagePropertyType { - fn default() -> Self { - ArtImagePropertyType::TRANSITIVE_VERB - } -} - -impl ArtImagePropertyType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ArtImagePropertyType") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.ArtImageVerb) -pub enum ArtImageVerb { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_WITHERING) - VERB_WITHERING = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SURROUNDEDBY) - VERB_SURROUNDEDBY = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_MASSACRING) - VERB_MASSACRING = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_FIGHTING) - VERB_FIGHTING = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_LABORING) - VERB_LABORING = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_GREETING) - VERB_GREETING = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_REFUSING) - VERB_REFUSING = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SPEAKING) - VERB_SPEAKING = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_EMBRACING) - VERB_EMBRACING = 8, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_STRIKINGDOWN) - VERB_STRIKINGDOWN = 9, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_MENACINGPOSE) - VERB_MENACINGPOSE = 10, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_TRAVELING) - VERB_TRAVELING = 11, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_RAISING) - VERB_RAISING = 12, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_HIDING) - VERB_HIDING = 13, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_LOOKINGCONFUSED) - VERB_LOOKINGCONFUSED = 14, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_LOOKINGTERRIFIED) - VERB_LOOKINGTERRIFIED = 15, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_DEVOURING) - VERB_DEVOURING = 16, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_ADMIRING) - VERB_ADMIRING = 17, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_BURNING) - VERB_BURNING = 18, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_WEEPING) - VERB_WEEPING = 19, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_LOOKINGDEJECTED) - VERB_LOOKINGDEJECTED = 20, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_CRINGING) - VERB_CRINGING = 21, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SCREAMING) - VERB_SCREAMING = 22, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SUBMISSIVEGESTURE) - VERB_SUBMISSIVEGESTURE = 23, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_FETALPOSITION) - VERB_FETALPOSITION = 24, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SMEAREDINTOSPIRAL) - VERB_SMEAREDINTOSPIRAL = 25, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_FALLING) - VERB_FALLING = 26, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_DEAD) - VERB_DEAD = 27, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_LAUGHING) - VERB_LAUGHING = 28, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_LOOKINGOFFENDED) - VERB_LOOKINGOFFENDED = 29, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_BEINGSHOT) - VERB_BEINGSHOT = 30, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_PLAINTIVEGESTURE) - VERB_PLAINTIVEGESTURE = 31, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_MELTING) - VERB_MELTING = 32, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SHOOTING) - VERB_SHOOTING = 33, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_TORTURING) - VERB_TORTURING = 34, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_COMMITTINGDEPRAVEDACT) - VERB_COMMITTINGDEPRAVEDACT = 35, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_PRAYING) - VERB_PRAYING = 36, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_CONTEMPLATING) - VERB_CONTEMPLATING = 37, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_COOKING) - VERB_COOKING = 38, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_ENGRAVING) - VERB_ENGRAVING = 39, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_PROSTRATING) - VERB_PROSTRATING = 40, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_SUFFERING) - VERB_SUFFERING = 41, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_BEINGIMPALED) - VERB_BEINGIMPALED = 42, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_BEINGCONTORTED) - VERB_BEINGCONTORTED = 43, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_BEINGFLAYED) - VERB_BEINGFLAYED = 44, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_HANGINGFROM) - VERB_HANGINGFROM = 45, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_BEINGMUTILATED) - VERB_BEINGMUTILATED = 46, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.ArtImageVerb.VERB_TRIUMPHANTPOSE) - VERB_TRIUMPHANTPOSE = 47, -} - -impl ::protobuf::Enum for ArtImageVerb { - const NAME: &'static str = "ArtImageVerb"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ArtImageVerb::VERB_WITHERING), - 1 => ::std::option::Option::Some(ArtImageVerb::VERB_SURROUNDEDBY), - 2 => ::std::option::Option::Some(ArtImageVerb::VERB_MASSACRING), - 3 => ::std::option::Option::Some(ArtImageVerb::VERB_FIGHTING), - 4 => ::std::option::Option::Some(ArtImageVerb::VERB_LABORING), - 5 => ::std::option::Option::Some(ArtImageVerb::VERB_GREETING), - 6 => ::std::option::Option::Some(ArtImageVerb::VERB_REFUSING), - 7 => ::std::option::Option::Some(ArtImageVerb::VERB_SPEAKING), - 8 => ::std::option::Option::Some(ArtImageVerb::VERB_EMBRACING), - 9 => ::std::option::Option::Some(ArtImageVerb::VERB_STRIKINGDOWN), - 10 => ::std::option::Option::Some(ArtImageVerb::VERB_MENACINGPOSE), - 11 => ::std::option::Option::Some(ArtImageVerb::VERB_TRAVELING), - 12 => ::std::option::Option::Some(ArtImageVerb::VERB_RAISING), - 13 => ::std::option::Option::Some(ArtImageVerb::VERB_HIDING), - 14 => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGCONFUSED), - 15 => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGTERRIFIED), - 16 => ::std::option::Option::Some(ArtImageVerb::VERB_DEVOURING), - 17 => ::std::option::Option::Some(ArtImageVerb::VERB_ADMIRING), - 18 => ::std::option::Option::Some(ArtImageVerb::VERB_BURNING), - 19 => ::std::option::Option::Some(ArtImageVerb::VERB_WEEPING), - 20 => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGDEJECTED), - 21 => ::std::option::Option::Some(ArtImageVerb::VERB_CRINGING), - 22 => ::std::option::Option::Some(ArtImageVerb::VERB_SCREAMING), - 23 => ::std::option::Option::Some(ArtImageVerb::VERB_SUBMISSIVEGESTURE), - 24 => ::std::option::Option::Some(ArtImageVerb::VERB_FETALPOSITION), - 25 => ::std::option::Option::Some(ArtImageVerb::VERB_SMEAREDINTOSPIRAL), - 26 => ::std::option::Option::Some(ArtImageVerb::VERB_FALLING), - 27 => ::std::option::Option::Some(ArtImageVerb::VERB_DEAD), - 28 => ::std::option::Option::Some(ArtImageVerb::VERB_LAUGHING), - 29 => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGOFFENDED), - 30 => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGSHOT), - 31 => ::std::option::Option::Some(ArtImageVerb::VERB_PLAINTIVEGESTURE), - 32 => ::std::option::Option::Some(ArtImageVerb::VERB_MELTING), - 33 => ::std::option::Option::Some(ArtImageVerb::VERB_SHOOTING), - 34 => ::std::option::Option::Some(ArtImageVerb::VERB_TORTURING), - 35 => ::std::option::Option::Some(ArtImageVerb::VERB_COMMITTINGDEPRAVEDACT), - 36 => ::std::option::Option::Some(ArtImageVerb::VERB_PRAYING), - 37 => ::std::option::Option::Some(ArtImageVerb::VERB_CONTEMPLATING), - 38 => ::std::option::Option::Some(ArtImageVerb::VERB_COOKING), - 39 => ::std::option::Option::Some(ArtImageVerb::VERB_ENGRAVING), - 40 => ::std::option::Option::Some(ArtImageVerb::VERB_PROSTRATING), - 41 => ::std::option::Option::Some(ArtImageVerb::VERB_SUFFERING), - 42 => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGIMPALED), - 43 => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGCONTORTED), - 44 => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGFLAYED), - 45 => ::std::option::Option::Some(ArtImageVerb::VERB_HANGINGFROM), - 46 => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGMUTILATED), - 47 => ::std::option::Option::Some(ArtImageVerb::VERB_TRIUMPHANTPOSE), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "VERB_WITHERING" => ::std::option::Option::Some(ArtImageVerb::VERB_WITHERING), - "VERB_SURROUNDEDBY" => ::std::option::Option::Some(ArtImageVerb::VERB_SURROUNDEDBY), - "VERB_MASSACRING" => ::std::option::Option::Some(ArtImageVerb::VERB_MASSACRING), - "VERB_FIGHTING" => ::std::option::Option::Some(ArtImageVerb::VERB_FIGHTING), - "VERB_LABORING" => ::std::option::Option::Some(ArtImageVerb::VERB_LABORING), - "VERB_GREETING" => ::std::option::Option::Some(ArtImageVerb::VERB_GREETING), - "VERB_REFUSING" => ::std::option::Option::Some(ArtImageVerb::VERB_REFUSING), - "VERB_SPEAKING" => ::std::option::Option::Some(ArtImageVerb::VERB_SPEAKING), - "VERB_EMBRACING" => ::std::option::Option::Some(ArtImageVerb::VERB_EMBRACING), - "VERB_STRIKINGDOWN" => ::std::option::Option::Some(ArtImageVerb::VERB_STRIKINGDOWN), - "VERB_MENACINGPOSE" => ::std::option::Option::Some(ArtImageVerb::VERB_MENACINGPOSE), - "VERB_TRAVELING" => ::std::option::Option::Some(ArtImageVerb::VERB_TRAVELING), - "VERB_RAISING" => ::std::option::Option::Some(ArtImageVerb::VERB_RAISING), - "VERB_HIDING" => ::std::option::Option::Some(ArtImageVerb::VERB_HIDING), - "VERB_LOOKINGCONFUSED" => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGCONFUSED), - "VERB_LOOKINGTERRIFIED" => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGTERRIFIED), - "VERB_DEVOURING" => ::std::option::Option::Some(ArtImageVerb::VERB_DEVOURING), - "VERB_ADMIRING" => ::std::option::Option::Some(ArtImageVerb::VERB_ADMIRING), - "VERB_BURNING" => ::std::option::Option::Some(ArtImageVerb::VERB_BURNING), - "VERB_WEEPING" => ::std::option::Option::Some(ArtImageVerb::VERB_WEEPING), - "VERB_LOOKINGDEJECTED" => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGDEJECTED), - "VERB_CRINGING" => ::std::option::Option::Some(ArtImageVerb::VERB_CRINGING), - "VERB_SCREAMING" => ::std::option::Option::Some(ArtImageVerb::VERB_SCREAMING), - "VERB_SUBMISSIVEGESTURE" => ::std::option::Option::Some(ArtImageVerb::VERB_SUBMISSIVEGESTURE), - "VERB_FETALPOSITION" => ::std::option::Option::Some(ArtImageVerb::VERB_FETALPOSITION), - "VERB_SMEAREDINTOSPIRAL" => ::std::option::Option::Some(ArtImageVerb::VERB_SMEAREDINTOSPIRAL), - "VERB_FALLING" => ::std::option::Option::Some(ArtImageVerb::VERB_FALLING), - "VERB_DEAD" => ::std::option::Option::Some(ArtImageVerb::VERB_DEAD), - "VERB_LAUGHING" => ::std::option::Option::Some(ArtImageVerb::VERB_LAUGHING), - "VERB_LOOKINGOFFENDED" => ::std::option::Option::Some(ArtImageVerb::VERB_LOOKINGOFFENDED), - "VERB_BEINGSHOT" => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGSHOT), - "VERB_PLAINTIVEGESTURE" => ::std::option::Option::Some(ArtImageVerb::VERB_PLAINTIVEGESTURE), - "VERB_MELTING" => ::std::option::Option::Some(ArtImageVerb::VERB_MELTING), - "VERB_SHOOTING" => ::std::option::Option::Some(ArtImageVerb::VERB_SHOOTING), - "VERB_TORTURING" => ::std::option::Option::Some(ArtImageVerb::VERB_TORTURING), - "VERB_COMMITTINGDEPRAVEDACT" => ::std::option::Option::Some(ArtImageVerb::VERB_COMMITTINGDEPRAVEDACT), - "VERB_PRAYING" => ::std::option::Option::Some(ArtImageVerb::VERB_PRAYING), - "VERB_CONTEMPLATING" => ::std::option::Option::Some(ArtImageVerb::VERB_CONTEMPLATING), - "VERB_COOKING" => ::std::option::Option::Some(ArtImageVerb::VERB_COOKING), - "VERB_ENGRAVING" => ::std::option::Option::Some(ArtImageVerb::VERB_ENGRAVING), - "VERB_PROSTRATING" => ::std::option::Option::Some(ArtImageVerb::VERB_PROSTRATING), - "VERB_SUFFERING" => ::std::option::Option::Some(ArtImageVerb::VERB_SUFFERING), - "VERB_BEINGIMPALED" => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGIMPALED), - "VERB_BEINGCONTORTED" => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGCONTORTED), - "VERB_BEINGFLAYED" => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGFLAYED), - "VERB_HANGINGFROM" => ::std::option::Option::Some(ArtImageVerb::VERB_HANGINGFROM), - "VERB_BEINGMUTILATED" => ::std::option::Option::Some(ArtImageVerb::VERB_BEINGMUTILATED), - "VERB_TRIUMPHANTPOSE" => ::std::option::Option::Some(ArtImageVerb::VERB_TRIUMPHANTPOSE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ArtImageVerb] = &[ - ArtImageVerb::VERB_WITHERING, - ArtImageVerb::VERB_SURROUNDEDBY, - ArtImageVerb::VERB_MASSACRING, - ArtImageVerb::VERB_FIGHTING, - ArtImageVerb::VERB_LABORING, - ArtImageVerb::VERB_GREETING, - ArtImageVerb::VERB_REFUSING, - ArtImageVerb::VERB_SPEAKING, - ArtImageVerb::VERB_EMBRACING, - ArtImageVerb::VERB_STRIKINGDOWN, - ArtImageVerb::VERB_MENACINGPOSE, - ArtImageVerb::VERB_TRAVELING, - ArtImageVerb::VERB_RAISING, - ArtImageVerb::VERB_HIDING, - ArtImageVerb::VERB_LOOKINGCONFUSED, - ArtImageVerb::VERB_LOOKINGTERRIFIED, - ArtImageVerb::VERB_DEVOURING, - ArtImageVerb::VERB_ADMIRING, - ArtImageVerb::VERB_BURNING, - ArtImageVerb::VERB_WEEPING, - ArtImageVerb::VERB_LOOKINGDEJECTED, - ArtImageVerb::VERB_CRINGING, - ArtImageVerb::VERB_SCREAMING, - ArtImageVerb::VERB_SUBMISSIVEGESTURE, - ArtImageVerb::VERB_FETALPOSITION, - ArtImageVerb::VERB_SMEAREDINTOSPIRAL, - ArtImageVerb::VERB_FALLING, - ArtImageVerb::VERB_DEAD, - ArtImageVerb::VERB_LAUGHING, - ArtImageVerb::VERB_LOOKINGOFFENDED, - ArtImageVerb::VERB_BEINGSHOT, - ArtImageVerb::VERB_PLAINTIVEGESTURE, - ArtImageVerb::VERB_MELTING, - ArtImageVerb::VERB_SHOOTING, - ArtImageVerb::VERB_TORTURING, - ArtImageVerb::VERB_COMMITTINGDEPRAVEDACT, - ArtImageVerb::VERB_PRAYING, - ArtImageVerb::VERB_CONTEMPLATING, - ArtImageVerb::VERB_COOKING, - ArtImageVerb::VERB_ENGRAVING, - ArtImageVerb::VERB_PROSTRATING, - ArtImageVerb::VERB_SUFFERING, - ArtImageVerb::VERB_BEINGIMPALED, - ArtImageVerb::VERB_BEINGCONTORTED, - ArtImageVerb::VERB_BEINGFLAYED, - ArtImageVerb::VERB_HANGINGFROM, - ArtImageVerb::VERB_BEINGMUTILATED, - ArtImageVerb::VERB_TRIUMPHANTPOSE, - ]; -} - -impl ::protobuf::EnumFull for ArtImageVerb { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("ArtImageVerb").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for ArtImageVerb { - fn default() -> Self { - ArtImageVerb::VERB_WITHERING - } -} - -impl ArtImageVerb { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ArtImageVerb") - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:RemoteFortressReader.FlowType) -pub enum FlowType { - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Miasma) - Miasma = 0, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Steam) - Steam = 1, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Mist) - Mist = 2, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.MaterialDust) - MaterialDust = 3, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.MagmaMist) - MagmaMist = 4, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Smoke) - Smoke = 5, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Dragonfire) - Dragonfire = 6, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Fire) - Fire = 7, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.Web) - Web = 8, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.MaterialGas) - MaterialGas = 9, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.MaterialVapor) - MaterialVapor = 10, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.OceanWave) - OceanWave = 11, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.SeaFoam) - SeaFoam = 12, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.ItemCloud) - ItemCloud = 13, - // @@protoc_insertion_point(enum_value:RemoteFortressReader.FlowType.CampFire) - CampFire = -1, -} - -impl ::protobuf::Enum for FlowType { - const NAME: &'static str = "FlowType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(FlowType::Miasma), - 1 => ::std::option::Option::Some(FlowType::Steam), - 2 => ::std::option::Option::Some(FlowType::Mist), - 3 => ::std::option::Option::Some(FlowType::MaterialDust), - 4 => ::std::option::Option::Some(FlowType::MagmaMist), - 5 => ::std::option::Option::Some(FlowType::Smoke), - 6 => ::std::option::Option::Some(FlowType::Dragonfire), - 7 => ::std::option::Option::Some(FlowType::Fire), - 8 => ::std::option::Option::Some(FlowType::Web), - 9 => ::std::option::Option::Some(FlowType::MaterialGas), - 10 => ::std::option::Option::Some(FlowType::MaterialVapor), - 11 => ::std::option::Option::Some(FlowType::OceanWave), - 12 => ::std::option::Option::Some(FlowType::SeaFoam), - 13 => ::std::option::Option::Some(FlowType::ItemCloud), - -1 => ::std::option::Option::Some(FlowType::CampFire), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "Miasma" => ::std::option::Option::Some(FlowType::Miasma), - "Steam" => ::std::option::Option::Some(FlowType::Steam), - "Mist" => ::std::option::Option::Some(FlowType::Mist), - "MaterialDust" => ::std::option::Option::Some(FlowType::MaterialDust), - "MagmaMist" => ::std::option::Option::Some(FlowType::MagmaMist), - "Smoke" => ::std::option::Option::Some(FlowType::Smoke), - "Dragonfire" => ::std::option::Option::Some(FlowType::Dragonfire), - "Fire" => ::std::option::Option::Some(FlowType::Fire), - "Web" => ::std::option::Option::Some(FlowType::Web), - "MaterialGas" => ::std::option::Option::Some(FlowType::MaterialGas), - "MaterialVapor" => ::std::option::Option::Some(FlowType::MaterialVapor), - "OceanWave" => ::std::option::Option::Some(FlowType::OceanWave), - "SeaFoam" => ::std::option::Option::Some(FlowType::SeaFoam), - "ItemCloud" => ::std::option::Option::Some(FlowType::ItemCloud), - "CampFire" => ::std::option::Option::Some(FlowType::CampFire), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [FlowType] = &[ - FlowType::Miasma, - FlowType::Steam, - FlowType::Mist, - FlowType::MaterialDust, - FlowType::MagmaMist, - FlowType::Smoke, - FlowType::Dragonfire, - FlowType::Fire, - FlowType::Web, - FlowType::MaterialGas, - FlowType::MaterialVapor, - FlowType::OceanWave, - FlowType::SeaFoam, - FlowType::ItemCloud, - FlowType::CampFire, - ]; -} - -impl ::protobuf::EnumFull for FlowType { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("FlowType").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = match self { - FlowType::Miasma => 0, - FlowType::Steam => 1, - FlowType::Mist => 2, - FlowType::MaterialDust => 3, - FlowType::MagmaMist => 4, - FlowType::Smoke => 5, - FlowType::Dragonfire => 6, - FlowType::Fire => 7, - FlowType::Web => 8, - FlowType::MaterialGas => 9, - FlowType::MaterialVapor => 10, - FlowType::OceanWave => 11, - FlowType::SeaFoam => 12, - FlowType::ItemCloud => 13, - FlowType::CampFire => 14, - }; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for FlowType { - fn default() -> Self { - FlowType::Miasma - } -} - -impl FlowType { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("FlowType") - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x1aRemoteFortressReader.proto\x12\x14RemoteFortressReader\x1a\x17Item\ - defInstrument.proto\"1\n\x05Coord\x12\x0c\n\x01x\x18\x01\x20\x01(\x05R\ - \x01x\x12\x0c\n\x01y\x18\x02\x20\x01(\x05R\x01y\x12\x0c\n\x01z\x18\x03\ - \x20\x01(\x05R\x01z\"\xe7\x02\n\x08Tiletype\x12\x0e\n\x02id\x18\x01\x20\ - \x02(\x05R\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x18\n\ - \x07caption\x18\x03\x20\x01(\tR\x07caption\x129\n\x05shape\x18\x04\x20\ - \x01(\x0e2#.RemoteFortressReader.TiletypeShapeR\x05shape\x12?\n\x07speci\ - al\x18\x05\x20\x01(\x0e2%.RemoteFortressReader.TiletypeSpecialR\x07speci\ - al\x12B\n\x08material\x18\x06\x20\x01(\x0e2&.RemoteFortressReader.Tilety\ - peMaterialR\x08material\x12?\n\x07variant\x18\x07\x20\x01(\x0e2%.RemoteF\ - ortressReader.TiletypeVariantR\x07variant\x12\x1c\n\tdirection\x18\x08\ - \x20\x01(\tR\tdirection\"S\n\x0cTiletypeList\x12C\n\rtiletype_list\x18\ - \x01\x20\x03(\x0b2\x1e.RemoteFortressReader.TiletypeR\x0ctiletypeList\"\ - \x83\x01\n\x0fBuildingExtents\x12\x13\n\x05pos_x\x18\x01\x20\x02(\x05R\ - \x04posX\x12\x13\n\x05pos_y\x18\x02\x20\x02(\x05R\x04posY\x12\x14\n\x05w\ - idth\x18\x03\x20\x02(\x05R\x05width\x12\x16\n\x06height\x18\x04\x20\x02(\ - \x05R\x06height\x12\x18\n\x07extents\x18\x05\x20\x03(\x05R\x07extents\"R\ - \n\x0cBuildingItem\x12.\n\x04item\x18\x01\x20\x01(\x0b2\x1a.RemoteFortre\ - ssReader.ItemR\x04item\x12\x12\n\x04mode\x18\x02\x20\x01(\x05R\x04mode\"\ - \xe8\x04\n\x10BuildingInstance\x12\x14\n\x05index\x18\x01\x20\x02(\x05R\ - \x05index\x12\x1a\n\tpos_x_min\x18\x02\x20\x01(\x05R\x07posXMin\x12\x1a\ - \n\tpos_y_min\x18\x03\x20\x01(\x05R\x07posYMin\x12\x1a\n\tpos_z_min\x18\ - \x04\x20\x01(\x05R\x07posZMin\x12\x1a\n\tpos_x_max\x18\x05\x20\x01(\x05R\ - \x07posXMax\x12\x1a\n\tpos_y_max\x18\x06\x20\x01(\x05R\x07posYMax\x12\ - \x1a\n\tpos_z_max\x18\x07\x20\x01(\x05R\x07posZMax\x12G\n\rbuilding_type\ - \x18\x08\x20\x01(\x0b2\".RemoteFortressReader.BuildingTypeR\x0cbuildingT\ - ype\x129\n\x08material\x18\t\x20\x01(\x0b2\x1d.RemoteFortressReader.MatP\ - airR\x08material\x12%\n\x0ebuilding_flags\x18\n\x20\x01(\rR\rbuildingFla\ - gs\x12\x17\n\x07is_room\x18\x0b\x20\x01(\x08R\x06isRoom\x129\n\x04room\ - \x18\x0c\x20\x01(\x0b2%.RemoteFortressReader.BuildingExtentsR\x04room\ - \x12E\n\tdirection\x18\r\x20\x01(\x0e2'.RemoteFortressReader.BuildingDir\ - ectionR\tdirection\x128\n\x05items\x18\x0e\x20\x03(\x0b2\".RemoteFortres\ - sReader.BuildingItemR\x05items\x12\x16\n\x06active\x18\x0f\x20\x01(\x05R\ - \x06active\"s\n\tRiverEdge\x12\x17\n\x07min_pos\x18\x01\x20\x01(\x05R\ - \x06minPos\x12\x17\n\x07max_pos\x18\x02\x20\x01(\x05R\x06maxPos\x12\x16\ - \n\x06active\x18\x03\x20\x01(\x05R\x06active\x12\x1c\n\televation\x18\ - \x04\x20\x01(\x05R\televation\"\xe3\x01\n\tRiverTile\x125\n\x05north\x18\ - \x01\x20\x01(\x0b2\x1f.RemoteFortressReader.RiverEdgeR\x05north\x125\n\ - \x05south\x18\x02\x20\x01(\x0b2\x1f.RemoteFortressReader.RiverEdgeR\x05s\ - outh\x123\n\x04east\x18\x03\x20\x01(\x0b2\x1f.RemoteFortressReader.River\ - EdgeR\x04east\x123\n\x04west\x18\x04\x20\x01(\x0b2\x1f.RemoteFortressRea\ - der.RiverEdgeR\x04west\"\xc8\x01\n\x07Spatter\x129\n\x08material\x18\x01\ - \x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x08material\x12\x16\n\ - \x06amount\x18\x02\x20\x01(\x05R\x06amount\x127\n\x05state\x18\x03\x20\ - \x01(\x0e2!.RemoteFortressReader.MatterStateR\x05state\x121\n\x04item\ - \x18\x04\x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x04item\"H\n\ - \x0bSpatterPile\x129\n\x08spatters\x18\x01\x20\x03(\x0b2\x1d.RemoteFortr\ - essReader.SpatterR\x08spatters\"\xa2\x05\n\x04Item\x12\x0e\n\x02id\x18\ - \x01\x20\x01(\x05R\x02id\x12-\n\x03pos\x18\x02\x20\x01(\x0b2\x1b.RemoteF\ - ortressReader.CoordR\x03pos\x12\x16\n\x06flags1\x18\x03\x20\x01(\rR\x06f\ - lags1\x12\x16\n\x06flags2\x18\x04\x20\x01(\rR\x06flags2\x121\n\x04type\ - \x18\x05\x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x04type\x129\n\ - \x08material\x18\x06\x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x08\ - material\x127\n\x03dye\x18\x07\x20\x01(\x0b2%.RemoteFortressReader.Color\ - DefinitionR\x03dye\x12\x1d\n\nstack_size\x18\x08\x20\x01(\x05R\tstackSiz\ - e\x12\x19\n\x08subpos_x\x18\t\x20\x01(\x02R\x07subposX\x12\x19\n\x08subp\ - os_y\x18\n\x20\x01(\x02R\x07subposY\x12\x19\n\x08subpos_z\x18\x0b\x20\ - \x01(\x02R\x07subposZ\x12\x1e\n\nprojectile\x18\x0c\x20\x01(\x08R\nproje\ - ctile\x12\x1d\n\nvelocity_x\x18\r\x20\x01(\x02R\tvelocityX\x12\x1d\n\nve\ - locity_y\x18\x0e\x20\x01(\x02R\tvelocityY\x12\x1d\n\nvelocity_z\x18\x0f\ - \x20\x01(\x02R\tvelocityZ\x12\x16\n\x06volume\x18\x10\x20\x01(\x05R\x06v\ - olume\x12I\n\x0cimprovements\x18\x11\x20\x03(\x0b2%.RemoteFortressReader\ - .ItemImprovementR\x0cimprovements\x124\n\x05image\x18\x12\x20\x01(\x0b2\ - \x1e.RemoteFortressReader.ArtImageR\x05image\"\xbf\x02\n\tPlantTile\x12\ - \x14\n\x05trunk\x18\x01\x20\x01(\x08R\x05trunk\x12'\n\x0fconnection_east\ - \x18\x02\x20\x01(\x08R\x0econnectionEast\x12)\n\x10connection_south\x18\ - \x03\x20\x01(\x08R\x0fconnectionSouth\x12'\n\x0fconnection_west\x18\x04\ - \x20\x01(\x08R\x0econnectionWest\x12)\n\x10connection_north\x18\x05\x20\ - \x01(\x08R\x0fconnectionNorth\x12\x1a\n\x08branches\x18\x06\x20\x01(\x08\ - R\x08branches\x12\x14\n\x05twigs\x18\x07\x20\x01(\x08R\x05twigs\x12B\n\t\ - tile_type\x18\x08\x20\x01(\x0e2%.RemoteFortressReader.TiletypeSpecialR\ - \x08tileType\"r\n\x08TreeInfo\x12/\n\x04size\x18\x01\x20\x01(\x0b2\x1b.R\ - emoteFortressReader.CoordR\x04size\x125\n\x05tiles\x18\x02\x20\x03(\x0b2\ - \x1f.RemoteFortressReader.PlantTileR\x05tiles\"\x9a\x01\n\rPlantInstance\ - \x12\x1d\n\nplant_type\x18\x01\x20\x01(\x05R\tplantType\x12-\n\x03pos\ - \x18\x02\x20\x01(\x0b2\x1b.RemoteFortressReader.CoordR\x03pos\x12;\n\ttr\ - ee_info\x18\x03\x20\x01(\x0b2\x1e.RemoteFortressReader.TreeInfoR\x08tree\ - Info\"\x8c\n\n\x08MapBlock\x12\x13\n\x05map_x\x18\x01\x20\x02(\x05R\x04m\ - apX\x12\x13\n\x05map_y\x18\x02\x20\x02(\x05R\x04mapY\x12\x13\n\x05map_z\ - \x18\x03\x20\x02(\x05R\x04mapZ\x12\x14\n\x05tiles\x18\x04\x20\x03(\x05R\ - \x05tiles\x12;\n\tmaterials\x18\x05\x20\x03(\x0b2\x1d.RemoteFortressRead\ - er.MatPairR\tmaterials\x12F\n\x0flayer_materials\x18\x06\x20\x03(\x0b2\ - \x1d.RemoteFortressReader.MatPairR\x0elayerMaterials\x12D\n\x0evein_mate\ - rials\x18\x07\x20\x03(\x0b2\x1d.RemoteFortressReader.MatPairR\rveinMater\ - ials\x12D\n\x0ebase_materials\x18\x08\x20\x03(\x0b2\x1d.RemoteFortressRe\ - ader.MatPairR\rbaseMaterials\x12\x14\n\x05magma\x18\t\x20\x03(\x05R\x05m\ - agma\x12\x14\n\x05water\x18\n\x20\x03(\x05R\x05water\x12\x16\n\x06hidden\ - \x18\x0b\x20\x03(\x08R\x06hidden\x12\x14\n\x05light\x18\x0c\x20\x03(\x08\ - R\x05light\x12\"\n\x0csubterranean\x18\r\x20\x03(\x08R\x0csubterranean\ - \x12\x18\n\x07outside\x18\x0e\x20\x03(\x08R\x07outside\x12\x18\n\x07aqui\ - fer\x18\x0f\x20\x03(\x08R\x07aquifer\x12%\n\x0ewater_stagnant\x18\x10\ - \x20\x03(\x08R\rwaterStagnant\x12\x1d\n\nwater_salt\x18\x11\x20\x03(\x08\ - R\twaterSalt\x12L\n\x12construction_items\x18\x12\x20\x03(\x0b2\x1d.Remo\ - teFortressReader.MatPairR\x11constructionItems\x12D\n\tbuildings\x18\x13\ - \x20\x03(\x0b2&.RemoteFortressReader.BuildingInstanceR\tbuildings\x12!\n\ - \x0ctree_percent\x18\x14\x20\x03(\x05R\x0btreePercent\x12\x15\n\x06tree_\ - x\x18\x15\x20\x03(\x05R\x05treeX\x12\x15\n\x06tree_y\x18\x16\x20\x03(\ - \x05R\x05treeY\x12\x15\n\x06tree_z\x18\x17\x20\x03(\x05R\x05treeZ\x12Z\n\ - \x14tile_dig_designation\x18\x18\x20\x03(\x0e2(.RemoteFortressReader.Til\ - eDigDesignationR\x12tileDigDesignation\x12C\n\x0bspatterPile\x18\x19\x20\ - \x03(\x0b2!.RemoteFortressReader.SpatterPileR\x0bspatterPile\x120\n\x05i\ - tems\x18\x1a\x20\x03(\x0b2\x1a.RemoteFortressReader.ItemR\x05items\x12=\ - \n\x1btile_dig_designation_marker\x18\x1b\x20\x03(\x08R\x18tileDigDesign\ - ationMarker\x129\n\x19tile_dig_designation_auto\x18\x1c\x20\x03(\x08R\ - \x16tileDigDesignationAuto\x12#\n\rgrass_percent\x18\x1d\x20\x03(\x05R\ - \x0cgrassPercent\x124\n\x05flows\x18\x1e\x20\x03(\x0b2\x1e.RemoteFortres\ - sReader.FlowInfoR\x05flows\"A\n\x07MatPair\x12\x19\n\x08mat_type\x18\x01\ - \x20\x02(\x05R\x07matType\x12\x1b\n\tmat_index\x18\x02\x20\x02(\x05R\x08\ - matIndex\"M\n\x0fColorDefinition\x12\x10\n\x03red\x18\x01\x20\x02(\x05R\ - \x03red\x12\x14\n\x05green\x18\x02\x20\x02(\x05R\x05green\x12\x12\n\x04b\ - lue\x18\x03\x20\x02(\x05R\x04blue\"\xea\x02\n\x12MaterialDefinition\x128\ - \n\x08mat_pair\x18\x01\x20\x02(\x0b2\x1d.RemoteFortressReader.MatPairR\ - \x07matPair\x12\x0e\n\x02id\x18\x02\x20\x01(\tR\x02id\x12\x12\n\x04name\ - \x18\x03\x20\x01(\x0cR\x04name\x12F\n\x0bstate_color\x18\x04\x20\x01(\ - \x0b2%.RemoteFortressReader.ColorDefinitionR\nstateColor\x12@\n\ninstrum\ - ent\x18\x05\x20\x01(\x0b2\x20.ItemdefInstrument.InstrumentDefR\ninstrume\ - nt\x12\x17\n\x07up_step\x18\x06\x20\x01(\x05R\x06upStep\x12\x1b\n\tdown_\ - step\x18\x07\x20\x01(\x05R\x08downStep\x126\n\x05layer\x18\x08\x20\x01(\ - \x0e2\x20.RemoteFortressReader.ArmorLayerR\x05layer\"\x87\x01\n\x0cBuild\ - ingType\x12#\n\rbuilding_type\x18\x01\x20\x02(\x05R\x0cbuildingType\x12)\ - \n\x10building_subtype\x18\x02\x20\x02(\x05R\x0fbuildingSubtype\x12'\n\ - \x0fbuilding_custom\x18\x03\x20\x02(\x05R\x0ebuildingCustom\"\x81\x01\n\ - \x12BuildingDefinition\x12G\n\rbuilding_type\x18\x01\x20\x02(\x0b2\".Rem\ - oteFortressReader.BuildingTypeR\x0cbuildingType\x12\x0e\n\x02id\x18\x02\ - \x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\"]\n\ - \x0cBuildingList\x12M\n\rbuilding_list\x18\x01\x20\x03(\x0b2(.RemoteFort\ - ressReader.BuildingDefinitionR\x0cbuildingList\"]\n\x0cMaterialList\x12M\ - \n\rmaterial_list\x18\x01\x20\x03(\x0b2(.RemoteFortressReader.MaterialDe\ - finitionR\x0cmaterialList\"U\n\x04Hair\x12\x16\n\x06length\x18\x01\x20\ - \x01(\x05R\x06length\x125\n\x05style\x18\x02\x20\x01(\x0e2\x1f.RemoteFor\ - tressReader.HairStyleR\x05style\"\xbe\x01\n\x0cBodySizeInfo\x12\x19\n\ - \x08size_cur\x18\x01\x20\x01(\x05R\x07sizeCur\x12\x1b\n\tsize_base\x18\ - \x02\x20\x01(\x05R\x08sizeBase\x12\x19\n\x08area_cur\x18\x03\x20\x01(\ - \x05R\x07areaCur\x12\x1b\n\tarea_base\x18\x04\x20\x01(\x05R\x08areaBase\ - \x12\x1d\n\nlength_cur\x18\x05\x20\x01(\x05R\tlengthCur\x12\x1f\n\x0blen\ - gth_base\x18\x06\x20\x01(\x05R\nlengthBase\"\xa0\x03\n\x0eUnitAppearance\ - \x12%\n\x0ebody_modifiers\x18\x01\x20\x03(\x05R\rbodyModifiers\x12!\n\ - \x0cbp_modifiers\x18\x02\x20\x03(\x05R\x0bbpModifiers\x12#\n\rsize_modif\ - ier\x18\x03\x20\x01(\x05R\x0csizeModifier\x12\x16\n\x06colors\x18\x04\ - \x20\x03(\x05R\x06colors\x12.\n\x04hair\x18\x05\x20\x01(\x0b2\x1a.Remote\ - FortressReader.HairR\x04hair\x120\n\x05beard\x18\x06\x20\x01(\x0b2\x1a.R\ - emoteFortressReader.HairR\x05beard\x128\n\tmoustache\x18\x07\x20\x01(\ - \x0b2\x1a.RemoteFortressReader.HairR\tmoustache\x128\n\tsideburns\x18\ - \x08\x20\x01(\x0b2\x1a.RemoteFortressReader.HairR\tsideburns\x121\n\x14p\ - hysical_description\x18\t\x20\x01(\tR\x13physicalDescription\"\x9a\x01\n\ - \rInventoryItem\x127\n\x04mode\x18\x01\x20\x01(\x0e2#.RemoteFortressRead\ - er.InventoryModeR\x04mode\x12.\n\x04item\x18\x02\x20\x01(\x0b2\x1a.Remot\ - eFortressReader.ItemR\x04item\x12\x20\n\x0cbody_part_id\x18\x03\x20\x01(\ - \x05R\nbodyPartId\"t\n\tWoundPart\x12(\n\x10global_layer_idx\x18\x01\x20\ - \x01(\x05R\x0eglobalLayerIdx\x12\x20\n\x0cbody_part_id\x18\x02\x20\x01(\ - \x05R\nbodyPartId\x12\x1b\n\tlayer_idx\x18\x03\x20\x01(\x05R\x08layerIdx\ - \"e\n\tUnitWound\x125\n\x05parts\x18\x01\x20\x03(\x0b2\x1f.RemoteFortres\ - sReader.WoundPartR\x05parts\x12!\n\x0csevered_part\x18\x02\x20\x01(\x08R\ - \x0bseveredPart\"\xbb\x07\n\x0eUnitDefinition\x12\x0e\n\x02id\x18\x01\ - \x20\x02(\x05R\x02id\x12\x18\n\x07isValid\x18\x02\x20\x01(\x08R\x07isVal\ - id\x12\x13\n\x05pos_x\x18\x03\x20\x01(\x05R\x04posX\x12\x13\n\x05pos_y\ - \x18\x04\x20\x01(\x05R\x04posY\x12\x13\n\x05pos_z\x18\x05\x20\x01(\x05R\ - \x04posZ\x121\n\x04race\x18\x06\x20\x01(\x0b2\x1d.RemoteFortressReader.M\ - atPairR\x04race\x12P\n\x10profession_color\x18\x07\x20\x01(\x0b2%.Remote\ - FortressReader.ColorDefinitionR\x0fprofessionColor\x12\x16\n\x06flags1\ - \x18\x08\x20\x01(\rR\x06flags1\x12\x16\n\x06flags2\x18\t\x20\x01(\rR\x06\ - flags2\x12\x16\n\x06flags3\x18\n\x20\x01(\rR\x06flags3\x12\x1d\n\nis_sol\ - dier\x18\x0b\x20\x01(\x08R\tisSoldier\x12?\n\tsize_info\x18\x0c\x20\x01(\ - \x0b2\".RemoteFortressReader.BodySizeInfoR\x08sizeInfo\x12\x12\n\x04name\ - \x18\r\x20\x01(\tR\x04name\x12\x1b\n\tblood_max\x18\x0e\x20\x01(\x05R\ - \x08bloodMax\x12\x1f\n\x0bblood_count\x18\x0f\x20\x01(\x05R\nbloodCount\ - \x12D\n\nappearance\x18\x10\x20\x01(\x0b2$.RemoteFortressReader.UnitAppe\ - aranceR\nappearance\x12#\n\rprofession_id\x18\x11\x20\x01(\x05R\x0cprofe\ - ssionId\x12'\n\x0fnoble_positions\x18\x12\x20\x03(\tR\x0enoblePositions\ - \x12\x19\n\x08rider_id\x18\x13\x20\x01(\x05R\x07riderId\x12A\n\tinventor\ - y\x18\x14\x20\x03(\x0b2#.RemoteFortressReader.InventoryItemR\tinventory\ - \x12\x19\n\x08subpos_x\x18\x15\x20\x01(\x02R\x07subposX\x12\x19\n\x08sub\ - pos_y\x18\x16\x20\x01(\x02R\x07subposY\x12\x19\n\x08subpos_z\x18\x17\x20\ - \x01(\x02R\x07subposZ\x123\n\x06facing\x18\x18\x20\x01(\x0b2\x1b.RemoteF\ - ortressReader.CoordR\x06facing\x12\x10\n\x03age\x18\x19\x20\x01(\x05R\ - \x03age\x127\n\x06wounds\x18\x1a\x20\x03(\x0b2\x1f.RemoteFortressReader.\ - UnitWoundR\x06wounds\"U\n\x08UnitList\x12I\n\rcreature_list\x18\x01\x20\ - \x03(\x0b2$.RemoteFortressReader.UnitDefinitionR\x0ccreatureList\"\xd4\ - \x01\n\x0cBlockRequest\x12#\n\rblocks_needed\x18\x01\x20\x01(\x05R\x0cbl\ - ocksNeeded\x12\x13\n\x05min_x\x18\x02\x20\x01(\x05R\x04minX\x12\x13\n\ - \x05max_x\x18\x03\x20\x01(\x05R\x04maxX\x12\x13\n\x05min_y\x18\x04\x20\ - \x01(\x05R\x04minY\x12\x13\n\x05max_y\x18\x05\x20\x01(\x05R\x04maxY\x12\ - \x13\n\x05min_z\x18\x06\x20\x01(\x05R\x04minZ\x12\x13\n\x05max_z\x18\x07\ - \x20\x01(\x05R\x04maxZ\x12!\n\x0cforce_reload\x18\x08\x20\x01(\x08R\x0bf\ - orceReload\"\xf2\x01\n\tBlockList\x12=\n\nmap_blocks\x18\x01\x20\x03(\ - \x0b2\x1e.RemoteFortressReader.MapBlockR\tmapBlocks\x12\x13\n\x05map_x\ - \x18\x02\x20\x01(\x05R\x04mapX\x12\x13\n\x05map_y\x18\x03\x20\x01(\x05R\ - \x04mapY\x12?\n\nengravings\x18\x04\x20\x03(\x0b2\x1f.RemoteFortressRead\ - er.EngravingR\nengravings\x12;\n\x0bocean_waves\x18\x05\x20\x03(\x0b2\ - \x1a.RemoteFortressReader.WaveR\noceanWaves\"_\n\x08PlantDef\x12\x13\n\ - \x05pos_x\x18\x01\x20\x02(\x05R\x04posX\x12\x13\n\x05pos_y\x18\x02\x20\ - \x02(\x05R\x04posY\x12\x13\n\x05pos_z\x18\x03\x20\x02(\x05R\x04posZ\x12\ - \x14\n\x05index\x18\x04\x20\x02(\x05R\x05index\"J\n\tPlantList\x12=\n\np\ - lant_list\x18\x01\x20\x03(\x0b2\x1e.RemoteFortressReader.PlantDefR\tplan\ - tList\"\xe2\x02\n\x08ViewInfo\x12\x1c\n\nview_pos_x\x18\x01\x20\x01(\x05\ - R\x08viewPosX\x12\x1c\n\nview_pos_y\x18\x02\x20\x01(\x05R\x08viewPosY\ - \x12\x1c\n\nview_pos_z\x18\x03\x20\x01(\x05R\x08viewPosZ\x12\x1e\n\x0bvi\ - ew_size_x\x18\x04\x20\x01(\x05R\tviewSizeX\x12\x1e\n\x0bview_size_y\x18\ - \x05\x20\x01(\x05R\tviewSizeY\x12\x20\n\x0ccursor_pos_x\x18\x06\x20\x01(\ - \x05R\ncursorPosX\x12\x20\n\x0ccursor_pos_y\x18\x07\x20\x01(\x05R\ncurso\ - rPosY\x12\x20\n\x0ccursor_pos_z\x18\x08\x20\x01(\x05R\ncursorPosZ\x12*\n\ - \x0efollow_unit_id\x18\t\x20\x01(\x05:\x02-1R\x0cfollowUnitIdB\0\x12*\n\ - \x0efollow_item_id\x18\n\x20\x01(\x05:\x02-1R\x0cfollowItemIdB\0\"\xb9\ - \x02\n\x07MapInfo\x12\x20\n\x0cblock_size_x\x18\x01\x20\x01(\x05R\nblock\ - SizeX\x12\x20\n\x0cblock_size_y\x18\x02\x20\x01(\x05R\nblockSizeY\x12\ - \x20\n\x0cblock_size_z\x18\x03\x20\x01(\x05R\nblockSizeZ\x12\x1e\n\x0bbl\ - ock_pos_x\x18\x04\x20\x01(\x05R\tblockPosX\x12\x1e\n\x0bblock_pos_y\x18\ - \x05\x20\x01(\x05R\tblockPosY\x12\x1e\n\x0bblock_pos_z\x18\x06\x20\x01(\ - \x05R\tblockPosZ\x12\x1d\n\nworld_name\x18\x07\x20\x01(\tR\tworldName\ - \x12,\n\x12world_name_english\x18\x08\x20\x01(\tR\x10worldNameEnglish\ - \x12\x1b\n\tsave_name\x18\t\x20\x01(\tR\x08saveName\"\x81\x02\n\x05Cloud\ - \x125\n\x05front\x18\x01\x20\x01(\x0e2\x1f.RemoteFortressReader.FrontTyp\ - eR\x05front\x12;\n\x07cumulus\x18\x02\x20\x01(\x0e2!.RemoteFortressReade\ - r.CumulusTypeR\x07cumulus\x12\x16\n\x06cirrus\x18\x03\x20\x01(\x08R\x06c\ - irrus\x12;\n\x07stratus\x18\x04\x20\x01(\x0e2!.RemoteFortressReader.Stra\ - tusTypeR\x07stratus\x12/\n\x03fog\x18\x05\x20\x01(\x0e2\x1d.RemoteFortre\ - ssReader.FogTypeR\x03fog\"\xf1\x06\n\x08WorldMap\x12\x1f\n\x0bworld_widt\ - h\x18\x01\x20\x02(\x05R\nworldWidth\x12!\n\x0cworld_height\x18\x02\x20\ - \x02(\x05R\x0bworldHeight\x12\x12\n\x04name\x18\x03\x20\x01(\x0cR\x04nam\ - e\x12!\n\x0cname_english\x18\x04\x20\x01(\tR\x0bnameEnglish\x12\x1c\n\te\ - levation\x18\x05\x20\x03(\x05R\televation\x12\x1a\n\x08rainfall\x18\x06\ - \x20\x03(\x05R\x08rainfall\x12\x1e\n\nvegetation\x18\x07\x20\x03(\x05R\n\ - vegetation\x12\x20\n\x0btemperature\x18\x08\x20\x03(\x05R\x0btemperature\ - \x12\x1a\n\x08evilness\x18\t\x20\x03(\x05R\x08evilness\x12\x1a\n\x08drai\ - nage\x18\n\x20\x03(\x05R\x08drainage\x12\x1c\n\tvolcanism\x18\x0b\x20\ - \x03(\x05R\tvolcanism\x12\x1a\n\x08savagery\x18\x0c\x20\x03(\x05R\x08sav\ - agery\x123\n\x06clouds\x18\r\x20\x03(\x0b2\x1b.RemoteFortressReader.Clou\ - dR\x06clouds\x12\x1a\n\x08salinity\x18\x0e\x20\x03(\x05R\x08salinity\x12\ - \x13\n\x05map_x\x18\x0f\x20\x01(\x05R\x04mapX\x12\x13\n\x05map_y\x18\x10\ - \x20\x01(\x05R\x04mapY\x12\x19\n\x08center_x\x18\x11\x20\x01(\x05R\x07ce\ - nterX\x12\x19\n\x08center_y\x18\x12\x20\x01(\x05R\x07centerY\x12\x19\n\ - \x08center_z\x18\x13\x20\x01(\x05R\x07centerZ\x12\x19\n\x08cur_year\x18\ - \x14\x20\x01(\x05R\x07curYear\x12\"\n\rcur_year_tick\x18\x15\x20\x01(\ - \x05R\x0bcurYearTick\x12A\n\x0bworld_poles\x18\x16\x20\x01(\x0e2\x20.Rem\ - oteFortressReader.WorldPolesR\nworldPoles\x12@\n\x0briver_tiles\x18\x17\ - \x20\x03(\x0b2\x1f.RemoteFortressReader.RiverTileR\nriverTiles\x12'\n\ - \x0fwater_elevation\x18\x18\x20\x03(\x05R\x0ewaterElevation\x12C\n\x0cre\ - gion_tiles\x18\x19\x20\x03(\x0b2\x20.RemoteFortressReader.RegionTileR\ - \x0bregionTiles\"\xa7\x01\n\x1bSiteRealizationBuildingWall\x12\x17\n\x07\ - start_x\x18\x01\x20\x01(\x05R\x06startX\x12\x17\n\x07start_y\x18\x02\x20\ - \x01(\x05R\x06startY\x12\x17\n\x07start_z\x18\x03\x20\x01(\x05R\x06start\ - Z\x12\x13\n\x05end_x\x18\x04\x20\x01(\x05R\x04endX\x12\x13\n\x05end_y\ - \x18\x05\x20\x01(\x05R\x04endY\x12\x13\n\x05end_z\x18\x06\x20\x01(\x05R\ - \x04endZ\"c\n\x1cSiteRealizationBuildingTower\x12\x15\n\x06roof_z\x18\ - \x01\x20\x01(\x05R\x05roofZ\x12\x14\n\x05round\x18\x02\x20\x01(\x08R\x05\ - round\x12\x16\n\x06goblin\x18\x03\x20\x01(\x08R\x06goblin\"\x8d\x01\n\ - \x0bTrenchSpoke\x12\x1f\n\x0bmound_start\x18\x01\x20\x01(\x05R\nmoundSta\ - rt\x12!\n\x0ctrench_start\x18\x02\x20\x01(\x05R\x0btrenchStart\x12\x1d\n\ - \ntrench_end\x18\x03\x20\x01(\x05R\ttrenchEnd\x12\x1b\n\tmound_end\x18\ - \x04\x20\x01(\x05R\x08moundEnd\"\\\n\x1fSiteRealizationBuildingTrenches\ - \x129\n\x06spokes\x18\x01\x20\x03(\x0b2!.RemoteFortressReader.TrenchSpok\ - eR\x06spokes\"\xc7\x03\n\x17SiteRealizationBuilding\x12\x0e\n\x02id\x18\ - \x01\x20\x01(\x05R\x02id\x12\x13\n\x05min_x\x18\x03\x20\x01(\x05R\x04min\ - X\x12\x13\n\x05min_y\x18\x04\x20\x01(\x05R\x04minY\x12\x13\n\x05max_x\ - \x18\x05\x20\x01(\x05R\x04maxX\x12\x13\n\x05max_y\x18\x06\x20\x01(\x05R\ - \x04maxY\x129\n\x08material\x18\x07\x20\x01(\x0b2\x1d.RemoteFortressRead\ - er.MatPairR\x08material\x12N\n\twall_info\x18\x08\x20\x01(\x0b21.RemoteF\ - ortressReader.SiteRealizationBuildingWallR\x08wallInfo\x12Q\n\ntower_inf\ - o\x18\t\x20\x01(\x0b22.RemoteFortressReader.SiteRealizationBuildingTower\ - R\ttowerInfo\x12V\n\x0btrench_info\x18\n\x20\x01(\x0b25.RemoteFortressRe\ - ader.SiteRealizationBuildingTrenchesR\ntrenchInfo\x12\x12\n\x04type\x18\ - \x0b\x20\x01(\x05R\x04type\"\x82\x06\n\nRegionTile\x12\x1c\n\televation\ - \x18\x01\x20\x01(\x05R\televation\x12\x1a\n\x08rainfall\x18\x02\x20\x01(\ - \x05R\x08rainfall\x12\x1e\n\nvegetation\x18\x03\x20\x01(\x05R\nvegetatio\ - n\x12\x20\n\x0btemperature\x18\x04\x20\x01(\x05R\x0btemperature\x12\x1a\ - \n\x08evilness\x18\x05\x20\x01(\x05R\x08evilness\x12\x1a\n\x08drainage\ - \x18\x06\x20\x01(\x05R\x08drainage\x12\x1c\n\tvolcanism\x18\x07\x20\x01(\ - \x05R\tvolcanism\x12\x1a\n\x08savagery\x18\x08\x20\x01(\x05R\x08savagery\ - \x12\x1a\n\x08salinity\x18\t\x20\x01(\x05R\x08salinity\x12@\n\x0briver_t\ - iles\x18\n\x20\x01(\x0b2\x1f.RemoteFortressReader.RiverTileR\nriverTiles\ - \x12'\n\x0fwater_elevation\x18\x0b\x20\x01(\x05R\x0ewaterElevation\x12H\ - \n\x10surface_material\x18\x0c\x20\x01(\x0b2\x1d.RemoteFortressReader.Ma\ - tPairR\x0fsurfaceMaterial\x12F\n\x0fplant_materials\x18\r\x20\x03(\x0b2\ - \x1d.RemoteFortressReader.MatPairR\x0eplantMaterials\x12K\n\tbuildings\ - \x18\x0e\x20\x03(\x0b2-.RemoteFortressReader.SiteRealizationBuildingR\tb\ - uildings\x12F\n\x0fstone_materials\x18\x0f\x20\x03(\x0b2\x1d.RemoteFortr\ - essReader.MatPairR\x0estoneMaterials\x12D\n\x0etree_materials\x18\x10\ - \x20\x03(\x0b2\x1d.RemoteFortressReader.MatPairR\rtreeMaterials\x12\x12\ - \n\x04snow\x18\x11\x20\x01(\x05R\x04snow\"\xa4\x01\n\tRegionMap\x12\x13\ - \n\x05map_x\x18\x01\x20\x01(\x05R\x04mapX\x12\x13\n\x05map_y\x18\x02\x20\ - \x01(\x05R\x04mapY\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12!\n\ - \x0cname_english\x18\x04\x20\x01(\tR\x0bnameEnglish\x126\n\x05tiles\x18\ - \x05\x20\x03(\x0b2\x20.RemoteFortressReader.RegionTileR\x05tiles\"\x8d\ - \x01\n\nRegionMaps\x12=\n\nworld_maps\x18\x01\x20\x03(\x0b2\x1e.RemoteFo\ - rtressReader.WorldMapR\tworldMaps\x12@\n\x0bregion_maps\x18\x02\x20\x03(\ - \x0b2\x1f.RemoteFortressReader.RegionMapR\nregionMaps\"\x9f\x01\n\x11Pat\ - ternDescriptor\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12=\n\x06color\ - s\x18\x02\x20\x03(\x0b2%.RemoteFortressReader.ColorDefinitionR\x06colors\ - \x12;\n\x07pattern\x18\x03\x20\x01(\x0e2!.RemoteFortressReader.PatternTy\ - peR\x07pattern\"\xef\x01\n\x10ColorModifierRaw\x12C\n\x08patterns\x18\ - \x01\x20\x03(\x0b2'.RemoteFortressReader.PatternDescriptorR\x08patterns\ - \x12\x20\n\x0cbody_part_id\x18\x02\x20\x03(\x05R\nbodyPartId\x12&\n\x0ft\ - issue_layer_id\x18\x03\x20\x03(\x05R\rtissueLayerId\x12\x1d\n\nstart_dat\ - e\x18\x04\x20\x01(\x05R\tstartDate\x12\x19\n\x08end_date\x18\x05\x20\x01\ - (\x05R\x07endDate\x12\x12\n\x04part\x18\x06\x20\x01(\tR\x04part\"\x92\ - \x01\n\x10BodyPartLayerRaw\x12\x1d\n\nlayer_name\x18\x01\x20\x01(\tR\tla\ - yerName\x12\x1b\n\ttissue_id\x18\x02\x20\x01(\x05R\x08tissueId\x12\x1f\n\ - \x0blayer_depth\x18\x03\x20\x01(\x05R\nlayerDepth\x12!\n\x0cbp_modifiers\ - \x18\x04\x20\x03(\x05R\x0bbpModifiers\"\xc7\x01\n\x0bBodyPartRaw\x12\x14\ - \n\x05token\x18\x01\x20\x01(\tR\x05token\x12\x1a\n\x08category\x18\x02\ - \x20\x01(\tR\x08category\x12\x16\n\x06parent\x18\x03\x20\x01(\x05R\x06pa\ - rent\x12\x14\n\x05flags\x18\x04\x20\x03(\x08R\x05flags\x12>\n\x06layers\ - \x18\x05\x20\x03(\x0b2&.RemoteFortressReader.BodyPartLayerRawR\x06layers\ - \x12\x18\n\x07relsize\x18\x06\x20\x01(\x05R\x07relsize\"\\\n\x14BpAppear\ - anceModifier\x12\x12\n\x04type\x18\x01\x20\x01(\tR\x04type\x12\x17\n\x07\ - mod_min\x18\x02\x20\x01(\x05R\x06modMin\x12\x17\n\x07mod_max\x18\x03\x20\ - \x01(\x05R\x06modMax\"\x9e\x01\n\tTissueRaw\x12\x0e\n\x02id\x18\x01\x20\ - \x01(\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x129\n\x08m\ - aterial\x18\x03\x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x08mater\ - ial\x122\n\x15subordinate_to_tissue\x18\x04\x20\x01(\tR\x13subordinateTo\ - Tissue\"\xb4\x05\n\x08CasteRaw\x12\x14\n\x05index\x18\x01\x20\x01(\x05R\ - \x05index\x12\x19\n\x08caste_id\x18\x02\x20\x01(\tR\x07casteId\x12\x1d\n\ - \ncaste_name\x18\x03\x20\x03(\tR\tcasteName\x12\x1b\n\tbaby_name\x18\x04\ - \x20\x03(\tR\x08babyName\x12\x1d\n\nchild_name\x18\x05\x20\x03(\tR\tchil\ - dName\x12\x16\n\x06gender\x18\x06\x20\x01(\x05R\x06gender\x12@\n\nbody_p\ - arts\x18\x07\x20\x03(\x0b2!.RemoteFortressReader.BodyPartRawR\tbodyParts\ - \x12#\n\rtotal_relsize\x18\x08\x20\x01(\x05R\x0ctotalRelsize\x12H\n\tmod\ - ifiers\x18\t\x20\x03(\x0b2*.RemoteFortressReader.BpAppearanceModifierR\t\ - modifiers\x12!\n\x0cmodifier_idx\x18\n\x20\x03(\x05R\x0bmodifierIdx\x12\ - \x19\n\x08part_idx\x18\x0b\x20\x03(\x05R\x07partIdx\x12\x1b\n\tlayer_idx\ - \x18\x0c\x20\x03(\x05R\x08layerIdx\x12f\n\x19body_appearance_modifiers\ - \x18\r\x20\x03(\x0b2*.RemoteFortressReader.BpAppearanceModifierR\x17body\ - AppearanceModifiers\x12O\n\x0fcolor_modifiers\x18\x0e\x20\x03(\x0b2&.Rem\ - oteFortressReader.ColorModifierRawR\x0ecolorModifiers\x12\x20\n\x0bdescr\ - iption\x18\x0f\x20\x01(\tR\x0bdescription\x12\x1d\n\nadult_size\x18\x10\ - \x20\x01(\x05R\tadultSize\"\xed\x03\n\x0bCreatureRaw\x12\x14\n\x05index\ - \x18\x01\x20\x01(\x05R\x05index\x12\x1f\n\x0bcreature_id\x18\x02\x20\x01\ - (\tR\ncreatureId\x12\x12\n\x04name\x18\x03\x20\x03(\tR\x04name\x12*\n\ - \x11general_baby_name\x18\x04\x20\x03(\tR\x0fgeneralBabyName\x12,\n\x12g\ - eneral_child_name\x18\x05\x20\x03(\tR\x10generalChildName\x12#\n\rcreatu\ - re_tile\x18\x06\x20\x01(\x05R\x0ccreatureTile\x122\n\x15creature_soldier\ - _tile\x18\x07\x20\x01(\x05R\x13creatureSoldierTile\x12;\n\x05color\x18\ - \x08\x20\x01(\x0b2%.RemoteFortressReader.ColorDefinitionR\x05color\x12\ - \x1c\n\tadultsize\x18\t\x20\x01(\x05R\tadultsize\x124\n\x05caste\x18\n\ - \x20\x03(\x0b2\x1e.RemoteFortressReader.CasteRawR\x05caste\x129\n\x07tis\ - sues\x18\x0b\x20\x03(\x0b2\x1f.RemoteFortressReader.TissueRawR\x07tissue\ - s\x12\x14\n\x05flags\x18\x0c\x20\x03(\x08R\x05flags\"Y\n\x0fCreatureRawL\ - ist\x12F\n\rcreature_raws\x18\x01\x20\x03(\x0b2!.RemoteFortressReader.Cr\ - eatureRawR\x0ccreatureRaws\"\xe9\x01\n\x04Army\x12\x0e\n\x02id\x18\x01\ - \x20\x01(\x05R\x02id\x12\x13\n\x05pos_x\x18\x02\x20\x01(\x05R\x04posX\ - \x12\x13\n\x05pos_y\x18\x03\x20\x01(\x05R\x04posY\x12\x13\n\x05pos_z\x18\ - \x04\x20\x01(\x05R\x04posZ\x12<\n\x06leader\x18\x05\x20\x01(\x0b2$.Remot\ - eFortressReader.UnitDefinitionR\x06leader\x12>\n\x07members\x18\x06\x20\ - \x03(\x0b2$.RemoteFortressReader.UnitDefinitionR\x07members\x12\x14\n\ - \x05flags\x18\x07\x20\x01(\rR\x05flags\">\n\x08ArmyList\x122\n\x06armies\ - \x18\x01\x20\x03(\x0b2\x1a.RemoteFortressReader.ArmyR\x06armies\"\x95\ - \x01\n\x0bGrowthPrint\x12\x1a\n\x08priority\x18\x01\x20\x01(\x05R\x08pri\ - ority\x12\x14\n\x05color\x18\x02\x20\x01(\x05R\x05color\x12!\n\x0ctiming\ - _start\x18\x03\x20\x01(\x05R\x0btimingStart\x12\x1d\n\ntiming_end\x18\ - \x04\x20\x01(\x05R\ttimingEnd\x12\x12\n\x04tile\x18\x05\x20\x01(\x05R\ - \x04tile\"\x88\x04\n\nTreeGrowth\x12\x14\n\x05index\x18\x01\x20\x01(\x05\ - R\x05index\x12\x0e\n\x02id\x18\x02\x20\x01(\tR\x02id\x12\x12\n\x04name\ - \x18\x03\x20\x01(\tR\x04name\x12/\n\x03mat\x18\x04\x20\x01(\x0b2\x1d.Rem\ - oteFortressReader.MatPairR\x03mat\x129\n\x06prints\x18\x05\x20\x03(\x0b2\ - !.RemoteFortressReader.GrowthPrintR\x06prints\x12!\n\x0ctiming_start\x18\ - \x06\x20\x01(\x05R\x0btimingStart\x12\x1d\n\ntiming_end\x18\x07\x20\x01(\ - \x05R\ttimingEnd\x12\x14\n\x05twigs\x18\x08\x20\x01(\x08R\x05twigs\x12%\ - \n\x0elight_branches\x18\t\x20\x01(\x08R\rlightBranches\x12%\n\x0eheavy_\ - branches\x18\n\x20\x01(\x08R\rheavyBranches\x12\x14\n\x05trunk\x18\x0b\ - \x20\x01(\x08R\x05trunk\x12\x14\n\x05roots\x18\x0c\x20\x01(\x08R\x05root\ - s\x12\x10\n\x03cap\x18\r\x20\x01(\x08R\x03cap\x12\x18\n\x07sapling\x18\ - \x0e\x20\x01(\x08R\x07sapling\x12,\n\x12trunk_height_start\x18\x0f\x20\ - \x01(\x05R\x10trunkHeightStart\x12(\n\x10trunk_height_end\x18\x10\x20\ - \x01(\x05R\x0etrunkHeightEnd\"\x94\x01\n\x08PlantRaw\x12\x14\n\x05index\ - \x18\x01\x20\x01(\x05R\x05index\x12\x0e\n\x02id\x18\x02\x20\x01(\tR\x02i\ - d\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12:\n\x07growths\x18\ - \x04\x20\x03(\x0b2\x20.RemoteFortressReader.TreeGrowthR\x07growths\x12\ - \x12\n\x04tile\x18\x05\x20\x01(\x05R\x04tile\"M\n\x0cPlantRawList\x12=\n\ - \nplant_raws\x18\x01\x20\x03(\x0b2\x1e.RemoteFortressReader.PlantRawR\tp\ - lantRaws\"j\n\nScreenTile\x12\x1c\n\tcharacter\x18\x01\x20\x01(\rR\tchar\ - acter\x12\x1e\n\nforeground\x18\x02\x20\x01(\rR\nforeground\x12\x1e\n\nb\ - ackground\x18\x03\x20\x01(\rR\nbackground\"u\n\rScreenCapture\x12\x14\n\ - \x05width\x18\x01\x20\x01(\rR\x05width\x12\x16\n\x06height\x18\x02\x20\ - \x01(\rR\x06height\x126\n\x05tiles\x18\x03\x20\x03(\x0b2\x20.RemoteFortr\ - essReader.ScreenTileR\x05tiles\"\xa9\x01\n\rKeyboardEvent\x12\x12\n\x04t\ - ype\x18\x01\x20\x01(\rR\x04type\x12\x14\n\x05which\x18\x02\x20\x01(\rR\ - \x05which\x12\x14\n\x05state\x18\x03\x20\x01(\rR\x05state\x12\x1a\n\x08s\ - cancode\x18\x04\x20\x01(\rR\x08scancode\x12\x10\n\x03sym\x18\x05\x20\x01\ - (\rR\x03sym\x12\x10\n\x03mod\x18\x06\x20\x01(\rR\x03mod\x12\x18\n\x07uni\ - code\x18\x07\x20\x01(\rR\x07unicode\"\x93\x01\n\nDigCommand\x12J\n\x0bde\ - signation\x18\x01\x20\x01(\x0e2(.RemoteFortressReader.TileDigDesignation\ - R\x0bdesignation\x129\n\tlocations\x18\x02\x20\x03(\x0b2\x1b.RemoteFortr\ - essReader.CoordR\tlocations\"\"\n\nSingleBool\x12\x14\n\x05Value\x18\x01\ - \x20\x01(\x08R\x05Value\"\xaf\x01\n\x0bVersionInfo\x124\n\x16dwarf_fortr\ - ess_version\x18\x01\x20\x01(\tR\x14dwarfFortressVersion\x12%\n\x0edfhack\ - _version\x18\x02\x20\x01(\tR\rdfhackVersion\x12C\n\x1eremote_fortress_re\ - ader_version\x18\x03\x20\x01(\tR\x1bremoteFortressReaderVersion\"G\n\x0b\ - ListRequest\x12\x1d\n\nlist_start\x18\x01\x20\x01(\x05R\tlistStart\x12\ - \x19\n\x08list_end\x18\x02\x20\x01(\x05R\x07listEnd\"\xfd\x02\n\x06Repor\ - t\x12\x12\n\x04type\x18\x01\x20\x01(\x05R\x04type\x12\x12\n\x04text\x18\ - \x02\x20\x01(\tR\x04text\x12;\n\x05color\x18\x03\x20\x01(\x0b2%.RemoteFo\ - rtressReader.ColorDefinitionR\x05color\x12\x1a\n\x08duration\x18\x04\x20\ - \x01(\x05R\x08duration\x12\"\n\x0ccontinuation\x18\x05\x20\x01(\x08R\x0c\ - continuation\x12\x20\n\x0bunconscious\x18\x06\x20\x01(\x08R\x0bunconscio\ - us\x12\"\n\x0cannouncement\x18\x07\x20\x01(\x08R\x0cannouncement\x12!\n\ - \x0crepeat_count\x18\x08\x20\x01(\x05R\x0brepeatCount\x12-\n\x03pos\x18\ - \t\x20\x01(\x0b2\x1b.RemoteFortressReader.CoordR\x03pos\x12\x0e\n\x02id\ - \x18\n\x20\x01(\x05R\x02id\x12\x12\n\x04year\x18\x0b\x20\x01(\x05R\x04ye\ - ar\x12\x12\n\x04time\x18\x0c\x20\x01(\x05R\x04time\"@\n\x06Status\x126\n\ - \x07reports\x18\x01\x20\x03(\x0b2\x1c.RemoteFortressReader.ReportR\x07re\ - ports\"6\n\x10ShapeDescriptior\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\ - \x12\x12\n\x04tile\x18\x02\x20\x01(\x05R\x04tile\"J\n\x08Language\x12>\n\ - \x06shapes\x18\x01\x20\x03(\x0b2&.RemoteFortressReader.ShapeDescriptiorR\ - \x06shapes\"\xd1\x01\n\x0fItemImprovement\x129\n\x08material\x18\x01\x20\ - \x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x08material\x12\x14\n\x05sh\ - ape\x18\x03\x20\x01(\x05R\x05shape\x12#\n\rspecific_type\x18\x04\x20\x01\ - (\x05R\x0cspecificType\x124\n\x05image\x18\x05\x20\x01(\x0b2\x1e.RemoteF\ - ortressReader.ArtImageR\x05image\x12\x12\n\x04type\x18\x06\x20\x01(\x05R\ - \x04type\"\xf5\x01\n\x0fArtImageElement\x12\x14\n\x05count\x18\x01\x20\ - \x01(\x05R\x05count\x12=\n\x04type\x18\x02\x20\x01(\x0e2).RemoteFortress\ - Reader.ArtImageElementTypeR\x04type\x12B\n\rcreature_item\x18\x03\x20\ - \x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x0ccreatureItem\x129\n\x08m\ - aterial\x18\x05\x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x08mater\ - ial\x12\x0e\n\x02id\x18\x06\x20\x01(\x05R\x02id\"\xbc\x01\n\x10ArtImageP\ - roperty\x12\x18\n\x07subject\x18\x01\x20\x01(\x05R\x07subject\x12\x16\n\ - \x06object\x18\x02\x20\x01(\x05R\x06object\x126\n\x04verb\x18\x03\x20\ - \x01(\x0e2\".RemoteFortressReader.ArtImageVerbR\x04verb\x12>\n\x04type\ - \x18\x04\x20\x01(\x0e2*.RemoteFortressReader.ArtImagePropertyTypeR\x04ty\ - pe\"\xc4\x01\n\x08ArtImage\x12A\n\x08elements\x18\x01\x20\x03(\x0b2%.Rem\ - oteFortressReader.ArtImageElementR\x08elements\x12-\n\x02id\x18\x02\x20\ - \x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x02id\x12F\n\nproperties\ - \x18\x03\x20\x03(\x0b2&.RemoteFortressReader.ArtImagePropertyR\nproperti\ - es\"\x98\x03\n\tEngraving\x12-\n\x03pos\x18\x01\x20\x01(\x0b2\x1b.Remote\ - FortressReader.CoordR\x03pos\x12\x18\n\x07quality\x18\x02\x20\x01(\x05R\ - \x07quality\x12\x12\n\x04tile\x18\x03\x20\x01(\x05R\x04tile\x124\n\x05im\ - age\x18\x04\x20\x01(\x0b2\x1e.RemoteFortressReader.ArtImageR\x05image\ - \x12\x14\n\x05floor\x18\x05\x20\x01(\x08R\x05floor\x12\x12\n\x04west\x18\ - \x06\x20\x01(\x08R\x04west\x12\x12\n\x04east\x18\x07\x20\x01(\x08R\x04ea\ - st\x12\x14\n\x05north\x18\x08\x20\x01(\x08R\x05north\x12\x14\n\x05south\ - \x18\t\x20\x01(\x08R\x05south\x12\x16\n\x06hidden\x18\n\x20\x01(\x08R\ - \x06hidden\x12\x1c\n\tnorthwest\x18\x0b\x20\x01(\x08R\tnorthwest\x12\x1c\ - \n\tnortheast\x18\x0c\x20\x01(\x08R\tnortheast\x12\x1c\n\tsouthwest\x18\ - \r\x20\x01(\x08R\tsouthwest\x12\x1c\n\tsoutheast\x18\x0e\x20\x01(\x08R\t\ - southeast\"\xd3\x03\n\x08FlowInfo\x12\x14\n\x05index\x18\x01\x20\x01(\ - \x05R\x05index\x122\n\x04type\x18\x02\x20\x01(\x0e2\x1e.RemoteFortressRe\ - ader.FlowTypeR\x04type\x12\x18\n\x07density\x18\x03\x20\x01(\x05R\x07den\ - sity\x12-\n\x03pos\x18\x04\x20\x01(\x0b2\x1b.RemoteFortressReader.CoordR\ - \x03pos\x12/\n\x04dest\x18\x05\x20\x01(\x0b2\x1b.RemoteFortressReader.Co\ - ordR\x04dest\x12\x1c\n\texpanding\x18\x06\x20\x01(\x08R\texpanding\x12\ - \x18\n\x05reuse\x18\x07\x20\x01(\x08R\x05reuseB\x02\x18\x01\x12\x19\n\ - \x08guide_id\x18\x08\x20\x01(\x05R\x07guideId\x129\n\x08material\x18\t\ - \x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x08material\x121\n\x04i\ - tem\x18\n\x20\x01(\x0b2\x1d.RemoteFortressReader.MatPairR\x04item\x12\ - \x12\n\x04dead\x18\x0b\x20\x01(\x08R\x04dead\x12\x12\n\x04fast\x18\x0c\ - \x20\x01(\x08R\x04fast\x12\x1a\n\x08creeping\x18\r\x20\x01(\x08R\x08cree\ - ping\"f\n\x04Wave\x12/\n\x04dest\x18\x01\x20\x01(\x0b2\x1b.RemoteFortres\ - sReader.CoordR\x04dest\x12-\n\x03pos\x18\x02\x20\x01(\x0b2\x1b.RemoteFor\ - tressReader.CoordR\x03pos*\xba\x02\n\rTiletypeShape\x12\x15\n\x08NO_SHAP\ - E\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\t\n\x05EMPTY\x10\0\x12\ - \t\n\x05FLOOR\x10\x01\x12\x0b\n\x07BOULDER\x10\x02\x12\x0b\n\x07PEBBLES\ - \x10\x03\x12\x08\n\x04WALL\x10\x04\x12\x11\n\rFORTIFICATION\x10\x05\x12\ - \x0c\n\x08STAIR_UP\x10\x06\x12\x0e\n\nSTAIR_DOWN\x10\x07\x12\x10\n\x0cST\ - AIR_UPDOWN\x10\x08\x12\x08\n\x04RAMP\x10\t\x12\x0c\n\x08RAMP_TOP\x10\n\ - \x12\r\n\tBROOK_BED\x10\x0b\x12\r\n\tBROOK_TOP\x10\x0c\x12\x0e\n\nTREE_S\ - HAPE\x10\r\x12\x0b\n\x07SAPLING\x10\x0e\x12\t\n\x05SHRUB\x10\x0f\x12\x0f\ - \n\x0bENDLESS_PIT\x10\x10\x12\n\n\x06BRANCH\x10\x11\x12\x10\n\x0cTRUNK_B\ - RANCH\x10\x12\x12\x08\n\x04TWIG\x10\x13*\xc4\x01\n\x0fTiletypeSpecial\ - \x12\x17\n\nNO_SPECIAL\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\n\ - \n\x06NORMAL\x10\0\x12\x10\n\x0cRIVER_SOURCE\x10\x01\x12\r\n\tWATERFALL\ - \x10\x02\x12\n\n\x06SMOOTH\x10\x03\x12\x0c\n\x08FURROWED\x10\x04\x12\x07\ - \n\x03WET\x10\x05\x12\x08\n\x04DEAD\x10\x06\x12\n\n\x06WORN_1\x10\x07\ - \x12\n\n\x06WORN_2\x10\x08\x12\n\n\x06WORN_3\x10\t\x12\t\n\x05TRACK\x10\ - \n\x12\x0f\n\x0bSMOOTH_DEAD\x10\x0b*\x8a\x03\n\x10TiletypeMaterial\x12\ - \x18\n\x0bNO_MATERIAL\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\ - \x07\n\x03AIR\x10\0\x12\x08\n\x04SOIL\x10\x01\x12\t\n\x05STONE\x10\x02\ - \x12\x0b\n\x07FEATURE\x10\x03\x12\x0e\n\nLAVA_STONE\x10\x04\x12\x0b\n\ - \x07MINERAL\x10\x05\x12\x11\n\rFROZEN_LIQUID\x10\x06\x12\x10\n\x0cCONSTR\ - UCTION\x10\x07\x12\x0f\n\x0bGRASS_LIGHT\x10\x08\x12\x0e\n\nGRASS_DARK\ - \x10\t\x12\r\n\tGRASS_DRY\x10\n\x12\x0e\n\nGRASS_DEAD\x10\x0b\x12\t\n\ - \x05PLANT\x10\x0c\x12\x07\n\x03HFS\x10\r\x12\x0c\n\x08CAMPFIRE\x10\x0e\ - \x12\x08\n\x04FIRE\x10\x0f\x12\t\n\x05ASHES\x10\x10\x12\t\n\x05MAGMA\x10\ - \x11\x12\r\n\tDRIFTWOOD\x10\x12\x12\x08\n\x04POOL\x10\x13\x12\t\n\x05BRO\ - OK\x10\x14\x12\t\n\x05RIVER\x10\x15\x12\x08\n\x04ROOT\x10\x16\x12\x11\n\ - \rTREE_MATERIAL\x10\x17\x12\x0c\n\x08MUSHROOM\x10\x18\x12\x13\n\x0fUNDER\ - WORLD_GATE\x10\x19*V\n\x0fTiletypeVariant\x12\x17\n\nNO_VARIANT\x10\xff\ - \xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\t\n\x05VAR_1\x10\0\x12\t\n\x05V\ - AR_2\x10\x01\x12\t\n\x05VAR_3\x10\x02\x12\t\n\x05VAR_4\x10\x03*J\n\nWorl\ - dPoles\x12\x0c\n\x08NO_POLES\x10\0\x12\x0e\n\nNORTH_POLE\x10\x01\x12\x0e\ - \n\nSOUTH_POLE\x10\x02\x12\x0e\n\nBOTH_POLES\x10\x03*\x83\x01\n\x11Build\ - ingDirection\x12\t\n\x05NORTH\x10\0\x12\x08\n\x04EAST\x10\x01\x12\t\n\ - \x05SOUTH\x10\x02\x12\x08\n\x04WEST\x10\x03\x12\r\n\tNORTHEAST\x10\x04\ - \x12\r\n\tSOUTHEAST\x10\x05\x12\r\n\tSOUTHWEST\x10\x06\x12\r\n\tNORTHWES\ - T\x10\x07\x12\x08\n\x04NONE\x10\x08*\x8d\x01\n\x12TileDigDesignation\x12\ - \n\n\x06NO_DIG\x10\0\x12\x0f\n\x0bDEFAULT_DIG\x10\x01\x12\x15\n\x11UP_DO\ - WN_STAIR_DIG\x10\x02\x12\x0f\n\x0bCHANNEL_DIG\x10\x03\x12\x0c\n\x08RAMP_\ - DIG\x10\x04\x12\x12\n\x0eDOWN_STAIR_DIG\x10\x05\x12\x10\n\x0cUP_STAIR_DI\ - G\x10\x06*u\n\tHairStyle\x12\x14\n\x07UNKEMPT\x10\xff\xff\xff\xff\xff\ - \xff\xff\xff\xff\x01\x12\x11\n\rNEATLY_COMBED\x10\0\x12\x0b\n\x07BRAIDED\ - \x10\x01\x12\x10\n\x0cDOUBLE_BRAID\x10\x02\x12\x0e\n\nPONY_TAILS\x10\x03\ - \x12\x10\n\x0cCLEAN_SHAVEN\x10\x04*\x9c\x01\n\rInventoryMode\x12\n\n\x06\ - Hauled\x10\0\x12\n\n\x06Weapon\x10\x01\x12\x08\n\x04Worn\x10\x02\x12\x0c\ - \n\x08Piercing\x10\x03\x12\t\n\x05Flask\x10\x04\x12\x11\n\rWrappedAround\ - \x10\x05\x12\x0b\n\x07StuckIn\x10\x06\x12\x0b\n\x07InMouth\x10\x07\x12\ - \x07\n\x03Pet\x10\x08\x12\x0c\n\x08SewnInto\x10\t\x12\x0c\n\x08Strapped\ - \x10\n*O\n\nArmorLayer\x12\x0f\n\x0bLAYER_UNDER\x10\0\x12\x0e\n\nLAYER_O\ - VER\x10\x01\x12\x0f\n\x0bLAYER_ARMOR\x10\x02\x12\x0f\n\x0bLAYER_COVER\ - \x10\x03*Q\n\x0bMatterState\x12\t\n\x05Solid\x10\0\x12\n\n\x06Liquid\x10\ - \x01\x12\x07\n\x03Gas\x10\x02\x12\n\n\x06Powder\x10\x03\x12\t\n\x05Paste\ - \x10\x04\x12\x0b\n\x07Pressed\x10\x05*O\n\tFrontType\x12\x0e\n\nFRONT_NO\ - NE\x10\0\x12\x0e\n\nFRONT_WARM\x10\x01\x12\x0e\n\nFRONT_COLD\x10\x02\x12\ - \x12\n\x0eFRONT_OCCLUDED\x10\x03*Z\n\x0bCumulusType\x12\x10\n\x0cCUMULUS\ - _NONE\x10\0\x12\x12\n\x0eCUMULUS_MEDIUM\x10\x01\x12\x11\n\rCUMULUS_MULTI\ - \x10\x02\x12\x12\n\x0eCUMULUS_NIMBUS\x10\x03*Y\n\x0bStratusType\x12\x10\ - \n\x0cSTRATUS_NONE\x10\0\x12\x10\n\x0cSTRATUS_ALTO\x10\x01\x12\x12\n\x0e\ - STRATUS_PROPER\x10\x02\x12\x12\n\x0eSTRATUS_NIMBUS\x10\x03*D\n\x07FogTyp\ - e\x12\x0c\n\x08FOG_NONE\x10\0\x12\x0c\n\x08FOG_MIST\x10\x01\x12\x0e\n\nF\ - OG_NORMAL\x10\x02\x12\r\n\tF0G_THICK\x10\x03*]\n\x0bPatternType\x12\x0c\ - \n\x08MONOTONE\x10\0\x12\x0b\n\x07STRIPES\x10\x01\x12\x0c\n\x08IRIS_EYE\ - \x10\x02\x12\t\n\x05SPOTS\x10\x03\x12\r\n\tPUPIL_EYE\x10\x04\x12\x0b\n\ - \x07MOTTLED\x10\x05*k\n\x13ArtImageElementType\x12\x12\n\x0eIMAGE_CREATU\ - RE\x10\0\x12\x0f\n\x0bIMAGE_PLANT\x10\x01\x12\x0e\n\nIMAGE_TREE\x10\x02\ - \x12\x0f\n\x0bIMAGE_SHAPE\x10\x03\x12\x0e\n\nIMAGE_ITEM\x10\x04*B\n\x14A\ - rtImagePropertyType\x12\x13\n\x0fTRANSITIVE_VERB\x10\0\x12\x15\n\x11INTR\ - ANSITIVE_VERB\x10\x01*\x95\x08\n\x0cArtImageVerb\x12\x12\n\x0eVERB_WITHE\ - RING\x10\0\x12\x15\n\x11VERB_SURROUNDEDBY\x10\x01\x12\x13\n\x0fVERB_MASS\ - ACRING\x10\x02\x12\x11\n\rVERB_FIGHTING\x10\x03\x12\x11\n\rVERB_LABORING\ - \x10\x04\x12\x11\n\rVERB_GREETING\x10\x05\x12\x11\n\rVERB_REFUSING\x10\ - \x06\x12\x11\n\rVERB_SPEAKING\x10\x07\x12\x12\n\x0eVERB_EMBRACING\x10\ - \x08\x12\x15\n\x11VERB_STRIKINGDOWN\x10\t\x12\x15\n\x11VERB_MENACINGPOSE\ - \x10\n\x12\x12\n\x0eVERB_TRAVELING\x10\x0b\x12\x10\n\x0cVERB_RAISING\x10\ - \x0c\x12\x0f\n\x0bVERB_HIDING\x10\r\x12\x18\n\x14VERB_LOOKINGCONFUSED\ - \x10\x0e\x12\x19\n\x15VERB_LOOKINGTERRIFIED\x10\x0f\x12\x12\n\x0eVERB_DE\ - VOURING\x10\x10\x12\x11\n\rVERB_ADMIRING\x10\x11\x12\x10\n\x0cVERB_BURNI\ - NG\x10\x12\x12\x10\n\x0cVERB_WEEPING\x10\x13\x12\x18\n\x14VERB_LOOKINGDE\ - JECTED\x10\x14\x12\x11\n\rVERB_CRINGING\x10\x15\x12\x12\n\x0eVERB_SCREAM\ - ING\x10\x16\x12\x1a\n\x16VERB_SUBMISSIVEGESTURE\x10\x17\x12\x16\n\x12VER\ - B_FETALPOSITION\x10\x18\x12\x1a\n\x16VERB_SMEAREDINTOSPIRAL\x10\x19\x12\ - \x10\n\x0cVERB_FALLING\x10\x1a\x12\r\n\tVERB_DEAD\x10\x1b\x12\x11\n\rVER\ - B_LAUGHING\x10\x1c\x12\x18\n\x14VERB_LOOKINGOFFENDED\x10\x1d\x12\x12\n\ - \x0eVERB_BEINGSHOT\x10\x1e\x12\x19\n\x15VERB_PLAINTIVEGESTURE\x10\x1f\ - \x12\x10\n\x0cVERB_MELTING\x10\x20\x12\x11\n\rVERB_SHOOTING\x10!\x12\x12\ - \n\x0eVERB_TORTURING\x10\"\x12\x1e\n\x1aVERB_COMMITTINGDEPRAVEDACT\x10#\ - \x12\x10\n\x0cVERB_PRAYING\x10$\x12\x16\n\x12VERB_CONTEMPLATING\x10%\x12\ - \x10\n\x0cVERB_COOKING\x10&\x12\x12\n\x0eVERB_ENGRAVING\x10'\x12\x14\n\ - \x10VERB_PROSTRATING\x10(\x12\x12\n\x0eVERB_SUFFERING\x10)\x12\x15\n\x11\ - VERB_BEINGIMPALED\x10*\x12\x17\n\x13VERB_BEINGCONTORTED\x10+\x12\x14\n\ - \x10VERB_BEINGFLAYED\x10,\x12\x14\n\x10VERB_HANGINGFROM\x10-\x12\x17\n\ - \x13VERB_BEINGMUTILATED\x10.\x12\x17\n\x13VERB_TRIUMPHANTPOSE\x10/*\xe0\ - \x01\n\x08FlowType\x12\n\n\x06Miasma\x10\0\x12\t\n\x05Steam\x10\x01\x12\ - \x08\n\x04Mist\x10\x02\x12\x10\n\x0cMaterialDust\x10\x03\x12\r\n\tMagmaM\ - ist\x10\x04\x12\t\n\x05Smoke\x10\x05\x12\x0e\n\nDragonfire\x10\x06\x12\ - \x08\n\x04Fire\x10\x07\x12\x07\n\x03Web\x10\x08\x12\x0f\n\x0bMaterialGas\ - \x10\t\x12\x11\n\rMaterialVapor\x10\n\x12\r\n\tOceanWave\x10\x0b\x12\x0b\ - \n\x07SeaFoam\x10\x0c\x12\r\n\tItemCloud\x10\r\x12\x15\n\x08CampFire\x10\ - \xff\xff\xff\xff\xff\xff\xff\xff\xff\x01B\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::ItemdefInstrument::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(79); - messages.push(Coord::generated_message_descriptor_data()); - messages.push(Tiletype::generated_message_descriptor_data()); - messages.push(TiletypeList::generated_message_descriptor_data()); - messages.push(BuildingExtents::generated_message_descriptor_data()); - messages.push(BuildingItem::generated_message_descriptor_data()); - messages.push(BuildingInstance::generated_message_descriptor_data()); - messages.push(RiverEdge::generated_message_descriptor_data()); - messages.push(RiverTile::generated_message_descriptor_data()); - messages.push(Spatter::generated_message_descriptor_data()); - messages.push(SpatterPile::generated_message_descriptor_data()); - messages.push(Item::generated_message_descriptor_data()); - messages.push(PlantTile::generated_message_descriptor_data()); - messages.push(TreeInfo::generated_message_descriptor_data()); - messages.push(PlantInstance::generated_message_descriptor_data()); - messages.push(MapBlock::generated_message_descriptor_data()); - messages.push(MatPair::generated_message_descriptor_data()); - messages.push(ColorDefinition::generated_message_descriptor_data()); - messages.push(MaterialDefinition::generated_message_descriptor_data()); - messages.push(BuildingType::generated_message_descriptor_data()); - messages.push(BuildingDefinition::generated_message_descriptor_data()); - messages.push(BuildingList::generated_message_descriptor_data()); - messages.push(MaterialList::generated_message_descriptor_data()); - messages.push(Hair::generated_message_descriptor_data()); - messages.push(BodySizeInfo::generated_message_descriptor_data()); - messages.push(UnitAppearance::generated_message_descriptor_data()); - messages.push(InventoryItem::generated_message_descriptor_data()); - messages.push(WoundPart::generated_message_descriptor_data()); - messages.push(UnitWound::generated_message_descriptor_data()); - messages.push(UnitDefinition::generated_message_descriptor_data()); - messages.push(UnitList::generated_message_descriptor_data()); - messages.push(BlockRequest::generated_message_descriptor_data()); - messages.push(BlockList::generated_message_descriptor_data()); - messages.push(PlantDef::generated_message_descriptor_data()); - messages.push(PlantList::generated_message_descriptor_data()); - messages.push(ViewInfo::generated_message_descriptor_data()); - messages.push(MapInfo::generated_message_descriptor_data()); - messages.push(Cloud::generated_message_descriptor_data()); - messages.push(WorldMap::generated_message_descriptor_data()); - messages.push(SiteRealizationBuildingWall::generated_message_descriptor_data()); - messages.push(SiteRealizationBuildingTower::generated_message_descriptor_data()); - messages.push(TrenchSpoke::generated_message_descriptor_data()); - messages.push(SiteRealizationBuildingTrenches::generated_message_descriptor_data()); - messages.push(SiteRealizationBuilding::generated_message_descriptor_data()); - messages.push(RegionTile::generated_message_descriptor_data()); - messages.push(RegionMap::generated_message_descriptor_data()); - messages.push(RegionMaps::generated_message_descriptor_data()); - messages.push(PatternDescriptor::generated_message_descriptor_data()); - messages.push(ColorModifierRaw::generated_message_descriptor_data()); - messages.push(BodyPartLayerRaw::generated_message_descriptor_data()); - messages.push(BodyPartRaw::generated_message_descriptor_data()); - messages.push(BpAppearanceModifier::generated_message_descriptor_data()); - messages.push(TissueRaw::generated_message_descriptor_data()); - messages.push(CasteRaw::generated_message_descriptor_data()); - messages.push(CreatureRaw::generated_message_descriptor_data()); - messages.push(CreatureRawList::generated_message_descriptor_data()); - messages.push(Army::generated_message_descriptor_data()); - messages.push(ArmyList::generated_message_descriptor_data()); - messages.push(GrowthPrint::generated_message_descriptor_data()); - messages.push(TreeGrowth::generated_message_descriptor_data()); - messages.push(PlantRaw::generated_message_descriptor_data()); - messages.push(PlantRawList::generated_message_descriptor_data()); - messages.push(ScreenTile::generated_message_descriptor_data()); - messages.push(ScreenCapture::generated_message_descriptor_data()); - messages.push(KeyboardEvent::generated_message_descriptor_data()); - messages.push(DigCommand::generated_message_descriptor_data()); - messages.push(SingleBool::generated_message_descriptor_data()); - messages.push(VersionInfo::generated_message_descriptor_data()); - messages.push(ListRequest::generated_message_descriptor_data()); - messages.push(Report::generated_message_descriptor_data()); - messages.push(Status::generated_message_descriptor_data()); - messages.push(ShapeDescriptior::generated_message_descriptor_data()); - messages.push(Language::generated_message_descriptor_data()); - messages.push(ItemImprovement::generated_message_descriptor_data()); - messages.push(ArtImageElement::generated_message_descriptor_data()); - messages.push(ArtImageProperty::generated_message_descriptor_data()); - messages.push(ArtImage::generated_message_descriptor_data()); - messages.push(Engraving::generated_message_descriptor_data()); - messages.push(FlowInfo::generated_message_descriptor_data()); - messages.push(Wave::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(20); - enums.push(TiletypeShape::generated_enum_descriptor_data()); - enums.push(TiletypeSpecial::generated_enum_descriptor_data()); - enums.push(TiletypeMaterial::generated_enum_descriptor_data()); - enums.push(TiletypeVariant::generated_enum_descriptor_data()); - enums.push(WorldPoles::generated_enum_descriptor_data()); - enums.push(BuildingDirection::generated_enum_descriptor_data()); - enums.push(TileDigDesignation::generated_enum_descriptor_data()); - enums.push(HairStyle::generated_enum_descriptor_data()); - enums.push(InventoryMode::generated_enum_descriptor_data()); - enums.push(ArmorLayer::generated_enum_descriptor_data()); - enums.push(MatterState::generated_enum_descriptor_data()); - enums.push(FrontType::generated_enum_descriptor_data()); - enums.push(CumulusType::generated_enum_descriptor_data()); - enums.push(StratusType::generated_enum_descriptor_data()); - enums.push(FogType::generated_enum_descriptor_data()); - enums.push(PatternType::generated_enum_descriptor_data()); - enums.push(ArtImageElementType::generated_enum_descriptor_data()); - enums.push(ArtImagePropertyType::generated_enum_descriptor_data()); - enums.push(ArtImageVerb::generated_enum_descriptor_data()); - enums.push(FlowType::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/adventure_control.rs b/dfhack-proto/src/generated/messages/adventure_control.rs new file mode 100644 index 0000000..88f040e --- /dev/null +++ b/dfhack-proto/src/generated/messages/adventure_control.rs @@ -0,0 +1,325 @@ +// This file is @generated by prost-build. +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct MoveCommandParams { + #[prost(message, optional, tag = "1")] + pub direction: ::core::option::Option, +} +impl ::prost::Name for MoveCommandParams { + const NAME: &'static str = "MoveCommandParams"; + const PACKAGE: &'static str = "AdventureControl"; + fn full_name() -> ::prost::alloc::string::String { + "AdventureControl.MoveCommandParams".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/AdventureControl.MoveCommandParams".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct MovementOption { + #[prost(message, optional, tag = "1")] + pub dest: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub source: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub grab: ::core::option::Option, + #[prost(enumeration = "CarefulMovementType", optional, tag = "4")] + pub movement_type: ::core::option::Option, +} +impl ::prost::Name for MovementOption { + const NAME: &'static str = "MovementOption"; + const PACKAGE: &'static str = "AdventureControl"; + fn full_name() -> ::prost::alloc::string::String { + "AdventureControl.MovementOption".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/AdventureControl.MovementOption".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MenuContents { + #[prost(enumeration = "AdvmodeMenu", optional, tag = "1")] + pub current_menu: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub movements: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MenuContents { + const NAME: &'static str = "MenuContents"; + const PACKAGE: &'static str = "AdventureControl"; + fn full_name() -> ::prost::alloc::string::String { + "AdventureControl.MenuContents".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/AdventureControl.MenuContents".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct MiscMoveParams { + #[prost(enumeration = "MiscMoveType", optional, tag = "1")] + pub r#type: ::core::option::Option, +} +impl ::prost::Name for MiscMoveParams { + const NAME: &'static str = "MiscMoveParams"; + const PACKAGE: &'static str = "AdventureControl"; + fn full_name() -> ::prost::alloc::string::String { + "AdventureControl.MiscMoveParams".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/AdventureControl.MiscMoveParams".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AdvmodeMenu { + Default = 0, + Look = 1, + ConversationAddress = 2, + ConversationSelect = 3, + ConversationSpeak = 4, + Inventory = 5, + Drop = 6, + ThrowItem = 7, + Wear = 8, + Remove = 9, + Interact = 10, + Put = 11, + PutContainer = 12, + Eat = 13, + ThrowAim = 14, + Fire = 15, + Get = 16, + Unk17 = 17, + CombatPrefs = 18, + Companions = 19, + MovementPrefs = 20, + SpeedPrefs = 21, + InteractAction = 22, + MoveCarefully = 23, + Announcements = 24, + UseBuilding = 25, + Travel = 26, + Unk27 = 27, + Unk28 = 28, + SleepConfirm = 29, + SelectInteractionTarget = 30, + Unk31 = 31, + Unk32 = 32, + FallAction = 33, + ViewTracks = 34, + Jump = 35, + Unk36 = 36, + AttackConfirm = 37, + AttackType = 38, + AttackBodypart = 39, + AttackStrike = 40, + Unk41 = 41, + Unk42 = 42, + DodgeDirection = 43, + Unk44 = 44, + Unk45 = 45, + Build = 46, +} +impl AdvmodeMenu { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Default => "Default", + Self::Look => "Look", + Self::ConversationAddress => "ConversationAddress", + Self::ConversationSelect => "ConversationSelect", + Self::ConversationSpeak => "ConversationSpeak", + Self::Inventory => "Inventory", + Self::Drop => "Drop", + Self::ThrowItem => "ThrowItem", + Self::Wear => "Wear", + Self::Remove => "Remove", + Self::Interact => "Interact", + Self::Put => "Put", + Self::PutContainer => "PutContainer", + Self::Eat => "Eat", + Self::ThrowAim => "ThrowAim", + Self::Fire => "Fire", + Self::Get => "Get", + Self::Unk17 => "Unk17", + Self::CombatPrefs => "CombatPrefs", + Self::Companions => "Companions", + Self::MovementPrefs => "MovementPrefs", + Self::SpeedPrefs => "SpeedPrefs", + Self::InteractAction => "InteractAction", + Self::MoveCarefully => "MoveCarefully", + Self::Announcements => "Announcements", + Self::UseBuilding => "UseBuilding", + Self::Travel => "Travel", + Self::Unk27 => "Unk27", + Self::Unk28 => "Unk28", + Self::SleepConfirm => "SleepConfirm", + Self::SelectInteractionTarget => "SelectInteractionTarget", + Self::Unk31 => "Unk31", + Self::Unk32 => "Unk32", + Self::FallAction => "FallAction", + Self::ViewTracks => "ViewTracks", + Self::Jump => "Jump", + Self::Unk36 => "Unk36", + Self::AttackConfirm => "AttackConfirm", + Self::AttackType => "AttackType", + Self::AttackBodypart => "AttackBodypart", + Self::AttackStrike => "AttackStrike", + Self::Unk41 => "Unk41", + Self::Unk42 => "Unk42", + Self::DodgeDirection => "DodgeDirection", + Self::Unk44 => "Unk44", + Self::Unk45 => "Unk45", + Self::Build => "Build", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Default" => Some(Self::Default), + "Look" => Some(Self::Look), + "ConversationAddress" => Some(Self::ConversationAddress), + "ConversationSelect" => Some(Self::ConversationSelect), + "ConversationSpeak" => Some(Self::ConversationSpeak), + "Inventory" => Some(Self::Inventory), + "Drop" => Some(Self::Drop), + "ThrowItem" => Some(Self::ThrowItem), + "Wear" => Some(Self::Wear), + "Remove" => Some(Self::Remove), + "Interact" => Some(Self::Interact), + "Put" => Some(Self::Put), + "PutContainer" => Some(Self::PutContainer), + "Eat" => Some(Self::Eat), + "ThrowAim" => Some(Self::ThrowAim), + "Fire" => Some(Self::Fire), + "Get" => Some(Self::Get), + "Unk17" => Some(Self::Unk17), + "CombatPrefs" => Some(Self::CombatPrefs), + "Companions" => Some(Self::Companions), + "MovementPrefs" => Some(Self::MovementPrefs), + "SpeedPrefs" => Some(Self::SpeedPrefs), + "InteractAction" => Some(Self::InteractAction), + "MoveCarefully" => Some(Self::MoveCarefully), + "Announcements" => Some(Self::Announcements), + "UseBuilding" => Some(Self::UseBuilding), + "Travel" => Some(Self::Travel), + "Unk27" => Some(Self::Unk27), + "Unk28" => Some(Self::Unk28), + "SleepConfirm" => Some(Self::SleepConfirm), + "SelectInteractionTarget" => Some(Self::SelectInteractionTarget), + "Unk31" => Some(Self::Unk31), + "Unk32" => Some(Self::Unk32), + "FallAction" => Some(Self::FallAction), + "ViewTracks" => Some(Self::ViewTracks), + "Jump" => Some(Self::Jump), + "Unk36" => Some(Self::Unk36), + "AttackConfirm" => Some(Self::AttackConfirm), + "AttackType" => Some(Self::AttackType), + "AttackBodypart" => Some(Self::AttackBodypart), + "AttackStrike" => Some(Self::AttackStrike), + "Unk41" => Some(Self::Unk41), + "Unk42" => Some(Self::Unk42), + "DodgeDirection" => Some(Self::DodgeDirection), + "Unk44" => Some(Self::Unk44), + "Unk45" => Some(Self::Unk45), + "Build" => Some(Self::Build), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum CarefulMovementType { + DefaultMovement = 0, + ReleaseItemHold = 1, + ReleaseTileHold = 2, + AttackCreature = 3, + HoldTile = 4, + Move = 5, + Climb = 6, + HoldItem = 7, + BuildingInteract = 8, + ItemInteract = 9, + ItemInteractGuide = 10, + ItemInteractRide = 11, + ItemInteractPush = 12, +} +impl CarefulMovementType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::DefaultMovement => "DEFAULT_MOVEMENT", + Self::ReleaseItemHold => "RELEASE_ITEM_HOLD", + Self::ReleaseTileHold => "RELEASE_TILE_HOLD", + Self::AttackCreature => "ATTACK_CREATURE", + Self::HoldTile => "HOLD_TILE", + Self::Move => "MOVE", + Self::Climb => "CLIMB", + Self::HoldItem => "HOLD_ITEM", + Self::BuildingInteract => "BUILDING_INTERACT", + Self::ItemInteract => "ITEM_INTERACT", + Self::ItemInteractGuide => "ITEM_INTERACT_GUIDE", + Self::ItemInteractRide => "ITEM_INTERACT_RIDE", + Self::ItemInteractPush => "ITEM_INTERACT_PUSH", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DEFAULT_MOVEMENT" => Some(Self::DefaultMovement), + "RELEASE_ITEM_HOLD" => Some(Self::ReleaseItemHold), + "RELEASE_TILE_HOLD" => Some(Self::ReleaseTileHold), + "ATTACK_CREATURE" => Some(Self::AttackCreature), + "HOLD_TILE" => Some(Self::HoldTile), + "MOVE" => Some(Self::Move), + "CLIMB" => Some(Self::Climb), + "HOLD_ITEM" => Some(Self::HoldItem), + "BUILDING_INTERACT" => Some(Self::BuildingInteract), + "ITEM_INTERACT" => Some(Self::ItemInteract), + "ITEM_INTERACT_GUIDE" => Some(Self::ItemInteractGuide), + "ITEM_INTERACT_RIDE" => Some(Self::ItemInteractRide), + "ITEM_INTERACT_PUSH" => Some(Self::ItemInteractPush), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MiscMoveType { + SetClimb = 0, + SetStand = 1, + SetCancel = 2, +} +impl MiscMoveType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::SetClimb => "SET_CLIMB", + Self::SetStand => "SET_STAND", + Self::SetCancel => "SET_CANCEL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SET_CLIMB" => Some(Self::SetClimb), + "SET_STAND" => Some(Self::SetStand), + "SET_CANCEL" => Some(Self::SetCancel), + _ => None, + } + } +} diff --git a/dfhack-proto/src/generated/messages/dfproto.rs b/dfhack-proto/src/generated/messages/dfproto.rs new file mode 100644 index 0000000..d4e3653 --- /dev/null +++ b/dfhack-proto/src/generated/messages/dfproto.rs @@ -0,0 +1,1192 @@ +// This file is @generated by prost-build. +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct EnumItemName { + #[prost(int32, required, tag = "1")] + pub value: i32, + #[prost(string, optional, tag = "2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + /// For bitfield members + #[prost(int32, optional, tag = "3", default = "1")] + pub bit_size: ::core::option::Option, +} +impl ::prost::Name for EnumItemName { + const NAME: &'static str = "EnumItemName"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.EnumItemName".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.EnumItemName".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BasicMaterialId { + #[prost(int32, required, tag = "1")] + pub r#type: i32, + #[prost(sint32, required, tag = "2")] + pub index: i32, +} +impl ::prost::Name for BasicMaterialId { + const NAME: &'static str = "BasicMaterialId"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicMaterialId".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicMaterialId".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BasicMaterialInfo { + #[prost(int32, required, tag = "1")] + pub r#type: i32, + #[prost(sint32, required, tag = "2")] + pub index: i32, + /// The raw token + #[prost(string, required, tag = "3")] + pub token: ::prost::alloc::string::String, + /// IF mask.flags: + /// List of material_flags indices + #[prost(int32, repeated, packed = "false", tag = "4")] + pub flags: ::prost::alloc::vec::Vec, + /// Material type/index expanded: + #[prost(int32, optional, tag = "5", default = "-1")] + pub subtype: ::core::option::Option, + #[prost(int32, optional, tag = "6", default = "-1")] + pub creature_id: ::core::option::Option, + #[prost(int32, optional, tag = "7", default = "-1")] + pub plant_id: ::core::option::Option, + #[prost(int32, optional, tag = "8", default = "-1")] + pub histfig_id: ::core::option::Option, + #[prost(string, optional, tag = "9", default = "")] + pub name_prefix: ::core::option::Option<::prost::alloc::string::String>, + /// IF mask.states: in listed order; + /// ELSE: one state matching mask.temperature + #[prost(fixed32, repeated, packed = "false", tag = "10")] + pub state_color: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag = "11")] + pub state_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "12")] + pub state_adj: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "13")] + pub reaction_class: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "14")] + pub reaction_product: ::prost::alloc::vec::Vec, + /// IF mask.flags: + #[prost(int32, repeated, packed = "false", tag = "15")] + pub inorganic_flags: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `BasicMaterialInfo`. +pub mod basic_material_info { + /// IF mask.reaction: + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct Product { + #[prost(string, required, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(int32, required, tag = "2")] + pub r#type: i32, + #[prost(sint32, required, tag = "3")] + pub index: i32, + } + impl ::prost::Name for Product { + const NAME: &'static str = "Product"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicMaterialInfo.Product".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicMaterialInfo.Product".into() + } + } +} +impl ::prost::Name for BasicMaterialInfo { + const NAME: &'static str = "BasicMaterialInfo"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicMaterialInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicMaterialInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BasicMaterialInfoMask { + #[prost( + enumeration = "basic_material_info_mask::StateType", + repeated, + packed = "false", + tag = "1" + )] + pub states: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4", default = "10015")] + pub temperature: ::core::option::Option, + #[prost(bool, optional, tag = "2", default = "false")] + pub flags: ::core::option::Option, + #[prost(bool, optional, tag = "3", default = "false")] + pub reaction: ::core::option::Option, +} +/// Nested message and enum types in `BasicMaterialInfoMask`. +pub mod basic_material_info_mask { + #[derive(serde::Serialize)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum StateType { + Solid = 0, + Liquid = 1, + Gas = 2, + Powder = 3, + Paste = 4, + Pressed = 5, + } + impl StateType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Solid => "Solid", + Self::Liquid => "Liquid", + Self::Gas => "Gas", + Self::Powder => "Powder", + Self::Paste => "Paste", + Self::Pressed => "Pressed", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Solid" => Some(Self::Solid), + "Liquid" => Some(Self::Liquid), + "Gas" => Some(Self::Gas), + "Powder" => Some(Self::Powder), + "Paste" => Some(Self::Paste), + "Pressed" => Some(Self::Pressed), + _ => None, + } + } + } +} +impl ::prost::Name for BasicMaterialInfoMask { + const NAME: &'static str = "BasicMaterialInfoMask"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicMaterialInfoMask".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicMaterialInfoMask".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct JobSkillAttr { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(string, required, tag = "2")] + pub key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub caption: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub caption_noun: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "5")] + pub profession: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub labor: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub r#type: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for JobSkillAttr { + const NAME: &'static str = "JobSkillAttr"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.JobSkillAttr".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.JobSkillAttr".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ProfessionAttr { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(string, required, tag = "2")] + pub key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub caption: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "4")] + pub military: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub can_assign_labor: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub parent: ::core::option::Option, +} +impl ::prost::Name for ProfessionAttr { + const NAME: &'static str = "ProfessionAttr"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ProfessionAttr".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ProfessionAttr".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UnitLaborAttr { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(string, required, tag = "2")] + pub key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub caption: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for UnitLaborAttr { + const NAME: &'static str = "UnitLaborAttr"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.UnitLaborAttr".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.UnitLaborAttr".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NameInfo { + #[prost(string, optional, tag = "1")] + pub first_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub nickname: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "3", default = "-1")] + pub language_id: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub last_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub english_name: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for NameInfo { + const NAME: &'static str = "NameInfo"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.NameInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.NameInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NameTriple { + #[prost(string, required, tag = "1")] + pub normal: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub plural: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub adjective: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for NameTriple { + const NAME: &'static str = "NameTriple"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.NameTriple".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.NameTriple".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UnitCurseInfo { + #[prost(fixed32, required, tag = "1")] + pub add_tags1: u32, + #[prost(fixed32, required, tag = "2")] + pub rem_tags1: u32, + #[prost(fixed32, required, tag = "3")] + pub add_tags2: u32, + #[prost(fixed32, required, tag = "4")] + pub rem_tags2: u32, + #[prost(message, optional, tag = "5")] + pub name: ::core::option::Option, +} +impl ::prost::Name for UnitCurseInfo { + const NAME: &'static str = "UnitCurseInfo"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.UnitCurseInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.UnitCurseInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SkillInfo { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(int32, required, tag = "2")] + pub level: i32, + #[prost(int32, required, tag = "3")] + pub experience: i32, +} +impl ::prost::Name for SkillInfo { + const NAME: &'static str = "SkillInfo"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.SkillInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.SkillInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UnitMiscTrait { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(int32, required, tag = "2")] + pub value: i32, +} +impl ::prost::Name for UnitMiscTrait { + const NAME: &'static str = "UnitMiscTrait"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.UnitMiscTrait".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.UnitMiscTrait".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BasicUnitInfo { + #[prost(int32, required, tag = "1")] + pub unit_id: i32, + #[prost(int32, required, tag = "13")] + pub pos_x: i32, + #[prost(int32, required, tag = "14")] + pub pos_y: i32, + #[prost(int32, required, tag = "15")] + pub pos_z: i32, + #[prost(message, optional, tag = "2")] + pub name: ::core::option::Option, + #[prost(fixed32, required, tag = "3")] + pub flags1: u32, + #[prost(fixed32, required, tag = "4")] + pub flags2: u32, + #[prost(fixed32, required, tag = "5")] + pub flags3: u32, + #[prost(int32, required, tag = "6")] + pub race: i32, + #[prost(int32, required, tag = "7")] + pub caste: i32, + #[prost(int32, optional, tag = "8", default = "-1")] + pub gender: ::core::option::Option, + #[prost(int32, optional, tag = "9", default = "-1")] + pub civ_id: ::core::option::Option, + #[prost(int32, optional, tag = "10", default = "-1")] + pub histfig_id: ::core::option::Option, + #[prost(int32, optional, tag = "17", default = "-1")] + pub death_id: ::core::option::Option, + #[prost(uint32, optional, tag = "18")] + pub death_flags: ::core::option::Option, + /// IF mask.profession: + #[prost(int32, optional, tag = "19", default = "-1")] + pub squad_id: ::core::option::Option, + #[prost(int32, optional, tag = "20", default = "-1")] + pub squad_position: ::core::option::Option, + #[prost(int32, optional, tag = "22", default = "-1")] + pub profession: ::core::option::Option, + #[prost(string, optional, tag = "23")] + pub custom_profession: ::core::option::Option<::prost::alloc::string::String>, + /// IF mask.labors: + #[prost(int32, repeated, packed = "false", tag = "11")] + pub labors: ::prost::alloc::vec::Vec, + /// IF mask.skills: + #[prost(message, repeated, tag = "12")] + pub skills: ::prost::alloc::vec::Vec, + /// IF mask.misc_traits: + #[prost(message, repeated, tag = "24")] + pub misc_traits: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "16")] + pub curse: ::core::option::Option, + #[prost(int32, repeated, packed = "false", tag = "21")] + pub burrows: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BasicUnitInfo { + const NAME: &'static str = "BasicUnitInfo"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicUnitInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicUnitInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BasicUnitInfoMask { + #[prost(bool, optional, tag = "1", default = "false")] + pub labors: ::core::option::Option, + #[prost(bool, optional, tag = "2", default = "false")] + pub skills: ::core::option::Option, + #[prost(bool, optional, tag = "3", default = "false")] + pub profession: ::core::option::Option, + #[prost(bool, optional, tag = "4", default = "false")] + pub misc_traits: ::core::option::Option, +} +impl ::prost::Name for BasicUnitInfoMask { + const NAME: &'static str = "BasicUnitInfoMask"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicUnitInfoMask".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicUnitInfoMask".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BasicSquadInfo { + #[prost(int32, required, tag = "1")] + pub squad_id: i32, + #[prost(message, optional, tag = "2")] + pub name: ::core::option::Option, + /// A special field completely overriding the name: + #[prost(string, optional, tag = "3")] + pub alias: ::core::option::Option<::prost::alloc::string::String>, + /// Member histfig ids: + #[prost(sint32, repeated, packed = "false", tag = "4")] + pub members: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BasicSquadInfo { + const NAME: &'static str = "BasicSquadInfo"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.BasicSquadInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.BasicSquadInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UnitLaborState { + #[prost(int32, required, tag = "1")] + pub unit_id: i32, + #[prost(int32, required, tag = "2")] + pub labor: i32, + #[prost(bool, required, tag = "3")] + pub value: bool, +} +impl ::prost::Name for UnitLaborState { + const NAME: &'static str = "UnitLaborState"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.UnitLaborState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.UnitLaborState".into() + } +} +/// RPC GetWorldInfo : EmptyMessage -> GetWorldInfoOut +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetWorldInfoOut { + #[prost(enumeration = "get_world_info_out::Mode", required, tag = "1")] + pub mode: i32, + #[prost(string, required, tag = "2")] + pub save_dir: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub world_name: ::core::option::Option, + /// Dwarf mode + #[prost(int32, optional, tag = "4")] + pub civ_id: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub site_id: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub group_id: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub race_id: ::core::option::Option, + /// Adventure mode + #[prost(int32, optional, tag = "8")] + pub player_unit_id: ::core::option::Option, + #[prost(int32, optional, tag = "9")] + pub player_histfig_id: ::core::option::Option, + #[prost(int32, repeated, packed = "false", tag = "10")] + pub companion_histfig_ids: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `GetWorldInfoOut`. +pub mod get_world_info_out { + #[derive(serde::Serialize)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Mode { + Dwarf = 1, + Adventure = 2, + Legends = 3, + } + impl Mode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Dwarf => "MODE_DWARF", + Self::Adventure => "MODE_ADVENTURE", + Self::Legends => "MODE_LEGENDS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MODE_DWARF" => Some(Self::Dwarf), + "MODE_ADVENTURE" => Some(Self::Adventure), + "MODE_LEGENDS" => Some(Self::Legends), + _ => None, + } + } + } +} +impl ::prost::Name for GetWorldInfoOut { + const NAME: &'static str = "GetWorldInfoOut"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.GetWorldInfoOut".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.GetWorldInfoOut".into() + } +} +/// RPC ListEnums : EmptyMessage -> ListEnumsOut +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEnumsOut { + #[prost(message, repeated, tag = "1")] + pub material_flags: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub inorganic_flags: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub unit_flags1: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub unit_flags2: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub unit_flags3: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "6")] + pub unit_labor: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "7")] + pub job_skill: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "8")] + pub cie_add_tag_mask1: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "9")] + pub cie_add_tag_mask2: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "10")] + pub death_info_flags: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "11")] + pub profession: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ListEnumsOut { + const NAME: &'static str = "ListEnumsOut"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListEnumsOut".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListEnumsOut".into() + } +} +/// RPC ListJobSkills : EmptyMessage -> ListJobSkillsOut +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListJobSkillsOut { + #[prost(message, repeated, tag = "1")] + pub skill: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub profession: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub labor: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ListJobSkillsOut { + const NAME: &'static str = "ListJobSkillsOut"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListJobSkillsOut".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListJobSkillsOut".into() + } +} +/// RPC ListMaterials : ListMaterialsIn -> ListMaterialsOut +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMaterialsIn { + #[prost(message, optional, tag = "1")] + pub mask: ::core::option::Option, + /// Specific materials: + #[prost(message, repeated, tag = "2")] + pub id_list: ::prost::alloc::vec::Vec, + /// Complete list by type: + #[prost(bool, optional, tag = "3")] + pub builtin: ::core::option::Option, + #[prost(bool, optional, tag = "4")] + pub inorganic: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub creatures: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub plants: ::core::option::Option, +} +impl ::prost::Name for ListMaterialsIn { + const NAME: &'static str = "ListMaterialsIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListMaterialsIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListMaterialsIn".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMaterialsOut { + #[prost(message, repeated, tag = "1")] + pub value: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ListMaterialsOut { + const NAME: &'static str = "ListMaterialsOut"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListMaterialsOut".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListMaterialsOut".into() + } +} +/// RPC ListUnits : ListUnitsIn -> ListUnitsOut +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListUnitsIn { + #[prost(message, optional, tag = "1")] + pub mask: ::core::option::Option, + /// Specific units: + #[prost(int32, repeated, packed = "false", tag = "2")] + pub id_list: ::prost::alloc::vec::Vec, + /// All units matching: + #[prost(bool, optional, tag = "5")] + pub scan_all: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub race: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub civ_id: ::core::option::Option, + /// i.e. passive corpse + #[prost(bool, optional, tag = "6")] + pub dead: ::core::option::Option, + /// i.e. not dead or undead + #[prost(bool, optional, tag = "7")] + pub alive: ::core::option::Option, + /// not dead, ghost, zombie, or insane + #[prost(bool, optional, tag = "8")] + pub sane: ::core::option::Option, +} +impl ::prost::Name for ListUnitsIn { + const NAME: &'static str = "ListUnitsIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListUnitsIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListUnitsIn".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUnitsOut { + #[prost(message, repeated, tag = "1")] + pub value: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ListUnitsOut { + const NAME: &'static str = "ListUnitsOut"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListUnitsOut".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListUnitsOut".into() + } +} +/// RPC ListSquads : ListSquadsIn -> ListSquadsOut +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListSquadsIn {} +impl ::prost::Name for ListSquadsIn { + const NAME: &'static str = "ListSquadsIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListSquadsIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListSquadsIn".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSquadsOut { + #[prost(message, repeated, tag = "1")] + pub value: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ListSquadsOut { + const NAME: &'static str = "ListSquadsOut"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.ListSquadsOut".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.ListSquadsOut".into() + } +} +/// RPC SetUnitLabors : SetUnitLaborsIn -> EmptyMessage +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUnitLaborsIn { + #[prost(message, repeated, tag = "1")] + pub change: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for SetUnitLaborsIn { + const NAME: &'static str = "SetUnitLaborsIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.SetUnitLaborsIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.SetUnitLaborsIn".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CoreTextFragment { + #[prost(string, required, tag = "1")] + pub text: ::prost::alloc::string::String, + #[prost(enumeration = "core_text_fragment::Color", optional, tag = "2")] + pub color: ::core::option::Option, +} +/// Nested message and enum types in `CoreTextFragment`. +pub mod core_text_fragment { + #[derive(serde::Serialize)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Color { + Black = 0, + Blue = 1, + Green = 2, + Cyan = 3, + Red = 4, + Magenta = 5, + Brown = 6, + Grey = 7, + Darkgrey = 8, + Lightblue = 9, + Lightgreen = 10, + Lightcyan = 11, + Lightred = 12, + Lightmagenta = 13, + Yellow = 14, + White = 15, + } + impl Color { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Black => "COLOR_BLACK", + Self::Blue => "COLOR_BLUE", + Self::Green => "COLOR_GREEN", + Self::Cyan => "COLOR_CYAN", + Self::Red => "COLOR_RED", + Self::Magenta => "COLOR_MAGENTA", + Self::Brown => "COLOR_BROWN", + Self::Grey => "COLOR_GREY", + Self::Darkgrey => "COLOR_DARKGREY", + Self::Lightblue => "COLOR_LIGHTBLUE", + Self::Lightgreen => "COLOR_LIGHTGREEN", + Self::Lightcyan => "COLOR_LIGHTCYAN", + Self::Lightred => "COLOR_LIGHTRED", + Self::Lightmagenta => "COLOR_LIGHTMAGENTA", + Self::Yellow => "COLOR_YELLOW", + Self::White => "COLOR_WHITE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COLOR_BLACK" => Some(Self::Black), + "COLOR_BLUE" => Some(Self::Blue), + "COLOR_GREEN" => Some(Self::Green), + "COLOR_CYAN" => Some(Self::Cyan), + "COLOR_RED" => Some(Self::Red), + "COLOR_MAGENTA" => Some(Self::Magenta), + "COLOR_BROWN" => Some(Self::Brown), + "COLOR_GREY" => Some(Self::Grey), + "COLOR_DARKGREY" => Some(Self::Darkgrey), + "COLOR_LIGHTBLUE" => Some(Self::Lightblue), + "COLOR_LIGHTGREEN" => Some(Self::Lightgreen), + "COLOR_LIGHTCYAN" => Some(Self::Lightcyan), + "COLOR_LIGHTRED" => Some(Self::Lightred), + "COLOR_LIGHTMAGENTA" => Some(Self::Lightmagenta), + "COLOR_YELLOW" => Some(Self::Yellow), + "COLOR_WHITE" => Some(Self::White), + _ => None, + } + } + } +} +impl ::prost::Name for CoreTextFragment { + const NAME: &'static str = "CoreTextFragment"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreTextFragment".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreTextFragment".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CoreTextNotification { + #[prost(message, repeated, tag = "1")] + pub fragments: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for CoreTextNotification { + const NAME: &'static str = "CoreTextNotification"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreTextNotification".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreTextNotification".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CoreErrorNotification { + #[prost(enumeration = "core_error_notification::ErrorCode", required, tag = "1")] + pub code: i32, +} +/// Nested message and enum types in `CoreErrorNotification`. +pub mod core_error_notification { + #[derive(serde::Serialize)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ErrorCode { + CrLinkFailure = -3, + CrWouldBreak = -2, + CrNotImplemented = -1, + CrOk = 0, + CrFailure = 1, + CrWrongUsage = 2, + CrNotFound = 3, + } + impl ErrorCode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::CrLinkFailure => "CR_LINK_FAILURE", + Self::CrWouldBreak => "CR_WOULD_BREAK", + Self::CrNotImplemented => "CR_NOT_IMPLEMENTED", + Self::CrOk => "CR_OK", + Self::CrFailure => "CR_FAILURE", + Self::CrWrongUsage => "CR_WRONG_USAGE", + Self::CrNotFound => "CR_NOT_FOUND", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CR_LINK_FAILURE" => Some(Self::CrLinkFailure), + "CR_WOULD_BREAK" => Some(Self::CrWouldBreak), + "CR_NOT_IMPLEMENTED" => Some(Self::CrNotImplemented), + "CR_OK" => Some(Self::CrOk), + "CR_FAILURE" => Some(Self::CrFailure), + "CR_WRONG_USAGE" => Some(Self::CrWrongUsage), + "CR_NOT_FOUND" => Some(Self::CrNotFound), + _ => None, + } + } + } +} +impl ::prost::Name for CoreErrorNotification { + const NAME: &'static str = "CoreErrorNotification"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreErrorNotification".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreErrorNotification".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct EmptyMessage {} +impl ::prost::Name for EmptyMessage { + const NAME: &'static str = "EmptyMessage"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.EmptyMessage".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.EmptyMessage".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct IntMessage { + #[prost(int32, required, tag = "1")] + pub value: i32, +} +impl ::prost::Name for IntMessage { + const NAME: &'static str = "IntMessage"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.IntMessage".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.IntMessage".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct IntListMessage { + #[prost(int32, repeated, packed = "false", tag = "1")] + pub value: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for IntListMessage { + const NAME: &'static str = "IntListMessage"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.IntListMessage".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.IntListMessage".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct StringMessage { + #[prost(string, required, tag = "1")] + pub value: ::prost::alloc::string::String, +} +impl ::prost::Name for StringMessage { + const NAME: &'static str = "StringMessage"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.StringMessage".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.StringMessage".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct StringListMessage { + #[prost(string, repeated, tag = "1")] + pub value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for StringListMessage { + const NAME: &'static str = "StringListMessage"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.StringListMessage".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.StringListMessage".into() + } +} +/// RPC BindMethod : CoreBindRequest -> CoreBindReply +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CoreBindRequest { + #[prost(string, required, tag = "1")] + pub method: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub input_msg: ::prost::alloc::string::String, + #[prost(string, required, tag = "3")] + pub output_msg: ::prost::alloc::string::String, + #[prost(string, optional, tag = "4")] + pub plugin: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for CoreBindRequest { + const NAME: &'static str = "CoreBindRequest"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreBindRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreBindRequest".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CoreBindReply { + #[prost(int32, required, tag = "1")] + pub assigned_id: i32, +} +impl ::prost::Name for CoreBindReply { + const NAME: &'static str = "CoreBindReply"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreBindReply".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreBindReply".into() + } +} +/// RPC RunCommand : CoreRunCommandRequest -> EmptyMessage +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CoreRunCommandRequest { + #[prost(string, required, tag = "1")] + pub command: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for CoreRunCommandRequest { + const NAME: &'static str = "CoreRunCommandRequest"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreRunCommandRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreRunCommandRequest".into() + } +} +/// RPC RunLua : CoreRunLuaRequest -> StringListMessage +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CoreRunLuaRequest { + #[prost(string, required, tag = "1")] + pub module: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub function: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "3")] + pub arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for CoreRunLuaRequest { + const NAME: &'static str = "CoreRunLuaRequest"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.CoreRunLuaRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.CoreRunLuaRequest".into() + } +} +/// RPC RenameSquad : RenameSquadIn -> EmptyMessage +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RenameSquadIn { + #[prost(int32, required, tag = "1")] + pub squad_id: i32, + #[prost(string, optional, tag = "2")] + pub nickname: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub alias: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for RenameSquadIn { + const NAME: &'static str = "RenameSquadIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.RenameSquadIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.RenameSquadIn".into() + } +} +/// RPC RenameUnit : RenameUnitIn -> EmptyMessage +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RenameUnitIn { + #[prost(int32, required, tag = "1")] + pub unit_id: i32, + #[prost(string, optional, tag = "2")] + pub nickname: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub profession: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for RenameUnitIn { + const NAME: &'static str = "RenameUnitIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.RenameUnitIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.RenameUnitIn".into() + } +} +/// RPC RenameBuilding : RenameBuildingIn -> EmptyMessage +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RenameBuildingIn { + #[prost(int32, required, tag = "1")] + pub building_id: i32, + #[prost(string, optional, tag = "2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for RenameBuildingIn { + const NAME: &'static str = "RenameBuildingIn"; + const PACKAGE: &'static str = "dfproto"; + fn full_name() -> ::prost::alloc::string::String { + "dfproto.RenameBuildingIn".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfproto.RenameBuildingIn".into() + } +} diff --git a/dfhack-proto/src/generated/messages/dfstockpiles.rs b/dfhack-proto/src/generated/messages/dfstockpiles.rs new file mode 100644 index 0000000..14186c0 --- /dev/null +++ b/dfhack-proto/src/generated/messages/dfstockpiles.rs @@ -0,0 +1,574 @@ +// This file is @generated by prost-build. +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct StockpileSettings { + /// general settings + #[prost(int32, optional, tag = "20")] + pub max_barrels: ::core::option::Option, + #[prost(int32, optional, tag = "21")] + pub max_bins: ::core::option::Option, + #[prost(int32, optional, tag = "22")] + pub max_wheelbarrows: ::core::option::Option, + #[prost(bool, optional, tag = "23")] + pub use_links_only: ::core::option::Option, + #[prost(bool, optional, tag = "18")] + pub allow_organic: ::core::option::Option, + #[prost(bool, optional, tag = "19")] + pub allow_inorganic: ::core::option::Option, + /// categories + #[prost(message, optional, tag = "8")] + pub ammo: ::core::option::Option, + #[prost(message, optional, tag = "1")] + pub animals: ::core::option::Option, + #[prost(message, optional, tag = "17")] + pub armor: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub barsblocks: ::core::option::Option, + #[prost(message, optional, tag = "14")] + pub cloth: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub coin: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub finished_goods: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub food: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub furniture: ::core::option::Option, + #[prost(message, optional, tag = "11")] + pub gems: ::core::option::Option, + #[prost(message, optional, tag = "13")] + pub leather: ::core::option::Option, + #[prost(message, optional, tag = "25")] + pub corpses_v50: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub refuse: ::core::option::Option, + #[prost(message, optional, tag = "26")] + pub sheet: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub stone: ::core::option::Option, + #[prost(message, optional, tag = "16")] + pub weapons: ::core::option::Option, + #[prost(message, optional, tag = "15")] + pub wood: ::core::option::Option, + /// deprecated + /// + /// not marked as deprecated since we still read it + #[prost(bool, optional, tag = "24")] + pub corpses: ::core::option::Option, + #[deprecated] + #[prost(message, optional, tag = "7")] + pub ore: ::core::option::Option, + #[deprecated] + #[prost(int32, optional, tag = "4")] + pub unknown1: ::core::option::Option, +} +/// Nested message and enum types in `StockpileSettings`. +pub mod stockpile_settings { + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct AnimalsSet { + #[prost(bool, optional, tag = "4")] + pub all: ::core::option::Option, + #[prost(bool, optional, tag = "1")] + pub empty_cages: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub empty_traps: ::core::option::Option, + #[prost(string, repeated, tag = "3")] + pub enabled: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for AnimalsSet { + const NAME: &'static str = "AnimalsSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.AnimalsSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.AnimalsSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct FoodSet { + #[prost(bool, optional, tag = "21")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub meat: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub fish: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "20")] + pub unprepared_fish: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub egg: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub plants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub drink_plant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "6")] + pub drink_animal: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "7")] + pub cheese_plant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "8")] + pub cheese_animal: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "9")] + pub seeds: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "10")] + pub leaves: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "11")] + pub powder_plant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "12")] + pub powder_creature: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "13")] + pub glob: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "14")] + pub glob_paste: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "15")] + pub glob_pressed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "16")] + pub liquid_plant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub liquid_animal: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "18")] + pub liquid_misc: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "19")] + pub prepared_meals: ::core::option::Option, + } + impl ::prost::Name for FoodSet { + const NAME: &'static str = "FoodSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.FoodSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.FoodSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct FurnitureSet { + #[prost(bool, optional, tag = "7")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub r#type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub quality_core: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// UNUSED: optional bool sand_bags = 6; + #[prost(string, repeated, tag = "5")] + pub quality_total: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for FurnitureSet { + const NAME: &'static str = "FurnitureSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.FurnitureSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.FurnitureSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct RefuseSet { + #[prost(bool, optional, tag = "12")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub r#type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub corpses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub body_parts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub skulls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub bones: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "6")] + pub hair: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "7")] + pub shells: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "8")] + pub teeth: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "9")] + pub horns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "10")] + pub fresh_raw_hide: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub rotten_raw_hide: ::core::option::Option, + } + impl ::prost::Name for RefuseSet { + const NAME: &'static str = "RefuseSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.RefuseSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.RefuseSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct StoneSet { + #[prost(bool, optional, tag = "2")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for StoneSet { + const NAME: &'static str = "StoneSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.StoneSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.StoneSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct OreSet { + #[prost(string, repeated, tag = "1")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for OreSet { + const NAME: &'static str = "OreSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.OreSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.OreSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct AmmoSet { + #[prost(bool, optional, tag = "6")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub r#type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub quality_core: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub quality_total: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for AmmoSet { + const NAME: &'static str = "AmmoSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.AmmoSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.AmmoSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct CoinSet { + #[prost(bool, optional, tag = "2")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for CoinSet { + const NAME: &'static str = "CoinSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.CoinSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.CoinSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct BarsBlocksSet { + #[prost(bool, optional, tag = "5")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub bars_other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub blocks_other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub bars_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub blocks_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for BarsBlocksSet { + const NAME: &'static str = "BarsBlocksSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.BarsBlocksSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.BarsBlocksSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct GemsSet { + #[prost(bool, optional, tag = "5")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub rough_other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub cut_other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub rough_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub cut_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for GemsSet { + const NAME: &'static str = "GemsSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.GemsSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.GemsSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct FinishedGoodsSet { + #[prost(bool, optional, tag = "6")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub r#type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub quality_core: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub quality_total: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "7")] + pub dyed: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub undyed: ::core::option::Option, + #[prost(string, repeated, tag = "9")] + pub color: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for FinishedGoodsSet { + const NAME: &'static str = "FinishedGoodsSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.FinishedGoodsSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.FinishedGoodsSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct LeatherSet { + #[prost(bool, optional, tag = "2")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "3")] + pub dyed: ::core::option::Option, + #[prost(bool, optional, tag = "4")] + pub undyed: ::core::option::Option, + #[prost(string, repeated, tag = "5")] + pub color: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for LeatherSet { + const NAME: &'static str = "LeatherSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.LeatherSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.LeatherSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct ClothSet { + #[prost(bool, optional, tag = "9")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub thread_silk: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub thread_plant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub thread_yarn: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub thread_metal: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub cloth_silk: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "6")] + pub cloth_plant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "7")] + pub cloth_yarn: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "8")] + pub cloth_metal: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "10")] + pub dyed: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub undyed: ::core::option::Option, + #[prost(string, repeated, tag = "12")] + pub color: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for ClothSet { + const NAME: &'static str = "ClothSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.ClothSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.ClothSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct WoodSet { + #[prost(bool, optional, tag = "2")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for WoodSet { + const NAME: &'static str = "WoodSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.WoodSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.WoodSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct WeaponsSet { + #[prost(bool, optional, tag = "9")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub weapon_type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub trapcomp_type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub quality_core: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "6")] + pub quality_total: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "7")] + pub usable: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub unusable: ::core::option::Option, + } + impl ::prost::Name for WeaponsSet { + const NAME: &'static str = "WeaponsSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.WeaponsSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.WeaponsSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct ArmorSet { + #[prost(bool, optional, tag = "13")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "1")] + pub body: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub head: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub feet: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub hands: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub legs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "6")] + pub shield: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "7")] + pub other_mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "8")] + pub mats: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "9")] + pub quality_core: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "10")] + pub quality_total: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "11")] + pub usable: ::core::option::Option, + #[prost(bool, optional, tag = "12")] + pub unusable: ::core::option::Option, + #[prost(bool, optional, tag = "14")] + pub dyed: ::core::option::Option, + #[prost(bool, optional, tag = "15")] + pub undyed: ::core::option::Option, + #[prost(string, repeated, tag = "16")] + pub color: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for ArmorSet { + const NAME: &'static str = "ArmorSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.ArmorSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.ArmorSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct CorpsesSet { + #[prost(bool, optional, tag = "1")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "2")] + pub corpses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for CorpsesSet { + const NAME: &'static str = "CorpsesSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.CorpsesSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.CorpsesSet".into() + } + } + #[derive(serde::Serialize)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct SheetSet { + #[prost(bool, optional, tag = "1")] + pub all: ::core::option::Option, + #[prost(string, repeated, tag = "2")] + pub paper: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub parchment: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for SheetSet { + const NAME: &'static str = "SheetSet"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings.SheetSet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings.SheetSet".into() + } + } +} +impl ::prost::Name for StockpileSettings { + const NAME: &'static str = "StockpileSettings"; + const PACKAGE: &'static str = "dfstockpiles"; + fn full_name() -> ::prost::alloc::string::String { + "dfstockpiles.StockpileSettings".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/dfstockpiles.StockpileSettings".into() + } +} diff --git a/dfhack-proto/src/generated/messages/dwarf_control.rs b/dfhack-proto/src/generated/messages/dwarf_control.rs new file mode 100644 index 0000000..1b1fbfa --- /dev/null +++ b/dfhack-proto/src/generated/messages/dwarf_control.rs @@ -0,0 +1,266 @@ +// This file is @generated by prost-build. +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SidebarState { + #[prost( + enumeration = "super::proto::enums::ui_sidebar_mode::UiSidebarMode", + optional, + tag = "1" + )] + pub mode: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub menu_items: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub build_selector: ::core::option::Option, +} +impl ::prost::Name for SidebarState { + const NAME: &'static str = "SidebarState"; + const PACKAGE: &'static str = "DwarfControl"; + fn full_name() -> ::prost::alloc::string::String { + "DwarfControl.SidebarState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/DwarfControl.SidebarState".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct MenuItem { + #[prost(message, optional, tag = "1")] + pub building_type: ::core::option::Option< + super::remote_fortress_reader::BuildingType, + >, + #[prost(int32, optional, tag = "2")] + pub existing_count: ::core::option::Option, + #[prost(enumeration = "BuildCategory", optional, tag = "3")] + pub build_category: ::core::option::Option, +} +impl ::prost::Name for MenuItem { + const NAME: &'static str = "MenuItem"; + const PACKAGE: &'static str = "DwarfControl"; + fn full_name() -> ::prost::alloc::string::String { + "DwarfControl.MenuItem".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/DwarfControl.MenuItem".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SidebarCommand { + #[prost( + enumeration = "super::proto::enums::ui_sidebar_mode::UiSidebarMode", + optional, + tag = "1" + )] + pub mode: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub menu_index: ::core::option::Option, + #[prost(enumeration = "MenuAction", optional, tag = "3")] + pub action: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub selection_coord: ::core::option::Option, +} +impl ::prost::Name for SidebarCommand { + const NAME: &'static str = "SidebarCommand"; + const PACKAGE: &'static str = "DwarfControl"; + fn full_name() -> ::prost::alloc::string::String { + "DwarfControl.SidebarCommand".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/DwarfControl.SidebarCommand".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BuiildReqChoice { + #[prost(int32, optional, tag = "1")] + pub distance: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "3")] + pub num_candidates: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub used_count: ::core::option::Option, +} +impl ::prost::Name for BuiildReqChoice { + const NAME: &'static str = "BuiildReqChoice"; + const PACKAGE: &'static str = "DwarfControl"; + fn full_name() -> ::prost::alloc::string::String { + "DwarfControl.BuiildReqChoice".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/DwarfControl.BuiildReqChoice".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BuildItemReq { + /// Put filter here = 1 + #[prost(int32, optional, tag = "2")] + pub count_required: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub count_max: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub count_provided: ::core::option::Option, +} +impl ::prost::Name for BuildItemReq { + const NAME: &'static str = "BuildItemReq"; + const PACKAGE: &'static str = "DwarfControl"; + fn full_name() -> ::prost::alloc::string::String { + "DwarfControl.BuildItemReq".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/DwarfControl.BuildItemReq".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BuildSelector { + #[prost(message, optional, tag = "1")] + pub building_type: ::core::option::Option< + super::remote_fortress_reader::BuildingType, + >, + #[prost(enumeration = "BuildSelectorStage", optional, tag = "2")] + pub stage: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub choices: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub sel_index: ::core::option::Option, + #[prost(message, repeated, tag = "5")] + pub requirements: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "6")] + pub req_index: ::core::option::Option, + #[prost(string, repeated, tag = "7")] + pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "8")] + pub radius_x_low: ::core::option::Option, + #[prost(int32, optional, tag = "9")] + pub radius_y_low: ::core::option::Option, + #[prost(int32, optional, tag = "10")] + pub radius_x_high: ::core::option::Option, + #[prost(int32, optional, tag = "11")] + pub radius_y_high: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub cursor: ::core::option::Option, + #[prost(int32, repeated, packed = "false", tag = "13")] + pub tiles: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BuildSelector { + const NAME: &'static str = "BuildSelector"; + const PACKAGE: &'static str = "DwarfControl"; + fn full_name() -> ::prost::alloc::string::String { + "DwarfControl.BuildSelector".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/DwarfControl.BuildSelector".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BuildCategory { + NotCategory = 0, + SiegeEngines = 1, + Traps = 2, + Workshops = 3, + Furnaces = 4, + Constructions = 5, + MachineComponents = 6, + Track = 7, +} +impl BuildCategory { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NotCategory => "NotCategory", + Self::SiegeEngines => "SiegeEngines", + Self::Traps => "Traps", + Self::Workshops => "Workshops", + Self::Furnaces => "Furnaces", + Self::Constructions => "Constructions", + Self::MachineComponents => "MachineComponents", + Self::Track => "Track", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NotCategory" => Some(Self::NotCategory), + "SiegeEngines" => Some(Self::SiegeEngines), + "Traps" => Some(Self::Traps), + "Workshops" => Some(Self::Workshops), + "Furnaces" => Some(Self::Furnaces), + "Constructions" => Some(Self::Constructions), + "MachineComponents" => Some(Self::MachineComponents), + "Track" => Some(Self::Track), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MenuAction { + MenuNone = 0, + MenuSelect = 1, + MenuCancel = 2, + MenuSelectAll = 3, +} +impl MenuAction { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::MenuNone => "MenuNone", + Self::MenuSelect => "MenuSelect", + Self::MenuCancel => "MenuCancel", + Self::MenuSelectAll => "MenuSelectAll", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MenuNone" => Some(Self::MenuNone), + "MenuSelect" => Some(Self::MenuSelect), + "MenuCancel" => Some(Self::MenuCancel), + "MenuSelectAll" => Some(Self::MenuSelectAll), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BuildSelectorStage { + StageNoMat = 0, + StagePlace = 1, + StageItemSelect = 2, +} +impl BuildSelectorStage { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::StageNoMat => "StageNoMat", + Self::StagePlace => "StagePlace", + Self::StageItemSelect => "StageItemSelect", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "StageNoMat" => Some(Self::StageNoMat), + "StagePlace" => Some(Self::StagePlace), + "StageItemSelect" => Some(Self::StageItemSelect), + _ => None, + } + } +} diff --git a/dfhack-proto/src/generated/messages/example.rs b/dfhack-proto/src/generated/messages/example.rs deleted file mode 100644 index 0c5b911..0000000 --- a/dfhack-proto/src/generated/messages/example.rs +++ /dev/null @@ -1,769 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `example.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:dfproto.RenameSquadIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RenameSquadIn { - // message fields - // @@protoc_insertion_point(field:dfproto.RenameSquadIn.squad_id) - pub squad_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.RenameSquadIn.nickname) - pub nickname: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.RenameSquadIn.alias) - pub alias: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.RenameSquadIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RenameSquadIn { - fn default() -> &'a RenameSquadIn { - ::default_instance() - } -} - -impl RenameSquadIn { - pub fn new() -> RenameSquadIn { - ::std::default::Default::default() - } - - // required int32 squad_id = 1; - - pub fn squad_id(&self) -> i32 { - self.squad_id.unwrap_or(0) - } - - pub fn clear_squad_id(&mut self) { - self.squad_id = ::std::option::Option::None; - } - - pub fn has_squad_id(&self) -> bool { - self.squad_id.is_some() - } - - // Param is passed by value, moved - pub fn set_squad_id(&mut self, v: i32) { - self.squad_id = ::std::option::Option::Some(v); - } - - // optional string nickname = 2; - - pub fn nickname(&self) -> &str { - match self.nickname.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_nickname(&mut self) { - self.nickname = ::std::option::Option::None; - } - - pub fn has_nickname(&self) -> bool { - self.nickname.is_some() - } - - // Param is passed by value, moved - pub fn set_nickname(&mut self, v: ::std::string::String) { - self.nickname = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_nickname(&mut self) -> &mut ::std::string::String { - if self.nickname.is_none() { - self.nickname = ::std::option::Option::Some(::std::string::String::new()); - } - self.nickname.as_mut().unwrap() - } - - // Take field - pub fn take_nickname(&mut self) -> ::std::string::String { - self.nickname.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string alias = 3; - - pub fn alias(&self) -> &str { - match self.alias.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_alias(&mut self) { - self.alias = ::std::option::Option::None; - } - - pub fn has_alias(&self) -> bool { - self.alias.is_some() - } - - // Param is passed by value, moved - pub fn set_alias(&mut self, v: ::std::string::String) { - self.alias = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_alias(&mut self) -> &mut ::std::string::String { - if self.alias.is_none() { - self.alias = ::std::option::Option::Some(::std::string::String::new()); - } - self.alias.as_mut().unwrap() - } - - // Take field - pub fn take_alias(&mut self) -> ::std::string::String { - self.alias.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "squad_id", - |m: &RenameSquadIn| { &m.squad_id }, - |m: &mut RenameSquadIn| { &mut m.squad_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "nickname", - |m: &RenameSquadIn| { &m.nickname }, - |m: &mut RenameSquadIn| { &mut m.nickname }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "alias", - |m: &RenameSquadIn| { &m.alias }, - |m: &mut RenameSquadIn| { &mut m.alias }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RenameSquadIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RenameSquadIn { - const NAME: &'static str = "RenameSquadIn"; - - fn is_initialized(&self) -> bool { - if self.squad_id.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.squad_id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.nickname = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.alias = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.squad_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.nickname.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.alias.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.squad_id { - os.write_int32(1, v)?; - } - if let Some(v) = self.nickname.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.alias.as_ref() { - os.write_string(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RenameSquadIn { - RenameSquadIn::new() - } - - fn clear(&mut self) { - self.squad_id = ::std::option::Option::None; - self.nickname = ::std::option::Option::None; - self.alias = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RenameSquadIn { - static instance: RenameSquadIn = RenameSquadIn { - squad_id: ::std::option::Option::None, - nickname: ::std::option::Option::None, - alias: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RenameSquadIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RenameSquadIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RenameSquadIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RenameSquadIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.RenameUnitIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RenameUnitIn { - // message fields - // @@protoc_insertion_point(field:dfproto.RenameUnitIn.unit_id) - pub unit_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.RenameUnitIn.nickname) - pub nickname: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:dfproto.RenameUnitIn.profession) - pub profession: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.RenameUnitIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RenameUnitIn { - fn default() -> &'a RenameUnitIn { - ::default_instance() - } -} - -impl RenameUnitIn { - pub fn new() -> RenameUnitIn { - ::std::default::Default::default() - } - - // required int32 unit_id = 1; - - pub fn unit_id(&self) -> i32 { - self.unit_id.unwrap_or(0) - } - - pub fn clear_unit_id(&mut self) { - self.unit_id = ::std::option::Option::None; - } - - pub fn has_unit_id(&self) -> bool { - self.unit_id.is_some() - } - - // Param is passed by value, moved - pub fn set_unit_id(&mut self, v: i32) { - self.unit_id = ::std::option::Option::Some(v); - } - - // optional string nickname = 2; - - pub fn nickname(&self) -> &str { - match self.nickname.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_nickname(&mut self) { - self.nickname = ::std::option::Option::None; - } - - pub fn has_nickname(&self) -> bool { - self.nickname.is_some() - } - - // Param is passed by value, moved - pub fn set_nickname(&mut self, v: ::std::string::String) { - self.nickname = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_nickname(&mut self) -> &mut ::std::string::String { - if self.nickname.is_none() { - self.nickname = ::std::option::Option::Some(::std::string::String::new()); - } - self.nickname.as_mut().unwrap() - } - - // Take field - pub fn take_nickname(&mut self) -> ::std::string::String { - self.nickname.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string profession = 3; - - pub fn profession(&self) -> &str { - match self.profession.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_profession(&mut self) { - self.profession = ::std::option::Option::None; - } - - pub fn has_profession(&self) -> bool { - self.profession.is_some() - } - - // Param is passed by value, moved - pub fn set_profession(&mut self, v: ::std::string::String) { - self.profession = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_profession(&mut self) -> &mut ::std::string::String { - if self.profession.is_none() { - self.profession = ::std::option::Option::Some(::std::string::String::new()); - } - self.profession.as_mut().unwrap() - } - - // Take field - pub fn take_profession(&mut self) -> ::std::string::String { - self.profession.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unit_id", - |m: &RenameUnitIn| { &m.unit_id }, - |m: &mut RenameUnitIn| { &mut m.unit_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "nickname", - |m: &RenameUnitIn| { &m.nickname }, - |m: &mut RenameUnitIn| { &mut m.nickname }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "profession", - |m: &RenameUnitIn| { &m.profession }, - |m: &mut RenameUnitIn| { &mut m.profession }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RenameUnitIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RenameUnitIn { - const NAME: &'static str = "RenameUnitIn"; - - fn is_initialized(&self) -> bool { - if self.unit_id.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.unit_id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.nickname = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - self.profession = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.unit_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.nickname.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.profession.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.unit_id { - os.write_int32(1, v)?; - } - if let Some(v) = self.nickname.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.profession.as_ref() { - os.write_string(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RenameUnitIn { - RenameUnitIn::new() - } - - fn clear(&mut self) { - self.unit_id = ::std::option::Option::None; - self.nickname = ::std::option::Option::None; - self.profession = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RenameUnitIn { - static instance: RenameUnitIn = RenameUnitIn { - unit_id: ::std::option::Option::None, - nickname: ::std::option::Option::None, - profession: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RenameUnitIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RenameUnitIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RenameUnitIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RenameUnitIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -// @@protoc_insertion_point(message:dfproto.RenameBuildingIn) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RenameBuildingIn { - // message fields - // @@protoc_insertion_point(field:dfproto.RenameBuildingIn.building_id) - pub building_id: ::std::option::Option, - // @@protoc_insertion_point(field:dfproto.RenameBuildingIn.name) - pub name: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfproto.RenameBuildingIn.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RenameBuildingIn { - fn default() -> &'a RenameBuildingIn { - ::default_instance() - } -} - -impl RenameBuildingIn { - pub fn new() -> RenameBuildingIn { - ::std::default::Default::default() - } - - // required int32 building_id = 1; - - pub fn building_id(&self) -> i32 { - self.building_id.unwrap_or(0) - } - - pub fn clear_building_id(&mut self) { - self.building_id = ::std::option::Option::None; - } - - pub fn has_building_id(&self) -> bool { - self.building_id.is_some() - } - - // Param is passed by value, moved - pub fn set_building_id(&mut self, v: i32) { - self.building_id = ::std::option::Option::Some(v); - } - - // optional string name = 2; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "building_id", - |m: &RenameBuildingIn| { &m.building_id }, - |m: &mut RenameBuildingIn| { &mut m.building_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "name", - |m: &RenameBuildingIn| { &m.name }, - |m: &mut RenameBuildingIn| { &mut m.name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RenameBuildingIn", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RenameBuildingIn { - const NAME: &'static str = "RenameBuildingIn"; - - fn is_initialized(&self) -> bool { - if self.building_id.is_none() { - return false; - } - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.building_id = ::std::option::Option::Some(is.read_int32()?); - }, - 18 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.building_id { - my_size += ::protobuf::rt::int32_size(1, v); - } - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.building_id { - os.write_int32(1, v)?; - } - if let Some(v) = self.name.as_ref() { - os.write_string(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RenameBuildingIn { - RenameBuildingIn::new() - } - - fn clear(&mut self) { - self.building_id = ::std::option::Option::None; - self.name = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RenameBuildingIn { - static instance: RenameBuildingIn = RenameBuildingIn { - building_id: ::std::option::Option::None, - name: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RenameBuildingIn { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RenameBuildingIn").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RenameBuildingIn { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RenameBuildingIn { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\rexample.proto\x12\x07dfproto\"\\\n\rRenameSquadIn\x12\x19\n\x08squad\ - _id\x18\x01\x20\x02(\x05R\x07squadId\x12\x1a\n\x08nickname\x18\x02\x20\ - \x01(\tR\x08nickname\x12\x14\n\x05alias\x18\x03\x20\x01(\tR\x05alias\"c\ - \n\x0cRenameUnitIn\x12\x17\n\x07unit_id\x18\x01\x20\x02(\x05R\x06unitId\ - \x12\x1a\n\x08nickname\x18\x02\x20\x01(\tR\x08nickname\x12\x1e\n\nprofes\ - sion\x18\x03\x20\x01(\tR\nprofession\"G\n\x10RenameBuildingIn\x12\x1f\n\ - \x0bbuilding_id\x18\x01\x20\x02(\x05R\nbuildingId\x12\x12\n\x04name\x18\ - \x02\x20\x01(\tR\x04nameB\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(3); - messages.push(RenameSquadIn::generated_message_descriptor_data()); - messages.push(RenameUnitIn::generated_message_descriptor_data()); - messages.push(RenameBuildingIn::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/includes.rs b/dfhack-proto/src/generated/messages/includes.rs new file mode 100644 index 0000000..680fc3a --- /dev/null +++ b/dfhack-proto/src/generated/messages/includes.rs @@ -0,0 +1,26 @@ +// This file is @generated by prost-build. +pub mod adventure_control { + include!("adventure_control.rs"); +} +pub mod dfproto { + include!("dfproto.rs"); +} +pub mod dfstockpiles { + include!("dfstockpiles.rs"); +} +pub mod dwarf_control { + include!("dwarf_control.rs"); +} +pub mod itemdef_instrument { + include!("itemdef_instrument.rs"); +} +pub mod proto { + pub mod enums { + pub mod ui_sidebar_mode { + include!("proto.enums.ui_sidebar_mode.rs"); + } + } +} +pub mod remote_fortress_reader { + include!("remote_fortress_reader.rs"); +} diff --git a/dfhack-proto/src/generated/messages/itemdef_instrument.rs b/dfhack-proto/src/generated/messages/itemdef_instrument.rs new file mode 100644 index 0000000..2d6a407 --- /dev/null +++ b/dfhack-proto/src/generated/messages/itemdef_instrument.rs @@ -0,0 +1,302 @@ +// This file is @generated by prost-build. +#[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, + #[prost(bool, optional, tag = "2")] + pub placed_as_building: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub metal_mat: ::core::option::Option, + #[prost(bool, optional, tag = "4")] + pub stone_mat: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub wood_mat: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub glass_mat: ::core::option::Option, + #[prost(bool, optional, tag = "7")] + pub ceramic_mat: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub shell_mat: ::core::option::Option, + #[prost(bool, optional, tag = "9")] + pub bone_mat: ::core::option::Option, +} +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, + #[prost(int32, optional, tag = "2")] + pub pitch_range_max: ::core::option::Option, +} +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, + #[prost(int32, optional, tag = "2")] + pub size: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub value: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub material_size: ::core::option::Option, + #[prost(message, repeated, tag = "5")] + pub pieces: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "6")] + pub pitch_range_min: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub pitch_range_max: ::core::option::Option, + #[prost(int32, optional, tag = "8")] + pub volume_mb_min: ::core::option::Option, + #[prost(int32, optional, tag = "9")] + pub volume_mb_max: ::core::option::Option, + #[prost(enumeration = "SoundProductionType", repeated, packed = "false", tag = "10")] + pub sound_production: ::prost::alloc::vec::Vec, + #[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, + #[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, + #[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, + #[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 { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + 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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + 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 { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + 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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + 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 { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + 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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PEGS" => Some(Self::Pegs), + "ADJUSTABLE_BRIDGES" => Some(Self::AdjustableBridges), + "CROOKS" => Some(Self::Crooks), + "TIGHTENING" => Some(Self::Tightening), + "LEVERS" => Some(Self::Levers), + _ => None, + } + } +} diff --git a/dfhack-proto/src/generated/messages/mod.rs b/dfhack-proto/src/generated/messages/mod.rs deleted file mode 100644 index 557b435..0000000 --- a/dfhack-proto/src/generated/messages/mod.rs +++ /dev/null @@ -1,20 +0,0 @@ -mod AdventureControl; -pub use self::AdventureControl::*; -mod Basic; -pub use self::Basic::*; -mod BasicApi; -pub use self::BasicApi::*; -mod CoreProtocol; -pub use self::CoreProtocol::*; -mod DwarfControl; -pub use self::DwarfControl::*; -mod ItemdefInstrument; -pub use self::ItemdefInstrument::*; -mod RemoteFortressReader; -pub use self::RemoteFortressReader::*; -mod example; -pub use self::example::*; -mod stockpiles; -pub use self::stockpiles::*; -mod ui_sidebar_mode; -pub use self::ui_sidebar_mode::*; diff --git a/dfhack-proto/src/generated/messages/proto.enums.ui_sidebar_mode.rs b/dfhack-proto/src/generated/messages/proto.enums.ui_sidebar_mode.rs new file mode 100644 index 0000000..b792c6a --- /dev/null +++ b/dfhack-proto/src/generated/messages/proto.enums.ui_sidebar_mode.rs @@ -0,0 +1,187 @@ +// This file is @generated by prost-build. +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UiSidebarMode { + Default = 0, + Squads = 1, + DesignateMine = 2, + DesignateRemoveRamps = 3, + DesignateUpStair = 4, + DesignateDownStair = 5, + DesignateUpDownStair = 6, + DesignateUpRamp = 7, + DesignateChannel = 8, + DesignateGatherPlants = 9, + DesignateRemoveDesignation = 10, + DesignateSmooth = 11, + DesignateCarveTrack = 12, + DesignateEngrave = 13, + DesignateCarveFortification = 14, + Stockpiles = 15, + Build = 16, + QueryBuilding = 17, + Orders = 18, + OrdersForbid = 19, + OrdersRefuse = 20, + OrdersWorkshop = 21, + OrdersZone = 22, + BuildingItems = 23, + ViewUnits = 24, + LookAround = 25, + DesignateItemsClaim = 26, + DesignateItemsForbid = 27, + DesignateItemsMelt = 28, + DesignateItemsUnmelt = 29, + DesignateItemsDump = 30, + DesignateItemsUndump = 31, + DesignateItemsHide = 32, + DesignateItemsUnhide = 33, + DesignateChopTrees = 34, + DesignateToggleEngravings = 35, + DesignateToggleMarker = 36, + Hotkeys = 37, + DesignateTrafficHigh = 38, + DesignateTrafficNormal = 39, + DesignateTrafficLow = 40, + DesignateTrafficRestricted = 41, + Zones = 42, + ZonesPenInfo = 43, + ZonesPitInfo = 44, + ZonesHospitalInfo = 45, + ZonesGatherInfo = 46, + DesignateRemoveConstruction = 47, + DepotAccess = 48, + NotesPoints = 49, + NotesRoutes = 50, + Burrows = 51, + Hauling = 52, + ArenaWeather = 53, + ArenaTrees = 54, +} +impl UiSidebarMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Default => "Default", + Self::Squads => "Squads", + Self::DesignateMine => "DesignateMine", + Self::DesignateRemoveRamps => "DesignateRemoveRamps", + Self::DesignateUpStair => "DesignateUpStair", + Self::DesignateDownStair => "DesignateDownStair", + Self::DesignateUpDownStair => "DesignateUpDownStair", + Self::DesignateUpRamp => "DesignateUpRamp", + Self::DesignateChannel => "DesignateChannel", + Self::DesignateGatherPlants => "DesignateGatherPlants", + Self::DesignateRemoveDesignation => "DesignateRemoveDesignation", + Self::DesignateSmooth => "DesignateSmooth", + Self::DesignateCarveTrack => "DesignateCarveTrack", + Self::DesignateEngrave => "DesignateEngrave", + Self::DesignateCarveFortification => "DesignateCarveFortification", + Self::Stockpiles => "Stockpiles", + Self::Build => "Build", + Self::QueryBuilding => "QueryBuilding", + Self::Orders => "Orders", + Self::OrdersForbid => "OrdersForbid", + Self::OrdersRefuse => "OrdersRefuse", + Self::OrdersWorkshop => "OrdersWorkshop", + Self::OrdersZone => "OrdersZone", + Self::BuildingItems => "BuildingItems", + Self::ViewUnits => "ViewUnits", + Self::LookAround => "LookAround", + Self::DesignateItemsClaim => "DesignateItemsClaim", + Self::DesignateItemsForbid => "DesignateItemsForbid", + Self::DesignateItemsMelt => "DesignateItemsMelt", + Self::DesignateItemsUnmelt => "DesignateItemsUnmelt", + Self::DesignateItemsDump => "DesignateItemsDump", + Self::DesignateItemsUndump => "DesignateItemsUndump", + Self::DesignateItemsHide => "DesignateItemsHide", + Self::DesignateItemsUnhide => "DesignateItemsUnhide", + Self::DesignateChopTrees => "DesignateChopTrees", + Self::DesignateToggleEngravings => "DesignateToggleEngravings", + Self::DesignateToggleMarker => "DesignateToggleMarker", + Self::Hotkeys => "Hotkeys", + Self::DesignateTrafficHigh => "DesignateTrafficHigh", + Self::DesignateTrafficNormal => "DesignateTrafficNormal", + Self::DesignateTrafficLow => "DesignateTrafficLow", + Self::DesignateTrafficRestricted => "DesignateTrafficRestricted", + Self::Zones => "Zones", + Self::ZonesPenInfo => "ZonesPenInfo", + Self::ZonesPitInfo => "ZonesPitInfo", + Self::ZonesHospitalInfo => "ZonesHospitalInfo", + Self::ZonesGatherInfo => "ZonesGatherInfo", + Self::DesignateRemoveConstruction => "DesignateRemoveConstruction", + Self::DepotAccess => "DepotAccess", + Self::NotesPoints => "NotesPoints", + Self::NotesRoutes => "NotesRoutes", + Self::Burrows => "Burrows", + Self::Hauling => "Hauling", + Self::ArenaWeather => "ArenaWeather", + Self::ArenaTrees => "ArenaTrees", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Default" => Some(Self::Default), + "Squads" => Some(Self::Squads), + "DesignateMine" => Some(Self::DesignateMine), + "DesignateRemoveRamps" => Some(Self::DesignateRemoveRamps), + "DesignateUpStair" => Some(Self::DesignateUpStair), + "DesignateDownStair" => Some(Self::DesignateDownStair), + "DesignateUpDownStair" => Some(Self::DesignateUpDownStair), + "DesignateUpRamp" => Some(Self::DesignateUpRamp), + "DesignateChannel" => Some(Self::DesignateChannel), + "DesignateGatherPlants" => Some(Self::DesignateGatherPlants), + "DesignateRemoveDesignation" => Some(Self::DesignateRemoveDesignation), + "DesignateSmooth" => Some(Self::DesignateSmooth), + "DesignateCarveTrack" => Some(Self::DesignateCarveTrack), + "DesignateEngrave" => Some(Self::DesignateEngrave), + "DesignateCarveFortification" => Some(Self::DesignateCarveFortification), + "Stockpiles" => Some(Self::Stockpiles), + "Build" => Some(Self::Build), + "QueryBuilding" => Some(Self::QueryBuilding), + "Orders" => Some(Self::Orders), + "OrdersForbid" => Some(Self::OrdersForbid), + "OrdersRefuse" => Some(Self::OrdersRefuse), + "OrdersWorkshop" => Some(Self::OrdersWorkshop), + "OrdersZone" => Some(Self::OrdersZone), + "BuildingItems" => Some(Self::BuildingItems), + "ViewUnits" => Some(Self::ViewUnits), + "LookAround" => Some(Self::LookAround), + "DesignateItemsClaim" => Some(Self::DesignateItemsClaim), + "DesignateItemsForbid" => Some(Self::DesignateItemsForbid), + "DesignateItemsMelt" => Some(Self::DesignateItemsMelt), + "DesignateItemsUnmelt" => Some(Self::DesignateItemsUnmelt), + "DesignateItemsDump" => Some(Self::DesignateItemsDump), + "DesignateItemsUndump" => Some(Self::DesignateItemsUndump), + "DesignateItemsHide" => Some(Self::DesignateItemsHide), + "DesignateItemsUnhide" => Some(Self::DesignateItemsUnhide), + "DesignateChopTrees" => Some(Self::DesignateChopTrees), + "DesignateToggleEngravings" => Some(Self::DesignateToggleEngravings), + "DesignateToggleMarker" => Some(Self::DesignateToggleMarker), + "Hotkeys" => Some(Self::Hotkeys), + "DesignateTrafficHigh" => Some(Self::DesignateTrafficHigh), + "DesignateTrafficNormal" => Some(Self::DesignateTrafficNormal), + "DesignateTrafficLow" => Some(Self::DesignateTrafficLow), + "DesignateTrafficRestricted" => Some(Self::DesignateTrafficRestricted), + "Zones" => Some(Self::Zones), + "ZonesPenInfo" => Some(Self::ZonesPenInfo), + "ZonesPitInfo" => Some(Self::ZonesPitInfo), + "ZonesHospitalInfo" => Some(Self::ZonesHospitalInfo), + "ZonesGatherInfo" => Some(Self::ZonesGatherInfo), + "DesignateRemoveConstruction" => Some(Self::DesignateRemoveConstruction), + "DepotAccess" => Some(Self::DepotAccess), + "NotesPoints" => Some(Self::NotesPoints), + "NotesRoutes" => Some(Self::NotesRoutes), + "Burrows" => Some(Self::Burrows), + "Hauling" => Some(Self::Hauling), + "ArenaWeather" => Some(Self::ArenaWeather), + "ArenaTrees" => Some(Self::ArenaTrees), + _ => None, + } + } +} diff --git a/dfhack-proto/src/generated/messages/remote_fortress_reader.rs b/dfhack-proto/src/generated/messages/remote_fortress_reader.rs new file mode 100644 index 0000000..fdf1344 --- /dev/null +++ b/dfhack-proto/src/generated/messages/remote_fortress_reader.rs @@ -0,0 +1,3106 @@ +// This file is @generated by prost-build. +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Coord { + #[prost(int32, optional, tag = "1")] + pub x: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub y: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub z: ::core::option::Option, +} +impl ::prost::Name for Coord { + const NAME: &'static str = "Coord"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Coord".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Coord".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Tiletype { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(string, optional, tag = "2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub caption: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration = "TiletypeShape", optional, tag = "4")] + pub shape: ::core::option::Option, + #[prost(enumeration = "TiletypeSpecial", optional, tag = "5")] + pub special: ::core::option::Option, + #[prost(enumeration = "TiletypeMaterial", optional, tag = "6")] + pub material: ::core::option::Option, + #[prost(enumeration = "TiletypeVariant", optional, tag = "7")] + pub variant: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub direction: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for Tiletype { + const NAME: &'static str = "Tiletype"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Tiletype".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Tiletype".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TiletypeList { + #[prost(message, repeated, tag = "1")] + pub tiletype_list: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for TiletypeList { + const NAME: &'static str = "TiletypeList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.TiletypeList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.TiletypeList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BuildingExtents { + #[prost(int32, required, tag = "1")] + pub pos_x: i32, + #[prost(int32, required, tag = "2")] + pub pos_y: i32, + #[prost(int32, required, tag = "3")] + pub width: i32, + #[prost(int32, required, tag = "4")] + pub height: i32, + #[prost(int32, repeated, packed = "false", tag = "5")] + pub extents: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BuildingExtents { + const NAME: &'static str = "BuildingExtents"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BuildingExtents".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BuildingExtents".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BuildingItem { + #[prost(message, optional, tag = "1")] + pub item: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub mode: ::core::option::Option, +} +impl ::prost::Name for BuildingItem { + const NAME: &'static str = "BuildingItem"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BuildingItem".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BuildingItem".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BuildingInstance { + #[prost(int32, required, tag = "1")] + pub index: i32, + #[prost(int32, optional, tag = "2")] + pub pos_x_min: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub pos_y_min: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub pos_z_min: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub pos_x_max: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub pos_y_max: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub pos_z_max: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub building_type: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub material: ::core::option::Option, + #[prost(uint32, optional, tag = "10")] + pub building_flags: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub is_room: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub room: ::core::option::Option, + /// Doesn't mean anything for most buildings + #[prost(enumeration = "BuildingDirection", optional, tag = "13")] + pub direction: ::core::option::Option, + #[prost(message, repeated, tag = "14")] + pub items: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "15")] + pub active: ::core::option::Option, +} +impl ::prost::Name for BuildingInstance { + const NAME: &'static str = "BuildingInstance"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BuildingInstance".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BuildingInstance".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RiverEdge { + #[prost(int32, optional, tag = "1")] + pub min_pos: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub max_pos: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub active: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub elevation: ::core::option::Option, +} +impl ::prost::Name for RiverEdge { + const NAME: &'static str = "RiverEdge"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.RiverEdge".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.RiverEdge".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RiverTile { + #[prost(message, optional, tag = "1")] + pub north: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub south: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub east: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub west: ::core::option::Option, +} +impl ::prost::Name for RiverTile { + const NAME: &'static str = "RiverTile"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.RiverTile".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.RiverTile".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Spatter { + #[prost(message, optional, tag = "1")] + pub material: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub amount: ::core::option::Option, + #[prost(enumeration = "MatterState", optional, tag = "3")] + pub state: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub item: ::core::option::Option, +} +impl ::prost::Name for Spatter { + const NAME: &'static str = "Spatter"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Spatter".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Spatter".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpatterPile { + #[prost(message, repeated, tag = "1")] + pub spatters: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for SpatterPile { + const NAME: &'static str = "SpatterPile"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.SpatterPile".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.SpatterPile".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Item { + #[prost(int32, optional, tag = "1")] + pub id: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub pos: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub flags1: ::core::option::Option, + #[prost(uint32, optional, tag = "4")] + pub flags2: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub r#type: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub material: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub dye: ::core::option::Option, + #[prost(int32, optional, tag = "8")] + pub stack_size: ::core::option::Option, + #[prost(float, optional, tag = "9")] + pub subpos_x: ::core::option::Option, + #[prost(float, optional, tag = "10")] + pub subpos_y: ::core::option::Option, + #[prost(float, optional, tag = "11")] + pub subpos_z: ::core::option::Option, + #[prost(bool, optional, tag = "12")] + pub projectile: ::core::option::Option, + #[prost(float, optional, tag = "13")] + pub velocity_x: ::core::option::Option, + #[prost(float, optional, tag = "14")] + pub velocity_y: ::core::option::Option, + #[prost(float, optional, tag = "15")] + pub velocity_z: ::core::option::Option, + #[prost(int32, optional, tag = "16")] + pub volume: ::core::option::Option, + #[prost(message, repeated, tag = "17")] + pub improvements: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "18")] + pub image: ::core::option::Option, +} +impl ::prost::Name for Item { + const NAME: &'static str = "Item"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Item".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Item".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PlantTile { + #[prost(bool, optional, tag = "1")] + pub trunk: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub connection_east: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub connection_south: ::core::option::Option, + #[prost(bool, optional, tag = "4")] + pub connection_west: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub connection_north: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub branches: ::core::option::Option, + #[prost(bool, optional, tag = "7")] + pub twigs: ::core::option::Option, + #[prost(enumeration = "TiletypeSpecial", optional, tag = "8")] + pub tile_type: ::core::option::Option, +} +impl ::prost::Name for PlantTile { + const NAME: &'static str = "PlantTile"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PlantTile".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PlantTile".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TreeInfo { + #[prost(message, optional, tag = "1")] + pub size: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub tiles: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for TreeInfo { + const NAME: &'static str = "TreeInfo"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.TreeInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.TreeInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PlantInstance { + #[prost(int32, optional, tag = "1")] + pub plant_type: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub pos: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub tree_info: ::core::option::Option, +} +impl ::prost::Name for PlantInstance { + const NAME: &'static str = "PlantInstance"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PlantInstance".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PlantInstance".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MapBlock { + #[prost(int32, required, tag = "1")] + pub map_x: i32, + #[prost(int32, required, tag = "2")] + pub map_y: i32, + #[prost(int32, required, tag = "3")] + pub map_z: i32, + #[prost(int32, repeated, packed = "false", tag = "4")] + pub tiles: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub materials: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "6")] + pub layer_materials: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "7")] + pub vein_materials: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "8")] + pub base_materials: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "9")] + pub magma: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "10")] + pub water: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "11")] + pub hidden: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "12")] + pub light: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "13")] + pub subterranean: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "14")] + pub outside: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "15")] + pub aquifer: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "16")] + pub water_stagnant: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "17")] + pub water_salt: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "18")] + pub construction_items: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "19")] + pub buildings: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "20")] + pub tree_percent: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "21")] + pub tree_x: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "22")] + pub tree_y: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "23")] + pub tree_z: ::prost::alloc::vec::Vec, + #[prost(enumeration = "TileDigDesignation", repeated, packed = "false", tag = "24")] + pub tile_dig_designation: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "25")] + pub spatter_pile: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "26")] + pub items: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "27")] + pub tile_dig_designation_marker: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "28")] + pub tile_dig_designation_auto: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "29")] + pub grass_percent: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "30")] + pub flows: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MapBlock { + const NAME: &'static str = "MapBlock"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.MapBlock".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.MapBlock".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct MatPair { + #[prost(int32, required, tag = "1")] + pub mat_type: i32, + #[prost(int32, required, tag = "2")] + pub mat_index: i32, +} +impl ::prost::Name for MatPair { + const NAME: &'static str = "MatPair"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.MatPair".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.MatPair".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ColorDefinition { + #[prost(int32, required, tag = "1")] + pub red: i32, + #[prost(int32, required, tag = "2")] + pub green: i32, + #[prost(int32, required, tag = "3")] + pub blue: i32, +} +impl ::prost::Name for ColorDefinition { + const NAME: &'static str = "ColorDefinition"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ColorDefinition".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ColorDefinition".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaterialDefinition { + #[prost(message, required, tag = "1")] + pub mat_pair: MatPair, + #[prost(string, optional, tag = "2")] + pub id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "3")] + pub name: ::core::option::Option<::prost::alloc::vec::Vec>, + /// Simplifying colors to assume room temperature. + #[prost(message, optional, tag = "4")] + pub state_color: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub instrument: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub up_step: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub down_step: ::core::option::Option, + #[prost(enumeration = "ArmorLayer", optional, tag = "8")] + pub layer: ::core::option::Option, +} +impl ::prost::Name for MaterialDefinition { + const NAME: &'static str = "MaterialDefinition"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.MaterialDefinition".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.MaterialDefinition".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BuildingType { + #[prost(int32, required, tag = "1")] + pub building_type: i32, + #[prost(int32, required, tag = "2")] + pub building_subtype: i32, + #[prost(int32, required, tag = "3")] + pub building_custom: i32, +} +impl ::prost::Name for BuildingType { + const NAME: &'static str = "BuildingType"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BuildingType".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BuildingType".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BuildingDefinition { + #[prost(message, required, tag = "1")] + pub building_type: BuildingType, + #[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>, +} +impl ::prost::Name for BuildingDefinition { + const NAME: &'static str = "BuildingDefinition"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BuildingDefinition".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BuildingDefinition".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BuildingList { + #[prost(message, repeated, tag = "1")] + pub building_list: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BuildingList { + const NAME: &'static str = "BuildingList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BuildingList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BuildingList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaterialList { + #[prost(message, repeated, tag = "1")] + pub material_list: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MaterialList { + const NAME: &'static str = "MaterialList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.MaterialList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.MaterialList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Hair { + #[prost(int32, optional, tag = "1")] + pub length: ::core::option::Option, + #[prost(enumeration = "HairStyle", optional, tag = "2")] + pub style: ::core::option::Option, +} +impl ::prost::Name for Hair { + const NAME: &'static str = "Hair"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Hair".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Hair".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BodySizeInfo { + #[prost(int32, optional, tag = "1")] + pub size_cur: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub size_base: ::core::option::Option, + /// !< size_cur^0.666 + #[prost(int32, optional, tag = "3")] + pub area_cur: ::core::option::Option, + /// !< size_base^0.666 + #[prost(int32, optional, tag = "4")] + pub area_base: ::core::option::Option, + /// !< (size_cur*10000)^0.333 + #[prost(int32, optional, tag = "5")] + pub length_cur: ::core::option::Option, + /// !< (size_base*10000)^0.333 + #[prost(int32, optional, tag = "6")] + pub length_base: ::core::option::Option, +} +impl ::prost::Name for BodySizeInfo { + const NAME: &'static str = "BodySizeInfo"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BodySizeInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BodySizeInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UnitAppearance { + #[prost(int32, repeated, packed = "false", tag = "1")] + pub body_modifiers: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "2")] + pub bp_modifiers: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "3")] + pub size_modifier: ::core::option::Option, + #[prost(int32, repeated, packed = "false", tag = "4")] + pub colors: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub hair: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub beard: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub moustache: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub sideburns: ::core::option::Option, + #[prost(string, optional, tag = "9")] + pub physical_description: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for UnitAppearance { + const NAME: &'static str = "UnitAppearance"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.UnitAppearance".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.UnitAppearance".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InventoryItem { + #[prost(enumeration = "InventoryMode", optional, tag = "1")] + pub mode: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub item: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub body_part_id: ::core::option::Option, +} +impl ::prost::Name for InventoryItem { + const NAME: &'static str = "InventoryItem"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.InventoryItem".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.InventoryItem".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct WoundPart { + #[prost(int32, optional, tag = "1")] + pub global_layer_idx: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub body_part_id: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub layer_idx: ::core::option::Option, +} +impl ::prost::Name for WoundPart { + const NAME: &'static str = "WoundPart"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.WoundPart".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.WoundPart".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnitWound { + #[prost(message, repeated, tag = "1")] + pub parts: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag = "2")] + pub severed_part: ::core::option::Option, +} +impl ::prost::Name for UnitWound { + const NAME: &'static str = "UnitWound"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.UnitWound".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.UnitWound".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnitDefinition { + #[prost(int32, required, tag = "1")] + pub id: i32, + #[prost(bool, optional, tag = "2")] + pub is_valid: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub pos_x: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub pos_y: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub pos_z: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub race: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub profession_color: ::core::option::Option, + #[prost(uint32, optional, tag = "8")] + pub flags1: ::core::option::Option, + #[prost(uint32, optional, tag = "9")] + pub flags2: ::core::option::Option, + #[prost(uint32, optional, tag = "10")] + pub flags3: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub is_soldier: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub size_info: ::core::option::Option, + #[prost(string, optional, tag = "13")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "14")] + pub blood_max: ::core::option::Option, + #[prost(int32, optional, tag = "15")] + pub blood_count: ::core::option::Option, + #[prost(message, optional, tag = "16")] + pub appearance: ::core::option::Option, + #[prost(int32, optional, tag = "17")] + pub profession_id: ::core::option::Option, + #[prost(string, repeated, tag = "18")] + pub noble_positions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "19")] + pub rider_id: ::core::option::Option, + #[prost(message, repeated, tag = "20")] + pub inventory: ::prost::alloc::vec::Vec, + #[prost(float, optional, tag = "21")] + pub subpos_x: ::core::option::Option, + #[prost(float, optional, tag = "22")] + pub subpos_y: ::core::option::Option, + #[prost(float, optional, tag = "23")] + pub subpos_z: ::core::option::Option, + #[prost(message, optional, tag = "24")] + pub facing: ::core::option::Option, + #[prost(int32, optional, tag = "25")] + pub age: ::core::option::Option, + #[prost(message, repeated, tag = "26")] + pub wounds: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for UnitDefinition { + const NAME: &'static str = "UnitDefinition"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.UnitDefinition".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.UnitDefinition".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnitList { + #[prost(message, repeated, tag = "1")] + pub creature_list: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for UnitList { + const NAME: &'static str = "UnitList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.UnitList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.UnitList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BlockRequest { + #[prost(int32, optional, tag = "1")] + pub blocks_needed: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub min_x: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub max_x: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub min_y: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub max_y: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub min_z: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub max_z: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub force_reload: ::core::option::Option, +} +impl ::prost::Name for BlockRequest { + const NAME: &'static str = "BlockRequest"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BlockRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BlockRequest".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockList { + #[prost(message, repeated, tag = "1")] + pub map_blocks: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "2")] + pub map_x: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub map_y: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub engravings: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub ocean_waves: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BlockList { + const NAME: &'static str = "BlockList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BlockList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BlockList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PlantDef { + #[prost(int32, required, tag = "1")] + pub pos_x: i32, + #[prost(int32, required, tag = "2")] + pub pos_y: i32, + #[prost(int32, required, tag = "3")] + pub pos_z: i32, + #[prost(int32, required, tag = "4")] + pub index: i32, +} +impl ::prost::Name for PlantDef { + const NAME: &'static str = "PlantDef"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PlantDef".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PlantDef".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PlantList { + #[prost(message, repeated, tag = "1")] + pub plant_list: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for PlantList { + const NAME: &'static str = "PlantList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PlantList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PlantList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ViewInfo { + #[prost(int32, optional, tag = "1")] + pub view_pos_x: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub view_pos_y: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub view_pos_z: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub view_size_x: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub view_size_y: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub cursor_pos_x: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub cursor_pos_y: ::core::option::Option, + #[prost(int32, optional, tag = "8")] + pub cursor_pos_z: ::core::option::Option, + #[prost(int32, optional, tag = "9", default = "-1")] + pub follow_unit_id: ::core::option::Option, + #[prost(int32, optional, tag = "10", default = "-1")] + pub follow_item_id: ::core::option::Option, +} +impl ::prost::Name for ViewInfo { + const NAME: &'static str = "ViewInfo"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ViewInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ViewInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct MapInfo { + #[prost(int32, optional, tag = "1")] + pub block_size_x: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub block_size_y: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub block_size_z: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub block_pos_x: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub block_pos_y: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub block_pos_z: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub world_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub world_name_english: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "9")] + pub save_name: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for MapInfo { + const NAME: &'static str = "MapInfo"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.MapInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.MapInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Cloud { + #[prost(enumeration = "FrontType", optional, tag = "1")] + pub front: ::core::option::Option, + #[prost(enumeration = "CumulusType", optional, tag = "2")] + pub cumulus: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub cirrus: ::core::option::Option, + #[prost(enumeration = "StratusType", optional, tag = "4")] + pub stratus: ::core::option::Option, + #[prost(enumeration = "FogType", optional, tag = "5")] + pub fog: ::core::option::Option, +} +impl ::prost::Name for Cloud { + const NAME: &'static str = "Cloud"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Cloud".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Cloud".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WorldMap { + #[prost(int32, required, tag = "1")] + pub world_width: i32, + #[prost(int32, required, tag = "2")] + pub world_height: i32, + #[prost(bytes = "vec", optional, tag = "3")] + pub name: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "4")] + pub name_english: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, repeated, packed = "false", tag = "5")] + pub elevation: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "6")] + pub rainfall: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "7")] + pub vegetation: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "8")] + pub temperature: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "9")] + pub evilness: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "10")] + pub drainage: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "11")] + pub volcanism: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "12")] + pub savagery: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "13")] + pub clouds: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "14")] + pub salinity: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "15")] + pub map_x: ::core::option::Option, + #[prost(int32, optional, tag = "16")] + pub map_y: ::core::option::Option, + #[prost(int32, optional, tag = "17")] + pub center_x: ::core::option::Option, + #[prost(int32, optional, tag = "18")] + pub center_y: ::core::option::Option, + #[prost(int32, optional, tag = "19")] + pub center_z: ::core::option::Option, + #[prost(int32, optional, tag = "20")] + pub cur_year: ::core::option::Option, + #[prost(int32, optional, tag = "21")] + pub cur_year_tick: ::core::option::Option, + #[prost(enumeration = "WorldPoles", optional, tag = "22")] + pub world_poles: ::core::option::Option, + #[prost(message, repeated, tag = "23")] + pub river_tiles: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "24")] + pub water_elevation: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "25")] + pub region_tiles: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for WorldMap { + const NAME: &'static str = "WorldMap"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.WorldMap".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.WorldMap".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SiteRealizationBuildingWall { + #[prost(int32, optional, tag = "1")] + pub start_x: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub start_y: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub start_z: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub end_x: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub end_y: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub end_z: ::core::option::Option, +} +impl ::prost::Name for SiteRealizationBuildingWall { + const NAME: &'static str = "SiteRealizationBuildingWall"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.SiteRealizationBuildingWall".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.SiteRealizationBuildingWall".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SiteRealizationBuildingTower { + #[prost(int32, optional, tag = "1")] + pub roof_z: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub round: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub goblin: ::core::option::Option, +} +impl ::prost::Name for SiteRealizationBuildingTower { + const NAME: &'static str = "SiteRealizationBuildingTower"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.SiteRealizationBuildingTower".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.SiteRealizationBuildingTower".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct TrenchSpoke { + #[prost(int32, optional, tag = "1")] + pub mound_start: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub trench_start: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub trench_end: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub mound_end: ::core::option::Option, +} +impl ::prost::Name for TrenchSpoke { + const NAME: &'static str = "TrenchSpoke"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.TrenchSpoke".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.TrenchSpoke".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SiteRealizationBuildingTrenches { + #[prost(message, repeated, tag = "1")] + pub spokes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for SiteRealizationBuildingTrenches { + const NAME: &'static str = "SiteRealizationBuildingTrenches"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.SiteRealizationBuildingTrenches".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.SiteRealizationBuildingTrenches".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SiteRealizationBuilding { + #[prost(int32, optional, tag = "1")] + pub id: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub min_x: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub min_y: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub max_x: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub max_y: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub material: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub wall_info: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub tower_info: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub trench_info: ::core::option::Option, + #[prost(int32, optional, tag = "11")] + pub r#type: ::core::option::Option, +} +impl ::prost::Name for SiteRealizationBuilding { + const NAME: &'static str = "SiteRealizationBuilding"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.SiteRealizationBuilding".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.SiteRealizationBuilding".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegionTile { + #[prost(int32, optional, tag = "1")] + pub elevation: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub rainfall: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub vegetation: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub temperature: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub evilness: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub drainage: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub volcanism: ::core::option::Option, + #[prost(int32, optional, tag = "8")] + pub savagery: ::core::option::Option, + #[prost(int32, optional, tag = "9")] + pub salinity: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub river_tiles: ::core::option::Option, + #[prost(int32, optional, tag = "11")] + pub water_elevation: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub surface_material: ::core::option::Option, + #[prost(message, repeated, tag = "13")] + pub plant_materials: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "14")] + pub buildings: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "15")] + pub stone_materials: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "16")] + pub tree_materials: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "17")] + pub snow: ::core::option::Option, +} +impl ::prost::Name for RegionTile { + const NAME: &'static str = "RegionTile"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.RegionTile".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.RegionTile".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegionMap { + #[prost(int32, optional, tag = "1")] + pub map_x: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub map_y: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub name_english: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "5")] + pub tiles: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RegionMap { + const NAME: &'static str = "RegionMap"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.RegionMap".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.RegionMap".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegionMaps { + #[prost(message, repeated, tag = "1")] + pub world_maps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub region_maps: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for RegionMaps { + const NAME: &'static str = "RegionMaps"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.RegionMaps".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.RegionMaps".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatternDescriptor { + #[prost(string, optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "2")] + pub colors: ::prost::alloc::vec::Vec, + #[prost(enumeration = "PatternType", optional, tag = "3")] + pub pattern: ::core::option::Option, +} +impl ::prost::Name for PatternDescriptor { + const NAME: &'static str = "PatternDescriptor"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PatternDescriptor".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PatternDescriptor".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ColorModifierRaw { + #[prost(message, repeated, tag = "1")] + pub patterns: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "2")] + pub body_part_id: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "3")] + pub tissue_layer_id: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub start_date: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub end_date: ::core::option::Option, + #[prost(string, optional, tag = "6")] + pub part: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for ColorModifierRaw { + const NAME: &'static str = "ColorModifierRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ColorModifierRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ColorModifierRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BodyPartLayerRaw { + #[prost(string, optional, tag = "1")] + pub layer_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "2")] + pub tissue_id: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub layer_depth: ::core::option::Option, + #[prost(int32, repeated, packed = "false", tag = "4")] + pub bp_modifiers: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for BodyPartLayerRaw { + const NAME: &'static str = "BodyPartLayerRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BodyPartLayerRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BodyPartLayerRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BodyPartRaw { + #[prost(string, optional, tag = "1")] + pub token: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub category: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "3")] + pub parent: ::core::option::Option, + #[prost(bool, repeated, packed = "false", tag = "4")] + pub flags: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub layers: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "6")] + pub relsize: ::core::option::Option, +} +impl ::prost::Name for BodyPartRaw { + const NAME: &'static str = "BodyPartRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BodyPartRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BodyPartRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BpAppearanceModifier { + #[prost(string, optional, tag = "1")] + pub r#type: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "2")] + pub mod_min: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub mod_max: ::core::option::Option, +} +impl ::prost::Name for BpAppearanceModifier { + const NAME: &'static str = "BpAppearanceModifier"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.BpAppearanceModifier".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.BpAppearanceModifier".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct TissueRaw { + #[prost(string, optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "3")] + pub material: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub subordinate_to_tissue: ::core::option::Option<::prost::alloc::string::String>, +} +impl ::prost::Name for TissueRaw { + const NAME: &'static str = "TissueRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.TissueRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.TissueRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CasteRaw { + #[prost(int32, optional, tag = "1")] + pub index: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub caste_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub caste_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub baby_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub child_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "6")] + pub gender: ::core::option::Option, + #[prost(message, repeated, tag = "7")] + pub body_parts: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "8")] + pub total_relsize: ::core::option::Option, + #[prost(message, repeated, tag = "9")] + pub modifiers: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "10")] + pub modifier_idx: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "11")] + pub part_idx: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, packed = "false", tag = "12")] + pub layer_idx: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "13")] + pub body_appearance_modifiers: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "14")] + pub color_modifiers: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "15")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "16")] + pub adult_size: ::core::option::Option, +} +impl ::prost::Name for CasteRaw { + const NAME: &'static str = "CasteRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.CasteRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.CasteRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatureRaw { + #[prost(int32, optional, tag = "1")] + pub index: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub creature_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "3")] + pub name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub general_baby_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub general_child_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "6")] + pub creature_tile: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub creature_soldier_tile: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub color: ::core::option::Option, + #[prost(int32, optional, tag = "9")] + pub adultsize: ::core::option::Option, + #[prost(message, repeated, tag = "10")] + pub caste: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "11")] + pub tissues: ::prost::alloc::vec::Vec, + #[prost(bool, repeated, packed = "false", tag = "12")] + pub flags: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for CreatureRaw { + const NAME: &'static str = "CreatureRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.CreatureRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.CreatureRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatureRawList { + #[prost(message, repeated, tag = "1")] + pub creature_raws: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for CreatureRawList { + const NAME: &'static str = "CreatureRawList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.CreatureRawList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.CreatureRawList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Army { + #[prost(int32, optional, tag = "1")] + pub id: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub pos_x: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub pos_y: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub pos_z: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub leader: ::core::option::Option, + #[prost(message, repeated, tag = "6")] + pub members: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "7")] + pub flags: ::core::option::Option, +} +impl ::prost::Name for Army { + const NAME: &'static str = "Army"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Army".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Army".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ArmyList { + #[prost(message, repeated, tag = "1")] + pub armies: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ArmyList { + const NAME: &'static str = "ArmyList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ArmyList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ArmyList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GrowthPrint { + #[prost(int32, optional, tag = "1")] + pub priority: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub color: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub timing_start: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub timing_end: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub tile: ::core::option::Option, +} +impl ::prost::Name for GrowthPrint { + const NAME: &'static str = "GrowthPrint"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.GrowthPrint".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.GrowthPrint".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TreeGrowth { + #[prost(int32, optional, tag = "1")] + pub index: ::core::option::Option, + #[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(message, optional, tag = "4")] + pub mat: ::core::option::Option, + #[prost(message, repeated, tag = "5")] + pub prints: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "6")] + pub timing_start: ::core::option::Option, + #[prost(int32, optional, tag = "7")] + pub timing_end: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub twigs: ::core::option::Option, + #[prost(bool, optional, tag = "9")] + pub light_branches: ::core::option::Option, + #[prost(bool, optional, tag = "10")] + pub heavy_branches: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub trunk: ::core::option::Option, + #[prost(bool, optional, tag = "12")] + pub roots: ::core::option::Option, + #[prost(bool, optional, tag = "13")] + pub cap: ::core::option::Option, + #[prost(bool, optional, tag = "14")] + pub sapling: ::core::option::Option, + #[prost(int32, optional, tag = "15")] + pub trunk_height_start: ::core::option::Option, + #[prost(int32, optional, tag = "16")] + pub trunk_height_end: ::core::option::Option, +} +impl ::prost::Name for TreeGrowth { + const NAME: &'static str = "TreeGrowth"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.TreeGrowth".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.TreeGrowth".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PlantRaw { + #[prost(int32, optional, tag = "1")] + pub index: ::core::option::Option, + #[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(message, repeated, tag = "4")] + pub growths: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "5")] + pub tile: ::core::option::Option, +} +impl ::prost::Name for PlantRaw { + const NAME: &'static str = "PlantRaw"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PlantRaw".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PlantRaw".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PlantRawList { + #[prost(message, repeated, tag = "1")] + pub plant_raws: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for PlantRawList { + const NAME: &'static str = "PlantRawList"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.PlantRawList".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.PlantRawList".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ScreenTile { + #[prost(uint32, optional, tag = "1")] + pub character: ::core::option::Option, + #[prost(uint32, optional, tag = "2")] + pub foreground: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub background: ::core::option::Option, +} +impl ::prost::Name for ScreenTile { + const NAME: &'static str = "ScreenTile"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ScreenTile".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ScreenTile".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ScreenCapture { + #[prost(uint32, optional, tag = "1")] + pub width: ::core::option::Option, + #[prost(uint32, optional, tag = "2")] + pub height: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub tiles: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ScreenCapture { + const NAME: &'static str = "ScreenCapture"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ScreenCapture".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ScreenCapture".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct KeyboardEvent { + #[prost(uint32, optional, tag = "1")] + pub r#type: ::core::option::Option, + #[prost(uint32, optional, tag = "2")] + pub which: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub state: ::core::option::Option, + #[prost(uint32, optional, tag = "4")] + pub scancode: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub sym: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub r#mod: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub unicode: ::core::option::Option, +} +impl ::prost::Name for KeyboardEvent { + const NAME: &'static str = "KeyboardEvent"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.KeyboardEvent".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.KeyboardEvent".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DigCommand { + #[prost(enumeration = "TileDigDesignation", optional, tag = "1")] + pub designation: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub locations: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for DigCommand { + const NAME: &'static str = "DigCommand"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.DigCommand".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.DigCommand".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SingleBool { + #[prost(bool, optional, tag = "1")] + pub value: ::core::option::Option, +} +impl ::prost::Name for SingleBool { + const NAME: &'static str = "SingleBool"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.SingleBool".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.SingleBool".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct VersionInfo { + #[prost(string, optional, tag = "1")] + pub dwarf_fortress_version: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub dfhack_version: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub remote_fortress_reader_version: ::core::option::Option< + ::prost::alloc::string::String, + >, +} +impl ::prost::Name for VersionInfo { + const NAME: &'static str = "VersionInfo"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.VersionInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.VersionInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListRequest { + #[prost(int32, optional, tag = "1")] + pub list_start: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub list_end: ::core::option::Option, +} +impl ::prost::Name for ListRequest { + const NAME: &'static str = "ListRequest"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ListRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ListRequest".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Report { + #[prost(int32, optional, tag = "1")] + pub r#type: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub text: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "3")] + pub color: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub duration: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub continuation: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub unconscious: ::core::option::Option, + #[prost(bool, optional, tag = "7")] + pub announcement: ::core::option::Option, + #[prost(int32, optional, tag = "8")] + pub repeat_count: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub pos: ::core::option::Option, + #[prost(int32, optional, tag = "10")] + pub id: ::core::option::Option, + #[prost(int32, optional, tag = "11")] + pub year: ::core::option::Option, + #[prost(int32, optional, tag = "12")] + pub time: ::core::option::Option, +} +impl ::prost::Name for Report { + const NAME: &'static str = "Report"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Report".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Report".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Status { + #[prost(message, repeated, tag = "1")] + pub reports: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Status { + const NAME: &'static str = "Status"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Status".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Status".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ShapeDescriptior { + #[prost(string, optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "2")] + pub tile: ::core::option::Option, +} +impl ::prost::Name for ShapeDescriptior { + const NAME: &'static str = "ShapeDescriptior"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ShapeDescriptior".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ShapeDescriptior".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Language { + #[prost(message, repeated, tag = "1")] + pub shapes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Language { + const NAME: &'static str = "Language"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Language".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Language".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ItemImprovement { + #[prost(message, optional, tag = "1")] + pub material: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub shape: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub specific_type: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub image: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub r#type: ::core::option::Option, +} +impl ::prost::Name for ItemImprovement { + const NAME: &'static str = "ItemImprovement"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ItemImprovement".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ItemImprovement".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ArtImageElement { + #[prost(int32, optional, tag = "1")] + pub count: ::core::option::Option, + #[prost(enumeration = "ArtImageElementType", optional, tag = "2")] + pub r#type: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub creature_item: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub material: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub id: ::core::option::Option, +} +impl ::prost::Name for ArtImageElement { + const NAME: &'static str = "ArtImageElement"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ArtImageElement".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ArtImageElement".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ArtImageProperty { + #[prost(int32, optional, tag = "1")] + pub subject: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub object: ::core::option::Option, + #[prost(enumeration = "ArtImageVerb", optional, tag = "3")] + pub verb: ::core::option::Option, + #[prost(enumeration = "ArtImagePropertyType", optional, tag = "4")] + pub r#type: ::core::option::Option, +} +impl ::prost::Name for ArtImageProperty { + const NAME: &'static str = "ArtImageProperty"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ArtImageProperty".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ArtImageProperty".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ArtImage { + #[prost(message, repeated, tag = "1")] + pub elements: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub id: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub properties: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ArtImage { + const NAME: &'static str = "ArtImage"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.ArtImage".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.ArtImage".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Engraving { + #[prost(message, optional, tag = "1")] + pub pos: ::core::option::Option, + #[prost(int32, optional, tag = "2")] + pub quality: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub tile: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub image: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub floor: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub west: ::core::option::Option, + #[prost(bool, optional, tag = "7")] + pub east: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub north: ::core::option::Option, + #[prost(bool, optional, tag = "9")] + pub south: ::core::option::Option, + #[prost(bool, optional, tag = "10")] + pub hidden: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub northwest: ::core::option::Option, + #[prost(bool, optional, tag = "12")] + pub northeast: ::core::option::Option, + #[prost(bool, optional, tag = "13")] + pub southwest: ::core::option::Option, + #[prost(bool, optional, tag = "14")] + pub southeast: ::core::option::Option, +} +impl ::prost::Name for Engraving { + const NAME: &'static str = "Engraving"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Engraving".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Engraving".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct FlowInfo { + #[prost(int32, optional, tag = "1")] + pub index: ::core::option::Option, + #[prost(enumeration = "FlowType", optional, tag = "2")] + pub r#type: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub density: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub pos: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub dest: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub expanding: ::core::option::Option, + #[deprecated] + #[prost(bool, optional, tag = "7")] + pub reuse: ::core::option::Option, + #[prost(int32, optional, tag = "8")] + pub guide_id: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub material: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub item: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub dead: ::core::option::Option, + #[prost(bool, optional, tag = "12")] + pub fast: ::core::option::Option, + #[prost(bool, optional, tag = "13")] + pub creeping: ::core::option::Option, +} +impl ::prost::Name for FlowInfo { + const NAME: &'static str = "FlowInfo"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.FlowInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.FlowInfo".into() + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Wave { + #[prost(message, optional, tag = "1")] + pub dest: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub pos: ::core::option::Option, +} +impl ::prost::Name for Wave { + const NAME: &'static str = "Wave"; + const PACKAGE: &'static str = "RemoteFortressReader"; + fn full_name() -> ::prost::alloc::string::String { + "RemoteFortressReader.Wave".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/RemoteFortressReader.Wave".into() + } +} +/// We use shapes, etc, because the actual tiletypes may differ between DF versions. +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TiletypeShape { + NoShape = -1, + Empty = 0, + Floor = 1, + Boulder = 2, + Pebbles = 3, + Wall = 4, + Fortification = 5, + StairUp = 6, + StairDown = 7, + StairUpdown = 8, + Ramp = 9, + RampTop = 10, + BrookBed = 11, + BrookTop = 12, + TreeShape = 13, + Sapling = 14, + Shrub = 15, + EndlessPit = 16, + Branch = 17, + TrunkBranch = 18, + Twig = 19, +} +impl TiletypeShape { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NoShape => "NO_SHAPE", + Self::Empty => "EMPTY", + Self::Floor => "FLOOR", + Self::Boulder => "BOULDER", + Self::Pebbles => "PEBBLES", + Self::Wall => "WALL", + Self::Fortification => "FORTIFICATION", + Self::StairUp => "STAIR_UP", + Self::StairDown => "STAIR_DOWN", + Self::StairUpdown => "STAIR_UPDOWN", + Self::Ramp => "RAMP", + Self::RampTop => "RAMP_TOP", + Self::BrookBed => "BROOK_BED", + Self::BrookTop => "BROOK_TOP", + Self::TreeShape => "TREE_SHAPE", + Self::Sapling => "SAPLING", + Self::Shrub => "SHRUB", + Self::EndlessPit => "ENDLESS_PIT", + Self::Branch => "BRANCH", + Self::TrunkBranch => "TRUNK_BRANCH", + Self::Twig => "TWIG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NO_SHAPE" => Some(Self::NoShape), + "EMPTY" => Some(Self::Empty), + "FLOOR" => Some(Self::Floor), + "BOULDER" => Some(Self::Boulder), + "PEBBLES" => Some(Self::Pebbles), + "WALL" => Some(Self::Wall), + "FORTIFICATION" => Some(Self::Fortification), + "STAIR_UP" => Some(Self::StairUp), + "STAIR_DOWN" => Some(Self::StairDown), + "STAIR_UPDOWN" => Some(Self::StairUpdown), + "RAMP" => Some(Self::Ramp), + "RAMP_TOP" => Some(Self::RampTop), + "BROOK_BED" => Some(Self::BrookBed), + "BROOK_TOP" => Some(Self::BrookTop), + "TREE_SHAPE" => Some(Self::TreeShape), + "SAPLING" => Some(Self::Sapling), + "SHRUB" => Some(Self::Shrub), + "ENDLESS_PIT" => Some(Self::EndlessPit), + "BRANCH" => Some(Self::Branch), + "TRUNK_BRANCH" => Some(Self::TrunkBranch), + "TWIG" => Some(Self::Twig), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TiletypeSpecial { + NoSpecial = -1, + Normal = 0, + RiverSource = 1, + Waterfall = 2, + Smooth = 3, + Furrowed = 4, + Wet = 5, + Dead = 6, + Worn1 = 7, + Worn2 = 8, + Worn3 = 9, + Track = 10, + SmoothDead = 11, +} +impl TiletypeSpecial { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NoSpecial => "NO_SPECIAL", + Self::Normal => "NORMAL", + Self::RiverSource => "RIVER_SOURCE", + Self::Waterfall => "WATERFALL", + Self::Smooth => "SMOOTH", + Self::Furrowed => "FURROWED", + Self::Wet => "WET", + Self::Dead => "DEAD", + Self::Worn1 => "WORN_1", + Self::Worn2 => "WORN_2", + Self::Worn3 => "WORN_3", + Self::Track => "TRACK", + Self::SmoothDead => "SMOOTH_DEAD", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NO_SPECIAL" => Some(Self::NoSpecial), + "NORMAL" => Some(Self::Normal), + "RIVER_SOURCE" => Some(Self::RiverSource), + "WATERFALL" => Some(Self::Waterfall), + "SMOOTH" => Some(Self::Smooth), + "FURROWED" => Some(Self::Furrowed), + "WET" => Some(Self::Wet), + "DEAD" => Some(Self::Dead), + "WORN_1" => Some(Self::Worn1), + "WORN_2" => Some(Self::Worn2), + "WORN_3" => Some(Self::Worn3), + "TRACK" => Some(Self::Track), + "SMOOTH_DEAD" => Some(Self::SmoothDead), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TiletypeMaterial { + NoMaterial = -1, + Air = 0, + Soil = 1, + Stone = 2, + Feature = 3, + LavaStone = 4, + Mineral = 5, + FrozenLiquid = 6, + Construction = 7, + GrassLight = 8, + GrassDark = 9, + GrassDry = 10, + GrassDead = 11, + Plant = 12, + Hfs = 13, + Campfire = 14, + Fire = 15, + Ashes = 16, + Magma = 17, + Driftwood = 18, + Pool = 19, + Brook = 20, + River = 21, + Root = 22, + TreeMaterial = 23, + Mushroom = 24, + UnderworldGate = 25, +} +impl TiletypeMaterial { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NoMaterial => "NO_MATERIAL", + Self::Air => "AIR", + Self::Soil => "SOIL", + Self::Stone => "STONE", + Self::Feature => "FEATURE", + Self::LavaStone => "LAVA_STONE", + Self::Mineral => "MINERAL", + Self::FrozenLiquid => "FROZEN_LIQUID", + Self::Construction => "CONSTRUCTION", + Self::GrassLight => "GRASS_LIGHT", + Self::GrassDark => "GRASS_DARK", + Self::GrassDry => "GRASS_DRY", + Self::GrassDead => "GRASS_DEAD", + Self::Plant => "PLANT", + Self::Hfs => "HFS", + Self::Campfire => "CAMPFIRE", + Self::Fire => "FIRE", + Self::Ashes => "ASHES", + Self::Magma => "MAGMA", + Self::Driftwood => "DRIFTWOOD", + Self::Pool => "POOL", + Self::Brook => "BROOK", + Self::River => "RIVER", + Self::Root => "ROOT", + Self::TreeMaterial => "TREE_MATERIAL", + Self::Mushroom => "MUSHROOM", + Self::UnderworldGate => "UNDERWORLD_GATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NO_MATERIAL" => Some(Self::NoMaterial), + "AIR" => Some(Self::Air), + "SOIL" => Some(Self::Soil), + "STONE" => Some(Self::Stone), + "FEATURE" => Some(Self::Feature), + "LAVA_STONE" => Some(Self::LavaStone), + "MINERAL" => Some(Self::Mineral), + "FROZEN_LIQUID" => Some(Self::FrozenLiquid), + "CONSTRUCTION" => Some(Self::Construction), + "GRASS_LIGHT" => Some(Self::GrassLight), + "GRASS_DARK" => Some(Self::GrassDark), + "GRASS_DRY" => Some(Self::GrassDry), + "GRASS_DEAD" => Some(Self::GrassDead), + "PLANT" => Some(Self::Plant), + "HFS" => Some(Self::Hfs), + "CAMPFIRE" => Some(Self::Campfire), + "FIRE" => Some(Self::Fire), + "ASHES" => Some(Self::Ashes), + "MAGMA" => Some(Self::Magma), + "DRIFTWOOD" => Some(Self::Driftwood), + "POOL" => Some(Self::Pool), + "BROOK" => Some(Self::Brook), + "RIVER" => Some(Self::River), + "ROOT" => Some(Self::Root), + "TREE_MATERIAL" => Some(Self::TreeMaterial), + "MUSHROOM" => Some(Self::Mushroom), + "UNDERWORLD_GATE" => Some(Self::UnderworldGate), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TiletypeVariant { + NoVariant = -1, + Var1 = 0, + Var2 = 1, + Var3 = 2, + Var4 = 3, +} +impl TiletypeVariant { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NoVariant => "NO_VARIANT", + Self::Var1 => "VAR_1", + Self::Var2 => "VAR_2", + Self::Var3 => "VAR_3", + Self::Var4 => "VAR_4", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NO_VARIANT" => Some(Self::NoVariant), + "VAR_1" => Some(Self::Var1), + "VAR_2" => Some(Self::Var2), + "VAR_3" => Some(Self::Var3), + "VAR_4" => Some(Self::Var4), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum WorldPoles { + NoPoles = 0, + NorthPole = 1, + SouthPole = 2, + BothPoles = 3, +} +impl WorldPoles { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NoPoles => "NO_POLES", + Self::NorthPole => "NORTH_POLE", + Self::SouthPole => "SOUTH_POLE", + Self::BothPoles => "BOTH_POLES", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NO_POLES" => Some(Self::NoPoles), + "NORTH_POLE" => Some(Self::NorthPole), + "SOUTH_POLE" => Some(Self::SouthPole), + "BOTH_POLES" => Some(Self::BothPoles), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BuildingDirection { + North = 0, + East = 1, + South = 2, + West = 3, + Northeast = 4, + Southeast = 5, + Southwest = 6, + Northwest = 7, + None = 8, +} +impl BuildingDirection { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::North => "NORTH", + Self::East => "EAST", + Self::South => "SOUTH", + Self::West => "WEST", + Self::Northeast => "NORTHEAST", + Self::Southeast => "SOUTHEAST", + Self::Southwest => "SOUTHWEST", + Self::Northwest => "NORTHWEST", + Self::None => "NONE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NORTH" => Some(Self::North), + "EAST" => Some(Self::East), + "SOUTH" => Some(Self::South), + "WEST" => Some(Self::West), + "NORTHEAST" => Some(Self::Northeast), + "SOUTHEAST" => Some(Self::Southeast), + "SOUTHWEST" => Some(Self::Southwest), + "NORTHWEST" => Some(Self::Northwest), + "NONE" => Some(Self::None), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TileDigDesignation { + /// * + /// no designation + NoDig = 0, + /// * + /// dig walls, remove stairs and ramps, gather plants, fell trees + DefaultDig = 1, + UpDownStairDig = 2, + ChannelDig = 3, + RampDig = 4, + DownStairDig = 5, + UpStairDig = 6, +} +impl TileDigDesignation { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NoDig => "NO_DIG", + Self::DefaultDig => "DEFAULT_DIG", + Self::UpDownStairDig => "UP_DOWN_STAIR_DIG", + Self::ChannelDig => "CHANNEL_DIG", + Self::RampDig => "RAMP_DIG", + Self::DownStairDig => "DOWN_STAIR_DIG", + Self::UpStairDig => "UP_STAIR_DIG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NO_DIG" => Some(Self::NoDig), + "DEFAULT_DIG" => Some(Self::DefaultDig), + "UP_DOWN_STAIR_DIG" => Some(Self::UpDownStairDig), + "CHANNEL_DIG" => Some(Self::ChannelDig), + "RAMP_DIG" => Some(Self::RampDig), + "DOWN_STAIR_DIG" => Some(Self::DownStairDig), + "UP_STAIR_DIG" => Some(Self::UpStairDig), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum HairStyle { + Unkempt = -1, + NeatlyCombed = 0, + Braided = 1, + DoubleBraid = 2, + PonyTails = 3, + CleanShaven = 4, +} +impl HairStyle { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Unkempt => "UNKEMPT", + Self::NeatlyCombed => "NEATLY_COMBED", + Self::Braided => "BRAIDED", + Self::DoubleBraid => "DOUBLE_BRAID", + Self::PonyTails => "PONY_TAILS", + Self::CleanShaven => "CLEAN_SHAVEN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKEMPT" => Some(Self::Unkempt), + "NEATLY_COMBED" => Some(Self::NeatlyCombed), + "BRAIDED" => Some(Self::Braided), + "DOUBLE_BRAID" => Some(Self::DoubleBraid), + "PONY_TAILS" => Some(Self::PonyTails), + "CLEAN_SHAVEN" => Some(Self::CleanShaven), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum InventoryMode { + Hauled = 0, + /// * + /// also shield, crutch + Weapon = 1, + /// * + /// quiver + Worn = 2, + Piercing = 3, + /// * + /// attached to clothing + Flask = 4, + /// * + /// e.g. bandage + WrappedAround = 5, + StuckIn = 6, + /// * + /// string descr like Worn + InMouth = 7, + /// * + /// Left shoulder, right shoulder, or head, selected randomly using pet_seed + Pet = 8, + SewnInto = 9, + Strapped = 10, +} +impl InventoryMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Hauled => "Hauled", + Self::Weapon => "Weapon", + Self::Worn => "Worn", + Self::Piercing => "Piercing", + Self::Flask => "Flask", + Self::WrappedAround => "WrappedAround", + Self::StuckIn => "StuckIn", + Self::InMouth => "InMouth", + Self::Pet => "Pet", + Self::SewnInto => "SewnInto", + Self::Strapped => "Strapped", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Hauled" => Some(Self::Hauled), + "Weapon" => Some(Self::Weapon), + "Worn" => Some(Self::Worn), + "Piercing" => Some(Self::Piercing), + "Flask" => Some(Self::Flask), + "WrappedAround" => Some(Self::WrappedAround), + "StuckIn" => Some(Self::StuckIn), + "InMouth" => Some(Self::InMouth), + "Pet" => Some(Self::Pet), + "SewnInto" => Some(Self::SewnInto), + "Strapped" => Some(Self::Strapped), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ArmorLayer { + LayerUnder = 0, + LayerOver = 1, + LayerArmor = 2, + LayerCover = 3, +} +impl ArmorLayer { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::LayerUnder => "LAYER_UNDER", + Self::LayerOver => "LAYER_OVER", + Self::LayerArmor => "LAYER_ARMOR", + Self::LayerCover => "LAYER_COVER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LAYER_UNDER" => Some(Self::LayerUnder), + "LAYER_OVER" => Some(Self::LayerOver), + "LAYER_ARMOR" => Some(Self::LayerArmor), + "LAYER_COVER" => Some(Self::LayerCover), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MatterState { + Solid = 0, + Liquid = 1, + Gas = 2, + Powder = 3, + Paste = 4, + Pressed = 5, +} +impl MatterState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Solid => "Solid", + Self::Liquid => "Liquid", + Self::Gas => "Gas", + Self::Powder => "Powder", + Self::Paste => "Paste", + Self::Pressed => "Pressed", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Solid" => Some(Self::Solid), + "Liquid" => Some(Self::Liquid), + "Gas" => Some(Self::Gas), + "Powder" => Some(Self::Powder), + "Paste" => Some(Self::Paste), + "Pressed" => Some(Self::Pressed), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FrontType { + FrontNone = 0, + FrontWarm = 1, + FrontCold = 2, + FrontOccluded = 3, +} +impl FrontType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::FrontNone => "FRONT_NONE", + Self::FrontWarm => "FRONT_WARM", + Self::FrontCold => "FRONT_COLD", + Self::FrontOccluded => "FRONT_OCCLUDED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FRONT_NONE" => Some(Self::FrontNone), + "FRONT_WARM" => Some(Self::FrontWarm), + "FRONT_COLD" => Some(Self::FrontCold), + "FRONT_OCCLUDED" => Some(Self::FrontOccluded), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum CumulusType { + CumulusNone = 0, + CumulusMedium = 1, + CumulusMulti = 2, + CumulusNimbus = 3, +} +impl CumulusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::CumulusNone => "CUMULUS_NONE", + Self::CumulusMedium => "CUMULUS_MEDIUM", + Self::CumulusMulti => "CUMULUS_MULTI", + Self::CumulusNimbus => "CUMULUS_NIMBUS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CUMULUS_NONE" => Some(Self::CumulusNone), + "CUMULUS_MEDIUM" => Some(Self::CumulusMedium), + "CUMULUS_MULTI" => Some(Self::CumulusMulti), + "CUMULUS_NIMBUS" => Some(Self::CumulusNimbus), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum StratusType { + StratusNone = 0, + StratusAlto = 1, + StratusProper = 2, + StratusNimbus = 3, +} +impl StratusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::StratusNone => "STRATUS_NONE", + Self::StratusAlto => "STRATUS_ALTO", + Self::StratusProper => "STRATUS_PROPER", + Self::StratusNimbus => "STRATUS_NIMBUS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STRATUS_NONE" => Some(Self::StratusNone), + "STRATUS_ALTO" => Some(Self::StratusAlto), + "STRATUS_PROPER" => Some(Self::StratusProper), + "STRATUS_NIMBUS" => Some(Self::StratusNimbus), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FogType { + FogNone = 0, + FogMist = 1, + FogNormal = 2, + F0gThick = 3, +} +impl FogType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::FogNone => "FOG_NONE", + Self::FogMist => "FOG_MIST", + Self::FogNormal => "FOG_NORMAL", + Self::F0gThick => "F0G_THICK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FOG_NONE" => Some(Self::FogNone), + "FOG_MIST" => Some(Self::FogMist), + "FOG_NORMAL" => Some(Self::FogNormal), + "F0G_THICK" => Some(Self::F0gThick), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PatternType { + Monotone = 0, + Stripes = 1, + IrisEye = 2, + Spots = 3, + PupilEye = 4, + Mottled = 5, +} +impl PatternType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Monotone => "MONOTONE", + Self::Stripes => "STRIPES", + Self::IrisEye => "IRIS_EYE", + Self::Spots => "SPOTS", + Self::PupilEye => "PUPIL_EYE", + Self::Mottled => "MOTTLED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MONOTONE" => Some(Self::Monotone), + "STRIPES" => Some(Self::Stripes), + "IRIS_EYE" => Some(Self::IrisEye), + "SPOTS" => Some(Self::Spots), + "PUPIL_EYE" => Some(Self::PupilEye), + "MOTTLED" => Some(Self::Mottled), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ArtImageElementType { + ImageCreature = 0, + ImagePlant = 1, + ImageTree = 2, + ImageShape = 3, + ImageItem = 4, +} +impl ArtImageElementType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::ImageCreature => "IMAGE_CREATURE", + Self::ImagePlant => "IMAGE_PLANT", + Self::ImageTree => "IMAGE_TREE", + Self::ImageShape => "IMAGE_SHAPE", + Self::ImageItem => "IMAGE_ITEM", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IMAGE_CREATURE" => Some(Self::ImageCreature), + "IMAGE_PLANT" => Some(Self::ImagePlant), + "IMAGE_TREE" => Some(Self::ImageTree), + "IMAGE_SHAPE" => Some(Self::ImageShape), + "IMAGE_ITEM" => Some(Self::ImageItem), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ArtImagePropertyType { + TransitiveVerb = 0, + IntransitiveVerb = 1, +} +impl ArtImagePropertyType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::TransitiveVerb => "TRANSITIVE_VERB", + Self::IntransitiveVerb => "INTRANSITIVE_VERB", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRANSITIVE_VERB" => Some(Self::TransitiveVerb), + "INTRANSITIVE_VERB" => Some(Self::IntransitiveVerb), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ArtImageVerb { + VerbWithering = 0, + VerbSurroundedby = 1, + VerbMassacring = 2, + VerbFighting = 3, + VerbLaboring = 4, + VerbGreeting = 5, + VerbRefusing = 6, + VerbSpeaking = 7, + VerbEmbracing = 8, + VerbStrikingdown = 9, + VerbMenacingpose = 10, + VerbTraveling = 11, + VerbRaising = 12, + VerbHiding = 13, + VerbLookingconfused = 14, + VerbLookingterrified = 15, + VerbDevouring = 16, + VerbAdmiring = 17, + VerbBurning = 18, + VerbWeeping = 19, + VerbLookingdejected = 20, + VerbCringing = 21, + VerbScreaming = 22, + VerbSubmissivegesture = 23, + VerbFetalposition = 24, + VerbSmearedintospiral = 25, + VerbFalling = 26, + VerbDead = 27, + VerbLaughing = 28, + VerbLookingoffended = 29, + VerbBeingshot = 30, + VerbPlaintivegesture = 31, + VerbMelting = 32, + VerbShooting = 33, + VerbTorturing = 34, + VerbCommittingdepravedact = 35, + VerbPraying = 36, + VerbContemplating = 37, + VerbCooking = 38, + VerbEngraving = 39, + VerbProstrating = 40, + VerbSuffering = 41, + VerbBeingimpaled = 42, + VerbBeingcontorted = 43, + VerbBeingflayed = 44, + VerbHangingfrom = 45, + VerbBeingmutilated = 46, + VerbTriumphantpose = 47, +} +impl ArtImageVerb { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::VerbWithering => "VERB_WITHERING", + Self::VerbSurroundedby => "VERB_SURROUNDEDBY", + Self::VerbMassacring => "VERB_MASSACRING", + Self::VerbFighting => "VERB_FIGHTING", + Self::VerbLaboring => "VERB_LABORING", + Self::VerbGreeting => "VERB_GREETING", + Self::VerbRefusing => "VERB_REFUSING", + Self::VerbSpeaking => "VERB_SPEAKING", + Self::VerbEmbracing => "VERB_EMBRACING", + Self::VerbStrikingdown => "VERB_STRIKINGDOWN", + Self::VerbMenacingpose => "VERB_MENACINGPOSE", + Self::VerbTraveling => "VERB_TRAVELING", + Self::VerbRaising => "VERB_RAISING", + Self::VerbHiding => "VERB_HIDING", + Self::VerbLookingconfused => "VERB_LOOKINGCONFUSED", + Self::VerbLookingterrified => "VERB_LOOKINGTERRIFIED", + Self::VerbDevouring => "VERB_DEVOURING", + Self::VerbAdmiring => "VERB_ADMIRING", + Self::VerbBurning => "VERB_BURNING", + Self::VerbWeeping => "VERB_WEEPING", + Self::VerbLookingdejected => "VERB_LOOKINGDEJECTED", + Self::VerbCringing => "VERB_CRINGING", + Self::VerbScreaming => "VERB_SCREAMING", + Self::VerbSubmissivegesture => "VERB_SUBMISSIVEGESTURE", + Self::VerbFetalposition => "VERB_FETALPOSITION", + Self::VerbSmearedintospiral => "VERB_SMEAREDINTOSPIRAL", + Self::VerbFalling => "VERB_FALLING", + Self::VerbDead => "VERB_DEAD", + Self::VerbLaughing => "VERB_LAUGHING", + Self::VerbLookingoffended => "VERB_LOOKINGOFFENDED", + Self::VerbBeingshot => "VERB_BEINGSHOT", + Self::VerbPlaintivegesture => "VERB_PLAINTIVEGESTURE", + Self::VerbMelting => "VERB_MELTING", + Self::VerbShooting => "VERB_SHOOTING", + Self::VerbTorturing => "VERB_TORTURING", + Self::VerbCommittingdepravedact => "VERB_COMMITTINGDEPRAVEDACT", + Self::VerbPraying => "VERB_PRAYING", + Self::VerbContemplating => "VERB_CONTEMPLATING", + Self::VerbCooking => "VERB_COOKING", + Self::VerbEngraving => "VERB_ENGRAVING", + Self::VerbProstrating => "VERB_PROSTRATING", + Self::VerbSuffering => "VERB_SUFFERING", + Self::VerbBeingimpaled => "VERB_BEINGIMPALED", + Self::VerbBeingcontorted => "VERB_BEINGCONTORTED", + Self::VerbBeingflayed => "VERB_BEINGFLAYED", + Self::VerbHangingfrom => "VERB_HANGINGFROM", + Self::VerbBeingmutilated => "VERB_BEINGMUTILATED", + Self::VerbTriumphantpose => "VERB_TRIUMPHANTPOSE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VERB_WITHERING" => Some(Self::VerbWithering), + "VERB_SURROUNDEDBY" => Some(Self::VerbSurroundedby), + "VERB_MASSACRING" => Some(Self::VerbMassacring), + "VERB_FIGHTING" => Some(Self::VerbFighting), + "VERB_LABORING" => Some(Self::VerbLaboring), + "VERB_GREETING" => Some(Self::VerbGreeting), + "VERB_REFUSING" => Some(Self::VerbRefusing), + "VERB_SPEAKING" => Some(Self::VerbSpeaking), + "VERB_EMBRACING" => Some(Self::VerbEmbracing), + "VERB_STRIKINGDOWN" => Some(Self::VerbStrikingdown), + "VERB_MENACINGPOSE" => Some(Self::VerbMenacingpose), + "VERB_TRAVELING" => Some(Self::VerbTraveling), + "VERB_RAISING" => Some(Self::VerbRaising), + "VERB_HIDING" => Some(Self::VerbHiding), + "VERB_LOOKINGCONFUSED" => Some(Self::VerbLookingconfused), + "VERB_LOOKINGTERRIFIED" => Some(Self::VerbLookingterrified), + "VERB_DEVOURING" => Some(Self::VerbDevouring), + "VERB_ADMIRING" => Some(Self::VerbAdmiring), + "VERB_BURNING" => Some(Self::VerbBurning), + "VERB_WEEPING" => Some(Self::VerbWeeping), + "VERB_LOOKINGDEJECTED" => Some(Self::VerbLookingdejected), + "VERB_CRINGING" => Some(Self::VerbCringing), + "VERB_SCREAMING" => Some(Self::VerbScreaming), + "VERB_SUBMISSIVEGESTURE" => Some(Self::VerbSubmissivegesture), + "VERB_FETALPOSITION" => Some(Self::VerbFetalposition), + "VERB_SMEAREDINTOSPIRAL" => Some(Self::VerbSmearedintospiral), + "VERB_FALLING" => Some(Self::VerbFalling), + "VERB_DEAD" => Some(Self::VerbDead), + "VERB_LAUGHING" => Some(Self::VerbLaughing), + "VERB_LOOKINGOFFENDED" => Some(Self::VerbLookingoffended), + "VERB_BEINGSHOT" => Some(Self::VerbBeingshot), + "VERB_PLAINTIVEGESTURE" => Some(Self::VerbPlaintivegesture), + "VERB_MELTING" => Some(Self::VerbMelting), + "VERB_SHOOTING" => Some(Self::VerbShooting), + "VERB_TORTURING" => Some(Self::VerbTorturing), + "VERB_COMMITTINGDEPRAVEDACT" => Some(Self::VerbCommittingdepravedact), + "VERB_PRAYING" => Some(Self::VerbPraying), + "VERB_CONTEMPLATING" => Some(Self::VerbContemplating), + "VERB_COOKING" => Some(Self::VerbCooking), + "VERB_ENGRAVING" => Some(Self::VerbEngraving), + "VERB_PROSTRATING" => Some(Self::VerbProstrating), + "VERB_SUFFERING" => Some(Self::VerbSuffering), + "VERB_BEINGIMPALED" => Some(Self::VerbBeingimpaled), + "VERB_BEINGCONTORTED" => Some(Self::VerbBeingcontorted), + "VERB_BEINGFLAYED" => Some(Self::VerbBeingflayed), + "VERB_HANGINGFROM" => Some(Self::VerbHangingfrom), + "VERB_BEINGMUTILATED" => Some(Self::VerbBeingmutilated), + "VERB_TRIUMPHANTPOSE" => Some(Self::VerbTriumphantpose), + _ => None, + } + } +} +#[derive(serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FlowType { + Miasma = 0, + Steam = 1, + Mist = 2, + MaterialDust = 3, + MagmaMist = 4, + Smoke = 5, + Dragonfire = 6, + Fire = 7, + Web = 8, + MaterialGas = 9, + MaterialVapor = 10, + OceanWave = 11, + SeaFoam = 12, + ItemCloud = 13, + CampFire = -1, +} +impl FlowType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Miasma => "Miasma", + Self::Steam => "Steam", + Self::Mist => "Mist", + Self::MaterialDust => "MaterialDust", + Self::MagmaMist => "MagmaMist", + Self::Smoke => "Smoke", + Self::Dragonfire => "Dragonfire", + Self::Fire => "Fire", + Self::Web => "Web", + Self::MaterialGas => "MaterialGas", + Self::MaterialVapor => "MaterialVapor", + Self::OceanWave => "OceanWave", + Self::SeaFoam => "SeaFoam", + Self::ItemCloud => "ItemCloud", + Self::CampFire => "CampFire", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Miasma" => Some(Self::Miasma), + "Steam" => Some(Self::Steam), + "Mist" => Some(Self::Mist), + "MaterialDust" => Some(Self::MaterialDust), + "MagmaMist" => Some(Self::MagmaMist), + "Smoke" => Some(Self::Smoke), + "Dragonfire" => Some(Self::Dragonfire), + "Fire" => Some(Self::Fire), + "Web" => Some(Self::Web), + "MaterialGas" => Some(Self::MaterialGas), + "MaterialVapor" => Some(Self::MaterialVapor), + "OceanWave" => Some(Self::OceanWave), + "SeaFoam" => Some(Self::SeaFoam), + "ItemCloud" => Some(Self::ItemCloud), + "CampFire" => Some(Self::CampFire), + _ => None, + } + } +} diff --git a/dfhack-proto/src/generated/messages/stockpiles.rs b/dfhack-proto/src/generated/messages/stockpiles.rs deleted file mode 100644 index d725b97..0000000 --- a/dfhack-proto/src/generated/messages/stockpiles.rs +++ /dev/null @@ -1,5661 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `stockpiles.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -// @@protoc_insertion_point(message:dfstockpiles.StockpileSettings) -#[derive(PartialEq,Clone,Default,Debug)] -pub struct StockpileSettings { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.max_barrels) - pub max_barrels: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.max_bins) - pub max_bins: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.max_wheelbarrows) - pub max_wheelbarrows: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.use_links_only) - pub use_links_only: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.allow_organic) - pub allow_organic: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.allow_inorganic) - pub allow_inorganic: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ammo) - pub ammo: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.animals) - pub animals: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.armor) - pub armor: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.barsblocks) - pub barsblocks: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.cloth) - pub cloth: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.coin) - pub coin: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.finished_goods) - pub finished_goods: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.food) - pub food: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.furniture) - pub furniture: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.gems) - pub gems: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.leather) - pub leather: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.corpses_v50) - pub corpses_v50: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.refuse) - pub refuse: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.sheet) - pub sheet: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.stone) - pub stone: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.weapons) - pub weapons: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.wood) - pub wood: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.corpses) - pub corpses: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ore) - pub ore: ::protobuf::MessageField, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.unknown1) - pub unknown1: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StockpileSettings { - fn default() -> &'a StockpileSettings { - ::default_instance() - } -} - -impl StockpileSettings { - pub fn new() -> StockpileSettings { - ::std::default::Default::default() - } - - // optional int32 max_barrels = 20; - - pub fn max_barrels(&self) -> i32 { - self.max_barrels.unwrap_or(0) - } - - pub fn clear_max_barrels(&mut self) { - self.max_barrels = ::std::option::Option::None; - } - - pub fn has_max_barrels(&self) -> bool { - self.max_barrels.is_some() - } - - // Param is passed by value, moved - pub fn set_max_barrels(&mut self, v: i32) { - self.max_barrels = ::std::option::Option::Some(v); - } - - // optional int32 max_bins = 21; - - pub fn max_bins(&self) -> i32 { - self.max_bins.unwrap_or(0) - } - - pub fn clear_max_bins(&mut self) { - self.max_bins = ::std::option::Option::None; - } - - pub fn has_max_bins(&self) -> bool { - self.max_bins.is_some() - } - - // Param is passed by value, moved - pub fn set_max_bins(&mut self, v: i32) { - self.max_bins = ::std::option::Option::Some(v); - } - - // optional int32 max_wheelbarrows = 22; - - pub fn max_wheelbarrows(&self) -> i32 { - self.max_wheelbarrows.unwrap_or(0) - } - - pub fn clear_max_wheelbarrows(&mut self) { - self.max_wheelbarrows = ::std::option::Option::None; - } - - pub fn has_max_wheelbarrows(&self) -> bool { - self.max_wheelbarrows.is_some() - } - - // Param is passed by value, moved - pub fn set_max_wheelbarrows(&mut self, v: i32) { - self.max_wheelbarrows = ::std::option::Option::Some(v); - } - - // optional bool use_links_only = 23; - - pub fn use_links_only(&self) -> bool { - self.use_links_only.unwrap_or(false) - } - - pub fn clear_use_links_only(&mut self) { - self.use_links_only = ::std::option::Option::None; - } - - pub fn has_use_links_only(&self) -> bool { - self.use_links_only.is_some() - } - - // Param is passed by value, moved - pub fn set_use_links_only(&mut self, v: bool) { - self.use_links_only = ::std::option::Option::Some(v); - } - - // optional bool allow_organic = 18; - - pub fn allow_organic(&self) -> bool { - self.allow_organic.unwrap_or(false) - } - - pub fn clear_allow_organic(&mut self) { - self.allow_organic = ::std::option::Option::None; - } - - pub fn has_allow_organic(&self) -> bool { - self.allow_organic.is_some() - } - - // Param is passed by value, moved - pub fn set_allow_organic(&mut self, v: bool) { - self.allow_organic = ::std::option::Option::Some(v); - } - - // optional bool allow_inorganic = 19; - - pub fn allow_inorganic(&self) -> bool { - self.allow_inorganic.unwrap_or(false) - } - - pub fn clear_allow_inorganic(&mut self) { - self.allow_inorganic = ::std::option::Option::None; - } - - pub fn has_allow_inorganic(&self) -> bool { - self.allow_inorganic.is_some() - } - - // Param is passed by value, moved - pub fn set_allow_inorganic(&mut self, v: bool) { - self.allow_inorganic = ::std::option::Option::Some(v); - } - - // optional bool corpses = 24; - - pub fn corpses(&self) -> bool { - self.corpses.unwrap_or(false) - } - - pub fn clear_corpses(&mut self) { - self.corpses = ::std::option::Option::None; - } - - pub fn has_corpses(&self) -> bool { - self.corpses.is_some() - } - - // Param is passed by value, moved - pub fn set_corpses(&mut self, v: bool) { - self.corpses = ::std::option::Option::Some(v); - } - - // optional int32 unknown1 = 4; - - pub fn unknown1(&self) -> i32 { - self.unknown1.unwrap_or(0) - } - - pub fn clear_unknown1(&mut self) { - self.unknown1 = ::std::option::Option::None; - } - - pub fn has_unknown1(&self) -> bool { - self.unknown1.is_some() - } - - // Param is passed by value, moved - pub fn set_unknown1(&mut self, v: i32) { - self.unknown1 = ::std::option::Option::Some(v); - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(26); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_barrels", - |m: &StockpileSettings| { &m.max_barrels }, - |m: &mut StockpileSettings| { &mut m.max_barrels }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_bins", - |m: &StockpileSettings| { &m.max_bins }, - |m: &mut StockpileSettings| { &mut m.max_bins }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "max_wheelbarrows", - |m: &StockpileSettings| { &m.max_wheelbarrows }, - |m: &mut StockpileSettings| { &mut m.max_wheelbarrows }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "use_links_only", - |m: &StockpileSettings| { &m.use_links_only }, - |m: &mut StockpileSettings| { &mut m.use_links_only }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "allow_organic", - |m: &StockpileSettings| { &m.allow_organic }, - |m: &mut StockpileSettings| { &mut m.allow_organic }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "allow_inorganic", - |m: &StockpileSettings| { &m.allow_inorganic }, - |m: &mut StockpileSettings| { &mut m.allow_inorganic }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::AmmoSet>( - "ammo", - |m: &StockpileSettings| { &m.ammo }, - |m: &mut StockpileSettings| { &mut m.ammo }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::AnimalsSet>( - "animals", - |m: &StockpileSettings| { &m.animals }, - |m: &mut StockpileSettings| { &mut m.animals }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::ArmorSet>( - "armor", - |m: &StockpileSettings| { &m.armor }, - |m: &mut StockpileSettings| { &mut m.armor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::BarsBlocksSet>( - "barsblocks", - |m: &StockpileSettings| { &m.barsblocks }, - |m: &mut StockpileSettings| { &mut m.barsblocks }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::ClothSet>( - "cloth", - |m: &StockpileSettings| { &m.cloth }, - |m: &mut StockpileSettings| { &mut m.cloth }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::CoinSet>( - "coin", - |m: &StockpileSettings| { &m.coin }, - |m: &mut StockpileSettings| { &mut m.coin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::FinishedGoodsSet>( - "finished_goods", - |m: &StockpileSettings| { &m.finished_goods }, - |m: &mut StockpileSettings| { &mut m.finished_goods }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::FoodSet>( - "food", - |m: &StockpileSettings| { &m.food }, - |m: &mut StockpileSettings| { &mut m.food }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::FurnitureSet>( - "furniture", - |m: &StockpileSettings| { &m.furniture }, - |m: &mut StockpileSettings| { &mut m.furniture }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::GemsSet>( - "gems", - |m: &StockpileSettings| { &m.gems }, - |m: &mut StockpileSettings| { &mut m.gems }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::LeatherSet>( - "leather", - |m: &StockpileSettings| { &m.leather }, - |m: &mut StockpileSettings| { &mut m.leather }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::CorpsesSet>( - "corpses_v50", - |m: &StockpileSettings| { &m.corpses_v50 }, - |m: &mut StockpileSettings| { &mut m.corpses_v50 }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::RefuseSet>( - "refuse", - |m: &StockpileSettings| { &m.refuse }, - |m: &mut StockpileSettings| { &mut m.refuse }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::SheetSet>( - "sheet", - |m: &StockpileSettings| { &m.sheet }, - |m: &mut StockpileSettings| { &mut m.sheet }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::StoneSet>( - "stone", - |m: &StockpileSettings| { &m.stone }, - |m: &mut StockpileSettings| { &mut m.stone }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::WeaponsSet>( - "weapons", - |m: &StockpileSettings| { &m.weapons }, - |m: &mut StockpileSettings| { &mut m.weapons }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::WoodSet>( - "wood", - |m: &StockpileSettings| { &m.wood }, - |m: &mut StockpileSettings| { &mut m.wood }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "corpses", - |m: &StockpileSettings| { &m.corpses }, - |m: &mut StockpileSettings| { &mut m.corpses }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, stockpile_settings::OreSet>( - "ore", - |m: &StockpileSettings| { &m.ore }, - |m: &mut StockpileSettings| { &mut m.ore }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unknown1", - |m: &StockpileSettings| { &m.unknown1 }, - |m: &mut StockpileSettings| { &mut m.unknown1 }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StockpileSettings { - const NAME: &'static str = "StockpileSettings"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 160 => { - self.max_barrels = ::std::option::Option::Some(is.read_int32()?); - }, - 168 => { - self.max_bins = ::std::option::Option::Some(is.read_int32()?); - }, - 176 => { - self.max_wheelbarrows = ::std::option::Option::Some(is.read_int32()?); - }, - 184 => { - self.use_links_only = ::std::option::Option::Some(is.read_bool()?); - }, - 144 => { - self.allow_organic = ::std::option::Option::Some(is.read_bool()?); - }, - 152 => { - self.allow_inorganic = ::std::option::Option::Some(is.read_bool()?); - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.ammo)?; - }, - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.animals)?; - }, - 138 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.armor)?; - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.barsblocks)?; - }, - 114 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.cloth)?; - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.coin)?; - }, - 98 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.finished_goods)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.food)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.furniture)?; - }, - 90 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.gems)?; - }, - 106 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.leather)?; - }, - 202 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.corpses_v50)?; - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.refuse)?; - }, - 210 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.sheet)?; - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.stone)?; - }, - 130 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.weapons)?; - }, - 122 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.wood)?; - }, - 192 => { - self.corpses = ::std::option::Option::Some(is.read_bool()?); - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.ore)?; - }, - 32 => { - self.unknown1 = ::std::option::Option::Some(is.read_int32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.max_barrels { - my_size += ::protobuf::rt::int32_size(20, v); - } - if let Some(v) = self.max_bins { - my_size += ::protobuf::rt::int32_size(21, v); - } - if let Some(v) = self.max_wheelbarrows { - my_size += ::protobuf::rt::int32_size(22, v); - } - if let Some(v) = self.use_links_only { - my_size += 2 + 1; - } - if let Some(v) = self.allow_organic { - my_size += 2 + 1; - } - if let Some(v) = self.allow_inorganic { - my_size += 2 + 1; - } - if let Some(v) = self.ammo.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.animals.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.armor.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.barsblocks.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.cloth.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.coin.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.finished_goods.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.food.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.furniture.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.gems.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.leather.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.corpses_v50.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.refuse.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.sheet.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.stone.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.weapons.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.wood.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.corpses { - my_size += 2 + 1; - } - if let Some(v) = self.ore.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.unknown1 { - my_size += ::protobuf::rt::int32_size(4, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.max_barrels { - os.write_int32(20, v)?; - } - if let Some(v) = self.max_bins { - os.write_int32(21, v)?; - } - if let Some(v) = self.max_wheelbarrows { - os.write_int32(22, v)?; - } - if let Some(v) = self.use_links_only { - os.write_bool(23, v)?; - } - if let Some(v) = self.allow_organic { - os.write_bool(18, v)?; - } - if let Some(v) = self.allow_inorganic { - os.write_bool(19, v)?; - } - if let Some(v) = self.ammo.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - if let Some(v) = self.animals.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.armor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(17, v, os)?; - } - if let Some(v) = self.barsblocks.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - if let Some(v) = self.cloth.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(14, v, os)?; - } - if let Some(v) = self.coin.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if let Some(v) = self.finished_goods.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - } - if let Some(v) = self.food.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.furniture.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.gems.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; - } - if let Some(v) = self.leather.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?; - } - if let Some(v) = self.corpses_v50.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(25, v, os)?; - } - if let Some(v) = self.refuse.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.sheet.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(26, v, os)?; - } - if let Some(v) = self.stone.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - if let Some(v) = self.weapons.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?; - } - if let Some(v) = self.wood.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(15, v, os)?; - } - if let Some(v) = self.corpses { - os.write_bool(24, v)?; - } - if let Some(v) = self.ore.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - if let Some(v) = self.unknown1 { - os.write_int32(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StockpileSettings { - StockpileSettings::new() - } - - fn clear(&mut self) { - self.max_barrels = ::std::option::Option::None; - self.max_bins = ::std::option::Option::None; - self.max_wheelbarrows = ::std::option::Option::None; - self.use_links_only = ::std::option::Option::None; - self.allow_organic = ::std::option::Option::None; - self.allow_inorganic = ::std::option::Option::None; - self.ammo.clear(); - self.animals.clear(); - self.armor.clear(); - self.barsblocks.clear(); - self.cloth.clear(); - self.coin.clear(); - self.finished_goods.clear(); - self.food.clear(); - self.furniture.clear(); - self.gems.clear(); - self.leather.clear(); - self.corpses_v50.clear(); - self.refuse.clear(); - self.sheet.clear(); - self.stone.clear(); - self.weapons.clear(); - self.wood.clear(); - self.corpses = ::std::option::Option::None; - self.ore.clear(); - self.unknown1 = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static StockpileSettings { - static instance: StockpileSettings = StockpileSettings { - max_barrels: ::std::option::Option::None, - max_bins: ::std::option::Option::None, - max_wheelbarrows: ::std::option::Option::None, - use_links_only: ::std::option::Option::None, - allow_organic: ::std::option::Option::None, - allow_inorganic: ::std::option::Option::None, - ammo: ::protobuf::MessageField::none(), - animals: ::protobuf::MessageField::none(), - armor: ::protobuf::MessageField::none(), - barsblocks: ::protobuf::MessageField::none(), - cloth: ::protobuf::MessageField::none(), - coin: ::protobuf::MessageField::none(), - finished_goods: ::protobuf::MessageField::none(), - food: ::protobuf::MessageField::none(), - furniture: ::protobuf::MessageField::none(), - gems: ::protobuf::MessageField::none(), - leather: ::protobuf::MessageField::none(), - corpses_v50: ::protobuf::MessageField::none(), - refuse: ::protobuf::MessageField::none(), - sheet: ::protobuf::MessageField::none(), - stone: ::protobuf::MessageField::none(), - weapons: ::protobuf::MessageField::none(), - wood: ::protobuf::MessageField::none(), - corpses: ::std::option::Option::None, - ore: ::protobuf::MessageField::none(), - unknown1: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StockpileSettings { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StockpileSettings").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StockpileSettings { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StockpileSettings { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `StockpileSettings` -pub mod stockpile_settings { - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.AnimalsSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct AnimalsSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AnimalsSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AnimalsSet.empty_cages) - pub empty_cages: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AnimalsSet.empty_traps) - pub empty_traps: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AnimalsSet.enabled) - pub enabled: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.AnimalsSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a AnimalsSet { - fn default() -> &'a AnimalsSet { - ::default_instance() - } - } - - impl AnimalsSet { - pub fn new() -> AnimalsSet { - ::std::default::Default::default() - } - - // optional bool all = 4; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool empty_cages = 1; - - pub fn empty_cages(&self) -> bool { - self.empty_cages.unwrap_or(false) - } - - pub fn clear_empty_cages(&mut self) { - self.empty_cages = ::std::option::Option::None; - } - - pub fn has_empty_cages(&self) -> bool { - self.empty_cages.is_some() - } - - // Param is passed by value, moved - pub fn set_empty_cages(&mut self, v: bool) { - self.empty_cages = ::std::option::Option::Some(v); - } - - // optional bool empty_traps = 2; - - pub fn empty_traps(&self) -> bool { - self.empty_traps.unwrap_or(false) - } - - pub fn clear_empty_traps(&mut self) { - self.empty_traps = ::std::option::Option::None; - } - - pub fn has_empty_traps(&self) -> bool { - self.empty_traps.is_some() - } - - // Param is passed by value, moved - pub fn set_empty_traps(&mut self, v: bool) { - self.empty_traps = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &AnimalsSet| { &m.all }, - |m: &mut AnimalsSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "empty_cages", - |m: &AnimalsSet| { &m.empty_cages }, - |m: &mut AnimalsSet| { &mut m.empty_cages }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "empty_traps", - |m: &AnimalsSet| { &m.empty_traps }, - |m: &mut AnimalsSet| { &mut m.empty_traps }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "enabled", - |m: &AnimalsSet| { &m.enabled }, - |m: &mut AnimalsSet| { &mut m.enabled }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.AnimalsSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for AnimalsSet { - const NAME: &'static str = "AnimalsSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 32 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 8 => { - self.empty_cages = ::std::option::Option::Some(is.read_bool()?); - }, - 16 => { - self.empty_traps = ::std::option::Option::Some(is.read_bool()?); - }, - 26 => { - self.enabled.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - if let Some(v) = self.empty_cages { - my_size += 1 + 1; - } - if let Some(v) = self.empty_traps { - my_size += 1 + 1; - } - for value in &self.enabled { - my_size += ::protobuf::rt::string_size(3, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(4, v)?; - } - if let Some(v) = self.empty_cages { - os.write_bool(1, v)?; - } - if let Some(v) = self.empty_traps { - os.write_bool(2, v)?; - } - for v in &self.enabled { - os.write_string(3, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AnimalsSet { - AnimalsSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.empty_cages = ::std::option::Option::None; - self.empty_traps = ::std::option::Option::None; - self.enabled.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AnimalsSet { - static instance: AnimalsSet = AnimalsSet { - all: ::std::option::Option::None, - empty_cages: ::std::option::Option::None, - empty_traps: ::std::option::Option::None, - enabled: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for AnimalsSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.AnimalsSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for AnimalsSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for AnimalsSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.FoodSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct FoodSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.meat) - pub meat: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.fish) - pub fish: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.unprepared_fish) - pub unprepared_fish: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.egg) - pub egg: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.plants) - pub plants: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.drink_plant) - pub drink_plant: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.drink_animal) - pub drink_animal: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.cheese_plant) - pub cheese_plant: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.cheese_animal) - pub cheese_animal: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.seeds) - pub seeds: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.leaves) - pub leaves: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.powder_plant) - pub powder_plant: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.powder_creature) - pub powder_creature: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.glob) - pub glob: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.glob_paste) - pub glob_paste: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.glob_pressed) - pub glob_pressed: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.liquid_plant) - pub liquid_plant: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.liquid_animal) - pub liquid_animal: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.liquid_misc) - pub liquid_misc: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FoodSet.prepared_meals) - pub prepared_meals: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.FoodSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a FoodSet { - fn default() -> &'a FoodSet { - ::default_instance() - } - } - - impl FoodSet { - pub fn new() -> FoodSet { - ::std::default::Default::default() - } - - // optional bool all = 21; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool prepared_meals = 19; - - pub fn prepared_meals(&self) -> bool { - self.prepared_meals.unwrap_or(false) - } - - pub fn clear_prepared_meals(&mut self) { - self.prepared_meals = ::std::option::Option::None; - } - - pub fn has_prepared_meals(&self) -> bool { - self.prepared_meals.is_some() - } - - // Param is passed by value, moved - pub fn set_prepared_meals(&mut self, v: bool) { - self.prepared_meals = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(21); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &FoodSet| { &m.all }, - |m: &mut FoodSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "meat", - |m: &FoodSet| { &m.meat }, - |m: &mut FoodSet| { &mut m.meat }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "fish", - |m: &FoodSet| { &m.fish }, - |m: &mut FoodSet| { &mut m.fish }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "unprepared_fish", - |m: &FoodSet| { &m.unprepared_fish }, - |m: &mut FoodSet| { &mut m.unprepared_fish }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "egg", - |m: &FoodSet| { &m.egg }, - |m: &mut FoodSet| { &mut m.egg }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "plants", - |m: &FoodSet| { &m.plants }, - |m: &mut FoodSet| { &mut m.plants }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "drink_plant", - |m: &FoodSet| { &m.drink_plant }, - |m: &mut FoodSet| { &mut m.drink_plant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "drink_animal", - |m: &FoodSet| { &m.drink_animal }, - |m: &mut FoodSet| { &mut m.drink_animal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cheese_plant", - |m: &FoodSet| { &m.cheese_plant }, - |m: &mut FoodSet| { &mut m.cheese_plant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cheese_animal", - |m: &FoodSet| { &m.cheese_animal }, - |m: &mut FoodSet| { &mut m.cheese_animal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "seeds", - |m: &FoodSet| { &m.seeds }, - |m: &mut FoodSet| { &mut m.seeds }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "leaves", - |m: &FoodSet| { &m.leaves }, - |m: &mut FoodSet| { &mut m.leaves }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "powder_plant", - |m: &FoodSet| { &m.powder_plant }, - |m: &mut FoodSet| { &mut m.powder_plant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "powder_creature", - |m: &FoodSet| { &m.powder_creature }, - |m: &mut FoodSet| { &mut m.powder_creature }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "glob", - |m: &FoodSet| { &m.glob }, - |m: &mut FoodSet| { &mut m.glob }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "glob_paste", - |m: &FoodSet| { &m.glob_paste }, - |m: &mut FoodSet| { &mut m.glob_paste }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "glob_pressed", - |m: &FoodSet| { &m.glob_pressed }, - |m: &mut FoodSet| { &mut m.glob_pressed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "liquid_plant", - |m: &FoodSet| { &m.liquid_plant }, - |m: &mut FoodSet| { &mut m.liquid_plant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "liquid_animal", - |m: &FoodSet| { &m.liquid_animal }, - |m: &mut FoodSet| { &mut m.liquid_animal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "liquid_misc", - |m: &FoodSet| { &m.liquid_misc }, - |m: &mut FoodSet| { &mut m.liquid_misc }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "prepared_meals", - |m: &FoodSet| { &m.prepared_meals }, - |m: &mut FoodSet| { &mut m.prepared_meals }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.FoodSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for FoodSet { - const NAME: &'static str = "FoodSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 168 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.meat.push(is.read_string()?); - }, - 18 => { - self.fish.push(is.read_string()?); - }, - 162 => { - self.unprepared_fish.push(is.read_string()?); - }, - 26 => { - self.egg.push(is.read_string()?); - }, - 34 => { - self.plants.push(is.read_string()?); - }, - 42 => { - self.drink_plant.push(is.read_string()?); - }, - 50 => { - self.drink_animal.push(is.read_string()?); - }, - 58 => { - self.cheese_plant.push(is.read_string()?); - }, - 66 => { - self.cheese_animal.push(is.read_string()?); - }, - 74 => { - self.seeds.push(is.read_string()?); - }, - 82 => { - self.leaves.push(is.read_string()?); - }, - 90 => { - self.powder_plant.push(is.read_string()?); - }, - 98 => { - self.powder_creature.push(is.read_string()?); - }, - 106 => { - self.glob.push(is.read_string()?); - }, - 114 => { - self.glob_paste.push(is.read_string()?); - }, - 122 => { - self.glob_pressed.push(is.read_string()?); - }, - 130 => { - self.liquid_plant.push(is.read_string()?); - }, - 138 => { - self.liquid_animal.push(is.read_string()?); - }, - 146 => { - self.liquid_misc.push(is.read_string()?); - }, - 152 => { - self.prepared_meals = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 2 + 1; - } - for value in &self.meat { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.fish { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.unprepared_fish { - my_size += ::protobuf::rt::string_size(20, &value); - }; - for value in &self.egg { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.plants { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.drink_plant { - my_size += ::protobuf::rt::string_size(5, &value); - }; - for value in &self.drink_animal { - my_size += ::protobuf::rt::string_size(6, &value); - }; - for value in &self.cheese_plant { - my_size += ::protobuf::rt::string_size(7, &value); - }; - for value in &self.cheese_animal { - my_size += ::protobuf::rt::string_size(8, &value); - }; - for value in &self.seeds { - my_size += ::protobuf::rt::string_size(9, &value); - }; - for value in &self.leaves { - my_size += ::protobuf::rt::string_size(10, &value); - }; - for value in &self.powder_plant { - my_size += ::protobuf::rt::string_size(11, &value); - }; - for value in &self.powder_creature { - my_size += ::protobuf::rt::string_size(12, &value); - }; - for value in &self.glob { - my_size += ::protobuf::rt::string_size(13, &value); - }; - for value in &self.glob_paste { - my_size += ::protobuf::rt::string_size(14, &value); - }; - for value in &self.glob_pressed { - my_size += ::protobuf::rt::string_size(15, &value); - }; - for value in &self.liquid_plant { - my_size += ::protobuf::rt::string_size(16, &value); - }; - for value in &self.liquid_animal { - my_size += ::protobuf::rt::string_size(17, &value); - }; - for value in &self.liquid_misc { - my_size += ::protobuf::rt::string_size(18, &value); - }; - if let Some(v) = self.prepared_meals { - my_size += 2 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(21, v)?; - } - for v in &self.meat { - os.write_string(1, &v)?; - }; - for v in &self.fish { - os.write_string(2, &v)?; - }; - for v in &self.unprepared_fish { - os.write_string(20, &v)?; - }; - for v in &self.egg { - os.write_string(3, &v)?; - }; - for v in &self.plants { - os.write_string(4, &v)?; - }; - for v in &self.drink_plant { - os.write_string(5, &v)?; - }; - for v in &self.drink_animal { - os.write_string(6, &v)?; - }; - for v in &self.cheese_plant { - os.write_string(7, &v)?; - }; - for v in &self.cheese_animal { - os.write_string(8, &v)?; - }; - for v in &self.seeds { - os.write_string(9, &v)?; - }; - for v in &self.leaves { - os.write_string(10, &v)?; - }; - for v in &self.powder_plant { - os.write_string(11, &v)?; - }; - for v in &self.powder_creature { - os.write_string(12, &v)?; - }; - for v in &self.glob { - os.write_string(13, &v)?; - }; - for v in &self.glob_paste { - os.write_string(14, &v)?; - }; - for v in &self.glob_pressed { - os.write_string(15, &v)?; - }; - for v in &self.liquid_plant { - os.write_string(16, &v)?; - }; - for v in &self.liquid_animal { - os.write_string(17, &v)?; - }; - for v in &self.liquid_misc { - os.write_string(18, &v)?; - }; - if let Some(v) = self.prepared_meals { - os.write_bool(19, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FoodSet { - FoodSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.meat.clear(); - self.fish.clear(); - self.unprepared_fish.clear(); - self.egg.clear(); - self.plants.clear(); - self.drink_plant.clear(); - self.drink_animal.clear(); - self.cheese_plant.clear(); - self.cheese_animal.clear(); - self.seeds.clear(); - self.leaves.clear(); - self.powder_plant.clear(); - self.powder_creature.clear(); - self.glob.clear(); - self.glob_paste.clear(); - self.glob_pressed.clear(); - self.liquid_plant.clear(); - self.liquid_animal.clear(); - self.liquid_misc.clear(); - self.prepared_meals = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static FoodSet { - static instance: FoodSet = FoodSet { - all: ::std::option::Option::None, - meat: ::std::vec::Vec::new(), - fish: ::std::vec::Vec::new(), - unprepared_fish: ::std::vec::Vec::new(), - egg: ::std::vec::Vec::new(), - plants: ::std::vec::Vec::new(), - drink_plant: ::std::vec::Vec::new(), - drink_animal: ::std::vec::Vec::new(), - cheese_plant: ::std::vec::Vec::new(), - cheese_animal: ::std::vec::Vec::new(), - seeds: ::std::vec::Vec::new(), - leaves: ::std::vec::Vec::new(), - powder_plant: ::std::vec::Vec::new(), - powder_creature: ::std::vec::Vec::new(), - glob: ::std::vec::Vec::new(), - glob_paste: ::std::vec::Vec::new(), - glob_pressed: ::std::vec::Vec::new(), - liquid_plant: ::std::vec::Vec::new(), - liquid_animal: ::std::vec::Vec::new(), - liquid_misc: ::std::vec::Vec::new(), - prepared_meals: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for FoodSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.FoodSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for FoodSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for FoodSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.FurnitureSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct FurnitureSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FurnitureSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FurnitureSet.type) - pub type_: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FurnitureSet.other_mats) - pub other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FurnitureSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FurnitureSet.quality_core) - pub quality_core: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FurnitureSet.quality_total) - pub quality_total: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.FurnitureSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a FurnitureSet { - fn default() -> &'a FurnitureSet { - ::default_instance() - } - } - - impl FurnitureSet { - pub fn new() -> FurnitureSet { - ::std::default::Default::default() - } - - // optional bool all = 7; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &FurnitureSet| { &m.all }, - |m: &mut FurnitureSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "type", - |m: &FurnitureSet| { &m.type_ }, - |m: &mut FurnitureSet| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "other_mats", - |m: &FurnitureSet| { &m.other_mats }, - |m: &mut FurnitureSet| { &mut m.other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &FurnitureSet| { &m.mats }, - |m: &mut FurnitureSet| { &mut m.mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_core", - |m: &FurnitureSet| { &m.quality_core }, - |m: &mut FurnitureSet| { &mut m.quality_core }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_total", - |m: &FurnitureSet| { &m.quality_total }, - |m: &mut FurnitureSet| { &mut m.quality_total }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.FurnitureSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for FurnitureSet { - const NAME: &'static str = "FurnitureSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 56 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.type_.push(is.read_string()?); - }, - 18 => { - self.other_mats.push(is.read_string()?); - }, - 26 => { - self.mats.push(is.read_string()?); - }, - 34 => { - self.quality_core.push(is.read_string()?); - }, - 42 => { - self.quality_total.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.type_ { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.other_mats { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.mats { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.quality_core { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.quality_total { - my_size += ::protobuf::rt::string_size(5, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(7, v)?; - } - for v in &self.type_ { - os.write_string(1, &v)?; - }; - for v in &self.other_mats { - os.write_string(2, &v)?; - }; - for v in &self.mats { - os.write_string(3, &v)?; - }; - for v in &self.quality_core { - os.write_string(4, &v)?; - }; - for v in &self.quality_total { - os.write_string(5, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FurnitureSet { - FurnitureSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.type_.clear(); - self.other_mats.clear(); - self.mats.clear(); - self.quality_core.clear(); - self.quality_total.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FurnitureSet { - static instance: FurnitureSet = FurnitureSet { - all: ::std::option::Option::None, - type_: ::std::vec::Vec::new(), - other_mats: ::std::vec::Vec::new(), - mats: ::std::vec::Vec::new(), - quality_core: ::std::vec::Vec::new(), - quality_total: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for FurnitureSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.FurnitureSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for FurnitureSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for FurnitureSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.RefuseSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct RefuseSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.type) - pub type_: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.corpses) - pub corpses: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.body_parts) - pub body_parts: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.skulls) - pub skulls: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.bones) - pub bones: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.hair) - pub hair: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.shells) - pub shells: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.teeth) - pub teeth: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.horns) - pub horns: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.fresh_raw_hide) - pub fresh_raw_hide: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.RefuseSet.rotten_raw_hide) - pub rotten_raw_hide: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.RefuseSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a RefuseSet { - fn default() -> &'a RefuseSet { - ::default_instance() - } - } - - impl RefuseSet { - pub fn new() -> RefuseSet { - ::std::default::Default::default() - } - - // optional bool all = 12; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool fresh_raw_hide = 10; - - pub fn fresh_raw_hide(&self) -> bool { - self.fresh_raw_hide.unwrap_or(false) - } - - pub fn clear_fresh_raw_hide(&mut self) { - self.fresh_raw_hide = ::std::option::Option::None; - } - - pub fn has_fresh_raw_hide(&self) -> bool { - self.fresh_raw_hide.is_some() - } - - // Param is passed by value, moved - pub fn set_fresh_raw_hide(&mut self, v: bool) { - self.fresh_raw_hide = ::std::option::Option::Some(v); - } - - // optional bool rotten_raw_hide = 11; - - pub fn rotten_raw_hide(&self) -> bool { - self.rotten_raw_hide.unwrap_or(false) - } - - pub fn clear_rotten_raw_hide(&mut self) { - self.rotten_raw_hide = ::std::option::Option::None; - } - - pub fn has_rotten_raw_hide(&self) -> bool { - self.rotten_raw_hide.is_some() - } - - // Param is passed by value, moved - pub fn set_rotten_raw_hide(&mut self, v: bool) { - self.rotten_raw_hide = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(12); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &RefuseSet| { &m.all }, - |m: &mut RefuseSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "type", - |m: &RefuseSet| { &m.type_ }, - |m: &mut RefuseSet| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "corpses", - |m: &RefuseSet| { &m.corpses }, - |m: &mut RefuseSet| { &mut m.corpses }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "body_parts", - |m: &RefuseSet| { &m.body_parts }, - |m: &mut RefuseSet| { &mut m.body_parts }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "skulls", - |m: &RefuseSet| { &m.skulls }, - |m: &mut RefuseSet| { &mut m.skulls }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "bones", - |m: &RefuseSet| { &m.bones }, - |m: &mut RefuseSet| { &mut m.bones }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "hair", - |m: &RefuseSet| { &m.hair }, - |m: &mut RefuseSet| { &mut m.hair }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "shells", - |m: &RefuseSet| { &m.shells }, - |m: &mut RefuseSet| { &mut m.shells }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "teeth", - |m: &RefuseSet| { &m.teeth }, - |m: &mut RefuseSet| { &mut m.teeth }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "horns", - |m: &RefuseSet| { &m.horns }, - |m: &mut RefuseSet| { &mut m.horns }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "fresh_raw_hide", - |m: &RefuseSet| { &m.fresh_raw_hide }, - |m: &mut RefuseSet| { &mut m.fresh_raw_hide }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "rotten_raw_hide", - |m: &RefuseSet| { &m.rotten_raw_hide }, - |m: &mut RefuseSet| { &mut m.rotten_raw_hide }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.RefuseSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for RefuseSet { - const NAME: &'static str = "RefuseSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 96 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.type_.push(is.read_string()?); - }, - 18 => { - self.corpses.push(is.read_string()?); - }, - 26 => { - self.body_parts.push(is.read_string()?); - }, - 34 => { - self.skulls.push(is.read_string()?); - }, - 42 => { - self.bones.push(is.read_string()?); - }, - 50 => { - self.hair.push(is.read_string()?); - }, - 58 => { - self.shells.push(is.read_string()?); - }, - 66 => { - self.teeth.push(is.read_string()?); - }, - 74 => { - self.horns.push(is.read_string()?); - }, - 80 => { - self.fresh_raw_hide = ::std::option::Option::Some(is.read_bool()?); - }, - 88 => { - self.rotten_raw_hide = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.type_ { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.corpses { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.body_parts { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.skulls { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.bones { - my_size += ::protobuf::rt::string_size(5, &value); - }; - for value in &self.hair { - my_size += ::protobuf::rt::string_size(6, &value); - }; - for value in &self.shells { - my_size += ::protobuf::rt::string_size(7, &value); - }; - for value in &self.teeth { - my_size += ::protobuf::rt::string_size(8, &value); - }; - for value in &self.horns { - my_size += ::protobuf::rt::string_size(9, &value); - }; - if let Some(v) = self.fresh_raw_hide { - my_size += 1 + 1; - } - if let Some(v) = self.rotten_raw_hide { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(12, v)?; - } - for v in &self.type_ { - os.write_string(1, &v)?; - }; - for v in &self.corpses { - os.write_string(2, &v)?; - }; - for v in &self.body_parts { - os.write_string(3, &v)?; - }; - for v in &self.skulls { - os.write_string(4, &v)?; - }; - for v in &self.bones { - os.write_string(5, &v)?; - }; - for v in &self.hair { - os.write_string(6, &v)?; - }; - for v in &self.shells { - os.write_string(7, &v)?; - }; - for v in &self.teeth { - os.write_string(8, &v)?; - }; - for v in &self.horns { - os.write_string(9, &v)?; - }; - if let Some(v) = self.fresh_raw_hide { - os.write_bool(10, v)?; - } - if let Some(v) = self.rotten_raw_hide { - os.write_bool(11, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RefuseSet { - RefuseSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.type_.clear(); - self.corpses.clear(); - self.body_parts.clear(); - self.skulls.clear(); - self.bones.clear(); - self.hair.clear(); - self.shells.clear(); - self.teeth.clear(); - self.horns.clear(); - self.fresh_raw_hide = ::std::option::Option::None; - self.rotten_raw_hide = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RefuseSet { - static instance: RefuseSet = RefuseSet { - all: ::std::option::Option::None, - type_: ::std::vec::Vec::new(), - corpses: ::std::vec::Vec::new(), - body_parts: ::std::vec::Vec::new(), - skulls: ::std::vec::Vec::new(), - bones: ::std::vec::Vec::new(), - hair: ::std::vec::Vec::new(), - shells: ::std::vec::Vec::new(), - teeth: ::std::vec::Vec::new(), - horns: ::std::vec::Vec::new(), - fresh_raw_hide: ::std::option::Option::None, - rotten_raw_hide: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for RefuseSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.RefuseSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for RefuseSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for RefuseSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.StoneSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct StoneSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.StoneSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.StoneSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.StoneSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a StoneSet { - fn default() -> &'a StoneSet { - ::default_instance() - } - } - - impl StoneSet { - pub fn new() -> StoneSet { - ::std::default::Default::default() - } - - // optional bool all = 2; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &StoneSet| { &m.all }, - |m: &mut StoneSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &StoneSet| { &m.mats }, - |m: &mut StoneSet| { &mut m.mats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.StoneSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for StoneSet { - const NAME: &'static str = "StoneSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 16 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.mats.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(2, v)?; - } - for v in &self.mats { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StoneSet { - StoneSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.mats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StoneSet { - static instance: StoneSet = StoneSet { - all: ::std::option::Option::None, - mats: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for StoneSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.StoneSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for StoneSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for StoneSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.OreSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct OreSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.OreSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.OreSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a OreSet { - fn default() -> &'a OreSet { - ::default_instance() - } - } - - impl OreSet { - pub fn new() -> OreSet { - ::std::default::Default::default() - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &OreSet| { &m.mats }, - |m: &mut OreSet| { &mut m.mats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.OreSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for OreSet { - const NAME: &'static str = "OreSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.mats.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.mats { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> OreSet { - OreSet::new() - } - - fn clear(&mut self) { - self.mats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static OreSet { - static instance: OreSet = OreSet { - mats: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for OreSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.OreSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for OreSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for OreSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.AmmoSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct AmmoSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AmmoSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AmmoSet.type) - pub type_: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AmmoSet.other_mats) - pub other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AmmoSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AmmoSet.quality_core) - pub quality_core: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.AmmoSet.quality_total) - pub quality_total: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.AmmoSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a AmmoSet { - fn default() -> &'a AmmoSet { - ::default_instance() - } - } - - impl AmmoSet { - pub fn new() -> AmmoSet { - ::std::default::Default::default() - } - - // optional bool all = 6; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &AmmoSet| { &m.all }, - |m: &mut AmmoSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "type", - |m: &AmmoSet| { &m.type_ }, - |m: &mut AmmoSet| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "other_mats", - |m: &AmmoSet| { &m.other_mats }, - |m: &mut AmmoSet| { &mut m.other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &AmmoSet| { &m.mats }, - |m: &mut AmmoSet| { &mut m.mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_core", - |m: &AmmoSet| { &m.quality_core }, - |m: &mut AmmoSet| { &mut m.quality_core }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_total", - |m: &AmmoSet| { &m.quality_total }, - |m: &mut AmmoSet| { &mut m.quality_total }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.AmmoSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for AmmoSet { - const NAME: &'static str = "AmmoSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 48 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.type_.push(is.read_string()?); - }, - 18 => { - self.other_mats.push(is.read_string()?); - }, - 26 => { - self.mats.push(is.read_string()?); - }, - 34 => { - self.quality_core.push(is.read_string()?); - }, - 42 => { - self.quality_total.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.type_ { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.other_mats { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.mats { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.quality_core { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.quality_total { - my_size += ::protobuf::rt::string_size(5, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(6, v)?; - } - for v in &self.type_ { - os.write_string(1, &v)?; - }; - for v in &self.other_mats { - os.write_string(2, &v)?; - }; - for v in &self.mats { - os.write_string(3, &v)?; - }; - for v in &self.quality_core { - os.write_string(4, &v)?; - }; - for v in &self.quality_total { - os.write_string(5, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AmmoSet { - AmmoSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.type_.clear(); - self.other_mats.clear(); - self.mats.clear(); - self.quality_core.clear(); - self.quality_total.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AmmoSet { - static instance: AmmoSet = AmmoSet { - all: ::std::option::Option::None, - type_: ::std::vec::Vec::new(), - other_mats: ::std::vec::Vec::new(), - mats: ::std::vec::Vec::new(), - quality_core: ::std::vec::Vec::new(), - quality_total: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for AmmoSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.AmmoSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for AmmoSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for AmmoSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.CoinSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct CoinSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.CoinSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.CoinSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.CoinSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a CoinSet { - fn default() -> &'a CoinSet { - ::default_instance() - } - } - - impl CoinSet { - pub fn new() -> CoinSet { - ::std::default::Default::default() - } - - // optional bool all = 2; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &CoinSet| { &m.all }, - |m: &mut CoinSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &CoinSet| { &m.mats }, - |m: &mut CoinSet| { &mut m.mats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.CoinSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for CoinSet { - const NAME: &'static str = "CoinSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 16 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.mats.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(2, v)?; - } - for v in &self.mats { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CoinSet { - CoinSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.mats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CoinSet { - static instance: CoinSet = CoinSet { - all: ::std::option::Option::None, - mats: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for CoinSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.CoinSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for CoinSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for CoinSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.BarsBlocksSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct BarsBlocksSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.BarsBlocksSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.BarsBlocksSet.bars_other_mats) - pub bars_other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.BarsBlocksSet.blocks_other_mats) - pub blocks_other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.BarsBlocksSet.bars_mats) - pub bars_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.BarsBlocksSet.blocks_mats) - pub blocks_mats: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.BarsBlocksSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a BarsBlocksSet { - fn default() -> &'a BarsBlocksSet { - ::default_instance() - } - } - - impl BarsBlocksSet { - pub fn new() -> BarsBlocksSet { - ::std::default::Default::default() - } - - // optional bool all = 5; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &BarsBlocksSet| { &m.all }, - |m: &mut BarsBlocksSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "bars_other_mats", - |m: &BarsBlocksSet| { &m.bars_other_mats }, - |m: &mut BarsBlocksSet| { &mut m.bars_other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "blocks_other_mats", - |m: &BarsBlocksSet| { &m.blocks_other_mats }, - |m: &mut BarsBlocksSet| { &mut m.blocks_other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "bars_mats", - |m: &BarsBlocksSet| { &m.bars_mats }, - |m: &mut BarsBlocksSet| { &mut m.bars_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "blocks_mats", - |m: &BarsBlocksSet| { &m.blocks_mats }, - |m: &mut BarsBlocksSet| { &mut m.blocks_mats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.BarsBlocksSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for BarsBlocksSet { - const NAME: &'static str = "BarsBlocksSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 40 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.bars_other_mats.push(is.read_string()?); - }, - 18 => { - self.blocks_other_mats.push(is.read_string()?); - }, - 26 => { - self.bars_mats.push(is.read_string()?); - }, - 34 => { - self.blocks_mats.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.bars_other_mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.blocks_other_mats { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.bars_mats { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.blocks_mats { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(5, v)?; - } - for v in &self.bars_other_mats { - os.write_string(1, &v)?; - }; - for v in &self.blocks_other_mats { - os.write_string(2, &v)?; - }; - for v in &self.bars_mats { - os.write_string(3, &v)?; - }; - for v in &self.blocks_mats { - os.write_string(4, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BarsBlocksSet { - BarsBlocksSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.bars_other_mats.clear(); - self.blocks_other_mats.clear(); - self.bars_mats.clear(); - self.blocks_mats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BarsBlocksSet { - static instance: BarsBlocksSet = BarsBlocksSet { - all: ::std::option::Option::None, - bars_other_mats: ::std::vec::Vec::new(), - blocks_other_mats: ::std::vec::Vec::new(), - bars_mats: ::std::vec::Vec::new(), - blocks_mats: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for BarsBlocksSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.BarsBlocksSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for BarsBlocksSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for BarsBlocksSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.GemsSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct GemsSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.GemsSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.GemsSet.rough_other_mats) - pub rough_other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.GemsSet.cut_other_mats) - pub cut_other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.GemsSet.rough_mats) - pub rough_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.GemsSet.cut_mats) - pub cut_mats: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.GemsSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a GemsSet { - fn default() -> &'a GemsSet { - ::default_instance() - } - } - - impl GemsSet { - pub fn new() -> GemsSet { - ::std::default::Default::default() - } - - // optional bool all = 5; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &GemsSet| { &m.all }, - |m: &mut GemsSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "rough_other_mats", - |m: &GemsSet| { &m.rough_other_mats }, - |m: &mut GemsSet| { &mut m.rough_other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cut_other_mats", - |m: &GemsSet| { &m.cut_other_mats }, - |m: &mut GemsSet| { &mut m.cut_other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "rough_mats", - |m: &GemsSet| { &m.rough_mats }, - |m: &mut GemsSet| { &mut m.rough_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cut_mats", - |m: &GemsSet| { &m.cut_mats }, - |m: &mut GemsSet| { &mut m.cut_mats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.GemsSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for GemsSet { - const NAME: &'static str = "GemsSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 40 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.rough_other_mats.push(is.read_string()?); - }, - 18 => { - self.cut_other_mats.push(is.read_string()?); - }, - 26 => { - self.rough_mats.push(is.read_string()?); - }, - 34 => { - self.cut_mats.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.rough_other_mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.cut_other_mats { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.rough_mats { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.cut_mats { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(5, v)?; - } - for v in &self.rough_other_mats { - os.write_string(1, &v)?; - }; - for v in &self.cut_other_mats { - os.write_string(2, &v)?; - }; - for v in &self.rough_mats { - os.write_string(3, &v)?; - }; - for v in &self.cut_mats { - os.write_string(4, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GemsSet { - GemsSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.rough_other_mats.clear(); - self.cut_other_mats.clear(); - self.rough_mats.clear(); - self.cut_mats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GemsSet { - static instance: GemsSet = GemsSet { - all: ::std::option::Option::None, - rough_other_mats: ::std::vec::Vec::new(), - cut_other_mats: ::std::vec::Vec::new(), - rough_mats: ::std::vec::Vec::new(), - cut_mats: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for GemsSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.GemsSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for GemsSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for GemsSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.FinishedGoodsSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct FinishedGoodsSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.type) - pub type_: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.other_mats) - pub other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.quality_core) - pub quality_core: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.quality_total) - pub quality_total: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.dyed) - pub dyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.undyed) - pub undyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.FinishedGoodsSet.color) - pub color: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.FinishedGoodsSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a FinishedGoodsSet { - fn default() -> &'a FinishedGoodsSet { - ::default_instance() - } - } - - impl FinishedGoodsSet { - pub fn new() -> FinishedGoodsSet { - ::std::default::Default::default() - } - - // optional bool all = 6; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool dyed = 7; - - pub fn dyed(&self) -> bool { - self.dyed.unwrap_or(false) - } - - pub fn clear_dyed(&mut self) { - self.dyed = ::std::option::Option::None; - } - - pub fn has_dyed(&self) -> bool { - self.dyed.is_some() - } - - // Param is passed by value, moved - pub fn set_dyed(&mut self, v: bool) { - self.dyed = ::std::option::Option::Some(v); - } - - // optional bool undyed = 8; - - pub fn undyed(&self) -> bool { - self.undyed.unwrap_or(false) - } - - pub fn clear_undyed(&mut self) { - self.undyed = ::std::option::Option::None; - } - - pub fn has_undyed(&self) -> bool { - self.undyed.is_some() - } - - // Param is passed by value, moved - pub fn set_undyed(&mut self, v: bool) { - self.undyed = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &FinishedGoodsSet| { &m.all }, - |m: &mut FinishedGoodsSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "type", - |m: &FinishedGoodsSet| { &m.type_ }, - |m: &mut FinishedGoodsSet| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "other_mats", - |m: &FinishedGoodsSet| { &m.other_mats }, - |m: &mut FinishedGoodsSet| { &mut m.other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &FinishedGoodsSet| { &m.mats }, - |m: &mut FinishedGoodsSet| { &mut m.mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_core", - |m: &FinishedGoodsSet| { &m.quality_core }, - |m: &mut FinishedGoodsSet| { &mut m.quality_core }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_total", - |m: &FinishedGoodsSet| { &m.quality_total }, - |m: &mut FinishedGoodsSet| { &mut m.quality_total }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dyed", - |m: &FinishedGoodsSet| { &m.dyed }, - |m: &mut FinishedGoodsSet| { &mut m.dyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "undyed", - |m: &FinishedGoodsSet| { &m.undyed }, - |m: &mut FinishedGoodsSet| { &mut m.undyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "color", - |m: &FinishedGoodsSet| { &m.color }, - |m: &mut FinishedGoodsSet| { &mut m.color }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.FinishedGoodsSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for FinishedGoodsSet { - const NAME: &'static str = "FinishedGoodsSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 48 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.type_.push(is.read_string()?); - }, - 18 => { - self.other_mats.push(is.read_string()?); - }, - 26 => { - self.mats.push(is.read_string()?); - }, - 34 => { - self.quality_core.push(is.read_string()?); - }, - 42 => { - self.quality_total.push(is.read_string()?); - }, - 56 => { - self.dyed = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.undyed = ::std::option::Option::Some(is.read_bool()?); - }, - 74 => { - self.color.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.type_ { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.other_mats { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.mats { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.quality_core { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.quality_total { - my_size += ::protobuf::rt::string_size(5, &value); - }; - if let Some(v) = self.dyed { - my_size += 1 + 1; - } - if let Some(v) = self.undyed { - my_size += 1 + 1; - } - for value in &self.color { - my_size += ::protobuf::rt::string_size(9, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(6, v)?; - } - for v in &self.type_ { - os.write_string(1, &v)?; - }; - for v in &self.other_mats { - os.write_string(2, &v)?; - }; - for v in &self.mats { - os.write_string(3, &v)?; - }; - for v in &self.quality_core { - os.write_string(4, &v)?; - }; - for v in &self.quality_total { - os.write_string(5, &v)?; - }; - if let Some(v) = self.dyed { - os.write_bool(7, v)?; - } - if let Some(v) = self.undyed { - os.write_bool(8, v)?; - } - for v in &self.color { - os.write_string(9, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FinishedGoodsSet { - FinishedGoodsSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.type_.clear(); - self.other_mats.clear(); - self.mats.clear(); - self.quality_core.clear(); - self.quality_total.clear(); - self.dyed = ::std::option::Option::None; - self.undyed = ::std::option::Option::None; - self.color.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FinishedGoodsSet { - static instance: FinishedGoodsSet = FinishedGoodsSet { - all: ::std::option::Option::None, - type_: ::std::vec::Vec::new(), - other_mats: ::std::vec::Vec::new(), - mats: ::std::vec::Vec::new(), - quality_core: ::std::vec::Vec::new(), - quality_total: ::std::vec::Vec::new(), - dyed: ::std::option::Option::None, - undyed: ::std::option::Option::None, - color: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for FinishedGoodsSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.FinishedGoodsSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for FinishedGoodsSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for FinishedGoodsSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.LeatherSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct LeatherSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.LeatherSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.LeatherSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.LeatherSet.dyed) - pub dyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.LeatherSet.undyed) - pub undyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.LeatherSet.color) - pub color: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.LeatherSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a LeatherSet { - fn default() -> &'a LeatherSet { - ::default_instance() - } - } - - impl LeatherSet { - pub fn new() -> LeatherSet { - ::std::default::Default::default() - } - - // optional bool all = 2; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool dyed = 3; - - pub fn dyed(&self) -> bool { - self.dyed.unwrap_or(false) - } - - pub fn clear_dyed(&mut self) { - self.dyed = ::std::option::Option::None; - } - - pub fn has_dyed(&self) -> bool { - self.dyed.is_some() - } - - // Param is passed by value, moved - pub fn set_dyed(&mut self, v: bool) { - self.dyed = ::std::option::Option::Some(v); - } - - // optional bool undyed = 4; - - pub fn undyed(&self) -> bool { - self.undyed.unwrap_or(false) - } - - pub fn clear_undyed(&mut self) { - self.undyed = ::std::option::Option::None; - } - - pub fn has_undyed(&self) -> bool { - self.undyed.is_some() - } - - // Param is passed by value, moved - pub fn set_undyed(&mut self, v: bool) { - self.undyed = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &LeatherSet| { &m.all }, - |m: &mut LeatherSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &LeatherSet| { &m.mats }, - |m: &mut LeatherSet| { &mut m.mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dyed", - |m: &LeatherSet| { &m.dyed }, - |m: &mut LeatherSet| { &mut m.dyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "undyed", - |m: &LeatherSet| { &m.undyed }, - |m: &mut LeatherSet| { &mut m.undyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "color", - |m: &LeatherSet| { &m.color }, - |m: &mut LeatherSet| { &mut m.color }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.LeatherSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for LeatherSet { - const NAME: &'static str = "LeatherSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 16 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.mats.push(is.read_string()?); - }, - 24 => { - self.dyed = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.undyed = ::std::option::Option::Some(is.read_bool()?); - }, - 42 => { - self.color.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - if let Some(v) = self.dyed { - my_size += 1 + 1; - } - if let Some(v) = self.undyed { - my_size += 1 + 1; - } - for value in &self.color { - my_size += ::protobuf::rt::string_size(5, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(2, v)?; - } - for v in &self.mats { - os.write_string(1, &v)?; - }; - if let Some(v) = self.dyed { - os.write_bool(3, v)?; - } - if let Some(v) = self.undyed { - os.write_bool(4, v)?; - } - for v in &self.color { - os.write_string(5, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LeatherSet { - LeatherSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.mats.clear(); - self.dyed = ::std::option::Option::None; - self.undyed = ::std::option::Option::None; - self.color.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static LeatherSet { - static instance: LeatherSet = LeatherSet { - all: ::std::option::Option::None, - mats: ::std::vec::Vec::new(), - dyed: ::std::option::Option::None, - undyed: ::std::option::Option::None, - color: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for LeatherSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.LeatherSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for LeatherSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for LeatherSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.ClothSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct ClothSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.thread_silk) - pub thread_silk: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.thread_plant) - pub thread_plant: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.thread_yarn) - pub thread_yarn: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.thread_metal) - pub thread_metal: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.cloth_silk) - pub cloth_silk: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.cloth_plant) - pub cloth_plant: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.cloth_yarn) - pub cloth_yarn: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.cloth_metal) - pub cloth_metal: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.dyed) - pub dyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.undyed) - pub undyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ClothSet.color) - pub color: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.ClothSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a ClothSet { - fn default() -> &'a ClothSet { - ::default_instance() - } - } - - impl ClothSet { - pub fn new() -> ClothSet { - ::std::default::Default::default() - } - - // optional bool all = 9; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool dyed = 10; - - pub fn dyed(&self) -> bool { - self.dyed.unwrap_or(false) - } - - pub fn clear_dyed(&mut self) { - self.dyed = ::std::option::Option::None; - } - - pub fn has_dyed(&self) -> bool { - self.dyed.is_some() - } - - // Param is passed by value, moved - pub fn set_dyed(&mut self, v: bool) { - self.dyed = ::std::option::Option::Some(v); - } - - // optional bool undyed = 11; - - pub fn undyed(&self) -> bool { - self.undyed.unwrap_or(false) - } - - pub fn clear_undyed(&mut self) { - self.undyed = ::std::option::Option::None; - } - - pub fn has_undyed(&self) -> bool { - self.undyed.is_some() - } - - // Param is passed by value, moved - pub fn set_undyed(&mut self, v: bool) { - self.undyed = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(12); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &ClothSet| { &m.all }, - |m: &mut ClothSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "thread_silk", - |m: &ClothSet| { &m.thread_silk }, - |m: &mut ClothSet| { &mut m.thread_silk }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "thread_plant", - |m: &ClothSet| { &m.thread_plant }, - |m: &mut ClothSet| { &mut m.thread_plant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "thread_yarn", - |m: &ClothSet| { &m.thread_yarn }, - |m: &mut ClothSet| { &mut m.thread_yarn }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "thread_metal", - |m: &ClothSet| { &m.thread_metal }, - |m: &mut ClothSet| { &mut m.thread_metal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cloth_silk", - |m: &ClothSet| { &m.cloth_silk }, - |m: &mut ClothSet| { &mut m.cloth_silk }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cloth_plant", - |m: &ClothSet| { &m.cloth_plant }, - |m: &mut ClothSet| { &mut m.cloth_plant }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cloth_yarn", - |m: &ClothSet| { &m.cloth_yarn }, - |m: &mut ClothSet| { &mut m.cloth_yarn }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "cloth_metal", - |m: &ClothSet| { &m.cloth_metal }, - |m: &mut ClothSet| { &mut m.cloth_metal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dyed", - |m: &ClothSet| { &m.dyed }, - |m: &mut ClothSet| { &mut m.dyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "undyed", - |m: &ClothSet| { &m.undyed }, - |m: &mut ClothSet| { &mut m.undyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "color", - |m: &ClothSet| { &m.color }, - |m: &mut ClothSet| { &mut m.color }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.ClothSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for ClothSet { - const NAME: &'static str = "ClothSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 72 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.thread_silk.push(is.read_string()?); - }, - 18 => { - self.thread_plant.push(is.read_string()?); - }, - 26 => { - self.thread_yarn.push(is.read_string()?); - }, - 34 => { - self.thread_metal.push(is.read_string()?); - }, - 42 => { - self.cloth_silk.push(is.read_string()?); - }, - 50 => { - self.cloth_plant.push(is.read_string()?); - }, - 58 => { - self.cloth_yarn.push(is.read_string()?); - }, - 66 => { - self.cloth_metal.push(is.read_string()?); - }, - 80 => { - self.dyed = ::std::option::Option::Some(is.read_bool()?); - }, - 88 => { - self.undyed = ::std::option::Option::Some(is.read_bool()?); - }, - 98 => { - self.color.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.thread_silk { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.thread_plant { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.thread_yarn { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.thread_metal { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.cloth_silk { - my_size += ::protobuf::rt::string_size(5, &value); - }; - for value in &self.cloth_plant { - my_size += ::protobuf::rt::string_size(6, &value); - }; - for value in &self.cloth_yarn { - my_size += ::protobuf::rt::string_size(7, &value); - }; - for value in &self.cloth_metal { - my_size += ::protobuf::rt::string_size(8, &value); - }; - if let Some(v) = self.dyed { - my_size += 1 + 1; - } - if let Some(v) = self.undyed { - my_size += 1 + 1; - } - for value in &self.color { - my_size += ::protobuf::rt::string_size(12, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(9, v)?; - } - for v in &self.thread_silk { - os.write_string(1, &v)?; - }; - for v in &self.thread_plant { - os.write_string(2, &v)?; - }; - for v in &self.thread_yarn { - os.write_string(3, &v)?; - }; - for v in &self.thread_metal { - os.write_string(4, &v)?; - }; - for v in &self.cloth_silk { - os.write_string(5, &v)?; - }; - for v in &self.cloth_plant { - os.write_string(6, &v)?; - }; - for v in &self.cloth_yarn { - os.write_string(7, &v)?; - }; - for v in &self.cloth_metal { - os.write_string(8, &v)?; - }; - if let Some(v) = self.dyed { - os.write_bool(10, v)?; - } - if let Some(v) = self.undyed { - os.write_bool(11, v)?; - } - for v in &self.color { - os.write_string(12, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ClothSet { - ClothSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.thread_silk.clear(); - self.thread_plant.clear(); - self.thread_yarn.clear(); - self.thread_metal.clear(); - self.cloth_silk.clear(); - self.cloth_plant.clear(); - self.cloth_yarn.clear(); - self.cloth_metal.clear(); - self.dyed = ::std::option::Option::None; - self.undyed = ::std::option::Option::None; - self.color.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ClothSet { - static instance: ClothSet = ClothSet { - all: ::std::option::Option::None, - thread_silk: ::std::vec::Vec::new(), - thread_plant: ::std::vec::Vec::new(), - thread_yarn: ::std::vec::Vec::new(), - thread_metal: ::std::vec::Vec::new(), - cloth_silk: ::std::vec::Vec::new(), - cloth_plant: ::std::vec::Vec::new(), - cloth_yarn: ::std::vec::Vec::new(), - cloth_metal: ::std::vec::Vec::new(), - dyed: ::std::option::Option::None, - undyed: ::std::option::Option::None, - color: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for ClothSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.ClothSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for ClothSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for ClothSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.WoodSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct WoodSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WoodSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WoodSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.WoodSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a WoodSet { - fn default() -> &'a WoodSet { - ::default_instance() - } - } - - impl WoodSet { - pub fn new() -> WoodSet { - ::std::default::Default::default() - } - - // optional bool all = 2; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &WoodSet| { &m.all }, - |m: &mut WoodSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &WoodSet| { &m.mats }, - |m: &mut WoodSet| { &mut m.mats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.WoodSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for WoodSet { - const NAME: &'static str = "WoodSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 16 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.mats.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.mats { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(2, v)?; - } - for v in &self.mats { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> WoodSet { - WoodSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.mats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static WoodSet { - static instance: WoodSet = WoodSet { - all: ::std::option::Option::None, - mats: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for WoodSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.WoodSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for WoodSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for WoodSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.WeaponsSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct WeaponsSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.weapon_type) - pub weapon_type: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.trapcomp_type) - pub trapcomp_type: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.other_mats) - pub other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.quality_core) - pub quality_core: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.quality_total) - pub quality_total: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.usable) - pub usable: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.WeaponsSet.unusable) - pub unusable: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.WeaponsSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a WeaponsSet { - fn default() -> &'a WeaponsSet { - ::default_instance() - } - } - - impl WeaponsSet { - pub fn new() -> WeaponsSet { - ::std::default::Default::default() - } - - // optional bool all = 9; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool usable = 7; - - pub fn usable(&self) -> bool { - self.usable.unwrap_or(false) - } - - pub fn clear_usable(&mut self) { - self.usable = ::std::option::Option::None; - } - - pub fn has_usable(&self) -> bool { - self.usable.is_some() - } - - // Param is passed by value, moved - pub fn set_usable(&mut self, v: bool) { - self.usable = ::std::option::Option::Some(v); - } - - // optional bool unusable = 8; - - pub fn unusable(&self) -> bool { - self.unusable.unwrap_or(false) - } - - pub fn clear_unusable(&mut self) { - self.unusable = ::std::option::Option::None; - } - - pub fn has_unusable(&self) -> bool { - self.unusable.is_some() - } - - // Param is passed by value, moved - pub fn set_unusable(&mut self, v: bool) { - self.unusable = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &WeaponsSet| { &m.all }, - |m: &mut WeaponsSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "weapon_type", - |m: &WeaponsSet| { &m.weapon_type }, - |m: &mut WeaponsSet| { &mut m.weapon_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "trapcomp_type", - |m: &WeaponsSet| { &m.trapcomp_type }, - |m: &mut WeaponsSet| { &mut m.trapcomp_type }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "other_mats", - |m: &WeaponsSet| { &m.other_mats }, - |m: &mut WeaponsSet| { &mut m.other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &WeaponsSet| { &m.mats }, - |m: &mut WeaponsSet| { &mut m.mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_core", - |m: &WeaponsSet| { &m.quality_core }, - |m: &mut WeaponsSet| { &mut m.quality_core }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_total", - |m: &WeaponsSet| { &m.quality_total }, - |m: &mut WeaponsSet| { &mut m.quality_total }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "usable", - |m: &WeaponsSet| { &m.usable }, - |m: &mut WeaponsSet| { &mut m.usable }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unusable", - |m: &WeaponsSet| { &m.unusable }, - |m: &mut WeaponsSet| { &mut m.unusable }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.WeaponsSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for WeaponsSet { - const NAME: &'static str = "WeaponsSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 72 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.weapon_type.push(is.read_string()?); - }, - 18 => { - self.trapcomp_type.push(is.read_string()?); - }, - 26 => { - self.other_mats.push(is.read_string()?); - }, - 34 => { - self.mats.push(is.read_string()?); - }, - 42 => { - self.quality_core.push(is.read_string()?); - }, - 50 => { - self.quality_total.push(is.read_string()?); - }, - 56 => { - self.usable = ::std::option::Option::Some(is.read_bool()?); - }, - 64 => { - self.unusable = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.weapon_type { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.trapcomp_type { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.other_mats { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.mats { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.quality_core { - my_size += ::protobuf::rt::string_size(5, &value); - }; - for value in &self.quality_total { - my_size += ::protobuf::rt::string_size(6, &value); - }; - if let Some(v) = self.usable { - my_size += 1 + 1; - } - if let Some(v) = self.unusable { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(9, v)?; - } - for v in &self.weapon_type { - os.write_string(1, &v)?; - }; - for v in &self.trapcomp_type { - os.write_string(2, &v)?; - }; - for v in &self.other_mats { - os.write_string(3, &v)?; - }; - for v in &self.mats { - os.write_string(4, &v)?; - }; - for v in &self.quality_core { - os.write_string(5, &v)?; - }; - for v in &self.quality_total { - os.write_string(6, &v)?; - }; - if let Some(v) = self.usable { - os.write_bool(7, v)?; - } - if let Some(v) = self.unusable { - os.write_bool(8, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> WeaponsSet { - WeaponsSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.weapon_type.clear(); - self.trapcomp_type.clear(); - self.other_mats.clear(); - self.mats.clear(); - self.quality_core.clear(); - self.quality_total.clear(); - self.usable = ::std::option::Option::None; - self.unusable = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static WeaponsSet { - static instance: WeaponsSet = WeaponsSet { - all: ::std::option::Option::None, - weapon_type: ::std::vec::Vec::new(), - trapcomp_type: ::std::vec::Vec::new(), - other_mats: ::std::vec::Vec::new(), - mats: ::std::vec::Vec::new(), - quality_core: ::std::vec::Vec::new(), - quality_total: ::std::vec::Vec::new(), - usable: ::std::option::Option::None, - unusable: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for WeaponsSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.WeaponsSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for WeaponsSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for WeaponsSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.ArmorSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct ArmorSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.body) - pub body: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.head) - pub head: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.feet) - pub feet: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.hands) - pub hands: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.legs) - pub legs: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.shield) - pub shield: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.other_mats) - pub other_mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.mats) - pub mats: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.quality_core) - pub quality_core: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.quality_total) - pub quality_total: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.usable) - pub usable: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.unusable) - pub unusable: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.dyed) - pub dyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.undyed) - pub undyed: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.ArmorSet.color) - pub color: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.ArmorSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a ArmorSet { - fn default() -> &'a ArmorSet { - ::default_instance() - } - } - - impl ArmorSet { - pub fn new() -> ArmorSet { - ::std::default::Default::default() - } - - // optional bool all = 13; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - // optional bool usable = 11; - - pub fn usable(&self) -> bool { - self.usable.unwrap_or(false) - } - - pub fn clear_usable(&mut self) { - self.usable = ::std::option::Option::None; - } - - pub fn has_usable(&self) -> bool { - self.usable.is_some() - } - - // Param is passed by value, moved - pub fn set_usable(&mut self, v: bool) { - self.usable = ::std::option::Option::Some(v); - } - - // optional bool unusable = 12; - - pub fn unusable(&self) -> bool { - self.unusable.unwrap_or(false) - } - - pub fn clear_unusable(&mut self) { - self.unusable = ::std::option::Option::None; - } - - pub fn has_unusable(&self) -> bool { - self.unusable.is_some() - } - - // Param is passed by value, moved - pub fn set_unusable(&mut self, v: bool) { - self.unusable = ::std::option::Option::Some(v); - } - - // optional bool dyed = 14; - - pub fn dyed(&self) -> bool { - self.dyed.unwrap_or(false) - } - - pub fn clear_dyed(&mut self) { - self.dyed = ::std::option::Option::None; - } - - pub fn has_dyed(&self) -> bool { - self.dyed.is_some() - } - - // Param is passed by value, moved - pub fn set_dyed(&mut self, v: bool) { - self.dyed = ::std::option::Option::Some(v); - } - - // optional bool undyed = 15; - - pub fn undyed(&self) -> bool { - self.undyed.unwrap_or(false) - } - - pub fn clear_undyed(&mut self) { - self.undyed = ::std::option::Option::None; - } - - pub fn has_undyed(&self) -> bool { - self.undyed.is_some() - } - - // Param is passed by value, moved - pub fn set_undyed(&mut self, v: bool) { - self.undyed = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(16); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &ArmorSet| { &m.all }, - |m: &mut ArmorSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "body", - |m: &ArmorSet| { &m.body }, - |m: &mut ArmorSet| { &mut m.body }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "head", - |m: &ArmorSet| { &m.head }, - |m: &mut ArmorSet| { &mut m.head }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "feet", - |m: &ArmorSet| { &m.feet }, - |m: &mut ArmorSet| { &mut m.feet }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "hands", - |m: &ArmorSet| { &m.hands }, - |m: &mut ArmorSet| { &mut m.hands }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "legs", - |m: &ArmorSet| { &m.legs }, - |m: &mut ArmorSet| { &mut m.legs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "shield", - |m: &ArmorSet| { &m.shield }, - |m: &mut ArmorSet| { &mut m.shield }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "other_mats", - |m: &ArmorSet| { &m.other_mats }, - |m: &mut ArmorSet| { &mut m.other_mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "mats", - |m: &ArmorSet| { &m.mats }, - |m: &mut ArmorSet| { &mut m.mats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_core", - |m: &ArmorSet| { &m.quality_core }, - |m: &mut ArmorSet| { &mut m.quality_core }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "quality_total", - |m: &ArmorSet| { &m.quality_total }, - |m: &mut ArmorSet| { &mut m.quality_total }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "usable", - |m: &ArmorSet| { &m.usable }, - |m: &mut ArmorSet| { &mut m.usable }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "unusable", - |m: &ArmorSet| { &m.unusable }, - |m: &mut ArmorSet| { &mut m.unusable }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dyed", - |m: &ArmorSet| { &m.dyed }, - |m: &mut ArmorSet| { &mut m.dyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "undyed", - |m: &ArmorSet| { &m.undyed }, - |m: &mut ArmorSet| { &mut m.undyed }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "color", - |m: &ArmorSet| { &m.color }, - |m: &mut ArmorSet| { &mut m.color }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.ArmorSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for ArmorSet { - const NAME: &'static str = "ArmorSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 104 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 10 => { - self.body.push(is.read_string()?); - }, - 18 => { - self.head.push(is.read_string()?); - }, - 26 => { - self.feet.push(is.read_string()?); - }, - 34 => { - self.hands.push(is.read_string()?); - }, - 42 => { - self.legs.push(is.read_string()?); - }, - 50 => { - self.shield.push(is.read_string()?); - }, - 58 => { - self.other_mats.push(is.read_string()?); - }, - 66 => { - self.mats.push(is.read_string()?); - }, - 74 => { - self.quality_core.push(is.read_string()?); - }, - 82 => { - self.quality_total.push(is.read_string()?); - }, - 88 => { - self.usable = ::std::option::Option::Some(is.read_bool()?); - }, - 96 => { - self.unusable = ::std::option::Option::Some(is.read_bool()?); - }, - 112 => { - self.dyed = ::std::option::Option::Some(is.read_bool()?); - }, - 120 => { - self.undyed = ::std::option::Option::Some(is.read_bool()?); - }, - 130 => { - self.color.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.body { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.head { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.feet { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.hands { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.legs { - my_size += ::protobuf::rt::string_size(5, &value); - }; - for value in &self.shield { - my_size += ::protobuf::rt::string_size(6, &value); - }; - for value in &self.other_mats { - my_size += ::protobuf::rt::string_size(7, &value); - }; - for value in &self.mats { - my_size += ::protobuf::rt::string_size(8, &value); - }; - for value in &self.quality_core { - my_size += ::protobuf::rt::string_size(9, &value); - }; - for value in &self.quality_total { - my_size += ::protobuf::rt::string_size(10, &value); - }; - if let Some(v) = self.usable { - my_size += 1 + 1; - } - if let Some(v) = self.unusable { - my_size += 1 + 1; - } - if let Some(v) = self.dyed { - my_size += 1 + 1; - } - if let Some(v) = self.undyed { - my_size += 1 + 1; - } - for value in &self.color { - my_size += ::protobuf::rt::string_size(16, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(13, v)?; - } - for v in &self.body { - os.write_string(1, &v)?; - }; - for v in &self.head { - os.write_string(2, &v)?; - }; - for v in &self.feet { - os.write_string(3, &v)?; - }; - for v in &self.hands { - os.write_string(4, &v)?; - }; - for v in &self.legs { - os.write_string(5, &v)?; - }; - for v in &self.shield { - os.write_string(6, &v)?; - }; - for v in &self.other_mats { - os.write_string(7, &v)?; - }; - for v in &self.mats { - os.write_string(8, &v)?; - }; - for v in &self.quality_core { - os.write_string(9, &v)?; - }; - for v in &self.quality_total { - os.write_string(10, &v)?; - }; - if let Some(v) = self.usable { - os.write_bool(11, v)?; - } - if let Some(v) = self.unusable { - os.write_bool(12, v)?; - } - if let Some(v) = self.dyed { - os.write_bool(14, v)?; - } - if let Some(v) = self.undyed { - os.write_bool(15, v)?; - } - for v in &self.color { - os.write_string(16, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ArmorSet { - ArmorSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.body.clear(); - self.head.clear(); - self.feet.clear(); - self.hands.clear(); - self.legs.clear(); - self.shield.clear(); - self.other_mats.clear(); - self.mats.clear(); - self.quality_core.clear(); - self.quality_total.clear(); - self.usable = ::std::option::Option::None; - self.unusable = ::std::option::Option::None; - self.dyed = ::std::option::Option::None; - self.undyed = ::std::option::Option::None; - self.color.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ArmorSet { - static instance: ArmorSet = ArmorSet { - all: ::std::option::Option::None, - body: ::std::vec::Vec::new(), - head: ::std::vec::Vec::new(), - feet: ::std::vec::Vec::new(), - hands: ::std::vec::Vec::new(), - legs: ::std::vec::Vec::new(), - shield: ::std::vec::Vec::new(), - other_mats: ::std::vec::Vec::new(), - mats: ::std::vec::Vec::new(), - quality_core: ::std::vec::Vec::new(), - quality_total: ::std::vec::Vec::new(), - usable: ::std::option::Option::None, - unusable: ::std::option::Option::None, - dyed: ::std::option::Option::None, - undyed: ::std::option::Option::None, - color: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for ArmorSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.ArmorSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for ArmorSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for ArmorSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.CorpsesSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct CorpsesSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.CorpsesSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.CorpsesSet.corpses) - pub corpses: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.CorpsesSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a CorpsesSet { - fn default() -> &'a CorpsesSet { - ::default_instance() - } - } - - impl CorpsesSet { - pub fn new() -> CorpsesSet { - ::std::default::Default::default() - } - - // optional bool all = 1; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &CorpsesSet| { &m.all }, - |m: &mut CorpsesSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "corpses", - |m: &CorpsesSet| { &m.corpses }, - |m: &mut CorpsesSet| { &mut m.corpses }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.CorpsesSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for CorpsesSet { - const NAME: &'static str = "CorpsesSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 18 => { - self.corpses.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.corpses { - my_size += ::protobuf::rt::string_size(2, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(1, v)?; - } - for v in &self.corpses { - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CorpsesSet { - CorpsesSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.corpses.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CorpsesSet { - static instance: CorpsesSet = CorpsesSet { - all: ::std::option::Option::None, - corpses: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for CorpsesSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.CorpsesSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for CorpsesSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for CorpsesSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } - - // @@protoc_insertion_point(message:dfstockpiles.StockpileSettings.SheetSet) - #[derive(PartialEq,Clone,Default,Debug)] - pub struct SheetSet { - // message fields - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.SheetSet.all) - pub all: ::std::option::Option, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.SheetSet.paper) - pub paper: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:dfstockpiles.StockpileSettings.SheetSet.parchment) - pub parchment: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:dfstockpiles.StockpileSettings.SheetSet.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a SheetSet { - fn default() -> &'a SheetSet { - ::default_instance() - } - } - - impl SheetSet { - pub fn new() -> SheetSet { - ::std::default::Default::default() - } - - // optional bool all = 1; - - pub fn all(&self) -> bool { - self.all.unwrap_or(false) - } - - pub fn clear_all(&mut self) { - self.all = ::std::option::Option::None; - } - - pub fn has_all(&self) -> bool { - self.all.is_some() - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = ::std::option::Option::Some(v); - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "all", - |m: &SheetSet| { &m.all }, - |m: &mut SheetSet| { &mut m.all }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "paper", - |m: &SheetSet| { &m.paper }, - |m: &mut SheetSet| { &mut m.paper }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "parchment", - |m: &SheetSet| { &m.parchment }, - |m: &mut SheetSet| { &mut m.parchment }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StockpileSettings.SheetSet", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for SheetSet { - const NAME: &'static str = "SheetSet"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.all = ::std::option::Option::Some(is.read_bool()?); - }, - 18 => { - self.paper.push(is.read_string()?); - }, - 26 => { - self.parchment.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.all { - my_size += 1 + 1; - } - for value in &self.paper { - my_size += ::protobuf::rt::string_size(2, &value); - }; - for value in &self.parchment { - my_size += ::protobuf::rt::string_size(3, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.all { - os.write_bool(1, v)?; - } - for v in &self.paper { - os.write_string(2, &v)?; - }; - for v in &self.parchment { - os.write_string(3, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SheetSet { - SheetSet::new() - } - - fn clear(&mut self) { - self.all = ::std::option::Option::None; - self.paper.clear(); - self.parchment.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SheetSet { - static instance: SheetSet = SheetSet { - all: ::std::option::Option::None, - paper: ::std::vec::Vec::new(), - parchment: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for SheetSet { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("StockpileSettings.SheetSet").unwrap()).clone() - } - } - - impl ::std::fmt::Display for SheetSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for SheetSet { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10stockpiles.proto\x12\x0cdfstockpiles\"\xa5'\n\x11StockpileSettings\ - \x12\x1f\n\x0bmax_barrels\x18\x14\x20\x01(\x05R\nmaxBarrels\x12\x19\n\ - \x08max_bins\x18\x15\x20\x01(\x05R\x07maxBins\x12)\n\x10max_wheelbarrows\ - \x18\x16\x20\x01(\x05R\x0fmaxWheelbarrows\x12$\n\x0euse_links_only\x18\ - \x17\x20\x01(\x08R\x0cuseLinksOnly\x12#\n\rallow_organic\x18\x12\x20\x01\ - (\x08R\x0callowOrganic\x12'\n\x0fallow_inorganic\x18\x13\x20\x01(\x08R\ - \x0eallowInorganic\x12;\n\x04ammo\x18\x08\x20\x01(\x0b2'.dfstockpiles.St\ - ockpileSettings.AmmoSetR\x04ammo\x12D\n\x07animals\x18\x01\x20\x01(\x0b2\ - *.dfstockpiles.StockpileSettings.AnimalsSetR\x07animals\x12>\n\x05armor\ - \x18\x11\x20\x01(\x0b2(.dfstockpiles.StockpileSettings.ArmorSetR\x05armo\ - r\x12M\n\nbarsblocks\x18\n\x20\x01(\x0b2-.dfstockpiles.StockpileSettings\ - .BarsBlocksSetR\nbarsblocks\x12>\n\x05cloth\x18\x0e\x20\x01(\x0b2(.dfsto\ - ckpiles.StockpileSettings.ClothSetR\x05cloth\x12;\n\x04coin\x18\t\x20\ - \x01(\x0b2'.dfstockpiles.StockpileSettings.CoinSetR\x04coin\x12W\n\x0efi\ - nished_goods\x18\x0c\x20\x01(\x0b20.dfstockpiles.StockpileSettings.Finis\ - hedGoodsSetR\rfinishedGoods\x12;\n\x04food\x18\x02\x20\x01(\x0b2'.dfstoc\ - kpiles.StockpileSettings.FoodSetR\x04food\x12J\n\tfurniture\x18\x03\x20\ - \x01(\x0b2,.dfstockpiles.StockpileSettings.FurnitureSetR\tfurniture\x12;\ - \n\x04gems\x18\x0b\x20\x01(\x0b2'.dfstockpiles.StockpileSettings.GemsSet\ - R\x04gems\x12D\n\x07leather\x18\r\x20\x01(\x0b2*.dfstockpiles.StockpileS\ - ettings.LeatherSetR\x07leather\x12K\n\x0bcorpses_v50\x18\x19\x20\x01(\ - \x0b2*.dfstockpiles.StockpileSettings.CorpsesSetR\ncorpsesV50\x12A\n\x06\ - refuse\x18\x05\x20\x01(\x0b2).dfstockpiles.StockpileSettings.RefuseSetR\ - \x06refuse\x12>\n\x05sheet\x18\x1a\x20\x01(\x0b2(.dfstockpiles.Stockpile\ - Settings.SheetSetR\x05sheet\x12>\n\x05stone\x18\x06\x20\x01(\x0b2(.dfsto\ - ckpiles.StockpileSettings.StoneSetR\x05stone\x12D\n\x07weapons\x18\x10\ - \x20\x01(\x0b2*.dfstockpiles.StockpileSettings.WeaponsSetR\x07weapons\ - \x12;\n\x04wood\x18\x0f\x20\x01(\x0b2'.dfstockpiles.StockpileSettings.Wo\ - odSetR\x04wood\x12\x18\n\x07corpses\x18\x18\x20\x01(\x08R\x07corpses\x12\ - <\n\x03ore\x18\x07\x20\x01(\x0b2&.dfstockpiles.StockpileSettings.OreSetR\ - \x03oreB\x02\x18\x01\x12\x1e\n\x08unknown1\x18\x04\x20\x01(\x05R\x08unkn\ - own1B\x02\x18\x01\x1az\n\nAnimalsSet\x12\x10\n\x03all\x18\x04\x20\x01(\ - \x08R\x03all\x12\x1f\n\x0bempty_cages\x18\x01\x20\x01(\x08R\nemptyCages\ - \x12\x1f\n\x0bempty_traps\x18\x02\x20\x01(\x08R\nemptyTraps\x12\x18\n\ - \x07enabled\x18\x03\x20\x03(\tR\x07enabled\x1a\x82\x05\n\x07FoodSet\x12\ - \x10\n\x03all\x18\x15\x20\x01(\x08R\x03all\x12\x12\n\x04meat\x18\x01\x20\ - \x03(\tR\x04meat\x12\x12\n\x04fish\x18\x02\x20\x03(\tR\x04fish\x12'\n\ - \x0funprepared_fish\x18\x14\x20\x03(\tR\x0eunpreparedFish\x12\x10\n\x03e\ - gg\x18\x03\x20\x03(\tR\x03egg\x12\x16\n\x06plants\x18\x04\x20\x03(\tR\ - \x06plants\x12\x1f\n\x0bdrink_plant\x18\x05\x20\x03(\tR\ndrinkPlant\x12!\ - \n\x0cdrink_animal\x18\x06\x20\x03(\tR\x0bdrinkAnimal\x12!\n\x0ccheese_p\ - lant\x18\x07\x20\x03(\tR\x0bcheesePlant\x12#\n\rcheese_animal\x18\x08\ - \x20\x03(\tR\x0ccheeseAnimal\x12\x14\n\x05seeds\x18\t\x20\x03(\tR\x05see\ - ds\x12\x16\n\x06leaves\x18\n\x20\x03(\tR\x06leaves\x12!\n\x0cpowder_plan\ - t\x18\x0b\x20\x03(\tR\x0bpowderPlant\x12'\n\x0fpowder_creature\x18\x0c\ - \x20\x03(\tR\x0epowderCreature\x12\x12\n\x04glob\x18\r\x20\x03(\tR\x04gl\ - ob\x12\x1d\n\nglob_paste\x18\x0e\x20\x03(\tR\tglobPaste\x12!\n\x0cglob_p\ - ressed\x18\x0f\x20\x03(\tR\x0bglobPressed\x12!\n\x0cliquid_plant\x18\x10\ - \x20\x03(\tR\x0bliquidPlant\x12#\n\rliquid_animal\x18\x11\x20\x03(\tR\ - \x0cliquidAnimal\x12\x1f\n\x0bliquid_misc\x18\x12\x20\x03(\tR\nliquidMis\ - c\x12%\n\x0eprepared_meals\x18\x13\x20\x01(\x08R\rpreparedMeals\x1a\xaf\ - \x01\n\x0cFurnitureSet\x12\x10\n\x03all\x18\x07\x20\x01(\x08R\x03all\x12\ - \x12\n\x04type\x18\x01\x20\x03(\tR\x04type\x12\x1d\n\nother_mats\x18\x02\ - \x20\x03(\tR\totherMats\x12\x12\n\x04mats\x18\x03\x20\x03(\tR\x04mats\ - \x12!\n\x0cquality_core\x18\x04\x20\x03(\tR\x0bqualityCore\x12#\n\rquali\ - ty_total\x18\x05\x20\x03(\tR\x0cqualityTotal\x1a\xbe\x02\n\tRefuseSet\ - \x12\x10\n\x03all\x18\x0c\x20\x01(\x08R\x03all\x12\x12\n\x04type\x18\x01\ - \x20\x03(\tR\x04type\x12\x18\n\x07corpses\x18\x02\x20\x03(\tR\x07corpses\ - \x12\x1d\n\nbody_parts\x18\x03\x20\x03(\tR\tbodyParts\x12\x16\n\x06skull\ - s\x18\x04\x20\x03(\tR\x06skulls\x12\x14\n\x05bones\x18\x05\x20\x03(\tR\ - \x05bones\x12\x12\n\x04hair\x18\x06\x20\x03(\tR\x04hair\x12\x16\n\x06she\ - lls\x18\x07\x20\x03(\tR\x06shells\x12\x14\n\x05teeth\x18\x08\x20\x03(\tR\ - \x05teeth\x12\x14\n\x05horns\x18\t\x20\x03(\tR\x05horns\x12$\n\x0efresh_\ - raw_hide\x18\n\x20\x01(\x08R\x0cfreshRawHide\x12&\n\x0frotten_raw_hide\ - \x18\x0b\x20\x01(\x08R\rrottenRawHide\x1a0\n\x08StoneSet\x12\x10\n\x03al\ - l\x18\x02\x20\x01(\x08R\x03all\x12\x12\n\x04mats\x18\x01\x20\x03(\tR\x04\ - mats\x1a\x1c\n\x06OreSet\x12\x12\n\x04mats\x18\x01\x20\x03(\tR\x04mats\ - \x1a\xaa\x01\n\x07AmmoSet\x12\x10\n\x03all\x18\x06\x20\x01(\x08R\x03all\ - \x12\x12\n\x04type\x18\x01\x20\x03(\tR\x04type\x12\x1d\n\nother_mats\x18\ - \x02\x20\x03(\tR\totherMats\x12\x12\n\x04mats\x18\x03\x20\x03(\tR\x04mat\ - s\x12!\n\x0cquality_core\x18\x04\x20\x03(\tR\x0bqualityCore\x12#\n\rqual\ - ity_total\x18\x05\x20\x03(\tR\x0cqualityTotal\x1a/\n\x07CoinSet\x12\x10\ - \n\x03all\x18\x02\x20\x01(\x08R\x03all\x12\x12\n\x04mats\x18\x01\x20\x03\ - (\tR\x04mats\x1a\xb3\x01\n\rBarsBlocksSet\x12\x10\n\x03all\x18\x05\x20\ - \x01(\x08R\x03all\x12&\n\x0fbars_other_mats\x18\x01\x20\x03(\tR\rbarsOth\ - erMats\x12*\n\x11blocks_other_mats\x18\x02\x20\x03(\tR\x0fblocksOtherMat\ - s\x12\x1b\n\tbars_mats\x18\x03\x20\x03(\tR\x08barsMats\x12\x1f\n\x0bbloc\ - ks_mats\x18\x04\x20\x03(\tR\nblocksMats\x1a\xa5\x01\n\x07GemsSet\x12\x10\ - \n\x03all\x18\x05\x20\x01(\x08R\x03all\x12(\n\x10rough_other_mats\x18\ - \x01\x20\x03(\tR\x0eroughOtherMats\x12$\n\x0ecut_other_mats\x18\x02\x20\ - \x03(\tR\x0ccutOtherMats\x12\x1d\n\nrough_mats\x18\x03\x20\x03(\tR\troug\ - hMats\x12\x19\n\x08cut_mats\x18\x04\x20\x03(\tR\x07cutMats\x1a\xf5\x01\n\ - \x10FinishedGoodsSet\x12\x10\n\x03all\x18\x06\x20\x01(\x08R\x03all\x12\ - \x12\n\x04type\x18\x01\x20\x03(\tR\x04type\x12\x1d\n\nother_mats\x18\x02\ - \x20\x03(\tR\totherMats\x12\x12\n\x04mats\x18\x03\x20\x03(\tR\x04mats\ - \x12!\n\x0cquality_core\x18\x04\x20\x03(\tR\x0bqualityCore\x12#\n\rquali\ - ty_total\x18\x05\x20\x03(\tR\x0cqualityTotal\x12\x12\n\x04dyed\x18\x07\ - \x20\x01(\x08R\x04dyed\x12\x16\n\x06undyed\x18\x08\x20\x01(\x08R\x06undy\ - ed\x12\x14\n\x05color\x18\t\x20\x03(\tR\x05color\x1at\n\nLeatherSet\x12\ - \x10\n\x03all\x18\x02\x20\x01(\x08R\x03all\x12\x12\n\x04mats\x18\x01\x20\ - \x03(\tR\x04mats\x12\x12\n\x04dyed\x18\x03\x20\x01(\x08R\x04dyed\x12\x16\ - \n\x06undyed\x18\x04\x20\x01(\x08R\x06undyed\x12\x14\n\x05color\x18\x05\ - \x20\x03(\tR\x05color\x1a\xe6\x02\n\x08ClothSet\x12\x10\n\x03all\x18\t\ - \x20\x01(\x08R\x03all\x12\x1f\n\x0bthread_silk\x18\x01\x20\x03(\tR\nthre\ - adSilk\x12!\n\x0cthread_plant\x18\x02\x20\x03(\tR\x0bthreadPlant\x12\x1f\ - \n\x0bthread_yarn\x18\x03\x20\x03(\tR\nthreadYarn\x12!\n\x0cthread_metal\ - \x18\x04\x20\x03(\tR\x0bthreadMetal\x12\x1d\n\ncloth_silk\x18\x05\x20\ - \x03(\tR\tclothSilk\x12\x1f\n\x0bcloth_plant\x18\x06\x20\x03(\tR\nclothP\ - lant\x12\x1d\n\ncloth_yarn\x18\x07\x20\x03(\tR\tclothYarn\x12\x1f\n\x0bc\ - loth_metal\x18\x08\x20\x03(\tR\nclothMetal\x12\x12\n\x04dyed\x18\n\x20\ - \x01(\x08R\x04dyed\x12\x16\n\x06undyed\x18\x0b\x20\x01(\x08R\x06undyed\ - \x12\x14\n\x05color\x18\x0c\x20\x03(\tR\x05color\x1a/\n\x07WoodSet\x12\ - \x10\n\x03all\x18\x02\x20\x01(\x08R\x03all\x12\x12\n\x04mats\x18\x01\x20\ - \x03(\tR\x04mats\x1a\x93\x02\n\nWeaponsSet\x12\x10\n\x03all\x18\t\x20\ - \x01(\x08R\x03all\x12\x1f\n\x0bweapon_type\x18\x01\x20\x03(\tR\nweaponTy\ - pe\x12#\n\rtrapcomp_type\x18\x02\x20\x03(\tR\x0ctrapcompType\x12\x1d\n\n\ - other_mats\x18\x03\x20\x03(\tR\totherMats\x12\x12\n\x04mats\x18\x04\x20\ - \x03(\tR\x04mats\x12!\n\x0cquality_core\x18\x05\x20\x03(\tR\x0bqualityCo\ - re\x12#\n\rquality_total\x18\x06\x20\x03(\tR\x0cqualityTotal\x12\x16\n\ - \x06usable\x18\x07\x20\x01(\x08R\x06usable\x12\x1a\n\x08unusable\x18\x08\ - \x20\x01(\x08R\x08unusable\x1a\x8b\x03\n\x08ArmorSet\x12\x10\n\x03all\ - \x18\r\x20\x01(\x08R\x03all\x12\x12\n\x04body\x18\x01\x20\x03(\tR\x04bod\ - y\x12\x12\n\x04head\x18\x02\x20\x03(\tR\x04head\x12\x12\n\x04feet\x18\ - \x03\x20\x03(\tR\x04feet\x12\x14\n\x05hands\x18\x04\x20\x03(\tR\x05hands\ - \x12\x12\n\x04legs\x18\x05\x20\x03(\tR\x04legs\x12\x16\n\x06shield\x18\ - \x06\x20\x03(\tR\x06shield\x12\x1d\n\nother_mats\x18\x07\x20\x03(\tR\tot\ - herMats\x12\x12\n\x04mats\x18\x08\x20\x03(\tR\x04mats\x12!\n\x0cquality_\ - core\x18\t\x20\x03(\tR\x0bqualityCore\x12#\n\rquality_total\x18\n\x20\ - \x03(\tR\x0cqualityTotal\x12\x16\n\x06usable\x18\x0b\x20\x01(\x08R\x06us\ - able\x12\x1a\n\x08unusable\x18\x0c\x20\x01(\x08R\x08unusable\x12\x12\n\ - \x04dyed\x18\x0e\x20\x01(\x08R\x04dyed\x12\x16\n\x06undyed\x18\x0f\x20\ - \x01(\x08R\x06undyed\x12\x14\n\x05color\x18\x10\x20\x03(\tR\x05color\x1a\ - 8\n\nCorpsesSet\x12\x10\n\x03all\x18\x01\x20\x01(\x08R\x03all\x12\x18\n\ - \x07corpses\x18\x02\x20\x03(\tR\x07corpses\x1aP\n\x08SheetSet\x12\x10\n\ - \x03all\x18\x01\x20\x01(\x08R\x03all\x12\x14\n\x05paper\x18\x02\x20\x03(\ - \tR\x05paper\x12\x1c\n\tparchment\x18\x03\x20\x03(\tR\tparchmentB\x02H\ - \x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(19); - messages.push(StockpileSettings::generated_message_descriptor_data()); - messages.push(stockpile_settings::AnimalsSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::FoodSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::FurnitureSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::RefuseSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::StoneSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::OreSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::AmmoSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::CoinSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::BarsBlocksSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::GemsSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::FinishedGoodsSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::LeatherSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::ClothSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::WoodSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::WeaponsSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::ArmorSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::CorpsesSet::generated_message_descriptor_data()); - messages.push(stockpile_settings::SheetSet::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/messages/ui_sidebar_mode.rs b/dfhack-proto/src/generated/messages/ui_sidebar_mode.rs deleted file mode 100644 index ee628e5..0000000 --- a/dfhack-proto/src/generated/messages/ui_sidebar_mode.rs +++ /dev/null @@ -1,413 +0,0 @@ -// This file is generated by rust-protobuf 3.7.2. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `ui_sidebar_mode.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:proto.enums.ui_sidebar_mode.ui_sidebar_mode) -pub enum Ui_sidebar_mode { - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Default) - Default = 0, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Squads) - Squads = 1, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateMine) - DesignateMine = 2, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateRemoveRamps) - DesignateRemoveRamps = 3, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateUpStair) - DesignateUpStair = 4, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateDownStair) - DesignateDownStair = 5, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateUpDownStair) - DesignateUpDownStair = 6, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateUpRamp) - DesignateUpRamp = 7, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateChannel) - DesignateChannel = 8, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateGatherPlants) - DesignateGatherPlants = 9, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateRemoveDesignation) - DesignateRemoveDesignation = 10, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateSmooth) - DesignateSmooth = 11, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateCarveTrack) - DesignateCarveTrack = 12, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateEngrave) - DesignateEngrave = 13, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateCarveFortification) - DesignateCarveFortification = 14, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Stockpiles) - Stockpiles = 15, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Build) - Build = 16, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.QueryBuilding) - QueryBuilding = 17, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Orders) - Orders = 18, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.OrdersForbid) - OrdersForbid = 19, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.OrdersRefuse) - OrdersRefuse = 20, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.OrdersWorkshop) - OrdersWorkshop = 21, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.OrdersZone) - OrdersZone = 22, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.BuildingItems) - BuildingItems = 23, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ViewUnits) - ViewUnits = 24, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.LookAround) - LookAround = 25, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsClaim) - DesignateItemsClaim = 26, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsForbid) - DesignateItemsForbid = 27, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsMelt) - DesignateItemsMelt = 28, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsUnmelt) - DesignateItemsUnmelt = 29, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsDump) - DesignateItemsDump = 30, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsUndump) - DesignateItemsUndump = 31, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsHide) - DesignateItemsHide = 32, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateItemsUnhide) - DesignateItemsUnhide = 33, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateChopTrees) - DesignateChopTrees = 34, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateToggleEngravings) - DesignateToggleEngravings = 35, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateToggleMarker) - DesignateToggleMarker = 36, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Hotkeys) - Hotkeys = 37, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateTrafficHigh) - DesignateTrafficHigh = 38, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateTrafficNormal) - DesignateTrafficNormal = 39, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateTrafficLow) - DesignateTrafficLow = 40, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateTrafficRestricted) - DesignateTrafficRestricted = 41, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Zones) - Zones = 42, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ZonesPenInfo) - ZonesPenInfo = 43, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ZonesPitInfo) - ZonesPitInfo = 44, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ZonesHospitalInfo) - ZonesHospitalInfo = 45, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ZonesGatherInfo) - ZonesGatherInfo = 46, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DesignateRemoveConstruction) - DesignateRemoveConstruction = 47, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.DepotAccess) - DepotAccess = 48, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.NotesPoints) - NotesPoints = 49, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.NotesRoutes) - NotesRoutes = 50, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Burrows) - Burrows = 51, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.Hauling) - Hauling = 52, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ArenaWeather) - ArenaWeather = 53, - // @@protoc_insertion_point(enum_value:proto.enums.ui_sidebar_mode.ui_sidebar_mode.ArenaTrees) - ArenaTrees = 54, -} - -impl ::protobuf::Enum for Ui_sidebar_mode { - const NAME: &'static str = "ui_sidebar_mode"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(Ui_sidebar_mode::Default), - 1 => ::std::option::Option::Some(Ui_sidebar_mode::Squads), - 2 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateMine), - 3 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateRemoveRamps), - 4 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateUpStair), - 5 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateDownStair), - 6 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateUpDownStair), - 7 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateUpRamp), - 8 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateChannel), - 9 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateGatherPlants), - 10 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateRemoveDesignation), - 11 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateSmooth), - 12 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateCarveTrack), - 13 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateEngrave), - 14 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateCarveFortification), - 15 => ::std::option::Option::Some(Ui_sidebar_mode::Stockpiles), - 16 => ::std::option::Option::Some(Ui_sidebar_mode::Build), - 17 => ::std::option::Option::Some(Ui_sidebar_mode::QueryBuilding), - 18 => ::std::option::Option::Some(Ui_sidebar_mode::Orders), - 19 => ::std::option::Option::Some(Ui_sidebar_mode::OrdersForbid), - 20 => ::std::option::Option::Some(Ui_sidebar_mode::OrdersRefuse), - 21 => ::std::option::Option::Some(Ui_sidebar_mode::OrdersWorkshop), - 22 => ::std::option::Option::Some(Ui_sidebar_mode::OrdersZone), - 23 => ::std::option::Option::Some(Ui_sidebar_mode::BuildingItems), - 24 => ::std::option::Option::Some(Ui_sidebar_mode::ViewUnits), - 25 => ::std::option::Option::Some(Ui_sidebar_mode::LookAround), - 26 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsClaim), - 27 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsForbid), - 28 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsMelt), - 29 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsUnmelt), - 30 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsDump), - 31 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsUndump), - 32 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsHide), - 33 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsUnhide), - 34 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateChopTrees), - 35 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateToggleEngravings), - 36 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateToggleMarker), - 37 => ::std::option::Option::Some(Ui_sidebar_mode::Hotkeys), - 38 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficHigh), - 39 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficNormal), - 40 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficLow), - 41 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficRestricted), - 42 => ::std::option::Option::Some(Ui_sidebar_mode::Zones), - 43 => ::std::option::Option::Some(Ui_sidebar_mode::ZonesPenInfo), - 44 => ::std::option::Option::Some(Ui_sidebar_mode::ZonesPitInfo), - 45 => ::std::option::Option::Some(Ui_sidebar_mode::ZonesHospitalInfo), - 46 => ::std::option::Option::Some(Ui_sidebar_mode::ZonesGatherInfo), - 47 => ::std::option::Option::Some(Ui_sidebar_mode::DesignateRemoveConstruction), - 48 => ::std::option::Option::Some(Ui_sidebar_mode::DepotAccess), - 49 => ::std::option::Option::Some(Ui_sidebar_mode::NotesPoints), - 50 => ::std::option::Option::Some(Ui_sidebar_mode::NotesRoutes), - 51 => ::std::option::Option::Some(Ui_sidebar_mode::Burrows), - 52 => ::std::option::Option::Some(Ui_sidebar_mode::Hauling), - 53 => ::std::option::Option::Some(Ui_sidebar_mode::ArenaWeather), - 54 => ::std::option::Option::Some(Ui_sidebar_mode::ArenaTrees), - _ => ::std::option::Option::None - } - } - - fn from_str(str: &str) -> ::std::option::Option { - match str { - "Default" => ::std::option::Option::Some(Ui_sidebar_mode::Default), - "Squads" => ::std::option::Option::Some(Ui_sidebar_mode::Squads), - "DesignateMine" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateMine), - "DesignateRemoveRamps" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateRemoveRamps), - "DesignateUpStair" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateUpStair), - "DesignateDownStair" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateDownStair), - "DesignateUpDownStair" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateUpDownStair), - "DesignateUpRamp" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateUpRamp), - "DesignateChannel" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateChannel), - "DesignateGatherPlants" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateGatherPlants), - "DesignateRemoveDesignation" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateRemoveDesignation), - "DesignateSmooth" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateSmooth), - "DesignateCarveTrack" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateCarveTrack), - "DesignateEngrave" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateEngrave), - "DesignateCarveFortification" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateCarveFortification), - "Stockpiles" => ::std::option::Option::Some(Ui_sidebar_mode::Stockpiles), - "Build" => ::std::option::Option::Some(Ui_sidebar_mode::Build), - "QueryBuilding" => ::std::option::Option::Some(Ui_sidebar_mode::QueryBuilding), - "Orders" => ::std::option::Option::Some(Ui_sidebar_mode::Orders), - "OrdersForbid" => ::std::option::Option::Some(Ui_sidebar_mode::OrdersForbid), - "OrdersRefuse" => ::std::option::Option::Some(Ui_sidebar_mode::OrdersRefuse), - "OrdersWorkshop" => ::std::option::Option::Some(Ui_sidebar_mode::OrdersWorkshop), - "OrdersZone" => ::std::option::Option::Some(Ui_sidebar_mode::OrdersZone), - "BuildingItems" => ::std::option::Option::Some(Ui_sidebar_mode::BuildingItems), - "ViewUnits" => ::std::option::Option::Some(Ui_sidebar_mode::ViewUnits), - "LookAround" => ::std::option::Option::Some(Ui_sidebar_mode::LookAround), - "DesignateItemsClaim" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsClaim), - "DesignateItemsForbid" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsForbid), - "DesignateItemsMelt" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsMelt), - "DesignateItemsUnmelt" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsUnmelt), - "DesignateItemsDump" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsDump), - "DesignateItemsUndump" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsUndump), - "DesignateItemsHide" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsHide), - "DesignateItemsUnhide" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateItemsUnhide), - "DesignateChopTrees" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateChopTrees), - "DesignateToggleEngravings" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateToggleEngravings), - "DesignateToggleMarker" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateToggleMarker), - "Hotkeys" => ::std::option::Option::Some(Ui_sidebar_mode::Hotkeys), - "DesignateTrafficHigh" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficHigh), - "DesignateTrafficNormal" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficNormal), - "DesignateTrafficLow" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficLow), - "DesignateTrafficRestricted" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateTrafficRestricted), - "Zones" => ::std::option::Option::Some(Ui_sidebar_mode::Zones), - "ZonesPenInfo" => ::std::option::Option::Some(Ui_sidebar_mode::ZonesPenInfo), - "ZonesPitInfo" => ::std::option::Option::Some(Ui_sidebar_mode::ZonesPitInfo), - "ZonesHospitalInfo" => ::std::option::Option::Some(Ui_sidebar_mode::ZonesHospitalInfo), - "ZonesGatherInfo" => ::std::option::Option::Some(Ui_sidebar_mode::ZonesGatherInfo), - "DesignateRemoveConstruction" => ::std::option::Option::Some(Ui_sidebar_mode::DesignateRemoveConstruction), - "DepotAccess" => ::std::option::Option::Some(Ui_sidebar_mode::DepotAccess), - "NotesPoints" => ::std::option::Option::Some(Ui_sidebar_mode::NotesPoints), - "NotesRoutes" => ::std::option::Option::Some(Ui_sidebar_mode::NotesRoutes), - "Burrows" => ::std::option::Option::Some(Ui_sidebar_mode::Burrows), - "Hauling" => ::std::option::Option::Some(Ui_sidebar_mode::Hauling), - "ArenaWeather" => ::std::option::Option::Some(Ui_sidebar_mode::ArenaWeather), - "ArenaTrees" => ::std::option::Option::Some(Ui_sidebar_mode::ArenaTrees), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [Ui_sidebar_mode] = &[ - Ui_sidebar_mode::Default, - Ui_sidebar_mode::Squads, - Ui_sidebar_mode::DesignateMine, - Ui_sidebar_mode::DesignateRemoveRamps, - Ui_sidebar_mode::DesignateUpStair, - Ui_sidebar_mode::DesignateDownStair, - Ui_sidebar_mode::DesignateUpDownStair, - Ui_sidebar_mode::DesignateUpRamp, - Ui_sidebar_mode::DesignateChannel, - Ui_sidebar_mode::DesignateGatherPlants, - Ui_sidebar_mode::DesignateRemoveDesignation, - Ui_sidebar_mode::DesignateSmooth, - Ui_sidebar_mode::DesignateCarveTrack, - Ui_sidebar_mode::DesignateEngrave, - Ui_sidebar_mode::DesignateCarveFortification, - Ui_sidebar_mode::Stockpiles, - Ui_sidebar_mode::Build, - Ui_sidebar_mode::QueryBuilding, - Ui_sidebar_mode::Orders, - Ui_sidebar_mode::OrdersForbid, - Ui_sidebar_mode::OrdersRefuse, - Ui_sidebar_mode::OrdersWorkshop, - Ui_sidebar_mode::OrdersZone, - Ui_sidebar_mode::BuildingItems, - Ui_sidebar_mode::ViewUnits, - Ui_sidebar_mode::LookAround, - Ui_sidebar_mode::DesignateItemsClaim, - Ui_sidebar_mode::DesignateItemsForbid, - Ui_sidebar_mode::DesignateItemsMelt, - Ui_sidebar_mode::DesignateItemsUnmelt, - Ui_sidebar_mode::DesignateItemsDump, - Ui_sidebar_mode::DesignateItemsUndump, - Ui_sidebar_mode::DesignateItemsHide, - Ui_sidebar_mode::DesignateItemsUnhide, - Ui_sidebar_mode::DesignateChopTrees, - Ui_sidebar_mode::DesignateToggleEngravings, - Ui_sidebar_mode::DesignateToggleMarker, - Ui_sidebar_mode::Hotkeys, - Ui_sidebar_mode::DesignateTrafficHigh, - Ui_sidebar_mode::DesignateTrafficNormal, - Ui_sidebar_mode::DesignateTrafficLow, - Ui_sidebar_mode::DesignateTrafficRestricted, - Ui_sidebar_mode::Zones, - Ui_sidebar_mode::ZonesPenInfo, - Ui_sidebar_mode::ZonesPitInfo, - Ui_sidebar_mode::ZonesHospitalInfo, - Ui_sidebar_mode::ZonesGatherInfo, - Ui_sidebar_mode::DesignateRemoveConstruction, - Ui_sidebar_mode::DepotAccess, - Ui_sidebar_mode::NotesPoints, - Ui_sidebar_mode::NotesRoutes, - Ui_sidebar_mode::Burrows, - Ui_sidebar_mode::Hauling, - Ui_sidebar_mode::ArenaWeather, - Ui_sidebar_mode::ArenaTrees, - ]; -} - -impl ::protobuf::EnumFull for Ui_sidebar_mode { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("ui_sidebar_mode").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for Ui_sidebar_mode { - fn default() -> Self { - Ui_sidebar_mode::Default - } -} - -impl Ui_sidebar_mode { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ui_sidebar_mode") - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x15ui_sidebar_mode.proto\x12\x1bproto.enums.ui_sidebar_mode*\xa0\t\n\ - \x0fui_sidebar_mode\x12\x0b\n\x07Default\x10\0\x12\n\n\x06Squads\x10\x01\ - \x12\x11\n\rDesignateMine\x10\x02\x12\x18\n\x14DesignateRemoveRamps\x10\ - \x03\x12\x14\n\x10DesignateUpStair\x10\x04\x12\x16\n\x12DesignateDownSta\ - ir\x10\x05\x12\x18\n\x14DesignateUpDownStair\x10\x06\x12\x13\n\x0fDesign\ - ateUpRamp\x10\x07\x12\x14\n\x10DesignateChannel\x10\x08\x12\x19\n\x15Des\ - ignateGatherPlants\x10\t\x12\x1e\n\x1aDesignateRemoveDesignation\x10\n\ - \x12\x13\n\x0fDesignateSmooth\x10\x0b\x12\x17\n\x13DesignateCarveTrack\ - \x10\x0c\x12\x14\n\x10DesignateEngrave\x10\r\x12\x1f\n\x1bDesignateCarve\ - Fortification\x10\x0e\x12\x0e\n\nStockpiles\x10\x0f\x12\t\n\x05Build\x10\ - \x10\x12\x11\n\rQueryBuilding\x10\x11\x12\n\n\x06Orders\x10\x12\x12\x10\ - \n\x0cOrdersForbid\x10\x13\x12\x10\n\x0cOrdersRefuse\x10\x14\x12\x12\n\ - \x0eOrdersWorkshop\x10\x15\x12\x0e\n\nOrdersZone\x10\x16\x12\x11\n\rBuil\ - dingItems\x10\x17\x12\r\n\tViewUnits\x10\x18\x12\x0e\n\nLookAround\x10\ - \x19\x12\x17\n\x13DesignateItemsClaim\x10\x1a\x12\x18\n\x14DesignateItem\ - sForbid\x10\x1b\x12\x16\n\x12DesignateItemsMelt\x10\x1c\x12\x18\n\x14Des\ - ignateItemsUnmelt\x10\x1d\x12\x16\n\x12DesignateItemsDump\x10\x1e\x12\ - \x18\n\x14DesignateItemsUndump\x10\x1f\x12\x16\n\x12DesignateItemsHide\ - \x10\x20\x12\x18\n\x14DesignateItemsUnhide\x10!\x12\x16\n\x12DesignateCh\ - opTrees\x10\"\x12\x1d\n\x19DesignateToggleEngravings\x10#\x12\x19\n\x15D\ - esignateToggleMarker\x10$\x12\x0b\n\x07Hotkeys\x10%\x12\x18\n\x14Designa\ - teTrafficHigh\x10&\x12\x1a\n\x16DesignateTrafficNormal\x10'\x12\x17\n\ - \x13DesignateTrafficLow\x10(\x12\x1e\n\x1aDesignateTrafficRestricted\x10\ - )\x12\t\n\x05Zones\x10*\x12\x10\n\x0cZonesPenInfo\x10+\x12\x10\n\x0cZone\ - sPitInfo\x10,\x12\x15\n\x11ZonesHospitalInfo\x10-\x12\x13\n\x0fZonesGath\ - erInfo\x10.\x12\x1f\n\x1bDesignateRemoveConstruction\x10/\x12\x0f\n\x0bD\ - epotAccess\x100\x12\x0f\n\x0bNotesPoints\x101\x12\x0f\n\x0bNotesRoutes\ - \x102\x12\x0b\n\x07Burrows\x103\x12\x0b\n\x07Hauling\x104\x12\x10\n\x0cA\ - renaWeather\x105\x12\x0e\n\nArenaTrees\x106B\x02H\x03b\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(1); - enums.push(Ui_sidebar_mode::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/dfhack-proto/src/generated/stubs/mod.rs b/dfhack-proto/src/generated/stubs/mod.rs index 0d7e3a1..a6d765d 100644 --- a/dfhack-proto/src/generated/stubs/mod.rs +++ b/dfhack-proto/src/generated/stubs/mod.rs @@ -1,6 +1,5 @@ use crate::messages::*; -#[cfg(feature = "reflection")] -use protobuf::MessageFull; +use prost::Name; ///Generated list of DFHack stubs. Each stub communicates with a plugin. pub struct Stubs { channel: TChannel, @@ -11,23 +10,22 @@ impl From for Stubs { Self { channel } } } -impl Stubs { +impl<'a, TChannel: crate::Channel> Stubs { ///RPCs of the plugin - pub fn core(&mut self) -> crate::stubs::Core { + pub fn core(&'a mut self) -> crate::stubs::Core<'a, TChannel> { crate::stubs::Core::new(&mut self.channel) } ///RPCs of the RemoteFortressReader plugin pub fn remote_fortress_reader( - &mut self, - ) -> crate::stubs::RemoteFortressReader { + &'a mut self, + ) -> crate::stubs::RemoteFortressReader<'a, TChannel> { crate::stubs::RemoteFortressReader::new(&mut self.channel) } ///RPCs of the mypluginname plugin - pub fn mypluginname(&mut self) -> crate::stubs::Mypluginname { + pub fn mypluginname(&'a mut self) -> crate::stubs::Mypluginname<'a, TChannel> { crate::stubs::Mypluginname::new(&mut self.channel) } } -#[cfg(feature = "reflection")] impl crate::reflection::StubReflection for Stubs { fn list_methods() -> Vec { let mut methods = Vec::new(); @@ -54,53 +52,53 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "BindMethod".to_string(), request)?; + .request("", "BindMethod", request)?; Ok(_response) } ///Method `CoreResume` from the plugin `` pub fn core_resume(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "CoreResume".to_string(), request)?; + .request("", "CoreResume", request)?; let _response = crate::Reply { - reply: _response.value(), + reply: _response.value, fragments: _response.fragments, }; Ok(_response) } ///Method `CoreSuspend` from the plugin `` pub fn core_suspend(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "CoreSuspend".to_string(), request)?; + .request("", "CoreSuspend", request)?; let _response = crate::Reply { - reply: _response.value(), + reply: _response.value, fragments: _response.fragments, }; Ok(_response) } ///Method `GetDFVersion` from the plugin `` pub fn get_df_version(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "GetDFVersion".to_string(), request)?; + .request("", "GetDFVersion", request)?; let _response = crate::Reply { - reply: _response.value().to_string(), + reply: _response.value.clone(), fragments: _response.fragments, }; Ok(_response) } ///Method `GetVersion` from the plugin `` pub fn get_version(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "GetVersion".to_string(), request)?; + .request("", "GetVersion", request)?; let _response = crate::Reply { - reply: _response.value().to_string(), + reply: _response.value.clone(), fragments: _response.fragments, }; Ok(_response) @@ -109,30 +107,30 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { pub fn get_world_info( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "GetWorldInfo".to_string(), request)?; + .request("", "GetWorldInfo", request)?; Ok(_response) } ///Method `ListEnums` from the plugin `` pub fn list_enums( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "ListEnums".to_string(), request)?; + .request("", "ListEnums", request)?; Ok(_response) } ///Method `ListJobSkills` from the plugin `` pub fn list_job_skills( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request("".to_string(), "ListJobSkills".to_string(), request)?; + .request("", "ListJobSkills", request)?; Ok(_response) } ///Method `ListMaterials` from the plugin `` @@ -142,7 +140,7 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "ListMaterials".to_string(), request)?; + .request("", "ListMaterials", request)?; Ok(_response) } ///Method `ListSquads` from the plugin `` @@ -152,7 +150,7 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "ListSquads".to_string(), request)?; + .request("", "ListSquads", request)?; Ok(_response) } ///Method `ListUnits` from the plugin `` @@ -162,7 +160,7 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "ListUnits".to_string(), request)?; + .request("", "ListUnits", request)?; Ok(_response) } ///Method `RunCommand` from the plugin `` @@ -172,7 +170,7 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "RunCommand".to_string(), request)?; + .request("", "RunCommand", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -186,7 +184,7 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "RunLua".to_string(), request)?; + .request("", "RunLua", request)?; Ok(_response) } ///Method `SetUnitLabors` from the plugin `` @@ -196,7 +194,7 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("".to_string(), "SetUnitLabors".to_string(), request)?; + .request("", "SetUnitLabors", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -204,60 +202,45 @@ impl<'a, TChannel: crate::Channel> Core<'a, TChannel> { Ok(_response) } } -#[cfg(feature = "reflection")] impl crate::reflection::StubReflection for Core<'_, TChannel> { fn list_methods() -> Vec { vec![ - crate ::reflection::RemoteProcedureDescriptor { name : "BindMethod" - .to_string(), plugin_name : "".to_string(), input_type : - CoreBindRequest::descriptor().full_name().to_string(), output_type : - CoreBindReply::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "CoreResume".to_string(), - plugin_name : "".to_string(), input_type : EmptyMessage::descriptor() - .full_name().to_string(), output_type : IntMessage::descriptor().full_name() - .to_string(), }, crate ::reflection::RemoteProcedureDescriptor { name : - "CoreSuspend".to_string(), plugin_name : "".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - IntMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetDFVersion".to_string(), - plugin_name : "".to_string(), input_type : EmptyMessage::descriptor() - .full_name().to_string(), output_type : StringMessage::descriptor() - .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor { - name : "GetVersion".to_string(), plugin_name : "".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - StringMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetWorldInfo".to_string(), - plugin_name : "".to_string(), input_type : EmptyMessage::descriptor() - .full_name().to_string(), output_type : GetWorldInfoOut::descriptor() - .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor { - name : "ListEnums".to_string(), plugin_name : "".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - ListEnumsOut::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "ListJobSkills".to_string(), - plugin_name : "".to_string(), input_type : EmptyMessage::descriptor() - .full_name().to_string(), output_type : ListJobSkillsOut::descriptor() - .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor { - name : "ListMaterials".to_string(), plugin_name : "".to_string(), input_type - : ListMaterialsIn::descriptor().full_name().to_string(), output_type : - ListMaterialsOut::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "ListSquads".to_string(), - plugin_name : "".to_string(), input_type : ListSquadsIn::descriptor() - .full_name().to_string(), output_type : ListSquadsOut::descriptor() - .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor { - name : "ListUnits".to_string(), plugin_name : "".to_string(), input_type : - ListUnitsIn::descriptor().full_name().to_string(), output_type : - ListUnitsOut::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "RunCommand".to_string(), - plugin_name : "".to_string(), input_type : - CoreRunCommandRequest::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "RunLua".to_string(), - plugin_name : "".to_string(), input_type : CoreRunLuaRequest::descriptor() - .full_name().to_string(), output_type : StringListMessage::descriptor() - .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor { - name : "SetUnitLabors".to_string(), plugin_name : "".to_string(), input_type - : SetUnitLaborsIn::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, + crate ::reflection::RemoteProcedureDescriptor { name : "BindMethod", + plugin_name : "", input_type : CoreBindRequest::full_name(), output_type : + CoreBindReply::full_name(), }, crate ::reflection::RemoteProcedureDescriptor + { name : "CoreResume", plugin_name : "", input_type : + EmptyMessage::full_name(), output_type : IntMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "CoreSuspend", plugin_name : + "", input_type : EmptyMessage::full_name(), output_type : + IntMessage::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "GetDFVersion", plugin_name : "", input_type : + EmptyMessage::full_name(), output_type : StringMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetVersion", plugin_name : + "", input_type : EmptyMessage::full_name(), output_type : + StringMessage::full_name(), }, crate ::reflection::RemoteProcedureDescriptor + { name : "GetWorldInfo", plugin_name : "", input_type : + EmptyMessage::full_name(), output_type : GetWorldInfoOut::full_name(), }, + crate ::reflection::RemoteProcedureDescriptor { name : "ListEnums", + plugin_name : "", input_type : EmptyMessage::full_name(), output_type : + ListEnumsOut::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "ListJobSkills", plugin_name : "", input_type : + EmptyMessage::full_name(), output_type : ListJobSkillsOut::full_name(), }, + crate ::reflection::RemoteProcedureDescriptor { name : "ListMaterials", + plugin_name : "", input_type : ListMaterialsIn::full_name(), output_type : + ListMaterialsOut::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "ListSquads", plugin_name : + "", input_type : ListSquadsIn::full_name(), output_type : + ListSquadsOut::full_name(), }, crate ::reflection::RemoteProcedureDescriptor + { name : "ListUnits", plugin_name : "", input_type : + ListUnitsIn::full_name(), output_type : ListUnitsOut::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "RunCommand", plugin_name : + "", input_type : CoreRunCommandRequest::full_name(), output_type : + EmptyMessage::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "RunLua", plugin_name : "", input_type : + CoreRunLuaRequest::full_name(), output_type : StringListMessage::full_name(), + }, crate ::reflection::RemoteProcedureDescriptor { name : "SetUnitLabors", + plugin_name : "", input_type : SetUnitLaborsIn::full_name(), output_type : + EmptyMessage::full_name(), }, ] } } @@ -273,14 +256,10 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { } ///Method `CheckHashes` from the plugin `RemoteFortressReader` pub fn check_hashes(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "CheckHashes".to_string(), - request, - )?; + .request("RemoteFortressReader", "CheckHashes", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -291,14 +270,10 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { pub fn copy_screen( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "CopyScreen".to_string(), - request, - )?; + .request("RemoteFortressReader", "CopyScreen", request)?; Ok(_response) } ///Method `GetBlockList` from the plugin `RemoteFortressReader` @@ -308,53 +283,37 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetBlockList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetBlockList", request)?; Ok(_response) } ///Method `GetBuildingDefList` from the plugin `RemoteFortressReader` pub fn get_building_def_list( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetBuildingDefList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetBuildingDefList", request)?; Ok(_response) } ///Method `GetCreatureRaws` from the plugin `RemoteFortressReader` pub fn get_creature_raws( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetCreatureRaws".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetCreatureRaws", request)?; Ok(_response) } ///Method `GetGameValidity` from the plugin `RemoteFortressReader` pub fn get_game_validity(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetGameValidity".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetGameValidity", request)?; let _response = crate::Reply { - reply: _response.Value(), + reply: _response.value(), fragments: _response.fragments, }; Ok(_response) @@ -363,66 +322,46 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { pub fn get_growth_list( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetGrowthList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetGrowthList", request)?; Ok(_response) } ///Method `GetItemList` from the plugin `RemoteFortressReader` pub fn get_item_list( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetItemList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetItemList", request)?; Ok(_response) } ///Method `GetLanguage` from the plugin `RemoteFortressReader` pub fn get_language(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetLanguage".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetLanguage", request)?; Ok(_response) } ///Method `GetMapInfo` from the plugin `RemoteFortressReader` pub fn get_map_info(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetMapInfo".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetMapInfo", request)?; Ok(_response) } ///Method `GetMaterialList` from the plugin `RemoteFortressReader` pub fn get_material_list( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetMaterialList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetMaterialList", request)?; Ok(_response) } ///Method `GetPartialCreatureRaws` from the plugin `RemoteFortressReader` @@ -432,11 +371,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetPartialCreatureRaws".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetPartialCreatureRaws", request)?; Ok(_response) } ///Method `GetPartialPlantRaws` from the plugin `RemoteFortressReader` @@ -446,25 +381,17 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetPartialPlantRaws".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetPartialPlantRaws", request)?; Ok(_response) } ///Method `GetPauseState` from the plugin `RemoteFortressReader` pub fn get_pause_state(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetPauseState".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetPauseState", request)?; let _response = crate::Reply { - reply: _response.Value(), + reply: _response.value(), fragments: _response.fragments, }; Ok(_response) @@ -476,105 +403,73 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetPlantList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetPlantList", request)?; Ok(_response) } ///Method `GetPlantRaws` from the plugin `RemoteFortressReader` pub fn get_plant_raws( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetPlantRaws".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetPlantRaws", request)?; Ok(_response) } ///Method `GetRegionMaps` from the plugin `RemoteFortressReader` pub fn get_region_maps( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetRegionMaps".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetRegionMaps", request)?; Ok(_response) } ///Method `GetRegionMapsNew` from the plugin `RemoteFortressReader` pub fn get_region_maps_new( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetRegionMapsNew".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetRegionMapsNew", request)?; Ok(_response) } ///Method `GetReports` from the plugin `RemoteFortressReader` pub fn get_reports(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetReports".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetReports", request)?; Ok(_response) } ///Method `GetSideMenu` from the plugin `RemoteFortressReader` pub fn get_side_menu( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetSideMenu".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetSideMenu", request)?; Ok(_response) } ///Method `GetTiletypeList` from the plugin `RemoteFortressReader` pub fn get_tiletype_list( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetTiletypeList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetTiletypeList", request)?; Ok(_response) } ///Method `GetUnitList` from the plugin `RemoteFortressReader` pub fn get_unit_list(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetUnitList".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetUnitList", request)?; Ok(_response) } ///Method `GetUnitListInside` from the plugin `RemoteFortressReader` @@ -584,77 +479,53 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetUnitListInside".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetUnitListInside", request)?; Ok(_response) } ///Method `GetVersionInfo` from the plugin `RemoteFortressReader` pub fn get_version_info( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetVersionInfo".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetVersionInfo", request)?; Ok(_response) } ///Method `GetViewInfo` from the plugin `RemoteFortressReader` pub fn get_view_info(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetViewInfo".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetViewInfo", request)?; Ok(_response) } ///Method `GetWorldMap` from the plugin `RemoteFortressReader` pub fn get_world_map(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetWorldMap".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetWorldMap", request)?; Ok(_response) } ///Method `GetWorldMapCenter` from the plugin `RemoteFortressReader` pub fn get_world_map_center( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetWorldMapCenter".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetWorldMapCenter", request)?; Ok(_response) } ///Method `GetWorldMapNew` from the plugin `RemoteFortressReader` pub fn get_world_map_new( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "GetWorldMapNew".to_string(), - request, - )?; + .request("RemoteFortressReader", "GetWorldMapNew", request)?; Ok(_response) } ///Method `JumpCommand` from the plugin `RemoteFortressReader` @@ -664,11 +535,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "JumpCommand".to_string(), - request, - )?; + .request("RemoteFortressReader", "JumpCommand", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -679,14 +546,10 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { pub fn menu_query( &mut self, ) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "MenuQuery".to_string(), - request, - )?; + .request("RemoteFortressReader", "MenuQuery", request)?; Ok(_response) } ///Method `MiscMoveCommand` from the plugin `RemoteFortressReader` @@ -696,11 +559,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "MiscMoveCommand".to_string(), - request, - )?; + .request("RemoteFortressReader", "MiscMoveCommand", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -714,11 +573,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "MoveCommand".to_string(), - request, - )?; + .request("RemoteFortressReader", "MoveCommand", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -730,15 +585,10 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { &mut self, value: i32, ) -> Result, TChannel::TError> { - let mut request = IntMessage::new(); - request.set_value(value); + let request = IntMessage { value }; let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "MovementSelectCommand".to_string(), - request, - )?; + .request("RemoteFortressReader", "MovementSelectCommand", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -752,11 +602,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "PassKeyboardEvent".to_string(), - request, - )?; + .request("RemoteFortressReader", "PassKeyboardEvent", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -765,14 +611,10 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { } ///Method `ResetMapHashes` from the plugin `RemoteFortressReader` pub fn reset_map_hashes(&mut self) -> Result, TChannel::TError> { - let request = EmptyMessage::new(); + let request = EmptyMessage::default(); let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "ResetMapHashes".to_string(), - request, - )?; + .request("RemoteFortressReader", "ResetMapHashes", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -786,11 +628,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "SendDigCommand".to_string(), - request, - )?; + .request("RemoteFortressReader", "SendDigCommand", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -802,15 +640,10 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { &mut self, value: bool, ) -> Result, TChannel::TError> { - let mut request = SingleBool::new(); - request.set_Value(value); + let request = SingleBool { value: Some(value) }; let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "SetPauseState".to_string(), - request, - )?; + .request("RemoteFortressReader", "SetPauseState", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -824,11 +657,7 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request( - "RemoteFortressReader".to_string(), - "SetSideMenu".to_string(), - request, - )?; + .request("RemoteFortressReader", "SetSideMenu", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -836,163 +665,114 @@ impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> { Ok(_response) } } -#[cfg(feature = "reflection")] impl crate::reflection::StubReflection for RemoteFortressReader<'_, TChannel> { fn list_methods() -> Vec { vec![ - crate ::reflection::RemoteProcedureDescriptor { name : "CheckHashes" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "CopyScreen".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - ScreenCapture::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetBlockList".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - BlockRequest::descriptor().full_name().to_string(), output_type : - BlockList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetBuildingDefList" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - BuildingList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetCreatureRaws" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - CreatureRawList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetGameValidity" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - SingleBool::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetGrowthList".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - MaterialList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetItemList".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - MaterialList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetLanguage".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - Language::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetMapInfo".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - MapInfo::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetMaterialList" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - MaterialList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetPartialCreatureRaws" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - ListRequest::descriptor().full_name().to_string(), output_type : - CreatureRawList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetPartialPlantRaws" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - ListRequest::descriptor().full_name().to_string(), output_type : - PlantRawList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetPauseState".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - SingleBool::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetPlantList".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - BlockRequest::descriptor().full_name().to_string(), output_type : - PlantList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetPlantRaws".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - PlantRawList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetRegionMaps".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - RegionMaps::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetRegionMapsNew" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - RegionMaps::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetReports".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - Status::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetSideMenu".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - SidebarState::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetTiletypeList" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - TiletypeList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetUnitList".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - UnitList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetUnitListInside" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - BlockRequest::descriptor().full_name().to_string(), output_type : - UnitList::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetVersionInfo" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - VersionInfo::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetViewInfo".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - ViewInfo::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetWorldMap".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - WorldMap::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetWorldMapCenter" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - WorldMap::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "GetWorldMapNew" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - WorldMap::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "JumpCommand".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - MoveCommandParams::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "MenuQuery".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - MenuContents::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "MiscMoveCommand" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - MiscMoveParams::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "MoveCommand".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - MoveCommandParams::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "MovementSelectCommand" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - IntMessage::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "PassKeyboardEvent" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - KeyboardEvent::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "ResetMapHashes" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - EmptyMessage::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "SendDigCommand" - .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type : - DigCommand::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "SetPauseState".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - SingleBool::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "SetSideMenu".to_string(), - plugin_name : "RemoteFortressReader".to_string(), input_type : - SidebarCommand::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, + crate ::reflection::RemoteProcedureDescriptor { name : "CheckHashes", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "CopyScreen", plugin_name : + "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type : + ScreenCapture::full_name(), }, crate ::reflection::RemoteProcedureDescriptor + { name : "GetBlockList", plugin_name : "RemoteFortressReader", input_type : + BlockRequest::full_name(), output_type : BlockList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetBuildingDefList", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : BuildingList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetCreatureRaws", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : CreatureRawList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetGameValidity", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : SingleBool::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetGrowthList", plugin_name + : "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type + : MaterialList::full_name(), }, crate ::reflection::RemoteProcedureDescriptor + { name : "GetItemList", plugin_name : "RemoteFortressReader", input_type : + EmptyMessage::full_name(), output_type : MaterialList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetLanguage", plugin_name : + "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type : + Language::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "GetMapInfo", plugin_name : "RemoteFortressReader", input_type : + EmptyMessage::full_name(), output_type : MapInfo::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetMaterialList", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : MaterialList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetPartialCreatureRaws", + plugin_name : "RemoteFortressReader", input_type : ListRequest::full_name(), + output_type : CreatureRawList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetPartialPlantRaws", + plugin_name : "RemoteFortressReader", input_type : ListRequest::full_name(), + output_type : PlantRawList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetPauseState", plugin_name + : "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type + : SingleBool::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "GetPlantList", plugin_name : "RemoteFortressReader", input_type : + BlockRequest::full_name(), output_type : PlantList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetPlantRaws", plugin_name + : "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type + : PlantRawList::full_name(), }, crate ::reflection::RemoteProcedureDescriptor + { name : "GetRegionMaps", plugin_name : "RemoteFortressReader", input_type : + EmptyMessage::full_name(), output_type : RegionMaps::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetRegionMapsNew", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : RegionMaps::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetReports", plugin_name : + "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type : + Status::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { name + : "GetSideMenu", plugin_name : "RemoteFortressReader", input_type : + EmptyMessage::full_name(), output_type : SidebarState::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetTiletypeList", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : TiletypeList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetUnitList", plugin_name : + "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type : + UnitList::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "GetUnitListInside", plugin_name : "RemoteFortressReader", input_type + : BlockRequest::full_name(), output_type : UnitList::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetVersionInfo", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : VersionInfo::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetViewInfo", plugin_name : + "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type : + ViewInfo::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "GetWorldMap", plugin_name : "RemoteFortressReader", input_type : + EmptyMessage::full_name(), output_type : WorldMap::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetWorldMapCenter", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : WorldMap::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "GetWorldMapNew", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : WorldMap::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "JumpCommand", plugin_name : + "RemoteFortressReader", input_type : MoveCommandParams::full_name(), + output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "MenuQuery", plugin_name : + "RemoteFortressReader", input_type : EmptyMessage::full_name(), output_type : + MenuContents::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "MiscMoveCommand", plugin_name : "RemoteFortressReader", input_type : + MiscMoveParams::full_name(), output_type : EmptyMessage::full_name(), }, + crate ::reflection::RemoteProcedureDescriptor { name : "MoveCommand", + plugin_name : "RemoteFortressReader", input_type : + MoveCommandParams::full_name(), output_type : EmptyMessage::full_name(), }, + crate ::reflection::RemoteProcedureDescriptor { name : + "MovementSelectCommand", plugin_name : "RemoteFortressReader", input_type : + IntMessage::full_name(), output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "PassKeyboardEvent", + plugin_name : "RemoteFortressReader", input_type : + KeyboardEvent::full_name(), output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "ResetMapHashes", + plugin_name : "RemoteFortressReader", input_type : EmptyMessage::full_name(), + output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "SendDigCommand", + plugin_name : "RemoteFortressReader", input_type : DigCommand::full_name(), + output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "SetPauseState", plugin_name + : "RemoteFortressReader", input_type : SingleBool::full_name(), output_type : + EmptyMessage::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "SetSideMenu", plugin_name : "RemoteFortressReader", input_type : + SidebarCommand::full_name(), output_type : EmptyMessage::full_name(), }, ] } } @@ -1013,7 +793,7 @@ impl<'a, TChannel: crate::Channel> Mypluginname<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("mypluginname".to_string(), "RenameBuilding".to_string(), request)?; + .request("mypluginname", "RenameBuilding", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -1027,7 +807,7 @@ impl<'a, TChannel: crate::Channel> Mypluginname<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("mypluginname".to_string(), "RenameSquad".to_string(), request)?; + .request("mypluginname", "RenameSquad", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -1041,7 +821,7 @@ impl<'a, TChannel: crate::Channel> Mypluginname<'a, TChannel> { ) -> Result, TChannel::TError> { let _response: crate::Reply = self .channel - .request("mypluginname".to_string(), "RenameUnit".to_string(), request)?; + .request("mypluginname", "RenameUnit", request)?; let _response = crate::Reply { reply: (), fragments: _response.fragments, @@ -1049,23 +829,18 @@ impl<'a, TChannel: crate::Channel> Mypluginname<'a, TChannel> { Ok(_response) } } -#[cfg(feature = "reflection")] impl crate::reflection::StubReflection for Mypluginname<'_, TChannel> { fn list_methods() -> Vec { vec![ - crate ::reflection::RemoteProcedureDescriptor { name : "RenameBuilding" - .to_string(), plugin_name : "mypluginname".to_string(), input_type : - RenameBuildingIn::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "RenameSquad".to_string(), - plugin_name : "mypluginname".to_string(), input_type : - RenameSquadIn::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, crate - ::reflection::RemoteProcedureDescriptor { name : "RenameUnit".to_string(), - plugin_name : "mypluginname".to_string(), input_type : - RenameUnitIn::descriptor().full_name().to_string(), output_type : - EmptyMessage::descriptor().full_name().to_string(), }, + crate ::reflection::RemoteProcedureDescriptor { name : "RenameBuilding", + plugin_name : "mypluginname", input_type : RenameBuildingIn::full_name(), + output_type : EmptyMessage::full_name(), }, crate + ::reflection::RemoteProcedureDescriptor { name : "RenameSquad", plugin_name : + "mypluginname", input_type : RenameSquadIn::full_name(), output_type : + EmptyMessage::full_name(), }, crate ::reflection::RemoteProcedureDescriptor { + name : "RenameUnit", plugin_name : "mypluginname", input_type : + RenameUnitIn::full_name(), output_type : EmptyMessage::full_name(), }, ] } } diff --git a/dfhack-proto/src/lib.rs b/dfhack-proto/src/lib.rs index 6913b7f..519e065 100644 --- a/dfhack-proto/src/lib.rs +++ b/dfhack-proto/src/lib.rs @@ -3,9 +3,23 @@ use std::{fmt::Display, ops::Deref}; +#[allow(clippy::let_unit_value)] +#[allow(missing_docs)] +pub(crate) mod generated { + pub(crate) mod stubs; +} + /// Raw protobuf messages +#[allow(missing_docs)] pub mod messages { - pub use crate::generated::messages::*; + include!("generated/messages/includes.rs"); + pub use adventure_control::*; + pub use dfproto::*; + pub use dfstockpiles::*; + pub use dwarf_control::*; + pub use itemdef_instrument::*; + pub use proto::enums::ui_sidebar_mode::*; + pub use remote_fortress_reader::*; } /// Stubs exposing the feature of the DFHack remote API. @@ -16,6 +30,10 @@ pub mod stubs { pub use crate::generated::stubs::*; } +/// Message exchanged by dfhack-remote +pub trait Message: prost::Message + prost::Name + Default {} +impl Message for T {} + /// The `Channel` is the low-level exchange implementation. /// /// It is in charge to serialize/deserialize messages, and exchange @@ -43,10 +61,10 @@ pub trait Channel { /// /// A protobuf result type. /// - fn request( + fn request( &mut self, - plugin: String, - name: String, + plugin: &'static str, + name: &'static str, request: TRequest, ) -> Result, Self::TError>; } @@ -74,7 +92,6 @@ impl Display for Reply { } } -#[cfg(feature = "reflection")] /// Reflection for runtime inspection of the stubs. pub mod reflection { /// Descriptor of a remote procedure call @@ -82,12 +99,12 @@ pub mod reflection { /// These are all the needed information to make a call pub struct RemoteProcedureDescriptor { /// Name of the RPC - pub name: String, + pub name: &'static str, /// Plugin implementing the RPC /// /// An empty string means the core API - pub plugin_name: String, + pub plugin_name: &'static str, /// Input type /// @@ -108,10 +125,3 @@ pub mod reflection { fn list_methods() -> Vec; } } - -/// Generated code from this crate -#[allow(clippy::let_unit_value)] -mod generated { - pub mod messages; - pub mod stubs; -} diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 99ba3e5..f8936b3 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -1,10 +1,11 @@ fn main() { let mut client = dfhack_remote::connect().unwrap(); let world_info = client.core().get_world_info().unwrap(); + let world_name = world_info.world_name.clone().unwrap().clone(); println!( "Welcome to {} ({})", - world_info.world_name.last_name(), - world_info.world_name.english_name() + world_name.last_name(), + world_name.english_name() ); } diff --git a/examples/read_elevation.rs b/examples/read_elevation.rs index 11662a7..27c8502 100644 --- a/examples/read_elevation.rs +++ b/examples/read_elevation.rs @@ -4,8 +4,8 @@ fn main() { let mut client = dfhack_remote::connect().unwrap(); let world_map = client.remote_fortress_reader().get_world_map_new().unwrap(); - let width = world_map.world_width() as usize; - let height = world_map.world_height() as usize; + let width = world_map.world_width as usize; + let height = world_map.world_height as usize; let mut img = Image::new(width as u32, height as u32); let tiles = &world_map.region_tiles; diff --git a/examples/run.rs b/examples/run.rs index b7312ab..192af69 100644 --- a/examples/run.rs +++ b/examples/run.rs @@ -3,19 +3,25 @@ use dfhack_remote::CoreRunCommandRequest; fn main() { env_logger::init(); let mut client = dfhack_remote::connect().unwrap(); - let mut command = CoreRunCommandRequest::new(); - command.set_command("lua".to_string()); - command.arguments.push("print(dfhack.df2utf(dfhack.TranslateName(df.global.world.world_data.active_site[0].name)))".to_string()); + let command = CoreRunCommandRequest { + command: "lua".to_string(), + arguments: vec![ + "print(dfhack.df2utf(dfhack.translation.translateName(df.global.world.world_data.active_site[0].name)))".to_string() + ] + }; let reply = client.core().run_command(command).unwrap(); - let mut command = CoreRunCommandRequest::new(); - command.set_command("lua".to_string()); - command.arguments.push("print(dfhack.df2utf(dfhack.TranslateName(df.global.world.world_data.active_site[0].name, true)))".to_string()); + let command = CoreRunCommandRequest { + command: "lua".to_string(), + arguments: vec![ + "print(dfhack.df2utf(dfhack.translation.translateName(df.global.world.world_data.active_site[0].name, true)))".to_string() + ] + }; let reply_en = client.core().run_command(command).unwrap(); println!( "The fortress is named {} ({})", - reply.fragments[0].text().trim(), - reply_en.fragments[0].text().trim() + reply.fragments[0].text.trim(), + reply_en.fragments[0].text.trim() ); } diff --git a/src/channel.rs b/src/channel.rs index 36351d2..45e5ebf 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -13,12 +13,12 @@ use crate::{ #[derive(PartialEq, Eq, Hash, Clone)] struct Method { - pub plugin: String, - pub name: String, + pub plugin: &'static str, + pub name: &'static str, } impl Method { - fn new(plugin: String, name: String) -> Self { + fn new(plugin: &'static str, name: &'static str) -> Self { Method { plugin, name } } } @@ -43,13 +43,13 @@ impl dfhack_proto::Channel for Channel { fn request( &mut self, - plugin: std::string::String, - name: std::string::String, + plugin: &'static str, + name: &'static str, request: TRequest, ) -> crate::Result> where - TRequest: protobuf::MessageFull, - TReply: protobuf::MessageFull, + TRequest: crate::Message, + TReply: crate::Message, { let method = Method::new(plugin, name); @@ -85,14 +85,12 @@ impl Channel { bindings: HashMap::new(), }; - client.bindings.insert( - Method::new("".to_string(), "BindMethod".to_string()), - BIND_METHOD_ID, - ); - client.bindings.insert( - Method::new("".to_string(), "RunCommand".to_string()), - RUN_COMMAND_ID, - ); + client + .bindings + .insert(Method::new("", "BindMethod"), BIND_METHOD_ID); + client + .bindings + .insert(Method::new("", "RunCommand"), RUN_COMMAND_ID); let handshake_request = message::Handshake::new(MAGIC_QUERY.to_string(), VERSION); handshake_request.send(&mut client.stream)?; @@ -115,7 +113,7 @@ impl Channel { Ok(client) } - fn request_raw( + fn request_raw( &mut self, id: i16, message: TIN, @@ -129,7 +127,7 @@ impl Channel { match reply { message::Reply::Text(text) => { for fragment in &text.fragments { - log::info!("{}", fragment.text()); + log::info!("{}", fragment.text); } fragments.extend(text.fragments); } @@ -149,15 +147,13 @@ impl Channel { } } - fn bind_method( + fn bind_method( &mut self, method: &Method, ) -> crate::Result { - let input_descriptor = TIN::descriptor(); - let output_descriptor = TOUT::descriptor(); - let input_msg = input_descriptor.full_name(); - let output_msg = output_descriptor.full_name(); - self.bind_method_by_name(&method.plugin, &method.name, input_msg, output_msg) + let input_msg = TIN::full_name(); + let output_msg = TOUT::full_name(); + self.bind_method_by_name(method.plugin, method.name, &input_msg, &output_msg) } fn bind_method_by_name( @@ -168,11 +164,12 @@ impl Channel { output_msg: &str, ) -> crate::Result { log::debug!("Binding the method {}:{}", plugin, method); - let mut request = crate::CoreBindRequest::new(); - request.set_method(method.to_owned()); - request.set_input_msg(input_msg.to_string()); - request.set_output_msg(output_msg.to_string()); - request.set_plugin(plugin.to_owned()); + let request = crate::CoreBindRequest { + method: method.to_string(), + input_msg: input_msg.to_string(), + output_msg: output_msg.to_string(), + plugin: Some(plugin.to_string()), + }; let reply: crate::CoreBindReply = match self.request_raw(BIND_METHOD_ID, request) { Ok(reply) => reply.reply, Err(_) => { @@ -183,7 +180,7 @@ impl Channel { ))); } }; - let id = reply.assigned_id() as i16; + let id = reply.assigned_id as i16; log::debug!("{}:{} bound to {}", plugin, method, id); Ok(id) } @@ -250,7 +247,6 @@ mod tests { } #[test] - #[cfg(feature = "reflection")] fn bind_all() { use dfhack_proto::{reflection::StubReflection, stubs::Stubs}; diff --git a/src/lib.rs b/src/lib.rs index 3f2b9ce..7b5e3c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ pub use channel::Channel; #[doc(no_inline)] pub use dfhack_proto::messages::*; pub use dfhack_proto::stubs::*; +pub use dfhack_proto::Message; pub use dfhack_proto::Reply; use message::CommandResult; @@ -76,12 +77,12 @@ pub enum Error { #[error("protocol error: {0}.")] ProtocolError(String), - /// Protobuf serialization or deserialization error + /// Protobuf deserialization error /// /// This can indicate that updating the generated code /// is necessary #[error("protobuf serialization error: {0}.")] - ProtobufError(#[from] protobuf::Error), + ProtobufError(#[from] prost::DecodeError), /// Failed to bind the method /// @@ -131,7 +132,7 @@ mod tests { #[ctor::ctor] fn init() { - let port = rand::thread_rng().gen_range(49152..65535).to_string(); + let port = rand::rng().random_range(49152..65535).to_string(); std::env::set_var("DFHACK_PORT", port); use std::{path::PathBuf, process::Command}; diff --git a/src/message.rs b/src/message.rs index 69a5638..8e1a4c9 100644 --- a/src/message.rs +++ b/src/message.rs @@ -6,7 +6,7 @@ use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use derive_more::Display; use num_enum::TryFromPrimitive; -use protobuf::Message; +use prost::Message; use std::convert::TryFrom; pub trait Send { @@ -63,12 +63,12 @@ pub struct Header { // https://docs.dfhack.org/en/stable/docs/Remote.html#request #[derive(Display)] #[display("protobuf message id {}", id)] -pub struct Request { +pub struct Request { pub id: i16, pub message: TMessage, } -pub enum Reply { +pub enum Reply { // https://docs.dfhack.org/en/stable/docs/Remote.html#text Text(crate::CoreTextNotification), @@ -152,16 +152,15 @@ impl Receive for Header { } } -impl Request { +impl Request { pub fn new(id: i16, message: TMessage) -> Self { Self { id, message } } } -impl Send for Request { +impl Send for Request { fn send(&self, stream: &mut T) -> crate::Result<()> { - let mut payload: Vec = Vec::new(); - self.message.write_to_vec(&mut payload)?; + let payload: Vec = self.message.encode_to_vec(); let header = Header::new(self.id, payload.len() as i32); log::trace!("Sending protobuf message {}", TMessage::NAME); @@ -172,7 +171,7 @@ impl Send for Request { } } -impl Receive for Reply { +impl Receive for Reply { fn receive(stream: &mut T) -> crate::Result where Self: Sized, @@ -188,8 +187,8 @@ impl Receive for Reply { let mut buf = vec![0u8; header.size as usize]; stream.read_exact(&mut buf)?; log::trace!("Read stream"); - let reply = TMessage::parse_from_bytes(&buf)?; - log::trace!("Received {}", TMessage::descriptor().full_name()); + let reply = TMessage::decode(buf.as_slice())?; + log::trace!("Received {}", TMessage::NAME); Ok(Reply::Result(reply)) } RpcReplyCode::Fail => { @@ -210,7 +209,7 @@ impl Receive for Reply { log::trace!("Receiving RPC_REPLY_TEXT of size {}", header.size); let mut buf = vec![0u8; header.size as usize]; stream.read_exact(&mut buf)?; - let reply = crate::CoreTextNotification::parse_from_bytes(&buf)?; + let reply = crate::CoreTextNotification::decode(buf.as_slice())?; Ok(Reply::Text(reply)) } RpcReplyCode::Quit => Err(crate::Error::ProtocolError(