diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-25 21:46:37 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-25 21:46:37 -0400 |
commit | e1fc566e0afeb6eb92418bb039365611abd33829 (patch) | |
tree | b3716a570106473f5daf772b4d0d2b9aaebc5c76 /src/SMAPI/Framework/Content | |
parent | b0011bf65c6ea7ba8d66a219501ac181cbd64c90 (diff) | |
download | SMAPI-e1fc566e0afeb6eb92418bb039365611abd33829.tar.gz SMAPI-e1fc566e0afeb6eb92418bb039365611abd33829.tar.bz2 SMAPI-e1fc566e0afeb6eb92418bb039365611abd33829.zip |
add content pack labels (#766)
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetEditOperation.cs | 7 | ||||
-rw-r--r-- | src/SMAPI/Framework/Content/AssetLoadOperation.cs | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Content/AssetEditOperation.cs b/src/SMAPI/Framework/Content/AssetEditOperation.cs index fa189d44..14db231c 100644 --- a/src/SMAPI/Framework/Content/AssetEditOperation.cs +++ b/src/SMAPI/Framework/Content/AssetEditOperation.cs @@ -11,6 +11,9 @@ namespace StardewModdingAPI.Framework.Content /// <summary>The mod applying the edit.</summary> public IModMetadata Mod { get; } + /// <summary>The content pack on whose behalf the edit is being applied, if any.</summary> + public IModMetadata OnBehalfOf { get; } + /// <summary>Apply the edit to an asset.</summary> public Action<IAssetData> ApplyEdit { get; } @@ -20,10 +23,12 @@ namespace StardewModdingAPI.Framework.Content *********/ /// <summary>Construct an instance.</summary> /// <param name="mod">The mod applying the edit.</param> + /// <param name="onBehalfOf">The content pack on whose behalf the edit is being applied, if any.</param> /// <param name="applyEdit">Apply the edit to an asset.</param> - public AssetEditOperation(IModMetadata mod, Action<IAssetData> applyEdit) + public AssetEditOperation(IModMetadata mod, IModMetadata onBehalfOf, Action<IAssetData> applyEdit) { this.Mod = mod; + this.OnBehalfOf = onBehalfOf; this.ApplyEdit = applyEdit; } } diff --git a/src/SMAPI/Framework/Content/AssetLoadOperation.cs b/src/SMAPI/Framework/Content/AssetLoadOperation.cs index d773cadd..29bf1518 100644 --- a/src/SMAPI/Framework/Content/AssetLoadOperation.cs +++ b/src/SMAPI/Framework/Content/AssetLoadOperation.cs @@ -8,9 +8,12 @@ namespace StardewModdingAPI.Framework.Content /********* ** Accessors *********/ - /// <summary>The mod applying the edit.</summary> + /// <summary>The mod loading the asset.</summary> public IModMetadata Mod { get; } + /// <summary>The content pack on whose behalf the asset is being loaded, if any.</summary> + public IModMetadata OnBehalfOf { get; } + /// <summary>Load the initial value for an asset.</summary> public Func<IAssetInfo, object> GetData { get; } @@ -20,10 +23,12 @@ namespace StardewModdingAPI.Framework.Content *********/ /// <summary>Construct an instance.</summary> /// <param name="mod">The mod applying the edit.</param> + /// <param name="onBehalfOf">The content pack on whose behalf the asset is being loaded, if any.</param> /// <param name="getData">Load the initial value for an asset.</param> - public AssetLoadOperation(IModMetadata mod, Func<IAssetInfo, object> getData) + public AssetLoadOperation(IModMetadata mod, IModMetadata onBehalfOf, Func<IAssetInfo, object> getData) { this.Mod = mod; + this.OnBehalfOf = onBehalfOf; this.GetData = getData; } } |