Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
TCA166 committed May 25, 2024
1 parent 6d6b7e4 commit 2f2b820
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ck3_history_extractor"
version = "0.2.0"
version = "0.2.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
11 changes: 9 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ fn main() {
let mut depth = 3;
if args.len() < 2{
print!("Enter the filename: ");
stdout().flush().unwrap();
//raw file contents
stdin().read_line(&mut filename).unwrap();
filename = filename.trim().to_string();
print!("Enter the game path(You can just leave this empty): ");
stdout().flush().unwrap();
let mut inp = String::new();
stdin().read_line(&mut inp).unwrap();
inp = inp.trim().to_string();
Expand Down Expand Up @@ -243,13 +245,17 @@ fn main() {
"living" => {
let r = i.to_object();
for l in r.get_obj_iter(){
game_state.add_character(l.1.as_object().unwrap());
let chr = l.1.as_object();
if chr.is_some(){
game_state.add_character(chr.unwrap());
}
}
}
"dead_unprunable" => {
let r = i.to_object();
for d in r.get_obj_iter(){
game_state.add_character(d.1.as_object().unwrap());
let chr = d.1.as_object();
game_state.add_character(chr.unwrap());
}
}
"vassal_contracts" => {
Expand Down Expand Up @@ -338,6 +344,7 @@ fn main() {
//Print the time taken
println!("\nTime taken: {}s\n", end_time.duration_since(start_time).unwrap().as_secs());
print!("Press enter to exit...");
stdout().flush().unwrap();
let mut inp = String::new();
stdin().read_line(&mut inp).unwrap();
}

0 comments on commit 2f2b820

Please sign in to comment.