Merging UE4-Fortnite -> Main using CL#2047477

[CL 2049479 by Bob Tellez in Main branch]
This commit is contained in:
Bob Tellez
2014-04-23 19:29:53 -04:00
committed by UnrealBot
parent af59bb051a
commit 96c40b8974
233 changed files with 5505 additions and 2118 deletions
@@ -2786,6 +2786,7 @@ void ExportMCPDeclaration(FOutputDevice& Out, const FString& MessageName, TField
ToMCPTypeMappings.Add(TEXT("bool"), TEXT("boolean"));
ToMCPTypeMappings.Add(TEXT("double"), TEXT("double"));
ToMCPTypeMappings.Add(TEXT("float"), TEXT("float"));
ToMCPTypeMappings.Add(TEXT("byte"), TEXT("byte"));
ToAnnotationMappings.Add(TEXT("FString"), TEXT("@NotBlankOrNull"));
@@ -2859,8 +2860,18 @@ void ExportMCPDeclaration(FOutputDevice& Out, const FString& MessageName, TField
}
else
{
MCPTypeName = ToMCPTypeMappings.Find(VariableTypeName);
AnnotationName = ToAnnotationMappings.Find(VariableTypeName);
UByteProperty* ByteProperty = Cast<UByteProperty>(Property);
if (ByteProperty != NULL && ByteProperty->Enum != NULL)
{
// treat enums like strings because that's how they'll be exported in JSON
MCPTypeName = ToMCPTypeMappings.Find(TEXT("FString"));
AnnotationName = ToAnnotationMappings.Find(TEXT("FString"));
}
else
{
MCPTypeName = ToMCPTypeMappings.Find(VariableTypeName);
AnnotationName = ToAnnotationMappings.Find(VariableTypeName);
}
}
if (AnnotationName != NULL && !AnnotationName->IsEmpty())
@@ -2879,7 +2890,7 @@ void ExportMCPDeclaration(FOutputDevice& Out, const FString& MessageName, TField
}
else
{
FError::Throwf(TEXT("ExportMCPDeclaration - Unhandled property mapping '%s': %s"), *PropClass->GetName(), *Property->GetPathName());
FError::Throwf(TEXT("ExportMCPDeclaration - Unhandled property mapping '%s' (%s): %s"), *PropClass->GetName(), *VariableTypeName, *Property->GetPathName());
}
}
else