aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-09-28 13:32:54 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-09-28 13:32:54 +0200
commitb50febe63e8d72b396feac4b67f55fbc52c03dae (patch)
tree6278b78f8a9b1d59a921bf7cf5c121e5aa44c41d /src/lib.rs
parent84fcd5692540940550daf9423d09de77cd18e803 (diff)
downloadevtclib-b50febe63e8d72b396feac4b67f55fbc52c03dae.tar.gz
evtclib-b50febe63e8d72b396feac4b67f55fbc52c03dae.tar.bz2
evtclib-b50febe63e8d72b396feac4b67f55fbc52c03dae.zip
rename Log::npcs to Log::characters
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index cbfaf2e..9e605d8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -738,8 +738,8 @@ impl Log {
self.agents.iter().filter_map(|a| a.as_player())
}
- /// Return an iterator over all agents that are NPCs.
- pub fn npcs(&self) -> impl Iterator<Item = &Agent<Character>> {
+ /// Return an iterator over all agents that are characters.
+ pub fn characters(&self) -> impl Iterator<Item = &Agent<Character>> {
self.agents.iter().filter_map(|a| a.as_character())
}
@@ -753,7 +753,7 @@ impl Log {
/// Be careful with encounters that have multiple boss agents, such as Trio
/// and Xera.
pub fn boss(&self) -> &Agent {
- self.npcs()
+ self.characters()
.find(|c| c.character().id == self.boss_id)
.map(Agent::erase)
.expect("Boss has no agent!")
@@ -768,7 +768,7 @@ impl Log {
.encounter()
.map(Encounter::bosses)
.unwrap_or(&[] as &[_]);
- self.npcs()
+ self.characters()
.filter(|c| bosses.iter().any(|boss| *boss as u16 == c.character().id))
.map(Agent::erase)
.collect()