summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/SpecialisedEvents.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-02-24 17:54:31 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-02-24 17:54:31 -0500
commit414cf5c197b5b59776d3dda914eb15710efb0868 (patch)
tree0393a95194ad78cf4440c68657b0488b7db6d68b /src/SMAPI/Events/SpecialisedEvents.cs
parent5da8b707385b9851ff3f6442de58519125f5c96f (diff)
parentf2e8450706d1971d774f870081deffdb0c6b92eb (diff)
downloadSMAPI-414cf5c197b5b59776d3dda914eb15710efb0868.tar.gz
SMAPI-414cf5c197b5b59776d3dda914eb15710efb0868.tar.bz2
SMAPI-414cf5c197b5b59776d3dda914eb15710efb0868.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Events/SpecialisedEvents.cs')
-rw-r--r--src/SMAPI/Events/SpecialisedEvents.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/SMAPI/Events/SpecialisedEvents.cs b/src/SMAPI/Events/SpecialisedEvents.cs
new file mode 100644
index 00000000..33ebf3b2
--- /dev/null
+++ b/src/SMAPI/Events/SpecialisedEvents.cs
@@ -0,0 +1,37 @@
+using System;
+using StardewModdingAPI.Framework.Events;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Events serving specialised edge cases that shouldn't be used by most mod.</summary>
+ public static class SpecialisedEvents
+ {
+ /*********
+ ** Properties
+ *********/
+ /// <summary>The core event manager.</summary>
+ private static EventManager EventManager;
+
+
+ /*********
+ ** Events
+ *********/
+ /// <summary>Raised when the game updates its state (≈60 times per second), regardless of normal SMAPI validation. This event is not thread-safe and may be invoked while game logic is running asynchronously. Changes to game state in this method may crash the game or corrupt an in-progress save. Do not use this event unless you're fully aware of the context in which your code will be run. Mods using this method will trigger a stability warning in the SMAPI console.</summary>
+ public static event EventHandler UnvalidatedUpdateTick
+ {
+ add => SpecialisedEvents.EventManager.Specialised_UnvalidatedUpdateTick.Add(value);
+ remove => SpecialisedEvents.EventManager.Specialised_UnvalidatedUpdateTick.Remove(value);
+ }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Initialise the events.</summary>
+ /// <param name="eventManager">The core event manager.</param>
+ internal static void Init(EventManager eventManager)
+ {
+ SpecialisedEvents.EventManager = eventManager;
+ }
+ }
+}