Added buddy commands and horny license

+ clippy + fmt
This commit is contained in:
2023-07-07 19:47:03 -06:00
parent 2c2634925d
commit d076318e4a
9 changed files with 530 additions and 1 deletions
+5
View File
@@ -32,6 +32,7 @@ pub enum ItemType {
TheConceptOfLove,
GoodFortune,
Nft,
LicenseToBeHorny,
}
#[derive(Debug, Clone, Hash, Eq, PartialEq, Copy)]
@@ -56,6 +57,8 @@ impl FromStr for ItemType {
Ok(ItemType::GoodFortune)
} else if item.starts_with("nft") {
Ok(ItemType::Nft)
} else if item.starts_with("licensetobehorny") {
Ok(ItemType::LicenseToBeHorny)
} else {
Err(InventoryError::UnkownItem)
}
@@ -69,6 +72,7 @@ impl Display for ItemType {
ItemType::TheConceptOfLove => "The Concept of Love".to_string(),
ItemType::GoodFortune => "Good Fortune".to_string(),
ItemType::Nft => "NFT".to_string(),
ItemType::LicenseToBeHorny => "License to be Horny".to_string(),
};
write!(f, "{}", name)
@@ -88,6 +92,7 @@ impl InventorySlot {
ItemType::TheConceptOfLove => 300,
ItemType::GoodFortune => 75,
ItemType::Nft => 100,
ItemType::LicenseToBeHorny => 100,
}
}