mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 15:14:41 +00:00
Playtime goes before friends
This commit is contained in:
parent
6b7ca74897
commit
853a957756
2 changed files with 14 additions and 14 deletions
|
@ -1586,8 +1586,8 @@ namespace ArchiSteamFarm {
|
|||
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting profile = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting ownedGames = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting friendsList = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting playtime = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting friendsList = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting inventory = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.PrivacySettings.EPrivacySetting inventoryGifts = Steam.UserPrivacy.PrivacySettings.EPrivacySetting.Private;
|
||||
Steam.UserPrivacy.ECommentPermission comments = Steam.UserPrivacy.ECommentPermission.Private;
|
||||
|
@ -1610,20 +1610,20 @@ namespace ArchiSteamFarm {
|
|||
|
||||
ownedGames = privacySetting;
|
||||
break;
|
||||
case 2: // FriendsList, child of Profile
|
||||
if (profile < privacySetting) {
|
||||
return FormatBotResponse(string.Format(Strings.ErrorIsInvalid, nameof(ownedGames)));
|
||||
}
|
||||
|
||||
friendsList = privacySetting;
|
||||
break;
|
||||
case 3: // Playtime, child of OwnedGames
|
||||
case 2: // Playtime, child of OwnedGames
|
||||
if (ownedGames < privacySetting) {
|
||||
return FormatBotResponse(string.Format(Strings.ErrorIsInvalid, nameof(playtime)));
|
||||
}
|
||||
|
||||
playtime = privacySetting;
|
||||
break;
|
||||
case 3: // FriendsList, child of Profile
|
||||
if (profile < privacySetting) {
|
||||
return FormatBotResponse(string.Format(Strings.ErrorIsInvalid, nameof(ownedGames)));
|
||||
}
|
||||
|
||||
friendsList = privacySetting;
|
||||
break;
|
||||
case 4: // Inventory, child of Profile
|
||||
if (profile < privacySetting) {
|
||||
return FormatBotResponse(string.Format(Strings.ErrorIsInvalid, nameof(inventory)));
|
||||
|
@ -1666,7 +1666,7 @@ namespace ArchiSteamFarm {
|
|||
}
|
||||
}
|
||||
|
||||
Steam.UserPrivacy userPrivacy = new Steam.UserPrivacy(new Steam.UserPrivacy.PrivacySettings(profile, ownedGames, friendsList, playtime, inventory, inventoryGifts), comments);
|
||||
Steam.UserPrivacy userPrivacy = new Steam.UserPrivacy(new Steam.UserPrivacy.PrivacySettings(profile, ownedGames, playtime, friendsList, inventory, inventoryGifts), comments);
|
||||
return FormatBotResponse(await Bot.ArchiWebHandler.ChangePrivacySettings(userPrivacy).ConfigureAwait(false) ? Strings.Success : Strings.WarningFailed);
|
||||
}
|
||||
|
||||
|
|
|
@ -634,15 +634,15 @@ namespace ArchiSteamFarm.Json {
|
|||
internal readonly EPrivacySetting Profile;
|
||||
|
||||
// Constructed from privacy change request
|
||||
internal PrivacySettings(EPrivacySetting profile, EPrivacySetting ownedGames, EPrivacySetting friendsList, EPrivacySetting playtime, EPrivacySetting inventory, EPrivacySetting inventoryGifts) {
|
||||
if ((profile == EPrivacySetting.Unknown) || (ownedGames == EPrivacySetting.Unknown) || (friendsList == EPrivacySetting.Unknown) || (playtime == EPrivacySetting.Unknown) || (inventory == EPrivacySetting.Unknown) || (inventoryGifts == EPrivacySetting.Unknown)) {
|
||||
throw new ArgumentNullException(nameof(profile) + " || " + nameof(ownedGames) + " || " + nameof(friendsList) + " || " + nameof(playtime) + " || " + nameof(inventory) + " || " + nameof(inventoryGifts));
|
||||
internal PrivacySettings(EPrivacySetting profile, EPrivacySetting ownedGames, EPrivacySetting playtime, EPrivacySetting friendsList, EPrivacySetting inventory, EPrivacySetting inventoryGifts) {
|
||||
if ((profile == EPrivacySetting.Unknown) || (ownedGames == EPrivacySetting.Unknown) || (playtime == EPrivacySetting.Unknown) || (friendsList == EPrivacySetting.Unknown) || (inventory == EPrivacySetting.Unknown) || (inventoryGifts == EPrivacySetting.Unknown)) {
|
||||
throw new ArgumentNullException(nameof(profile) + " || " + nameof(ownedGames) + " || " + nameof(playtime) + " || " + nameof(friendsList) + " || " + nameof(inventory) + " || " + nameof(inventoryGifts));
|
||||
}
|
||||
|
||||
Profile = profile;
|
||||
OwnedGames = ownedGames;
|
||||
FriendsList = friendsList;
|
||||
Playtime = playtime;
|
||||
FriendsList = friendsList;
|
||||
Inventory = inventory;
|
||||
InventoryGifts = inventoryGifts;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue