mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-28 04:00:46 +00:00
Compare commits
139 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61f1f25e24 | ||
|
|
1d5c319359 | ||
|
|
372e71dcfd | ||
|
|
2ce5428e94 | ||
|
|
17d999faba | ||
|
|
4842421fbc | ||
|
|
b1fa7d7d56 | ||
|
|
4f994792f8 | ||
|
|
e78412d9f2 | ||
|
|
64d3146ab2 | ||
|
|
a31f734711 | ||
|
|
fc4574d143 | ||
|
|
eb60cd9553 | ||
|
|
bd605abf00 | ||
|
|
53aa032df9 | ||
|
|
716d6a47c1 | ||
|
|
e4f4859eb4 | ||
|
|
0481ba3123 | ||
|
|
52079ec15b | ||
|
|
65e2d97434 | ||
|
|
b2720e112c | ||
|
|
04773c48c1 | ||
|
|
8691050ed7 | ||
|
|
da4a595e58 | ||
|
|
218883c45c | ||
|
|
5253528551 | ||
|
|
c2b47af1cc | ||
|
|
3529c9a6cf | ||
|
|
95efc09463 | ||
|
|
f37f49e97e | ||
|
|
08367648b6 | ||
|
|
a3134e841c | ||
|
|
f70d15b611 | ||
|
|
be530e35da | ||
|
|
c2de92857b | ||
|
|
e5fe508c0d | ||
|
|
b37c1c77f6 | ||
|
|
5a4542bbc1 | ||
|
|
99bd384b2a | ||
|
|
fc1ce23462 | ||
|
|
780d46b01b | ||
|
|
ce0095f6c4 | ||
|
|
747110e48f | ||
|
|
15a62af5bc | ||
|
|
47de0baa5b | ||
|
|
8bc814b8a1 | ||
|
|
1873a93726 | ||
|
|
e68a0c63e8 | ||
|
|
7338361fed | ||
|
|
c8ca85387f | ||
|
|
4363be199c | ||
|
|
78d87395d8 | ||
|
|
76b3453eff | ||
|
|
bea517d437 | ||
|
|
5022d716d5 | ||
|
|
e7c80af31e | ||
|
|
2422c97a37 | ||
|
|
a3f8026beb | ||
|
|
07d0d94660 | ||
|
|
9a3973cb24 | ||
|
|
adbbe0b6d8 | ||
|
|
8937295020 | ||
|
|
ecd028477f | ||
|
|
51a7eeca13 | ||
|
|
8fbc49073f | ||
|
|
c22740aaab | ||
|
|
b169f570dd | ||
|
|
fd41cf735f | ||
|
|
41460f93ea | ||
|
|
66ac79feaa | ||
|
|
a1202dc91b | ||
|
|
7f455fd334 | ||
|
|
6d38000c72 | ||
|
|
2b3a9e127b | ||
|
|
c101a9c7b1 | ||
|
|
13b2e76461 | ||
|
|
a8903d0e1b | ||
|
|
f39b075f6c | ||
|
|
222ffcc84a | ||
|
|
9c3b5b4171 | ||
|
|
3ded3a6918 | ||
|
|
3e158318d5 | ||
|
|
c472722dcf | ||
|
|
3905ec1663 | ||
|
|
3d77559986 | ||
|
|
acb33371f7 | ||
|
|
a3b6b0df3e | ||
|
|
ddf2002b5d | ||
|
|
a921ddabf1 | ||
|
|
7abd9afc34 | ||
|
|
51a200f313 | ||
|
|
fdfb204114 | ||
|
|
fdb0065fda | ||
|
|
807eceeb94 | ||
|
|
893667a85f | ||
|
|
67bc6331fa | ||
|
|
23993c7e5f | ||
|
|
d9dda4888b | ||
|
|
f2d56ec663 | ||
|
|
6f80a884ce | ||
|
|
a1b4b4d1b0 | ||
|
|
fe959c28f8 | ||
|
|
e032e8c65f | ||
|
|
7d054fbe47 | ||
|
|
c2af8a672c | ||
|
|
1419ccabf7 | ||
|
|
5dffe115a9 | ||
|
|
2bff46dd1d | ||
|
|
da70c0a9d3 | ||
|
|
bf0a8f34f9 | ||
|
|
02409fc66b | ||
|
|
1a83b95c30 | ||
|
|
3dc05d2f55 | ||
|
|
cd590872b9 | ||
|
|
75e9162bcd | ||
|
|
77f532d687 | ||
|
|
b228f8f31f | ||
|
|
7c394fcebd | ||
|
|
77f08760f0 | ||
|
|
b3768ea607 | ||
|
|
ba7fa4a2a1 | ||
|
|
b638e4a38a | ||
|
|
d13af74d38 | ||
|
|
44f8a04f3c | ||
|
|
acd5887b1b | ||
|
|
760068fe91 | ||
|
|
c48f05f5cc | ||
|
|
ca7707280d | ||
|
|
3ca4b2d925 | ||
|
|
80b5d54e0b | ||
|
|
9c30503b27 | ||
|
|
8103e4d6d9 | ||
|
|
bd0116aa59 | ||
|
|
a3c5e8ab0c | ||
|
|
b5e33ec38e | ||
|
|
9775f07644 | ||
|
|
7ddac87541 | ||
|
|
bc66adbf96 | ||
|
|
a3da884205 |
@@ -37,15 +37,21 @@ namespace ArchiSteamFarm {
|
||||
internal static class ASF {
|
||||
private const byte AutoUpdatePeriodInHours = 24;
|
||||
|
||||
internal static readonly ArchiLogger ArchiLogger = new ArchiLogger(SharedInfo.ASF);
|
||||
|
||||
private static readonly ConcurrentDictionary<Bot, DateTime> LastWriteTimes = new ConcurrentDictionary<Bot, DateTime>();
|
||||
|
||||
private static Timer AutoUpdatesTimer;
|
||||
private static FileSystemWatcher FileSystemWatcher;
|
||||
|
||||
internal static async Task CheckForUpdate(bool updateOverride = false) {
|
||||
if (Debugging.IsDebugBuild && !updateOverride) {
|
||||
return;
|
||||
}
|
||||
|
||||
string exeFile = Assembly.GetEntryAssembly().Location;
|
||||
if (string.IsNullOrEmpty(exeFile)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(exeFile));
|
||||
ArchiLogger.LogNullError(nameof(exeFile));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,8 +65,8 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
File.Delete(oldExeFile);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
|
||||
ArchiLogger.LogGenericException(e);
|
||||
ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +82,7 @@ namespace ArchiSteamFarm {
|
||||
TimeSpan.FromHours(AutoUpdatePeriodInHours) // Period
|
||||
);
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.AutoUpdateCheckInfo, AutoUpdatePeriodInHours));
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.AutoUpdateCheckInfo, AutoUpdatePeriodInHours));
|
||||
}
|
||||
|
||||
string releaseURL = SharedInfo.GithubReleaseURL;
|
||||
@@ -84,20 +90,20 @@ namespace ArchiSteamFarm {
|
||||
releaseURL += "/latest";
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.UpdateCheckingNewVersion);
|
||||
ArchiLogger.LogGenericInfo(Strings.UpdateCheckingNewVersion);
|
||||
|
||||
GitHub.ReleaseResponse releaseResponse;
|
||||
|
||||
if (Program.GlobalConfig.UpdateChannel == GlobalConfig.EUpdateChannel.Stable) {
|
||||
releaseResponse = await Program.WebBrowser.UrlGetToJsonResultRetry<GitHub.ReleaseResponse>(releaseURL).ConfigureAwait(false);
|
||||
if (releaseResponse == null) {
|
||||
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
List<GitHub.ReleaseResponse> releases = await Program.WebBrowser.UrlGetToJsonResultRetry<List<GitHub.ReleaseResponse>>(releaseURL).ConfigureAwait(false);
|
||||
if ((releases == null) || (releases.Count == 0)) {
|
||||
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,32 +111,32 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(releaseResponse.Tag)) {
|
||||
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
|
||||
return;
|
||||
}
|
||||
|
||||
Version newVersion = new Version(releaseResponse.Tag);
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.UpdateVersionInfo, SharedInfo.Version, newVersion));
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.UpdateVersionInfo, SharedInfo.Version, newVersion));
|
||||
|
||||
if (SharedInfo.Version.CompareTo(newVersion) >= 0) { // If local version is the same or newer than remote version
|
||||
return;
|
||||
}
|
||||
|
||||
if (!updateOverride && !Program.GlobalConfig.AutoUpdates) {
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.UpdateNewVersionAvailable);
|
||||
ArchiLogger.LogGenericInfo(Strings.UpdateNewVersionAvailable);
|
||||
await Task.Delay(5000).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (File.Exists(oldExeFile)) {
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
|
||||
ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
|
||||
return;
|
||||
}
|
||||
|
||||
// Auto update logic starts here
|
||||
if (releaseResponse.Assets == null) {
|
||||
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssets);
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssets);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,16 +144,16 @@ namespace ArchiSteamFarm {
|
||||
GitHub.ReleaseResponse.Asset binaryAsset = releaseResponse.Assets.FirstOrDefault(asset => !string.IsNullOrEmpty(asset.Name) && asset.Name.Equals(exeFileName, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (binaryAsset == null) {
|
||||
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssetForThisBinary);
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssetForThisBinary);
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(binaryAsset.DownloadURL)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(binaryAsset.DownloadURL));
|
||||
ArchiLogger.LogNullError(nameof(binaryAsset.DownloadURL));
|
||||
return;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.UpdateDownloadingNewVersion);
|
||||
ArchiLogger.LogGenericInfo(Strings.UpdateDownloadingNewVersion);
|
||||
|
||||
byte[] result = await Program.WebBrowser.UrlGetToBytesRetry(binaryAsset.DownloadURL).ConfigureAwait(false);
|
||||
if (result == null) {
|
||||
@@ -160,7 +166,7 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
File.WriteAllBytes(newExeFile, result);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ArchiLogger.LogGenericException(e);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -168,7 +174,7 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
File.Move(exeFile, oldExeFile);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ArchiLogger.LogGenericException(e);
|
||||
try {
|
||||
// Cleanup
|
||||
File.Delete(newExeFile);
|
||||
@@ -182,7 +188,7 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
File.Move(newExeFile, exeFile);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ArchiLogger.LogGenericException(e);
|
||||
try {
|
||||
// Cleanup
|
||||
File.Move(oldExeFile, exeFile);
|
||||
@@ -193,7 +199,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.UpdateFinished);
|
||||
ArchiLogger.LogGenericInfo(Strings.UpdateFinished);
|
||||
await RestartOrExit().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -217,7 +223,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (Bot.Bots.Count == 0) {
|
||||
Program.ArchiLogger.LogGenericWarning(Strings.ErrorNoBotsDefined);
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorNoBotsDefined);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +246,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static async Task CreateBot(string botName) {
|
||||
if (string.IsNullOrEmpty(botName)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(botName));
|
||||
ArchiLogger.LogNullError(nameof(botName));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -260,7 +266,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static async void OnChanged(object sender, FileSystemEventArgs e) {
|
||||
if ((sender == null) || (e == null)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -270,7 +276,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (botName.Equals(SharedInfo.ASF)) {
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.GlobalConfigChanged);
|
||||
ArchiLogger.LogGenericInfo(Strings.GlobalConfigChanged);
|
||||
await RestartOrExit().ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
@@ -312,7 +318,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static void OnCreated(object sender, FileSystemEventArgs e) {
|
||||
if ((sender == null) || (e == null)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,7 +332,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static void OnDeleted(object sender, FileSystemEventArgs e) {
|
||||
if ((sender == null) || (e == null)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -336,7 +342,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (botName.Equals(SharedInfo.ASF)) {
|
||||
Program.ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
|
||||
ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
|
||||
Program.Exit(1);
|
||||
return;
|
||||
}
|
||||
@@ -349,7 +355,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static void OnRenamed(object sender, RenamedEventArgs e) {
|
||||
if ((sender == null) || (e == null)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -359,7 +365,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (oldBotName.Equals(SharedInfo.ASF)) {
|
||||
Program.ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
|
||||
ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
|
||||
Program.Exit(1);
|
||||
return;
|
||||
}
|
||||
@@ -379,11 +385,11 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static async Task RestartOrExit() {
|
||||
if (Program.GlobalConfig.AutoRestart) {
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.Restarting);
|
||||
ArchiLogger.LogGenericInfo(Strings.Restarting);
|
||||
await Task.Delay(5000).ConfigureAwait(false);
|
||||
Program.Restart();
|
||||
} else {
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.Exiting);
|
||||
ArchiLogger.LogGenericInfo(Strings.Exiting);
|
||||
await Task.Delay(5000).ConfigureAwait(false);
|
||||
Program.Exit();
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayGames(new List<uint> { gameID }, gameName);
|
||||
PlayGames(gameID.ToEnumerable(), gameName);
|
||||
}
|
||||
|
||||
internal void PlayGames(IEnumerable<uint> gameIDs, string gameName = null) {
|
||||
@@ -395,13 +395,14 @@ namespace ArchiSteamFarm {
|
||||
PurchaseResult = (EPurchaseResult) msg.purchase_result_details;
|
||||
|
||||
if (msg.purchase_receipt_info == null) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(msg.purchase_receipt_info));
|
||||
return;
|
||||
}
|
||||
|
||||
KeyValue receiptInfo = new KeyValue();
|
||||
using (MemoryStream ms = new MemoryStream(msg.purchase_receipt_info)) {
|
||||
if (!receiptInfo.TryReadAsBinary(ms)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(ms));
|
||||
ASF.ArchiLogger.LogNullError(nameof(ms));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -415,22 +416,24 @@ namespace ArchiSteamFarm {
|
||||
foreach (KeyValue lineItem in lineItems) {
|
||||
uint packageID = lineItem["PackageID"].AsUnsignedInteger();
|
||||
if (packageID == 0) {
|
||||
// Valid, coupons have PackageID of -1 (don't ask me why)
|
||||
// Coupons have PackageID of -1 (don't ask me why)
|
||||
// We'll use ItemAppID in this case
|
||||
packageID = lineItem["ItemAppID"].AsUnsignedInteger();
|
||||
if (packageID == 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(packageID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(packageID));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string gameName = lineItem["ItemDescription"].Value;
|
||||
if (string.IsNullOrEmpty(gameName)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(gameName));
|
||||
ASF.ArchiLogger.LogNullError(nameof(gameName));
|
||||
return;
|
||||
}
|
||||
|
||||
gameName = WebUtility.HtmlDecode(gameName); // Apparently steam expects client to decode sent HTML
|
||||
Items[packageID] = WebUtility.HtmlDecode(gameName);
|
||||
// Apparently steam expects client to decode sent HTML
|
||||
gameName = WebUtility.HtmlDecode(gameName);
|
||||
Items[packageID] = gameName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SteamKit2, Version=1.8.0.26737, Culture=neutral, PublicKeyToken=ed3ce47ed5aad940, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamKit2.1.8.0\lib\net45\SteamKit2.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>lib\SteamKit2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
@@ -144,6 +144,7 @@
|
||||
<Compile Include="SharedInfo.cs" />
|
||||
<Compile Include="Statistics.cs" />
|
||||
<Compile Include="SteamSaleEvent.cs" />
|
||||
<Compile Include="SteamTarget.cs" />
|
||||
<Compile Include="Trading.cs" />
|
||||
<Compile Include="Utilities.cs" />
|
||||
<Compile Include="WCF.cs" />
|
||||
|
||||
@@ -1142,7 +1142,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static uint GetAppIDFromMarketHashName(string hashName) {
|
||||
if (string.IsNullOrEmpty(hashName)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(hashName));
|
||||
ASF.ArchiLogger.LogNullError(nameof(hashName));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1157,7 +1157,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static Steam.Item.EType GetItemType(string name) {
|
||||
if (string.IsNullOrEmpty(name)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(name));
|
||||
ASF.ArchiLogger.LogNullError(nameof(name));
|
||||
return Steam.Item.EType.Unknown;
|
||||
}
|
||||
|
||||
@@ -1194,32 +1194,32 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static bool ParseItems(Dictionary<ulong, Tuple<uint, Steam.Item.EType>> descriptions, List<KeyValue> input, HashSet<Steam.Item> output) {
|
||||
if ((descriptions == null) || (input == null) || (input.Count == 0) || (output == null)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
|
||||
ASF.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (KeyValue item in input) {
|
||||
uint appID = item["appid"].AsUnsignedInteger();
|
||||
if (appID == 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(appID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(appID));
|
||||
return false;
|
||||
}
|
||||
|
||||
ulong contextID = item["contextid"].AsUnsignedLong();
|
||||
if (contextID == 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(contextID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(contextID));
|
||||
return false;
|
||||
}
|
||||
|
||||
ulong classID = item["classid"].AsUnsignedLong();
|
||||
if (classID == 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(classID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(classID));
|
||||
return false;
|
||||
}
|
||||
|
||||
uint amount = item["amount"].AsUnsignedInteger();
|
||||
if (amount == 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(amount));
|
||||
ASF.ArchiLogger.LogNullError(nameof(amount));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -124,7 +124,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static BotConfig Load(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(filePath));
|
||||
ASF.ArchiLogger.LogNullError(nameof(filePath));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -137,12 +137,12 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
botConfig = JsonConvert.DeserializeObject<BotConfig>(File.ReadAllText(filePath));
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (botConfig == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(botConfig));
|
||||
ASF.ArchiLogger.LogNullError(nameof(botConfig));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace ArchiSteamFarm {
|
||||
return botConfig;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningTooManyGamesToPlay, ArchiHandler.MaxGamesPlayedConcurrently, nameof(botConfig.GamesPlayedWhileIdle)));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningTooManyGamesToPlay, ArchiHandler.MaxGamesPlayedConcurrently, nameof(botConfig.GamesPlayedWhileIdle)));
|
||||
|
||||
HashSet<uint> validGames = new HashSet<uint>(botConfig.GamesPlayedWhileIdle.Take(ArchiHandler.MaxGamesPlayedConcurrently));
|
||||
botConfig.GamesPlayedWhileIdle.IntersectWith(validGames);
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static BotDatabase Load(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(filePath));
|
||||
ASF.ArchiLogger.LogNullError(nameof(filePath));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -95,12 +95,12 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(File.ReadAllText(filePath));
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (botDatabase == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(botDatabase));
|
||||
ASF.ArchiLogger.LogNullError(nameof(botDatabase));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace ArchiSteamFarm {
|
||||
internal void Save() {
|
||||
string json = JsonConvert.SerializeObject(this);
|
||||
if (string.IsNullOrEmpty(json)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(json));
|
||||
ASF.ArchiLogger.LogNullError(nameof(json));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace ArchiSteamFarm {
|
||||
File.WriteAllText(FilePath, json);
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ArchiSteamFarm.CMsgs {
|
||||
|
||||
void ISteamSerializable.Deserialize(Stream stream) {
|
||||
if (stream == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(stream));
|
||||
ASF.ArchiLogger.LogNullError(nameof(stream));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace ArchiSteamFarm.CMsgs {
|
||||
|
||||
void ISteamSerializable.Serialize(Stream stream) {
|
||||
if (stream == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(stream));
|
||||
ASF.ArchiLogger.LogNullError(nameof(stream));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
HashSet<Task> extraTasks = new HashSet<Task>();
|
||||
HashSet<Task> backgroundTasks = new HashSet<Task>();
|
||||
|
||||
foreach (HtmlNode htmlNode in htmlNodes) {
|
||||
HtmlNode appIDNode = htmlNode.SelectSingleNode(".//div[@class='card_drop_info_dialog']");
|
||||
@@ -488,12 +488,22 @@ namespace ArchiSteamFarm {
|
||||
if (cardsRemaining > 0) {
|
||||
GamesToFarm.Add(new Game(appID, name, hours, cardsRemaining));
|
||||
} else {
|
||||
extraTasks.Add(CheckGame(appID, name, hours));
|
||||
Task task = CheckGame(appID, name, hours);
|
||||
switch (Program.GlobalConfig.OptimizationMode) {
|
||||
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
|
||||
await task.ConfigureAwait(false);
|
||||
break;
|
||||
default:
|
||||
backgroundTasks.Add(task);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we have any pending tasks, wait for them
|
||||
await Task.WhenAll(extraTasks).ConfigureAwait(false);
|
||||
// If we have any background tasks, wait for them
|
||||
if (backgroundTasks.Count > 0) {
|
||||
await Task.WhenAll(backgroundTasks).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task CheckPage(byte page) {
|
||||
@@ -689,18 +699,43 @@ namespace ArchiSteamFarm {
|
||||
|
||||
GamesToFarm.ClearAndTrim();
|
||||
|
||||
List<Task> tasks = new List<Task>(maxPages - 1) { CheckPage(htmlDocument) };
|
||||
List<Task> backgroundTasks = new List<Task>();
|
||||
Task task = CheckPage(htmlDocument);
|
||||
|
||||
switch (Program.GlobalConfig.OptimizationMode) {
|
||||
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
|
||||
await task.ConfigureAwait(false);
|
||||
break;
|
||||
default:
|
||||
backgroundTasks.Add(task);
|
||||
break;
|
||||
}
|
||||
|
||||
if (maxPages > 1) {
|
||||
Bot.ArchiLogger.LogGenericInfo(Strings.CheckingOtherBadgePages);
|
||||
|
||||
for (byte page = 2; page <= maxPages; page++) {
|
||||
byte currentPage = page; // We need a copy of variable being passed when in for loops, as loop will proceed before task is launched
|
||||
tasks.Add(CheckPage(currentPage));
|
||||
switch (Program.GlobalConfig.OptimizationMode) {
|
||||
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
|
||||
for (byte page = 2; page <= maxPages; page++) {
|
||||
await CheckPage(page).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
for (byte page = 2; page <= maxPages; page++) {
|
||||
// We need a copy of variable being passed when in for loops, as loop will proceed before our task is launched
|
||||
byte currentPage = page;
|
||||
backgroundTasks.Add(CheckPage(currentPage));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
if (backgroundTasks.Count > 0) {
|
||||
await Task.WhenAll(backgroundTasks).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
SortGamesToFarm();
|
||||
return GamesToFarm.Count > 0;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static string Decrypt(ECryptoMethod cryptoMethod, string encrypted) {
|
||||
if (string.IsNullOrEmpty(encrypted)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(encrypted));
|
||||
ASF.ArchiLogger.LogNullError(nameof(encrypted));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static string Encrypt(ECryptoMethod cryptoMethod, string decrypted) {
|
||||
if (string.IsNullOrEmpty(decrypted)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(decrypted));
|
||||
ASF.ArchiLogger.LogNullError(nameof(decrypted));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static void SetEncryptionKey(string key) {
|
||||
if (string.IsNullOrEmpty(key)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(key));
|
||||
ASF.ArchiLogger.LogNullError(nameof(key));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static string DecryptAES(string encrypted) {
|
||||
if (string.IsNullOrEmpty(encrypted)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(encrypted));
|
||||
ASF.ArchiLogger.LogNullError(nameof(encrypted));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -91,14 +91,14 @@ namespace ArchiSteamFarm {
|
||||
decryptedData = SteamKit2.CryptoHelper.SymmetricDecrypt(decryptedData, key);
|
||||
return Encoding.UTF8.GetString(decryptedData);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static string DecryptProtectedDataForCurrentUser(string encrypted) {
|
||||
if (string.IsNullOrEmpty(encrypted)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(encrypted));
|
||||
ASF.ArchiLogger.LogNullError(nameof(encrypted));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -111,14 +111,14 @@ namespace ArchiSteamFarm {
|
||||
|
||||
return Encoding.UTF8.GetString(decryptedData);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static string EncryptAES(string decrypted) {
|
||||
if (string.IsNullOrEmpty(decrypted)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(decrypted));
|
||||
ASF.ArchiLogger.LogNullError(nameof(decrypted));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -132,14 +132,14 @@ namespace ArchiSteamFarm {
|
||||
encryptedData = SteamKit2.CryptoHelper.SymmetricEncrypt(encryptedData, key);
|
||||
return Convert.ToBase64String(encryptedData);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static string EncryptProtectedDataForCurrentUser(string decrypted) {
|
||||
if (string.IsNullOrEmpty(decrypted)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(decrypted));
|
||||
ASF.ArchiLogger.LogNullError(nameof(decrypted));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
return Convert.ToBase64String(encryptedData);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,11 +38,11 @@ namespace ArchiSteamFarm {
|
||||
internal sealed class DebugListener : IDebugListener {
|
||||
public void WriteLine(string category, string msg) {
|
||||
if (string.IsNullOrEmpty(category) && string.IsNullOrEmpty(msg)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(category) + " && " + nameof(msg));
|
||||
ASF.ArchiLogger.LogNullError(nameof(category) + " && " + nameof(msg));
|
||||
return;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericDebug(category + " | " + msg);
|
||||
ASF.ArchiLogger.LogGenericDebug(category + " | " + msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.NoBotsAreRunning);
|
||||
ASF.ArchiLogger.LogGenericInfo(Strings.NoBotsAreRunning);
|
||||
await Task.Delay(5000).ConfigureAwait(false);
|
||||
Program.Exit();
|
||||
}
|
||||
|
||||
@@ -87,6 +87,9 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly byte MaxTradeHoldDuration = 15;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly EOptimizationMode OptimizationMode = EOptimizationMode.MaxPerformance;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly bool Statistics = true;
|
||||
|
||||
@@ -110,7 +113,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static GlobalConfig Load(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(filePath));
|
||||
ASF.ArchiLogger.LogNullError(nameof(filePath));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -123,12 +126,12 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
globalConfig = JsonConvert.DeserializeObject<GlobalConfig>(File.ReadAllText(filePath));
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (globalConfig == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(globalConfig));
|
||||
ASF.ArchiLogger.LogNullError(nameof(globalConfig));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -139,24 +142,24 @@ namespace ArchiSteamFarm {
|
||||
case ProtocolType.Udp:
|
||||
break;
|
||||
default:
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.SteamProtocol), globalConfig.SteamProtocol));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.SteamProtocol), globalConfig.SteamProtocol));
|
||||
return null;
|
||||
}
|
||||
|
||||
// User might not know what he's doing
|
||||
// Ensure that he can't screw core ASF variables
|
||||
if (globalConfig.MaxFarmingTime == 0) {
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.MaxFarmingTime), globalConfig.MaxFarmingTime));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.MaxFarmingTime), globalConfig.MaxFarmingTime));
|
||||
return null;
|
||||
}
|
||||
|
||||
if (globalConfig.FarmingDelay == 0) {
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.FarmingDelay), globalConfig.FarmingDelay));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.FarmingDelay), globalConfig.FarmingDelay));
|
||||
return null;
|
||||
}
|
||||
|
||||
if (globalConfig.ConnectionTimeout == 0) {
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.ConnectionTimeout), globalConfig.ConnectionTimeout));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.ConnectionTimeout), globalConfig.ConnectionTimeout));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -164,10 +167,15 @@ namespace ArchiSteamFarm {
|
||||
return globalConfig;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.WCFPort), globalConfig.WCFPort));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.WCFPort), globalConfig.WCFPort));
|
||||
return null;
|
||||
}
|
||||
|
||||
internal enum EOptimizationMode : byte {
|
||||
MaxPerformance,
|
||||
MinMemoryUsage
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
internal enum EUpdateChannel : byte {
|
||||
None,
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static GlobalDatabase Load(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(filePath));
|
||||
ASF.ArchiLogger.LogNullError(nameof(filePath));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -97,12 +97,12 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
globalDatabase = JsonConvert.DeserializeObject<GlobalDatabase>(File.ReadAllText(filePath), CustomSerializerSettings);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (globalDatabase == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(globalDatabase));
|
||||
ASF.ArchiLogger.LogNullError(nameof(globalDatabase));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace ArchiSteamFarm {
|
||||
private void Save() {
|
||||
string json = JsonConvert.SerializeObject(this, CustomSerializerSettings);
|
||||
if (string.IsNullOrEmpty(json)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(json));
|
||||
ASF.ArchiLogger.LogNullError(nameof(json));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace ArchiSteamFarm {
|
||||
File.WriteAllText(FilePath, json);
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
public Task UpdateServerListAsync(IEnumerable<IPEndPoint> endPoints) {
|
||||
if (endPoints == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(endPoints));
|
||||
ASF.ArchiLogger.LogNullError(nameof(endPoints));
|
||||
return Task.Delay(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,25 +67,25 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
HtmlNode htmlNode = HtmlDocument.DocumentNode.SelectSingleNode("//div[@class='tradeoffer']");
|
||||
if (htmlNode == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(htmlNode));
|
||||
ASF.ArchiLogger.LogNullError(nameof(htmlNode));
|
||||
return 0;
|
||||
}
|
||||
|
||||
string id = htmlNode.GetAttributeValue("id", null);
|
||||
if (string.IsNullOrEmpty(id)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(id));
|
||||
ASF.ArchiLogger.LogNullError(nameof(id));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int index = id.IndexOf('_');
|
||||
if (index < 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(index));
|
||||
ASF.ArchiLogger.LogNullError(nameof(index));
|
||||
return 0;
|
||||
}
|
||||
|
||||
index++;
|
||||
if (id.Length <= index) {
|
||||
Program.ArchiLogger.LogNullError(nameof(id.Length));
|
||||
ASF.ArchiLogger.LogNullError(nameof(id.Length));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
return _TradeOfferID;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogNullError(nameof(_TradeOfferID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(_TradeOfferID));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -131,13 +131,13 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
HtmlNode htmlNode = HtmlDocument.DocumentNode.SelectSingleNode("//a/@data-miniprofile");
|
||||
if (htmlNode == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(htmlNode));
|
||||
ASF.ArchiLogger.LogNullError(nameof(htmlNode));
|
||||
return 0;
|
||||
}
|
||||
|
||||
string miniProfile = htmlNode.GetAttributeValue("data-miniprofile", null);
|
||||
if (string.IsNullOrEmpty(miniProfile)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(miniProfile));
|
||||
ASF.ArchiLogger.LogNullError(nameof(miniProfile));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
return _OtherSteamID3;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogNullError(nameof(_OtherSteamID3));
|
||||
ASF.ArchiLogger.LogNullError(nameof(_OtherSteamID3));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -182,7 +182,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
set {
|
||||
if (value == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(value));
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -237,13 +237,13 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(value));
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
return;
|
||||
}
|
||||
|
||||
uint amount;
|
||||
if (!uint.TryParse(value, out amount) || (amount == 0)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(amount));
|
||||
ASF.ArchiLogger.LogNullError(nameof(amount));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -258,13 +258,13 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(value));
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
return;
|
||||
}
|
||||
|
||||
uint appID;
|
||||
if (!uint.TryParse(value, out appID) || (appID == 0)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(appID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(appID));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -278,13 +278,13 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(value));
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
return;
|
||||
}
|
||||
|
||||
ulong assetID;
|
||||
if (!ulong.TryParse(value, out assetID) || (assetID == 0)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(assetID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(assetID));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(value));
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(value));
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
return;
|
||||
}
|
||||
|
||||
ulong contextID;
|
||||
if (!ulong.TryParse(value, out contextID) || (contextID == 0)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(contextID));
|
||||
ASF.ArchiLogger.LogNullError(nameof(contextID));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
}
|
||||
|
||||
if (OtherSteamID3 == 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(OtherSteamID3));
|
||||
ASF.ArchiLogger.LogNullError(nameof(OtherSteamID3));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
3
ArchiSteamFarm/Localization/README.md
Normal file
3
ArchiSteamFarm/Localization/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
This directory contains ASF strings for display and localization purposes.
|
||||
|
||||
All strings used by ASF can be found in main ```Strings.resx``` file, and that's also the only file that should be modified - all other files are managed automatically and should not be touched. Please visit **[localization](https://github.com/JustArchi/ArchiSteamFarm/wiki/Localization)** section on the wiki if you want to improve translation of other files.
|
||||
@@ -333,7 +333,10 @@ Trazo de pila:
|
||||
<value><{0}>, Introduzca su host de WCF: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
|
||||
<data name="WarningUnknownValuePleaseReport" xml:space="preserve">
|
||||
<value>Recibido valor desconocido para {0}. Por favor, informa de ello: {1}</value>
|
||||
<comment>{0} will be replaced by object's name, {1} will be replaced by value for that object</comment>
|
||||
</data>
|
||||
<data name="WarningTooManyGamesToPlay" xml:space="preserve">
|
||||
<value>¡Ejecutar más de {0} juegos a la vez no es posible, sólo se usarán las primeras {0} entradas de {1}!</value>
|
||||
<comment>{0} will be replaced by max number of games, {1} will be replaced by name of the configuration property</comment>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<comment>{0} will be replaced by trade number</comment>
|
||||
</data>
|
||||
<data name="AutoUpdateCheckInfo" xml:space="preserve">
|
||||
<value>ASF checkt automatisch voor een nieuwe versie elke {0} uur.</value>
|
||||
<value>ASF controleert automatisch voor een nieuwe versie om de {0} uren.</value>
|
||||
<comment>{0} will be replaced by number of hours</comment>
|
||||
</data>
|
||||
<data name="Content" xml:space="preserve">
|
||||
@@ -147,7 +147,7 @@ StackTrace:
|
||||
<value>Afsluiten met een niet-nulzijnde foutcode!</value>
|
||||
</data>
|
||||
<data name="ErrorFailingRequest" xml:space="preserve">
|
||||
<value>Verzoek fout: {0}</value>
|
||||
<value>Vezoek mislukt: {0}</value>
|
||||
<comment>{0} will be replaced by URL of the request</comment>
|
||||
</data>
|
||||
<data name="ErrorGlobalConfigNotLoaded" xml:space="preserve">
|
||||
@@ -173,7 +173,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by object's name</comment>
|
||||
</data>
|
||||
<data name="ErrorRemovingOldBinary" xml:space="preserve">
|
||||
<value>Kon de oude ASF binary niet verwijderen, verwijder deze alsjeblieft {0} handmatig zodat de update-functie werkt!</value>
|
||||
<value>Kan niet de oude ASF binary verwijderen, verwijder alsjeblieft {0} handmatig zodat de update-functie werkt!</value>
|
||||
<comment>{0} will be replaced by file's path</comment>
|
||||
</data>
|
||||
<data name="ErrorRequestFailedTooManyTimes" xml:space="preserve">
|
||||
@@ -187,13 +187,13 @@ StackTrace:
|
||||
<value>Kan niet verdergaan met update omdat er geen bezit is dat gerelateerd is aan de momenteel actieve binary! Controleer of de ASF Binary de juiste naam heeft!</value>
|
||||
</data>
|
||||
<data name="ErrorUpdateNoAssets" xml:space="preserve">
|
||||
<value>Kan niet verdergaan met update omdat die versie geen alle bestanden omvat!</value>
|
||||
<value>Kan niet verdergaan met update omdat deze versie niet alle bestanden omvat!</value>
|
||||
</data>
|
||||
<data name="ErrorUserInputRunningInHeadlessMode" xml:space="preserve">
|
||||
<value>Aanvraag voor gebruikersinvoer gekregen, maar het proces draait momenteel in headless mode!</value>
|
||||
</data>
|
||||
<data name="ErrorWCFAccessDenied" xml:space="preserve">
|
||||
<value>Het verzoek wordt niet in behandeling genomen omdat het SteamOwnerID niet is ingesteld!</value>
|
||||
<value>Het verzoek wordt niet in behandeling genomen omdat SteamOwnerID niet is ingesteld!</value>
|
||||
<comment>SteamOwnerID is name of bot config property, it should not be translated</comment>
|
||||
</data>
|
||||
<data name="Exiting" xml:space="preserve">
|
||||
@@ -209,7 +209,7 @@ StackTrace:
|
||||
<value>Globale configuratie bestand is verwijderd!</value>
|
||||
</data>
|
||||
<data name="IgnoringTrade" xml:space="preserve">
|
||||
<value>Trade negeren: {0}</value>
|
||||
<value>Trade wordt genegeerd: {0}</value>
|
||||
<comment>{0} will be replaced by trade number</comment>
|
||||
</data>
|
||||
<data name="LoggingIn" xml:space="preserve">
|
||||
@@ -230,7 +230,7 @@ StackTrace:
|
||||
<value>Herstarten...</value>
|
||||
</data>
|
||||
<data name="WarningRuntimeUnsupported" xml:space="preserve">
|
||||
<value>ASF heeft een niet ondersteunde runtime versie gedetecteerd, het programma kan NIET correct worden uitgevoerd in de huidige omgeving. Je voert dit met je eigen risico uit zonder ondersteuning!</value>
|
||||
<value>ASF heeft een niet ondersteunde runtime versie gedetecteerd, het programma kan mogelijk NIET correct worden uitgevoerd in de huidige omgeving. Je voert dit met je eigen risico uit zonder ondersteuning!</value>
|
||||
</data>
|
||||
<data name="RuntimeVersionComparison" xml:space="preserve">
|
||||
<value>Benodigde versie: {0} | Gevonden versie: {1}</value>
|
||||
@@ -289,40 +289,40 @@ StackTrace:
|
||||
<value>Controleren op nieuwe versie...</value>
|
||||
</data>
|
||||
<data name="UpdateDownloadingNewVersion" xml:space="preserve">
|
||||
<value>Nieuwe versie wordt gedownload.... Terwijl je aan het wachten bent, wij waarderen het heel veel als je doneert</value>
|
||||
<value>Nieuwe versie wordt gedownloadt.... Terwijl je aan het wachten bent, het wordt heel veel gewaardeerd als je een donatie geeft</value>
|
||||
</data>
|
||||
<data name="UpdateFinished" xml:space="preserve">
|
||||
<value>Update proces compleet!</value>
|
||||
<value>Bijwerken afgerond!</value>
|
||||
</data>
|
||||
<data name="UpdateNewVersionAvailable" xml:space="preserve">
|
||||
<value>Nieuwe ASF versie beschikbaar! Overweeg om zelf te updaten!</value>
|
||||
<value>Nieuwe ASF versie beschikbaar! Overweeg om handmatig bij te werken!</value>
|
||||
</data>
|
||||
<data name="UpdateVersionInfo" xml:space="preserve">
|
||||
<value>Lokale versie: {0} | Externe versie: {1}</value>
|
||||
<comment>{0} will be replaced by current version, {1} will be replaced by remote version</comment>
|
||||
</data>
|
||||
<data name="UserInputDeviceID" xml:space="preserve">
|
||||
<value><{0}> Vul alsjeblieft je Device ID in (inclusief "android:"): </value>
|
||||
<value><{0}> Vul je Device ID in (inclusief "android:"): </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputSteam2FA" xml:space="preserve">
|
||||
<value><{0}> Vul alsjeblieft je 2FA code in van je Steam authenticatie app: </value>
|
||||
<value><{0}> Vul je 2FA code in van je Steam authenticatie app: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputSteamGuard" xml:space="preserve">
|
||||
<value><{0}> Vul alsjeblieft de SteamGuard authenticatiecode in die naar je e-mail gestuurd is: </value>
|
||||
<value><{0}> Vul de SteamGuard authenticatiecode in die naar je e-mail gestuurd is: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputSteamLogin" xml:space="preserve">
|
||||
<value><{0}> Vul alsjeblieft je Steam gebruikersnaam in: </value>
|
||||
<value><{0}> Vul je Steam gebruikersnaam in: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputSteamParentalPIN" xml:space="preserve">
|
||||
<value><{0}> Vul alsjeblieft je Steam ouderlijktoezichtscode in: </value>
|
||||
<value><{0}> Vul je Steam ouderlijktoezichtscode in: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputSteamPassword" xml:space="preserve">
|
||||
<value><{0}> Vul alsjeblieft je Steam wachtwoord in: </value>
|
||||
<value><{0}> Vul je Steam wachtwoord in: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputUnknown" xml:space="preserve">
|
||||
@@ -333,7 +333,10 @@ StackTrace:
|
||||
<value><{0}> Voer je WCF-host in: </value>
|
||||
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
|
||||
<data name="WarningUnknownValuePleaseReport" xml:space="preserve">
|
||||
<value>Onbekende waarde ontvangen voor {0}, graag dit melden: {1}</value>
|
||||
<comment>{0} will be replaced by object's name, {1} will be replaced by value for that object</comment>
|
||||
</data>
|
||||
<data name="WarningTooManyGamesToPlay" xml:space="preserve">
|
||||
<value>Het spelen van meer dan {0} games gelijktijdig is niet mogelijk, alleen de eerste {0} games van {1} worden gebruikt!</value>
|
||||
<comment>{0} will be replaced by max number of games, {1} will be replaced by name of the configuration property</comment>
|
||||
@@ -365,7 +368,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by WCF hostname</comment>
|
||||
</data>
|
||||
<data name="BotAlreadyStopped" xml:space="preserve">
|
||||
<value>Die bot-instantie is al gestopt!</value>
|
||||
<value>Deze bot-instantie is al gestopt!</value>
|
||||
</data>
|
||||
<data name="BotNotFound" xml:space="preserve">
|
||||
<value>Kan geen bot vinden genaamd {0}!</value>
|
||||
@@ -376,7 +379,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by number of active bots, {1} will be replaced by total number of bots, {2} will be replaced by total number of games left to idle, {3} will be replaced by total number of cards left to idle</comment>
|
||||
</data>
|
||||
<data name="BotStatusIdling" xml:space="preserve">
|
||||
<value>Bot {0} is spel {1} aan het idlen ({2}, {3} kaarten te gaan) van een totaal van {4} spellen ({5} kaarten) nog te idlen (~{6} resterende).</value>
|
||||
<value>Bot {0} is spel {1} aan het idlen ({2}, {3} kaarten te gaan) van een totaal van {4} spellen ({5} kaarten) nog te verzamelen (~{6} resterende).</value>
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name, {3} will be replaced by number of cards left to idle, {4} will be replaced by total number of games to idle, {5} will be replaced by total number of cards to idle, {6} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
|
||||
</data>
|
||||
<data name="BotStatusIdlingList" xml:space="preserve">
|
||||
@@ -397,7 +400,7 @@ StackTrace:
|
||||
<value>Klaar!</value>
|
||||
</data>
|
||||
<data name="GamesToIdle" xml:space="preserve">
|
||||
<value>We hebben een totaal van {0} spellen ({1} kaarten) nog te idlen (~{2} resterende)...</value>
|
||||
<value>We hebben een totaal van {0} spellen ({1} kaarten) nog te verzamelen (~{2} resterende)...</value>
|
||||
<comment>{0} will be replaced by number of games, {1} will be replaced by number of cards, {2} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
|
||||
</data>
|
||||
<data name="IdlingFinished" xml:space="preserve">
|
||||
@@ -418,7 +421,9 @@ StackTrace:
|
||||
<data name="IdlingStopped" xml:space="preserve">
|
||||
<value>Het idlen is gestopt!</value>
|
||||
</data>
|
||||
|
||||
<data name="IgnoredStickyPauseEnabled" xml:space="preserve">
|
||||
<value>Dit verzoek wordt genegeerd. Permanente pauze staat aan!</value>
|
||||
</data>
|
||||
<data name="NothingToIdle" xml:space="preserve">
|
||||
<value>We hebben niks om te idlen op dit account!</value>
|
||||
</data>
|
||||
@@ -453,10 +458,10 @@ StackTrace:
|
||||
<value>Onbekende opdracht!</value>
|
||||
</data>
|
||||
<data name="WarningCouldNotCheckBadges" xml:space="preserve">
|
||||
<value>Kon de badges informatie niet verkrijgen, we zullen het later nog een keer proberen!</value>
|
||||
<value>Kan de badges informatie niet verkrijgen, we zullen het later nog een keer proberen!</value>
|
||||
</data>
|
||||
<data name="WarningCouldNotCheckCardsStatus" xml:space="preserve">
|
||||
<value>Kaart status kon niet worden gecontroleerd voor {0} ({1}), wij zullen het later nogmaals proberen!</value>
|
||||
<value>Kaart status kan niet worden gecontroleerd voor {0} ({1}), wij zullen het later nogmaals proberen!</value>
|
||||
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="BotAcceptingGift" xml:space="preserve">
|
||||
@@ -466,8 +471,14 @@ StackTrace:
|
||||
<data name="BotAccountLimited" xml:space="preserve">
|
||||
<value>Dit account is beperkt, het idling proces is permanent onbeschikbaar totdat de beperking is verwijderd!</value>
|
||||
</data>
|
||||
|
||||
|
||||
<data name="BotAddLicenseResponse" xml:space="preserve">
|
||||
<value><{0}> SpelID: {1} | Status: {2}</value>
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by gameID (number), {2} will be replaced by status string</comment>
|
||||
</data>
|
||||
<data name="BotAddLicenseResponseWithItems" xml:space="preserve">
|
||||
<value><{0}> SpelID: {1} | Status: {2} | Items: {3}</value>
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by gameID (number), {2} will be replaced by status string, {3} will be replaced by list of granted appIDs (numbers), separated by a comma</comment>
|
||||
</data>
|
||||
<data name="BotAlreadyRunning" xml:space="preserve">
|
||||
<value>Die bot-instantie is al bezig!</value>
|
||||
<comment>{0} will be replaced by bot's name</comment>
|
||||
@@ -515,10 +526,10 @@ StackTrace:
|
||||
<comment>{0} will be replaced by password encryption method (string), {1} will be replaced by encrypted password using that method (string)</comment>
|
||||
</data>
|
||||
<data name="BotInstanceNotStartingBecauseDisabled" xml:space="preserve">
|
||||
<value>Deze bot wordt niet gestart omdat hij uitschakeld is in het configuratie bestand!</value>
|
||||
<value>Deze bot wordt niet gestart omdat hij uitgeschakeld is in het configuratie bestand!</value>
|
||||
</data>
|
||||
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
|
||||
<value>TwoFactoryCodeMisMatch error code {0} ontvangen, dit betekent bijna altijd de verkeerde ASF 2FA login informatie, afbreken!</value>
|
||||
<value>TwoFactorCodeMisMatch foutmelding {0} ontvangen, dit betekent bijna altijd de verkeerde ASF 2FA login informatie, afbreken!</value>
|
||||
<comment>{0} will be replaced by maximum allowed number of failed 2FA attempts</comment>
|
||||
</data>
|
||||
<data name="BotLoggedOff" xml:space="preserve">
|
||||
@@ -537,7 +548,10 @@ StackTrace:
|
||||
<data name="BotLootingFailed" xml:space="preserve">
|
||||
<value>Handelsvoorstel mislukt!</value>
|
||||
</data>
|
||||
|
||||
<data name="BotLootingMasterNotDefined" xml:space="preserve">
|
||||
<value>Trade kon niet verzonden worden, omdat SteamMasterID niet is ingesteld!</value>
|
||||
<comment>SteamMasterID is name of bot config property, it should not be translated</comment>
|
||||
</data>
|
||||
<data name="BotLootingNoLootableTypes" xml:space="preserve">
|
||||
<value>Je hebt geen lootable types ingesteld!</value>
|
||||
</data>
|
||||
@@ -678,5 +692,8 @@ StackTrace:
|
||||
<data name="ErrorInvalidCurrentCulture" xml:space="preserve">
|
||||
<value>De door jou geleverde CurrentCulture is incorrect, ASF zal de standaard blijven gebruiken!</value>
|
||||
</data>
|
||||
|
||||
<data name="TranslationIncomplete" xml:space="preserve">
|
||||
<value>ASF probeert de {0} taal te gebruiken, maar het vertalen in deze taal was tot {1} compleet. Misschien kan je ons helpen om ASF te vertalen in jouw taal?</value>
|
||||
<comment>{0} will be replaced by culture code, such as "en-US", {1} will be replaced by completeness percentage, such as "78.5%"</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -162,7 +162,7 @@ StackTrace:
|
||||
<value>Recusando a execução desta função devido ao DeviceID inválido no ASF 2FA!</value>
|
||||
</data>
|
||||
<data name="ErrorNoBotsDefined" xml:space="preserve">
|
||||
<value>Nenhum bot foi definido, esqueceu de configurar seu ASF?</value>
|
||||
<value>Nenhum bot foi definido, esqueceu de configurar o seu ASF?</value>
|
||||
</data>
|
||||
<data name="ErrorObjectIsNull" xml:space="preserve">
|
||||
<value>{0} é nulo!</value>
|
||||
@@ -252,7 +252,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by status code number/name</comment>
|
||||
</data>
|
||||
<data name="Success" xml:space="preserve">
|
||||
<value>Êxito!</value>
|
||||
<value>Sucesso!</value>
|
||||
</data>
|
||||
<data name="TimeSpanDay" xml:space="preserve">
|
||||
<value>1 dia</value>
|
||||
@@ -404,7 +404,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by number of games, {1} will be replaced by number of cards, {2} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
|
||||
</data>
|
||||
<data name="IdlingFinished" xml:space="preserve">
|
||||
<value>Processo de receber cartas finalizado!</value>
|
||||
<value>Coleta de cartas finalizada!</value>
|
||||
</data>
|
||||
<data name="IdlingFinishedForGame" xml:space="preserve">
|
||||
<value>Finalizado o processo de receber cartas: {0} ({1}) após {2} jogados!</value>
|
||||
@@ -526,7 +526,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by password encryption method (string), {1} will be replaced by encrypted password using that method (string)</comment>
|
||||
</data>
|
||||
<data name="BotInstanceNotStartingBecauseDisabled" xml:space="preserve">
|
||||
<value>Não foi iniciado esta instância do bot pois está desativado no arquivo de configurações!</value>
|
||||
<value>Este bot não será iniciado, pois está desativado no arquivo de configurações!</value>
|
||||
</data>
|
||||
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
|
||||
<value>Foi recebido o código de erro TwoFactorCodeMismatch {0} vezes seguidas, isto é praticamente um indicativo de que as credenciais do ASF 2FA são inválidas, abortando!</value>
|
||||
@@ -593,15 +593,15 @@ StackTrace:
|
||||
<value>Reconectando...</value>
|
||||
</data>
|
||||
<data name="BotRedeemResponse" xml:space="preserve">
|
||||
<value><{0}> Chave: {1} | Status: {2}</value>
|
||||
<value><{0}> Chave: {1} | Estado: {2}</value>
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by cd-key (string), {2} will be replaced by status string</comment>
|
||||
</data>
|
||||
<data name="BotRedeemResponseWithItems" xml:space="preserve">
|
||||
<value><{0}> Chave: {1} | Status: {2} | Itens: {3}</value>
|
||||
<value><{0}> Chave: {1} | Estado: {2} | Itens: {3}</value>
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by cd-key (string), {2} will be replaced by status string, {3} will be replaced by list of key-value pairs, separated by a comma</comment>
|
||||
</data>
|
||||
<data name="BotRemovedExpiredLoginKey" xml:space="preserve">
|
||||
<value>Chave de login expirada removida!</value>
|
||||
<value>Chave de sessão expirada removida!</value>
|
||||
</data>
|
||||
<data name="BotsStatusNotIdling" xml:space="preserve">
|
||||
<value>Bot {0} não está executando nada.</value>
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name, {3} will be replaced by number of cards left to idle, {4} will be replaced by total number of games to idle, {5} will be replaced by total number of cards to idle, {6} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
|
||||
</data>
|
||||
<data name="BotStatusIdlingList" xml:space="preserve">
|
||||
<value>Бот {0} фармит игры: {1}. Всего осталось {2} игр ({3} карт, ~{4} осталось).</value>
|
||||
<value>Бот {0} фармит игры: {1}. Всего {2} игр ({3} карт) осталось фармить (займет примерно {4}).</value>
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by list of the games (appIDs, numbers), {2} will be replaced by total number of games to idle, {3} will be replaced by total number of cards to idle, {4} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
|
||||
</data>
|
||||
<data name="CheckingFirstBadgePage" xml:space="preserve">
|
||||
@@ -401,7 +401,7 @@
|
||||
<value>Готово!</value>
|
||||
</data>
|
||||
<data name="GamesToIdle" xml:space="preserve">
|
||||
<value>Всего осталось {0} игр ({1} карт), это примерно {2}...</value>
|
||||
<value>Всего {0} игр ({1} карт) осталось фармить (займет примерно {2})...</value>
|
||||
<comment>{0} will be replaced by number of games, {1} will be replaced by number of cards, {2} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
|
||||
</data>
|
||||
<data name="IdlingFinished" xml:space="preserve">
|
||||
@@ -694,7 +694,7 @@
|
||||
<value>Выбранный вами CurrentCulture неверный, ASF продолжит работать со значением по умолчанию!</value>
|
||||
</data>
|
||||
<data name="TranslationIncomplete" xml:space="preserve">
|
||||
<value>ASF будет пытаться использовать выбранный язык {0}, но перевод готов только на {1}. Возможно, вы смогли бы помочь улучшить перевод ASF на данный язык.</value>
|
||||
<value>ASF будет пытаться использовать выбранный язык {0}, но перевод готов только на {1}. Возможно, Вы могли бы помочь улучшить перевод ASF на данный язык?</value>
|
||||
<comment>{0} will be replaced by culture code, such as "en-US", {1} will be replaced by completeness percentage, such as "78.5%"</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -538,7 +538,7 @@
|
||||
<comment>{0} will be replaced by logging off reason (string)</comment>
|
||||
</data>
|
||||
<data name="BotLoggedOn" xml:space="preserve">
|
||||
<value>Успішний вихід із системи!</value>
|
||||
<value>Успішний вхід в систему!</value>
|
||||
</data>
|
||||
<data name="BotLoggingIn" xml:space="preserve">
|
||||
<value>Здійснюється вхід...</value>
|
||||
|
||||
@@ -584,7 +584,7 @@
|
||||
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="BotRateLimitExceeded" xml:space="preserve">
|
||||
<value>超過頻率限制,我們將在 {0} 分鐘後重試...</value>
|
||||
<value>超過頻率限制,我們將在 {0} 分鐘的CD時間後重試...</value>
|
||||
<comment>{0} will be replaced by number of minutes</comment>
|
||||
</data>
|
||||
<data name="BotReconnecting" xml:space="preserve">
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static void OnConfigurationChanged(object sender, LoggingConfigurationChangedEventArgs e) {
|
||||
if ((sender == null) || (e == null)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
ASF.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,12 +34,11 @@ using System.ServiceProcess;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ArchiSteamFarm.Localization;
|
||||
using NLog.Targets;
|
||||
using SteamKit2;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class Program {
|
||||
internal static readonly ArchiLogger ArchiLogger = new ArchiLogger(SharedInfo.ASF);
|
||||
|
||||
internal static bool IsWCFRunning => WCF.IsServerRunning;
|
||||
internal static GlobalConfig GlobalConfig { get; private set; }
|
||||
internal static GlobalDatabase GlobalDatabase { get; private set; }
|
||||
@@ -55,7 +54,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static void Exit(byte exitCode = 0) {
|
||||
if (exitCode != 0) {
|
||||
ArchiLogger.LogGenericError(Strings.ErrorExitingWithNonZeroErrorCode);
|
||||
ASF.ArchiLogger.LogGenericError(Strings.ErrorExitingWithNonZeroErrorCode);
|
||||
}
|
||||
|
||||
Shutdown();
|
||||
@@ -68,7 +67,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (GlobalConfig.Headless || !Runtime.IsUserInteractive) {
|
||||
ArchiLogger.LogGenericWarning(Strings.ErrorUserInputRunningInHeadlessMode);
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.ErrorUserInputRunningInHeadlessMode);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -98,7 +97,7 @@ namespace ArchiSteamFarm {
|
||||
Console.Write(Strings.UserInputWCFHost, botName);
|
||||
break;
|
||||
default:
|
||||
ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(userInputType), userInputType));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(userInputType), userInputType));
|
||||
Console.Write(Strings.UserInputUnknown, botName, userInputType);
|
||||
break;
|
||||
}
|
||||
@@ -123,7 +122,7 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
Process.Start(Assembly.GetEntryAssembly().Location, string.Join(" ", Environment.GetCommandLineArgs().Skip(1)));
|
||||
} catch (Exception e) {
|
||||
ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
|
||||
ShutdownResetEvent.Set();
|
||||
@@ -131,6 +130,12 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
private static async Task Init(string[] args) {
|
||||
// We must register our logging target as soon as possible
|
||||
Target.Register<SteamTarget>("Steam");
|
||||
await InitCore(args).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static async Task InitCore(string[] args) {
|
||||
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
||||
|
||||
@@ -161,12 +166,12 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
Logging.InitLoggers();
|
||||
ArchiLogger.LogGenericInfo("ASF V" + SharedInfo.Version);
|
||||
ASF.ArchiLogger.LogGenericInfo("ASF V" + SharedInfo.Version);
|
||||
|
||||
await InitServices().ConfigureAwait(false);
|
||||
|
||||
if (!Runtime.IsRuntimeSupported) {
|
||||
ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
|
||||
ASF.ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
|
||||
await Task.Delay(10 * 1000).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -177,7 +182,7 @@ namespace ArchiSteamFarm {
|
||||
Directory.Delete(SharedInfo.DebugDirectory, true);
|
||||
await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync
|
||||
} catch (IOException e) {
|
||||
ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +212,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
GlobalConfig = GlobalConfig.Load(globalConfigFile);
|
||||
if (GlobalConfig == null) {
|
||||
ArchiLogger.LogGenericError(string.Format(Strings.ErrorGlobalConfigNotLoaded, globalConfigFile));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorGlobalConfigNotLoaded, globalConfigFile));
|
||||
await Task.Delay(5 * 1000).ConfigureAwait(false);
|
||||
Exit(1);
|
||||
return;
|
||||
@@ -219,7 +224,7 @@ namespace ArchiSteamFarm {
|
||||
CultureInfo culture = CultureInfo.CreateSpecificCulture(GlobalConfig.CurrentCulture);
|
||||
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.DefaultThreadCurrentUICulture = culture;
|
||||
} catch (CultureNotFoundException) {
|
||||
ArchiLogger.LogGenericError(Strings.ErrorInvalidCurrentCulture);
|
||||
ASF.ArchiLogger.LogGenericError(Strings.ErrorInvalidCurrentCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,20 +243,20 @@ namespace ArchiSteamFarm {
|
||||
|
||||
if (currentResourceSetCount < defaultResourceSetCount) {
|
||||
float translationCompleteness = currentResourceSetCount / (float) defaultResourceSetCount;
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.TranslationIncomplete, CultureInfo.CurrentCulture.Name, translationCompleteness.ToString("P1")));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.TranslationIncomplete, CultureInfo.CurrentCulture.Name, translationCompleteness.ToString("P1")));
|
||||
}
|
||||
|
||||
string globalDatabaseFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalDatabaseFileName);
|
||||
|
||||
if (!File.Exists(globalDatabaseFile)) {
|
||||
ArchiLogger.LogGenericInfo(Strings.Welcome);
|
||||
ArchiLogger.LogGenericWarning(Strings.WarningPrivacyPolicy);
|
||||
ASF.ArchiLogger.LogGenericInfo(Strings.Welcome);
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.WarningPrivacyPolicy);
|
||||
await Task.Delay(15 * 1000).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
GlobalDatabase = GlobalDatabase.Load(globalDatabaseFile);
|
||||
if (GlobalDatabase == null) {
|
||||
ArchiLogger.LogGenericError(string.Format(Strings.ErrorDatabaseInvalid, globalDatabaseFile));
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorDatabaseInvalid, globalDatabaseFile));
|
||||
await Task.Delay(5 * 1000).ConfigureAwait(false);
|
||||
Exit(1);
|
||||
return;
|
||||
@@ -261,7 +266,7 @@ namespace ArchiSteamFarm {
|
||||
WebBrowser.Init();
|
||||
WCF.Init();
|
||||
|
||||
WebBrowser = new WebBrowser(ArchiLogger);
|
||||
WebBrowser = new WebBrowser(ASF.ArchiLogger);
|
||||
}
|
||||
|
||||
private static bool InitShutdownSequence() {
|
||||
@@ -300,7 +305,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static async Task ParsePostInitArgs(IEnumerable<string> args) {
|
||||
if (args == null) {
|
||||
ArchiLogger.LogNullError(nameof(args));
|
||||
ASF.ArchiLogger.LogNullError(nameof(args));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,13 +331,13 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (!Mode.HasFlag(EMode.Client)) {
|
||||
ArchiLogger.LogGenericWarning(string.Format(Strings.WarningWCFIgnoringCommand, arg));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningWCFIgnoringCommand, arg));
|
||||
break;
|
||||
}
|
||||
|
||||
string response = WCF.SendCommand(arg);
|
||||
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.WCFResponseReceived, response));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFResponseReceived, response));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -340,7 +345,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static void ParsePreInitArgs(IEnumerable<string> args) {
|
||||
if (args == null) {
|
||||
ArchiLogger.LogNullError(nameof(args));
|
||||
ASF.ArchiLogger.LogNullError(nameof(args));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -376,21 +381,21 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args) {
|
||||
if (args?.ExceptionObject == null) {
|
||||
ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
|
||||
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
|
||||
return;
|
||||
}
|
||||
|
||||
ArchiLogger.LogFatalException((Exception) args.ExceptionObject);
|
||||
ASF.ArchiLogger.LogFatalException((Exception) args.ExceptionObject);
|
||||
Exit(1);
|
||||
}
|
||||
|
||||
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args) {
|
||||
if (args?.Exception == null) {
|
||||
ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.Exception));
|
||||
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.Exception));
|
||||
return;
|
||||
}
|
||||
|
||||
ArchiLogger.LogFatalException(args.Exception);
|
||||
ASF.ArchiLogger.LogFatalException(args.Exception);
|
||||
Exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,42 +40,42 @@ namespace ArchiSteamFarm {
|
||||
if (IsRunningOnMono) {
|
||||
Version monoVersion = GetMonoVersion();
|
||||
if (monoVersion == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(monoVersion));
|
||||
ASF.ArchiLogger.LogNullError(nameof(monoVersion));
|
||||
return false;
|
||||
}
|
||||
|
||||
Version minMonoVersion = new Version(4, 6);
|
||||
|
||||
if (monoVersion >= minMonoVersion) {
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, "Mono"));
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, "Mono"));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
|
||||
_IsRuntimeSupported = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, "Mono"));
|
||||
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, "Mono"));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
|
||||
_IsRuntimeSupported = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
Version netVersion = GetNetVersion();
|
||||
if (netVersion == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(netVersion));
|
||||
ASF.ArchiLogger.LogNullError(nameof(netVersion));
|
||||
return false;
|
||||
}
|
||||
|
||||
Version minNetVersion = new Version(4, 6, 1);
|
||||
|
||||
if (netVersion >= minNetVersion) {
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, ".NET"));
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, ".NET"));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
|
||||
_IsRuntimeSupported = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, ".NET"));
|
||||
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, ".NET"));
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
|
||||
_IsRuntimeSupported = false;
|
||||
return false;
|
||||
}
|
||||
@@ -112,25 +112,25 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static Version GetMonoVersion() {
|
||||
if (MonoRuntime == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(MonoRuntime));
|
||||
ASF.ArchiLogger.LogNullError(nameof(MonoRuntime));
|
||||
return null;
|
||||
}
|
||||
|
||||
MethodInfo displayName = MonoRuntime.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
if (displayName == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(displayName));
|
||||
ASF.ArchiLogger.LogNullError(nameof(displayName));
|
||||
return null;
|
||||
}
|
||||
|
||||
string versionString = (string) displayName.Invoke(null, null);
|
||||
if (string.IsNullOrEmpty(versionString)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(versionString));
|
||||
ASF.ArchiLogger.LogNullError(nameof(versionString));
|
||||
return null;
|
||||
}
|
||||
|
||||
int index = versionString.IndexOf(' ');
|
||||
if (index <= 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(index));
|
||||
ASF.ArchiLogger.LogNullError(nameof(index));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace ArchiSteamFarm {
|
||||
return version;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogNullError(nameof(version));
|
||||
ASF.ArchiLogger.LogNullError(nameof(version));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -149,18 +149,18 @@ namespace ArchiSteamFarm {
|
||||
uint release;
|
||||
using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\")) {
|
||||
if (registryKey == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(registryKey));
|
||||
ASF.ArchiLogger.LogNullError(nameof(registryKey));
|
||||
return null;
|
||||
}
|
||||
|
||||
object releaseObj = registryKey.GetValue("Release");
|
||||
if (releaseObj == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(releaseObj));
|
||||
ASF.ArchiLogger.LogNullError(nameof(releaseObj));
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!uint.TryParse(releaseObj.ToString(), out release) || (release == 0)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(release));
|
||||
ASF.ArchiLogger.LogNullError(nameof(release));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.1.5";
|
||||
internal const string VersionNumber = "2.2.1.7";
|
||||
|
||||
internal static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal async Task OnPersonaState(SteamFriends.PersonaStateCallback callback) {
|
||||
if (callback == null) {
|
||||
Program.ArchiLogger.LogNullError(nameof(callback));
|
||||
ASF.ArchiLogger.LogNullError(nameof(callback));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
90
ArchiSteamFarm/SteamTarget.cs
Normal file
90
ArchiSteamFarm/SteamTarget.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
_ _ _ ____ _ _____
|
||||
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||
|
||||
Copyright 2015-2017 Łukasz "JustArchi" Domeradzki
|
||||
Contact: JustArchi@JustArchi.net
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
||||
[Target("Steam")]
|
||||
internal sealed class SteamTarget : TargetWithLayout {
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
|
||||
// This is NLog config property, it must have public get() and set() capabilities
|
||||
public string BotName { get; set; }
|
||||
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
|
||||
[RequiredParameter]
|
||||
// This is NLog config property, it must have public get() and set() capabilities
|
||||
public ulong SteamID { get; set; }
|
||||
|
||||
[SuppressMessage("ReSharper", "EmptyConstructor")]
|
||||
public SteamTarget() {
|
||||
// This constructor is intentionally public, as NLog uses it for creating targets
|
||||
// It must stay like this as we want to have SteamTargets defined in our NLog.config
|
||||
|
||||
// We should use default layout, but keeping date here doesn't make sense
|
||||
// User can already enable dates/times on Steam, so skip it by default
|
||||
Layout = "${level:uppercase=true}|${logger}|${message}";
|
||||
}
|
||||
|
||||
protected override void Write(LogEventInfo logEvent) {
|
||||
if (logEvent == null) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(logEvent));
|
||||
return;
|
||||
}
|
||||
|
||||
if (SteamID == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Bot bot;
|
||||
if (string.IsNullOrEmpty(BotName)) {
|
||||
bot = Bot.Bots.Values.FirstOrDefault(targetBot => targetBot.IsConnectedAndLoggedOn && (targetBot.SteamID != SteamID));
|
||||
if (bot == null) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!Bot.Bots.TryGetValue(BotName, out bot)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bot.IsConnectedAndLoggedOn || (bot.SteamID == SteamID)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string message = Layout.Render(logEvent);
|
||||
if (string.IsNullOrEmpty(message)) {
|
||||
return;
|
||||
}
|
||||
|
||||
bot.SendMessage(SteamID, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,21 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
ParseTradeResult[] results = await Task.WhenAll(tradeOffers.Select(ParseTrade)).ConfigureAwait(false);
|
||||
ICollection<ParseTradeResult> results;
|
||||
IEnumerable<Task<ParseTradeResult>> tasks = tradeOffers.Select(ParseTrade);
|
||||
|
||||
switch (Program.GlobalConfig.OptimizationMode) {
|
||||
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
|
||||
results = new List<ParseTradeResult>(tradeOffers.Count);
|
||||
foreach (Task<ParseTradeResult> task in tasks) {
|
||||
results.Add(await task.ConfigureAwait(false));
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
results = await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (Bot.HasMobileAuthenticator) {
|
||||
HashSet<ulong> acceptedWithItemLoseTradeIDs = new HashSet<ulong>(results.Where(result => (result != null) && (result.Result == ParseTradeResult.EResult.AcceptedWithItemLose)).Select(result => result.TradeID));
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -41,7 +42,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static string GetCookieValue(this CookieContainer cookieContainer, string url, string name) {
|
||||
if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(name)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(url) + " || " + nameof(name));
|
||||
ASF.ArchiLogger.LogNullError(nameof(url) + " || " + nameof(name));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -50,7 +51,7 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
uri = new Uri(url);
|
||||
} catch (UriFormatException e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -63,7 +64,7 @@ namespace ArchiSteamFarm {
|
||||
/*
|
||||
internal static int RandomNext(int maxWithout) {
|
||||
if (maxWithout <= 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(maxWithout));
|
||||
ASF.ArchiLogger.LogNullError(nameof(maxWithout));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -79,7 +80,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static bool IsValidHexadecimalString(string text) {
|
||||
if (string.IsNullOrEmpty(text)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(text));
|
||||
ASF.ArchiLogger.LogNullError(nameof(text));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -96,6 +97,10 @@ namespace ArchiSteamFarm {
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static IEnumerable<T> ToEnumerable<T>(this T item) {
|
||||
yield return item;
|
||||
}
|
||||
|
||||
internal static string ToHumanReadable(this TimeSpan timeSpan) {
|
||||
// It's really dirty, I'd appreciate a lot if C# offered nice TimeSpan formatting by default
|
||||
// Normally I'd use third-party library like Humanizer, but using it only for this bit is not worth it
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
public string HandleCommand(string input) {
|
||||
if (string.IsNullOrEmpty(input)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(input));
|
||||
ASF.ArchiLogger.LogNullError(nameof(input));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace ArchiSteamFarm {
|
||||
// We must keep it synchronous until either Mono gets fixed, or culprit for freeze located (and corrected)
|
||||
string output = bot.Response(Program.GlobalConfig.SteamOwnerID, command).Result;
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFAnswered, input, output));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFAnswered, input, output));
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -91,11 +91,11 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal string SendCommand(string input) {
|
||||
if (string.IsNullOrEmpty(input)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(input));
|
||||
ASF.ArchiLogger.LogNullError(nameof(input));
|
||||
return null;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFSendingCommand, input, URL));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFSendingCommand, input, URL));
|
||||
|
||||
if (Client == null) {
|
||||
Client = new Client(
|
||||
@@ -117,7 +117,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFStarting, URL));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFStarting, URL));
|
||||
|
||||
try {
|
||||
ServiceHost = new ServiceHost(typeof(WCF), new Uri(URL));
|
||||
@@ -133,11 +133,11 @@ namespace ArchiSteamFarm {
|
||||
);
|
||||
ServiceHost.Open();
|
||||
|
||||
Program.ArchiLogger.LogGenericInfo(Strings.WCFReady);
|
||||
ASF.ArchiLogger.LogGenericInfo(Strings.WCFReady);
|
||||
} catch (AddressAccessDeniedException) {
|
||||
Program.ArchiLogger.LogGenericError(Strings.ErrorWCFAddressAccessDeniedException);
|
||||
ASF.ArchiLogger.LogGenericError(Strings.ErrorWCFAddressAccessDeniedException);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace ArchiSteamFarm {
|
||||
try {
|
||||
ServiceHost.Close();
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,14 +175,14 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal string HandleCommand(string input) {
|
||||
if (string.IsNullOrEmpty(input)) {
|
||||
Program.ArchiLogger.LogNullError(nameof(input));
|
||||
ASF.ArchiLogger.LogNullError(nameof(input));
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return Channel.HandleCommand(input);
|
||||
} catch (Exception e) {
|
||||
Program.ArchiLogger.LogGenericException(e);
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"LoginLimiterDelay": 10,
|
||||
"MaxFarmingTime": 10,
|
||||
"MaxTradeHoldDuration": 15,
|
||||
"OptimizationMode": 0,
|
||||
"Statistics": true,
|
||||
"SteamOwnerID": 0,
|
||||
"SteamProtocol": 6,
|
||||
|
||||
BIN
ArchiSteamFarm/lib/SteamKit2.dll
Normal file
BIN
ArchiSteamFarm/lib/SteamKit2.dll
Normal file
Binary file not shown.
8328
ArchiSteamFarm/lib/SteamKit2.xml
Normal file
8328
ArchiSteamFarm/lib/SteamKit2.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,10 @@ namespace ConfigGenerator {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public byte MaxTradeHoldDuration { get; set; } = 15;
|
||||
|
||||
[LocalizedCategory("Performance")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public EOptimizationMode OptimizationMode { get; set; } = EOptimizationMode.MaxPerformance;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public bool Statistics { get; set; } = true;
|
||||
|
||||
@@ -206,6 +210,11 @@ namespace ConfigGenerator {
|
||||
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(WCFPort), WCFPort));
|
||||
}
|
||||
|
||||
internal enum EOptimizationMode : byte {
|
||||
MaxPerformance,
|
||||
MinMemoryUsage
|
||||
}
|
||||
|
||||
internal enum EUpdateChannel : byte {
|
||||
None,
|
||||
Stable,
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace ConfigGenerator.Localization {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuraton section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the softwa [rest of string was truncated]";.
|
||||
/// Looks up a localized string similar to Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuration section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the softw [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string TutorialFinished {
|
||||
get {
|
||||
|
||||
@@ -197,7 +197,7 @@ Please use matching ConfigGenerator version for your ASF binary. You'll be redir
|
||||
<value>Your ASF is now ready! Simply launch ASF.exe binary and if you typed everything properly, you should notice that ASF is logging in and starts idling. If you have SteamGuard or two-factor authentication enabled, ASF might need to ask you for those credentials during runtime.</value>
|
||||
</data>
|
||||
<data name="TutorialFinished" xml:space="preserve">
|
||||
<value>Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuraton section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the software that we coded for you!</value>
|
||||
<value>Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuration section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the software that we coded for you!</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormBotsManagementButtons" xml:space="preserve">
|
||||
<value>At the top of the window you can notice currently loaded configs, and 3 extra buttons for removing [-], renaming [~] and adding new ones [+].</value>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<value>Actualizaciones</value>
|
||||
</data>
|
||||
<data name="ConfirmRemoval" xml:space="preserve">
|
||||
<value>¿Realmente quieres eliminar esta configuración?</value>
|
||||
<value>¿Seguro que quieres eliminar esta configuración?</value>
|
||||
</data>
|
||||
<data name="ErrorBotNameEmpty" xml:space="preserve">
|
||||
<value>¡El nombre de tu bot está vacío!</value>
|
||||
@@ -203,13 +203,30 @@ Por favor, usa la versión de ConfigGenerator correspondiente a tu ejecutable de
|
||||
<value>En la parte superior de la ventana puedes ver las configuraciones cargadas actualmente, así como tres botones extra para eliminar [-], renombrar [~] y añadir nuevas[+].</value>
|
||||
<comment>If possible, try to keep visual representation of buttons: [-], [~] and [+]</comment>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="TutorialMainFormConfigurationWiki" xml:space="preserve">
|
||||
<value>Toda la información acerca de las propiedades de configuración disponibles (incluyendo su descripción, finalidad y valores aceptados) está disponible en nuestra wiki de GitHub. No dudes en usarla como referencia.</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormConfigurationWindow" xml:space="preserve">
|
||||
<value>En medio de la ventana puedes configurar todas las propiedades disponibles para tu configuración seleccionada actualmente.</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormFinished" xml:space="preserve">
|
||||
<value>De acuerdo, empecemos a configurar ASF. ¡Clica en el botón [+] para añadir tu primera cuenta de steam!</value>
|
||||
<comment>If possible, try to keep visual representation of [+] button</comment>
|
||||
</data>
|
||||
<data name="TutorialMainFormHelpButton" xml:space="preserve">
|
||||
<value>En la esquina superior derecha encontrarás el botón de ayuda [?], el cual te redirigirá a la wiki de ASF para más información.</value>
|
||||
<comment>If possible, try to keep visual representation of [?] button</comment>
|
||||
</data>
|
||||
<data name="TutorialMainFormShown" xml:space="preserve">
|
||||
<value>Esta es la pantalla principal del generador de configuraciones de ASF. ¡Es muy fácil de usar!</value>
|
||||
</data>
|
||||
<data name="TutorialNewBotFormFinished" xml:space="preserve">
|
||||
<value>¡Como puedes ver, tu bot ya está listo para ser configurado! Lo primero que querrás hacer es cambiar la propiedad {0} de falso a verdadero. ¡Pruébalo!</value>
|
||||
<comment>{0} will be replaced by name of the configuration property ("Enabled")</comment>
|
||||
</data>
|
||||
<data name="TutorialNewBotFormShown" xml:space="preserve">
|
||||
<value>¡Bien hecho! Ahora se te pedirá el nombre de tu bot. Un buen ejemplo podría ser un nick que estés usando para la cuenta de steam que vas a configurar, o cualquier otro nombre a tu elección que te permita conectar con facilidad con la instancia del bot que está siendo configurado.</value>
|
||||
</data>
|
||||
<data name="TutorialStart" xml:space="preserve">
|
||||
<value>¡Bienvenido! Me he dado cuenta de que estás usando ASF ConfigGenerator por primera vez, así que déjame que te ayude un poco.</value>
|
||||
</data>
|
||||
|
||||
@@ -117,24 +117,46 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
|
||||
<data name="CategoryAccess" xml:space="preserve">
|
||||
<value>Toegang</value>
|
||||
</data>
|
||||
<data name="CategoryAdvanced" xml:space="preserve">
|
||||
<value>Geadvanceerd</value>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="CategoryCore" xml:space="preserve">
|
||||
<value>Kern</value>
|
||||
</data>
|
||||
<data name="CategoryDebugging" xml:space="preserve">
|
||||
<value>Debuggen</value>
|
||||
</data>
|
||||
<data name="CategoryPerformance" xml:space="preserve">
|
||||
<value>Prestaties</value>
|
||||
</data>
|
||||
<data name="CategoryUpdates" xml:space="preserve">
|
||||
<value>Updates</value>
|
||||
</data>
|
||||
<data name="ConfirmRemoval" xml:space="preserve">
|
||||
<value>Wil je deze configuratie echt verwijderen?</value>
|
||||
</data>
|
||||
<data name="ErrorBotNameEmpty" xml:space="preserve">
|
||||
<value>Je bot heeft geen naam!</value>
|
||||
</data>
|
||||
<data name="ErrorCantRemoveGlobalConfig" xml:space="preserve">
|
||||
<value>Je kan het globale config bestand niet verwijderen!</value>
|
||||
</data>
|
||||
<data name="ErrorCantRenameGlobalConfig" xml:space="preserve">
|
||||
<value>Je kan het het globale config bestand niet verwijderen!</value>
|
||||
</data>
|
||||
<data name="ErrorConfigDirectoryNotFound" xml:space="preserve">
|
||||
<value>Configuratie folder kon niet gevonden worden!</value>
|
||||
</data>
|
||||
<data name="ErrorConfigPropertyInvalid" xml:space="preserve">
|
||||
<value>Geconfigureerde {0} eigenschap is ongeldig: {1}</value>
|
||||
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by invalid value</comment>
|
||||
</data>
|
||||
|
||||
<data name="ErrorInvalidCurrentCulture" xml:space="preserve">
|
||||
<value>De opgegeven CurrentCulture is ongeldig, ConfigGenerator blijft draaien met de standaard!</value>
|
||||
</data>
|
||||
<data name="ErrorNameAlreadyUsed" xml:space="preserve">
|
||||
<value>Deze naam is al in gebruik!</value>
|
||||
<comment>This happens e.g. when user wants to create a bot with name that exists already</comment>
|
||||
@@ -147,28 +169,74 @@
|
||||
<value>{0} is nul!</value>
|
||||
<comment>{0} will be replaced by object's name</comment>
|
||||
</data>
|
||||
|
||||
<data name="ErrorVersionMismatch" xml:space="preserve">
|
||||
<value>Je hebt geprobeerd om een ongeldige ConfigGenerator versie te gebruiken voor ASF!
|
||||
|
||||
ASF: {0} | ConfigGenerator: {1}
|
||||
|
||||
Gebruik een zelfde versie ConfigGenerator voor je ASF bestand. Je wordt verwezen naar de juiste release...</value>
|
||||
<comment>{0} will be replaced by ASF version (string), {1} will be replaced by ConfigGenerator version (string). Please note that this string should include newlines for formatting.</comment>
|
||||
</data>
|
||||
<data name="New" xml:space="preserve">
|
||||
<value>Nieuw</value>
|
||||
<comment>This is used as MessageBox title</comment>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="Removal" xml:space="preserve">
|
||||
<value>Verwijderen</value>
|
||||
<comment>This is used as MessageBox title</comment>
|
||||
</data>
|
||||
<data name="Rename" xml:space="preserve">
|
||||
<value>Hernoemen</value>
|
||||
<comment>This is used as MessageBox title</comment>
|
||||
</data>
|
||||
<data name="TutorialBotFormEnabled" xml:space="preserve">
|
||||
<value>Proficiat! Je bot instance is actief. Feitelijk was dat alles dat je moest doen om deze bot in ASF te gebruiken, maar je wilt misschien nog 2 andere config waardes instellen: {0} en {1}.
|
||||
Je kan, als je wilt, doorgaan met deze tutorial. Vergeet niet de wiki te gebruiken als je niet zeker weet hoe een waarde moet worden ingesteld. Dit geldt ook als je meer hulp nodig hebt.</value>
|
||||
<comment>{0} will be replaced by "SteamLogin" configuration property, {1} will be replaced by "SteamPassword" configuration property</comment>
|
||||
</data>
|
||||
<data name="TutorialBotFormReady" xml:space="preserve">
|
||||
<value>Je ASF is nu klaar! Simpelweg ASF.exe starten en als je alles correct hebt ingevuld, zul je merken dat ASF aan het inloggen en begonnen is met idlen. Als je SteamGuard twee factor authenticatie aan hebt staan, kan het zijn dat ASF voor deze gegevens vraagt tijdens het starten.</value>
|
||||
</data>
|
||||
<data name="TutorialFinished" xml:space="preserve">
|
||||
<value>Proficiat! Je hebt alles gedaan dat nodig is om ASF bruikbaar te maken, hiermee is deze tutorial die we hebben klaargezet ook afgerond. Het wordt sterk aanbevolen om de hele 'configuration' sectie op de wiki te lezen, aangezien ASF leuke eigenschappen heeft die geconfigureerd kunnen worden. Zoals offline farmen of afstemmen van ASF voor het meest efficiënte idling algoritme voor je account. Dit alles is optioneel en je kan de ConfigGenerator afsluiten als je dit wilt. We hopen dat je zult genieten van de software die we voor jou hebben geschreven!</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormBotsManagementButtons" xml:space="preserve">
|
||||
<value>Bovenaan het venster zie je de huidig geladen configuraties en 3 extra knoppen voor verwijderen [-], hernoemen [~] en toevoegen van nieuwe configuraties [+].</value>
|
||||
<comment>If possible, try to keep visual representation of buttons: [-], [~] and [+]</comment>
|
||||
</data>
|
||||
<data name="TutorialMainFormConfigurationWiki" xml:space="preserve">
|
||||
<value>Hou rekening dat alle informatie met betrekking tot alle beschikbare config eigenschappen, inclusief hun uitleg, doel en geaccepteerde waardes, beschikbaar is op onze GitHub wiki. Graag dit als referentie gebruiken.</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormConfigurationWindow" xml:space="preserve">
|
||||
<value>In het midden van de venster kan alle config eigenschappen die beschikbaar zijn configureren. Dit geldt voor de huidig geselecteerde config.</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormFinished" xml:space="preserve">
|
||||
<value>Laten we beginnen met het configureren van ASF. Klik op de plus [+] knop om je eerste Steam account toe te voegen!</value>
|
||||
<comment>If possible, try to keep visual representation of [+] button</comment>
|
||||
</data>
|
||||
<data name="TutorialMainFormHelpButton" xml:space="preserve">
|
||||
<value>In de bovenrechter hoek vindt je de help knop [?] die je doorverwijst naar de ASF wiki voor meer informatie.</value>
|
||||
<comment>If possible, try to keep visual representation of [?] button</comment>
|
||||
</data>
|
||||
<data name="TutorialMainFormShown" xml:space="preserve">
|
||||
<value>Dit is de hoofd ASF ConfigGenerator scherm, het is heel simpel in gebruik!</value>
|
||||
</data>
|
||||
<data name="TutorialNewBotFormFinished" xml:space="preserve">
|
||||
<value>Zoals je ziet, je bot is nu gereed voor configuratie! Het eerste dat je wilt doen is {0} eigenschap schakelen van false naar true, probeer het!</value>
|
||||
<comment>{0} will be replaced by name of the configuration property ("Enabled")</comment>
|
||||
</data>
|
||||
<data name="TutorialNewBotFormShown" xml:space="preserve">
|
||||
<value>Goed gedaan! Je wordt nu gevraagd voor een naam voor je bot. Een goede voorbeeld is de nickname die je voor je Steam account gebruikt. Of elk ander naam die makkelijk voor jou is om te herinneren om welke bot het gaat.</value>
|
||||
</data>
|
||||
<data name="TutorialStart" xml:space="preserve">
|
||||
<value>Welkom! Ik zie dat dit de eerste keer is dat ASF ConfigGenerator gebruikt, laat me je daar een beetje mee helpen.</value>
|
||||
</data>
|
||||
<data name="UserInputBotName" xml:space="preserve">
|
||||
<value>Voer een nieuwe naam in voor de bot: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
|
||||
<data name="WarningConfigPropertyModified" xml:space="preserve">
|
||||
<value>{0} staat nu op: {1}</value>
|
||||
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by new value</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -197,7 +197,7 @@ Por favor use uma versão do ConfigGenerator correspondente ao seu ASF. Você se
|
||||
<value>Seu ASF está agora pronto! Basta executar o ASF.exe e digitar tudo corretamente, você verá o ASF entrar em seção e começar o processo de receber cartas. Se você tiver o SteamGuard ou autenticação por dois fatores ativado, o ASF te perguntará por essas credenciais durante o processo.</value>
|
||||
</data>
|
||||
<data name="TutorialFinished" xml:space="preserve">
|
||||
<value>Parabéns! Você fez tudo que era necessário para deixar o ASF em processo de uso, isso também completa o tutorial que preparamos para você. É altamente recomendado agora ler toda a seção de configuração na Wiki, pois o ASF oferece outras ótimas funções para você configurar, como receber cartas em modo offline ou ativar o ASF no melhor modo algorítimo de receber cartas para a sua conta. Tudo isso claro, é opcional, e você pode fechar nosso configurador quando quiser. Nós desejamos que aproveite o programa que desenvolvemos para você!</value>
|
||||
<value>Parabéns! Você fez tudo que era necessário para deixar o ASF em processo de uso, isso também completa o tutorial que preparamos para você. É altamente recomendado agora ler toda a seção de configuração na Wiki, pois o ASF oferece outras ótimas funções para você configurar, como receber cartas em modo offline ou ativar o ASF no algoritmo mais eficiente de receber cartas para a sua conta. Tudo isso claro, é opcional, e você pode fechar nosso configurador quando quiser. Nós desejamos que aproveite o programa que desenvolvemos para você!</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormBotsManagementButtons" xml:space="preserve">
|
||||
<value>Na parte superior da janela, você pode notar que atualmente as configurações abertas, e 3 botões extras para remoção [-], renomeação [~] e adição de novos [+].</value>
|
||||
|
||||
@@ -197,7 +197,7 @@ Please use matching ConfigGenerator version for your ASF binary. You'll be redir
|
||||
<value>Your ASF is now ready! Simply launch ASF.exe binary and if you typed everything properly, you should notice that ASF is logging in and starts idling. If you have SteamGuard or two-factor authentication enabled, ASF might need to ask you for those credentials during runtime.</value>
|
||||
</data>
|
||||
<data name="TutorialFinished" xml:space="preserve">
|
||||
<value>Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuraton section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the software that we coded for you!</value>
|
||||
<value>Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuration section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the software that we coded for you!</value>
|
||||
</data>
|
||||
<data name="TutorialMainFormBotsManagementButtons" xml:space="preserve">
|
||||
<value>At the top of the window you can notice currently loaded configs, and 3 extra buttons for removing [-], renaming [~] and adding new ones [+].</value>
|
||||
|
||||
3
ConfigGenerator/Localization/README.md
Normal file
3
ConfigGenerator/Localization/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
This directory contains ASF strings for display and localization purposes.
|
||||
|
||||
All strings used by ASF can be found in main ```CGStrings.resx``` file, and that's also the only file that should be modified - all other files are managed automatically and should not be touched. Please visit **[localization](https://github.com/JustArchi/ArchiSteamFarm/wiki/Localization)** section on the wiki if you want to improve translation of other files.
|
||||
@@ -65,8 +65,8 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SteamKit2, Version=1.8.0.26737, Culture=neutral, PublicKeyToken=ed3ce47ed5aad940, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamKit2.1.8.0\lib\net45\SteamKit2.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\ArchiSteamFarm\lib\SteamKit2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -160,6 +160,9 @@
|
||||
<Compile Include="..\ArchiSteamFarm\SteamSaleEvent.cs">
|
||||
<Link>SteamSaleEvent.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\ArchiSteamFarm\SteamTarget.cs">
|
||||
<Link>SteamTarget.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\ArchiSteamFarm\Trading.cs">
|
||||
<Link>Trading.cs</Link>
|
||||
</Compile>
|
||||
|
||||
3
GUI/Localization/README.md
Normal file
3
GUI/Localization/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
This directory contains ASF strings for display and localization purposes.
|
||||
|
||||
All strings used by ASF can be found in main ```GUIStrings.resx``` file, and that's also the only file that should be modified - all other files are managed automatically and should not be touched. Please visit **[localization](https://github.com/JustArchi/ArchiSteamFarm/wiki/Localization)** section on the wiki if you want to improve translation of other files.
|
||||
Reference in New Issue
Block a user