debugging for inventory system

This commit is contained in:
Ji Yoon Rhee 2025-02-03 23:12:46 +09:00
parent 15f41865fa
commit cdd5f7f67a
8 changed files with 25 additions and 11 deletions

View File

@ -12,7 +12,7 @@ AHYManualPickUp::AHYManualPickUp()
ItemID = FName("No ID");
Super::Name = "Item";
Super::Action = "Pick up";
Super::Action = "pick up";
}
void AHYManualPickUp::Interact_Implementation(APlayerController* Controller)
@ -22,5 +22,6 @@ void AHYManualPickUp::Interact_Implementation(APlayerController* Controller)
AHYPlayerCharacController* IController = Cast<AHYPlayerCharacController>(Controller);
if (IController->AddItemToInventoryByID(ItemID))
Destroy();
else UE_LOG(LogTemp, Warning, TEXT("Item not found."))
}

View File

@ -3,6 +3,7 @@
#include "HYPlayerCharacController.h"
#include "HYGameStateBase.h"
#include "Engine/DataTable.h"
#include "hwanyoung2Character.h"
AHYPlayerCharacController::AHYPlayerCharacController()

View File

@ -49,6 +49,18 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool CanBeUsed;
//can this item be bought at the store?
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool CanBeBought;
//is this a crafting item?
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool IsCraftItem;
//is this a cooking item?
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool IsCookingItem;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UTexture2D* ItemIcon;