diff options
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetLoadOperation.cs')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetLoadOperation.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/Content/AssetLoadOperation.cs b/src/SMAPI/Framework/Content/AssetLoadOperation.cs new file mode 100644 index 00000000..d773cadd --- /dev/null +++ b/src/SMAPI/Framework/Content/AssetLoadOperation.cs @@ -0,0 +1,30 @@ +using System; + +namespace StardewModdingAPI.Framework.Content +{ + /// <summary>An operation which provides the initial instance of an asset when it's requested from the content pipeline.</summary> + internal class AssetLoadOperation + { + /********* + ** Accessors + *********/ + /// <summary>The mod applying the edit.</summary> + public IModMetadata Mod { get; } + + /// <summary>Load the initial value for an asset.</summary> + public Func<IAssetInfo, object> GetData { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="mod">The mod applying the edit.</param> + /// <param name="getData">Load the initial value for an asset.</param> + public AssetLoadOperation(IModMetadata mod, Func<IAssetInfo, object> getData) + { + this.Mod = mod; + this.GetData = getData; + } + } +} |