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>
96 lines
1.5 KiB
C
96 lines
1.5 KiB
C
// Copyright ExByte Studios. Item Interaction Ecosystem.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "ItemEnums.generated.h"
|
|
|
|
/**
|
|
* Where an item instance currently lives (section 5).
|
|
* Every state transition is validated server-side through the transaction layer.
|
|
*/
|
|
UENUM(BlueprintType)
|
|
enum class EItemLocationType : uint8
|
|
{
|
|
None,
|
|
World,
|
|
Inventory,
|
|
Container,
|
|
Held,
|
|
Equipped,
|
|
PlacementPreview,
|
|
Installed,
|
|
NestedContainer
|
|
};
|
|
|
|
/** Per-property replication scope (section 22). */
|
|
UENUM(BlueprintType)
|
|
enum class EItemPropertyReplicationPolicy : uint8
|
|
{
|
|
None,
|
|
OwnerOnly,
|
|
Everyone,
|
|
NearbyOnly,
|
|
ServerOnly
|
|
};
|
|
|
|
/** How an item is currently carried/equipped on a character (section 11). */
|
|
UENUM(BlueprintType)
|
|
enum class EHeldItemMode : uint8
|
|
{
|
|
None,
|
|
EquippedFromInventory,
|
|
CarryAttached,
|
|
CarryPhysicsHandle,
|
|
PlacementPreview
|
|
};
|
|
|
|
/** High level interaction mode resolved per option (section 8.5). */
|
|
UENUM(BlueprintType)
|
|
enum class EItemInteractionMode : uint8
|
|
{
|
|
None,
|
|
|
|
InstantPickup,
|
|
OpenLootUI,
|
|
PickupToInventory,
|
|
EquipFromWorld,
|
|
EquipFromInventory,
|
|
|
|
CarryAttached,
|
|
CarryPhysicsHandle,
|
|
DropHeldItem,
|
|
|
|
Inspect,
|
|
Use,
|
|
UseHeldOnTarget,
|
|
Combine,
|
|
|
|
StartPlacement,
|
|
ConfirmPlacement,
|
|
CancelPlacement,
|
|
|
|
InstallIntoWorldSlot,
|
|
RemoveFromWorldSlot,
|
|
|
|
TransferContainerItem,
|
|
SplitStack,
|
|
MergeStack
|
|
};
|
|
|
|
/** Container layout / role (section 7.2). */
|
|
UENUM(BlueprintType)
|
|
enum class EInventoryContainerType : uint8
|
|
{
|
|
SlotList,
|
|
Grid,
|
|
Equipment,
|
|
Hotbar,
|
|
VehicleCargo,
|
|
LootBox,
|
|
KeyRing,
|
|
Wallet,
|
|
CraftingInput,
|
|
CraftingOutput
|
|
};
|