diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-09-28 13:37:49 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-09-28 13:37:49 +0200 |
commit | 52deb7c4a8ed0a3714abe10c6d532e34f784f86c (patch) | |
tree | c19dc57913b6644a5dfa484387205b963271a7a6 /src/lib.rs | |
parent | b50febe63e8d72b396feac4b67f55fbc52c03dae (diff) | |
download | evtclib-52deb7c4a8ed0a3714abe10c6d532e34f784f86c.tar.gz evtclib-52deb7c4a8ed0a3714abe10c6d532e34f784f86c.tar.bz2 evtclib-52deb7c4a8ed0a3714abe10c6d532e34f784f86c.zip |
add Log::build_id
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -915,4 +915,16 @@ impl Log { }) .collect() } + + /// Returns the game's build id. + /// + /// If no build id was found, `None` is returned. + pub fn build_id(&self) -> Option<u64> { + for event in self.events() { + if let EventKind::Build { build } = event.kind() { + return Some(*build) + } + } + None + } } |