// Copyright Pacificao. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "AgrarianTypes.generated.h" UENUM(BlueprintType) enum class EAgrarianWeatherType : uint8 { Clear UMETA(DisplayName = "Clear"), Rain UMETA(DisplayName = "Rain"), ColdWind UMETA(DisplayName = "Cold Wind"), Storm UMETA(DisplayName = "Storm") }; USTRUCT(BlueprintType) struct FAgrarianItemStack { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Inventory") FName ItemId = NAME_None; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Inventory") FText DisplayName; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Inventory", meta = (ClampMin = "0")) int32 Quantity = 0; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Inventory", meta = (ClampMin = "0")) float UnitWeight = 0.0f; bool IsValidStack() const { return ItemId != NAME_None && Quantity > 0; } }; UENUM(BlueprintType) enum class EAgrarianItemType : uint8 { Resource UMETA(DisplayName = "Resource"), Food UMETA(DisplayName = "Food"), Tool UMETA(DisplayName = "Tool"), Structure UMETA(DisplayName = "Structure"), Medicine UMETA(DisplayName = "Medicine"), Currency UMETA(DisplayName = "Currency") }; USTRUCT(BlueprintType) struct FAgrarianItemDefinition { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Items") FName ItemId = NAME_None; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Items") FText DisplayName; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Items") FText Description; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Items") EAgrarianItemType ItemType = EAgrarianItemType::Resource; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Items", meta = (ClampMin = "0")) float UnitWeight = 0.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Items", meta = (ClampMin = "1")) int32 MaxStackSize = 99; }; USTRUCT(BlueprintType) struct FAgrarianRecipe { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Crafting") FName RecipeId = NAME_None; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Crafting") FText DisplayName; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Crafting") TArray Ingredients; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Crafting") FAgrarianItemStack Result; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Crafting", meta = (ClampMin = "0")) float CraftSeconds = 0.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Crafting") bool bRequiresCampfire = false; }; USTRUCT(BlueprintType) struct FAgrarianSurvivalSnapshot { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Survival") float Health = 100.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Survival") float Stamina = 100.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Survival") float Hunger = 100.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Survival") float Thirst = 100.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Survival") float BodyTemperature = 37.0f; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Survival") float InjurySeverity = 0.0f; };