Added SteamRequestGroupOfficers function to the sessions plugin.

Added GetSteamGroups to the sessions plugin.

Added GetSteamFriendGamePlayed function to the sessions plugin.


Former-commit-id: 8e553495aa175521d91f9efd6b6432d237796fc9
This commit is contained in:
mordentral
2017-06-26 13:59:31 -04:00
parent 289f06fdc7
commit 5f48361f99
4 changed files with 269 additions and 0 deletions

View File

@@ -29,6 +29,29 @@ enum class SteamAvatarSize : uint8
SteamAvatar_Large = 3
};
USTRUCT(BlueprintType, Category = "Online|SteamAPI|SteamGroups")
struct FBPSteamGroupInfo
{
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
FBPUniqueNetId GroupID; // Uint64 representation
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
FString GroupName;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
FString GroupTag;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
int32 numOnline;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
int32 numInGame;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Online|SteamAPI|SteamGroups")
int32 numChatting;
};
UCLASS()
class UAdvancedSteamFriendsLibrary : public UBlueprintFunctionLibrary
@@ -57,4 +80,14 @@ public:
// Creates a unique steam id directly from a string holding a uint64 value, useful for testing
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|SteamAPI")
static FBPUniqueNetId CreateSteamIDFromString(const FString SteamID64);
/* Gets the current game played by a friend - AppID is int32 even though steam ids are uint32, can't be helped in blueprint currently
* The game name is retrieved from steamSDK AppList which isn't available to all game IDs without request, can use the AppID with the
* WebAPI GetAppList request as an alternative.
*/
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI", meta = (ExpandEnumAsExecs = "Result"))
static void GetSteamFriendGamePlayed(const FBPUniqueNetId UniqueNetId, EBlueprintResultSwitch &Result, FString & GameName, int32 & AppID);
UFUNCTION(BlueprintCallable, Category = "Online|SteamAPI|SteamGroups")
static void GetSteamGroups(TArray<FBPSteamGroupInfo> & SteamGroups);
};