Skip to content

Commit

Permalink
remove unused structs
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Torrisi committed Oct 6, 2022
1 parent 7929d95 commit e6478cb
Showing 1 changed file with 0 additions and 90 deletions.
90 changes: 0 additions & 90 deletions Source/Foundation/Public/SolanaUtils/Utils/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,93 +151,3 @@ struct FTokenAccountArrayJson

UPROPERTY() TArray<FTokenBalanceDataJson> value;
};

UENUM(BlueprintType)
enum class EOwnableItemType : uint8
{
None,
Ship,
Structure,
Collectible,
Access,
Resource,
Count UMETA(Hidden)
};

USTRUCT()
struct FOwnable
{
GENERATED_BODY()

FOwnable() {}

FOwnable(const FName& InName, EOwnableItemType InItemType) : Name(InName), ItemType(InItemType) {}

UPROPERTY() FName Name;
UPROPERTY() FString Mint;
UPROPERTY() EOwnableItemType ItemType;
};

USTRUCT(BlueprintType)
struct FArrayOfOwnable
{
GENERATED_BODY()

TArray<FOwnable> OwnableArray;

static FArrayOfOwnable EmptyArrayOfOwnable;
};

USTRUCT(BlueprintType)
struct FOwnableData
{
GENERATED_BODY()

UPROPERTY(BlueprintReadWrite, EditAnywhere)
TMap<EOwnableItemType, FArrayOfOwnable> Ownables;

TArray<FOwnable> GetAllOwnables() const
{
TArray<FOwnable> OutOwnables;

TArray<FArrayOfOwnable> ArrayOfOwnables;
Ownables.GenerateValueArray(ArrayOfOwnables);

for (const FArrayOfOwnable& ArrayOfOwnable : ArrayOfOwnables)
{
OutOwnables.Append(ArrayOfOwnable.OwnableArray);
}

return OutOwnables;
}
};

USTRUCT()
struct FInventoryItem
{
GENERATED_BODY()

FInventoryItem(): Ownable(), Amount(0) { }
FInventoryItem(const FOwnable& Ownable, int64 Amount)
: Ownable(Ownable), Amount(Amount) { }

UPROPERTY() FOwnable Ownable;
UPROPERTY() int64 Amount;

bool operator==(const FInventoryItem& Other) const { return Other.Ownable.Mint == Ownable.Mint; }

friend uint32 GetTypeHash(const FInventoryItem& Other)
{
return GetTypeHash(Other.Ownable.Mint);
}
};

USTRUCT()
struct FTokenData
{
GENERATED_BODY()

UPROPERTY() FString Name;
UPROPERTY() FString Mint;
UPROPERTY() int64 Balance;
};

0 comments on commit e6478cb

Please sign in to comment.