76 lines
2.1 KiB
C++
76 lines
2.1 KiB
C++
// Copyright Pacificao. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/SaveGame.h"
|
|
#include "AgrarianTypes.h"
|
|
#include "AgrarianSaveGame.generated.h"
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FAgrarianSavedPlayer
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FString PlayerId;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FTransform Transform;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FAgrarianSurvivalSnapshot Survival;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FAgrarianCareHistorySnapshot CareHistory;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
TArray<FAgrarianItemStack> Inventory;
|
|
};
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FAgrarianSavedWorldActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FName ActorTypeId = NAME_None;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FTransform Transform;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
TMap<FName, FString> StringState;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
TMap<FName, float> NumberState;
|
|
};
|
|
|
|
UCLASS()
|
|
class UAgrarianSaveGame : public USaveGame
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
int32 SaveVersion = 1;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
float WorldHours = 8.0f;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
EAgrarianWeatherType Weather = EAgrarianWeatherType::Clear;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FAgrarianMappedWeatherInputs WeatherInputs;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
FAgrarianWeatherDebugSnapshot WeatherDebug;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
TArray<FAgrarianSavedPlayer> Players;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Save")
|
|
TArray<FAgrarianSavedWorldActor> WorldActors;
|
|
};
|