diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml
index 8cf8769f..d530d550 100644
--- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml
+++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml
@@ -8,19 +8,11 @@
-
-
-
-
-
-
-
-
+
+
-
-
@@ -45,28 +37,28 @@
- {
+ "keyToString": {
+ "C++ Project.EndlessVendetta.executor": "Run",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "PuaseMenuTabs",
+ "ignore.virus.scanning.warn.message": "true",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "vue.rearranger.settings.migration": "true"
},
- "keyToStringList": {
- "rider.external.source.directories": [
- "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache",
- "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache",
- "C:\\Users\\Rafal\\AppData\\Local\\Symbols\\src"
+ "keyToStringList": {
+ "rider.external.source.directories": [
+ "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache",
+ "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache",
+ "C:\\Users\\Rafal\\AppData\\Local\\Symbols\\src"
]
}
-}]]>
+}
@@ -143,6 +135,7 @@
+
diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
index 56637590..98254401 100644
--- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
+++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8940bc41955ada96468ffc747fadce7e4ffd6e694118e4367d00dcf18407f17a
-size 494513
+oid sha256:d1e82512f58222609355f190b818512aca42bd72377a314bd938c93737d67013
+size 488555
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset
new file mode 100644
index 00000000..e0b0170f
--- /dev/null
+++ b/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:73c562cd7614a47d3e9c8504b3f67104b4ce07cbf83c4f6ea95a72ac600b3664
+size 132511
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_InProgressTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_InProgressTab.uasset
new file mode 100644
index 00000000..be773711
--- /dev/null
+++ b/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_InProgressTab.uasset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59190025f1005df0289f316350ff872ab5196312dd5446a0b74375b00bac3a67
+size 28821
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_TutorialBountiesTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_TutorialBountiesTab.uasset
new file mode 100644
index 00000000..db1f0e94
--- /dev/null
+++ b/EndlessVendetta/Content/PauseMenu/Tabs/BountyTabs/WBP_TutorialBountiesTab.uasset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:99cde5382b36e7940d39b88e4aa1ec50d77759185a35362b8834919ec983f13e
+size 26273
diff --git a/EndlessVendetta/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset b/EndlessVendetta/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset
deleted file mode 100644
index fcf2da3e..00000000
--- a/EndlessVendetta/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4dd8fb12b1bf5ebd10c41083bc1aff236c5daf1d26a1a18aef5e8a07a8975ac6
-size 133345
diff --git a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
index 0fb612e5..c5c3b84e 100644
--- a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
+++ b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b4b77d0bb4418c2e9b324fb5d23e90ecd64ddd13698533659b6fbf435da206e9
-size 43745
+oid sha256:4a60a29ad596546d481e43dfb8698842a78cc07f4a4b1000fa397cfba4e72331
+size 158206
diff --git a/EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset b/EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
index 56bddfc9..1d8c9235 100644
--- a/EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
+++ b/EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3a8777c01491888bba9f40eda9d2bed76a611f0e80f75917501ce69c1a321342
-size 47333
+oid sha256:89eb1506e508685a1af663376434dabce0e1bcd54ea2832f7870a91eebf13749
+size 47710
diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp
index 742aab23..899cbd9f 100644
--- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp
+++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp
@@ -34,10 +34,11 @@ void ABountyHunterCharacter::CompleteCurrentMainBounty(UEVGameInstance* GI)
// Collect rewards for bounty and move onto next
UE_LOG(LogTemp, Warning, TEXT("Would be collecting reward for completing bounty %d"), CurrentMainBountyIndex);
- FTransform PostBountySpawnTransform = MainBountyClasses[CurrentMainBountyIndex]->GetDefaultObject()->GetPlayerSpawnTransform();
- SetActorTransform(PostBountySpawnTransform);
- Cast(GetController())->SetControlRotation(PostBountySpawnTransform.GetRotation().Rotator());
-
+ // FTransform PostBountySpawnTransform = MainBountyClasses[CurrentMainBountyIndex]->GetDefaultObject()->GetPlayerSpawnTransform();
+ // SetActorTransform(PostBountySpawnTransform);
+ // Cast(GetController())->SetControlRotation(PostBountySpawnTransform.GetRotation().Rotator());
+
+ GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = MainBountyClasses[CurrentMainBountyIndex]->GetDefaultObject()->GetPlayerSpawnTransform();
CurrentMainBountyIndex = GI->MainSaveGameInstanceRef->CurrentMainBountyIndexSave;
GI->MainSaveGameInstanceRef->LastMainBountyIndexInOpenWorld = CurrentMainBountyIndex;
UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
@@ -59,7 +60,7 @@ void ABountyHunterCharacter::BeginPlay()
{
SetActorTransform(GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave);
Cast(GetController())->SetControlRotation(GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave.GetRotation().Rotator());
- }
+ }
}
CreatePauseMenuTabs();
Super::BeginPlay();
@@ -107,7 +108,15 @@ void ABountyHunterCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason)
void ABountyHunterCharacter::CreatePauseMenuTabs()
{
- BountiesTab = CreateWidget(GetWorld(), BountyTabWidgetClass);
+ if (CurrentMainBountyIndex <= 0)
+ {
+ BountiesTab = CreateWidget(GetWorld(), TutorialBountyTabWidgetClass);
+ }
+ else
+ {
+ BountiesTab = CreateWidget(GetWorld(), UGameplayStatics::GetCurrentLevelName(GetWorld()) == OpenWorldLevelName ? BountyTabWidgetClass : BountyInProgressTabWidgetClass);
+ BountiesTab->ReturnToOpenWorldEarlyDelegate.AddDynamic(this, &ABountyHunterCharacter::ReturnToOpenWorldEarly);
+ }
UpdateBountyTabInfo();
FavoursTab = CreateWidget(GetWorld(), FavoursTabWidgetClass);
NavigationTab = CreateWidget(GetWorld(), NavigationTabWidgetClass);
@@ -140,4 +149,15 @@ void ABountyHunterCharacter::TogglePauseMenu()
PauseMenu->OpenedNavigationTab.AddDynamic(this, &ABountyHunterCharacter::OpenNavigationTab);
PauseMenu->OpenedSettingsTab.AddDynamic(this, &ABountyHunterCharacter::OpenSettingsTab);
PauseMenu->OpenedQuitTab.AddDynamic(this, &ABountyHunterCharacter::OpenQuitTab);
-}
\ No newline at end of file
+}
+
+void ABountyHunterCharacter::ReturnToOpenWorldEarly()
+{
+ UEVGameInstance* GI = Cast(GetGameInstance());
+ if (!IsValid(GI->MainSaveGameInstanceRef)) return;
+ FTransform SpawnTransform = MainBountyClasses[CurrentMainBountyIndex]->GetDefaultObject()->GetPlayerSpawnTransform();
+
+ GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = SpawnTransform;
+ UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
+ UGameplayStatics::OpenLevel(GetWorld(), FName(OpenWorldLevelName));
+}
diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h
index c125d168..fe0ea38c 100644
--- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h
+++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h
@@ -85,6 +85,14 @@ private:
// Widget Class used to Spawn Bounties Tab Widget
UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
TSubclassOf BountyTabWidgetClass;
+
+ // Widget Class used to Spawn Bounties Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf BountyInProgressTabWidgetClass;
+
+ // Widget Class used to Spawn Bounties Tab Widget
+ UPROPERTY(EditDefaultsOnly, Category = "Pause Menu")
+ TSubclassOf TutorialBountyTabWidgetClass;
// Reference to Bounty Tab Widget
UPROPERTY()
@@ -177,4 +185,7 @@ private:
BountiesTab->UpdateBountyTab(BountyTabInfo);
}
+
+ UFUNCTION()
+ void ReturnToOpenWorldEarly();
};
diff --git a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h
index 5fe2279b..56f3d49c 100644
--- a/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h
+++ b/EndlessVendetta/Source/EndlessVendetta/PauseMenu/BountiesTab.h
@@ -9,6 +9,7 @@
#include "BountiesTab.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FTrackBounty, ABountyClass*, BountyToTrack);
+DECLARE_DYNAMIC_MULTICAST_DELEGATE(FReturnToOpenWorldEarly);
UCLASS()
class ENDLESSVENDETTA_API UBountiesTab : public UTabWidget
@@ -23,6 +24,9 @@ public:
UPROPERTY(BlueprintAssignable)
FTrackBounty TrackBountyDelegate;
+ UPROPERTY(BlueprintCallable)
+ FReturnToOpenWorldEarly ReturnToOpenWorldEarlyDelegate;
+
// ------------------- METHODS ---------------------------------
private: