Skip to content

Commit

Permalink
cat tracker fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmjosack committed Nov 4, 2022
1 parent 03dc0c2 commit bdb5193
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.7.1] - 2022-11-04

### Fixed

#### Category Tracker

- Don't infer Chain/Bookskip until chain is started or failed
- Don't show Bookskip on Low% Hell runs

## [0.7.0] - 2022-11-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions libs/cat_labels/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ impl RunLabels {
}
}
Label::Bookskip => {
if visible.contains(&LabelType::Label(Label::Low)) {
visible.remove(&label_metadata.label_type);
}
if visible.contains(&LabelType::Label(Label::TempleShortcut)) {
visible.remove(&label_metadata.label_type);
}
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "Apache 2"
name = "hd-toolbox"
repository = ""
rust-version = "1.57"
version = "0.7.0"
version = "0.7.1"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
14 changes: 12 additions & 2 deletions src-tauri/src/tasks/category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct RunState {
is_shield: bool,
is_eggy: bool,

chain_hell_started: bool,
chain_hell_failed: bool,
max_failed: bool,
failed_low_if_not_chain_hell: bool,
Expand Down Expand Up @@ -68,6 +69,7 @@ impl Default for RunState {
is_shield: false,
is_eggy: false,

chain_hell_started: false,
chain_hell_failed: false,
max_failed: false,
failed_low_if_not_chain_hell: false,
Expand Down Expand Up @@ -245,21 +247,25 @@ impl RunState {
if !self.chain_hell_failed {
match item {
EntityType::UdjatEye => {
self.chain_hell_started = true;
self.run_labels.add_label(Label::Chain);
self.run_labels.set_terminus(TerminusLabel::Hell);
}
EntityType::Ankh => {
self.got_ankh = true;
self.chain_hell_started = true;
self.run_labels.add_label(Label::Chain);
self.run_labels.set_terminus(TerminusLabel::Hell);
}
EntityType::Hedjet => {
self.got_hedjet = true;
self.chain_hell_started = true;
self.run_labels.add_label(Label::Chain);
self.run_labels.set_terminus(TerminusLabel::Hell);
}
EntityType::BookOfTheDead => {
self.got_book_of_the_dead = true;
self.chain_hell_started = true;
self.run_labels.add_label(Label::Chain);
self.run_labels.set_terminus(TerminusLabel::Hell);
}
Expand All @@ -285,7 +291,9 @@ impl RunState {
self.run_labels.add_label(Label::Shield);

if !self.chain_hell_failed {
self.run_labels.add_label(Label::Chain);
if self.chain_hell_started {
self.run_labels.add_label(Label::Chain);
}
self.run_labels.rm_label(&Label::Bookskip);
} else {
self.run_labels.add_label(Label::Bookskip);
Expand All @@ -299,7 +307,9 @@ impl RunState {
self.run_labels.add_label(Label::Eggplant);

if !self.chain_hell_failed {
self.run_labels.add_label(Label::Chain);
if self.chain_hell_started {
self.run_labels.add_label(Label::Chain);
}
self.run_labels.rm_label(&Label::Bookskip);
} else {
self.run_labels.add_label(Label::Bookskip);
Expand Down

0 comments on commit bdb5193

Please sign in to comment.