Make tags singular

This commit is contained in:
nsubiron 2018-10-21 15:18:28 +02:00
parent 6ea34785c8
commit 8f20693ffa
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,8 @@ static FString GetRelevantTagAsString(const AActor &Actor)
{
if ((Tag != ECityObjectLabel::None) && (Tag != ECityObjectLabel::Other))
{
return ATagger::GetTagAsString(Tag).ToLower();
auto Str = ATagger::GetTagAsString(Tag).ToLower();
return (Str.EndsWith(TEXT("s")) ? Str.LeftChop(1) : Str);
}
}
return TEXT("unknown");

View File

@ -114,7 +114,7 @@ void ATagger::GetTagsOfTaggedActor(const AActor &Actor, TArray<ECityObjectLabel>
FString ATagger::GetTagAsString(const ECityObjectLabel Label)
{
switch (Label) {
#define CARLA_GET_LABEL_STR(lbl) case ECityObjectLabel:: lbl : return #lbl;
#define CARLA_GET_LABEL_STR(lbl) case ECityObjectLabel:: lbl : return TEXT(#lbl);
default:
CARLA_GET_LABEL_STR(None)
CARLA_GET_LABEL_STR(Buildings)