diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-09-28 13:32:36 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-09-28 13:32:36 +0200 |
commit | 84fcd5692540940550daf9423d09de77cd18e803 (patch) | |
tree | 36c609c549ed8f89543d0b6993f8b52f404ca780 | |
parent | ba10db6e8120fe9315bf0dec99e9dee188b8332c (diff) | |
download | evtclib-84fcd5692540940550daf9423d09de77cd18e803.tar.gz evtclib-84fcd5692540940550daf9423d09de77cd18e803.tar.bz2 evtclib-84fcd5692540940550daf9423d09de77cd18e803.zip |
add Log::gadgets
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/lib.rs | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c6820d9..bd8dd85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. - `Boss::Ai` to represent Ai, Keeper of the Peak in the Sunqua Peak fractal. - `analyzers::fractal::Ai` with logic to determine CM and outcome of the Sunqua Peak CM fight. +- `Log::gadgets` to retrieve all gadget agents. ### Changed - `gamedata::Boss` has been split in `gamedata::Boss` and `gamedata::Encounter` @@ -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 |