appease the clip
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
andy 2021-07-31 02:21:15 +00:00
parent 66d882d336
commit b60463eaa0

View File

@ -240,40 +240,40 @@ impl InventoryItem {
if a.is_rare_item() { if a.is_rare_item() {
return Ok(10u32) return Ok(10u32)
} }
return Ok((ArmorShopItem::from(a).price() / 8) as u32) Ok((ArmorShopItem::from(a).price() / 8) as u32)
}, },
ItemDetail::Shield(s) => { ItemDetail::Shield(s) => {
if s.is_rare_item() { if s.is_rare_item() {
return Ok(10u32) return Ok(10u32)
} }
return Ok((ArmorShopItem::from(s).price() / 8) as u32) Ok((ArmorShopItem::from(s).price() / 8) as u32)
}, },
ItemDetail::Unit(u) => { ItemDetail::Unit(u) => {
if u.is_rare_item() { if u.is_rare_item() {
return Ok(10u32) return Ok(10u32)
} }
return Ok((ArmorShopItem::from(u).price() / 8) as u32) Ok((ArmorShopItem::from(u).price() / 8) as u32)
}, },
ItemDetail::Tool(t) => { ItemDetail::Tool(t) => {
if !matches!(t.tool, ToolType::PhotonDrop | ToolType::PhotonSphere | ToolType::PhotonCrystal) && t.is_rare_item() { if !matches!(t.tool, ToolType::PhotonDrop | ToolType::PhotonSphere | ToolType::PhotonCrystal) && t.is_rare_item() {
return Ok(10u32) return Ok(10u32)
} }
return Ok((ToolShopItem::from(t).price() / 8) as u32) Ok((ToolShopItem::from(t).price() / 8) as u32)
}, },
ItemDetail::TechniqueDisk(d) => { ItemDetail::TechniqueDisk(d) => {
return Ok((ToolShopItem::from(d).price() / 8) as u32) Ok((ToolShopItem::from(d).price() / 8) as u32)
}, },
ItemDetail::Mag(_m) => { ItemDetail::Mag(_m) => {
return Err(ItemManagerError::ItemNotSellable(self.clone())) Err(ItemManagerError::ItemNotSellable(self.clone()))
}, },
ItemDetail::ESWeapon(_e) => { ItemDetail::ESWeapon(_e) => {
return Ok(10u32) Ok(10u32)
}, },
} }
}, },
// the number of stacked items sold is handled by the caller. this is just the price of 1 // the number of stacked items sold is handled by the caller. this is just the price of 1
InventoryItem::Stacked(stacked_item) => { InventoryItem::Stacked(stacked_item) => {
return Ok((ToolShopItem::from(&stacked_item.tool).price() / 8) as u32) Ok((ToolShopItem::from(&stacked_item.tool).price() / 8) as u32)
}, },
} }
} }