diff --git a/Config/steamvr_ue_editor_app.json b/Config/steamvr_ue_editor_app.json index 3863c5d0..9ab050ab 100644 --- a/Config/steamvr_ue_editor_app.json +++ b/Config/steamvr_ue_editor_app.json @@ -2,15 +2,15 @@ "source": "UE", "applications": [ { - "app_key": "application.generated.ue.fortis_taktika-17155196.ue4editor.exe", + "app_key": "application.generated.ue.fortis_taktika-18319896.ue4editor.exe", "launch_type": "url", "url": "steam://launch/", - "action_manifest_path": "C:/Users/Mustardo Bastardo/Documents/FORTIS_Taktika/Config/SteamVRBindings/steamvr_manifest.json", + "action_manifest_path": "C:/Users/c/Documents/Unreal Projects/Fortis/Config/SteamVRBindings/steamvr_manifest.json", "strings": { "en_us": { - "name": "FORTIS_Taktika-17155196 [UE Editor]" + "name": "FORTIS_Taktika-18319896 [UE Editor]" } } } diff --git a/Content/Blueprints/Building/BP_BuildingProcedural.uasset b/Content/Blueprints/Building/BP_BuildingProcedural.uasset index 4b8cbe94..64601450 100644 Binary files a/Content/Blueprints/Building/BP_BuildingProcedural.uasset and b/Content/Blueprints/Building/BP_BuildingProcedural.uasset differ diff --git a/Content/Blueprints/Download/BP_DownloadImage.uasset b/Content/Blueprints/Download/BP_DownloadImage.uasset index 545e4a5f..6d78a88d 100644 Binary files a/Content/Blueprints/Download/BP_DownloadImage.uasset and b/Content/Blueprints/Download/BP_DownloadImage.uasset differ diff --git a/Content/Blueprints/Environment/BP_ApartmentPlan.uasset b/Content/Blueprints/Environment/BP_ApartmentPlan.uasset new file mode 100644 index 00000000..fbe8a961 Binary files /dev/null and b/Content/Blueprints/Environment/BP_ApartmentPlan.uasset differ diff --git a/Content/Blueprints/Environment/BP_ClosingDoor.uasset b/Content/Blueprints/Environment/BP_ClosingDoor.uasset new file mode 100644 index 00000000..16e68fc7 Binary files /dev/null and b/Content/Blueprints/Environment/BP_ClosingDoor.uasset differ diff --git a/Content/Blueprints/Environment/BP_Door.uasset b/Content/Blueprints/Environment/BP_Door.uasset new file mode 100644 index 00000000..d152c702 Binary files /dev/null and b/Content/Blueprints/Environment/BP_Door.uasset differ diff --git a/Content/Blueprints/LevelActors/BP_FerrisWheel.uasset b/Content/Blueprints/LevelActors/BP_FerrisWheel.uasset index 5de8d146..aa3defa5 100644 Binary files a/Content/Blueprints/LevelActors/BP_FerrisWheel.uasset and b/Content/Blueprints/LevelActors/BP_FerrisWheel.uasset differ diff --git a/Content/Blueprints/Managers/BP_Controller.uasset b/Content/Blueprints/Managers/BP_Controller.uasset index 88df821b..21052f9d 100644 Binary files a/Content/Blueprints/Managers/BP_Controller.uasset and b/Content/Blueprints/Managers/BP_Controller.uasset differ diff --git a/Content/Blueprints/Managers/BP_GameInstance.uasset b/Content/Blueprints/Managers/BP_GameInstance.uasset index 03b1e3c3..a8e138c2 100644 Binary files a/Content/Blueprints/Managers/BP_GameInstance.uasset and b/Content/Blueprints/Managers/BP_GameInstance.uasset differ diff --git a/Content/Blueprints/Managers/BP_PawnOverview.uasset b/Content/Blueprints/Managers/BP_PawnOverview.uasset index 9a2de19e..fe24aa37 100644 Binary files a/Content/Blueprints/Managers/BP_PawnOverview.uasset and b/Content/Blueprints/Managers/BP_PawnOverview.uasset differ diff --git a/Content/Blueprints/Managers/BP_PawnWalking.uasset b/Content/Blueprints/Managers/BP_PawnWalking.uasset index 64bdfc15..1c3b24c3 100644 Binary files a/Content/Blueprints/Managers/BP_PawnWalking.uasset and b/Content/Blueprints/Managers/BP_PawnWalking.uasset differ diff --git a/Content/Blueprints/Managers/Floor/BP_FloorManager.uasset b/Content/Blueprints/Managers/Floor/BP_FloorManager.uasset index 08c5a800..b680bf76 100644 Binary files a/Content/Blueprints/Managers/Floor/BP_FloorManager.uasset and b/Content/Blueprints/Managers/Floor/BP_FloorManager.uasset differ diff --git a/Content/Blueprints/Managers/INF_Touch.uasset b/Content/Blueprints/Managers/INF_Touch.uasset new file mode 100644 index 00000000..88f37e3a Binary files /dev/null and b/Content/Blueprints/Managers/INF_Touch.uasset differ diff --git a/Content/Blueprints/Points/BP_Point.uasset b/Content/Blueprints/Points/BP_Point.uasset index 73722118..1ef4b688 100644 Binary files a/Content/Blueprints/Points/BP_Point.uasset and b/Content/Blueprints/Points/BP_Point.uasset differ diff --git a/Content/Blueprints/Startup/BP_ControllerStartupLevel.uasset b/Content/Blueprints/Startup/BP_ControllerStartupLevel.uasset index 978ed14f..66b4bc24 100644 Binary files a/Content/Blueprints/Startup/BP_ControllerStartupLevel.uasset and b/Content/Blueprints/Startup/BP_ControllerStartupLevel.uasset differ diff --git a/Content/Freestyle/Meshes/OSM/MD_Yard_Decal_01.uasset b/Content/Freestyle/Meshes/OSM/MD_Yard_Decal_01.uasset new file mode 100644 index 00000000..4212aec8 Binary files /dev/null and b/Content/Freestyle/Meshes/OSM/MD_Yard_Decal_01.uasset differ diff --git a/Content/Freestyle/Meshes/OSM/MD_Yard_Decal_02.uasset b/Content/Freestyle/Meshes/OSM/MD_Yard_Decal_02.uasset new file mode 100644 index 00000000..cbf075bb Binary files /dev/null and b/Content/Freestyle/Meshes/OSM/MD_Yard_Decal_02.uasset differ diff --git a/Content/Freestyle/Meshes/OSM/T_Yard_Decal_01.uasset b/Content/Freestyle/Meshes/OSM/T_Yard_Decal_01.uasset new file mode 100644 index 00000000..3523ea07 Binary files /dev/null and b/Content/Freestyle/Meshes/OSM/T_Yard_Decal_01.uasset differ diff --git a/Content/Freestyle/Meshes/OSM/T_Yard_Decal_02_.uasset b/Content/Freestyle/Meshes/OSM/T_Yard_Decal_02_.uasset new file mode 100644 index 00000000..835723f7 Binary files /dev/null and b/Content/Freestyle/Meshes/OSM/T_Yard_Decal_02_.uasset differ diff --git a/Content/HUD/Blueprints/BP_UIStateManager.uasset b/Content/HUD/Blueprints/BP_UIStateManager.uasset index 0a3f3222..fedb8e2e 100644 Binary files a/Content/HUD/Blueprints/BP_UIStateManager.uasset and b/Content/HUD/Blueprints/BP_UIStateManager.uasset differ diff --git a/Content/HUD/Templates/UW_InputBox.uasset b/Content/HUD/Templates/UW_InputBox.uasset index 47157216..378ca0fe 100644 Binary files a/Content/HUD/Templates/UW_InputBox.uasset and b/Content/HUD/Templates/UW_InputBox.uasset differ diff --git a/Content/HUD/Widgets/UW_About.uasset b/Content/HUD/Widgets/UW_About.uasset index f7f40a50..c0932d16 100644 Binary files a/Content/HUD/Widgets/UW_About.uasset and b/Content/HUD/Widgets/UW_About.uasset differ diff --git a/Content/HUD/Widgets/UW_FilterFlatPanel.uasset b/Content/HUD/Widgets/UW_FilterFlatPanel.uasset index c845a12d..8c86f394 100644 Binary files a/Content/HUD/Widgets/UW_FilterFlatPanel.uasset and b/Content/HUD/Widgets/UW_FilterFlatPanel.uasset differ diff --git a/Content/HUD/Widgets/UW_FlatCardVR.uasset b/Content/HUD/Widgets/UW_FlatCardVR.uasset index 547bb506..4c090696 100644 Binary files a/Content/HUD/Widgets/UW_FlatCardVR.uasset and b/Content/HUD/Widgets/UW_FlatCardVR.uasset differ diff --git a/Content/HUD/Widgets/UW_LoginGeneral.uasset b/Content/HUD/Widgets/UW_LoginGeneral.uasset index e0c17983..16c29107 100644 Binary files a/Content/HUD/Widgets/UW_LoginGeneral.uasset and b/Content/HUD/Widgets/UW_LoginGeneral.uasset differ diff --git a/Content/HUD/Widgets/UW_LoginPage.uasset b/Content/HUD/Widgets/UW_LoginPage.uasset index f5b5ada0..49676e11 100644 Binary files a/Content/HUD/Widgets/UW_LoginPage.uasset and b/Content/HUD/Widgets/UW_LoginPage.uasset differ diff --git a/Content/HUD/Widgets/UW_Main.uasset b/Content/HUD/Widgets/UW_Main.uasset index 74e17e5d..1a9f8133 100644 Binary files a/Content/HUD/Widgets/UW_Main.uasset and b/Content/HUD/Widgets/UW_Main.uasset differ diff --git a/Content/HUD/Widgets/UW_MainVR.uasset b/Content/HUD/Widgets/UW_MainVR.uasset index 50a12324..7ed618fa 100644 Binary files a/Content/HUD/Widgets/UW_MainVR.uasset and b/Content/HUD/Widgets/UW_MainVR.uasset differ diff --git a/Content/HUD/Widgets/UW_MenuFlat.uasset b/Content/HUD/Widgets/UW_MenuFlat.uasset index 0ba1a5d7..537083e3 100644 Binary files a/Content/HUD/Widgets/UW_MenuFlat.uasset and b/Content/HUD/Widgets/UW_MenuFlat.uasset differ diff --git a/Content/HUD/Widgets/UW_NavigationButtons.uasset b/Content/HUD/Widgets/UW_NavigationButtons.uasset index 57c44b77..978b8599 100644 Binary files a/Content/HUD/Widgets/UW_NavigationButtons.uasset and b/Content/HUD/Widgets/UW_NavigationButtons.uasset differ diff --git a/Content/HUD/Widgets/UW_Overview.uasset b/Content/HUD/Widgets/UW_Overview.uasset index 56f16a0b..4815420b 100644 Binary files a/Content/HUD/Widgets/UW_Overview.uasset and b/Content/HUD/Widgets/UW_Overview.uasset differ diff --git a/Content/HUD/Widgets/UW_Presentation.uasset b/Content/HUD/Widgets/UW_Presentation.uasset index b6dc97ed..bba70b4c 100644 Binary files a/Content/HUD/Widgets/UW_Presentation.uasset and b/Content/HUD/Widgets/UW_Presentation.uasset differ diff --git a/Content/HUD/Widgets/UW_SendOrPrint.uasset b/Content/HUD/Widgets/UW_SendOrPrint.uasset index 86bbc518..4894a3c4 100644 Binary files a/Content/HUD/Widgets/UW_SendOrPrint.uasset and b/Content/HUD/Widgets/UW_SendOrPrint.uasset differ diff --git a/Content/HUD/Widgets/UW_WelcomeUser.uasset b/Content/HUD/Widgets/UW_WelcomeUser.uasset index 22e86b59..4d6cbd98 100644 Binary files a/Content/HUD/Widgets/UW_WelcomeUser.uasset and b/Content/HUD/Widgets/UW_WelcomeUser.uasset differ diff --git a/Content/Maps/L_Startup.umap b/Content/Maps/L_Startup.umap index 503cabb8..4cd588c8 100644 Binary files a/Content/Maps/L_Startup.umap and b/Content/Maps/L_Startup.umap differ diff --git a/Content/Maps/L_Test.umap b/Content/Maps/L_Test.umap index 962a1917..ada790d9 100644 Binary files a/Content/Maps/L_Test.umap and b/Content/Maps/L_Test.umap differ diff --git a/Content/Taktika/Assets/Roads/SM_Roads_Test.uasset b/Content/Taktika/Assets/Roads/SM_Roads_Test.uasset index a636eb34..d2ffbf89 100644 Binary files a/Content/Taktika/Assets/Roads/SM_Roads_Test.uasset and b/Content/Taktika/Assets/Roads/SM_Roads_Test.uasset differ diff --git a/Content/Taktika/Maps/TKT_FakeLights.umap b/Content/Taktika/Maps/TKT_FakeLights.umap new file mode 100644 index 00000000..6d2454c9 Binary files /dev/null and b/Content/Taktika/Maps/TKT_FakeLights.umap differ diff --git a/Content/Tradicio/Maps/L_DeveloperTradition.umap b/Content/Tradicio/Maps/L_DeveloperTradition.umap index 0fe127db..80949140 100644 Binary files a/Content/Tradicio/Maps/L_DeveloperTradition.umap and b/Content/Tradicio/Maps/L_DeveloperTradition.umap differ diff --git a/Content/VRTemplate/Blueprints/BP_PawnVR.uasset b/Content/VRTemplate/Blueprints/BP_PawnVR.uasset index 76152651..1f3beca8 100644 Binary files a/Content/VRTemplate/Blueprints/BP_PawnVR.uasset and b/Content/VRTemplate/Blueprints/BP_PawnVR.uasset differ diff --git a/FORTIS_Taktika.uproject b/FORTIS_Taktika.uproject index f0fa2f47..89293697 100644 --- a/FORTIS_Taktika.uproject +++ b/FORTIS_Taktika.uproject @@ -25,15 +25,6 @@ "Name": "Landmass", "Enabled": true }, - { - "Name": "SteamVR", - "Enabled": false, - "SupportedTargetPlatforms": [ - "Win32", - "Win64", - "Linux" - ] - }, { "Name": "OpenXREyeTracker", "Enabled": false, @@ -134,6 +125,15 @@ { "Name": "JPrinter", "Enabled": true + }, + { + "Name": "SteamVR", + "Enabled": false, + "SupportedTargetPlatforms": [ + "Win32", + "Win64", + "Linux" + ] } ] } \ No newline at end of file diff --git a/Source/FORTIS_Taktika/Private/ResComApartmentManager.cpp b/Source/FORTIS_Taktika/Private/ResComApartmentManager.cpp index 8ea7395f..2cd25ddb 100644 --- a/Source/FORTIS_Taktika/Private/ResComApartmentManager.cpp +++ b/Source/FORTIS_Taktika/Private/ResComApartmentManager.cpp @@ -1,27 +1,70 @@ // Fill out your copyright notice in the Description page of Project Settings. - #include "ResComApartmentManager.h" // Sets default values -AResComApartmentManager::AResComApartmentManager() +UResComApartmentManager::UResComApartmentManager() { - // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. - PrimaryActorTick.bCanEverTick = true; - } -// Called when the game starts or when spawned -void AResComApartmentManager::BeginPlay() +void UResComApartmentManager::Push(FApartment apartment) { - Super::BeginPlay(); - + apartments.Push(apartment); } -// Called every frame -void AResComApartmentManager::Tick(float DeltaTime) +void UResComApartmentManager::ClearFavorites() { - Super::Tick(DeltaTime); - + for (auto& ap : apartments) + ap.favorite = false; } +bool UResComApartmentManager::IsValid(FApartment apartment) const +{ + return !(apartment.id == FApartment().id); +} + +FApartment& UResComApartmentManager::GetByID(int32 id) +{ + for (auto& ap : apartments) + { + if (ap.id == id) + return ap; + } + return notValid; +} + +FApartment& UResComApartmentManager::GetByLoc(FApartmentLocation loc) +{ + for (auto& ap : apartments) + { + if (ap.loc == loc) + return ap; + } + return notValid; +} + + +TArray UResComApartmentManager::GetFavorites() +{ + TArray favorites; + for (auto& ap : apartments) + if (ap.favorite) + favorites.Push(ap); + return favorites; +} + +void UResComApartmentManager::SortByLoc() +{ + apartments.Sort([](const FApartment& apa1, const FApartment& apa2) + { + return apa1.loc.AsNum() > apa2.loc.AsNum(); + }); +} + +void UResComApartmentManager::SortByID() +{ + apartments.Sort([](const FApartment& apa1, const FApartment& apa2) + { + return apa1.id > apa2.id; + }); +} \ No newline at end of file diff --git a/Source/FORTIS_Taktika/Private/CppGameInstance.cpp b/Source/FORTIS_Taktika/Private/ResComGameInstance.cpp similarity index 74% rename from Source/FORTIS_Taktika/Private/CppGameInstance.cpp rename to Source/FORTIS_Taktika/Private/ResComGameInstance.cpp index 187eee42..a199360f 100644 --- a/Source/FORTIS_Taktika/Private/CppGameInstance.cpp +++ b/Source/FORTIS_Taktika/Private/ResComGameInstance.cpp @@ -1,10 +1,67 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "CppGameInstance.h" +#include "ResComGameInstance.h" + +UResComGameInstance::UResComGameInstance() +{ +} + +void UResComGameInstance::Init() +{ + Super::Init(); + apartmentManager = NewObject(this); +} + +//void UResComGameInstance::SetApartmentManager(UResComApartmentManager* manager) +//{ +// apartmentManager = manager; +//} + +UResComApartmentManager* UResComGameInstance::GetApartmentManager() const +{ + return apartmentManager; +} -//void UCppGameInstance::HttpGet(FString UrlAddress, const FHttpDelegate& Callback) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +//void UResComGameInstance::HttpGet(FString UrlAddress, const FHttpDelegate& Callback) //{ // /*TSharedRef HttpRequest = FHttpModule::Get().CreateRequest(); // HttpRequest->SetHeader("Content-Type", "application/json"); @@ -33,7 +90,7 @@ // //HttpDownloadRequest = &HttpRequest.Get(); //} // -//void UCppGameInstance::OnHttpRequestComplete(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful) +//void UResComGameInstance::OnHttpRequestComplete(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful) //{ // if (bWasSuccessful && Response->GetContentType() == "application/json") // { @@ -58,7 +115,7 @@ // } //} // -//FString UCppGameInstance::GetHttpData() +//FString UResComGameInstance::GetHttpData() //{ // return HttpData; //} diff --git a/Source/FORTIS_Taktika/Private/ResComPoint.cpp b/Source/FORTIS_Taktika/Private/ResComPoint.cpp new file mode 100644 index 00000000..9b6680a7 --- /dev/null +++ b/Source/FORTIS_Taktika/Private/ResComPoint.cpp @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "ResComPoint.h" + +// Sets default values +AResComPoint::AResComPoint() +{ + // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; + +} + +// Called when the game starts or when spawned +void AResComPoint::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AResComPoint::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/Source/FORTIS_Taktika/Public/CppAnimation.h b/Source/FORTIS_Taktika/Public/CppAnimation.h index d0dba8e9..cd7d7a49 100644 --- a/Source/FORTIS_Taktika/Public/CppAnimation.h +++ b/Source/FORTIS_Taktika/Public/CppAnimation.h @@ -4,7 +4,6 @@ #include "CppStruct_AnimModeDirection.h" #include "Blueprint/UserWidget.h" -//#include "CppEnums.h" #include "Animation/WidgetAnimation.h" #include "CoreMinimal.h" diff --git a/Source/FORTIS_Taktika/Public/ResComApartmentManager.h b/Source/FORTIS_Taktika/Public/ResComApartmentManager.h index 3e7717db..bb90d9c3 100644 --- a/Source/FORTIS_Taktika/Public/ResComApartmentManager.h +++ b/Source/FORTIS_Taktika/Public/ResComApartmentManager.h @@ -2,8 +2,10 @@ #pragma once +#include "ResComPoint.h" +#include "Engine/Texture2DDynamic.h" #include "CoreMinimal.h" -#include "GameFramework/Actor.h" +//#include "GameFramework/Actor.h" #include "ResComApartmentManager.generated.h" @@ -12,12 +14,16 @@ USTRUCT(BlueprintType) struct FApartmentLocation { GENERATED_BODY() + UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 locHouse = 0; - UPROPERTY(EditAnywhere, BlueprintReadWrite) - int32 locFloor = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 locEntrance = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 locFloor = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 locApartment = 0; @@ -25,24 +31,179 @@ struct FApartmentLocation { return (loc.locHouse == locHouse) && (loc.locFloor == locFloor) && (loc.locEntrance == locEntrance) && (loc.locApartment == locApartment); } + + int32 AsNum() const + { + return (locHouse * 10000 + locEntrance * 1000 + locFloor * 100 + locApartment); + } }; - -UCLASS() -class FORTIS_TAKTIKA_API AResComApartmentManager : public AActor +USTRUCT(BlueprintType) +struct FApartmentQuantities { GENERATED_BODY() - -public: - // Sets default values for this actor's properties - AResComApartmentManager(); -protected: - // Called when the game starts or when spawned - virtual void BeginPlay() override; + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 rooms = 0; -public: - // Called every frame - virtual void Tick(float DeltaTime) override; + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 toilets = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 bedrooms = 0; }; + +UENUM(BlueprintType) +enum RoomType +{ + room UMETA(DisplayName = "room"), + bedroom UMETA(DisplayName = "bedroom"), + toilet UMETA(DisplayName = "toilet"), + bathroom UMETA(DisplayName = "bathroom"), + wardrobe UMETA(DisplayName = "wardrobe"), + hallway UMETA(DisplayName = "hallway"), + balcony UMETA(DisplayName = "balcony"), + kitchen UMETA(DisplayName = "kitchen"), + livingRoom UMETA(DisplayName = "livingRoom"), + kitchen_livingRoom UMETA(DisplayName = "kitchen_livingRoom"), + +}; + +UENUM(BlueprintType) +enum ApartmentType +{ + default UMETA(DisplayName = "default"), + studio UMETA(DisplayName = "studio"), + duplex UMETA(DisplayName = "duplex"), +}; + +USTRUCT(BlueprintType) +struct FRoomArea +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TEnumAsByte type = RoomType::room; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float meters = 0.0f; +}; + +USTRUCT(BlueprintType) +struct FApartmentAreas +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float full = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray rooms; + +}; + +USTRUCT(BlueprintType) +struct FApartmentCosts +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float full = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float month = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float meter = 0.0f; +}; + +USTRUCT(BlueprintType) +struct FApartmentReferences +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray textures; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + AResComPoint* point = nullptr; +}; + +USTRUCT(BlueprintType) +struct FApartment +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 id = -1; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString nameRC; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FApartmentLocation loc; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool favorite = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TEnumAsByte type; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FApartmentReferences references; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FApartmentQuantities quantities; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FApartmentAreas areas; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FApartmentCosts costs; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray properties; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString description; +}; + +UCLASS(BlueprintType) +class FORTIS_TAKTIKA_API UResComApartmentManager : public UObject +{ + GENERATED_BODY() +private: + TArray apartments; + FApartment notValid; +public: + UResComApartmentManager(); + + // valid + UFUNCTION(BlueprintCallable = "valid") + bool IsValid(FApartment apartment) const; + + //modify + UFUNCTION(BlueprintCallable = "modify") + void Push(FApartment apartment); + + UFUNCTION(BlueprintCallable = "modify") + void ClearFavorites(); + + // get + UFUNCTION(BlueprintCallable, Category = "get") + FApartment& GetByID(int32 id); + + UFUNCTION(BlueprintCallable, Category = "get") + FApartment& GetByLoc(FApartmentLocation loc); + + UFUNCTION(BlueprintCallable, Category = "get") + TArray GetFavorites(); + + //sort + UFUNCTION(BlueprintCallable, Category = "sort") + void SortByLoc(); + + UFUNCTION(BlueprintCallable, Category = "sort") + void SortByID(); +}; diff --git a/Source/FORTIS_Taktika/Public/CppGameInstance.h b/Source/FORTIS_Taktika/Public/ResComGameInstance.h similarity index 63% rename from Source/FORTIS_Taktika/Public/CppGameInstance.h rename to Source/FORTIS_Taktika/Public/ResComGameInstance.h index 6e7c1837..8ee2bdb7 100644 --- a/Source/FORTIS_Taktika/Public/CppGameInstance.h +++ b/Source/FORTIS_Taktika/Public/ResComGameInstance.h @@ -2,6 +2,7 @@ #pragma once +#include "ResComApartmentManager.h" #include "Engine/LatentActionManager.h" #include "Interfaces/IHttpRequest.h" #include "Runtime/Online/HTTP/Public/HttpModule.h" @@ -12,7 +13,7 @@ #include "LatentActions.h" #include "CoreMinimal.h" #include "Engine/GameInstance.h" -#include "CppGameInstance.generated.h" +#include "ResComGameInstance.generated.h" /** * @@ -21,13 +22,24 @@ DECLARE_DYNAMIC_DELEGATE_OneParam(FHttpDelegate, FString, Content); UCLASS() -class FORTIS_TAKTIKA_API UCppGameInstance : public UGameInstance +class FORTIS_TAKTIKA_API UResComGameInstance : public UGameInstance { GENERATED_BODY() private: + UResComApartmentManager* apartmentManager; //FString HttpData; //FHttpDelegate& Callback; +protected: + //UFUNCTION(BlueprintCallable, Category = "ApartmentManager") + //void SetApartmentManager(UResComApartmentManager* manager); public: + UResComGameInstance(); + virtual void Init(); + UFUNCTION(BlueprintCallable, Category = "ApartmentManager") + UResComApartmentManager* GetApartmentManager() const; + + + //UFUNCTION(BlueprintCallable) //void HttpGet(FString UrlAddress, const FHttpDelegate& Callback); //void OnHttpRequestComplete(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful); diff --git a/Source/FORTIS_Taktika/Public/ResComPoint.h b/Source/FORTIS_Taktika/Public/ResComPoint.h new file mode 100644 index 00000000..a3d29616 --- /dev/null +++ b/Source/FORTIS_Taktika/Public/ResComPoint.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "ResComPoint.generated.h" + +UCLASS() +class FORTIS_TAKTIKA_API AResComPoint : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AResComPoint(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +};