summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-03 02:39:20 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-04 23:49:06 -0500
commit3744e2f1e5505c9d15fb3bc985ad147a33621048 (patch)
treecf6c6accf9024b553a1772658720f909c6c6b25f /src/SMAPI
parenta2a0469cd024e2fd4b35503db152ba1a6df712ec (diff)
downloadSMAPI-3744e2f1e5505c9d15fb3bc985ad147a33621048.tar.gz
SMAPI-3744e2f1e5505c9d15fb3bc985ad147a33621048.tar.bz2
SMAPI-3744e2f1e5505c9d15fb3bc985ad147a33621048.zip
add SMAPI 3.0 compatibility strict mode (#606)
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Context.cs2
-rw-r--r--src/SMAPI/Events/ContentEvents.cs2
-rw-r--r--src/SMAPI/Events/ControlEvents.cs2
-rw-r--r--src/SMAPI/Events/EventArgsClickableMenuChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsClickableMenuClosed.cs2
-rw-r--r--src/SMAPI/Events/EventArgsControllerButtonPressed.cs2
-rw-r--r--src/SMAPI/Events/EventArgsControllerButtonReleased.cs4
-rw-r--r--src/SMAPI/Events/EventArgsControllerTriggerPressed.cs2
-rw-r--r--src/SMAPI/Events/EventArgsControllerTriggerReleased.cs4
-rw-r--r--src/SMAPI/Events/EventArgsInput.cs2
-rw-r--r--src/SMAPI/Events/EventArgsIntChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsInventoryChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsKeyPressed.cs2
-rw-r--r--src/SMAPI/Events/EventArgsKeyboardStateChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsLevelUp.cs2
-rw-r--r--src/SMAPI/Events/EventArgsLocationBuildingsChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsLocationObjectsChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsLocationsChanged.cs2
-rw-r--r--src/SMAPI/Events/EventArgsMineLevelChanged.cs4
-rw-r--r--src/SMAPI/Events/EventArgsMouseStateChanged.cs4
-rw-r--r--src/SMAPI/Events/EventArgsPlayerWarped.cs2
-rw-r--r--src/SMAPI/Events/EventArgsValueChanged.cs6
-rw-r--r--src/SMAPI/Events/GameEvents.cs2
-rw-r--r--src/SMAPI/Events/GraphicsEvents.cs2
-rw-r--r--src/SMAPI/Events/InputEvents.cs2
-rw-r--r--src/SMAPI/Events/LocationEvents.cs2
-rw-r--r--src/SMAPI/Events/MenuEvents.cs2
-rw-r--r--src/SMAPI/Events/MineEvents.cs2
-rw-r--r--src/SMAPI/Events/MultiplayerEvents.cs2
-rw-r--r--src/SMAPI/Events/PlayerEvents.cs2
-rw-r--r--src/SMAPI/Events/SaveEvents.cs2
-rw-r--r--src/SMAPI/Events/SpecialisedEvents.cs2
-rw-r--r--src/SMAPI/Events/TimeEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/EventManager.cs8
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/ModWarning.cs2
-rw-r--r--src/SMAPI/Framework/SCore.cs21
-rw-r--r--src/SMAPI/Framework/SGame.cs102
-rw-r--r--src/SMAPI/Framework/SMultiplayer.cs2
-rw-r--r--src/SMAPI/IModHelper.cs2
-rw-r--r--src/SMAPI/Metadata/InstructionMetadata.cs3
-rw-r--r--src/SMAPI/SemanticVersion.cs2
-rw-r--r--src/SMAPI/StardewModdingAPI.csproj2
44 files changed, 203 insertions, 23 deletions
diff --git a/src/SMAPI/Context.cs b/src/SMAPI/Context.cs
index c7aed81d..cd1cf1c2 100644
--- a/src/SMAPI/Context.cs
+++ b/src/SMAPI/Context.cs
@@ -22,7 +22,7 @@ namespace StardewModdingAPI
/// <summary>Whether <see cref="IsPlayerFree"/> is true and the player is free to move (e.g. not using a tool).</summary>
public static bool CanPlayerMove => Context.IsPlayerFree && Game1.player.CanMove;
- /// <summary>Whether the game is currently running the draw loop. This isn't relevant to most mods, since you should use <see cref="GraphicsEvents.OnPostRenderEvent"/> to draw to the screen.</summary>
+ /// <summary>Whether the game is currently running the draw loop. This isn't relevant to most mods, since you should use <see cref="IDisplayEvents"/> events to draw to the screen.</summary>
public static bool IsInDrawLoop { get; internal set; }
/// <summary>Whether <see cref="IsWorldReady"/> and the player loaded the save in multiplayer mode (regardless of whether any other players are connected).</summary>
diff --git a/src/SMAPI/Events/ContentEvents.cs b/src/SMAPI/Events/ContentEvents.cs
index 3bf3881b..99369cae 100644
--- a/src/SMAPI/Events/ContentEvents.cs
+++ b/src/SMAPI/Events/ContentEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -46,3 +47,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/ControlEvents.cs b/src/SMAPI/Events/ControlEvents.cs
index c50d5bea..5626ff81 100644
--- a/src/SMAPI/Events/ControlEvents.cs
+++ b/src/SMAPI/Events/ControlEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using Microsoft.Xna.Framework.Input;
using StardewModdingAPI.Framework;
@@ -124,3 +125,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsClickableMenuChanged.cs b/src/SMAPI/Events/EventArgsClickableMenuChanged.cs
index 5e00b86d..a0b903b7 100644
--- a/src/SMAPI/Events/EventArgsClickableMenuChanged.cs
+++ b/src/SMAPI/Events/EventArgsClickableMenuChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewValley.Menus;
@@ -29,3 +30,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsClickableMenuClosed.cs b/src/SMAPI/Events/EventArgsClickableMenuClosed.cs
index 65751da7..77db69ea 100644
--- a/src/SMAPI/Events/EventArgsClickableMenuClosed.cs
+++ b/src/SMAPI/Events/EventArgsClickableMenuClosed.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewValley.Menus;
@@ -24,3 +25,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsControllerButtonPressed.cs b/src/SMAPI/Events/EventArgsControllerButtonPressed.cs
index 3243b80b..949446e1 100644
--- a/src/SMAPI/Events/EventArgsControllerButtonPressed.cs
+++ b/src/SMAPI/Events/EventArgsControllerButtonPressed.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
@@ -30,3 +31,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsControllerButtonReleased.cs b/src/SMAPI/Events/EventArgsControllerButtonReleased.cs
index e05a080b..d6d6d840 100644
--- a/src/SMAPI/Events/EventArgsControllerButtonReleased.cs
+++ b/src/SMAPI/Events/EventArgsControllerButtonReleased.cs
@@ -1,4 +1,5 @@
-using System;
+#if !SMAPI_3_0_STRICT
+using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
@@ -30,3 +31,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsControllerTriggerPressed.cs b/src/SMAPI/Events/EventArgsControllerTriggerPressed.cs
index a2087733..33be2fa3 100644
--- a/src/SMAPI/Events/EventArgsControllerTriggerPressed.cs
+++ b/src/SMAPI/Events/EventArgsControllerTriggerPressed.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
@@ -35,3 +36,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsControllerTriggerReleased.cs b/src/SMAPI/Events/EventArgsControllerTriggerReleased.cs
index d2eecbec..e90ff712 100644
--- a/src/SMAPI/Events/EventArgsControllerTriggerReleased.cs
+++ b/src/SMAPI/Events/EventArgsControllerTriggerReleased.cs
@@ -1,4 +1,5 @@
-using System;
+#if !SMAPI_3_0_STRICT
+using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
@@ -35,3 +36,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsInput.cs b/src/SMAPI/Events/EventArgsInput.cs
index 0cafdba5..837de2f8 100644
--- a/src/SMAPI/Events/EventArgsInput.cs
+++ b/src/SMAPI/Events/EventArgsInput.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using System.Collections.Generic;
@@ -60,3 +61,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsIntChanged.cs b/src/SMAPI/Events/EventArgsIntChanged.cs
index a018695c..76ec6d08 100644
--- a/src/SMAPI/Events/EventArgsIntChanged.cs
+++ b/src/SMAPI/Events/EventArgsIntChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
namespace StardewModdingAPI.Events
@@ -28,3 +29,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsInventoryChanged.cs b/src/SMAPI/Events/EventArgsInventoryChanged.cs
index 3a2354b6..488dd23f 100644
--- a/src/SMAPI/Events/EventArgsInventoryChanged.cs
+++ b/src/SMAPI/Events/EventArgsInventoryChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using System.Collections.Generic;
using System.Linq;
@@ -39,3 +40,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsKeyPressed.cs b/src/SMAPI/Events/EventArgsKeyPressed.cs
index d9d81e10..6204d821 100644
--- a/src/SMAPI/Events/EventArgsKeyPressed.cs
+++ b/src/SMAPI/Events/EventArgsKeyPressed.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using Microsoft.Xna.Framework.Input;
@@ -24,3 +25,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs b/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs
index 14e397ce..2c3203b1 100644
--- a/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs
+++ b/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using Microsoft.Xna.Framework.Input;
@@ -29,3 +30,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsLevelUp.cs b/src/SMAPI/Events/EventArgsLevelUp.cs
index e9a697e7..06c70088 100644
--- a/src/SMAPI/Events/EventArgsLevelUp.cs
+++ b/src/SMAPI/Events/EventArgsLevelUp.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Enums;
@@ -51,3 +52,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsLocationBuildingsChanged.cs b/src/SMAPI/Events/EventArgsLocationBuildingsChanged.cs
index e8184ebe..25e84722 100644
--- a/src/SMAPI/Events/EventArgsLocationBuildingsChanged.cs
+++ b/src/SMAPI/Events/EventArgsLocationBuildingsChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using System.Collections.Generic;
using System.Linq;
@@ -37,3 +38,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs b/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs
index 3bb387d5..9ca2e3e2 100644
--- a/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs
+++ b/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using System.Collections.Generic;
using System.Linq;
@@ -38,3 +39,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsLocationsChanged.cs b/src/SMAPI/Events/EventArgsLocationsChanged.cs
index 20984f45..1a59e612 100644
--- a/src/SMAPI/Events/EventArgsLocationsChanged.cs
+++ b/src/SMAPI/Events/EventArgsLocationsChanged.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using System.Collections.Generic;
using System.Linq;
@@ -31,3 +32,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsMineLevelChanged.cs b/src/SMAPI/Events/EventArgsMineLevelChanged.cs
index c82fed35..c63b04e9 100644
--- a/src/SMAPI/Events/EventArgsMineLevelChanged.cs
+++ b/src/SMAPI/Events/EventArgsMineLevelChanged.cs
@@ -1,4 +1,5 @@
-using System;
+#if !SMAPI_3_0_STRICT
+using System;
namespace StardewModdingAPI.Events
{
@@ -28,3 +29,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsMouseStateChanged.cs b/src/SMAPI/Events/EventArgsMouseStateChanged.cs
index 57298164..09f3f759 100644
--- a/src/SMAPI/Events/EventArgsMouseStateChanged.cs
+++ b/src/SMAPI/Events/EventArgsMouseStateChanged.cs
@@ -1,4 +1,5 @@
-using System;
+#if !SMAPI_3_0_STRICT
+using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
@@ -40,3 +41,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsPlayerWarped.cs b/src/SMAPI/Events/EventArgsPlayerWarped.cs
index 93026aea..d1aa1588 100644
--- a/src/SMAPI/Events/EventArgsPlayerWarped.cs
+++ b/src/SMAPI/Events/EventArgsPlayerWarped.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewValley;
@@ -30,3 +31,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/EventArgsValueChanged.cs b/src/SMAPI/Events/EventArgsValueChanged.cs
index 1d25af49..7bfac7a2 100644
--- a/src/SMAPI/Events/EventArgsValueChanged.cs
+++ b/src/SMAPI/Events/EventArgsValueChanged.cs
@@ -1,4 +1,5 @@
-using System;
+#if !SMAPI_3_0_STRICT
+using System;
namespace StardewModdingAPI.Events
{
@@ -28,4 +29,5 @@ namespace StardewModdingAPI.Events
this.NewValue = newValue;
}
}
-} \ No newline at end of file
+}
+#endif
diff --git a/src/SMAPI/Events/GameEvents.cs b/src/SMAPI/Events/GameEvents.cs
index 13f6bfb0..39b77f99 100644
--- a/src/SMAPI/Events/GameEvents.cs
+++ b/src/SMAPI/Events/GameEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -123,3 +124,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/GraphicsEvents.cs b/src/SMAPI/Events/GraphicsEvents.cs
index de79e42e..be29bf11 100644
--- a/src/SMAPI/Events/GraphicsEvents.cs
+++ b/src/SMAPI/Events/GraphicsEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -121,3 +122,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/InputEvents.cs b/src/SMAPI/Events/InputEvents.cs
index 788dde62..255b9c8a 100644
--- a/src/SMAPI/Events/InputEvents.cs
+++ b/src/SMAPI/Events/InputEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -57,3 +58,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/LocationEvents.cs b/src/SMAPI/Events/LocationEvents.cs
index 4aad5387..e0bcd853 100644
--- a/src/SMAPI/Events/LocationEvents.cs
+++ b/src/SMAPI/Events/LocationEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -68,3 +69,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/MenuEvents.cs b/src/SMAPI/Events/MenuEvents.cs
index 502ec340..e36cb498 100644
--- a/src/SMAPI/Events/MenuEvents.cs
+++ b/src/SMAPI/Events/MenuEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -57,3 +58,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/MineEvents.cs b/src/SMAPI/Events/MineEvents.cs
index 617c8013..954c844a 100644
--- a/src/SMAPI/Events/MineEvents.cs
+++ b/src/SMAPI/Events/MineEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -46,3 +47,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/MultiplayerEvents.cs b/src/SMAPI/Events/MultiplayerEvents.cs
index 14c58031..7e8328a4 100644
--- a/src/SMAPI/Events/MultiplayerEvents.cs
+++ b/src/SMAPI/Events/MultiplayerEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -79,3 +80,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/PlayerEvents.cs b/src/SMAPI/Events/PlayerEvents.cs
index 4f5f4a37..1193675f 100644
--- a/src/SMAPI/Events/PlayerEvents.cs
+++ b/src/SMAPI/Events/PlayerEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -69,3 +70,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/SaveEvents.cs b/src/SMAPI/Events/SaveEvents.cs
index 5b83efc8..156d3047 100644
--- a/src/SMAPI/Events/SaveEvents.cs
+++ b/src/SMAPI/Events/SaveEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -101,3 +102,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/SpecialisedEvents.cs b/src/SMAPI/Events/SpecialisedEvents.cs
index 482ac62e..0dd726e9 100644
--- a/src/SMAPI/Events/SpecialisedEvents.cs
+++ b/src/SMAPI/Events/SpecialisedEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -46,3 +47,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Events/TimeEvents.cs b/src/SMAPI/Events/TimeEvents.cs
index cca6a056..61491dc8 100644
--- a/src/SMAPI/Events/TimeEvents.cs
+++ b/src/SMAPI/Events/TimeEvents.cs
@@ -1,3 +1,4 @@
+#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
@@ -57,3 +58,4 @@ namespace StardewModdingAPI.Events
}
}
}
+#endif
diff --git a/src/SMAPI/Framework/Events/EventManager.cs b/src/SMAPI/Framework/Events/EventManager.cs
index b9d1c453..0ad85adf 100644
--- a/src/SMAPI/Framework/Events/EventManager.cs
+++ b/src/SMAPI/Framework/Events/EventManager.cs
@@ -1,5 +1,7 @@
using System.Diagnostics.CodeAnalysis;
+#if !SMAPI_3_0_STRICT
using Microsoft.Xna.Framework.Input;
+#endif
using StardewModdingAPI.Events;
namespace StardewModdingAPI.Framework.Events
@@ -156,6 +158,7 @@ namespace StardewModdingAPI.Framework.Events
public readonly ManagedEvent<UnvalidatedUpdateTickedEventArgs> UnvalidatedUpdateTicked;
+#if !SMAPI_3_0_STRICT
/*********
** Events (old)
*********/
@@ -342,6 +345,7 @@ namespace StardewModdingAPI.Framework.Events
/// <summary>Raised after the in-game clock changes.</summary>
public readonly ManagedEvent<EventArgsIntChanged> Legacy_TimeOfDayChanged;
+#endif
/*********
@@ -354,7 +358,9 @@ namespace StardewModdingAPI.Framework.Events
{
// create shortcut initialisers
ManagedEvent<TEventArgs> ManageEventOf<TEventArgs>(string typeName, string eventName) => new ManagedEvent<TEventArgs>($"{typeName}.{eventName}", monitor, modRegistry);
+#if !SMAPI_3_0_STRICT
ManagedEvent ManageEvent(string typeName, string eventName) => new ManagedEvent($"{typeName}.{eventName}", monitor, modRegistry);
+#endif
// init events (new)
this.MenuChanged = ManageEventOf<MenuChangedEventArgs>(nameof(IModEvents.Display), nameof(IDisplayEvents.MenuChanged));
@@ -405,6 +411,7 @@ namespace StardewModdingAPI.Framework.Events
this.UnvalidatedUpdateTicking = ManageEventOf<UnvalidatedUpdateTickingEventArgs>(nameof(IModEvents.Specialised), nameof(ISpecialisedEvents.UnvalidatedUpdateTicking));
this.UnvalidatedUpdateTicked = ManageEventOf<UnvalidatedUpdateTickedEventArgs>(nameof(IModEvents.Specialised), nameof(ISpecialisedEvents.UnvalidatedUpdateTicked));
+#if !SMAPI_3_0_STRICT
// init events (old)
this.Legacy_LocaleChanged = ManageEventOf<EventArgsValueChanged<string>>(nameof(ContentEvents), nameof(ContentEvents.AfterLocaleChanged));
@@ -466,6 +473,7 @@ namespace StardewModdingAPI.Framework.Events
this.Legacy_AfterDayStarted = ManageEvent(nameof(TimeEvents), nameof(TimeEvents.AfterDayStarted));
this.Legacy_TimeOfDayChanged = ManageEventOf<EventArgsIntChanged>(nameof(TimeEvents), nameof(TimeEvents.TimeOfDayChanged));
+#endif
}
}
}
diff --git a/src/SMAPI/Framework/ModHelpers/ModHelper.cs b/src/SMAPI/Framework/ModHelpers/ModHelper.cs
index 5e190e55..cd7ac8ea 100644
--- a/src/SMAPI/Framework/ModHelpers/ModHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModHelper.cs
@@ -131,6 +131,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
this.Data.WriteJsonFile("config.json", config);
}
+#if !SMAPI_3_0_STRICT
/****
** Generic JSON files
****/
@@ -199,6 +200,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
// create content pack
return this.CreateContentPack(directoryPath, manifest);
}
+#endif
/// <summary>Get all content packs loaded for this mod.</summary>
public IEnumerable<IContentPack> GetContentPacks()
diff --git a/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs b/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs
index f3555c2d..6592760e 100644
--- a/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs
+++ b/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs
@@ -23,7 +23,7 @@ namespace StardewModdingAPI.Framework.ModLoading
/// <summary>The instruction is compatible, but uses the <c>dynamic</c> keyword which won't work on Linux/Mac.</summary>
DetectedDynamic,
- /// <summary>The instruction is compatible, but references <see cref="SpecialisedEvents.UnvalidatedUpdateTick"/> which may impact stability.</summary>
+ /// <summary>The instruction is compatible, but references <see cref="ISpecialisedEvents.UnvalidatedUpdateTicking"/> or <see cref="ISpecialisedEvents.UnvalidatedUpdateTicked"/> which may impact stability.</summary>
DetectedUnvalidatedUpdateTick,
/// <summary>The instruction accesses the filesystem directly.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/ModWarning.cs b/src/SMAPI/Framework/ModLoading/ModWarning.cs
index c62199b2..e643cb05 100644
--- a/src/SMAPI/Framework/ModLoading/ModWarning.cs
+++ b/src/SMAPI/Framework/ModLoading/ModWarning.cs
@@ -22,7 +22,7 @@ namespace StardewModdingAPI.Framework.ModLoading
/// <summary>The mod uses the <c>dynamic</c> keyword which won't work on Linux/Mac.</summary>
UsesDynamic = 8,
- /// <summary&