Keep incomplete catalogs and offscreen tooltips out of the recap (#135)
CI / core (pull_request) Successful in 1m39s
CI / core (pull_request) Successful in 1m39s
Reject patch lists without any names before writing the cache and retry unusable caches at the same version. Scope visible tooltips to their player so inactive item slots need no tooltip state.
This commit is contained in:
1 parent
bb20a1f853
commit
a4a2a51670
15 files changed
+435
-227
No files matched your search
@@ -230,11 +230,14 @@ fn player(
|
||||
.then(|| {
|
||||
p.items.map(|slot| match slot {
|
||||
Some(0) => Slot::Empty,
|
||||
Some(id) => Slot::Item {
|
||||
title: catalog.item_name(id).into(),
|
||||
description: catalog.item_description(id).map(Into::into),
|
||||
icon: catalog.item_icon(id),
|
||||
},
|
||||
Some(id) => {
|
||||
let item = catalog.item_display(id);
|
||||
Slot::Item {
|
||||
title: item.name.into(),
|
||||
description: item.description.map(Into::into),
|
||||
icon: item.icon,
|
||||
}
|
||||
}
|
||||
None => Slot::Missing,
|
||||
})
|
||||
})
|
||||
@@ -255,10 +258,13 @@ fn player(
|
||||
augments: (p.augments.as_ref())
|
||||
.map(|augments| {
|
||||
(augments.iter())
|
||||
.map(|&id| ShownAugment {
|
||||
name: catalog.augment_name(id).into(),
|
||||
description: catalog.augment_description(id).map(Into::into),
|
||||
icon: catalog.augment_icon(id),
|
||||
.map(|&id| {
|
||||
let augment = catalog.augment_display(id);
|
||||
ShownAugment {
|
||||
name: augment.name.into(),
|
||||
description: augment.description.map(Into::into),
|
||||
icon: augment.icon,
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user