mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Add JS helpers for @Aareksio
This commit is contained in:
@@ -118,11 +118,6 @@ namespace ArchiSteamFarm {
|
||||
internal readonly bool ShutdownOnFarmingFinished;
|
||||
#pragma warning restore 649
|
||||
|
||||
#pragma warning disable 649
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ulong SteamMasterClanID;
|
||||
#pragma warning restore 649
|
||||
|
||||
#pragma warning disable 649
|
||||
[JsonProperty]
|
||||
internal readonly string SteamTradeToken;
|
||||
@@ -135,9 +130,24 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ETradingPreferences TradingPreferences = ETradingPreferences.None;
|
||||
|
||||
[JsonProperty(PropertyName = GlobalConfig.UlongStringPrefix + nameof(SteamMasterClanID), Required = Required.DisallowNull)]
|
||||
internal string SSteamMasterClanID {
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value) || !ulong.TryParse(value, out ulong result)) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SSteamMasterClanID)));
|
||||
return;
|
||||
}
|
||||
|
||||
SteamMasterClanID = result;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty]
|
||||
internal string SteamLogin { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal ulong SteamMasterClanID { get; private set; }
|
||||
|
||||
[JsonProperty]
|
||||
internal string SteamParentalPIN { get; set; } = "0";
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace ArchiSteamFarm {
|
||||
internal const byte DefaultConnectionTimeout = 60;
|
||||
internal const ushort DefaultIPCPort = 1242;
|
||||
internal const byte DefaultLoginLimiterDelay = 10;
|
||||
internal const string UlongStringPrefix = "_s";
|
||||
|
||||
// This is hardcoded blacklist which should not be possible to change
|
||||
internal static readonly HashSet<uint> GlobalBlacklist = new HashSet<uint> { 267420, 303700, 335590, 368020, 425280, 480730, 566020, 639900 };
|
||||
@@ -100,11 +101,6 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool Statistics = true;
|
||||
|
||||
#pragma warning disable 649
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ulong SteamOwnerID;
|
||||
#pragma warning restore 649
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ProtocolType SteamProtocol = ProtocolType.Tcp;
|
||||
|
||||
@@ -114,6 +110,21 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty]
|
||||
internal string IPCHost { get; set; } = "127.0.0.1";
|
||||
|
||||
[JsonProperty(PropertyName = UlongStringPrefix + nameof(SteamOwnerID), Required = Required.DisallowNull)]
|
||||
internal string SSteamOwnerID {
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value) || !ulong.TryParse(value, out ulong result)) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SSteamOwnerID)));
|
||||
return;
|
||||
}
|
||||
|
||||
SteamOwnerID = result;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal ulong SteamOwnerID { get; private set; }
|
||||
|
||||
// This constructor is used only by deserializer
|
||||
private GlobalConfig() { }
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"AutoRestart": true,
|
||||
"AutoUpdates": true,
|
||||
"Blacklist": [],
|
||||
"ConnectionTimeout": 60,
|
||||
"CurrentCulture": null,
|
||||
"Debug": false,
|
||||
"FarmingDelay": 15,
|
||||
"GiftsLimiterDelay": 1,
|
||||
"Headless": false,
|
||||
"IdleFarmingPeriod": 3,
|
||||
"InventoryLimiterDelay": 3,
|
||||
"IPCHost": "127.0.0.1",
|
||||
"IPCPort": 1242,
|
||||
"LoginLimiterDelay": 10,
|
||||
"MaxFarmingTime": 10,
|
||||
"MaxTradeHoldDuration": 15,
|
||||
"OptimizationMode": 0,
|
||||
"Statistics": true,
|
||||
"SteamOwnerID": 0,
|
||||
"SteamProtocol": 6,
|
||||
"UpdateChannel": 1
|
||||
}
|
||||
"AutoRestart": true,
|
||||
"AutoUpdates": true,
|
||||
"Blacklist": [],
|
||||
"ConnectionTimeout": 60,
|
||||
"CurrentCulture": null,
|
||||
"Debug": false,
|
||||
"FarmingDelay": 15,
|
||||
"GiftsLimiterDelay": 1,
|
||||
"Headless": false,
|
||||
"IdleFarmingPeriod": 3,
|
||||
"InventoryLimiterDelay": 3,
|
||||
"IPCHost": "127.0.0.1",
|
||||
"IPCPort": 1242,
|
||||
"LoginLimiterDelay": 10,
|
||||
"MaxFarmingTime": 10,
|
||||
"MaxTradeHoldDuration": 15,
|
||||
"OptimizationMode": 0,
|
||||
"Statistics": true,
|
||||
"SteamOwnerID": 0,
|
||||
"SteamProtocol": 6,
|
||||
"UpdateChannel": 1
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
{
|
||||
"AcceptGifts": false,
|
||||
"CardDropsRestricted": true,
|
||||
"CustomGamePlayedWhileFarming": null,
|
||||
"CustomGamePlayedWhileIdle": null,
|
||||
"DismissInventoryNotifications": false,
|
||||
"Enabled": false,
|
||||
"FarmingOrder": 0,
|
||||
"FarmOffline": false,
|
||||
"GamesPlayedWhileIdle": [],
|
||||
"HandleOfflineMessages": false,
|
||||
"IsBotAccount": false,
|
||||
"LootableTypes": [
|
||||
1,
|
||||
3,
|
||||
5
|
||||
],
|
||||
"PasswordFormat": 0,
|
||||
"Paused": false,
|
||||
"RedeemingPreferences": 0,
|
||||
"SendOnFarmingFinished": false,
|
||||
"SendTradePeriod": 0,
|
||||
"ShutdownOnFarmingFinished": false,
|
||||
"SteamLogin": null,
|
||||
"SteamMasterClanID": 0,
|
||||
"SteamParentalPIN": "0",
|
||||
"SteamPassword": null,
|
||||
"SteamTradeToken": null,
|
||||
"SteamUserPermissions": {},
|
||||
"TradingPreferences": 0
|
||||
}
|
||||
"AcceptGifts": false,
|
||||
"CardDropsRestricted": true,
|
||||
"CustomGamePlayedWhileFarming": null,
|
||||
"CustomGamePlayedWhileIdle": null,
|
||||
"DismissInventoryNotifications": false,
|
||||
"Enabled": false,
|
||||
"FarmingOrder": 0,
|
||||
"FarmOffline": false,
|
||||
"GamesPlayedWhileIdle": [],
|
||||
"HandleOfflineMessages": false,
|
||||
"IsBotAccount": false,
|
||||
"LootableTypes": [
|
||||
1,
|
||||
3,
|
||||
5
|
||||
],
|
||||
"PasswordFormat": 0,
|
||||
"Paused": false,
|
||||
"RedeemingPreferences": 0,
|
||||
"SendOnFarmingFinished": false,
|
||||
"SendTradePeriod": 0,
|
||||
"ShutdownOnFarmingFinished": false,
|
||||
"SteamLogin": null,
|
||||
"SteamMasterClanID": 0,
|
||||
"SteamParentalPIN": "0",
|
||||
"SteamPassword": null,
|
||||
"SteamTradeToken": null,
|
||||
"SteamUserPermissions": {},
|
||||
"TradingPreferences": 0
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Enabled": false,
|
||||
"SteamLogin": null,
|
||||
"SteamPassword": null
|
||||
}
|
||||
"Enabled": false,
|
||||
"SteamLogin": null,
|
||||
"SteamPassword": null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user