mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-21 08:48:38 +00:00
Code cleanup
This commit is contained in:
@@ -37,37 +37,37 @@ namespace ArchiSteamFarm {
|
||||
[SuppressMessage("ReSharper", "ConvertToConstant.Global")]
|
||||
internal sealed class BotConfig {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool AcceptGifts = false;
|
||||
internal readonly bool AcceptGifts;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool CardDropsRestricted = true;
|
||||
|
||||
[JsonProperty]
|
||||
internal readonly string CustomGamePlayedWhileFarming = null;
|
||||
internal readonly string CustomGamePlayedWhileFarming;
|
||||
|
||||
[JsonProperty]
|
||||
internal readonly string CustomGamePlayedWhileIdle = null;
|
||||
internal readonly string CustomGamePlayedWhileIdle;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool DismissInventoryNotifications = false;
|
||||
internal readonly bool DismissInventoryNotifications;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool Enabled = false;
|
||||
internal readonly bool Enabled;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly EFarmingOrder FarmingOrder = EFarmingOrder.Unordered;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool FarmOffline = false;
|
||||
internal readonly bool FarmOffline;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly HashSet<uint> GamesPlayedWhileIdle = new HashSet<uint>();
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool HandleOfflineMessages = false;
|
||||
internal readonly bool HandleOfflineMessages;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool IsBotAccount = false;
|
||||
internal readonly bool IsBotAccount;
|
||||
|
||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||
internal readonly HashSet<Steam.Item.EType> LootableTypes = new HashSet<Steam.Item.EType> {
|
||||
@@ -80,25 +80,25 @@ namespace ArchiSteamFarm {
|
||||
internal readonly CryptoHelper.ECryptoMethod PasswordFormat = CryptoHelper.ECryptoMethod.PlainText;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool Paused = false;
|
||||
internal readonly bool Paused;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ERedeemingPreferences RedeemingPreferences = ERedeemingPreferences.None;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool SendOnFarmingFinished = false;
|
||||
internal readonly bool SendOnFarmingFinished;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly byte SendTradePeriod = 0;
|
||||
internal readonly byte SendTradePeriod;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool ShutdownOnFarmingFinished = false;
|
||||
internal readonly bool ShutdownOnFarmingFinished;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ulong SteamMasterClanID = 0;
|
||||
internal readonly ulong SteamMasterClanID;
|
||||
|
||||
[JsonProperty]
|
||||
internal readonly string SteamTradeToken = null;
|
||||
internal readonly string SteamTradeToken;
|
||||
|
||||
[SuppressMessage("ReSharper", "CollectionNeverUpdated.Global")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
|
||||
@@ -55,10 +55,10 @@ namespace ArchiSteamFarm {
|
||||
internal readonly byte ConnectionTimeout = DefaultConnectionTimeout;
|
||||
|
||||
[JsonProperty]
|
||||
internal readonly string CurrentCulture = null;
|
||||
internal readonly string CurrentCulture;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool Debug = false;
|
||||
internal readonly bool Debug;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly byte FarmingDelay = 15;
|
||||
@@ -67,7 +67,7 @@ namespace ArchiSteamFarm {
|
||||
internal readonly byte GiftsLimiterDelay = 1;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool Headless = false;
|
||||
internal readonly bool Headless;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly byte IdleFarmingPeriod = 3;
|
||||
@@ -91,7 +91,7 @@ namespace ArchiSteamFarm {
|
||||
internal readonly bool Statistics = true;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ulong SteamOwnerID = 0;
|
||||
internal readonly ulong SteamOwnerID;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ProtocolType SteamProtocol = ProtocolType.Tcp;
|
||||
|
||||
@@ -39,41 +39,41 @@ namespace ConfigGenerator {
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
internal sealed class BotConfig : ASFConfig {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool AcceptGifts { get; set; } = false;
|
||||
public bool AcceptGifts { get; set; }
|
||||
|
||||
[LocalizedCategory("Performance")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool CardDropsRestricted { get; set; } = true;
|
||||
|
||||
[JsonProperty]
|
||||
public string CustomGamePlayedWhileFarming { get; set; } = null;
|
||||
public string CustomGamePlayedWhileFarming { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public string CustomGamePlayedWhileIdle { get; set; } = null;
|
||||
public string CustomGamePlayedWhileIdle { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool DismissInventoryNotifications { get; set; } = false;
|
||||
public bool DismissInventoryNotifications { get; set; }
|
||||
|
||||
[LocalizedCategory("Core")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool Enabled { get; set; } = false;
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public EFarmingOrder FarmingOrder { get; set; } = EFarmingOrder.Unordered;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool FarmOffline { get; set; } = false;
|
||||
public bool FarmOffline { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public List<uint> GamesPlayedWhileIdle { get; set; } = new List<uint>();
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool HandleOfflineMessages { get; set; } = false;
|
||||
public bool HandleOfflineMessages { get; set; }
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool IsBotAccount { get; set; } = false;
|
||||
public bool IsBotAccount { get; set; }
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||
@@ -89,7 +89,7 @@ namespace ConfigGenerator {
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool Paused { get; set; } = false;
|
||||
public bool Paused { get; set; }
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[Editor(typeof(FlagEnumUiEditor), typeof(UITypeEditor))]
|
||||
@@ -97,21 +97,21 @@ namespace ConfigGenerator {
|
||||
public ERedeemingPreferences RedeemingPreferences { get; set; } = ERedeemingPreferences.None;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool SendOnFarmingFinished { get; set; } = false;
|
||||
public bool SendOnFarmingFinished { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public byte SendTradePeriod { get; set; } = 0;
|
||||
public byte SendTradePeriod { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool ShutdownOnFarmingFinished { get; set; } = false;
|
||||
public bool ShutdownOnFarmingFinished { get; set; }
|
||||
|
||||
[LocalizedCategory("Core")]
|
||||
[JsonProperty]
|
||||
public string SteamLogin { get; set; } = null;
|
||||
public string SteamLogin { get; set; }
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public ulong SteamMasterClanID { get; set; } = 0;
|
||||
public ulong SteamMasterClanID { get; set; }
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty]
|
||||
@@ -120,11 +120,11 @@ namespace ConfigGenerator {
|
||||
[LocalizedCategory("Core")]
|
||||
[JsonProperty]
|
||||
[PasswordPropertyText(true)]
|
||||
public string SteamPassword { get; set; } = null;
|
||||
public string SteamPassword { get; set; }
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty]
|
||||
public string SteamTradeToken { get; set; } = null;
|
||||
public string SteamTradeToken { get; set; }
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[Editor(typeof(GenericDictionaryEditor<ulong, EPermission>), typeof(UITypeEditor))]
|
||||
|
||||
@@ -58,11 +58,11 @@ namespace ConfigGenerator {
|
||||
public byte ConnectionTimeout { get; set; } = DefaultConnectionTimeout;
|
||||
|
||||
[JsonProperty]
|
||||
public string CurrentCulture { get; set; } = null;
|
||||
public string CurrentCulture { get; set; }
|
||||
|
||||
[LocalizedCategory("Debugging")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool Debug { get; set; } = false;
|
||||
public bool Debug { get; set; }
|
||||
|
||||
[LocalizedCategory("Performance")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
@@ -74,7 +74,7 @@ namespace ConfigGenerator {
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool Headless { get; set; } = false;
|
||||
public bool Headless { get; set; }
|
||||
|
||||
[LocalizedCategory("Performance")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
@@ -104,7 +104,7 @@ namespace ConfigGenerator {
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public ulong SteamOwnerID { get; set; } = 0;
|
||||
public ulong SteamOwnerID { get; set; }
|
||||
|
||||
[LocalizedCategory("Advanced")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
|
||||
Reference in New Issue
Block a user