diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-25 01:54:57 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-25 01:54:57 -0500 |
commit | 833d98f49136325edfc4463097710cf2391dd5b2 (patch) | |
tree | 2dfc969c6e27e78b05deb1e59201ded5392b7dc7 /src/SMAPI/Framework/Content/AssetDataForObject.cs | |
parent | 6fc1bf47136a620b3d270af6307426080b7d1ab2 (diff) | |
parent | 51118337e5e8cbb6803ffee4e7c0b411aba2b3e0 (diff) | |
download | SMAPI-833d98f49136325edfc4463097710cf2391dd5b2.tar.gz SMAPI-833d98f49136325edfc4463097710cf2391dd5b2.tar.bz2 SMAPI-833d98f49136325edfc4463097710cf2391dd5b2.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetDataForObject.cs')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetDataForObject.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForObject.cs b/src/SMAPI/Framework/Content/AssetDataForObject.cs index f30003e4..90f9e2d4 100644 --- a/src/SMAPI/Framework/Content/AssetDataForObject.cs +++ b/src/SMAPI/Framework/Content/AssetDataForObject.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; @@ -16,7 +16,7 @@ namespace StardewModdingAPI.Framework.Content /// <param name="data">The content data being read.</param> /// <param name="getNormalisedPath">Normalises an asset key to match the cache key.</param> public AssetDataForObject(string locale, string assetName, object data, Func<string, string> getNormalisedPath) - : base(locale, assetName, data, getNormalisedPath) { } + : base(locale, assetName, data, getNormalisedPath, onDataReplaced: null) { } /// <summary>Construct an instance.</summary> /// <param name="info">The asset metadata.</param> @@ -31,14 +31,14 @@ namespace StardewModdingAPI.Framework.Content /// <exception cref="InvalidOperationException">The content being read isn't a dictionary.</exception> public IAssetDataForDictionary<TKey, TValue> AsDictionary<TKey, TValue>() { - return new AssetDataForDictionary<TKey, TValue>(this.Locale, this.AssetName, this.GetData<IDictionary<TKey, TValue>>(), this.GetNormalisedPath); + return new AssetDataForDictionary<TKey, TValue>(this.Locale, this.AssetName, this.GetData<IDictionary<TKey, TValue>>(), this.GetNormalisedPath, this.ReplaceWith); } /// <summary>Get a helper to manipulate the data as an image.</summary> /// <exception cref="InvalidOperationException">The content being read isn't an image.</exception> public IAssetDataForImage AsImage() { - return new AssetDataForImage(this.Locale, this.AssetName, this.GetData<Texture2D>(), this.GetNormalisedPath); + return new AssetDataForImage(this.Locale, this.AssetName, this.GetData<Texture2D>(), this.GetNormalisedPath, this.ReplaceWith); } /// <summary>Get the data as a given type.</summary> |