aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-09-28 13:32:36 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-09-28 13:32:36 +0200
commit84fcd5692540940550daf9423d09de77cd18e803 (patch)
tree36c609c549ed8f89543d0b6993f8b52f404ca780 /src/lib.rs
parentba10db6e8120fe9315bf0dec99e9dee188b8332c (diff)
downloadevtclib-84fcd5692540940550daf9423d09de77cd18e803.tar.gz
evtclib-84fcd5692540940550daf9423d09de77cd18e803.tar.bz2
evtclib-84fcd5692540940550daf9423d09de77cd18e803.zip
add Log::gadgets
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ecdc876..cbfaf2e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -743,6 +743,11 @@ impl Log {
self.agents.iter().filter_map(|a| a.as_character())
}
+ /// Return an iterator over all agents that are gadgets.
+ pub fn gadgets(&self) -> impl Iterator<Item = &Agent<Gadget>> {
+ self.agents.iter().filter_map(|a| a.as_gadget())
+ }
+
/// Return the boss agent.
///
/// Be careful with encounters that have multiple boss agents, such as Trio