// Copyright ExByte Studios. Item Interaction Ecosystem.

#include "StorageContainerActor.h"
#include "InteractableComponent.h"
#include "InventoryComponent.h"
#include "Components/StaticMeshComponent.h"

AStorageContainerActor::AStorageContainerActor()
{
	bReplicates = true;
	PrimaryActorTick.bCanEverTick = false;

	Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
	SetRootComponent(Mesh);

	Interactable = CreateDefaultSubobject<UInteractableComponent>(TEXT("Interactable"));

	Storage = CreateDefaultSubobject<UInventoryComponent>(TEXT("Storage"));
	// Shared container: visible to whoever opens it, not just an owning client.
	Storage->bOwnerOnlyReplication = false;
}
