Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register the variables on start #92

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hit_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::hollow_knight_memory::*;
use crate::timer::{Resettable, Timer};

/// The dash symbol to use for generic dashes in text.
const DASH: &str = "—";
pub const DASH: &str = "—";
/// The minus symbol to use for negative numbers.
const MINUS: &str = "−";
/// The plus symbol to use for positive numbers.
Expand Down
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use hollow_knight_memory::*;
use splits::Split;
use timer::{Resettable, SplitterAction, Timer};
use load_remover::LoadRemover;
use hit_counter::HitCounter;
use hit_counter::{HitCounter, DASH};
use ugly_widget::store::StoreGui;

asr::async_main!(stable);
Expand Down Expand Up @@ -56,6 +56,14 @@ async fn main() {

asr::print_message("Hello, World!");

// register the variables on start
asr::timer::set_variable_int("hits", 0);
asr::timer::set_variable_int("segment hits", 0);
asr::timer::set_variable("pb hits", DASH);
asr::timer::set_variable("comparison hits", DASH);
asr::timer::set_variable("delta hits", DASH);
asr::timer::set_variable("item", "");

let mut gui = Box::new(SettingsGui::wait_load_merge_register().await);

let mut ticks_since_gui = 0;
Expand Down
Loading