#pragma once

#include "CoreMinimal.h"
#include "ItemInstance.h"
#include "SexToyItem.h"
#include "SexToyInstance.generated.h"

/** Per-instance mutable state for sex toys. */
USTRUCT()
struct FSexToyInstanceState : public FItemInstanceState
{
	GENERATED_BODY()

	UPROPERTY(SaveGame)
	bool bActive = false;

	UPROPERTY(SaveGame)
	float Battery = 1.0f;
};

UCLASS()
class NAKEDDESIRE_API USexToyInstance : public UItemInstance
{
	GENERATED_BODY()

public:
	USexToyItem* GetSexToyItem() const { return Cast<USexToyItem>(ItemDefinition); }

protected:
	virtual void CaptureState(FInstancedStruct& OutState) const override;
	virtual void ApplyState(const FInstancedStruct& InState) override;

	UPROPERTY(BlueprintReadOnly, Category = "Sex Toy")
	bool bActive = false;

	UPROPERTY(BlueprintReadOnly, Category = "Sex Toy")
	float Battery = 1.0f;
};