diff --git a/EndlessVendetta/Content/BountySystem/BountyDirector.uasset b/EndlessVendetta/Content/BountySystem/BountyDirector.uasset index 13661ced..1b888d58 100644 --- a/EndlessVendetta/Content/BountySystem/BountyDirector.uasset +++ b/EndlessVendetta/Content/BountySystem/BountyDirector.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f62b028aaa92370d26281005a26678e2b3d6e2ba93c0ee7ae227a3d2ba6377db -size 18565 +oid sha256:bb8e5904b3c1342d8d6620e5d8d57475d1c42ad4bd07d3f4854238eb7b3b2775 +size 2478 diff --git a/EndlessVendetta/Content/BountySystem/BountyDirector/BountyDirector.uasset b/EndlessVendetta/Content/BountySystem/BountyDirector/BountyDirector.uasset new file mode 100644 index 00000000..5d472e20 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/BountyDirector/BountyDirector.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38bc96d6b46050e363e792f2362ef3fdb191cb5efc6f8c176794cb28bcb44b94 +size 21920 diff --git a/EndlessVendetta/Content/BountySystem/PC_Background.jpg b/EndlessVendetta/Content/BountySystem/BountyDirector/PC_Background.jpg similarity index 100% rename from EndlessVendetta/Content/BountySystem/PC_Background.jpg rename to EndlessVendetta/Content/BountySystem/BountyDirector/PC_Background.jpg diff --git a/EndlessVendetta/Content/BountySystem/BountyDirector/PC_Background.uasset b/EndlessVendetta/Content/BountySystem/BountyDirector/PC_Background.uasset new file mode 100644 index 00000000..9c10c987 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/BountyDirector/PC_Background.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2a0411ac8a6f3df1704187cfb5d62a200088e7d4605f05666b65e18645351d7 +size 247653 diff --git a/EndlessVendetta/Content/BountySystem/BountyDirector/WBP_PC_Display.uasset b/EndlessVendetta/Content/BountySystem/BountyDirector/WBP_PC_Display.uasset new file mode 100644 index 00000000..7f96ce3b --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/BountyDirector/WBP_PC_Display.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27c4b4b5d9be3a90d5643aea54f75e7f52f85f5158e6a8cf6806c1e0a8efb346 +size 209883 diff --git a/EndlessVendetta/Content/BountySystem/BountyDirector/WBP_StaticPCBG.uasset b/EndlessVendetta/Content/BountySystem/BountyDirector/WBP_StaticPCBG.uasset new file mode 100644 index 00000000..02a4c8b4 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/BountyDirector/WBP_StaticPCBG.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fd8cfefdb9488ee066675e784fe4fe0ec31f689d82741b5cc8d5cfdbf0b64e4 +size 29059 diff --git a/EndlessVendetta/Content/BountySystem/PC_Background.uasset b/EndlessVendetta/Content/BountySystem/PC_Background.uasset deleted file mode 100644 index 508b868f..00000000 --- a/EndlessVendetta/Content/BountySystem/PC_Background.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:112f033362de501319bab461fad7a299b4aa4e95f30f506514260da920a3af07 -size 247528 diff --git a/EndlessVendetta/Content/BountySystem/WBP_PC_Display.uasset b/EndlessVendetta/Content/BountySystem/WBP_PC_Display.uasset deleted file mode 100644 index eb52f6f8..00000000 --- a/EndlessVendetta/Content/BountySystem/WBP_PC_Display.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5108f2d9e72c0c5935678a1fca2dda316472ca588e74e85fc321b9c7bf46933 -size 73724 diff --git a/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset b/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset index 0f990580..4035333e 100644 --- a/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset +++ b/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc35eb2d43a47427d30aba0196f9eac90d089dd3abca319528c5d25c83510d0d -size 72364642 +oid sha256:655b999e9a4eece94dfd8ff9f1f36832e15e1f642be1ea42abb55bfefbe9ec4b +size 66790690 diff --git a/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset b/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset index e9b09590..bf2e4391 100644 --- a/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset +++ b/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c7ea4b8f4ba84d970fabbc731c246e0744fe104a295e3422823f0ebb8798ae1 -size 53268 +oid sha256:01ef616c7a8bd90cd1b7a13efb18a56f33346efbae51efa31f09804478b7621d +size 43456 diff --git a/EndlessVendetta/Content/__ExternalActors__/Levels/BountySystemTestLevel/C/N1/E7M6U3RRQJ0NKZWADRZU2F.uasset b/EndlessVendetta/Content/__ExternalActors__/Levels/BountySystemTestLevel/C/N1/E7M6U3RRQJ0NKZWADRZU2F.uasset index a6d9a764..a466798b 100644 --- a/EndlessVendetta/Content/__ExternalActors__/Levels/BountySystemTestLevel/C/N1/E7M6U3RRQJ0NKZWADRZU2F.uasset +++ b/EndlessVendetta/Content/__ExternalActors__/Levels/BountySystemTestLevel/C/N1/E7M6U3RRQJ0NKZWADRZU2F.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7be067073df07be66cbc1d10a227dbdbdb65550aa37fc9ba7c7c4b7716e2ff41 -size 4397 +oid sha256:833df8f0fca89205f775bf4b28e645ebf10d9a1ef4a621370a8dc01612aa1031 +size 5660 diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp index f9f7a46e..4d1321e6 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.cpp @@ -204,8 +204,13 @@ void ABountyDirector::Interact() UPC_Display* PC_Display = Cast(PC_DisplayWidget); bool GameOver = !IsValid(ActiveBounty); PC_Display->PC_Display_Info.IsGameOver = GameOver; + PC_Display->LogoutFromBountyDirectorPC.AddDynamic(this, &ABountyDirector::DestroyBountyDirectorPCWidget); - if (GameOver) return; + if (GameOver) + { + PC_Display->LoadOS(); + return; + } // Info about main bounty PC_Display->PC_Display_Info.MB_Title = GetBountyTitle(); @@ -239,6 +244,21 @@ void ABountyDirector::Interact() PC_Display->PC_Display_Info.CustomBountyAlteration_Cost.Add(ActiveBounty->GetCustomBountyAlteration_2_Cost()); PC_Display->PC_Display_Info.CustomBountyAlteration_Cost.Add(ActiveBounty->GetCustomBountyAlteration_3_Cost()); + PC_Display->PC_Display_Info.PlayersFavourAmount = Favours; + PC_Display->LoadOS(); } +void ABountyDirector::DestroyBountyDirectorPCWidget() +{ + if (IsValid(PC_DisplayWidget)) PC_DisplayWidget->RemoveFromParent(); + + FInputModeGameOnly InputMode; + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetInputMode(InputMode); + PlayerController->bShowMouseCursor = false; + PlayerController->bEnableClickEvents = false; + PlayerController->bEnableMouseOverEvents = false; +} + + diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.h index 790b7d1d..3af1d407 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/BountyDirector.h @@ -65,6 +65,9 @@ protected: UFUNCTION() void DestroyActiveSideBounties(); + UFUNCTION() + void DestroyBountyDirectorPCWidget(); + UFUNCTION() void EarnFavours(int FavoursEarned); diff --git a/EndlessVendetta/Source/EndlessVendetta/UserWidgets/PC_Display.h b/EndlessVendetta/Source/EndlessVendetta/UserWidgets/PC_Display.h index f8e50a38..70ff31a2 100644 --- a/EndlessVendetta/Source/EndlessVendetta/UserWidgets/PC_Display.h +++ b/EndlessVendetta/Source/EndlessVendetta/UserWidgets/PC_Display.h @@ -43,18 +43,33 @@ struct FPC_Display_Info UPROPERTY(BlueprintReadWrite, Category = "PC_Display_Info") TArray CustomBountyAlteration_Cost; + + UPROPERTY(BlueprintReadWrite, Category = "PC_Display_Info") + int PlayersFavourAmount; }; +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FLogoutFromBountyDirectorPC); + UCLASS() class ENDLESSVENDETTA_API UPC_Display : public UUserWidget { GENERATED_BODY() +protected: + UFUNCTION(BlueprintCallable, Category = "PC_Display") + void LogoutButtonPressed() + { + LogoutFromBountyDirectorPC.Broadcast(); + } public: + FLogoutFromBountyDirectorPC LogoutFromBountyDirectorPC; + + UPROPERTY(BlueprintReadOnly) + FPC_Display_Info PC_Display_Info; + UFUNCTION(BlueprintImplementableEvent, Category = "PC_Display") void LoadOS(); - UPROPERTY(BlueprintReadOnly) - FPC_Display_Info PC_Display_Info; + };