add enumiter to item types
This commit is contained in:
parent
66d25ed155
commit
99cc651fd9
@ -32,4 +32,6 @@ lazy_static = "1.4.0"
|
|||||||
barrel = { version = "0.6.5", features = ["pg"] }
|
barrel = { version = "0.6.5", features = ["pg"] }
|
||||||
refinery = { version = "0.3.0", features = ["postgres"] }
|
refinery = { version = "0.3.0", features = ["postgres"] }
|
||||||
sqlx = { version = "0.4.0-beta.1", features = ["postgres", "json", "chrono"] }
|
sqlx = { version = "0.4.0-beta.1", features = ["postgres", "json", "chrono"] }
|
||||||
|
strum = "0.19.5"
|
||||||
|
strum_macros = "0.19"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ pub enum ItemParseError {
|
|||||||
InvalidArmorType,
|
InvalidArmorType,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum ArmorType {
|
pub enum ArmorType {
|
||||||
Frame,
|
Frame,
|
||||||
Armor,
|
Armor,
|
||||||
|
@ -9,7 +9,7 @@ pub enum ItemParseError {
|
|||||||
InvalidESWeaponName,
|
InvalidESWeaponName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, strum_macros::EnumIter)]
|
||||||
pub enum ESWeaponType {
|
pub enum ESWeaponType {
|
||||||
Saber = 0,
|
Saber = 0,
|
||||||
Sword,
|
Sword,
|
||||||
@ -121,7 +121,7 @@ impl ESWeaponType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize, strum_macros::EnumIter)]
|
||||||
pub enum ESWeaponSpecial {
|
pub enum ESWeaponSpecial {
|
||||||
Jellen = 1,
|
Jellen = 1,
|
||||||
Zalure,
|
Zalure,
|
||||||
|
@ -64,7 +64,7 @@ pub enum ItemParseError {
|
|||||||
InvalidMagBytes,
|
InvalidMagBytes,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum MagType {
|
pub enum MagType {
|
||||||
Mag,
|
Mag,
|
||||||
Varuna,
|
Varuna,
|
||||||
|
@ -6,7 +6,7 @@ pub enum ItemParseError {
|
|||||||
InvalidShieldType,
|
InvalidShieldType,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum ShieldType {
|
pub enum ShieldType {
|
||||||
Barrier,
|
Barrier,
|
||||||
Shield,
|
Shield,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use serde::{Serialize, Deserialize};
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum Technique {
|
pub enum Technique {
|
||||||
Foie,
|
Foie,
|
||||||
Gifoie,
|
Gifoie,
|
||||||
|
@ -6,7 +6,7 @@ pub enum ItemParseError {
|
|||||||
InvalidToolType,
|
InvalidToolType,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum ToolType {
|
pub enum ToolType {
|
||||||
Monomate,
|
Monomate,
|
||||||
Dimate,
|
Dimate,
|
||||||
|
@ -6,7 +6,7 @@ pub enum ItemParseError {
|
|||||||
InvalidUnitType,
|
InvalidUnitType,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum UnitType {
|
pub enum UnitType {
|
||||||
KnightPower,
|
KnightPower,
|
||||||
GeneralPower,
|
GeneralPower,
|
||||||
|
@ -45,7 +45,7 @@ impl WeaponAttribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, strum_macros::EnumIter)]
|
||||||
pub enum WeaponSpecial {
|
pub enum WeaponSpecial {
|
||||||
Draw = 1,
|
Draw = 1,
|
||||||
Drain,
|
Drain,
|
||||||
@ -141,7 +141,7 @@ impl WeaponSpecial {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display, strum_macros::EnumIter)]
|
||||||
pub enum WeaponType {
|
pub enum WeaponType {
|
||||||
Saber,
|
Saber,
|
||||||
Brand,
|
Brand,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user