From a1a468842c3e3c5ca596ecc961b8a6def231b82c Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 14 Mar 2020 11:25:06 -0700 Subject: [PATCH] use derives for item enum to/from str functions --- src/entity/item/armor.rs | 205 +--------- src/entity/item/shield.rs | 359 +---------------- src/entity/item/tool.rs | 3 +- src/entity/item/unit.rs | 6 +- src/entity/item/weapon.rs | 805 +------------------------------------- 5 files changed, 5 insertions(+), 1373 deletions(-) diff --git a/src/entity/item/armor.rs b/src/entity/item/armor.rs index f467ab0..7222a3e 100644 --- a/src/entity/item/armor.rs +++ b/src/entity/item/armor.rs @@ -1,11 +1,7 @@ use std::convert::{TryFrom, Into}; use serde::{Serialize, Deserialize}; -pub enum ArmorTypeError { - UnknownArmor(String) -} - -#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)] pub enum ArmorType { Frame, Armor, @@ -192,201 +188,6 @@ impl ArmorType { } } -impl TryFrom<&str> for ArmorType { - type Error = ArmorTypeError; - fn try_from(value: &str) -> Result { - match value { - "Frame" => Ok(ArmorType::Frame), - "Armor" => Ok(ArmorType::Armor), - "PsyArmor" => Ok(ArmorType::PsyArmor), - "GigaFrame" => Ok(ArmorType::GigaFrame), - "SoulFrame" => Ok(ArmorType::SoulFrame), - "CrossArmor" => Ok(ArmorType::CrossArmor), - "SolidFrame" => Ok(ArmorType::SolidFrame), - "BraveArmor" => Ok(ArmorType::BraveArmor), - "HyperFrame" => Ok(ArmorType::HyperFrame), - "GrandArmor" => Ok(ArmorType::GrandArmor), - "ShockFrame" => Ok(ArmorType::ShockFrame), - "KingsFrame" => Ok(ArmorType::KingsFrame), - "DragonFrame" => Ok(ArmorType::DragonFrame), - "AbsorbArmor" => Ok(ArmorType::AbsorbArmor), - "ProtectFrame" => Ok(ArmorType::ProtectFrame), - "GeneralArmor" => Ok(ArmorType::GeneralArmor), - "PerfectFrame" => Ok(ArmorType::PerfectFrame), - "ValiantFrame" => Ok(ArmorType::ValiantFrame), - "ImperialArmor" => Ok(ArmorType::ImperialArmor), - "HolinessArmor" => Ok(ArmorType::HolinessArmor), - "GuardianArmor" => Ok(ArmorType::GuardianArmor), - "DivinityArmor" => Ok(ArmorType::DivinityArmor), - "UltimateFrame" => Ok(ArmorType::UltimateFrame), - "CelestialArmor" => Ok(ArmorType::CelestialArmor), - "HunterField" => Ok(ArmorType::HunterField), - "RangerField" => Ok(ArmorType::RangerField), - "ForceField" => Ok(ArmorType::ForceField), - "RevivalGarment" => Ok(ArmorType::RevivalGarment), - "SpiritGarment" => Ok(ArmorType::SpiritGarment), - "StinkFrame" => Ok(ArmorType::StinkFrame), - "DPartsver101" => Ok(ArmorType::DPartsver101), - "DPartsver210" => Ok(ArmorType::DPartsver210), - "ParasiteWeardeRol" => Ok(ArmorType::ParasiteWeardeRol), - "ParasiteWearnelgal" => Ok(ArmorType::ParasiteWearnelgal), - "ParasiteWearvajulla" => Ok(ArmorType::ParasiteWearvajulla), - "SensePlate" => Ok(ArmorType::SensePlate), - "GravitonPlate" => Ok(ArmorType::GravitonPlate), - "AttributePlate" => Ok(ArmorType::AttributePlate), - "FlowensFrame" => Ok(ArmorType::FlowensFrame), - "CustomFrameveroo" => Ok(ArmorType::CustomFrameveroo), - "DbsArmor" => Ok(ArmorType::DbsArmor), - "GuardWave" => Ok(ArmorType::GuardWave), - "DfField" => Ok(ArmorType::DfField), - "LuminousField" => Ok(ArmorType::LuminousField), - "ChuChuFever" => Ok(ArmorType::ChuChuFever), - "LoveHeart" => Ok(ArmorType::LoveHeart), - "FlameGarment" => Ok(ArmorType::FlameGarment), - "VirusArmorlafuteria" => Ok(ArmorType::VirusArmorlafuteria), - "BrightnessCircle" => Ok(ArmorType::BrightnessCircle), - "AuraField" => Ok(ArmorType::AuraField), - "ElectroFrame" => Ok(ArmorType::ElectroFrame), - "SacredCloth" => Ok(ArmorType::SacredCloth), - "SmokingPlate" => Ok(ArmorType::SmokingPlate), - "StarCuirass" => Ok(ArmorType::StarCuirass), - "BlackHoundCuirass" => Ok(ArmorType::BlackHoundCuirass), - "MorningPrayer" => Ok(ArmorType::MorningPrayer), - "BlackOdoshiDomaru" => Ok(ArmorType::BlackOdoshiDomaru), - "RedOdoshiDomaru" => Ok(ArmorType::RedOdoshiDomaru), - "BlackOdoshiRedNimaidou" => Ok(ArmorType::BlackOdoshiRedNimaidou), - "BlueOdoshiVioletNimaidou" => Ok(ArmorType::BlueOdoshiVioletNimaidou), - "DirtyLifejacket" => Ok(ArmorType::DirtyLifejacket), - "KroesSweater" => Ok(ArmorType::KroesSweater), - "WeddingDress" => Ok(ArmorType::WeddingDress), - "SonicteamArmor" => Ok(ArmorType::SonicteamArmor), - "RedCoat" => Ok(ArmorType::RedCoat), - "Thirteen" => Ok(ArmorType::Thirteen), - "MotherGarb" => Ok(ArmorType::MotherGarb), - "MotherGarb2" => Ok(ArmorType::MotherGarb2), - "DressPlate" => Ok(ArmorType::DressPlate), - "Sweetheart" => Ok(ArmorType::Sweetheart), - "IgnitionCloak" => Ok(ArmorType::IgnitionCloak), - "CongealCloak" => Ok(ArmorType::CongealCloak), - "TempestCloak" => Ok(ArmorType::TempestCloak), - "CursedCloak" => Ok(ArmorType::CursedCloak), - "SelectCloak" => Ok(ArmorType::SelectCloak), - "SpiritCuirass" => Ok(ArmorType::SpiritCuirass), - "RevivalCuriass" => Ok(ArmorType::RevivalCuriass), - "AllianceUniform" => Ok(ArmorType::AllianceUniform), - "OfficerUniform" => Ok(ArmorType::OfficerUniform), - "CommanderUniform" => Ok(ArmorType::CommanderUniform), - "CrimsonCoat" => Ok(ArmorType::CrimsonCoat), - "InfantryGear" => Ok(ArmorType::InfantryGear), - "LieutenantGear" => Ok(ArmorType::LieutenantGear), - "InfantryMantle" => Ok(ArmorType::InfantryMantle), - "LieutenantMantle" => Ok(ArmorType::LieutenantMantle), - "UnionField" => Ok(ArmorType::UnionField), - "SamuraiArmor" => Ok(ArmorType::SamuraiArmor), - "StealthSuit" => Ok(ArmorType::StealthSuit), - _ => Err(ArmorTypeError::UnknownArmor(value.to_string())) - } - } -} - -impl Into for ArmorType { - fn into(self) -> String { - match self { - ArmorType::Frame => "Frame", - ArmorType::Armor => "Armor", - ArmorType::PsyArmor => "PsyArmor", - ArmorType::GigaFrame => "GigaFrame", - ArmorType::SoulFrame => "SoulFrame", - ArmorType::CrossArmor => "CrossArmor", - ArmorType::SolidFrame => "SolidFrame", - ArmorType::BraveArmor => "BraveArmor", - ArmorType::HyperFrame => "HyperFrame", - ArmorType::GrandArmor => "GrandArmor", - ArmorType::ShockFrame => "ShockFrame", - ArmorType::KingsFrame => "KingsFrame", - ArmorType::DragonFrame => "DragonFrame", - ArmorType::AbsorbArmor => "AbsorbArmor", - ArmorType::ProtectFrame => "ProtectFrame", - ArmorType::GeneralArmor => "GeneralArmor", - ArmorType::PerfectFrame => "PerfectFrame", - ArmorType::ValiantFrame => "ValiantFrame", - ArmorType::ImperialArmor => "ImperialArmor", - ArmorType::HolinessArmor => "HolinessArmor", - ArmorType::GuardianArmor => "GuardianArmor", - ArmorType::DivinityArmor => "DivinityArmor", - ArmorType::UltimateFrame => "UltimateFrame", - ArmorType::CelestialArmor => "CelestialArmor", - ArmorType::HunterField => "HunterField", - ArmorType::RangerField => "RangerField", - ArmorType::ForceField => "ForceField", - ArmorType::RevivalGarment => "RevivalGarment", - ArmorType::SpiritGarment => "SpiritGarment", - ArmorType::StinkFrame => "StinkFrame", - ArmorType::DPartsver101 => "DPartsver101", - ArmorType::DPartsver210 => "DPartsver210", - ArmorType::ParasiteWeardeRol => "ParasiteWeardeRol", - ArmorType::ParasiteWearnelgal => "ParasiteWearnelgal", - ArmorType::ParasiteWearvajulla => "ParasiteWearvajulla", - ArmorType::SensePlate => "SensePlate", - ArmorType::GravitonPlate => "GravitonPlate", - ArmorType::AttributePlate => "AttributePlate", - ArmorType::FlowensFrame => "FlowensFrame", - ArmorType::CustomFrameveroo => "CustomFrameveroo", - ArmorType::DbsArmor => "DbsArmor", - ArmorType::GuardWave => "GuardWave", - ArmorType::DfField => "DfField", - ArmorType::LuminousField => "LuminousField", - ArmorType::ChuChuFever => "ChuChuFever", - ArmorType::LoveHeart => "LoveHeart", - ArmorType::FlameGarment => "FlameGarment", - ArmorType::VirusArmorlafuteria => "VirusArmorlafuteria", - ArmorType::BrightnessCircle => "BrightnessCircle", - ArmorType::AuraField => "AuraField", - ArmorType::ElectroFrame => "ElectroFrame", - ArmorType::SacredCloth => "SacredCloth", - ArmorType::SmokingPlate => "SmokingPlate", - ArmorType::StarCuirass => "StarCuirass", - ArmorType::BlackHoundCuirass => "BlackHoundCuirass", - ArmorType::MorningPrayer => "MorningPrayer", - ArmorType::BlackOdoshiDomaru => "BlackOdoshiDomaru", - ArmorType::RedOdoshiDomaru => "RedOdoshiDomaru", - ArmorType::BlackOdoshiRedNimaidou => "BlackOdoshiRedNimaidou", - ArmorType::BlueOdoshiVioletNimaidou => "BlueOdoshiVioletNimaidou", - ArmorType::DirtyLifejacket => "DirtyLifejacket", - ArmorType::KroesSweater => "KroesSweater", - ArmorType::WeddingDress => "WeddingDress", - ArmorType::SonicteamArmor => "SonicteamArmor", - ArmorType::RedCoat => "RedCoat", - ArmorType::Thirteen => "Thirteen", - ArmorType::MotherGarb => "MotherGarb", - ArmorType::MotherGarb2 => "MotherGarb2", - ArmorType::DressPlate => "DressPlate", - ArmorType::Sweetheart => "Sweetheart", - ArmorType::IgnitionCloak => "IgnitionCloak", - ArmorType::CongealCloak => "CongealCloak", - ArmorType::TempestCloak => "TempestCloak", - ArmorType::CursedCloak => "CursedCloak", - ArmorType::SelectCloak => "SelectCloak", - ArmorType::SpiritCuirass => "SpiritCuirass", - ArmorType::RevivalCuriass => "RevivalCuriass", - ArmorType::AllianceUniform => "AllianceUniform", - ArmorType::OfficerUniform => "OfficerUniform", - ArmorType::CommanderUniform => "CommanderUniform", - ArmorType::CrimsonCoat => "CrimsonCoat", - ArmorType::InfantryGear => "InfantryGear", - ArmorType::LieutenantGear => "LieutenantGear", - ArmorType::InfantryMantle => "InfantryMantle", - ArmorType::LieutenantMantle => "LieutenantMantle", - ArmorType::UnionField => "UnionField", - ArmorType::SamuraiArmor => "SamuraiArmor", - ArmorType::StealthSuit => "StealthSuit", - }.to_string() - } -} - -// TODO: TryFrom<&str> maybe done check please -// TODO Into ^^ - #[derive(Debug, Copy, Clone, PartialEq)] pub struct Armor { @@ -396,10 +197,6 @@ pub struct Armor { pub slots: u8, } - - - - impl Armor { pub fn as_bytes(&self) -> [u8; 16] { let mut result = [0; 16]; diff --git a/src/entity/item/shield.rs b/src/entity/item/shield.rs index fb58f81..243da71 100644 --- a/src/entity/item/shield.rs +++ b/src/entity/item/shield.rs @@ -1,10 +1,6 @@ use std::convert::{TryFrom, Into}; -pub enum ShieldTypeError { - UnknownShield(String) -} - -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)] pub enum ShieldType { Barrier, Shield, @@ -345,355 +341,6 @@ impl ShieldType { } } -impl TryFrom<&str> for ShieldType { - type Error = ShieldTypeError; - fn try_from(value: &str) -> Result { - match value { - "Barrier" => Ok(ShieldType::Barrier), - "Shield" => Ok(ShieldType::Shield), - "CoreShield" => Ok(ShieldType::CoreShield), - "GigaShield" => Ok(ShieldType::GigaShield), - "SoulBarrier" => Ok(ShieldType::SoulBarrier), - "HardShield" => Ok(ShieldType::HardShield), - "BraveBarrier" => Ok(ShieldType::BraveBarrier), - "SolidShield" => Ok(ShieldType::SolidShield), - "FlameBarrier" => Ok(ShieldType::FlameBarrier), - "PlasmaBarrier" => Ok(ShieldType::PlasmaBarrier), - "FreezeBarrier" => Ok(ShieldType::FreezeBarrier), - "PsychicBarrier" => Ok(ShieldType::PsychicBarrier), - "GeneralShield" => Ok(ShieldType::GeneralShield), - "ProtectBarrier" => Ok(ShieldType::ProtectBarrier), - "GloriousShield" => Ok(ShieldType::GloriousShield), - "ImperialBarrier" => Ok(ShieldType::ImperialBarrier), - "GuardianShield" => Ok(ShieldType::GuardianShield), - "DivinityBarrier" => Ok(ShieldType::DivinityBarrier), - "UltimateShield" => Ok(ShieldType::UltimateShield), - "SpiritualShield" => Ok(ShieldType::SpiritualShield), - "CelestialShield" => Ok(ShieldType::CelestialShield), - "InvisibleGuard" => Ok(ShieldType::InvisibleGuard), - "SacredGuard" => Ok(ShieldType::SacredGuard), - "SPartsver116" => Ok(ShieldType::SPartsver116), - "SPartsver201" => Ok(ShieldType::SPartsver201), - "LightRelief" => Ok(ShieldType::LightRelief), - "ShieldOfDelsaber" => Ok(ShieldType::ShieldOfDelsaber), - "ForceWall" => Ok(ShieldType::ForceWall), - "RangerWall" => Ok(ShieldType::RangerWall), - "HunterWall" => Ok(ShieldType::HunterWall), - "AttributeWall" => Ok(ShieldType::AttributeWall), - "SecretGear" => Ok(ShieldType::SecretGear), - "CombatGear" => Ok(ShieldType::CombatGear), - "ProtoRegeneGear" => Ok(ShieldType::ProtoRegeneGear), - "RegenerateGear" => Ok(ShieldType::RegenerateGear), - "RegeneGearAdv" => Ok(ShieldType::RegeneGearAdv), - "FlowensShield" => Ok(ShieldType::FlowensShield), - "CustomBarrierveroo" => Ok(ShieldType::CustomBarrierveroo), - "DbsShield" => Ok(ShieldType::DbsShield), - "RedRing" => Ok(ShieldType::RedRing), - "TripolicShield" => Ok(ShieldType::TripolicShield), - "StandstillShield" => Ok(ShieldType::StandstillShield), - "SafetyHeart" => Ok(ShieldType::SafetyHeart), - "KasamiBracer" => Ok(ShieldType::KasamiBracer), - "GodsShieldSuzaku" => Ok(ShieldType::GodsShieldSuzaku), - "GodsShieldGenbu" => Ok(ShieldType::GodsShieldGenbu), - "GodsShieldByakko" => Ok(ShieldType::GodsShieldByakko), - "GodsShieldSeiryu" => Ok(ShieldType::GodsShieldSeiryu), - "HuntersShell" => Ok(ShieldType::HuntersShell), - "RicosGlasses" => Ok(ShieldType::RicosGlasses), - "RicosEarring" => Ok(ShieldType::RicosEarring), - "BlueRing" => Ok(ShieldType::BlueRing), - "Barrier2" => Ok(ShieldType::Barrier2), - "SecureFeet" => Ok(ShieldType::SecureFeet), - "Barrier3" => Ok(ShieldType::Barrier3), - "Barrier4" => Ok(ShieldType::Barrier4), - "Barrier5" => Ok(ShieldType::Barrier5), - "Barrier6" => Ok(ShieldType::Barrier6), - "RestaMerge" => Ok(ShieldType::RestaMerge), - "AntiMerge" => Ok(ShieldType::AntiMerge), - "ShiftaMerge" => Ok(ShieldType::ShiftaMerge), - "DebandMerge" => Ok(ShieldType::DebandMerge), - "FoieMerge" => Ok(ShieldType::FoieMerge), - "GifoieMerge" => Ok(ShieldType::GifoieMerge), - "RafoieMerge" => Ok(ShieldType::RafoieMerge), - "RedMerge" => Ok(ShieldType::RedMerge), - "BartaMerge" => Ok(ShieldType::BartaMerge), - "GibartaMerge" => Ok(ShieldType::GibartaMerge), - "RabartaMerge" => Ok(ShieldType::RabartaMerge), - "BlueMerge" => Ok(ShieldType::BlueMerge), - "ZondeMerge" => Ok(ShieldType::ZondeMerge), - "GizondeMerge" => Ok(ShieldType::GizondeMerge), - "RazondeMerge" => Ok(ShieldType::RazondeMerge), - "YellowMerge" => Ok(ShieldType::YellowMerge), - "RecoveryBarrier" => Ok(ShieldType::RecoveryBarrier), - "AssistBarrier" => Ok(ShieldType::AssistBarrier), - "RedBarrier" => Ok(ShieldType::RedBarrier), - "BlueBarrier" => Ok(ShieldType::BlueBarrier), - "YellowBarrier" => Ok(ShieldType::YellowBarrier), - "WeaponsGoldShield" => Ok(ShieldType::WeaponsGoldShield), - "BlackGear" => Ok(ShieldType::BlackGear), - "WorksGuard" => Ok(ShieldType::WorksGuard), - "RagolRing" => Ok(ShieldType::RagolRing), - "BlueRing2" => Ok(ShieldType::BlueRing2), - "BlueRing3" => Ok(ShieldType::BlueRing3), - "BlueRing4" => Ok(ShieldType::BlueRing4), - "BlueRing5" => Ok(ShieldType::BlueRing5), - "BlueRing6" => Ok(ShieldType::BlueRing6), - "BlueRing7" => Ok(ShieldType::BlueRing7), - "BlueRing8" => Ok(ShieldType::BlueRing8), - "BlueRing9" => Ok(ShieldType::BlueRing9), - "GreenRing" => Ok(ShieldType::GreenRing), - "GreenRing2" => Ok(ShieldType::GreenRing2), - "GreenRing3" => Ok(ShieldType::GreenRing3), - "GreenRing4" => Ok(ShieldType::GreenRing4), - "GreenRing5" => Ok(ShieldType::GreenRing5), - "GreenRing6" => Ok(ShieldType::GreenRing6), - "GreenRing7" => Ok(ShieldType::GreenRing7), - "GreenRing8" => Ok(ShieldType::GreenRing8), - "YellowRing" => Ok(ShieldType::YellowRing), - "YellowRing2" => Ok(ShieldType::YellowRing2), - "YellowRing3" => Ok(ShieldType::YellowRing3), - "YellowRing4" => Ok(ShieldType::YellowRing4), - "YellowRing5" => Ok(ShieldType::YellowRing5), - "YellowRing6" => Ok(ShieldType::YellowRing6), - "YellowRing7" => Ok(ShieldType::YellowRing7), - "YellowRing8" => Ok(ShieldType::YellowRing8), - "PurpleRing" => Ok(ShieldType::PurpleRing), - "PurpleRing2" => Ok(ShieldType::PurpleRing2), - "PurpleRing3" => Ok(ShieldType::PurpleRing3), - "PurpleRing4" => Ok(ShieldType::PurpleRing4), - "PurpleRing5" => Ok(ShieldType::PurpleRing5), - "PurpleRing6" => Ok(ShieldType::PurpleRing6), - "PurpleRing7" => Ok(ShieldType::PurpleRing7), - "PurpleRing8" => Ok(ShieldType::PurpleRing8), - "WhiteRing" => Ok(ShieldType::WhiteRing), - "WhiteRing2" => Ok(ShieldType::WhiteRing2), - "WhiteRing3" => Ok(ShieldType::WhiteRing3), - "WhiteRing4" => Ok(ShieldType::WhiteRing4), - "WhiteRing5" => Ok(ShieldType::WhiteRing5), - "WhiteRing6" => Ok(ShieldType::WhiteRing6), - "WhiteRing7" => Ok(ShieldType::WhiteRing7), - "WhiteRing8" => Ok(ShieldType::WhiteRing8), - "BlackRing" => Ok(ShieldType::BlackRing), - "BlackRing2" => Ok(ShieldType::BlackRing2), - "BlackRing3" => Ok(ShieldType::BlackRing3), - "BlackRing4" => Ok(ShieldType::BlackRing4), - "BlackRing5" => Ok(ShieldType::BlackRing5), - "BlackRing6" => Ok(ShieldType::BlackRing6), - "BlackRing7" => Ok(ShieldType::BlackRing7), - "BlackRing8" => Ok(ShieldType::BlackRing8), - "WeaponsSilverShield" => Ok(ShieldType::WeaponsSilverShield), - "WeaponsCopperShield" => Ok(ShieldType::WeaponsCopperShield), - "Gratia" => Ok(ShieldType::Gratia), - "TripolicReflector" => Ok(ShieldType::TripolicReflector), - "StrikerPlus" => Ok(ShieldType::StrikerPlus), - "RegenerateGearBP" => Ok(ShieldType::RegenerateGearBP), - "Rupika" => Ok(ShieldType::Rupika), - "YataMirror" => Ok(ShieldType::YataMirror), - "BunnyEars" => Ok(ShieldType::BunnyEars), - "CatEars" => Ok(ShieldType::CatEars), - "ThreeSeals" => Ok(ShieldType::ThreeSeals), - "GodsShieldkouryu" => Ok(ShieldType::GodsShieldkouryu), - "DfShield" => Ok(ShieldType::DfShield), - "FromTheDepths" => Ok(ShieldType::FromTheDepths), - "DeRolLeShield" => Ok(ShieldType::DeRolLeShield), - "HoneycombReflector" => Ok(ShieldType::HoneycombReflector), - "Epsiguard" => Ok(ShieldType::Epsiguard), - "AngelRing" => Ok(ShieldType::AngelRing), - "UnionGuard" => Ok(ShieldType::UnionGuard), - "UnionGuard2" => Ok(ShieldType::UnionGuard2), - "UnionGuard3" => Ok(ShieldType::UnionGuard3), - "UnionGuard4" => Ok(ShieldType::UnionGuard4), - "StinkShield" => Ok(ShieldType::StinkShield), - "Unknownb" => Ok(ShieldType::Unknownb), - "Genpei" => Ok(ShieldType::Genpei), - "Genpei2" => Ok(ShieldType::Genpei2), - "Genpei3" => Ok(ShieldType::Genpei3), - "Genpei4" => Ok(ShieldType::Genpei4), - "Genpei5" => Ok(ShieldType::Genpei5), - "Genpei6" => Ok(ShieldType::Genpei6), - "Genpei7" => Ok(ShieldType::Genpei7), - "Genpei8" => Ok(ShieldType::Genpei8), - "Genpei9" => Ok(ShieldType::Genpei9), - "Genpei10" => Ok(ShieldType::Genpei10), - _ => Err(ShieldTypeError::UnknownShield(value.to_string())) - } - } -} - -impl Into for ShieldType { - fn into(self) -> String { - match self { - ShieldType::Barrier => "Barrier", - ShieldType::Shield => "Shield", - ShieldType::CoreShield => "CoreShield", - ShieldType::GigaShield => "GigaShield", - ShieldType::SoulBarrier => "SoulBarrier", - ShieldType::HardShield => "HardShield", - ShieldType::BraveBarrier => "BraveBarrier", - ShieldType::SolidShield => "SolidShield", - ShieldType::FlameBarrier => "FlameBarrier", - ShieldType::PlasmaBarrier => "PlasmaBarrier", - ShieldType::FreezeBarrier => "FreezeBarrier", - ShieldType::PsychicBarrier => "PsychicBarrier", - ShieldType::GeneralShield => "GeneralShield", - ShieldType::ProtectBarrier => "ProtectBarrier", - ShieldType::GloriousShield => "GloriousShield", - ShieldType::ImperialBarrier => "ImperialBarrier", - ShieldType::GuardianShield => "GuardianShield", - ShieldType::DivinityBarrier => "DivinityBarrier", - ShieldType::UltimateShield => "UltimateShield", - ShieldType::SpiritualShield => "SpiritualShield", - ShieldType::CelestialShield => "CelestialShield", - ShieldType::InvisibleGuard => "InvisibleGuard", - ShieldType::SacredGuard => "SacredGuard", - ShieldType::SPartsver116 => "SPartsver116", - ShieldType::SPartsver201 => "SPartsver201", - ShieldType::LightRelief => "LightRelief", - ShieldType::ShieldOfDelsaber => "ShieldOfDelsaber", - ShieldType::ForceWall => "ForceWall", - ShieldType::RangerWall => "RangerWall", - ShieldType::HunterWall => "HunterWall", - ShieldType::AttributeWall => "AttributeWall", - ShieldType::SecretGear => "SecretGear", - ShieldType::CombatGear => "CombatGear", - ShieldType::ProtoRegeneGear => "ProtoRegeneGear", - ShieldType::RegenerateGear => "RegenerateGear", - ShieldType::RegeneGearAdv => "RegeneGearAdv", - ShieldType::FlowensShield => "FlowensShield", - ShieldType::CustomBarrierveroo => "CustomBarrierveroo", - ShieldType::DbsShield => "DbsShield", - ShieldType::RedRing => "RedRing", - ShieldType::TripolicShield => "TripolicShield", - ShieldType::StandstillShield => "StandstillShield", - ShieldType::SafetyHeart => "SafetyHeart", - ShieldType::KasamiBracer => "KasamiBracer", - ShieldType::GodsShieldSuzaku => "GodsShieldSuzaku", - ShieldType::GodsShieldGenbu => "GodsShieldGenbu", - ShieldType::GodsShieldByakko => "GodsShieldByakko", - ShieldType::GodsShieldSeiryu => "GodsShieldSeiryu", - ShieldType::HuntersShell => "HuntersShell", - ShieldType::RicosGlasses => "RicosGlasses", - ShieldType::RicosEarring => "RicosEarring", - ShieldType::BlueRing => "BlueRing", - ShieldType::Barrier2 => "Barrier2", - ShieldType::SecureFeet => "SecureFeet", - ShieldType::Barrier3 => "Barrier3", - ShieldType::Barrier4 => "Barrier4", - ShieldType::Barrier5 => "Barrier5", - ShieldType::Barrier6 => "Barrier6", - ShieldType::RestaMerge => "RestaMerge", - ShieldType::AntiMerge => "AntiMerge", - ShieldType::ShiftaMerge => "ShiftaMerge", - ShieldType::DebandMerge => "DebandMerge", - ShieldType::FoieMerge => "FoieMerge", - ShieldType::GifoieMerge => "GifoieMerge", - ShieldType::RafoieMerge => "RafoieMerge", - ShieldType::RedMerge => "RedMerge", - ShieldType::BartaMerge => "BartaMerge", - ShieldType::GibartaMerge => "GibartaMerge", - ShieldType::RabartaMerge => "RabartaMerge", - ShieldType::BlueMerge => "BlueMerge", - ShieldType::ZondeMerge => "ZondeMerge", - ShieldType::GizondeMerge => "GizondeMerge", - ShieldType::RazondeMerge => "RazondeMerge", - ShieldType::YellowMerge => "YellowMerge", - ShieldType::RecoveryBarrier => "RecoveryBarrier", - ShieldType::AssistBarrier => "AssistBarrier", - ShieldType::RedBarrier => "RedBarrier", - ShieldType::BlueBarrier => "BlueBarrier", - ShieldType::YellowBarrier => "YellowBarrier", - ShieldType::WeaponsGoldShield => "WeaponsGoldShield", - ShieldType::BlackGear => "BlackGear", - ShieldType::WorksGuard => "WorksGuard", - ShieldType::RagolRing => "RagolRing", - ShieldType::BlueRing2 => "BlueRing2", - ShieldType::BlueRing3 => "BlueRing3", - ShieldType::BlueRing4 => "BlueRing4", - ShieldType::BlueRing5 => "BlueRing5", - ShieldType::BlueRing6 => "BlueRing6", - ShieldType::BlueRing7 => "BlueRing7", - ShieldType::BlueRing8 => "BlueRing8", - ShieldType::BlueRing9 => "BlueRing9", - ShieldType::GreenRing => "GreenRing", - ShieldType::GreenRing2 => "GreenRing2", - ShieldType::GreenRing3 => "GreenRing3", - ShieldType::GreenRing4 => "GreenRing4", - ShieldType::GreenRing5 => "GreenRing5", - ShieldType::GreenRing6 => "GreenRing6", - ShieldType::GreenRing7 => "GreenRing7", - ShieldType::GreenRing8 => "GreenRing8", - ShieldType::YellowRing => "YellowRing", - ShieldType::YellowRing2 => "YellowRing2", - ShieldType::YellowRing3 => "YellowRing3", - ShieldType::YellowRing4 => "YellowRing4", - ShieldType::YellowRing5 => "YellowRing5", - ShieldType::YellowRing6 => "YellowRing6", - ShieldType::YellowRing7 => "YellowRing7", - ShieldType::YellowRing8 => "YellowRing8", - ShieldType::PurpleRing => "PurpleRing", - ShieldType::PurpleRing2 => "PurpleRing2", - ShieldType::PurpleRing3 => "PurpleRing3", - ShieldType::PurpleRing4 => "PurpleRing4", - ShieldType::PurpleRing5 => "PurpleRing5", - ShieldType::PurpleRing6 => "PurpleRing6", - ShieldType::PurpleRing7 => "PurpleRing7", - ShieldType::PurpleRing8 => "PurpleRing8", - ShieldType::WhiteRing => "WhiteRing", - ShieldType::WhiteRing2 => "WhiteRing2", - ShieldType::WhiteRing3 => "WhiteRing3", - ShieldType::WhiteRing4 => "WhiteRing4", - ShieldType::WhiteRing5 => "WhiteRing5", - ShieldType::WhiteRing6 => "WhiteRing6", - ShieldType::WhiteRing7 => "WhiteRing7", - ShieldType::WhiteRing8 => "WhiteRing8", - ShieldType::BlackRing => "BlackRing", - ShieldType::BlackRing2 => "BlackRing2", - ShieldType::BlackRing3 => "BlackRing3", - ShieldType::BlackRing4 => "BlackRing4", - ShieldType::BlackRing5 => "BlackRing5", - ShieldType::BlackRing6 => "BlackRing6", - ShieldType::BlackRing7 => "BlackRing7", - ShieldType::BlackRing8 => "BlackRing8", - ShieldType::WeaponsSilverShield => "WeaponsSilverShield", - ShieldType::WeaponsCopperShield => "WeaponsCopperShield", - ShieldType::Gratia => "Gratia", - ShieldType::TripolicReflector => "TripolicReflector", - ShieldType::StrikerPlus => "StrikerPlus", - ShieldType::RegenerateGearBP => "RegenerateGearBP", - ShieldType::Rupika => "Rupika", - ShieldType::YataMirror => "YataMirror", - ShieldType::BunnyEars => "BunnyEars", - ShieldType::CatEars => "CatEars", - ShieldType::ThreeSeals => "ThreeSeals", - ShieldType::GodsShieldkouryu => "GodsShieldkouryu", - ShieldType::DfShield => "DfShield", - ShieldType::FromTheDepths => "FromTheDepths", - ShieldType::DeRolLeShield => "DeRolLeShield", - ShieldType::HoneycombReflector => "HoneycombReflector", - ShieldType::Epsiguard => "Epsiguard", - ShieldType::AngelRing => "AngelRing", - ShieldType::UnionGuard => "UnionGuard", - ShieldType::UnionGuard2 => "UnionGuard2", - ShieldType::UnionGuard3 => "UnionGuard3", - ShieldType::UnionGuard4 => "UnionGuard4", - ShieldType::StinkShield => "StinkShield", - ShieldType::Unknownb => "Unknownb", - ShieldType::Genpei => "Genpei", - ShieldType::Genpei2 => "Genpei2", - ShieldType::Genpei3 => "Genpei3", - ShieldType::Genpei4 => "Genpei4", - ShieldType::Genpei5 => "Genpei5", - ShieldType::Genpei6 => "Genpei6", - ShieldType::Genpei7 => "Genpei7", - ShieldType::Genpei8 => "Genpei8", - ShieldType::Genpei9 => "Genpei9", - ShieldType::Genpei10 => "Genpei10", - }.to_string() - } -} - -// TODO: TryFrom<&str> done maybe - wilson someone with braincells check -// TODO Into ^^ - #[derive(Debug, Copy, Clone, PartialEq)] pub struct Shield { @@ -702,10 +349,6 @@ pub struct Shield { pub evp: u8, } - - - - impl Shield { pub fn as_bytes(&self) -> [u8; 16] { let mut result = [0; 16]; diff --git a/src/entity/item/tool.rs b/src/entity/item/tool.rs index a4737c6..4bf3efc 100644 --- a/src/entity/item/tool.rs +++ b/src/entity/item/tool.rs @@ -1,6 +1,6 @@ -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)] pub enum ToolType { Monomate, Dimate, @@ -541,7 +541,6 @@ impl ToolType { } - #[derive(Debug, Copy, Clone, PartialEq)] pub struct StackedTool { pub tool: ToolType, diff --git a/src/entity/item/unit.rs b/src/entity/item/unit.rs index 0f7b326..e6ef8fe 100644 --- a/src/entity/item/unit.rs +++ b/src/entity/item/unit.rs @@ -1,11 +1,7 @@ use std::convert::{TryFrom, Into}; -pub enum UnitTypeError { - UnknownUnit(String) -} - -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)] pub enum UnitType { None } diff --git a/src/entity/item/weapon.rs b/src/entity/item/weapon.rs index 0dd211a..3d11e6d 100644 --- a/src/entity/item/weapon.rs +++ b/src/entity/item/weapon.rs @@ -62,11 +62,7 @@ pub enum WeaponSpecial { Demons, } -pub enum WeaponTypeError { - UnknownWeapon(String) -} - -#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)] pub enum WeaponType { Saber, Brand, @@ -859,805 +855,6 @@ impl WeaponType { } } -impl TryFrom<&str> for WeaponType { - type Error = WeaponTypeError; - fn try_from(value: &str) -> Result { - match value { - "Saber" => Ok(WeaponType::Saber), - "Brand" => Ok(WeaponType::Brand), - "Buster" => Ok(WeaponType::Buster), - "Pallasch" => Ok(WeaponType::Pallasch), - "Gladius" => Ok(WeaponType::Gladius), - "DbsSaber" => Ok(WeaponType::DbsSaber), - "Kaladbolg" => Ok(WeaponType::Kaladbolg), - "Durandal" => Ok(WeaponType::Durandal), - "Galatine" => Ok(WeaponType::Galatine), - "Sword" => Ok(WeaponType::Sword), - "Gigush" => Ok(WeaponType::Gigush), - "Breaker" => Ok(WeaponType::Breaker), - "Claymore" => Ok(WeaponType::Claymore), - "Calibur" => Ok(WeaponType::Calibur), - "FlowensSword" => Ok(WeaponType::FlowensSword), - "LastSurvivor" => Ok(WeaponType::LastSurvivor), - "DragonSlayer" => Ok(WeaponType::DragonSlayer), - "Dagger" => Ok(WeaponType::Dagger), - "Knife" => Ok(WeaponType::Knife), - "Blade" => Ok(WeaponType::Blade), - "Edge" => Ok(WeaponType::Edge), - "Ripper" => Ok(WeaponType::Ripper), - "BladeDance" => Ok(WeaponType::BladeDance), - "BloodyArt" => Ok(WeaponType::BloodyArt), - "CrossScar" => Ok(WeaponType::CrossScar), - "ZeroDivide" => Ok(WeaponType::ZeroDivide), - "TwoKamui" => Ok(WeaponType::TwoKamui), - "Partisan" => Ok(WeaponType::Partisan), - "Halbert" => Ok(WeaponType::Halbert), - "Glaive" => Ok(WeaponType::Glaive), - "Berdys" => Ok(WeaponType::Berdys), - "Gungnir" => Ok(WeaponType::Gungnir), - "Brionac" => Ok(WeaponType::Brionac), - "Vjaya" => Ok(WeaponType::Vjaya), - "GaeBolg" => Ok(WeaponType::GaeBolg), - "AsteronBelt" => Ok(WeaponType::AsteronBelt), - "Slicer" => Ok(WeaponType::Slicer), - "Spinner" => Ok(WeaponType::Spinner), - "Cutter" => Ok(WeaponType::Cutter), - "Sawcer" => Ok(WeaponType::Sawcer), - "Diska" => Ok(WeaponType::Diska), - "SlicerOfAssassin" => Ok(WeaponType::SlicerOfAssassin), - "DiskaOfLiberator" => Ok(WeaponType::DiskaOfLiberator), - "DiskaOfBraveman" => Ok(WeaponType::DiskaOfBraveman), - "Izmaela" => Ok(WeaponType::Izmaela), - "Handgun" => Ok(WeaponType::Handgun), - "Autogun" => Ok(WeaponType::Autogun), - "Lockgun" => Ok(WeaponType::Lockgun), - "Railgun" => Ok(WeaponType::Railgun), - "Raygun" => Ok(WeaponType::Raygun), - "Varista" => Ok(WeaponType::Varista), - "CustomRayveroo" => Ok(WeaponType::CustomRayveroo), - "Bravace" => Ok(WeaponType::Bravace), - "TensionBlaster" => Ok(WeaponType::TensionBlaster), - "Rifle" => Ok(WeaponType::Rifle), - "Sniper" => Ok(WeaponType::Sniper), - "Blaster" => Ok(WeaponType::Blaster), - "Beam" => Ok(WeaponType::Beam), - "Laser" => Ok(WeaponType::Laser), - "Visk235w" => Ok(WeaponType::Visk235w), - "Walsmk2" => Ok(WeaponType::Walsmk2), - "Justy23st" => Ok(WeaponType::Justy23st), - "Rianov303snr" => Ok(WeaponType::Rianov303snr), - "Rianov303snr1" => Ok(WeaponType::Rianov303snr1), - "Rianov303snr2" => Ok(WeaponType::Rianov303snr2), - "Rianov303snr3" => Ok(WeaponType::Rianov303snr3), - "Rianov303snr4" => Ok(WeaponType::Rianov303snr4), - "Rianov303snr5" => Ok(WeaponType::Rianov303snr5), - "Mechgun" => Ok(WeaponType::Mechgun), - "Assault" => Ok(WeaponType::Assault), - "Repeater" => Ok(WeaponType::Repeater), - "Gatling" => Ok(WeaponType::Gatling), - "Vulcan" => Ok(WeaponType::Vulcan), - "MA60Vise" => Ok(WeaponType::MA60Vise), - "HS25Justice" => Ok(WeaponType::HS25Justice), - "LK14Combat" => Ok(WeaponType::LK14Combat), - "Shot" => Ok(WeaponType::Shot), - "Spread" => Ok(WeaponType::Spread), - "Cannon" => Ok(WeaponType::Cannon), - "Launcher" => Ok(WeaponType::Launcher), - "Arms" => Ok(WeaponType::Arms), - "CrushBullet" => Ok(WeaponType::CrushBullet), - "MeteorSmash" => Ok(WeaponType::MeteorSmash), - "FinalImpact" => Ok(WeaponType::FinalImpact), - "Cane" => Ok(WeaponType::Cane), - "Stick" => Ok(WeaponType::Stick), - "Mace" => Ok(WeaponType::Mace), - "Club" => Ok(WeaponType::Club), - "ClubOfLaconium" => Ok(WeaponType::ClubOfLaconium), - "MaceOfAdaman" => Ok(WeaponType::MaceOfAdaman), - "ClubOfZumiuran" => Ok(WeaponType::ClubOfZumiuran), - "Lollipop" => Ok(WeaponType::Lollipop), - "Rod" => Ok(WeaponType::Rod), - "Pole" => Ok(WeaponType::Pole), - "Pillar" => Ok(WeaponType::Pillar), - "Striker" => Ok(WeaponType::Striker), - "BattleVerge" => Ok(WeaponType::BattleVerge), - "BraveHammer" => Ok(WeaponType::BraveHammer), - "AliveAqhu" => Ok(WeaponType::AliveAqhu), - "Valkyrie" => Ok(WeaponType::Valkyrie), - "Wand" => Ok(WeaponType::Wand), - "Staff" => Ok(WeaponType::Staff), - "Baton" => Ok(WeaponType::Baton), - "Scepter" => Ok(WeaponType::Scepter), - "FireScepteragni" => Ok(WeaponType::FireScepteragni), - "IceStaffdagon" => Ok(WeaponType::IceStaffdagon), - "StormWandindra" => Ok(WeaponType::StormWandindra), - "EarthWandBrownie" => Ok(WeaponType::EarthWandBrownie), - "PhotonClaw" => Ok(WeaponType::PhotonClaw), - "SilenceClaw" => Ok(WeaponType::SilenceClaw), - "NeisClaw" => Ok(WeaponType::NeisClaw), - "PhoenixClaw" => Ok(WeaponType::PhoenixClaw), - "DoubleSaber" => Ok(WeaponType::DoubleSaber), - "StagCutlery" => Ok(WeaponType::StagCutlery), - "TwinBrand" => Ok(WeaponType::TwinBrand), - "BraveKnuckle" => Ok(WeaponType::BraveKnuckle), - "AngryFist" => Ok(WeaponType::AngryFist), - "GodHand" => Ok(WeaponType::GodHand), - "SonicKnuckle" => Ok(WeaponType::SonicKnuckle), - "Login" => Ok(WeaponType::Login), - "Orotiagito" => Ok(WeaponType::Orotiagito), - "Agito1975" => Ok(WeaponType::Agito1975), - "Agito1983" => Ok(WeaponType::Agito1983), - "Agito2001" => Ok(WeaponType::Agito2001), - "Agito1991" => Ok(WeaponType::Agito1991), - "Agito1977" => Ok(WeaponType::Agito1977), - "Agito1980" => Ok(WeaponType::Agito1980), - "Raikiri" => Ok(WeaponType::Raikiri), - "SoulEater" => Ok(WeaponType::SoulEater), - "SoulBanish" => Ok(WeaponType::SoulBanish), - "SpreadNeedle" => Ok(WeaponType::SpreadNeedle), - "HolyRay" => Ok(WeaponType::HolyRay), - "InfernoBazooka" => Ok(WeaponType::InfernoBazooka), - "RamblingMay" => Ok(WeaponType::RamblingMay), - "LK38Combat" => Ok(WeaponType::LK38Combat), - "FlameVisit" => Ok(WeaponType::FlameVisit), - "BurningVisit" => Ok(WeaponType::BurningVisit), - "AkikosFryingPan" => Ok(WeaponType::AkikosFryingPan), - "SorcerersCane" => Ok(WeaponType::SorcerersCane), - "SBeatsBlade" => Ok(WeaponType::SBeatsBlade), - "PArmssBlade" => Ok(WeaponType::PArmssBlade), - "DelsabersBuster" => Ok(WeaponType::DelsabersBuster), - "BringersRifle" => Ok(WeaponType::BringersRifle), - "EggBlaster" => Ok(WeaponType::EggBlaster), - "PsychoWand" => Ok(WeaponType::PsychoWand), - "HeavenPunisher" => Ok(WeaponType::HeavenPunisher), - "LavisCannon" => Ok(WeaponType::LavisCannon), - "VictorAxe" => Ok(WeaponType::VictorAxe), - "LaconiumAxe" => Ok(WeaponType::LaconiumAxe), - "ChainSawd" => Ok(WeaponType::ChainSawd), - "Caduceus" => Ok(WeaponType::Caduceus), - "MercuriusRod" => Ok(WeaponType::MercuriusRod), - "StingTip" => Ok(WeaponType::StingTip), - "MagicalPiece" => Ok(WeaponType::MagicalPiece), - "TechnicalCrozier" => Ok(WeaponType::TechnicalCrozier), - "SuppressedGun" => Ok(WeaponType::SuppressedGun), - "AncientSaber" => Ok(WeaponType::AncientSaber), - "HarisenBattleFan" => Ok(WeaponType::HarisenBattleFan), - "Yamigarasu" => Ok(WeaponType::Yamigarasu), - "AkikosWok" => Ok(WeaponType::AkikosWok), - "ToyHammer" => Ok(WeaponType::ToyHammer), - "Elysion" => Ok(WeaponType::Elysion), - "RedSaber" => Ok(WeaponType::RedSaber), - "MeteorCudgel" => Ok(WeaponType::MeteorCudgel), - "MonkeyKingBar" => Ok(WeaponType::MonkeyKingBar), - "BlackKingBar" => Ok(WeaponType::BlackKingBar), - "DoubleCannon" => Ok(WeaponType::DoubleCannon), - "Girasole" => Ok(WeaponType::Girasole), - "HugeBattleFan" => Ok(WeaponType::HugeBattleFan), - "TsumikiriJSword" => Ok(WeaponType::TsumikiriJSword), - "SealedJSword" => Ok(WeaponType::SealedJSword), - "RedSword" => Ok(WeaponType::RedSword), - "CrazyTune" => Ok(WeaponType::CrazyTune), - "TwinChakram" => Ok(WeaponType::TwinChakram), - "WokOfAkikosShop" => Ok(WeaponType::WokOfAkikosShop), - "LavisBlade" => Ok(WeaponType::LavisBlade), - "RedDagger" => Ok(WeaponType::RedDagger), - "MadamsParasol" => Ok(WeaponType::MadamsParasol), - "MadamsUmbrella" => Ok(WeaponType::MadamsUmbrella), - "ImperialPick" => Ok(WeaponType::ImperialPick), - "Berdysh" => Ok(WeaponType::Berdysh), - "RedPartisan" => Ok(WeaponType::RedPartisan), - "FlightCutter" => Ok(WeaponType::FlightCutter), - "FlightFan" => Ok(WeaponType::FlightFan), - "RedSlicer" => Ok(WeaponType::RedSlicer), - "Handgunguld" => Ok(WeaponType::Handgunguld), - "MasterRaven" => Ok(WeaponType::MasterRaven), - "Handgunmilla" => Ok(WeaponType::Handgunmilla), - "LastSwan" => Ok(WeaponType::LastSwan), - "RedHandgun" => Ok(WeaponType::RedHandgun), - "FrozenShooter" => Ok(WeaponType::FrozenShooter), - "SnowQueen" => Ok(WeaponType::SnowQueen), - "AntiAndroidRifle" => Ok(WeaponType::AntiAndroidRifle), - "RocketPunch" => Ok(WeaponType::RocketPunch), - "SambaMaracas" => Ok(WeaponType::SambaMaracas), - "TwinPsychogun" => Ok(WeaponType::TwinPsychogun), - "DrillLauncher" => Ok(WeaponType::DrillLauncher), - "GuldMilla" => Ok(WeaponType::GuldMilla), - "DualBird" => Ok(WeaponType::DualBird), - "RedMechgun" => Ok(WeaponType::RedMechgun), - "BelraCannon" => Ok(WeaponType::BelraCannon), - "PanzerFaust" => Ok(WeaponType::PanzerFaust), - "IronFaust" => Ok(WeaponType::IronFaust), - "SummitMoon" => Ok(WeaponType::SummitMoon), - "Windmill" => Ok(WeaponType::Windmill), - "EvilCurst" => Ok(WeaponType::EvilCurst), - "FlowerCane" => Ok(WeaponType::FlowerCane), - "HildebearsCane" => Ok(WeaponType::HildebearsCane), - "HildebluesCane" => Ok(WeaponType::HildebluesCane), - "RabbitWand" => Ok(WeaponType::RabbitWand), - "PlantainLeaf" => Ok(WeaponType::PlantainLeaf), - "Fatsia" => Ok(WeaponType::Fatsia), - "DemonicFork" => Ok(WeaponType::DemonicFork), - "StrikerOfChao" => Ok(WeaponType::StrikerOfChao), - "Broom" => Ok(WeaponType::Broom), - "ProphetsOfMotav" => Ok(WeaponType::ProphetsOfMotav), - "TheSighOfAGod" => Ok(WeaponType::TheSighOfAGod), - "TwinkleStar" => Ok(WeaponType::TwinkleStar), - "PlantainFan" => Ok(WeaponType::PlantainFan), - "TwinBlaze" => Ok(WeaponType::TwinBlaze), - "MarinasBag" => Ok(WeaponType::MarinasBag), - "DragonsClaw" => Ok(WeaponType::DragonsClaw), - "PanthersClaw" => Ok(WeaponType::PanthersClaw), - "SRedsBlade" => Ok(WeaponType::SRedsBlade), - "PlantainHugeFan" => Ok(WeaponType::PlantainHugeFan), - "ChameleonScythe" => Ok(WeaponType::ChameleonScythe), - "Yasminkov3000r" => Ok(WeaponType::Yasminkov3000r), - "AnoRifle" => Ok(WeaponType::AnoRifle), - "BaranzLauncher" => Ok(WeaponType::BaranzLauncher), - "BranchOfPakupaku" => Ok(WeaponType::BranchOfPakupaku), - "HeartOfPoumn" => Ok(WeaponType::HeartOfPoumn), - "Yasminkov2000h" => Ok(WeaponType::Yasminkov2000h), - "Yasminkov7000v" => Ok(WeaponType::Yasminkov7000v), - "Yasminkov9000m" => Ok(WeaponType::Yasminkov9000m), - "MaserBeam" => Ok(WeaponType::MaserBeam), - "PowerMaser" => Ok(WeaponType::PowerMaser), - "GameMagazne" => Ok(WeaponType::GameMagazne), - "Login2" => Ok(WeaponType::Login2), - "FlowerBouquet" => Ok(WeaponType::FlowerBouquet), - "Musashi" => Ok(WeaponType::Musashi), - "Yamato" => Ok(WeaponType::Yamato), - "Asuka" => Ok(WeaponType::Asuka), - "SangeYasha" => Ok(WeaponType::SangeYasha), - "Sange" => Ok(WeaponType::Sange), - "Yasha" => Ok(WeaponType::Yasha), - "Kamui" => Ok(WeaponType::Kamui), - "PhotonLauncher" => Ok(WeaponType::PhotonLauncher), - "GuiltyLight" => Ok(WeaponType::GuiltyLight), - "RedScorpio" => Ok(WeaponType::RedScorpio), - "PhononMaser" => Ok(WeaponType::PhononMaser), - "Talis" => Ok(WeaponType::Talis), - "Mahu" => Ok(WeaponType::Mahu), - "Hitogata" => Ok(WeaponType::Hitogata), - "DancingHitogata" => Ok(WeaponType::DancingHitogata), - "Kunai" => Ok(WeaponType::Kunai), - "Nug2000bazooka" => Ok(WeaponType::Nug2000bazooka), - "SBerillsHands0" => Ok(WeaponType::SBerillsHands0), - "SBerillsHands1" => Ok(WeaponType::SBerillsHands1), - "FlowensSword3060" => Ok(WeaponType::FlowensSword3060), - "FlowensSword3064" => Ok(WeaponType::FlowensSword3064), - "FlowensSword3067" => Ok(WeaponType::FlowensSword3067), - "FlowensSword3073" => Ok(WeaponType::FlowensSword3073), - "FlowensSword3077" => Ok(WeaponType::FlowensSword3077), - "FlowensSword3082" => Ok(WeaponType::FlowensSword3082), - "FlowensSword3083" => Ok(WeaponType::FlowensSword3083), - "FlowensSword3084" => Ok(WeaponType::FlowensSword3084), - "FlowensSword3079" => Ok(WeaponType::FlowensSword3079), - "DbsSaber3062" => Ok(WeaponType::DbsSaber3062), - "DbsSaber3067" => Ok(WeaponType::DbsSaber3067), - "DbsSaber3069Chris" => Ok(WeaponType::DbsSaber3069Chris), - "DbsSaber3064" => Ok(WeaponType::DbsSaber3064), - "DbsSaber3069Torato" => Ok(WeaponType::DbsSaber3069Torato), - "DbsSaber3073" => Ok(WeaponType::DbsSaber3073), - "DbsSaber3070" => Ok(WeaponType::DbsSaber3070), - "DbsSaber3075" => Ok(WeaponType::DbsSaber3075), - "DbsSaber3077" => Ok(WeaponType::DbsSaber3077), - "GiGueBazooka" => Ok(WeaponType::GiGueBazooka), - "Guardianna" => Ok(WeaponType::Guardianna), - "ViridiaCard" => Ok(WeaponType::ViridiaCard), - "GreenillCard" => Ok(WeaponType::GreenillCard), - "SkylyCard" => Ok(WeaponType::SkylyCard), - "BluefullCard" => Ok(WeaponType::BluefullCard), - "PurplenumCard" => Ok(WeaponType::PurplenumCard), - "PinkalCard" => Ok(WeaponType::PinkalCard), - "RedriaCard" => Ok(WeaponType::RedriaCard), - "OranCard" => Ok(WeaponType::OranCard), - "YellowbozeCard" => Ok(WeaponType::YellowbozeCard), - "WhitillCard" => Ok(WeaponType::WhitillCard), - "MorningGlory" => Ok(WeaponType::MorningGlory), - "PartisanofLightning" => Ok(WeaponType::PartisanofLightning), - "GalWind" => Ok(WeaponType::GalWind), - "Zanba" => Ok(WeaponType::Zanba), - "RikasClaw" => Ok(WeaponType::RikasClaw), - "AngelHarp" => Ok(WeaponType::AngelHarp), - "DemolitionComet" => Ok(WeaponType::DemolitionComet), - "NeisClaw2" => Ok(WeaponType::NeisClaw2), - "RainbowBaton" => Ok(WeaponType::RainbowBaton), - "DarkFlow" => Ok(WeaponType::DarkFlow), - "DarkMeteor" => Ok(WeaponType::DarkMeteor), - "DarkBridge" => Ok(WeaponType::DarkBridge), - "GAssassinsSabers" => Ok(WeaponType::GAssassinsSabers), - "RappysFan" => Ok(WeaponType::RappysFan), - "BoomasClaw" => Ok(WeaponType::BoomasClaw), - "GoboomasClaw" => Ok(WeaponType::GoboomasClaw), - "GigoboomasClaw" => Ok(WeaponType::GigoboomasClaw), - "RubyBullet" => Ok(WeaponType::RubyBullet), - "AmoreRose" => Ok(WeaponType::AmoreRose), - "SlicerOfFanatic" => Ok(WeaponType::SlicerOfFanatic), - "LameDArgent" => Ok(WeaponType::LameDArgent), - "Excalibur" => Ok(WeaponType::Excalibur), - "RageDeFeu" => Ok(WeaponType::RageDeFeu), - "RageDeFeu2" => Ok(WeaponType::RageDeFeu2), - "RageDeFeu3" => Ok(WeaponType::RageDeFeu3), - "RageDeFeu4" => Ok(WeaponType::RageDeFeu4), - "DaisyChain" => Ok(WeaponType::DaisyChain), - "OphelieSeize" => Ok(WeaponType::OphelieSeize), - "MilleMarteaux" => Ok(WeaponType::MilleMarteaux), - "LeCogneur" => Ok(WeaponType::LeCogneur), - "CommanderBlade" => Ok(WeaponType::CommanderBlade), - "Vivienne" => Ok(WeaponType::Vivienne), - "Kusanagi" => Ok(WeaponType::Kusanagi), - "SacredDuster" => Ok(WeaponType::SacredDuster), - "Guren" => Ok(WeaponType::Guren), - "Shouren" => Ok(WeaponType::Shouren), - "Jizai" => Ok(WeaponType::Jizai), - "Flamberge" => Ok(WeaponType::Flamberge), - "Yunchang" => Ok(WeaponType::Yunchang), - "SnakeSpire" => Ok(WeaponType::SnakeSpire), - "FlapjackFlapper" => Ok(WeaponType::FlapjackFlapper), - "Getsugasan" => Ok(WeaponType::Getsugasan), - "Maguwa" => Ok(WeaponType::Maguwa), - "HeavenStriker" => Ok(WeaponType::HeavenStriker), - "CannonRouge" => Ok(WeaponType::CannonRouge), - "MeteorRouge" => Ok(WeaponType::MeteorRouge), - "Solferino" => Ok(WeaponType::Solferino), - "Clio" => Ok(WeaponType::Clio), - "SirenGlassHammer" => Ok(WeaponType::SirenGlassHammer), - "GlideDivine" => Ok(WeaponType::GlideDivine), - "Shichishito" => Ok(WeaponType::Shichishito), - "Murasame" => Ok(WeaponType::Murasame), - "DaylightScar" => Ok(WeaponType::DaylightScar), - "Decalog" => Ok(WeaponType::Decalog), - "FifthAnnivBlade" => Ok(WeaponType::FifthAnnivBlade), - "TyrellsParasol" => Ok(WeaponType::TyrellsParasol), - "AkikosCleaver" => Ok(WeaponType::AkikosCleaver), - "Tanegashima" => Ok(WeaponType::Tanegashima), - "TreeClippers" => Ok(WeaponType::TreeClippers), - "NiceShot" => Ok(WeaponType::NiceShot), - "Unknown3" => Ok(WeaponType::Unknown3), - "Unknown4" => Ok(WeaponType::Unknown4), - "AnoBazooka" => Ok(WeaponType::AnoBazooka), - "Synthesizer" => Ok(WeaponType::Synthesizer), - "BambooSpear" => Ok(WeaponType::BambooSpear), - "KaneiTsuho" => Ok(WeaponType::KaneiTsuho), - "Jitte" => Ok(WeaponType::Jitte), - "ButterflyNet" => Ok(WeaponType::ButterflyNet), - "Syringe" => Ok(WeaponType::Syringe), - "Battledore" => Ok(WeaponType::Battledore), - "Racket" => Ok(WeaponType::Racket), - "Hammer" => Ok(WeaponType::Hammer), - "GreatBouquet" => Ok(WeaponType::GreatBouquet), - "TypesaSaber" => Ok(WeaponType::TypesaSaber), - "TypeslSaber" => Ok(WeaponType::TypeslSaber), - "TypeslSlicer" => Ok(WeaponType::TypeslSlicer), - "TypeslClaw" => Ok(WeaponType::TypeslClaw), - "TypeslKatana" => Ok(WeaponType::TypeslKatana), - "TypejsSaber" => Ok(WeaponType::TypejsSaber), - "TypejsSlicer" => Ok(WeaponType::TypejsSlicer), - "TypejsJSword" => Ok(WeaponType::TypejsJSword), - "TypeswSword" => Ok(WeaponType::TypeswSword), - "TypeswSlicer" => Ok(WeaponType::TypeswSlicer), - "TypeswJSword" => Ok(WeaponType::TypeswJSword), - "TyperoSword" => Ok(WeaponType::TyperoSword), - "TyperoHalbert" => Ok(WeaponType::TyperoHalbert), - "TyperoRod" => Ok(WeaponType::TyperoRod), - "TypeblBlade" => Ok(WeaponType::TypeblBlade), - "TypeknBlade" => Ok(WeaponType::TypeknBlade), - "TypeknClaw" => Ok(WeaponType::TypeknClaw), - "TypehaHalbert" => Ok(WeaponType::TypehaHalbert), - "TypehaRod" => Ok(WeaponType::TypehaRod), - "TypedsDSaber" => Ok(WeaponType::TypedsDSaber), - "TypedsRod" => Ok(WeaponType::TypedsRod), - "Typeds" => Ok(WeaponType::Typeds), - "TypeclClaw" => Ok(WeaponType::TypeclClaw), - "TypessSw" => Ok(WeaponType::TypessSw), - "TypeguHand" => Ok(WeaponType::TypeguHand), - "TypeguMechgun" => Ok(WeaponType::TypeguMechgun), - "TyperiRifle" => Ok(WeaponType::TyperiRifle), - "TypemeMechgun" => Ok(WeaponType::TypemeMechgun), - "TypeshShot" => Ok(WeaponType::TypeshShot), - "TypewaWand" => Ok(WeaponType::TypewaWand), - _ => Err(WeaponTypeError::UnknownWeapon(value.to_string())) - } - } -} - -impl Into for WeaponType { - fn into(self) -> String { - match self { - WeaponType::Saber => "Saber", - WeaponType::Brand => "Brand", - WeaponType::Buster => "Buster", - WeaponType::Pallasch => "Pallasch", - WeaponType::Gladius => "Gladius", - WeaponType::DbsSaber => "DbsSaber", - WeaponType::Kaladbolg => "Kaladbolg", - WeaponType::Durandal => "Durandal", - WeaponType::Galatine => "Galatine", - WeaponType::Sword => "Sword", - WeaponType::Gigush => "Gigush", - WeaponType::Breaker => "Breaker", - WeaponType::Claymore => "Claymore", - WeaponType::Calibur => "Calibur", - WeaponType::FlowensSword => "FlowensSword", - WeaponType::LastSurvivor => "LastSurvivor", - WeaponType::DragonSlayer => "DragonSlayer", - WeaponType::Dagger => "Dagger", - WeaponType::Knife => "Knife", - WeaponType::Blade => "Blade", - WeaponType::Edge => "Edge", - WeaponType::Ripper => "Ripper", - WeaponType::BladeDance => "BladeDance", - WeaponType::BloodyArt => "BloodyArt", - WeaponType::CrossScar => "CrossScar", - WeaponType::ZeroDivide => "ZeroDivide", - WeaponType::TwoKamui => "TwoKamui", - WeaponType::Partisan => "Partisan", - WeaponType::Halbert => "Halbert", - WeaponType::Glaive => "Glaive", - WeaponType::Berdys => "Berdys", - WeaponType::Gungnir => "Gungnir", - WeaponType::Brionac => "Brionac", - WeaponType::Vjaya => "Vjaya", - WeaponType::GaeBolg => "GaeBolg", - WeaponType::AsteronBelt => "AsteronBelt", - WeaponType::Slicer => "Slicer", - WeaponType::Spinner => "Spinner", - WeaponType::Cutter => "Cutter", - WeaponType::Sawcer => "Sawcer", - WeaponType::Diska => "Diska", - WeaponType::SlicerOfAssassin => "SlicerOfAssassin", - WeaponType::DiskaOfLiberator => "DiskaOfLiberator", - WeaponType::DiskaOfBraveman => "DiskaOfBraveman", - WeaponType::Izmaela => "Izmaela", - WeaponType::Handgun => "Handgun", - WeaponType::Autogun => "Autogun", - WeaponType::Lockgun => "Lockgun", - WeaponType::Railgun => "Railgun", - WeaponType::Raygun => "Raygun", - WeaponType::Varista => "Varista", - WeaponType::CustomRayveroo => "CustomRayveroo", - WeaponType::Bravace => "Bravace", - WeaponType::TensionBlaster => "TensionBlaster", - WeaponType::Rifle => "Rifle", - WeaponType::Sniper => "Sniper", - WeaponType::Blaster => "Blaster", - WeaponType::Beam => "Beam", - WeaponType::Laser => "Laser", - WeaponType::Visk235w => "Visk235w", - WeaponType::Walsmk2 => "Walsmk2", - WeaponType::Justy23st => "Justy23st", - WeaponType::Rianov303snr => "Rianov303snr", - WeaponType::Rianov303snr1 => "Rianov303snr1", - WeaponType::Rianov303snr2 => "Rianov303snr2", - WeaponType::Rianov303snr3 => "Rianov303snr3", - WeaponType::Rianov303snr4 => "Rianov303snr4", - WeaponType::Rianov303snr5 => "Rianov303snr5", - WeaponType::Mechgun => "Mechgun", - WeaponType::Assault => "Assault", - WeaponType::Repeater => "Repeater", - WeaponType::Gatling => "Gatling", - WeaponType::Vulcan => "Vulcan", - WeaponType::MA60Vise => "MA60Vise", - WeaponType::HS25Justice => "HS25Justice", - WeaponType::LK14Combat => "LK14Combat", - WeaponType::Shot => "Shot", - WeaponType::Spread => "Spread", - WeaponType::Cannon => "Cannon", - WeaponType::Launcher => "Launcher", - WeaponType::Arms => "Arms", - WeaponType::CrushBullet => "CrushBullet", - WeaponType::MeteorSmash => "MeteorSmash", - WeaponType::FinalImpact => "FinalImpact", - WeaponType::Cane => "Cane", - WeaponType::Stick => "Stick", - WeaponType::Mace => "Mace", - WeaponType::Club => "Club", - WeaponType::ClubOfLaconium => "ClubOfLaconium", - WeaponType::MaceOfAdaman => "MaceOfAdaman", - WeaponType::ClubOfZumiuran => "ClubOfZumiuran", - WeaponType::Lollipop => "Lollipop", - WeaponType::Rod => "Rod", - WeaponType::Pole => "Pole", - WeaponType::Pillar => "Pillar", - WeaponType::Striker => "Striker", - WeaponType::BattleVerge => "BattleVerge", - WeaponType::BraveHammer => "BraveHammer", - WeaponType::AliveAqhu => "AliveAqhu", - WeaponType::Valkyrie => "Valkyrie", - WeaponType::Wand => "Wand", - WeaponType::Staff => "Staff", - WeaponType::Baton => "Baton", - WeaponType::Scepter => "Scepter", - WeaponType::FireScepteragni => "FireScepteragni", - WeaponType::IceStaffdagon => "IceStaffdagon", - WeaponType::StormWandindra => "StormWandindra", - WeaponType::EarthWandBrownie => "EarthWandBrownie", - WeaponType::PhotonClaw => "PhotonClaw", - WeaponType::SilenceClaw => "SilenceClaw", - WeaponType::NeisClaw => "NeisClaw", - WeaponType::PhoenixClaw => "PhoenixClaw", - WeaponType::DoubleSaber => "DoubleSaber", - WeaponType::StagCutlery => "StagCutlery", - WeaponType::TwinBrand => "TwinBrand", - WeaponType::BraveKnuckle => "BraveKnuckle", - WeaponType::AngryFist => "AngryFist", - WeaponType::GodHand => "GodHand", - WeaponType::SonicKnuckle => "SonicKnuckle", - WeaponType::Login => "Login", - WeaponType::Orotiagito => "Orotiagito", - WeaponType::Agito1975 => "Agito1975", - WeaponType::Agito1983 => "Agito1983", - WeaponType::Agito2001 => "Agito2001", - WeaponType::Agito1991 => "Agito1991", - WeaponType::Agito1977 => "Agito1977", - WeaponType::Agito1980 => "Agito1980", - WeaponType::Raikiri => "Raikiri", - WeaponType::SoulEater => "SoulEater", - WeaponType::SoulBanish => "SoulBanish", - WeaponType::SpreadNeedle => "SpreadNeedle", - WeaponType::HolyRay => "HolyRay", - WeaponType::InfernoBazooka => "InfernoBazooka", - WeaponType::RamblingMay => "RamblingMay", - WeaponType::LK38Combat => "LK38Combat", - WeaponType::FlameVisit => "FlameVisit", - WeaponType::BurningVisit => "BurningVisit", - WeaponType::AkikosFryingPan => "AkikosFryingPan", - WeaponType::SorcerersCane => "SorcerersCane", - WeaponType::SBeatsBlade => "SBeatsBlade", - WeaponType::PArmssBlade => "PArmssBlade", - WeaponType::DelsabersBuster => "DelsabersBuster", - WeaponType::BringersRifle => "BringersRifle", - WeaponType::EggBlaster => "EggBlaster", - WeaponType::PsychoWand => "PsychoWand", - WeaponType::HeavenPunisher => "HeavenPunisher", - WeaponType::LavisCannon => "LavisCannon", - WeaponType::VictorAxe => "VictorAxe", - WeaponType::LaconiumAxe => "LaconiumAxe", - WeaponType::ChainSawd => "ChainSawd", - WeaponType::Caduceus => "Caduceus", - WeaponType::MercuriusRod => "MercuriusRod", - WeaponType::StingTip => "StingTip", - WeaponType::MagicalPiece => "MagicalPiece", - WeaponType::TechnicalCrozier => "TechnicalCrozier", - WeaponType::SuppressedGun => "SuppressedGun", - WeaponType::AncientSaber => "AncientSaber", - WeaponType::HarisenBattleFan => "HarisenBattleFan", - WeaponType::Yamigarasu => "Yamigarasu", - WeaponType::AkikosWok => "AkikosWok", - WeaponType::ToyHammer => "ToyHammer", - WeaponType::Elysion => "Elysion", - WeaponType::RedSaber => "RedSaber", - WeaponType::MeteorCudgel => "MeteorCudgel", - WeaponType::MonkeyKingBar => "MonkeyKingBar", - WeaponType::BlackKingBar => "BlackKingBar", - WeaponType::DoubleCannon => "DoubleCannon", - WeaponType::Girasole => "Girasole", - WeaponType::HugeBattleFan => "HugeBattleFan", - WeaponType::TsumikiriJSword => "TsumikiriJSword", - WeaponType::SealedJSword => "SealedJSword", - WeaponType::RedSword => "RedSword", - WeaponType::CrazyTune => "CrazyTune", - WeaponType::TwinChakram => "TwinChakram", - WeaponType::WokOfAkikosShop => "WokOfAkikosShop", - WeaponType::LavisBlade => "LavisBlade", - WeaponType::RedDagger => "RedDagger", - WeaponType::MadamsParasol => "MadamsParasol", - WeaponType::MadamsUmbrella => "MadamsUmbrella", - WeaponType::ImperialPick => "ImperialPick", - WeaponType::Berdysh => "Berdysh", - WeaponType::RedPartisan => "RedPartisan", - WeaponType::FlightCutter => "FlightCutter", - WeaponType::FlightFan => "FlightFan", - WeaponType::RedSlicer => "RedSlicer", - WeaponType::Handgunguld => "Handgunguld", - WeaponType::MasterRaven => "MasterRaven", - WeaponType::Handgunmilla => "Handgunmilla", - WeaponType::LastSwan => "LastSwan", - WeaponType::RedHandgun => "RedHandgun", - WeaponType::FrozenShooter => "FrozenShooter", - WeaponType::SnowQueen => "SnowQueen", - WeaponType::AntiAndroidRifle => "AntiAndroidRifle", - WeaponType::RocketPunch => "RocketPunch", - WeaponType::SambaMaracas => "SambaMaracas", - WeaponType::TwinPsychogun => "TwinPsychogun", - WeaponType::DrillLauncher => "DrillLauncher", - WeaponType::GuldMilla => "GuldMilla", - WeaponType::DualBird => "DualBird", - WeaponType::RedMechgun => "RedMechgun", - WeaponType::BelraCannon => "BelraCannon", - WeaponType::PanzerFaust => "PanzerFaust", - WeaponType::IronFaust => "IronFaust", - WeaponType::SummitMoon => "SummitMoon", - WeaponType::Windmill => "Windmill", - WeaponType::EvilCurst => "EvilCurst", - WeaponType::FlowerCane => "FlowerCane", - WeaponType::HildebearsCane => "HildebearsCane", - WeaponType::HildebluesCane => "HildebluesCane", - WeaponType::RabbitWand => "RabbitWand", - WeaponType::PlantainLeaf => "PlantainLeaf", - WeaponType::Fatsia => "Fatsia", - WeaponType::DemonicFork => "DemonicFork", - WeaponType::StrikerOfChao => "StrikerOfChao", - WeaponType::Broom => "Broom", - WeaponType::ProphetsOfMotav => "ProphetsOfMotav", - WeaponType::TheSighOfAGod => "TheSighOfAGod", - WeaponType::TwinkleStar => "TwinkleStar", - WeaponType::PlantainFan => "PlantainFan", - WeaponType::TwinBlaze => "TwinBlaze", - WeaponType::MarinasBag => "MarinasBag", - WeaponType::DragonsClaw => "DragonsClaw", - WeaponType::PanthersClaw => "PanthersClaw", - WeaponType::SRedsBlade => "SRedsBlade", - WeaponType::PlantainHugeFan => "PlantainHugeFan", - WeaponType::ChameleonScythe => "ChameleonScythe", - WeaponType::Yasminkov3000r => "Yasminkov3000r", - WeaponType::AnoRifle => "AnoRifle", - WeaponType::BaranzLauncher => "BaranzLauncher", - WeaponType::BranchOfPakupaku => "BranchOfPakupaku", - WeaponType::HeartOfPoumn => "HeartOfPoumn", - WeaponType::Yasminkov2000h => "Yasminkov2000h", - WeaponType::Yasminkov7000v => "Yasminkov7000v", - WeaponType::Yasminkov9000m => "Yasminkov9000m", - WeaponType::MaserBeam => "MaserBeam", - WeaponType::PowerMaser => "PowerMaser", - WeaponType::GameMagazne => "GameMagazne", - WeaponType::Login2 => "Login2", - WeaponType::FlowerBouquet => "FlowerBouquet", - WeaponType::Musashi => "Musashi", - WeaponType::Yamato => "Yamato", - WeaponType::Asuka => "Asuka", - WeaponType::SangeYasha => "SangeYasha", - WeaponType::Sange => "Sange", - WeaponType::Yasha => "Yasha", - WeaponType::Kamui => "Kamui", - WeaponType::PhotonLauncher => "PhotonLauncher", - WeaponType::GuiltyLight => "GuiltyLight", - WeaponType::RedScorpio => "RedScorpio", - WeaponType::PhononMaser => "PhononMaser", - WeaponType::Talis => "Talis", - WeaponType::Mahu => "Mahu", - WeaponType::Hitogata => "Hitogata", - WeaponType::DancingHitogata => "DancingHitogata", - WeaponType::Kunai => "Kunai", - WeaponType::Nug2000bazooka => "Nug2000bazooka", - WeaponType::SBerillsHands0 => "SBerillsHands0", - WeaponType::SBerillsHands1 => "SBerillsHands1", - WeaponType::FlowensSword3060 => "FlowensSword3060", - WeaponType::FlowensSword3064 => "FlowensSword3064", - WeaponType::FlowensSword3067 => "FlowensSword3067", - WeaponType::FlowensSword3073 => "FlowensSword3073", - WeaponType::FlowensSword3077 => "FlowensSword3077", - WeaponType::FlowensSword3082 => "FlowensSword3082", - WeaponType::FlowensSword3083 => "FlowensSword3083", - WeaponType::FlowensSword3084 => "FlowensSword3084", - WeaponType::FlowensSword3079 => "FlowensSword3079", - WeaponType::DbsSaber3062 => "DbsSaber3062", - WeaponType::DbsSaber3067 => "DbsSaber3067", - WeaponType::DbsSaber3069Chris => "DbsSaber3069Chris", - WeaponType::DbsSaber3064 => "DbsSaber3064", - WeaponType::DbsSaber3069Torato => "DbsSaber3069Torato", - WeaponType::DbsSaber3073 => "DbsSaber3073", - WeaponType::DbsSaber3070 => "DbsSaber3070", - WeaponType::DbsSaber3075 => "DbsSaber3075", - WeaponType::DbsSaber3077 => "DbsSaber3077", - WeaponType::GiGueBazooka => "GiGueBazooka", - WeaponType::Guardianna => "Guardianna", - WeaponType::ViridiaCard => "ViridiaCard", - WeaponType::GreenillCard => "GreenillCard", - WeaponType::SkylyCard => "SkylyCard", - WeaponType::BluefullCard => "BluefullCard", - WeaponType::PurplenumCard => "PurplenumCard", - WeaponType::PinkalCard => "PinkalCard", - WeaponType::RedriaCard => "RedriaCard", - WeaponType::OranCard => "OranCard", - WeaponType::YellowbozeCard => "YellowbozeCard", - WeaponType::WhitillCard => "WhitillCard", - WeaponType::MorningGlory => "MorningGlory", - WeaponType::PartisanofLightning => "PartisanofLightning", - WeaponType::GalWind => "GalWind", - WeaponType::Zanba => "Zanba", - WeaponType::RikasClaw => "RikasClaw", - WeaponType::AngelHarp => "AngelHarp", - WeaponType::DemolitionComet => "DemolitionComet", - WeaponType::NeisClaw2 => "NeisClaw2", - WeaponType::RainbowBaton => "RainbowBaton", - WeaponType::DarkFlow => "DarkFlow", - WeaponType::DarkMeteor => "DarkMeteor", - WeaponType::DarkBridge => "DarkBridge", - WeaponType::GAssassinsSabers => "GAssassinsSabers", - WeaponType::RappysFan => "RappysFan", - WeaponType::BoomasClaw => "BoomasClaw", - WeaponType::GoboomasClaw => "GoboomasClaw", - WeaponType::GigoboomasClaw => "GigoboomasClaw", - WeaponType::RubyBullet => "RubyBullet", - WeaponType::AmoreRose => "AmoreRose", - WeaponType::SlicerOfFanatic => "SlicerOfFanatic", - WeaponType::LameDArgent => "LameDArgent", - WeaponType::Excalibur => "Excalibur", - WeaponType::RageDeFeu => "RageDeFeu", - WeaponType::RageDeFeu2 => "RageDeFeu2", - WeaponType::RageDeFeu3 => "RageDeFeu3", - WeaponType::RageDeFeu4 => "RageDeFeu4", - WeaponType::DaisyChain => "DaisyChain", - WeaponType::OphelieSeize => "OphelieSeize", - WeaponType::MilleMarteaux => "MilleMarteaux", - WeaponType::LeCogneur => "LeCogneur", - WeaponType::CommanderBlade => "CommanderBlade", - WeaponType::Vivienne => "Vivienne", - WeaponType::Kusanagi => "Kusanagi", - WeaponType::SacredDuster => "SacredDuster", - WeaponType::Guren => "Guren", - WeaponType::Shouren => "Shouren", - WeaponType::Jizai => "Jizai", - WeaponType::Flamberge => "Flamberge", - WeaponType::Yunchang => "Yunchang", - WeaponType::SnakeSpire => "SnakeSpire", - WeaponType::FlapjackFlapper => "FlapjackFlapper", - WeaponType::Getsugasan => "Getsugasan", - WeaponType::Maguwa => "Maguwa", - WeaponType::HeavenStriker => "HeavenStriker", - WeaponType::CannonRouge => "CannonRouge", - WeaponType::MeteorRouge => "MeteorRouge", - WeaponType::Solferino => "Solferino", - WeaponType::Clio => "Clio", - WeaponType::SirenGlassHammer => "SirenGlassHammer", - WeaponType::GlideDivine => "GlideDivine", - WeaponType::Shichishito => "Shichishito", - WeaponType::Murasame => "Murasame", - WeaponType::DaylightScar => "DaylightScar", - WeaponType::Decalog => "Decalog", - WeaponType::FifthAnnivBlade => "FifthAnnivBlade", - WeaponType::TyrellsParasol => "TyrellsParasol", - WeaponType::AkikosCleaver => "AkikosCleaver", - WeaponType::Tanegashima => "Tanegashima", - WeaponType::TreeClippers => "TreeClippers", - WeaponType::NiceShot => "NiceShot", - WeaponType::Unknown3 => "Unknown3", - WeaponType::Unknown4 => "Unknown4", - WeaponType::AnoBazooka => "AnoBazooka", - WeaponType::Synthesizer => "Synthesizer", - WeaponType::BambooSpear => "BambooSpear", - WeaponType::KaneiTsuho => "KaneiTsuho", - WeaponType::Jitte => "Jitte", - WeaponType::ButterflyNet => "ButterflyNet", - WeaponType::Syringe => "Syringe", - WeaponType::Battledore => "Battledore", - WeaponType::Racket => "Racket", - WeaponType::Hammer => "Hammer", - WeaponType::GreatBouquet => "GreatBouquet", - WeaponType::TypesaSaber => "TypesaSaber", - WeaponType::TypeslSaber => "TypeslSaber", - WeaponType::TypeslSlicer => "TypeslSlicer", - WeaponType::TypeslClaw => "TypeslClaw", - WeaponType::TypeslKatana => "TypeslKatana", - WeaponType::TypejsSaber => "TypejsSaber", - WeaponType::TypejsSlicer => "TypejsSlicer", - WeaponType::TypejsJSword => "TypejsJSword", - WeaponType::TypeswSword => "TypeswSword", - WeaponType::TypeswSlicer => "TypeswSlicer", - WeaponType::TypeswJSword => "TypeswJSword", - WeaponType::TyperoSword => "TyperoSword", - WeaponType::TyperoHalbert => "TyperoHalbert", - WeaponType::TyperoRod => "TyperoRod", - WeaponType::TypeblBlade => "TypeblBlade", - WeaponType::TypeknBlade => "TypeknBlade", - WeaponType::TypeknClaw => "TypeknClaw", - WeaponType::TypehaHalbert => "TypehaHalbert", - WeaponType::TypehaRod => "TypehaRod", - WeaponType::TypedsDSaber => "TypedsDSaber", - WeaponType::TypedsRod => "TypedsRod", - WeaponType::Typeds => "Typeds", - WeaponType::TypeclClaw => "TypeclClaw", - WeaponType::TypessSw => "TypessSw", - WeaponType::TypeguHand => "TypeguHand", - WeaponType::TypeguMechgun => "TypeguMechgun", - WeaponType::TyperiRifle => "TyperiRifle", - WeaponType::TypemeMechgun => "TypemeMechgun", - WeaponType::TypeshShot => "TypeshShot", - WeaponType::TypewaWand => "TypewaWand", - }.to_string() - } -} - - #[derive(Debug, Copy, Clone, PartialEq)] pub struct Weapon { pub weapon: WeaponType,