Skip to content

Commit

Permalink
Remove deprecated functionality, bump
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Jul 3, 2024
1 parent c37e54c commit 811ea46
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 66 deletions.
46 changes: 0 additions & 46 deletions ArchiSteamFarm/Plugins/Interfaces/IBotTradeOffer.cs

This file was deleted.

20 changes: 1 addition & 19 deletions ArchiSteamFarm/Plugins/PluginsCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@ 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 Expand Up @@ -608,19 +602,7 @@ internal static async Task<bool> OnBotTradeOffer(Bot bot, TradeOffer tradeOffer,
return false;
}

#pragma warning disable CS0618 // TODO: Pending removal
IList<bool> oldResponses;

try {
oldResponses = await Utilities.InParallel(ActivePlugins.OfType<IBotTradeOffer>().Select(plugin => plugin.OnBotTradeOffer(bot, tradeOffer))).ConfigureAwait(false);
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);

return false;
}
#pragma warning restore CS0618 // TODO: Pending removal

return responses.Any(static response => response) || oldResponses.Any(static response => response);
return responses.Any(static response => response);
}

internal static async Task OnBotTradeOfferResults(Bot bot, IReadOnlyCollection<ParseTradeResult> tradeResults) {
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>6.0.4.5</Version>
<Version>6.0.5.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 811ea46

Please sign in to comment.