Skip to content

Commit

Permalink
fix issues in multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
callmeclover committed May 16, 2024
1 parent 2a248d3 commit f06a6e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ impl Default for Basic {
}
}





pub async fn get_config() -> Config {
loop {
if Path::new("./config.toml").exists() {
Expand Down
6 changes: 3 additions & 3 deletions src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ pub async fn main_logic(options: &[(&str, usize)], tts: &mut Tts, enigo: &mut En

fn pen(pen: &mut PenInjector, rng: &mut rand::rngs::ThreadRng) {
let lists: Vec<(Vec<(&str, usize)>, usize)> = vec![
(GAMEPAD_BUTTONS.to_vec(), 5),
(GAMEPAD_MOVE.to_vec(), 3),
(GAMEPAD_SPECIAL.to_vec(), 1),
(PEN_BUTTONS.to_vec(), 5),
(PEN_MOVE.to_vec(), 3),
(PEN_SPECIAL.to_vec(), 1),
];
let index: WeightedIndex<usize> =
WeightedIndex::new(lists.iter().map(|item: &(Vec<(&str, usize)>, usize)| item.1)).unwrap();
Expand Down
14 changes: 8 additions & 6 deletions src/lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,8 @@ pub static QUOTES_STATEMENT: [(&str, usize); 9] = [
("do a flip!", 1)
];

#[allow(dead_code)]
{
/* Gamepad action lists */
#[allow(dead_code)]
pub static GAMEPAD_BUTTONS: [(&str, usize); 12] = [
("A", 3),
("B", 3),
Expand All @@ -217,11 +216,13 @@ pub static GAMEPAD_BUTTONS: [(&str, usize); 12] = [
("RightTrigger", 2),
];

#[allow(dead_code)]
pub static GAMEPAD_MOVE: [(&str, usize); 2] = [
("LeftThumbstickMove", 2),
("RightThumbstickMove", 1)
];

#[allow(dead_code)]
pub static GAMEPAD_SPECIAL: [(&str, usize); 4] = [
("LeftThumbstick", 1),
("Menu", 1),
Expand All @@ -230,24 +231,25 @@ pub static GAMEPAD_SPECIAL: [(&str, usize); 4] = [
];

/* Pen action lists */
#[allow(dead_code)]
pub static PEN_BUTTONS: [(&str, usize); 3] = [
("Barrel", 1),
("Eraser", 1),
("Inverted", 1),
];

#[allow(dead_code)]
pub static PEN_MOVE: [(&str, usize); 2] = [
("XY_Move", 2),
("X_Move", 1),
("Y_Move", 1)
];

pub static GAMEPAD_SPECIAL: [(&str, usize); 4] = [
#[allow(dead_code)]
pub static PEN_SPECIAL: [(&str, usize); 4] = [
("Pressure", 1),
("Tilt", 1),
("Rotation", 1)
];

/* Touch action lists */

}
/* Touch action lists */

0 comments on commit f06a6e9

Please sign in to comment.