Files
Naked-Desire/Source/NakedDesire/SaveGame/ItemSaveRecord.h
T
2026-05-25 14:14:52 +03:00

39 lines
837 B
C++

#pragma once
#include "CoreMinimal.h"
#include "NakedDesire/Clothing/ClothingItemInstance.h"
#include "NakedDesire/Clothing/ClothingItem.h"
#include "ItemSaveRecord.generated.h"
class UClothingItemInstance;
USTRUCT()
struct NAKEDDESIRE_API FItemSaveRecord
{
GENERATED_BODY()
UPROPERTY(SaveGame)
FGuid InstanceId;
UPROPERTY(SaveGame)
TSoftObjectPtr<UClothingItem> Definition;
UPROPERTY(SaveGame)
float Condition = 1.0f;
UPROPERTY(SaveGame)
FGuid ParentId;
UPROPERTY(SaveGame)
FTransform WorldTransform;
void Init(const UClothingItemInstance* ClothingItemInstance);
};
inline void FItemSaveRecord::Init(const UClothingItemInstance* ClothingItemInstance)
{
InstanceId = ClothingItemInstance->GetInstanceId();
Definition = ClothingItemInstance->GetClothingItem();
Condition = ClothingItemInstance->Condition;
}