aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
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