tiger_lib/tooltipped.rs
1//! A helper type used for effects and triggers, which tracks what kind of tooltipping to expect.
2//! This affects which errors are logged about them. Some things only matter if an item is being
3//! tooltipped.
4
5#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
6pub enum Tooltipped {
7 No,
8 Yes,
9 /// for triggers
10 FailuresOnly,
11 /// for effects
12 Past,
13 #[cfg(feature = "hoi4")]
14 /// for triggers that pretend to be inside a `custom_override_tooltip`
15 Inner,
16}
17
18impl Tooltipped {
19 pub fn is_tooltipped(self) -> bool {
20 !matches!(self, Tooltipped::No)
21 }
22}