summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r--src/StardewModdingAPI/Framework/AssemblyRewriting/AssemblyTypeRewriter.cs1
-rw-r--r--src/StardewModdingAPI/Framework/AssemblyRewriting/PlatformAssemblyMap.cs35
-rw-r--r--src/StardewModdingAPI/Framework/ModAssemblyLoader.cs1
-rw-r--r--src/StardewModdingAPI/Framework/Platform.cs12
4 files changed, 2 insertions, 47 deletions
diff --git a/src/StardewModdingAPI/Framework/AssemblyRewriting/AssemblyTypeRewriter.cs b/src/StardewModdingAPI/Framework/AssemblyRewriting/AssemblyTypeRewriter.cs
index 66c36c03..43f6aa11 100644
--- a/src/StardewModdingAPI/Framework/AssemblyRewriting/AssemblyTypeRewriter.cs
+++ b/src/StardewModdingAPI/Framework/AssemblyRewriting/AssemblyTypeRewriter.cs
@@ -2,6 +2,7 @@
using System.Linq;
using System.Reflection;
using Mono.Cecil;
+using StardewModdingAPI.AssemblyRewriters;
namespace StardewModdingAPI.Framework.AssemblyRewriting
{
diff --git a/src/StardewModdingAPI/Framework/AssemblyRewriting/PlatformAssemblyMap.cs b/src/StardewModdingAPI/Framework/AssemblyRewriting/PlatformAssemblyMap.cs
deleted file mode 100644
index 3e6cec8a..00000000
--- a/src/StardewModdingAPI/Framework/AssemblyRewriting/PlatformAssemblyMap.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-
-namespace StardewModdingAPI.Framework.AssemblyRewriting
-{
- /// <summary>Metadata for mapping assemblies to the current <see cref="Platform"/>.</summary>
- internal class PlatformAssemblyMap
- {
- /*********
- ** Accessors
- *********/
- /// <summary>The target game platform.</summary>
- public readonly Platform TargetPlatform;
-
- /// <summary>The short assembly names to remove as assembly reference, and replace with the <see cref="Targets"/>. These should be short names (like "Stardew Valley").</summary>
- public readonly string[] RemoveNames;
-
- /// <summary>The assembly filenames to target. Equivalent types should be rewritten to use these assemblies.</summary>
- public readonly Assembly[] Targets;
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Construct an instance.</summary>
- /// <param name="targetPlatform">The target game platform.</param>
- /// <param name="removeAssemblyNames">The assembly short names to remove (like <c>Stardew Valley</c>).</param>
- /// <param name="targetAssemblies">The assemblies to target.</param>
- public PlatformAssemblyMap(Platform targetPlatform, string[] removeAssemblyNames, Assembly[] targetAssemblies)
- {
- this.TargetPlatform = targetPlatform;
- this.RemoveNames = removeAssemblyNames;
- this.Targets = targetAssemblies;
- }
- }
-} \ No newline at end of file
diff --git a/src/StardewModdingAPI/Framework/ModAssemblyLoader.cs b/src/StardewModdingAPI/Framework/ModAssemblyLoader.cs
index b6d98bde..e095cde8 100644
--- a/src/StardewModdingAPI/Framework/ModAssemblyLoader.cs
+++ b/src/StardewModdingAPI/Framework/ModAssemblyLoader.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using Mono.Cecil;
+using StardewModdingAPI.AssemblyRewriters;
using StardewModdingAPI.Framework.AssemblyRewriting;
namespace StardewModdingAPI.Framework
diff --git a/src/StardewModdingAPI/Framework/Platform.cs b/src/StardewModdingAPI/Framework/Platform.cs
deleted file mode 100644
index cab81e06..00000000
--- a/src/StardewModdingAPI/Framework/Platform.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace StardewModdingAPI.Framework
-{
- /// <summary>The game's platform version.</summary>
- internal enum Platform
- {
- /// <summary>The Linux/Mac version of the game.</summary>
- Mono,
-
- /// <summary>The Windows version of the game.</summary>
- Windows
- }
-} \ No newline at end of file