summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Framework/SCore.cs10
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index b35a4760..53711454 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -7,6 +7,7 @@
* For mod authors:
* Refactored how event handling works under the hood, particularly the new content API. This should have no effect on mod usage.
+ * In-game time changes are now logged in verbose mod.
* Fixed error when loading a `.xnb` file through the old content API without the file extension.
* Fixed asset propagation for player sprites not fully updating recolor masks in some cases.
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index 41b975e8..5ae4fdbb 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -960,8 +960,14 @@ namespace StardewModdingAPI.Framework
}
// raise time changed
- if (raiseWorldEvents && state.Time.IsChanged && events.TimeChanged.HasListeners)
- events.TimeChanged.Raise(new TimeChangedEventArgs(state.Time.Old, state.Time.New));
+ if (raiseWorldEvents && state.Time.IsChanged)
+ {
+ if (verbose)
+ this.Monitor.Log($"Context: time changed to {state.Time.New}.");
+
+ if (events.TimeChanged.HasListeners)
+ events.TimeChanged.Raise(new TimeChangedEventArgs(state.Time.Old, state.Time.New));
+ }
// raise player events
if (raiseWorldEvents)