From 076ce4cb4144dde5b779296fc0ba669672c94ef6 Mon Sep 17 00:00:00 2001 From: Symmetricity <184246+Symmetricity@users.noreply.github.com> Date: Sun, 14 Jun 2026 12:07:33 +0200 Subject: [PATCH 1/2] Accept vic3 format alias for melting The melt command documents vic3 as a valid --format value, but only the v3 extension alias parsed successfully. This made explicit Vic3 melting fail before the save file was read. Keep v3 working and accept vic3 so the documented option reaches the existing Vic3 melter. Co-authored-by: Codex --- src/melt.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/melt.rs b/src/melt.rs index 79c702f..6ea5154 100644 --- a/src/melt.rs +++ b/src/melt.rs @@ -109,7 +109,7 @@ impl FromStr for MelterKind { "ck3" => Ok(MelterKind::Ck3), "rome" => Ok(MelterKind::Imperator), "hoi4" => Ok(MelterKind::Hoi4), - "v3" => Ok(MelterKind::Vic3), + "v3" | "vic3" => Ok(MelterKind::Vic3), _ => bail!("Only eu4, eu5, ck3, vic3, hoi4, and imperator files supported"), } } @@ -296,4 +296,16 @@ mod tests { Path::new("/tmp").join("gamestate_melted") ); } + + #[test] + fn vic3_format_aliases_parse() { + assert!(matches!( + "v3".parse::().unwrap(), + MelterKind::Vic3 + )); + assert!(matches!( + "vic3".parse::().unwrap(), + MelterKind::Vic3 + )); + } } From e2699ef779cc2c4a4fe6cf82898cc744a6d88ee8 Mon Sep 17 00:00:00 2001 From: Symmetricity <184246+Symmetricity@users.noreply.github.com> Date: Sun, 14 Jun 2026 12:12:05 +0200 Subject: [PATCH 2/2] Accept vic3 format alias for watch The watch command help documents vic3 as a valid --format value, but the parser only accepted the v3 file extension spelling. Accept the documented alias while keeping v3 extension inference unchanged. Co-authored-by: Codex --- src/watch.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/watch.rs b/src/watch.rs index fa0fed3..69219f9 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -107,7 +107,7 @@ impl FromStr for GameType { "ck3" => Ok(GameType::Ck3), "rome" => Ok(GameType::Imperator), "hoi4" => Ok(GameType::Hoi4), - "v3" => Ok(GameType::Vic3), + "v3" | "vic3" => Ok(GameType::Vic3), _ => Err(anyhow!( "Only eu4, eu5, ck3, vic3, hoi4, and imperator files supported" )), @@ -115,6 +115,20 @@ impl FromStr for GameType { } } +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn vic3_format_aliases_parse() { + assert!(matches!("v3".parse::().unwrap(), GameType::Vic3)); + assert!(matches!( + "vic3".parse::().unwrap(), + GameType::Vic3 + )); + } +} + impl GameType { fn default_frequency(&self) -> SnapshotFrequency { match self {