Skip to content

Commit

Permalink
2.11.1296
Browse files Browse the repository at this point in the history
* Fix a bug in FetchExternalUpdatesAsync when the current user has over
  100 subscriptions
* Enum flags support for mature content flags on ModInfo
  • Loading branch information
stephenwhittle committed Oct 21, 2021
1 parent e9c8ec8 commit f7c1674
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 31 deletions.
74 changes: 54 additions & 20 deletions Doc/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ <h1>mod.io UE4 Plugin Documentation</h1>
<ul class="sectlevel2">
<li><a href="#_emodiovirusstatus"> EModioVirusStatus</a></li>
<li><a href="#_emodiovirusscanstatus"> EModioVirusScanStatus</a></li>
<li><a href="#_emodiomaturityflags"> EModioMaturityFlags</a></li>
<li><a href="#_emodiomodmanagementeventtype"> EModioModManagementEventType</a></li>
<li><a href="#_emodioauthenticationprovider"> EModioAuthenticationProvider</a></li>
<li><a href="#_emodiolanguage"> EModioLanguage</a></li>
Expand Down Expand Up @@ -3539,9 +3540,9 @@ <h4 id="_variables" class="discrete">Variables</h4>
<td class="tableblock halign-left valign-top"><p class="tableblock">Unix timestamp of the date the mod was marked live</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variabletype"><a href="#uint8">uint8</a></span></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variabletype"><a href="#EModioMaturityFlags">EModioMaturityFlags</a></span></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variablename">ProfileMaturityOption</span></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flags for maturity options Maturity options flagged by the mod developer, this is only relevant if the parent game allows mods to be labeled as mature. * 0 = None set (default) 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flags for maturity options Maturity options flagged by the mod developer, this is only relevant if the parent game allows mods to be labeled as mature.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variabletype"><a href="#FString">FString</a></span></p></td>
Expand Down Expand Up @@ -5273,11 +5274,44 @@ <h4 id="_values_2" class="discrete">Values</h4>
<hr>
</div>
<div class="sect2">
<h3 id="_emodiomaturityflags"><a id="EModioMaturityFlags"></a> EModioMaturityFlags</h3>
<h4 id="_values_3" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
<col>
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variablename">None</span></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variablename">Alcohol</span></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variablename">Drugs</span></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variablename">Violence</span></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="variablename">Explicit</span></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
<hr>
</div>
<div class="sect2">
<h3 id="_emodiomodmanagementeventtype"><a id="EModioModManagementEventType"></a> EModioModManagementEventType</h3>
<div class="paragraph">
<p>What type of event occurred</p>
</div>
<h4 id="_values_3" class="discrete">Values</h4>
<h4 id="_values_4" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5305,7 +5339,7 @@ <h3 id="_emodioauthenticationprovider"><a id="EModioAuthenticationProvider"></a>
<div class="paragraph">
<p>Simple struct to encapsulate data passed to external authentication systems</p>
</div>
<h4 id="_values_4" class="discrete">Values</h4>
<h4 id="_values_5" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5345,7 +5379,7 @@ <h3 id="_emodiolanguage"><a id="EModioLanguage"></a> EModioLanguage</h3>
<div class="paragraph">
<p>Enum representing the languages mod.io support responses in</p>
</div>
<h4 id="_values_5" class="discrete">Values</h4>
<h4 id="_values_6" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5421,7 +5455,7 @@ <h3 id="_emodiologlevel"><a id="EModioLogLevel"></a> EModioLogLevel</h3>
<div class="paragraph">
<p>Degree of severity for the log output</p>
</div>
<h4 id="_values_6" class="discrete">Values</h4>
<h4 id="_values_7" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5450,7 +5484,7 @@ <h4 id="_values_6" class="discrete">Values</h4>
</div>
<div class="sect2">
<h3 id="_emodiogallerysize"><a id="EModioGallerySize"></a> EModioGallerySize</h3>
<h4 id="_values_7" class="discrete">Values</h4>
<h4 id="_values_8" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand All @@ -5474,7 +5508,7 @@ <h3 id="_emodioavatarsize"><a id="EModioAvatarSize"></a> EModioAvatarSize</h3>
<div class="paragraph">
<p>Enum representing avatar image sizes</p>
</div>
<h4 id="_values_8" class="discrete">Values</h4>
<h4 id="_values_9" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5502,7 +5536,7 @@ <h3 id="_emodiologosize"><a id="EModioLogoSize"></a> EModioLogoSize</h3>
<div class="paragraph">
<p>Enum representing mod logo sizes</p>
</div>
<h4 id="_values_9" class="discrete">Values</h4>
<h4 id="_values_10" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5534,7 +5568,7 @@ <h3 id="_emodioportal"><a id="EModioPortal"></a> EModioPortal</h3>
<div class="paragraph">
<p>Enum representing the store or service your game is being distributed through</p>
</div>
<h4 id="_values_10" class="discrete">Values</h4>
<h4 id="_values_11" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5590,7 +5624,7 @@ <h3 id="_emodioenvironment"><a id="EModioEnvironment"></a> EModioEnvironment</h3
<div class="paragraph">
<p>Enum representing what environment your game is deployed in</p>
</div>
<h4 id="_values_11" class="discrete">Values</h4>
<h4 id="_values_12" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand All @@ -5611,7 +5645,7 @@ <h4 id="_values_11" class="discrete">Values</h4>
</div>
<div class="sect2">
<h3 id="_emodioerrorcondition"><a id="EModioErrorCondition"></a> EModioErrorCondition</h3>
<h4 id="_values_12" class="discrete">Values</h4>
<h4 id="_values_13" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5663,7 +5697,7 @@ <h3 id="_emodiosortdirection"><a id="EModioSortDirection"></a> EModioSortDirecti
<div class="paragraph">
<p>Enum indicating which direction sorting should be applied</p>
</div>
<h4 id="_values_13" class="discrete">Values</h4>
<h4 id="_values_14" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand All @@ -5687,7 +5721,7 @@ <h3 id="_emodiosortfieldtype"><a id="EModioSortFieldType"></a> EModioSortFieldTy
<div class="paragraph">
<p>Enum indicating which field should be used to sort the results</p>
</div>
<h4 id="_values_14" class="discrete">Values</h4>
<h4 id="_values_15" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5724,7 +5758,7 @@ <h4 id="_values_14" class="discrete">Values</h4>
</div>
<div class="sect2">
<h3 id="_emodioimagestate"><a id="EModioImageState"></a> EModioImageState</h3>
<h4 id="_values_15" class="discrete">Values</h4>
<h4 id="_values_16" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5756,7 +5790,7 @@ <h3 id="_emodiomodstate"><a id="EModioModState"></a> EModioModState</h3>
<div class="paragraph">
<p>Enum representing the current state of a mod</p>
</div>
<h4 id="_values_16" class="discrete">Values</h4>
<h4 id="_values_17" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5793,7 +5827,7 @@ <h4 id="_values_16" class="discrete">Values</h4>
</div>
<div class="sect2">
<h3 id="_emodiorating"><a id="EModioRating"></a> EModioRating</h3>
<h4 id="_values_17" class="discrete">Values</h4>
<h4 id="_values_18" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand All @@ -5818,7 +5852,7 @@ <h4 id="_values_17" class="discrete">Values</h4>
</div>
<div class="sect2">
<h3 id="_emodioreporttype"><a id="EModioReportType"></a> EModioReportType</h3>
<h4 id="_values_18" class="discrete">Values</h4>
<h4 id="_values_19" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5863,7 +5897,7 @@ <h4 id="_values_18" class="discrete">Values</h4>
</div>
<div class="sect2">
<h3 id="_efilesizeunit"><a id="EFileSizeUnit"></a> EFileSizeUnit</h3>
<h4 id="_values_19" class="discrete">Values</h4>
<h4 id="_values_20" class="discrete">Values</h4>
<table class="tableblock frame-none grid-all stripes-odd stretch stretch">
<colgroup>
<col style="width: 20%;">
Expand Down Expand Up @@ -5898,7 +5932,7 @@ <h4 id="_values_19" class="discrete">Values</h4>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2021-10-11 17:07:36 +1100
Last updated 2021-10-21 16:45:34 +1100
</div>
</div>
</body>
Expand Down
Binary file modified Doc/img/nd_img_DisableModManagement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_GetLogoFullSize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_GetLogoThumbnailSize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_GetProjectEnvironment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_IsModManagementBusy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_K2_GetModDependenciesAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_K2_GetModTagOptionsAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_K2_UnsubscribeFromModAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_ListUserSubscriptionAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_MakeApiKey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_MakeAuthParams.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_QueryUserInstallations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Source/Modio/GeneratedSource/SDKModManagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Modio
{
Modio::ErrorCode EnableModManagement(std::function<void(Modio::ModManagementEvent)> Callback)
Modio::ErrorCode EnableModManagement(std::function<void(Modio::ModManagementEvent)> ModManagementHandler)
{
if (!Modio::Detail::SDKSessionData::IsInitialized())
{
Expand All @@ -38,7 +38,7 @@ namespace Modio
{
return Modio::make_error_code(Modio::ModManagementError::ModManagementAlreadyEnabled);
}
Modio::Detail::SDKSessionData::SetUserModManagementCallback(Callback);
Modio::Detail::SDKSessionData::SetUserModManagementCallback(ModManagementHandler);
Modio::Detail::SDKSessionData::AllowModManagement();
Modio::Detail::BeginModManagementLoopAsync([](Modio::ErrorCode ec) mutable {
if (ec)
Expand Down
2 changes: 1 addition & 1 deletion Source/Modio/Private/Internal/Convert/ModInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ FORCEINLINE FModioModInfo ToUnreal(const Modio::ModInfo& In)
Out.ProfileDateAdded = ToUnrealDateTime(In.ProfileDateAdded);
Out.ProfileDateUpdated = ToUnrealDateTime(In.ProfileDateUpdated);
Out.ProfileDateLive = ToUnrealDateTime(In.ProfileDateLive);
Out.ProfileMaturityOption = ToUnreal(In.ProfileMaturityOption);
Out.ProfileMaturityOption = ToUnreal<EModioMaturityFlags, Modio::MaturityOption>(In.ProfileMaturityOption);
Out.MetadataBlob = FString(In.MetadataBlob.c_str()); // Converting verbatim rather than via TCHAR as ToUnreal does
Out.FileInfo = ToUnreal(In.FileInfo);
Out.MetadataKvp = ToUnreal<FModioMetadata>(In.MetadataKvp);
Expand Down
9 changes: 9 additions & 0 deletions Source/Modio/Private/Internal/ModioConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "Internal/ModioPrivateDefines.h"
#include "Misc/DateTime.h"
#include "ModioSDK.h"
#include "Templates/UnrealTypeTraits.h"
#include "Types/ModioCommonTypes.h"
#include <chrono>
#include <string>
Expand Down Expand Up @@ -382,4 +383,12 @@ FModioFileMetadataID ToUnreal(Modio::FileMetadataID Value)
return FModioFileMetadataID(Value);
}

template<typename DestType, typename UnderlyingType, typename FlagType>
typename TEnableIf<TIsDerivedFrom<FlagType, Modio::FlagImpl<UnderlyingType>>::Value, DestType>::Type ToUnreal(
FlagType Flags)
{
return static_cast<DestType>(Flags.RawValue());
}


#pragma endregion
18 changes: 11 additions & 7 deletions Source/Modio/Public/Types/ModioModInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ namespace Modio
{
struct ModInfo;
}
UENUM(BlueprintType, meta = (Bitflags, UseEnumValuesAsMaskValuesInEditor = "true"))
enum class EModioMaturityFlags : uint8
{
None,
Alcohol = 1,
Drugs = 2,
Violence = 4,
Explicit = 8
};


/** @brief Full mod profile including current release information, media links, and stats */
USTRUCT(BlueprintType)
Expand Down Expand Up @@ -75,15 +85,9 @@ struct MODIO_API FModioModInfo
* @brief Flags for maturity options
* Maturity options flagged by the mod developer, this is only relevant if the parent game allows mods to
* be labeled as mature.
*
* 0 = None set (default)
* 1 = Alcohol
* 2 = Drugs
* 4 = Violence
* 8 = Explicit
**/
UPROPERTY(BlueprintReadOnly, Category = "Profile")
uint8 ProfileMaturityOption;
EModioMaturityFlags ProfileMaturityOption;

UPROPERTY(BlueprintReadOnly, Category = "Metadata")
FString MetadataBlob;
Expand Down

0 comments on commit f7c1674

Please sign in to comment.