From 2bfccc4175c6e60f260b1ef417d5c97974dbe182 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 30 Jul 2026 22:45:45 +0200 Subject: [PATCH] Typo on thresholds --- Cargo.toml | 2 +- crates/monsters/src/monster_export.rs | 6 +++++- helper_config.toml | 2 +- ravenous_databases | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 57f9fd1..915b82e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "3" # edition = "2024" # license = "MIT OR Apache-2.0" [workspace.package] -version = "0.3.30" +version = "0.3.31" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/monsters/src/monster_export.rs b/crates/monsters/src/monster_export.rs index 0f0e527..f5199ce 100644 --- a/crates/monsters/src/monster_export.rs +++ b/crates/monsters/src/monster_export.rs @@ -29,7 +29,11 @@ macro_rules! template_load { } handlebars_helper!(plus: |x:i64 ,y:Option| x+y.unwrap_or(0)); -handlebars_helper!(threshold_bonus: |threshold:i64, size:i64| format!("{:+}{:+}",threshold-6-size,size)); +handlebars_helper!(threshold_bonus: |threshold:i64, size:i64| { + let mal = (threshold-6-size).min(-2); + let bon = threshold-mal-6; + format!("{:+}{:+}",mal,bon) +}); fn load_templates(config: &Config) -> Result> { let mut templates = Handlebars::new(); diff --git a/helper_config.toml b/helper_config.toml index 3223e42..705b6f4 100644 --- a/helper_config.toml +++ b/helper_config.toml @@ -169,7 +169,7 @@ Nom & {{{name}}} \\ {{/if}}{{#if default_human_reaction}}Réaction à l'homme & \SetCell{font=\footnotesize} {{{default_human_reaction}}} \\ {{/if}}{{#if variants}}Variantes & \SetCell{font=\footnotesize} {{{variants}}}\\ {{/if}}{{#if size}}Taille & \SetCell{font=\footnotesize} {{{size}}}\\ -{{/if}}{{#if traces}}Traces de pas & \SetCell{font=\footnotesize} {{{traces}}}\\ +{{/if}}{{#if traces}}Traces & \SetCell{font=\footnotesize} {{{traces}}}\\ {{/if}}{{#if habits}}Mœurs & \SetCell{font=\footnotesize} {{{habits}}} \\ {{/if}}\end{tblr} \vfill diff --git a/ravenous_databases b/ravenous_databases index 61b5983..dfa02e2 160000 --- a/ravenous_databases +++ b/ravenous_databases @@ -1 +1 @@ -Subproject commit 61b59832a66e73cc0fd1dc8bb881b18d33a34c7e +Subproject commit dfa02e2130a471080a14482f3481b9582f7be6e9 -- 2.45.1