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:
34
Source/ItemInventory/Public/ItemSaveGame.h
Normal file
34
Source/ItemInventory/Public/ItemSaveGame.h
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright ExByte Studios. Item Interaction Ecosystem.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/SaveGame.h"
|
||||
#include "ItemInstanceData.h"
|
||||
#include "InventoryContainer.h"
|
||||
#include "ItemSaveGame.generated.h"
|
||||
|
||||
/** Saved snapshot of one inventory (section 26). Only ids/state are kept. */
|
||||
USTRUCT(BlueprintType)
|
||||
struct ITEMINVENTORY_API FInventorySaveData
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(SaveGame)
|
||||
TArray<FItemInstanceData> Items;
|
||||
|
||||
UPROPERTY(SaveGame)
|
||||
TArray<FInventoryContainer> Containers;
|
||||
};
|
||||
|
||||
/** SaveGame object holding any number of named inventory snapshots. */
|
||||
UCLASS()
|
||||
class ITEMINVENTORY_API UItemSaveGame : public USaveGame
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/** Keyed by a stable inventory id chosen by the game (e.g. "Player0", a chest guid). */
|
||||
UPROPERTY(SaveGame)
|
||||
TMap<FName, FInventorySaveData> Inventories;
|
||||
};
|
||||
Reference in New Issue
Block a user