diff --git a/src/IronyModManager.Parser.Common/Constants.cs b/src/IronyModManager.Parser.Common/Constants.cs index c70c6d94..1b0f4bf4 100644 --- a/src/IronyModManager.Parser.Common/Constants.cs +++ b/src/IronyModManager.Parser.Common/Constants.cs @@ -4,7 +4,7 @@ // Created : 02-16-2020 // // Last Modified By : Mario -// Last Modified On : 07-12-2022 +// Last Modified On : 08-20-2022 // *********************************************************************** // // Mario @@ -279,6 +279,11 @@ public static class HOI4 /// public static readonly string Resources = MergePath(CommonPath, "resources"); + /// + /// The scripted diplomatic actions + /// + public static readonly string ScriptedDiplomaticActions = MergePath(CommonPath, "scripted_diplomatic_actions"); + /// /// The scripted GUI /// diff --git a/src/IronyModManager.Parser.Tests/HOI4InnerLayerParserTests.cs b/src/IronyModManager.Parser.Tests/HOI4InnerLayerParserTests.cs index f350e274..807acf3e 100644 --- a/src/IronyModManager.Parser.Tests/HOI4InnerLayerParserTests.cs +++ b/src/IronyModManager.Parser.Tests/HOI4InnerLayerParserTests.cs @@ -269,6 +269,21 @@ public void CanParse_wargoals_should_be_true() parser.CanParse(args).Should().BeTrue(); } + /// + /// Defines the test method CanParse_scripted_diplomatic_actions_should_be_true. + /// + [Fact] + public void CanParse_scripted_diplomatic_actions_should_be_true() + { + var args = new CanParseArgs() + { + File = "common\\scripted_diplomatic_actions\\test.txt", + GameType = "HeartsofIronIV" + }; + var parser = new Games.HOI4.InnerLayerParser(new CodeParser(new Logger()), null); + parser.CanParse(args).Should().BeTrue(); + } + /// /// Defines the test method Parse_should_yield_results. /// diff --git a/src/IronyModManager.Parser/Games/HOI4/InnerLayerParser.cs b/src/IronyModManager.Parser/Games/HOI4/InnerLayerParser.cs index 14daa74a..c9ed2a18 100644 --- a/src/IronyModManager.Parser/Games/HOI4/InnerLayerParser.cs +++ b/src/IronyModManager.Parser/Games/HOI4/InnerLayerParser.cs @@ -4,7 +4,7 @@ // Created : 01-29-2022 // // Last Modified By : Mario -// Last Modified On : 07-20-2022 +// Last Modified On : 08-20-2022 // *********************************************************************** // // Mario @@ -51,7 +51,7 @@ public class InnerLayerParser : BaseParser, IGameParser Common.Constants.HOI4.Technologies, Common.Constants.HOI4.UnitLeader, Common.Constants.HOI4.CountryLeader, Common.Constants.HOI4.Aces, Common.Constants.HOI4.AIAreas, Common.Constants.HOI4.Buildings, Common.Constants.HOI4.Ideologies, - Common.Constants.HOI4.Resources, Common.Constants.HOI4.Wargoals + Common.Constants.HOI4.Resources, Common.Constants.HOI4.Wargoals, Common.Constants.HOI4.ScriptedDiplomaticActions }; #endregion Fields diff --git a/src/IronyModManager.Services/Registrations/GameRegistration.cs b/src/IronyModManager.Services/Registrations/GameRegistration.cs index ab776f31..49181b18 100644 --- a/src/IronyModManager.Services/Registrations/GameRegistration.cs +++ b/src/IronyModManager.Services/Registrations/GameRegistration.cs @@ -4,7 +4,7 @@ // Created : 02-12-2020 // // Last Modified By : Mario -// Last Modified On : 08-12-2022 +// Last Modified On : 08-20-2022 // *********************************************************************** // // Mario @@ -177,7 +177,7 @@ private IGameType GetHOI4(string baseUserDir) game.RemoteSteamUserDirectory = SteamDirectory.GetUserDataFolders(game.SteamAppId).Select(p => p.StandardizeDirectorySeparator()).ToList(); game.AdvancedFeatures = IronyModManager.Models.Common.GameAdvancedFeatures.ReadOnly; game.ParadoxGameId = Shared.Constants.GamesTypes.HeartsOfIron4.ParadoxGameId; - game.GameIndexCacheVersion = 3; + game.GameIndexCacheVersion = 4; MapGameSettings(game, GetExecutableSettings(game)); return game; }