From 3b204b3a0707b6b0fa7b4d5522eaf59a13d300eb Mon Sep 17 00:00:00 2001 From: Terry Hearst Date: Sat, 26 Aug 2023 22:06:57 -0400 Subject: [PATCH] Refactor to make dependency management+installation easier --- Config.cs | 4 +- DiamondTimeViewer.csproj | 46 +++++++++++++++++++ ...ondTimeViewer.sln => DiamondTimeViewer.sln | 2 +- MiuuDiamondTimeViewer.csproj | 31 ------------- PatchEntryPoint.cs | 2 +- Patcher.cs | 2 +- Patches/GamePlayManagerPatches.cs | 2 +- Patches/MedalsDisplayPatches.cs | 2 +- UserProperties.xml | 10 ++++ 9 files changed, 63 insertions(+), 38 deletions(-) create mode 100644 DiamondTimeViewer.csproj rename MiuuDiamondTimeViewer.sln => DiamondTimeViewer.sln (86%) delete mode 100644 MiuuDiamondTimeViewer.csproj create mode 100644 UserProperties.xml diff --git a/Config.cs b/Config.cs index df1c54e..c7506b4 100644 --- a/Config.cs +++ b/Config.cs @@ -5,7 +5,7 @@ using System.Reflection; using System.Web; using UnityEngine; -namespace MiuuDiamondTimeViewer +namespace DiamondTimeViewer { public enum DisplayMode { @@ -48,7 +48,7 @@ namespace MiuuDiamondTimeViewer if (data["enabled"] != null) Enabled = data["enabled"].AsBool; - + if (data["mode"] != null) { string mode = data["mode"].Value.ToLower(); diff --git a/DiamondTimeViewer.csproj b/DiamondTimeViewer.csproj new file mode 100644 index 0000000..cc542da --- /dev/null +++ b/DiamondTimeViewer.csproj @@ -0,0 +1,46 @@ + + + + net48 + + + + + + + + + + + $(ProjectDir)out\ + $(ModOutputDir)\ + + + + + + + + $(GameDir)\Mods\ModLoader\0Harmony.dll + + + $(GameDir)\Marble It Up_Data\Managed\Assembly-CSharp.dll + + + $(GameDir)\Marble It Up_Data\Managed\Assembly-CSharp-firstpass.dll + + + $(GameDir)\Marble It Up_Data\Managed\Unity.TextMeshPro.dll + + + $(GameDir)\Marble It Up_Data\Managed\UnityEngine.dll + + + $(GameDir)\Marble It Up_Data\Managed\UnityEngine.CoreModule.dll + + + $(GameDir)\Marble It Up_Data\Managed\UnityEngine.UI.dll + + + + diff --git a/MiuuDiamondTimeViewer.sln b/DiamondTimeViewer.sln similarity index 86% rename from MiuuDiamondTimeViewer.sln rename to DiamondTimeViewer.sln index d4ab52f..b00618d 100644 --- a/MiuuDiamondTimeViewer.sln +++ b/DiamondTimeViewer.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.7.34009.444 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiuuDiamondTimeViewer", "MiuuDiamondTimeViewer.csproj", "{4669DE2C-8DB2-45B7-805D-BA40A9A61A1D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiamondTimeViewer", "DiamondTimeViewer.csproj", "{4669DE2C-8DB2-45B7-805D-BA40A9A61A1D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/MiuuDiamondTimeViewer.csproj b/MiuuDiamondTimeViewer.csproj deleted file mode 100644 index d527ee4..0000000 --- a/MiuuDiamondTimeViewer.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - net48 - - - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Mods\ModLoader\0Harmony.dll - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\Assembly-CSharp.dll - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\Assembly-CSharp-firstpass.dll - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\Unity.TextMeshPro.dll - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\UnityEngine.dll - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\UnityEngine.CoreModule.dll - - - D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\UnityEngine.UI.dll - - - - diff --git a/PatchEntryPoint.cs b/PatchEntryPoint.cs index a157386..f747828 100644 --- a/PatchEntryPoint.cs +++ b/PatchEntryPoint.cs @@ -1,6 +1,6 @@ using System; -namespace MiuuDiamondTimeViewer +namespace DiamondTimeViewer { public static class PatchEntryPoint { diff --git a/Patcher.cs b/Patcher.cs index 9e7d96a..f16255a 100644 --- a/Patcher.cs +++ b/Patcher.cs @@ -4,7 +4,7 @@ using System.Text; using HarmonyLib; using UnityEngine.SceneManagement; -namespace MiuuDiamondTimeViewer +namespace DiamondTimeViewer { public static class Patcher { diff --git a/Patches/GamePlayManagerPatches.cs b/Patches/GamePlayManagerPatches.cs index 4a90285..e020901 100644 --- a/Patches/GamePlayManagerPatches.cs +++ b/Patches/GamePlayManagerPatches.cs @@ -1,7 +1,7 @@ using HarmonyLib; using MIU; -namespace MiuuDiamondTimeViewer.Patches +namespace DiamondTimeViewer.Patches { [HarmonyPatch(typeof(GamePlayManager))] [HarmonyPatch("FinishPlay")] diff --git a/Patches/MedalsDisplayPatches.cs b/Patches/MedalsDisplayPatches.cs index febf341..183418f 100644 --- a/Patches/MedalsDisplayPatches.cs +++ b/Patches/MedalsDisplayPatches.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using UnityEngine; -namespace MiuuDiamondTimeViewer.Patches +namespace DiamondTimeViewer.Patches { [HarmonyPatch(typeof(MedalsDisplay))] [HarmonyPatch("Setup")] diff --git a/UserProperties.xml b/UserProperties.xml new file mode 100644 index 0000000..2f9dbf8 --- /dev/null +++ b/UserProperties.xml @@ -0,0 +1,10 @@ + + + + True + + + + $(GameDir)\Mods\DiamondTimeViewer + +