aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2018-07-07 03:23:25 +0200
committerDaniel Schadt <kingdread@gmx.de>2018-07-07 03:23:25 +0200
commit22051473844bddb60c8c062f511fd4b1f90d48bd (patch)
tree8001a9ff97ae7d065c2e6c56cf5fe5a98d44e6b4 /src/lib.rs
parent4ea1d4f3e5082925874a271d14cc143ebf80912f (diff)
downloadevtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.tar.gz
evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.tar.bz2
evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.zip
base for mechanic tracking
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ab32bd1..98f47ae 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -95,27 +95,27 @@ pub enum AgentName {
/// An agent.
#[derive(Debug, Clone, Getters)]
pub struct Agent {
- #[get="pub"]
+ #[get = "pub"]
addr: u64,
- #[get="pub"]
+ #[get = "pub"]
kind: AgentKind,
- #[get="pub"]
+ #[get = "pub"]
toughness: i16,
- #[get="pub"]
+ #[get = "pub"]
concentration: i16,
- #[get="pub"]
+ #[get = "pub"]
healing: i16,
- #[get="pub"]
+ #[get = "pub"]
condition: i16,
- #[get="pub"]
+ #[get = "pub"]
name: AgentName,
- #[get="pub"]
+ #[get = "pub"]
instance_id: u16,
- #[get="pub"]
+ #[get = "pub"]
first_aware: u64,
- #[get="pub"]
+ #[get = "pub"]
last_aware: u64,
- #[get="pub"]
+ #[get = "pub"]
master_agent: Option<u64>,
}
@@ -196,6 +196,11 @@ impl Log {
self.boss_agents().into_iter().any(|a| *a.addr() == addr)
}
+ /// Returns the boss/encounter id.
+ pub fn boss_id(&self) -> u16 {
+ self.boss_id
+ }
+
/// Return all events present in this log.
pub fn events(&self) -> &[Event] {
&self.events