summaryrefslogtreecommitdiff
path: root/src/SMAPI/IAssetEditor.cs
blob: f3238ba95515ea2929d71dbf7f875caf063d5beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#if SMAPI_DEPRECATED
using System;
using StardewModdingAPI.Events;

namespace StardewModdingAPI
{
    /// <summary>Edits matching content assets.</summary>
    [Obsolete($"Use {nameof(IMod.Helper)}.{nameof(IModHelper.Events)}.{nameof(IModEvents.Content)} instead. This interface will be removed in SMAPI 4.0.0.")]
    public interface IAssetEditor
    {
        /*********
        ** Public methods
        *********/
        /// <summary>Get whether this instance can edit the given asset.</summary>
        /// <param name="asset">Basic metadata about the asset being loaded.</param>
        bool CanEdit<T>(IAssetInfo asset);

        /// <summary>Edit a matched asset.</summary>
        /// <param name="asset">A helper which encapsulates metadata about an asset and enables changes to it.</param>
        void Edit<T>(IAssetData asset);
    }
}
#endif