Enable for public access default config properties

This commit is contained in:
JustArchi
2020-09-08 17:14:17 +02:00
parent 37870e8c39
commit bbfcd467c9
2 changed files with 168 additions and 57 deletions

View File

@@ -37,39 +37,96 @@ using SteamKit2;
namespace ArchiSteamFarm {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class BotConfig {
[PublicAPI]
public const bool DefaultAcceptGifts = false;
[PublicAPI]
public const bool DefaultAutoSteamSaleEvent = false;
[PublicAPI]
public const EBotBehaviour DefaultBotBehaviour = EBotBehaviour.None;
[PublicAPI]
public const string DefaultCustomGamePlayedWhileFarming = null;
[PublicAPI]
public const string DefaultCustomGamePlayedWhileIdle = null;
[PublicAPI]
public const bool DefaultEnabled = false;
[PublicAPI]
public const byte DefaultHoursUntilCardDrops = 3;
[PublicAPI]
public const bool DefaultIdlePriorityQueueOnly = false;
[PublicAPI]
public const bool DefaultIdleRefundableGames = true;
[PublicAPI]
public const EPersonaState DefaultOnlineStatus = EPersonaState.Online;
[PublicAPI]
public const ArchiCryptoHelper.ECryptoMethod DefaultPasswordFormat = ArchiCryptoHelper.ECryptoMethod.PlainText;
[PublicAPI]
public const bool DefaultPaused = false;
[PublicAPI]
public const ERedeemingPreferences DefaultRedeemingPreferences = ERedeemingPreferences.None;
[PublicAPI]
public const bool DefaultSendOnFarmingFinished = false;
[PublicAPI]
public const byte DefaultSendTradePeriod = 0;
[PublicAPI]
public const bool DefaultShutdownOnFarmingFinished = false;
[PublicAPI]
public const string DefaultSteamLogin = null;
[PublicAPI]
public const ulong DefaultSteamMasterClanID = 0;
[PublicAPI]
public const string DefaultSteamParentalCode = null;
[PublicAPI]
public const string DefaultSteamPassword = null;
[PublicAPI]
public const string DefaultSteamTradeToken = null;
[PublicAPI]
public const ETradingPreferences DefaultTradingPreferences = ETradingPreferences.None;
[PublicAPI]
public const bool DefaultUseLoginKeys = true;
internal const byte SteamParentalCodeLength = 4;
private const bool DefaultAcceptGifts = false;
private const bool DefaultAutoSteamSaleEvent = false;
private const EBotBehaviour DefaultBotBehaviour = EBotBehaviour.None;
private const string DefaultCustomGamePlayedWhileFarming = null;
private const string DefaultCustomGamePlayedWhileIdle = null;
private const bool DefaultEnabled = false;
private const byte DefaultHoursUntilCardDrops = 3;
private const bool DefaultIdlePriorityQueueOnly = false;
private const bool DefaultIdleRefundableGames = true;
private const EPersonaState DefaultOnlineStatus = EPersonaState.Online;
private const ArchiCryptoHelper.ECryptoMethod DefaultPasswordFormat = ArchiCryptoHelper.ECryptoMethod.PlainText;
private const bool DefaultPaused = false;
private const ERedeemingPreferences DefaultRedeemingPreferences = ERedeemingPreferences.None;
private const bool DefaultSendOnFarmingFinished = false;
private const byte DefaultSendTradePeriod = 0;
private const bool DefaultShutdownOnFarmingFinished = false;
private const string DefaultSteamLogin = null;
private const ulong DefaultSteamMasterClanID = 0;
private const string DefaultSteamParentalCode = null;
private const string DefaultSteamPassword = null;
private const string DefaultSteamTradeToken = null;
private const ETradingPreferences DefaultTradingPreferences = ETradingPreferences.None;
private const bool DefaultUseLoginKeys = true;
private const byte SteamTradeTokenLength = 8;
private static readonly ImmutableList<EFarmingOrder> DefaultFarmingOrders = ImmutableList<EFarmingOrder>.Empty;
private static readonly ImmutableHashSet<uint> DefaultGamesPlayedWhileIdle = ImmutableHashSet<uint>.Empty;
private static readonly ImmutableHashSet<Steam.Asset.EType> DefaultLootableTypes = ImmutableHashSet.Create(Steam.Asset.EType.BoosterPack, Steam.Asset.EType.FoilTradingCard, Steam.Asset.EType.TradingCard);
private static readonly ImmutableHashSet<Steam.Asset.EType> DefaultMatchableTypes = ImmutableHashSet.Create(Steam.Asset.EType.TradingCard);
private static readonly ImmutableDictionary<ulong, EPermission> DefaultSteamUserPermissions = ImmutableDictionary<ulong, EPermission>.Empty;
private static readonly ImmutableHashSet<Steam.Asset.EType> DefaultTransferableTypes = ImmutableHashSet.Create(Steam.Asset.EType.BoosterPack, Steam.Asset.EType.FoilTradingCard, Steam.Asset.EType.TradingCard);
[PublicAPI]
public static readonly ImmutableList<EFarmingOrder> DefaultFarmingOrders = ImmutableList<EFarmingOrder>.Empty;
[PublicAPI]
public static readonly ImmutableHashSet<uint> DefaultGamesPlayedWhileIdle = ImmutableHashSet<uint>.Empty;
[PublicAPI]
public static readonly ImmutableHashSet<Steam.Asset.EType> DefaultLootableTypes = ImmutableHashSet.Create(Steam.Asset.EType.BoosterPack, Steam.Asset.EType.FoilTradingCard, Steam.Asset.EType.TradingCard);
[PublicAPI]
public static readonly ImmutableHashSet<Steam.Asset.EType> DefaultMatchableTypes = ImmutableHashSet.Create(Steam.Asset.EType.TradingCard);
[PublicAPI]
public static readonly ImmutableDictionary<ulong, EPermission> DefaultSteamUserPermissions = ImmutableDictionary<ulong, EPermission>.Empty;
[PublicAPI]
public static readonly ImmutableHashSet<Steam.Asset.EType> DefaultTransferableTypes = ImmutableHashSet.Create(Steam.Asset.EType.BoosterPack, Steam.Asset.EType.FoilTradingCard, Steam.Asset.EType.TradingCard);
private static readonly SemaphoreSlim WriteSemaphore = new SemaphoreSlim(1, 1);

View File

@@ -36,36 +36,90 @@ using SteamKit2;
namespace ArchiSteamFarm {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class GlobalConfig {
internal const string DefaultCommandPrefix = "!";
internal const byte DefaultConfirmationsLimiterDelay = 10;
internal const byte DefaultConnectionTimeout = 90;
internal const byte DefaultFarmingDelay = 15;
internal const byte DefaultGiftsLimiterDelay = 1;
internal const bool DefaultHeadless = false;
internal const byte DefaultIdleFarmingPeriod = 8;
internal const byte DefaultInventoryLimiterDelay = 3;
internal const string DefaultIPCPassword = null;
internal const byte DefaultLoginLimiterDelay = 10;
internal const byte DefaultMaxFarmingTime = 10;
internal const byte DefaultMaxTradeHoldDuration = 15;
internal const string DefaultSteamMessagePrefix = "/me ";
internal const ulong DefaultSteamOwnerID = 0;
internal const ushort DefaultWebLimiterDelay = 300;
[PublicAPI]
public const bool DefaultAutoRestart = true;
private const bool DefaultAutoRestart = true;
private const string DefaultCurrentCulture = null;
private const bool DefaultDebug = false;
private const bool DefaultIPC = false;
private const EOptimizationMode DefaultOptimizationMode = EOptimizationMode.MaxPerformance;
private const bool DefaultStatistics = true;
private const ProtocolTypes DefaultSteamProtocols = ProtocolTypes.All;
private const EUpdateChannel DefaultUpdateChannel = EUpdateChannel.Stable;
private const byte DefaultUpdatePeriod = 24;
private const string DefaultWebProxyPassword = null;
private const string DefaultWebProxyText = null;
private const string DefaultWebProxyUsername = null;
[PublicAPI]
public const string DefaultCommandPrefix = "!";
[PublicAPI]
public const byte DefaultConfirmationsLimiterDelay = 10;
[PublicAPI]
public const byte DefaultConnectionTimeout = 90;
[PublicAPI]
public const string DefaultCurrentCulture = null;
[PublicAPI]
public const bool DefaultDebug = false;
[PublicAPI]
public const byte DefaultFarmingDelay = 15;
[PublicAPI]
public const byte DefaultGiftsLimiterDelay = 1;
[PublicAPI]
public const bool DefaultHeadless = false;
[PublicAPI]
public const byte DefaultIdleFarmingPeriod = 8;
[PublicAPI]
public const byte DefaultInventoryLimiterDelay = 3;
[PublicAPI]
public const bool DefaultIPC = false;
[PublicAPI]
public const string DefaultIPCPassword = null;
[PublicAPI]
public const byte DefaultLoginLimiterDelay = 10;
[PublicAPI]
public const byte DefaultMaxFarmingTime = 10;
[PublicAPI]
public const byte DefaultMaxTradeHoldDuration = 15;
[PublicAPI]
public const EOptimizationMode DefaultOptimizationMode = EOptimizationMode.MaxPerformance;
[PublicAPI]
public const bool DefaultStatistics = true;
[PublicAPI]
public const string DefaultSteamMessagePrefix = "/me ";
[PublicAPI]
public const ulong DefaultSteamOwnerID = 0;
[PublicAPI]
public const ProtocolTypes DefaultSteamProtocols = ProtocolTypes.All;
[PublicAPI]
public const EUpdateChannel DefaultUpdateChannel = EUpdateChannel.Stable;
[PublicAPI]
public const byte DefaultUpdatePeriod = 24;
[PublicAPI]
public const ushort DefaultWebLimiterDelay = 300;
[PublicAPI]
public const string DefaultWebProxyPassword = null;
[PublicAPI]
public const string DefaultWebProxyText = null;
[PublicAPI]
public const string DefaultWebProxyUsername = null;
[PublicAPI]
public static readonly ImmutableHashSet<uint> DefaultBlacklist = ImmutableHashSet.Create<uint>();
private static readonly ImmutableHashSet<uint> DefaultBlacklist = ImmutableHashSet.Create<uint>();
private static readonly SemaphoreSlim WriteSemaphore = new SemaphoreSlim(1, 1);
[JsonProperty(Required = Required.DisallowNull)]