use dbg! for debug prints
This commit is contained in:
parent
8b1f124552
commit
fc4e92ed34
1 changed files with 14 additions and 29 deletions
43
src/main.rs
43
src/main.rs
|
@ -121,46 +121,31 @@ fn cook() -> Result<(), Errorfr> {
|
||||||
let eletype = match eachpowder.r#type.to_ascii_lowercase() {
|
let eletype = match eachpowder.r#type.to_ascii_lowercase() {
|
||||||
'e' => {
|
'e' => {
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
println!("Powder type: Earth");
|
|
||||||
}
|
}
|
||||||
Element::Earth
|
Element::Earth
|
||||||
}
|
}
|
||||||
't' => {
|
't' => {
|
||||||
|
|
||||||
if debug_mode {
|
|
||||||
println!("Powder type: Thunder");
|
|
||||||
}
|
|
||||||
Element::Thunder
|
Element::Thunder
|
||||||
}
|
}
|
||||||
'w' => {
|
'w' => {
|
||||||
if debug_mode {
|
|
||||||
println!("Powder type: Water");
|
|
||||||
}
|
|
||||||
Element::Water
|
Element::Water
|
||||||
}
|
}
|
||||||
'f' => {
|
'f' => {
|
||||||
if debug_mode {
|
|
||||||
println!("Powder type: Fire");
|
|
||||||
}
|
|
||||||
Element::Fire
|
Element::Fire
|
||||||
}
|
}
|
||||||
'a' => {
|
'a' => {
|
||||||
if debug_mode {
|
|
||||||
println!("Powder type: Air");
|
|
||||||
}
|
|
||||||
Element::Air
|
Element::Air
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if debug_mode {
|
|
||||||
println!("Powder type: Broken, fallback Thunder");
|
|
||||||
}
|
|
||||||
Element::Thunder
|
Element::Thunder
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
dbg!("Element type: {}",eletype);
|
||||||
powdervec.push(Some((eletype,powdertier)));
|
powdervec.push(Some((eletype,powdertier)));
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
println!("Powder tier: {}", powdertier);
|
dbg!(powdertier);
|
||||||
println!("Powder amount: {}", powderamount);
|
dbg!(powderamount);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -170,7 +155,7 @@ fn cook() -> Result<(), Errorfr> {
|
||||||
|
|
||||||
}
|
}
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
println!("Powders Vec: {:?}", powdervec);
|
dbg!(powdervec);
|
||||||
}
|
}
|
||||||
|
|
||||||
// old powder data encode kinda, takes data from new encode
|
// old powder data encode kinda, takes data from new encode
|
||||||
|
@ -182,16 +167,16 @@ fn cook() -> Result<(), Errorfr> {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
match json_config.rerolls {
|
match json_config.rerolls {
|
||||||
Some(i) => {
|
Some(rerollcount) => {
|
||||||
if i != 0 {
|
if rerollcount != 0 {
|
||||||
RerollData(i).encode(ver, &mut out).unwrap();
|
RerollData(rerollcount).encode(ver, &mut out).unwrap();
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
println!("Rerolls: {}", i)
|
dbg!(rerollcount);
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
None => pass(),
|
None => pass(),
|
||||||
}
|
};
|
||||||
|
|
||||||
let mut realshinykey: u8;
|
let mut realshinykey: u8;
|
||||||
if let Some(shiny) = json_config.shiny {
|
if let Some(shiny) = json_config.shiny {
|
||||||
|
@ -203,7 +188,7 @@ fn cook() -> Result<(), Errorfr> {
|
||||||
if i.key == shiny.key {
|
if i.key == shiny.key {
|
||||||
realshinykey = i.id;
|
realshinykey = i.id;
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
println!("shiny key {}", shiny.key);
|
dbg!(shiny.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue