mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-20 08:18:37 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d21cd3452 | ||
|
|
b316224af3 | ||
|
|
c210480231 | ||
|
|
a44d097d4e | ||
|
|
df1e83130d | ||
|
|
2f1b6311ac | ||
|
|
2c1127e57b | ||
|
|
9722059bb0 | ||
|
|
cb077a2c4a | ||
|
|
fb21b225bc |
@@ -43,7 +43,7 @@ namespace ArchiSteamFarm {
|
||||
internal sealed class Bot : IDisposable {
|
||||
private const ushort CallbackSleep = 500; // In miliseconds
|
||||
private const byte FamilySharingInactivityMinutes = 5;
|
||||
private const uint LoginID = 0; // This must be the same for all ASF bots and all ASF processes
|
||||
private const uint LoginID = GlobalConfig.DefaultWCFPort; // This must be the same for all ASF bots and all ASF processes
|
||||
private const ushort MaxSteamMessageLength = 2048;
|
||||
|
||||
internal static readonly ConcurrentDictionary<string, Bot> Bots = new ConcurrentDictionary<string, Bot>();
|
||||
@@ -314,8 +314,13 @@ namespace ArchiSteamFarm {
|
||||
// Normally we wouldn't need to do this, but there is a case where our list might be invalid or outdated
|
||||
// Ensure that we always ask once for list of up-to-date servers, even if we have list saved
|
||||
Program.ArchiLogger.LogGenericInfo("Initializing SteamDirectory...");
|
||||
await SteamDirectory.Initialize(cellID).ConfigureAwait(false);
|
||||
Program.ArchiLogger.LogGenericInfo("Done!");
|
||||
|
||||
try {
|
||||
await SteamDirectory.Initialize(cellID).ConfigureAwait(false);
|
||||
Program.ArchiLogger.LogGenericInfo("Done!");
|
||||
} catch {
|
||||
Program.ArchiLogger.LogGenericWarning("Could not initialize SteamDirectory, connecting with Steam Network might take much longer than usual!");
|
||||
}
|
||||
}
|
||||
|
||||
internal async Task LootIfNeeded() {
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool IsBotAccount = false;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||
internal readonly HashSet<Steam.Item.EType> LootableTypes = new HashSet<Steam.Item.EType> { Steam.Item.EType.BoosterPack, Steam.Item.EType.FoilTradingCard, Steam.Item.EType.TradingCard };
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
|
||||
@@ -35,11 +35,11 @@ namespace ArchiSteamFarm {
|
||||
[SuppressMessage("ReSharper", "ConvertToConstant.Global")]
|
||||
internal sealed class GlobalConfig {
|
||||
internal const byte DefaultHttpTimeout = 60;
|
||||
internal const ushort DefaultWCFPort = 1242;
|
||||
|
||||
private const byte DefaultFarmingDelay = 15;
|
||||
private const byte DefaultMaxFarmingTime = 10;
|
||||
private const ProtocolType DefaultSteamProtocol = ProtocolType.Tcp;
|
||||
private const ushort DefaultWCFPort = 1242;
|
||||
|
||||
// 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 };
|
||||
@@ -50,7 +50,7 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool AutoUpdates = true;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||
internal readonly HashSet<uint> Blacklist = new HashSet<uint>(GlobalBlacklist);
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace ArchiSteamFarm {
|
||||
internal const string ServiceDescription = "ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.";
|
||||
internal const string ServiceName = "ArchiSteamFarm";
|
||||
internal const string StatisticsServer = "asf.justarchi.net";
|
||||
internal const string VersionNumber = "2.2.0.1";
|
||||
internal const string VersionNumber = "2.2.0.3";
|
||||
|
||||
internal static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;
|
||||
}
|
||||
|
||||
@@ -99,6 +99,15 @@ namespace ArchiSteamFarm {
|
||||
result.Append(',');
|
||||
}
|
||||
|
||||
if (timeSpan.Minutes > 0) {
|
||||
result.Append(" " + timeSpan.Minutes + " minute");
|
||||
if (timeSpan.Minutes > 1) {
|
||||
result.Append('s');
|
||||
}
|
||||
|
||||
result.Append(',');
|
||||
}
|
||||
|
||||
if (timeSpan.Seconds > 0) {
|
||||
result.Append(" " + timeSpan.Hours + " second");
|
||||
if (timeSpan.Seconds > 1) {
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace ArchiSteamFarm {
|
||||
// We use SecurityMode.None for Mono compatibility
|
||||
// Yes, also on Windows, for Mono<->Windows communication
|
||||
Security = { Mode = SecurityMode.None },
|
||||
SendTimeout = new TimeSpan(0, 5, 0)
|
||||
SendTimeout = new TimeSpan(0, 0, Program.GlobalConfig.HttpTimeout)
|
||||
},
|
||||
new EndpointAddress(URL)
|
||||
);
|
||||
@@ -126,7 +126,7 @@ namespace ArchiSteamFarm {
|
||||
// We use SecurityMode.None for Mono compatibility
|
||||
// Yes, also on Windows, for Mono<->Windows communication
|
||||
Security = { Mode = SecurityMode.None },
|
||||
SendTimeout = new TimeSpan(0, 5, 0)
|
||||
SendTimeout = new TimeSpan(0, 0, Program.GlobalConfig.HttpTimeout)
|
||||
},
|
||||
string.Empty
|
||||
);
|
||||
|
||||
@@ -78,7 +78,8 @@ namespace ConfigGenerator {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool IsBotAccount { get; set; } = false;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
[Category("\tAdvanced")]
|
||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||
public List<Steam.Item.EType> LootableTypes { get; set; } = new List<Steam.Item.EType> { Steam.Item.EType.BoosterPack, Steam.Item.EType.FoilTradingCard, Steam.Item.EType.TradingCard };
|
||||
|
||||
[Category("\tAccess")]
|
||||
|
||||
@@ -53,8 +53,8 @@ namespace ConfigGenerator {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool AutoUpdates { get; set; } = true;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public List<uint> Blacklist { get; set; } = new List<uint>();
|
||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||
public List<uint> Blacklist { get; set; } = new List<uint>(GlobalBlacklist);
|
||||
|
||||
[Category("\tDebugging")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
@@ -126,7 +126,6 @@ namespace ConfigGenerator {
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
}
|
||||
|
||||
Blacklist.AddRange(GlobalBlacklist);
|
||||
Save();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user