Lots more progress on the name overhaul

This commit is contained in:
2026-03-29 02:37:47 -04:00
parent 843e16b177
commit 091bfe1ad2
12 changed files with 106 additions and 233 deletions

View File

@@ -336,27 +336,6 @@ TArray<FWingProperty> FWingProperty::FindAllSubstring(const TArray<FWingProperty
return Result;
}
FWingProperty FWingProperty::FindOneExactMatch(const TArray<FWingProperty>& Props, const FString& Name)
{
TArray<FWingProperty> Matches;
for (const FWingProperty& P : Props)
{
if (WingUtils::Identifies(Name, P.Prop))
Matches.Add(P);
}
if (Matches.Num() == 0)
{
UWingServer::Printf(TEXT("ERROR: Property '%s' not found\n"), *Name);
return FWingProperty();
}
if (Matches.Num() > 1)
{
UWingServer::Printf(TEXT("ERROR: Ambiguous property '%s'\n"), *Name);
return FWingProperty();
}
return Matches[0];
}
bool FWingProperty::PopulateFromJson(FWingProperty& P, const FJsonObject* Json, bool AllOptional)
{
FString JsonKey = WingUtils::FormatName(P.Prop);