Files
inventory-system-plugin/Source/ItemInventory/Public/ItemSaveGame.h
Bonchellon 7f7e043a88 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>
2026-06-22 20:49:56 +03:00

35 lines
847 B
C++

// 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;
};