generated from freezernick/unreal-plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGameJoltStructs.h
251 lines (197 loc) · 7.31 KB
/
GameJoltStructs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
// Copyright by Nick Lamprecht (2020-2023)
#pragma once
#include "CoreMinimal.h"
#include "GameJoltEnums.h"
#include "GameJoltStructs.generated.h"
/* Contains all available information about a user */
USTRUCT(BlueprintType)
struct FGJUserInfo
{
GENERATED_BODY()
/* The ID of the user. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 UserID = 0;
/* The type of user. Can be 'User', 'Developer', 'Moderator', or 'Administrator'. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
EGJUserType UserType;
/* The user's username. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString UserName;
/* The URL of the user's avatar. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString AvatarURL;
/* How long ago the user signed up. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString SignedUp;
/* How long ago the user was last logged in. Will be Online Now if the user is currently online. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString LastLoggedIn;
/* Active if the user is still a member of the site. Banned if they've been banned. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Status;
/* The user's display name. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString DisplayName;
/* The user's website (or empty string if not specified) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Website;
/* The user's profile markdown description. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Description;
FGJUserInfo(): UserType()
{
}
FGJUserInfo(const int32 ID, const EGJUserType Type, const FString Name, const FString URL, const FString Date, const FString Login, const FString State, const FString Display, const FString Site, const FString ProfileDescription)
{
UserID = ID;
UserType = Type;
UserName = Name;
AvatarURL = URL;
SignedUp = Date;
LastLoggedIn = Login;
Status = State;
DisplayName = Display;
Website = Site;
Description = ProfileDescription;
}
};
/* Contains all information about a trophy */
USTRUCT(BlueprintType)
struct FGJTrophyInfo
{
GENERATED_BODY()
/* The ID of the trophy. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 ID = 0;
/* The title of the trophy on the site. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Name;
/* The trophy description text. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Description;
/* The difficulty of the trophy */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
EGJTrophyDifficulty Difficulty;
/* The URL of the trophy's thumbnail image. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString ImageURL;
/* Whether the current user has achieved the trophy */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
bool bAchieved = false;
/* Date/time when the trophy was achieved by the user */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Timestamp;
FGJTrophyInfo(): Difficulty()
{
}
FGJTrophyInfo(const int32 id, const FString name, const FString description, const EGJTrophyDifficulty difficulty, const FString imageURL)
{
ID = id;
Name = name;
Description = description;
Difficulty = difficulty;
ImageURL = imageURL;
}
};
/* Contains all information about an entry in a scoreboard */
USTRUCT(BlueprintType)
struct FGJScoreInfo
{
GENERATED_BODY()
/* The score string. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString ScoreString;
/* The score's numerical sort value. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 ScoreSort = 0;
/* Any extra data associated with the score. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString ExtraData;
/* If this is a user score, this is the display name for the user. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString UserName;
/* If this is a user score, this is the user's ID. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 UserID = 0;
/* If this is a guest score, this is the guest's submitted name. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Guest;
/* Returns when the score was logged by the user. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Stored;
/* Returns the unix timestamp of when the score was logged by the user. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 StoredTimestamp = 0;
FGJScoreInfo() {}
FGJScoreInfo(const FString scoreString, const int32 scoreSort, const FString extraData, const FString userName, const int32 userID, const FString guest, const FString timestamp, const int32 storedTimestamp)
{
ScoreString = scoreString;
ScoreSort = scoreSort;
ExtraData = extraData;
UserName = userName;
UserID = userID;
Guest = guest;
Stored = timestamp;
StoredTimestamp = storedTimestamp;
}
};
/* Contains all information about a scoreboard */
USTRUCT(BlueprintType)
struct FGJScoreTableInfo
{
GENERATED_BODY()
/* The ID of the score table. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 ID = 0;
/* The developer-defined name of the score table. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Name;
/* The developer-defined description of the score table. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Description;
/* Whether or not this is the default score table. Scores are submitted to the primary table by default. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
bool Primary = false;
FGJScoreTableInfo() {}
FGJScoreTableInfo(const int32 tableID, const FString tableName, const FString tableDescription, const bool tablePrimary)
{
ID = tableID;
Name = tableName;
Description = tableDescription;
Primary = tablePrimary;
}
};
/* Contains Server-Time information */
USTRUCT(BlueprintType)
struct FGJServerTime
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 UnixTimestamp = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
FString Timezone;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 Year = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 Month = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 Day = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 Hour = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 Minute = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameJoltAPI")
int32 Second = 0;
FGJServerTime() {}
FGJServerTime(const int32 unix, const FString TZ, const int32 year, const int32 month, const int32 day, const int32 hour, const int32 minute, const int32 second)
{
UnixTimestamp = unix;
Timezone = TZ;
Year = year;
Month = month;
Day = day;
Hour = hour;
Minute = minute;
Second = second;
}
};