Bugfix TTuple Error Cannot be Macroed

This commit is contained in:
Philip W 2023-10-20 23:10:10 +01:00
parent 6609476eec
commit 36daaaed16
2 changed files with 7 additions and 6 deletions

View File

@ -36,6 +36,7 @@ void UInventoryComponent::TickComponent(float DeltaTime, ELevelTick TickType, FA
bool UInventoryComponent::AddItem(UBaseItem* Item)
{
return false;
}
void UInventoryComponent::LineTraceForItemCheck()
@ -76,8 +77,8 @@ FInventoryTile UInventoryComponent::IndexToTile(const int Index) const
TTuple<UBaseItem*, bool> UInventoryComponent::GetItemAtIndex(const int Index)
{
if (!InventoryItems.IsValidIndex(Index)) return std::make_tuple(nullptr, false);
return std::make_tuple(InventoryItems[Index], true);
if (!InventoryItems.IsValidIndex(Index)) return MakeTuple(nullptr, false);
return MakeTuple(InventoryItems[Index], true);
}
int UInventoryComponent::TileToIndex(const FInventoryTile InventoryTile) const

View File

@ -18,11 +18,11 @@ public:
// Sets default values for this component's properties
UInventoryComponent();
UPROPERTY(EditDefaultsOnly, BlueprintRead, Category="Inventory")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Inventory")
int Columns = 10;
UPROPERTY(EditDefaultsOnly, BlueprintRead, Category="Inventory")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Inventory")
int Rows = 10;
UPROPERTY(EditDefaultsOnly, BlueprintRead, Category="Inventory")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Inventory")
float MaxPickupDistance = 200.0f;
protected:
@ -43,7 +43,7 @@ public:
bool IsRoomAvailable(class UBaseItem* Item, const int TopLeftIndex);
UFUNCTION(BlueprintCallable, Category="Inventory")
FInventoryTile IndexToTile(const int Index) const;
UFUNCTION(BlueprintCallable, Category="Inventory")
//UFUNCTION(BlueprintCallable, Category="Inventory")
TTuple<UBaseItem*, bool> GetItemAtIndex(const int Index);
UFUNCTION(BlueprintCallable, Category="Inventory")
int TileToIndex(const FInventoryTile InventoryTile) const;