Initial commit: Item Interaction Ecosystem plugin (UE5.7)
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>
This commit is contained in:
38
Source/ItemWorld/Public/StorageContainerActor.h
Normal file
38
Source/ItemWorld/Public/StorageContainerActor.h
Normal file
@ -0,0 +1,38 @@
|
||||
// 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;
|
||||
};
|
||||
Reference in New Issue
Block a user