Implement plugin system (#1020)

* Implement basic plugin system

* The dawn of new era

* Add plugins warning

* Move more members to PublicAPI

* Open commands for the plugins

* Add IBotHackNewChat

* Run plugin events in parallel

* Use properties in IPlugin

* Hook our custom plugin into CI to ensure it compiles

* Fix dotnet brain damage

* Add IBotsComparer

* Add code documentation

* Add IBotTradeOffer

* Add IBotTradeOffer example

* Add IBotTradeOfferResults

* Final bulletproofing

* Final renaming
This commit is contained in:
Łukasz Domeradzki
2019-01-10 22:33:07 +01:00
committed by GitHub
parent 62a770479e
commit 0f2a816b92
49 changed files with 3025 additions and 1653 deletions

View File

@@ -20,6 +20,7 @@
// limitations under the License.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.IO;
@@ -28,7 +29,9 @@ using System.Threading;
using System.Threading.Tasks;
using ArchiSteamFarm.Json;
using ArchiSteamFarm.Localization;
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SteamKit2;
namespace ArchiSteamFarm {
@@ -142,6 +145,14 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool UseLoginKeys = DefaultUseLoginKeys;
[JsonExtensionData]
internal Dictionary<string, JToken> AdditionalProperties {
get;
[UsedImplicitly]
private set;
}
internal string DecryptedSteamPassword {
get {
if (string.IsNullOrEmpty(SteamPassword)) {
@@ -360,9 +371,7 @@ namespace ArchiSteamFarm {
[Flags]
internal enum EBotBehaviour : byte {
[SuppressMessage("ReSharper", "UnusedMember.Global")]
None = 0,
RejectInvalidFriendInvites = 1,
RejectInvalidTrades = 2,
RejectInvalidGroupInvites = 4,
@@ -399,9 +408,7 @@ namespace ArchiSteamFarm {
[Flags]
internal enum ERedeemingPreferences : byte {
[SuppressMessage("ReSharper", "UnusedMember.Global")]
None = 0,
Forwarding = 1,
Distributing = 2,
KeepMissingGames = 4,
@@ -410,9 +417,7 @@ namespace ArchiSteamFarm {
[Flags]
internal enum ETradingPreferences : byte {
[SuppressMessage("ReSharper", "UnusedMember.Global")]
None = 0,
AcceptDonations = 1,
SteamTradeMatcher = 2,
MatchEverything = 4,