diff --git a/README.md b/README.md
index fcd9b09..ae8fcce 100644
--- a/README.md
+++ b/README.md
@@ -7,8 +7,6 @@ A BepInEx-Partiality Mod Wrapper for Unity Games. This allows Partiality
This version is essentially Partiality packaged as a BepInEx mod. It serves as a dummy reference to Partliality.dll for Partiality Mods, but otherwise behaves as a BepInEx mod.
-The HOOKS file included with the release is the current latest one for Outward. If you're using this for a different game you will need to delete that and run the mod once to generate the hooks for your game.
-
## Install
Installation instructions and the download link can be found here:
diff --git a/references/BepInEx.dll b/lib/BepInEx.dll
similarity index 100%
rename from references/BepInEx.dll
rename to lib/BepInEx.dll
diff --git a/references/UnityEngine.dll b/lib/UnityEngine.dll
similarity index 100%
rename from references/UnityEngine.dll
rename to lib/UnityEngine.dll
diff --git a/source/BepInEx-Partiality-Wrapper.csproj b/src/BepInEx-Partiality-Wrapper.csproj
similarity index 95%
rename from source/BepInEx-Partiality-Wrapper.csproj
rename to src/BepInEx-Partiality-Wrapper.csproj
index 35472ab..cec03fe 100644
--- a/source/BepInEx-Partiality-Wrapper.csproj
+++ b/src/BepInEx-Partiality-Wrapper.csproj
@@ -26,7 +26,7 @@
true
- ..\package\BepInEx\plugins\PartialityWrapper\
+ ..\Release\BepInEx\plugins\PartialityWrapper\
TRACE
prompt
4
@@ -34,7 +34,7 @@
- ..\references\BepInEx.dll
+ ..\lib\BepInEx.dll
False
@@ -71,13 +71,13 @@
- ..\references\UnityEngine.dll
+ ..\lib\UnityEngine.dll
False
-
+
diff --git a/source/BepInEx-Partiality-Wrapper.sln b/src/BepInEx-Partiality-Wrapper.sln
similarity index 100%
rename from source/BepInEx-Partiality-Wrapper.sln
rename to src/BepInEx-Partiality-Wrapper.sln
diff --git a/source/PartialityMod.cs b/src/PartialityMod.cs
similarity index 100%
rename from source/PartialityMod.cs
rename to src/PartialityMod.cs
diff --git a/source/Wrapper.cs b/src/PartialityWrapper.cs
similarity index 81%
rename from source/Wrapper.cs
rename to src/PartialityWrapper.cs
index 2c52cf7..509e787 100644
--- a/source/Wrapper.cs
+++ b/src/PartialityWrapper.cs
@@ -14,11 +14,11 @@
namespace Partiality
{
[BepInPlugin(ID, NAME, VERSION)]
- public class Wrapper : BaseUnityPlugin
+ public class PartialityWrapper : BaseUnityPlugin
{
private const string ID = "com.sinai.PartialityWrapper";
private const string NAME = "Partiality Wrapper";
- private const string VERSION = "2.1";
+ private const string VERSION = "2.2";
public string PluginFolder => Path.GetDirectoryName(Info.Location);
public string ModsFolder => Path.Combine(Paths.GameRootPath, "Mods");
@@ -37,7 +37,7 @@ internal void Awake()
private void LoadDependencies()
{
- IEnumerable dependencies = (
+ var dependencies = (
from filepath in Directory.GetFiles(PluginFolder)
where (filepath.EndsWith(".dll") || filepath.EndsWith(".exe")) && !filepath.Contains("Partiality.dll")
select filepath
@@ -45,11 +45,11 @@ select filepath
foreach (string filepath in dependencies)
{
- Logger.Log(LogLevel.Message, "Loading dependency " + Path.GetFileName(filepath));
+ //Logger.Log(LogLevel.Message, "Loading dependency " + Path.GetFileName(filepath));
Assembly.Load(File.ReadAllBytes(filepath));
}
- Logger.Log(LogLevel.Message, "Done loading dependencies");
+ //Logger.Log(LogLevel.Message, "Done loading dependencies");
}
private void CheckHooks()
@@ -120,7 +120,7 @@ private void LoadMods()
catch (ReflectionTypeLoadException ex)
{
Logger.Log(LogLevel.Error, $"Could not load \"{Path.GetFileName(filepath)}\" as a plugin!");
- Logger.Log(LogLevel.Debug, TypeLoadExceptionToString(ex));
+ Logger.Log(LogLevel.Debug, ex);
}
catch (BadImageFormatException) { } // unmanaged DLL
catch (Exception ex)
@@ -178,32 +178,5 @@ public static IEnumerable GetTypesSafe(Assembly asm)
catch (ReflectionTypeLoadException e) { return e.Types.Where(x => x != null); }
catch { return Enumerable.Empty(); }
}
-
- private static string TypeLoadExceptionToString(ReflectionTypeLoadException ex)
- {
- StringBuilder sb = new StringBuilder();
- foreach (Exception exSub in ex.LoaderExceptions)
- {
- sb.AppendLine(exSub.Message);
- if (exSub is FileNotFoundException exFileNotFound)
- {
- if (!string.IsNullOrEmpty(exFileNotFound.FusionLog))
- {
- sb.AppendLine("Fusion Log:");
- sb.AppendLine(exFileNotFound.FusionLog);
- }
- }
- else if (exSub is FileLoadException exLoad)
- {
- if (!string.IsNullOrEmpty(exLoad.FusionLog))
- {
- sb.AppendLine("Fusion Log:");
- sb.AppendLine(exLoad.FusionLog);
- }
- }
- sb.AppendLine();
- }
- return sb.ToString();
- }
}
}
\ No newline at end of file
diff --git a/source/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs
similarity index 100%
rename from source/Properties/AssemblyInfo.cs
rename to src/Properties/AssemblyInfo.cs
diff --git a/source/packages.config b/src/packages.config
similarity index 98%
rename from source/packages.config
rename to src/packages.config
index d477d71..79a7d6c 100644
--- a/source/packages.config
+++ b/src/packages.config
@@ -1,8 +1,8 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file