Server-authoritative, data-driven item/inventory/interaction/carry/equipment/ world-slot/placement/crafting framework. 8 modules, compiles against UE 5.7. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
// Copyright ExByte Studios. Item Interaction Ecosystem.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "StorageContainerActor.generated.h"
|
|
|
|
class UStaticMeshComponent;
|
|
class UInteractableComponent;
|
|
class UInventoryComponent;
|
|
|
|
/**
|
|
* A lootable world container (chest, crate, fridge, vehicle cargo, corpse) (section 5).
|
|
* Its inventory is shared-replicated so any nearby player who opens it sees the
|
|
* contents; transfers go through the validated server path (section 31.2).
|
|
*/
|
|
UCLASS()
|
|
class ITEMWORLD_API AStorageContainerActor : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AStorageContainerActor();
|
|
|
|
UFUNCTION(BlueprintPure, Category = "Storage")
|
|
UInventoryComponent* GetStorageInventory() const { return Storage; }
|
|
|
|
protected:
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Storage")
|
|
TObjectPtr<UStaticMeshComponent> Mesh;
|
|
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Storage")
|
|
TObjectPtr<UInteractableComponent> Interactable;
|
|
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Storage")
|
|
TObjectPtr<UInventoryComponent> Storage;
|
|
};
|