summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-02-19 19:32:27 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-02-19 19:32:27 -0500
commit674618664a72679812c1b51065f725fec99aa86d (patch)
treed511d598bf0adfcf38817d3fd7098bb3854e5863 /src/SMAPI/Framework/ModLoading
parent5060739d62dfce0c72a5d3eeb93332aad7aa929f (diff)
downloadSMAPI-674618664a72679812c1b51065f725fec99aa86d.tar.gz
SMAPI-674618664a72679812c1b51065f725fec99aa86d.tar.bz2
SMAPI-674618664a72679812c1b51065f725fec99aa86d.zip
add unvalidated update tick event for specialised use cases (#446)
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r--src/SMAPI/Framework/ModLoading/AssemblyLoader.cs5
-rw-r--r--src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
index 3a7b214a..ccbd053e 100644
--- a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
+++ b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
@@ -285,6 +285,11 @@ namespace StardewModdingAPI.Framework.ModLoading
this.Monitor.LogOnce(loggedMessages, $"{mod.DisplayName} seems to change the save serialiser. It may change your saves in such a way that they won't work without this mod in the future.", LogLevel.Warn);
break;
+ case InstructionHandleResult.DetectedUnvalidatedUpdateTick:
+ this.Monitor.LogOnce(loggedMessages, $"{logPrefix}Detected reference to {handler.NounPhrase} in assembly {filename}.");
+ this.Monitor.LogOnce(loggedMessages, $"{mod.DisplayName} uses a specialised SMAPI event that may crash the game or corrupt your save file. If you encounter problems, try removing this mod first.", LogLevel.Warn);
+ break;
+
case InstructionHandleResult.DetectedDynamic:
this.Monitor.LogOnce(loggedMessages, $"{logPrefix}Detected 'dynamic' keyword ({handler.NounPhrase}) in assembly {filename}.");
this.Monitor.LogOnce(loggedMessages, $"{mod.DisplayName} uses the 'dynamic' keyword, which isn't compatible with Stardew Valley on Linux or Mac.",
diff --git a/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs b/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs
index 0ae598fc..6a7e0519 100644
--- a/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs
+++ b/src/SMAPI/Framework/ModLoading/InstructionHandleResult.cs
@@ -1,3 +1,5 @@
+using StardewModdingAPI.Events;
+
namespace StardewModdingAPI.Framework.ModLoading
{
/// <summary>Indicates how an instruction was handled.</summary>
@@ -19,6 +21,9 @@ namespace StardewModdingAPI.Framework.ModLoading
DetectedSaveSerialiser,
/// <summary>The instruction is compatible, but uses the <c>dynamic</c> keyword which won't work on Linux/Mac.</summary>
- DetectedDynamic
+ DetectedDynamic,
+
+ /// <summary>The instruction is compatible, but references <see cref="SpecialisedEvents.InvokeUnvalidatedUpdateTick"/> which may impact stability.</summary>
+ DetectedUnvalidatedUpdateTick
}
}