// Project Lab - NHTV Igad

#pragma once

#include "GameFramework/SaveGame.h"
#include "SkillTreeState.h"
#include "PlayerSetupState.h"
#include "CharacterSettings.generated.h"

USTRUCT(BlueprintType)
struct FCharacterSave
{
	GENERATED_BODY()

public:
	UPROPERTY(BlueprintReadWrite, Category = "Save")
	FString name;

	UPROPERTY(BlueprintReadWrite, Category = "Save")
	FSkillTreeState skillTreeState;

	UPROPERTY(BlueprintReadWrite, Category = "Save")
	FCharacterCustomization characterCustomization;
	
	UPROPERTY(BlueprintReadWrite, Category = "Save")
	int32 characterClass;
};

UCLASS()
class UNREALPROJECT_API UCharacterSettings : public USaveGame
{
	GENERATED_BODY()
private:

public:
	UCharacterSettings(const FObjectInitializer& ObjectInitializer);

	UPROPERTY(BlueprintReadWrite, Category = "Basic")
	TArray<FCharacterSave> characterSaves;

	UFUNCTION(BlueprintCallable, Category = "Basic")
	TArray<FCharacterSave> GetValidCharacters() const;
public:
	static UCharacterSettings* Load();
	static void Save(UCharacterSettings* settings);

};