Refactor to make dependency management+installation easier
This commit is contained in:
parent
15f1d23c34
commit
3b204b3a07
9 changed files with 63 additions and 38 deletions
|
@ -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();
|
||||
|
|
46
DiamondTimeViewer.csproj
Normal file
46
DiamondTimeViewer.csproj
Normal file
|
@ -0,0 +1,46 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(ProjectDir)UserProperties.xml" />
|
||||
|
||||
<Target Name="VerifyModReferences" BeforeTargets="Build">
|
||||
<Error Text="You forgot to edit UserProperties.xml." Condition="$(UserPropertiesNotSetUp) == True" />
|
||||
</Target>
|
||||
|
||||
<Target Name="InstallMod" AfterTargets="Build">
|
||||
<PropertyGroup>
|
||||
<ModCompileOutputDir Condition="'$(ModOutputDir)' == ''">$(ProjectDir)out\</ModCompileOutputDir>
|
||||
<ModCompileOutputDir Condition="'$(ModOutputDir)' != ''">$(ModOutputDir)\</ModCompileOutputDir>
|
||||
</PropertyGroup>
|
||||
<MakeDir Directories="$(ModCompileOutputDir)" />
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="$(ModCompileOutputDir)\" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>$(GameDir)\Mods\ModLoader\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>$(GameDir)\Marble It Up_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>$(GameDir)\Marble It Up_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>$(GameDir)\Marble It Up_Data\Managed\Unity.TextMeshPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>$(GameDir)\Marble It Up_Data\Managed\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>$(GameDir)\Marble It Up_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>$(GameDir)\Marble It Up_Data\Managed\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -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
|
|
@ -1,31 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Mods\ModLoader\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\Unity.TextMeshPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Marble It Up!\Marble It Up_Data\Managed\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
|
||||
namespace MiuuDiamondTimeViewer
|
||||
namespace DiamondTimeViewer
|
||||
{
|
||||
public static class PatchEntryPoint
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Text;
|
|||
using HarmonyLib;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace MiuuDiamondTimeViewer
|
||||
namespace DiamondTimeViewer
|
||||
{
|
||||
public static class Patcher
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using HarmonyLib;
|
||||
using MIU;
|
||||
|
||||
namespace MiuuDiamondTimeViewer.Patches
|
||||
namespace DiamondTimeViewer.Patches
|
||||
{
|
||||
[HarmonyPatch(typeof(GamePlayManager))]
|
||||
[HarmonyPatch("FinishPlay")]
|
||||
|
|
|
@ -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")]
|
||||
|
|
10
UserProperties.xml
Normal file
10
UserProperties.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<!-- Remove this property -->
|
||||
<UserPropertiesNotSetUp>True</UserPropertiesNotSetUp>
|
||||
<!-- Insert path to MIUU game directory here -->
|
||||
<GameDir></GameDir>
|
||||
<!-- Insert path to where your mod should build to -->
|
||||
<ModOutputDir>$(GameDir)\Mods\DiamondTimeViewer</ModOutputDir>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Add table
Reference in a new issue