From dc918ccb8bc7246b673d3c292e0c0561b0e3acb7 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 5 May 2026 19:35:51 +0200 Subject: [PATCH] Wrong order on deserialisation --- crates/config/src/graph.rs | 20 ++++++++++---------- crates/graphs/Cargo.toml | 2 +- crates/graphs/src/graphs.rs | 18 ------------------ 3 files changed, 11 insertions(+), 29 deletions(-) diff --git a/crates/config/src/graph.rs b/crates/config/src/graph.rs index a514e0c..c064f92 100644 --- a/crates/config/src/graph.rs +++ b/crates/config/src/graph.rs @@ -119,14 +119,14 @@ pub struct LoadedClassRadar { pub mobility: f64, /// The ability to inflict state alterations. pub alterations: f64, + /// The ability to break armor. + pub armorbreak: f64, /// The ability to provide support. pub support: f64, /// The ability to inflict crowd control. pub cc: f64, /// The ability to improve quality of life. pub qol: f64, - /// The ability to break armor. - pub armorbreak: f64, } /// All the categories to load from the tables @@ -146,18 +146,18 @@ pub struct RawRow { pub effet: String, /// A indicative column for notes pub indicative: String, - /// The ability to survive. - pub survivability: String, - /// The ability to deal damage. - pub damage: String, - /// The ability to move. - pub mobility: String, - /// The ability to inflict state alterations. - pub alterations: String, /// The ability to provide support. pub support: String, + /// The ability to deal damage. + pub damage: String, + /// The ability to survive. + pub survivability: String, + /// The ability to move. + pub mobility: String, /// The ability to inflict crowd control. pub cc: String, + /// The ability to inflict state alterations. + pub alterations: String, /// The ability to improve quality of life. pub qol: String, /// The ability to break armor. diff --git a/crates/graphs/Cargo.toml b/crates/graphs/Cargo.toml index 75904ca..0c475a7 100644 --- a/crates/graphs/Cargo.toml +++ b/crates/graphs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "graphs" -version = "0.1.2" +version = "0.1.3" edition = "2024" [dependencies] diff --git a/crates/graphs/src/graphs.rs b/crates/graphs/src/graphs.rs index b004954..f459a65 100644 --- a/crates/graphs/src/graphs.rs +++ b/crates/graphs/src/graphs.rs @@ -104,8 +104,6 @@ fn gen_graph(args: &GraphConfig) -> Result<()> { let cfg = load_graph_config(args)?; for graph in csv.values { - // println!("{:?} {:#?}", maxv, graph); - // let path = format!("{}/{}.png", args.destination, &graph.name); let path_svg = format!("{}/{}.svg", args.destination, &graph.name); let path_png = format!("{}/{}.png", args.destination, &graph.name); println!("[INFO] Processing {}", path_svg); @@ -118,18 +116,6 @@ fn gen_graph(args: &GraphConfig) -> Result<()> { let context = r.svg().context("Converting to SVG")?; f.write_all(context.as_bytes())?; - // let mut cmd = Command::new("convert"); - // cmd.arg("--size") - // .arg("800x600") - // .arg(&path_svg) - // .arg(path_png); - // println!("[INFO] Using convert cli to convert to png"); - // if let Err(e) = cmd.output() { - // println!( - // "[ERRR] An error has occured when converting the file {} to png \n {:#?}", - // path_svg, e - // ) - // } let png = svg_to_png_with_size(&context, Some(980), Some(560)).context("Writing png")?; let mut f = File::create(path_png)?; f.write_all(&png).context("Writing png")?; @@ -165,10 +151,6 @@ fn generate_csv() -> Result<()> { .context("Stripping extention")?; let categories = load_categories_from_tsv(single_class.clone()).context("Loading from csv")?; - // final_class_list.push(ClassValues { - // name: class_name.to_string(), - // categories, - // }); final_class_list.push(FinalClassRadar::from_radar_with_name( class_name.to_string(), categories, -- 2.45.1