summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SModHooks.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/SModHooks.cs')
-rw-r--r--src/SMAPI/Framework/SModHooks.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/SMAPI/Framework/SModHooks.cs b/src/SMAPI/Framework/SModHooks.cs
index a7736c8b..ac4f242c 100644
--- a/src/SMAPI/Framework/SModHooks.cs
+++ b/src/SMAPI/Framework/SModHooks.cs
@@ -1,11 +1,12 @@
using System;
using System.Threading.Tasks;
+using StardewModdingAPI.Utilities;
using StardewValley;
namespace StardewModdingAPI.Framework
{
/// <summary>Invokes callbacks for mod hooks provided by the game.</summary>
- internal class SModHooks : ModHooks
+ internal class SModHooks : DelegatingModHooks
{
/*********
** Fields
@@ -21,25 +22,24 @@ namespace StardewModdingAPI.Framework
** Public methods
*********/
/// <summary>Construct an instance.</summary>
+ /// <param name="parent">The underlying hooks to call by default.</param>
/// <param name="beforeNewDayAfterFade">A callback to invoke before <see cref="Game1.newDayAfterFade"/> runs.</param>
/// <param name="monitor">Writes messages to the console.</param>
- public SModHooks(Action beforeNewDayAfterFade, IMonitor monitor)
+ public SModHooks(ModHooks parent, Action beforeNewDayAfterFade, IMonitor monitor)
+ : base(parent)
{
this.BeforeNewDayAfterFade = beforeNewDayAfterFade;
this.Monitor = monitor;
}
- /// <summary>A hook invoked when <see cref="Game1.newDayAfterFade"/> is called.</summary>
- /// <param name="action">The vanilla <see cref="Game1.newDayAfterFade"/> logic.</param>
+ /// <inheritdoc />
public override void OnGame1_NewDayAfterFade(Action action)
{
this.BeforeNewDayAfterFade();
action();
}
- /// <summary>Start an asynchronous task for the game.</summary>
- /// <param name="task">The task to start.</param>
- /// <param name="id">A unique key which identifies the task.</param>
+ /// <inheritdoc />
public override Task StartTask(Task task, string id)
{
this.Monitor.Log($"Synchronizing '{id}' task...");
@@ -48,9 +48,7 @@ namespace StardewModdingAPI.Framework
return task;
}
- /// <summary>Start an asynchronous task for the game.</summary>
- /// <param name="task">The task to start.</param>
- /// <param name="id">A unique key which identifies the task.</param>
+ /// <inheritdoc />
public override Task<T> StartTask<T>(Task<T> task, string id)
{
this.Monitor.Log($"Synchronizing '{id}' task...");