show skill delay on info

This commit is contained in:
Mashy
2019-09-20 13:03:13 +10:00
parent 3ad679cb02
commit 6fba9d9f4d
3 changed files with 11 additions and 5 deletions
+8 -3
View File
@@ -1439,8 +1439,9 @@ pub struct ItemInfo {
pub item: Item,
pub cost: usize,
pub spec: bool,
pub skill: bool,
pub values: Option<SpecValues>,
pub skill: bool,
pub cooldown: Option<u8>,
pub description: String,
}
@@ -1470,12 +1471,16 @@ pub fn item_info() -> ItemInfoCtr {
item: v,
cost: v.cost(),
spec: v.into_spec().is_some(),
skill: v.into_skill().is_some(),
description: v.into_description(),
values: match v.into_spec() {
Some(s) => Some(s.values()),
None => None
},
skill: v.into_skill().is_some(),
description: v.into_description(),
cooldown: match v.into_skill() {
Some(s) => s.base_cd(),
None => None
},
})
.collect::<Vec<ItemInfo>>();