From 96050c887ca5c3f97ee13e08479aa162dd149eb2 Mon Sep 17 00:00:00 2001 From: Ryan ShrineFox Date: Thu, 19 May 2022 17:40:12 -0400 Subject: [PATCH] Add mod.cpk support for P3P, update to 1.7.3 Also removed unnecessary .cs files --- .../ModCompendium/Properties/AssemblyInfo.cs | 4 ++-- .../CatherineFullBodyGameConfig.cs | 10 ---------- .../GameConfigs/ModCpkGameConfig.cs | 19 +++++++++++++++++-- .../GameConfigs/Persona34GameConfig.cs | 10 ++++++++++ .../GameConfigs/Persona3GameConfig.cs | 7 ------- .../GameConfigs/Persona3PortableGameConfig.cs | 7 ------- .../GameConfigs/Persona4DancingGameConfig.cs | 7 ------- .../GameConfigs/Persona4GameConfig.cs | 7 ------- .../GameConfigs/PersonaPortableGameConfig.cs | 10 ++++++++++ .../GameConfigs/PersonaQ2GameConfig.cs | 7 ------- .../GameConfigs/PersonaQGameConfig.cs | 7 ------- .../ModCompendiumLibrary.csproj | 7 ------- .../Builders/CatherineFullBodyModBuilder.cs | 2 +- .../ModSystem/Builders/ModCpkModBuilder.cs | 18 ++++++++++++------ .../Builders/Persona34IsoModBuilder.cs | 4 ++-- .../Builders/PersonaPortableModBuilder.cs | 6 ------ 16 files changed, 54 insertions(+), 78 deletions(-) delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/CatherineFullBodyGameConfig.cs delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3GameConfig.cs delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3PortableGameConfig.cs delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4DancingGameConfig.cs delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4GameConfig.cs delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQ2GameConfig.cs delete mode 100644 Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQGameConfig.cs diff --git a/Source/ModCompendium/Properties/AssemblyInfo.cs b/Source/ModCompendium/Properties/AssemblyInfo.cs index fb579ba..278a9c0 100644 --- a/Source/ModCompendium/Properties/AssemblyInfo.cs +++ b/Source/ModCompendium/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion( "1.7.0.2" )] -[assembly: AssemblyFileVersion( "1.7.0.2" )] +[assembly: AssemblyVersion( "1.7.0.3" )] +[assembly: AssemblyFileVersion( "1.7.0.3" )] diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/CatherineFullBodyGameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/CatherineFullBodyGameConfig.cs deleted file mode 100644 index b76ad73..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/CatherineFullBodyGameConfig.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Xml.Linq; - -namespace ModCompendiumLibrary.Configuration -{ - public class CatherineFullBodyGameConfig : PersonaPortableGameConfig - { - public override Game Game => Game.CatherineFullBody; - - } -} diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/ModCpkGameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/ModCpkGameConfig.cs index 08589a6..c3d7300 100644 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/ModCpkGameConfig.cs +++ b/Source/ModCompendiumLibrary/Configuration/GameConfigs/ModCpkGameConfig.cs @@ -36,6 +36,16 @@ public class Persona3DancingConfig : ModCpkGameConfig public override Game Game => Game.Persona3Dancing; } + public class Persona3PortableConfig : ModCpkGameConfig + { + public override Game Game => Game.Persona3Portable; + } + + public class Persona4GoldenGameConfig : ModCpkGameConfig + { + public override Game Game => Game.Persona4Golden; + } + public class Persona5DancingConfig : ModCpkGameConfig { public override Game Game => Game.Persona5Dancing; @@ -51,8 +61,13 @@ public class Persona5RoyalGameConfig : ModCpkGameConfig public override Game Game => Game.Persona5Royal; } - public class Persona4GoldenGameConfig : ModCpkGameConfig + public class PersonaQ2Config : ModCpkGameConfig { - public override Game Game => Game.Persona4Golden; + public override Game Game => Game.PersonaQ2; + } + + public class PersonaQConfig : ModCpkGameConfig + { + public override Game Game => Game.PersonaQ; } } diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona34GameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona34GameConfig.cs index ed5a8d9..8231331 100644 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona34GameConfig.cs +++ b/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona34GameConfig.cs @@ -27,5 +27,15 @@ protected override void SerializeCore( XElement element ) element.AddNameValuePair( nameof( DvdRootOrIsoPath ), DvdRootOrIsoPath ); element.AddNameValuePair(nameof(HostFS), HostFS); } + + public class Persona4GameConfig : Persona34GameConfig + { + public override Game Game => Game.Persona4; + } + + public class Persona3GameConfig : Persona34GameConfig + { + public override Game Game => Game.Persona3; + } } } \ No newline at end of file diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3GameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3GameConfig.cs deleted file mode 100644 index 8adabd4..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3GameConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ModCompendiumLibrary.Configuration -{ - public class Persona3GameConfig : Persona34GameConfig - { - public override Game Game => Game.Persona3; - } -} diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3PortableGameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3PortableGameConfig.cs deleted file mode 100644 index 19a7f59..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona3PortableGameConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ModCompendiumLibrary.Configuration -{ - public class Persona3PortableGameConfig : PersonaPortableGameConfig - { - public override Game Game => Game.Persona3Portable; - } -} diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4DancingGameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4DancingGameConfig.cs deleted file mode 100644 index f5c6865..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4DancingGameConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ModCompendiumLibrary.Configuration -{ - public class Persona4DancingConfig : PersonaPortableGameConfig - { - public override Game Game => Game.Persona4Dancing; - } -} diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4GameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4GameConfig.cs deleted file mode 100644 index 06b4d51..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/Persona4GameConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ModCompendiumLibrary.Configuration -{ - public class Persona4GameConfig : Persona34GameConfig - { - public override Game Game => Game.Persona4; - } -} \ No newline at end of file diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaPortableGameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaPortableGameConfig.cs index d938735..981d2fe 100644 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaPortableGameConfig.cs +++ b/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaPortableGameConfig.cs @@ -31,5 +31,15 @@ protected override void SerializeCore( XElement element ) element.AddNameValuePair(nameof(Compression), Compression); element.AddNameValuePair(nameof(Extract), Extract); } + + public class Persona4DancingConfig : PersonaPortableGameConfig + { + public override Game Game => Game.Persona4Dancing; + } + + public class CatherineFullBodyGameConfig : PersonaPortableGameConfig + { + public override Game Game => Game.CatherineFullBody; + } } } \ No newline at end of file diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQ2GameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQ2GameConfig.cs deleted file mode 100644 index b5ccdab..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQ2GameConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ModCompendiumLibrary.Configuration -{ - public class PersonaQ2Config : ModCpkGameConfig - { - public override Game Game => Game.PersonaQ2; - } -} diff --git a/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQGameConfig.cs b/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQGameConfig.cs deleted file mode 100644 index 4117c0f..0000000 --- a/Source/ModCompendiumLibrary/Configuration/GameConfigs/PersonaQGameConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ModCompendiumLibrary.Configuration -{ - public class PersonaQGameConfig : ModCpkGameConfig - { - public override Game Game => Game.PersonaQ; - } -} diff --git a/Source/ModCompendiumLibrary/ModCompendiumLibrary.csproj b/Source/ModCompendiumLibrary/ModCompendiumLibrary.csproj index 9880a61..e2892fb 100644 --- a/Source/ModCompendiumLibrary/ModCompendiumLibrary.csproj +++ b/Source/ModCompendiumLibrary/ModCompendiumLibrary.csproj @@ -48,21 +48,14 @@ - - - - - - - diff --git a/Source/ModCompendiumLibrary/ModSystem/Builders/CatherineFullBodyModBuilder.cs b/Source/ModCompendiumLibrary/ModSystem/Builders/CatherineFullBodyModBuilder.cs index 7388655..6ba464d 100644 --- a/Source/ModCompendiumLibrary/ModSystem/Builders/CatherineFullBodyModBuilder.cs +++ b/Source/ModCompendiumLibrary/ModSystem/Builders/CatherineFullBodyModBuilder.cs @@ -26,7 +26,7 @@ public VirtualFileSystemEntry Build(VirtualDirectory root, List enabledMods } // Get game config - var config = ConfigStore.Get(Game) as CatherineFullBodyGameConfig; + var config = ConfigStore.Get(Game) as PersonaPortableGameConfig; if (config == null) { // Unlikely diff --git a/Source/ModCompendiumLibrary/ModSystem/Builders/ModCpkModBuilder.cs b/Source/ModCompendiumLibrary/ModSystem/Builders/ModCpkModBuilder.cs index 8a0e0cb..23a5b09 100644 --- a/Source/ModCompendiumLibrary/ModSystem/Builders/ModCpkModBuilder.cs +++ b/Source/ModCompendiumLibrary/ModSystem/Builders/ModCpkModBuilder.cs @@ -132,10 +132,10 @@ private void LogModFilesInDirectory(VirtualDirectory directory) } } - [ModBuilder("P5D Mod Builder", Game = Game.Persona5Dancing)] - public class P5DModCpkBuilder : ModCpkModBuilder + [ModBuilder("P3P Mod Builder", Game = Game.Persona3Portable)] + public class P3PModCpkBuilder : ModCpkModBuilder { - protected override Game Game => Game.Persona5Dancing; + protected override Game Game => Game.Persona3Portable; } [ModBuilder("P3D Mod Builder", Game = Game.Persona3Dancing)] @@ -144,6 +144,12 @@ public class P3DModCpkBuilder : ModCpkModBuilder protected override Game Game => Game.Persona3Dancing; } + [ModBuilder("P4G Mod Builder", Game = Game.Persona4Golden)] + public class P4GModCpkBuilder : ModCpkModBuilder + { + protected override Game Game => Game.Persona4Golden; + } + [ModBuilder("P5 Mod Builder", Game = Game.Persona5)] public class P5ModCpkBuilder : ModCpkModBuilder { @@ -156,10 +162,10 @@ public class P5RModCpkBuilder : ModCpkModBuilder protected override Game Game => Game.Persona5Royal; } - [ModBuilder("P4G Mod Builder", Game = Game.Persona4Golden)] - public class P4GModCpkBuilder : ModCpkModBuilder + [ModBuilder("P5D Mod Builder", Game = Game.Persona5Dancing)] + public class P5DModCpkBuilder : ModCpkModBuilder { - protected override Game Game => Game.Persona4Golden; + protected override Game Game => Game.Persona5Dancing; } [ModBuilder("Persona Q Mod Builder", Game = Game.PersonaQ)] diff --git a/Source/ModCompendiumLibrary/ModSystem/Builders/Persona34IsoModBuilder.cs b/Source/ModCompendiumLibrary/ModSystem/Builders/Persona34IsoModBuilder.cs index bc1d627..a2e4d8e 100644 --- a/Source/ModCompendiumLibrary/ModSystem/Builders/Persona34IsoModBuilder.cs +++ b/Source/ModCompendiumLibrary/ModSystem/Builders/Persona34IsoModBuilder.cs @@ -56,7 +56,7 @@ public class Persona3IsoModBuilder : Persona34IsoModBuilder { protected override Persona34FileModBuilder CreateFileModBuilder() => new Persona3FileModBuilder(); - protected override Persona34GameConfig GetConfig() => ConfigStore.Get(); + protected override Persona34GameConfig GetConfig() => ConfigStore.Get(); } //[ModBuilder( "Persona 4 ISO Mod Builder", Game = Game.Persona4 )] @@ -64,6 +64,6 @@ public class Persona4IsoModBuilder : Persona34IsoModBuilder { protected override Persona34FileModBuilder CreateFileModBuilder() => new Persona4FileModBuilder(); - protected override Persona34GameConfig GetConfig() => ConfigStore.Get(); + protected override Persona34GameConfig GetConfig() => ConfigStore.Get(); } } \ No newline at end of file diff --git a/Source/ModCompendiumLibrary/ModSystem/Builders/PersonaPortableModBuilder.cs b/Source/ModCompendiumLibrary/ModSystem/Builders/PersonaPortableModBuilder.cs index 3ac31cb..6e9580a 100644 --- a/Source/ModCompendiumLibrary/ModSystem/Builders/PersonaPortableModBuilder.cs +++ b/Source/ModCompendiumLibrary/ModSystem/Builders/PersonaPortableModBuilder.cs @@ -154,12 +154,6 @@ private void LogModFilesInDirectory(VirtualDirectory directory) } } - [ModBuilder("Persona 3 Portable Mod Builder", Game = Game.Persona3Portable)] - public class Persona3PortableModBuilder : PersonaPortableModBuilder - { - protected override Game Game => Game.Persona3Portable; - } - [ModBuilder("Persona 4 Dancing Mod Builder", Game = Game.Persona4Dancing)] public class Persona4DancingModBuilder : PersonaPortableModBuilder {