Skip to content

Commit

Permalink
Add deprecation helper
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Jun 26, 2024
1 parent 7eb24d7 commit 11bab46
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ArchiSteamFarm/Plugins/PluginsCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ internal static async Task<bool> InitPlugins() {
await plugin.OnLoaded().ConfigureAwait(false);

ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.PluginLoaded, plugin.Name));

#pragma warning disable CS0618 // TODO: Pending removal
if (plugin is IBotTradeOffer) {
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.WarningDeprecated, $"{nameof(IBotTradeOffer)} ({plugin.Name})", nameof(IBotTradeOffer2)));
}
#pragma warning restore CS0618 // TODO: Pending removal
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
invalidPlugins.Add(plugin);
Expand Down

0 comments on commit 11bab46

Please sign in to comment.