summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLinked.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-01-30 22:10:16 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-01-30 22:10:16 -0500
commite5d8acf240f923a09bdaad3fb14b2c34847860dc (patch)
treec86ac2e42dfd4eb058493b6f2b9050c5c51a6c4f /src/SMAPI/Framework/ModLinked.cs
parent9f36b2b3d69ee0a45241bfcc45953df29f167aef (diff)
downloadSMAPI-e5d8acf240f923a09bdaad3fb14b2c34847860dc.tar.gz
SMAPI-e5d8acf240f923a09bdaad3fb14b2c34847860dc.tar.bz2
SMAPI-e5d8acf240f923a09bdaad3fb14b2c34847860dc.zip
rework asset editor/loader tracking so they're affected by load order
Diffstat (limited to 'src/SMAPI/Framework/ModLinked.cs')
-rw-r--r--src/SMAPI/Framework/ModLinked.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLinked.cs b/src/SMAPI/Framework/ModLinked.cs
new file mode 100644
index 00000000..8cfe6f5f
--- /dev/null
+++ b/src/SMAPI/Framework/ModLinked.cs
@@ -0,0 +1,29 @@
+namespace StardewModdingAPI.Framework
+{
+ /// <summary>A generic tuple which links something to a mod.</summary>
+ /// <typeparam name="T">The interceptor type.</typeparam>
+ internal class ModLinked<T>
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The mod metadata.</summary>
+ public IModMetadata Mod { get; }
+
+ /// <summary>The instance linked to the mod.</summary>
+ public T Data { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="mod">The mod metadata.</param>
+ /// <param name="data">The instance linked to the mod.</param>
+ public ModLinked(IModMetadata mod, T data)
+ {
+ this.Mod = mod;
+ this.Data = data;
+ }
+ }
+}