Compare commits
5 Commits
0a175f7813
...
f644fb99a8
| Author | SHA1 | Date | |
|---|---|---|---|
| f644fb99a8 | |||
| fdae0fddc8 | |||
| f304685f01 | |||
| 07c83b5c8e | |||
| de5ed7f328 |
@ -150,7 +150,9 @@ int FDTFluxParticipant::GetTeammateNum() const
|
|||||||
|
|
||||||
bool FDTFluxParticipant::IsTeam() const
|
bool FDTFluxParticipant::IsTeam() const
|
||||||
{
|
{
|
||||||
return Teammate.Num() > 1;
|
UE_LOG(logDTFluxCore, Verbose, TEXT("IsTeam() -> %s, Teamate Num %i"),
|
||||||
|
Team.IsEmpty() ? TEXT("TRUE") : TEXT("FALSE"), Teammate.Num());
|
||||||
|
return !Team.IsEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
const TArray<FDTFluxPerson>& FDTFluxParticipant::GetTeammate() const
|
const TArray<FDTFluxPerson>& FDTFluxParticipant::GetTeammate() const
|
||||||
@ -165,13 +167,18 @@ FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString& S
|
|||||||
{
|
{
|
||||||
return TEXT("");
|
return TEXT("");
|
||||||
}
|
}
|
||||||
FString FirstName;
|
|
||||||
FString LastName;
|
if (Teammate.Num() == 0)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
if (IsTeam())
|
if (IsTeam())
|
||||||
{
|
{
|
||||||
|
FString FullName;
|
||||||
|
UE_LOG(logDTFluxCore, Verbose, TEXT("Participant is a team"));
|
||||||
if (!Team.IsEmpty())
|
if (!Team.IsEmpty())
|
||||||
{
|
{
|
||||||
LastName = Team;
|
FullName = Team;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -180,24 +187,23 @@ FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString& S
|
|||||||
{
|
{
|
||||||
Names.Add(Person.LastName);
|
Names.Add(Person.LastName);
|
||||||
}
|
}
|
||||||
LastName = FString::Join(Names, TEXT("/"));
|
FullName = FString::Join(Names, TEXT("/"));
|
||||||
}
|
}
|
||||||
}
|
FullName = FullName.ToUpper();
|
||||||
else if (Teammate.Num() > 0)
|
if (FullName.Len() <= MaxChar)
|
||||||
{
|
{
|
||||||
FirstName = Teammate[0].FirstName;
|
return FullName;
|
||||||
LastName = Teammate[0].LastName;
|
|
||||||
}
|
}
|
||||||
else
|
return FullName.Left(MaxChar) + OverflowChar;
|
||||||
{
|
|
||||||
LastName = TEXT("Unknown");
|
|
||||||
}
|
}
|
||||||
|
FString FirstName = Teammate[0].FirstName;
|
||||||
|
FString LastName = Teammate[0].LastName;
|
||||||
FString Initial;
|
FString Initial;
|
||||||
if (!FirstName.IsEmpty())
|
if (!FirstName.IsEmpty())
|
||||||
{
|
{
|
||||||
Initial = FirstName.Left(1).ToUpper() + Separator;
|
Initial = FirstName.Left(1).ToUpper() + Separator;
|
||||||
}
|
}
|
||||||
FString FormattedLastName = LastName.ToUpper();
|
const FString FormattedLastName = LastName.ToUpper();
|
||||||
FString FullName = Initial + FormattedLastName;
|
FString FullName = Initial + FormattedLastName;
|
||||||
if (FullName.Len() <= MaxChar)
|
if (FullName.Len() <= MaxChar)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,13 +35,13 @@ public:
|
|||||||
UPROPERTY(BlueprintReadOnly, EditAnywhere)
|
UPROPERTY(BlueprintReadOnly, EditAnywhere)
|
||||||
TMap<FString /* ContestName */, FDTFluxContest> Contests;
|
TMap<FString /* ContestName */, FDTFluxContest> Contests;
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
UPROPERTY(BlueprintReadOnly, EditAnywhere)
|
||||||
TMap<int /*ContestId*/, FDTFluxContestRankings> ContestRankings;
|
TMap<int /*ContestId*/, FDTFluxContestRankings> ContestRankings;
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
UPROPERTY(BlueprintReadOnly, EditAnywhere)
|
||||||
TMap<FDTFluxStageKey, FDTFluxStageRankings> StageRankings;
|
TMap<FDTFluxStageKey, FDTFluxStageRankings> StageRankings;
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
UPROPERTY(BlueprintReadOnly, EditAnywhere)
|
||||||
TMap<FDTFluxSplitKey, FDTFluxSplitRankings> SplitRankings;
|
TMap<FDTFluxSplitKey, FDTFluxSplitRankings> SplitRankings;
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, CallInEditor, Category="DTFlux|ModelAsset")
|
UFUNCTION(BlueprintCallable, CallInEditor, Category="DTFlux|ModelAsset")
|
||||||
|
|||||||
@ -31,5 +31,5 @@ public:
|
|||||||
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
||||||
FString Gap = "-";
|
FString Gap = "-";
|
||||||
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
|
||||||
int Rank;
|
int Rank = -1;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user