From 84fcd5692540940550daf9423d09de77cd18e803 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Mon, 28 Sep 2020 13:32:36 +0200 Subject: add Log::gadgets --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib.rs') 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> { + 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 -- cgit v1.2.3