diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-09-17 12:10:03 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-09-17 12:10:03 +0200 |
commit | ee36a8b93e6993f8cf7e8832e0d101fcf5ba5132 (patch) | |
tree | 6deea1c201a9f7331706a671f95e3927f6455059 /src | |
parent | 90d3e1de0d8bc2cb7b59d1f5897d1891056f99a1 (diff) | |
download | ezau-ee36a8b93e6993f8cf7e8832e0d101fcf5ba5132.tar.gz ezau-ee36a8b93e6993f8cf7e8832e0d101fcf5ba5132.tar.bz2 ezau-ee36a8b93e6993f8cf7e8832e0d101fcf5ba5132.zip |
adjust ezau for latest fractal changes
100/99 have been moved to 99/98.
Due to broken CM detection on Skorvald, the check has been hacked
together for now until a proper CM detection is working again.
Diffstat (limited to 'src')
-rw-r--r-- | src/categories.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/categories.rs b/src/categories.rs index 24ffcb1..8c61ae4 100644 --- a/src/categories.rs +++ b/src/categories.rs @@ -22,8 +22,8 @@ impl Categorizable for Log { "Wing 7 (Key of Ahdashim)" } - Boss::Skorvald | Boss::Artsariiv | Boss::Arkk => "100 CM (Shattered Observatory)", - Boss::MAMA | Boss::Siax | Boss::Ensolyss => "99 CM (Nightmare)", + Boss::Skorvald | Boss::Artsariiv | Boss::Arkk => "99 CM (Shattered Observatory)", + Boss::MAMA | Boss::Siax | Boss::Ensolyss => "98 CM (Nightmare)", Boss::IcebroodConstruct | Boss::VoiceOfTheFallen diff --git a/src/main.rs b/src/main.rs index 4052d59..5711854 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,7 @@ use std::{ use anyhow::{anyhow, Context, Result}; use clap::Clap; -use evtclib::{Boss, Compression, Log}; +use evtclib::{analyzers::helpers, Boss, Compression, Log}; use log::{debug, error, info, warn}; use notify::{self, DebouncedEvent, RecursiveMode, Watcher}; use regex::Regex; @@ -198,7 +198,13 @@ fn should_upload(config: &Config, log: &Log) -> bool { return false; } // Only upload Skorvald if it actually was in 100 CM (and not in in lower-tier or non-CM). - if log.encounter() == Some(Boss::Skorvald) && !log.is_cm() { + // Currently, CM detection is broken, so check that we are at least in T4 and assume that every + // T4 Skorvald is a CM Skorvald. + if log.encounter() == Some(Boss::Skorvald) + && helpers::boss_health(log) + .map(|h| h < 5_526_000) + .unwrap_or(false) + { return false; } // Only upload logs that are long enough |