Skip to content

Commit

Permalink
Library version updates: COM3D2 2.15.1 / BepInEx 5.4.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Vin-meido committed Apr 27, 2022
1 parent 6a692d8 commit c6dedcf
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 26 deletions.
31 changes: 31 additions & 0 deletions Hooks/FreeModeDressKeeperHooks.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -27,6 +28,36 @@ public static void Init()
}
}


static Assembly AssemblyByName(string name)
{
return AccessTools.AllAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == name);
}

static Type TypeFromAssembly(string assemblyName, string typeName)
{
var assembly = AssemblyByName(assemblyName);
if (assembly is null)
{
Log.LogVerbose("Assembly [{0}] not found.", assemblyName);
return null;
}
Type type;
type = AccessTools.GetTypesFromAssembly(assembly).FirstOrDefault(t => t.FullName == typeName);

if(type is null)
{
Log.LogVerbose("Type [{0}] not found in assembly [{1}]", typeName, assemblyName);
}

return type;
}

static Type GetUnityInjectorLoaderType()
{
return TypeFromAssembly("BepInEx.UnityInjectorLoader", "BepInEx.UnityInjectorLoader.UnityInjectorLoader");
}

public static void HookUnityInjectorLoader()
{
var type = AccessTools.TypeByName("BepInEx.UnityInjectorLoader.UnityInjectorLoader");
Expand Down
27 changes: 9 additions & 18 deletions UndressUtil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,24 @@
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.5.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\HarmonyX.2.5.5\lib\net35\0Harmony.dll</HintPath>
<Private>False</Private>
<Reference Include="0Harmony, Version=2.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\HarmonyX.2.7.0\lib\net35\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\COM3D2.GameLibs.2.13.0-r.0\lib\net35\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
<HintPath>packages\COM3D2.GameLibs.2.15.1-r.0\lib\net35\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\COM3D2.GameLibs.2.13.0-r.0\lib\net35\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
<HintPath>packages\COM3D2.GameLibs.2.15.1-r.0\lib\net35\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="BepInEx, Version=5.4.15.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\BepInEx.BaseLib.5.4.16\lib\net35\BepInEx.dll</HintPath>
<Private>False</Private>
<Reference Include="BepInEx, Version=5.4.19.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\BepInEx.BaseLib.5.4.19\lib\net35\BepInEx.dll</HintPath>
</Reference>
<Reference Include="COM3D2.API">
<HintPath>libs\COM3D2.API.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\UnityEngine.5.6.1\lib\net35\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\COM3D2.GameLibs.2.13.0-r.0\lib\net35\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
<HintPath>packages\UnityEngine.Modules.5.6.4\lib\net35\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -128,11 +119,11 @@ tar -cvaf $(TargetName).zip BepinEx
copy $(TargetPath) F:\COM-3d2\BepinEx\plugins
copy $(TargetPath) F:\COM3D2JP\COM3D2_5\BepinEx\plugins</PostBuildEvent>
</PropertyGroup>
<Import Project="packages\BepInEx.Core.5.4.16\build\BepInEx.Core.targets" Condition="Exists('packages\BepInEx.Core.5.4.16\build\BepInEx.Core.targets')" />
<Import Project="packages\BepInEx.Core.5.4.19\build\BepInEx.Core.targets" Condition="Exists('packages\BepInEx.Core.5.4.19\build\BepInEx.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\BepInEx.Core.5.4.16\build\BepInEx.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\BepInEx.Core.5.4.16\build\BepInEx.Core.targets'))" />
<Error Condition="!Exists('packages\BepInEx.Core.5.4.19\build\BepInEx.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\BepInEx.Core.5.4.19\build\BepInEx.Core.targets'))" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion UndressUtilPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace COM3D2.UndressUtil.Plugin
{
public static class Version
{
public const string NUMBER = "1.3.0.1";
public const string NUMBER = "1.3.0.2";

#if DEBUG
public const string RELEASE_TYPE = "debug";
Expand Down
14 changes: 7 additions & 7 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BepInEx.BaseLib" version="5.4.16" targetFramework="net35" />
<package id="BepInEx.Core" version="5.4.16" targetFramework="net35" />
<package id="COM3D2.GameLibs" version="2.13.0-r.0" targetFramework="net35" />
<package id="HarmonyX" version="2.5.5" targetFramework="net35" />
<package id="BepInEx.BaseLib" version="5.4.19" targetFramework="net35" />
<package id="BepInEx.Core" version="5.4.19" targetFramework="net35" />
<package id="COM3D2.GameLibs" version="2.15.1-r.0" targetFramework="net35" />
<package id="HarmonyX" version="2.7.0" targetFramework="net35" />
<package id="Mono.Cecil" version="0.10.4" targetFramework="net35" />
<package id="MonoMod.RuntimeDetour" version="21.8.19.1" targetFramework="net35" />
<package id="MonoMod.Utils" version="21.8.19.1" targetFramework="net35" />
<package id="UnityEngine" version="5.6.1" targetFramework="net35" />
<package id="MonoMod.RuntimeDetour" version="21.12.13.1" targetFramework="net35" />
<package id="MonoMod.Utils" version="21.12.13.1" targetFramework="net35" />
<package id="UnityEngine.Modules" version="5.6.4" targetFramework="net35" developmentDependency="true" />
</packages>

0 comments on commit c6dedcf

Please sign in to comment.