Space Plunder
Loading...
Searching...
No Matches
GetAchievementData.h
Go to the documentation of this file.
1// Copyright 2021 Artur 'NijoMeisteR' Dworaczek. All Rights Reserved.
2
3#pragma once
4#pragma warning(disable:4996)
5#pragma warning(disable:4265)
6#pragma warning(disable:4701)
7
8#include "CoreMinimal.h"
9#include "Kismet/BlueprintFunctionLibrary.h"
10#include "Engine/Texture2D.h"
11#include "TextureResource.h"
12#include "SteamRequests.h"
13#pragma push_macro("ARRAY_COUNT")
14#undef ARRAY_COUNT
15
16#if USING_CODE_ANALYSIS
17MSVC_PRAGMA(warning(push))
18MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
19#endif
20
21#include "OnlineSubsystemSteam.h"
22#include <steam/steam_api.h>
23
24#if USING_CODE_ANALYSIS
25MSVC_PRAGMA(warning(pop))
26#endif
27
28#pragma pop_macro("ARRAY_COUNT")
29#include "GetAchievementData.generated.h"
30
32UENUM(BlueprintType)
34{
35 ADA_EAttributeName UMETA(DisplayName = "Name"),
36 ADA_EAttributeDescription UMETA(DisplayName = "Description"),
37 ADA_EAttributeHidden UMETA(DisplayName = "Hidden Status"),
38};
39
41UCLASS()
42class STATSINTEGRATION_API UGetAchievementData : public UBlueprintFunctionLibrary
43{
44 GENERATED_BODY()
45
46public:
47 /* You must have called 'RequestUserStatsAndAchievements' and it needs to return successfully via its callback prior to calling this. */
48 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Simple Steam Stats & Achievements")
49 static int32 GetNumAchievements();
50
51 /* You must have called 'RequestUserStatsAndAchievements' and it needs to return successfully via its callback prior to calling this. */
52 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Simple Steam Stats & Achievements")
53 static FString GetAchievementAPIName(int32 AchievementIndex);
54
55 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Simple Steam Stats & Achievements")
56 static UTexture2D* GetAchievementIcon(FString AchievementAPIName);
57
58 /* You must have called 'RequestUserStatsAndAchievements' and it needs to return successfully via its callback prior to calling this. */
59 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Simple Steam Stats & Achievements")
60 static void GetAchievementUnlockStatusAndUnlockTime(FString AchievementAPIName, bool& AchievementUnlocked, FDateTime& UnlockTime);
61
62 /* Returns the percentage of users who have unlocked the specified achievement. You must have called 'RequestUserStatsAndAchievements' and it needs to return successfully via its callback prior to calling this. */
63 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Simple Steam Stats & Achievements")
64 static float GetGlobalAchievementAchievedPercent(FString AchievementAPIName);
65
66 /* Get general attributes for an achievement. Currently provides: Name, Description, and Hidden status. You must have called 'RequestUserStatsAndAchievements' and it needs to return successfully via its callback prior to calling this. */
67 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Simple Steam Stats & Achievements")
68 static FString GetAchievementDisplayAttribute(FString AchievementAPIName, EAchievementDisplayAttributeUE4 Attribute);
69};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
EAchievementDisplayAttributeUE4
Definition GetAchievementData.h:34
Definition GetAchievementData.h:43