Files
ProjectEleri/Source/ProjectEleri/Data/BazarSettingsDataAsset.h

95 lines
2.3 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "BazarSettingsDataAsset.generated.h"
UENUM(BlueprintType)
enum class EBazarNpcEmotion: uint8
{
Trust,
Excitement,
Comfort,
MAX UMETA(Hidden)
};
USTRUCT(BlueprintType)
struct FBazarEmotionModifier
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, EditAnywhere)
EBazarNpcEmotion Emotion;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
float ValueMin = 0.f;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
float ValueMax = 0.f;
float GetValueInRange() const { return FMath::RandRange(ValueMin, ValueMax); }
};
USTRUCT(BlueprintType)
struct FBazarDialogueEmotionData
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, EditAnywhere)
TArray<FBazarEmotionModifier> EmotionModifiers;
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FString EmotionsData;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
FText DialogueText;
};
USTRUCT(BlueprintType)
struct FBazaarHaggleCardData
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FText CardName;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FText CardDescription;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 TrustModifier;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 ExcitementModifier;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 ComfortModifier;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (UIMin = "0", ClampMin = "0", UIMax = "20", ClampMax = "20"))
int32 CardDifficulty;
};
/**
*
*/
UCLASS()
class PROJECTELERI_API UBazarSettingsDataAsset : public UDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Eleri|Bazaar|Tresholds")
int32 HappyThreshold = 50;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Eleri|Bazaar|Tresholds")
int32 EmotionLowerThreshold = 65;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Eleri|Bazaar|Tresholds")
int32 EmotionUpperThreshold = 80;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Eleri|Bazaar")
TArray<FBazarDialogueEmotionData> AvailableDialogueEmotionData;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Eleri|Bazaar")
TArray<FBazaarHaggleCardData> HaggleCards;
virtual void PostLoad() override;
};