summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/technical/mod-package.md20
-rw-r--r--src/SMAPI.ModBuildConfig/build/smapi.targets3
-rw-r--r--src/SMAPI/Constants.cs3
-rw-r--r--src/SMAPI/Framework/ModLoading/AssemblyLoader.cs5
-rw-r--r--src/SMAPI/Framework/SCore.cs2
5 files changed, 11 insertions, 22 deletions
diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md
index 5eff3d2e..2e26275b 100644
--- a/docs/technical/mod-package.md
+++ b/docs/technical/mod-package.md
@@ -32,10 +32,10 @@ change how these work):
`$(GamePath)` and `$(GameModsPath)`.
* **Add assembly references:**
- The package adds assembly references to SMAPI, Stardew Valley, xTile, and the game framework
- (MonoGame on Linux/macOS, XNA Framework on Windows). It automatically adjusts depending on which OS
- you're compiling it on. If you use [Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony),
- it can optionally add a reference to that too.
+ The package adds assembly references to MonoGame, SMAPI, Stardew Valley, and xTile. It
+ automatically adjusts depending on which OS you're compiling it on. If you use
+ [Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony), it can optionally add
+ a reference to that too.
* **Copy files into the `Mods` folder:**
The package automatically copies your mod's DLL and PDB files, `manifest.json`, [`i18n`
@@ -129,14 +129,6 @@ The absolute path to the folder containing the game's installed mods (defaults t
</td>
</tr>
<tr>
-<td><code>GameFramework</code></td>
-<td>
-
-The game framework for which the mod is being compiled (one of `Xna` or `MonoGame`). This is
-auto-detected based on the platform, and you should almost never change this.
-
-</td>
-</tr>
</table>
</li>
@@ -373,7 +365,8 @@ when you compile it.
## Upcoming release
* Updated for Stardew Valley 1.5.5 and SMAPI 3.13.0. **Older versions are no longer supported.**
* Added `IgnoreModFilePaths` option to ignore literal paths.
-* Removed the `GameExecutableName` build property (since it now has the same value on all platforms).
+* Removed the `GameExecutableName` and `GameFramework` build properties (since they now have the
+ same value on all platforms).
* Improved analyzer performance by enabling parallel execution.
**Migration guide for mod authors:**
@@ -381,6 +374,7 @@ when you compile it.
[_migrate to Stardew Valley 1.5.5_](https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.5.5).
2. Possible changes in your `.csproj` or `.targets` files:
* If you use `$(GameExecutableName)`, replace it with `Stardew Valley`.
+ * If you use `$(GameFramework)`, replace it with `MonoGame` and remove any XNA-specific logic.
## 3.3.0
Released 30 March 2021.
diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets
index 6fc62046..8ad298d0 100644
--- a/src/SMAPI.ModBuildConfig/build/smapi.targets
+++ b/src/SMAPI.ModBuildConfig/build/smapi.targets
@@ -30,9 +30,6 @@
<EnableHarmony Condition="'$(EnableHarmony)' == ''">false</EnableHarmony>
<EnableGameDebugging Condition="'$(EnableGameDebugging)' == ''">true</EnableGameDebugging>
<CopyModReferencesToBuildOutput Condition="'$(CopyModReferencesToBuildOutput)' == '' OR ('$(CopyModReferencesToBuildOutput)' != 'true' AND '$(CopyModReferencesToBuildOutput)' != 'false')">false</CopyModReferencesToBuildOutput>
-
- <GameFramework Condition="'$(GameFramework)' == '' AND '$(OS)' == 'Windows_NT'">Xna</GameFramework>
- <GameFramework Condition="'$(GameFramework)' == ''">MonoGame</GameFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' AND '$(EnableGameDebugging)' == 'true'">
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index 2c16052b..3ae8661a 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -241,8 +241,7 @@ namespace StardewModdingAPI
/// <summary>Get metadata for mapping assemblies to the current platform.</summary>
/// <param name="targetPlatform">The target game platform.</param>
- /// <param name="framework">The game framework running the game.</param>
- internal static PlatformAssemblyMap GetAssemblyMap(Platform targetPlatform, GameFramework framework)
+ internal static PlatformAssemblyMap GetAssemblyMap(Platform targetPlatform)
{
var removeAssemblyReferences = new List<string>();
var targetAssemblies = new List<Assembly>();
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
index 57a76a35..cb5fa2ae 100644
--- a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
+++ b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
@@ -53,16 +53,15 @@ namespace StardewModdingAPI.Framework.ModLoading
*********/
/// <summary>Construct an instance.</summary>
/// <param name="targetPlatform">The current game platform.</param>
- /// <param name="framework">The game framework running the game.</param>
/// <param name="monitor">Encapsulates monitoring and logging.</param>
/// <param name="paranoidMode">Whether to detect paranoid mode issues.</param>
/// <param name="rewriteMods">Whether to rewrite mods for compatibility.</param>
- public AssemblyLoader(Platform targetPlatform, GameFramework framework, IMonitor monitor, bool paranoidMode, bool rewriteMods)
+ public AssemblyLoader(Platform targetPlatform, IMonitor monitor, bool paranoidMode, bool rewriteMods)
{
this.Monitor = monitor;
this.ParanoidMode = paranoidMode;
this.RewriteMods = rewriteMods;
- this.AssemblyMap = this.TrackForDisposal(Constants.GetAssemblyMap(targetPlatform, framework));
+ this.AssemblyMap = this.TrackForDisposal(Constants.GetAssemblyMap(targetPlatform));
// init resolver
this.AssemblyDefinitionResolver = this.TrackForDisposal(new AssemblyDefinitionResolver());
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index a0467daa..55a7f083 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -1473,7 +1473,7 @@ namespace StardewModdingAPI.Framework
// load mods
IList<IModMetadata> skippedMods = new List<IModMetadata>();
- using (AssemblyLoader modAssemblyLoader = new AssemblyLoader(Constants.Platform, Constants.GameFramework, this.Monitor, this.Settings.ParanoidWarnings, this.Settings.RewriteMods))
+ using (AssemblyLoader modAssemblyLoader = new AssemblyLoader(Constants.Platform, this.Monitor, this.Settings.ParanoidWarnings, this.Settings.RewriteMods))
{
// init
HashSet<string> suppressUpdateChecks = new HashSet<string>(this.Settings.SuppressUpdateChecks, StringComparer.OrdinalIgnoreCase);