summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-12-05 19:10:39 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-12-05 19:10:39 -0500
commit8a2618d812e4e2f36161907af5af5c484eb37abf (patch)
treec164325cf57fb43e4375e94dc584fbc3ab3ceeb5 /src/SMAPI
parent42e878e77d58569be81e34ca206a78e0ebe0604d (diff)
parent5b5dd47c22a1332a4c432d6a1cd414b5c83388d7 (diff)
downloadSMAPI-8a2618d812e4e2f36161907af5af5c484eb37abf.tar.gz
SMAPI-8a2618d812e4e2f36161907af5af5c484eb37abf.tar.bz2
SMAPI-8a2618d812e4e2f36161907af5af5c484eb37abf.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Constants.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/RewriteFacades/AccessToolsFacade.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyInstanceFacade.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyMethodFacade.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs3
-rw-r--r--src/SMAPI/Framework/SGame.cs8
-rw-r--r--src/SMAPI/SButton.cs2
-rw-r--r--src/SMAPI/SMAPI.csproj3
-rw-r--r--src/SMAPI/Utilities/Keybind.cs2
-rw-r--r--src/SMAPI/i18n/pl.json12
10 files changed, 26 insertions, 12 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index c5ad215c..5de28f84 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -49,7 +49,7 @@ namespace StardewModdingAPI
internal static int? LogScreenId { get; set; }
/// <summary>SMAPI's current raw semantic version.</summary>
- internal static string RawApiVersion = "3.13.1";
+ internal static string RawApiVersion = "3.13.2";
}
/// <summary>Contains SMAPI's constants and assumptions.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/RewriteFacades/AccessToolsFacade.cs b/src/SMAPI/Framework/ModLoading/RewriteFacades/AccessToolsFacade.cs
index 8e4320b3..be2a1c58 100644
--- a/src/SMAPI/Framework/ModLoading/RewriteFacades/AccessToolsFacade.cs
+++ b/src/SMAPI/Framework/ModLoading/RewriteFacades/AccessToolsFacade.cs
@@ -4,6 +4,8 @@ using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using HarmonyLib;
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member: This is internal code to support rewriters that shouldn't be called directly.
+
namespace StardewModdingAPI.Framework.ModLoading.RewriteFacades
{
/// <summary>Maps Harmony 1.x <see cref="AccessTools"/> methods to Harmony 2.x to avoid breaking older mods.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyInstanceFacade.cs b/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyInstanceFacade.cs
index 54b91679..135bd218 100644
--- a/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyInstanceFacade.cs
+++ b/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyInstanceFacade.cs
@@ -5,6 +5,8 @@ using System.Reflection;
using System.Reflection.Emit;
using HarmonyLib;
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member: This is internal code to support rewriters that shouldn't be called directly.
+
namespace StardewModdingAPI.Framework.ModLoading.RewriteFacades
{
/// <summary>Maps Harmony 1.x <code>HarmonyInstance</code> methods to Harmony 2.x's <see cref="Harmony"/> to avoid breaking older mods.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyMethodFacade.cs b/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyMethodFacade.cs
index 44c97401..5162dda4 100644
--- a/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyMethodFacade.cs
+++ b/src/SMAPI/Framework/ModLoading/RewriteFacades/HarmonyMethodFacade.cs
@@ -3,6 +3,8 @@ using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using HarmonyLib;
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member: This is internal code to support rewriters that shouldn't be called directly.
+
namespace StardewModdingAPI.Framework.ModLoading.RewriteFacades
{
/// <summary>Maps Harmony 1.x <see cref="HarmonyMethod"/> methods to Harmony 2.x to avoid breaking older mods.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs b/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs
index a064f503..5f68f8d9 100644
--- a/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs
+++ b/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs
@@ -2,6 +2,9 @@ using System.Diagnostics.CodeAnalysis;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+#pragma warning disable CS0109 // Member does not hide an inherited member, new keyword is not required: This is deliberate to support legacy XNA Framework platforms.
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member: This is internal code to support rewriters that shouldn't be called directly.
+
namespace StardewModdingAPI.Framework.ModLoading.RewriteFacades
{
/// <summary>Provides <see cref="SpriteBatch"/> method signatures that can be injected into mod code for compatibility with mods written for XNA Framework before Stardew Valley 1.5.5.</summary>
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index 898ed1f5..104cf330 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -776,10 +776,10 @@ namespace StardewModdingAPI.Framework
}
if (!Game1.eventUp && Game1.farmEvent == null && Game1.currentBillboard == 0 && Game1.gameMode == 3 && !this.takingMapScreenshot && Game1.isOutdoorMapSmallerThanViewport())
{
- Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, 0, -Math.Min(Game1.viewport.X, GameRunner.MaxTextureSize), Game1.graphics.GraphicsDevice.Viewport.Height), Color.Black);
- Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(-Game1.viewport.X + Game1.currentLocation.map.Layers[0].LayerWidth * 64, 0, Math.Min(GameRunner.MaxTextureSize, Game1.graphics.GraphicsDevice.Viewport.Width - (-Game1.viewport.X + Game1.currentLocation.map.Layers[0].LayerWidth * 64)), Game1.graphics.GraphicsDevice.Viewport.Height), Color.Black);
- Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, 0, Game1.graphics.GraphicsDevice.Viewport.Width, -Math.Min(Game1.viewport.Y, GameRunner.MaxTextureSize)), Color.Black);
- Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, -Game1.viewport.Y + Game1.currentLocation.map.Layers[0].LayerHeight * 64, Game1.graphics.GraphicsDevice.Viewport.Width, Math.Min(GameRunner.MaxTextureSize, Game1.graphics.GraphicsDevice.Viewport.Height - (-Game1.viewport.Y + Game1.currentLocation.map.Layers[0].LayerHeight * 64))), Color.Black);
+ Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, 0, -Game1.viewport.X, Game1.graphics.GraphicsDevice.Viewport.Height), Color.Black);
+ Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(-Game1.viewport.X + Game1.currentLocation.map.Layers[0].LayerWidth * 64, 0, Game1.graphics.GraphicsDevice.Viewport.Width - (-Game1.viewport.X + Game1.currentLocation.map.Layers[0].LayerWidth * 64), Game1.graphics.GraphicsDevice.Viewport.Height), Color.Black);
+ Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, 0, Game1.graphics.GraphicsDevice.Viewport.Width, -Game1.viewport.Y), Color.Black);
+ Game1.spriteBatch.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, -Game1.viewport.Y + Game1.currentLocation.map.Layers[0].LayerHeight * 64, Game1.graphics.GraphicsDevice.Viewport.Width, Game1.graphics.GraphicsDevice.Viewport.Height - (-Game1.viewport.Y + Game1.currentLocation.map.Layers[0].LayerHeight * 64)), Color.Black);
}
Game1.spriteBatch.End();
Game1.PushUIMode();
diff --git a/src/SMAPI/SButton.cs b/src/SMAPI/SButton.cs
index cc412946..ae825696 100644
--- a/src/SMAPI/SButton.cs
+++ b/src/SMAPI/SButton.cs
@@ -6,7 +6,7 @@ using StardewValley;
namespace StardewModdingAPI
{
/// <summary>A unified button constant which includes all controller, keyboard, and mouse buttons.</summary>
- /// <remarks>Derived from <see cref="Keys"/>, <see cref="Buttons"/>, and <see cref="System.Windows.Forms.MouseButtons"/>.</remarks>
+ /// <remarks>Derived from <see cref="Keys"/>, <see cref="Buttons"/>, and <c>System.Windows.Forms.MouseButtons</c>.</remarks>
public enum SButton
{
/// <summary>No valid key.</summary>
diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj
index b99028da..f07ede87 100644
--- a/src/SMAPI/SMAPI.csproj
+++ b/src/SMAPI/SMAPI.csproj
@@ -13,6 +13,9 @@
<!--copy dependency DLLs to bin folder so we can include them in installer bundle -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
+
+ <!-- tiered compilation breaks Harmony -->
+ <TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<Import Project="..\..\build\common.targets" />
diff --git a/src/SMAPI/Utilities/Keybind.cs b/src/SMAPI/Utilities/Keybind.cs
index dd8d2861..87b867a9 100644
--- a/src/SMAPI/Utilities/Keybind.cs
+++ b/src/SMAPI/Utilities/Keybind.cs
@@ -105,7 +105,9 @@ namespace StardewModdingAPI.Utilities
/// <summary>Get the keybind state relative to the previous tick.</summary>
public SButtonState GetState()
{
+#pragma warning disable CS0618 // Type or member is obsolete: deliberate call to GetButtonState() for unit tests
SButtonState[] states = this.Buttons.Select(this.GetButtonState).Distinct().ToArray();
+#pragma warning restore CS0618
// single state
if (states.Length == 1)
diff --git a/src/SMAPI/i18n/pl.json b/src/SMAPI/i18n/pl.json
index b9c788fc..fa4650a2 100644
--- a/src/SMAPI/i18n/pl.json
+++ b/src/SMAPI/i18n/pl.json
@@ -1,6 +1,6 @@
-{
- // short date format for SDate
- // tokens: {{day}} (like 15), {{season}} (like Spring), {{seasonLowercase}} (like spring), {{year}} (like 2)
- "generic.date": "{{day}} {{seasonLowercase}}",
- "generic.date-with-year": "{{day}} {{seasonLowercase}} w roku {{year}}"
-}
+{
+ // short date format for SDate
+ // tokens: {{day}} (like 15), {{season}} (like Spring), {{seasonLowercase}} (like spring), {{year}} (like 2)
+ "generic.date": "{{day}} {{seasonLowercase}}",
+ "generic.date-with-year": "{{day}} {{seasonLowercase}} w roku {{year}}"
+}