a lottt of stuff

This commit is contained in:
Milxnor
2023-03-05 01:03:51 -05:00
parent 039731eb68
commit 3e2da1eedf
44 changed files with 2086 additions and 1165 deletions

View File

@@ -0,0 +1,67 @@
#pragma once
#include "NameTypes.h"
#include "Array.h"
struct FGameplayTag
{
static const int npos = -1; // lol?
FName TagName;
};
struct FGameplayTagContainer
{
TArray<FGameplayTag> GameplayTags;
TArray<FGameplayTag> ParentTags;
std::string ToStringSimple(bool bQuoted)
{
std::string RetString;
for (int i = 0; i < GameplayTags.Num(); ++i)
{
if (bQuoted)
{
RetString += ("\"");
}
RetString += GameplayTags.at(i).TagName.ToString();
if (bQuoted)
{
RetString += ("\"");
}
if (i < GameplayTags.Num() - 1)
{
RetString += (", ");
}
}
return RetString;
}
int Find(const std::string& Str)
{
for (int i = 0; i < GameplayTags.Num(); i++)
{
if (GameplayTags.at(i).TagName.ToString() == Str)
return i;
}
return FGameplayTag::npos;
}
int Find(FGameplayTag& Tag)
{
return Find(Tag.TagName.ToString());
}
bool Contains(const std::string& Str)
{
return Find(Str) != FGameplayTag::npos;
}
void Reset()
{
GameplayTags.Free();
ParentTags.Free();
}
};