diff options
author | Daniel Schadt <kingdread@gmx.de> | 2018-07-07 03:23:25 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2018-07-07 03:23:25 +0200 |
commit | 22051473844bddb60c8c062f511fd4b1f90d48bd (patch) | |
tree | 8001a9ff97ae7d065c2e6c56cf5fe5a98d44e6b4 /src/lib.rs | |
parent | 4ea1d4f3e5082925874a271d14cc143ebf80912f (diff) | |
download | evtclib-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.rs | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -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 |