From 885a1caaf679d3212304d05da3b9504233936d82 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 18 Jul 2026 18:13:45 +0200 Subject: [PATCH] More fixing --- crates/monsters/src/monster_export.rs | 16 +++++++++------- crates/monsters/src/monster_structs.rs | 2 +- helper_config.toml | 4 ++-- ravenous_databases | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/monsters/src/monster_export.rs b/crates/monsters/src/monster_export.rs index a150ae4..9ea6759 100644 --- a/crates/monsters/src/monster_export.rs +++ b/crates/monsters/src/monster_export.rs @@ -197,23 +197,28 @@ impl MonsterAllAttacks { attacklist: atk.iter().map(|&v| v.clone()).collect(), // color: atk.first().unwrap().attack_type.clone(), size: atk.len() + 1, - description: atk + description_final: atk .first() .unwrap() .description_all .clone() .unwrap_or_default(), }; + // println!("group: {:#?}", group_attack.description_final); phases.get_mut(&phase_name).unwrap().push(group_attack); } else { for single_atk in atk { + // println!("single: {:#?}", single_atk.description_all); phases .get_mut(&phase_name) .unwrap() .push(MonsterFullAttack { attacklist: vec![single_atk.clone()], size: 2, - description: single_atk.description_all.clone().unwrap_or_default(), + description_final: single_atk + .description_all + .clone() + .unwrap_or_default(), }); } }; @@ -262,11 +267,8 @@ impl MonsterAllAttacks { )?; } - write!( - out, - "{}", - templates.render("attack_info_row", &list_full_attacks[0])? - )?; + write!(out, "{}", templates.render("attack_info_row", attack)?)?; + println!("{:?}", list_full_attacks); } } Ok(out) diff --git a/crates/monsters/src/monster_structs.rs b/crates/monsters/src/monster_structs.rs index fdbaca8..16afcac 100644 --- a/crates/monsters/src/monster_structs.rs +++ b/crates/monsters/src/monster_structs.rs @@ -386,5 +386,5 @@ pub struct MonsterFullAttack { pub attacklist: Vec, // pub color: String, pub size: usize, - pub description: String, + pub description_final: String, } diff --git a/helper_config.toml b/helper_config.toml index 3807cff..7630f20 100644 --- a/helper_config.toml +++ b/helper_config.toml @@ -259,7 +259,7 @@ init_end= ''' attacks_intro= ''' {\scriptsize \begin{tblr}{ - colspec={X[0.05] X[3,l] X[1,c] X[1,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[2,r] X[4,c] X[0.3,c] X[0.3,c]}, + colspec={X[0.05] X[2.5,l] X[1,c] X[1,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[2,r] X[4,l] X[0.3,c] X[0.3,c]}, hspan=minimal, colsep=2pt, row{2}={font=\tiny}, @@ -279,7 +279,7 @@ attack_color='\SetCell[r={{{size}}}]{bg={{{color}}}}' # Very ugly hack, going to # attack_repeatable_row= ''' & {{{name}}} & {{{short_name}}} & {{{prerequisites}}} & {{{atk_type}}} & {{{targetting}}} & {{{cost_fatigue}}} & {{{cost_action}}} & {{{element}}} & {{{damage_fatigue}}} &{{{damage_regular}}} & {{{effects}}} & {{{threshold_parry}}} & {{{threshold_dodge}}} \\ attack_repeatable_row= ''' & {{{name}}} & {{{atk_type}}} & {{{prerequisites}}} & {{{targetting}}} & {{{cost_fatigue}}} & {{{cost_action}}} & {{{element}}} & {{{damage_fatigue}}} &{{{damage_regular}}} & {{{effects}}} & {{{threshold_parry}}} & {{{threshold_dodge}}} \\ ''' -attack_info_row='''& \SetCell[c=12]{j} {{{description}}} & & & & & & & & & & \\ +attack_info_row='''& \SetCell[c=12]{j} {{{description_final}}} & & & & & & & & & & \\ \hline ''' attacks_end= ''' \end{tblr} diff --git a/ravenous_databases b/ravenous_databases index 27b578c..ec988aa 160000 --- a/ravenous_databases +++ b/ravenous_databases @@ -1 +1 @@ -Subproject commit 27b578ce3b1202817e406ef2a762893432706eec +Subproject commit ec988aabeb3c94233d7f60deef2ff3873c8e9100 -- 2.45.1