diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml index c7122f6d..5fffd406 100644 --- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml @@ -9,14 +9,18 @@ + - - - - - - - + + + + + + + + + + diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CP_ElimTImothyHuntsmer.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CP_ElimTImothyHuntsmer.uasset index dcde058f..13650e05 100644 --- a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CP_ElimTImothyHuntsmer.uasset +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CP_ElimTImothyHuntsmer.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f56fcbf6bb0f0a1241275e1a3338f698f588e40b787abc4ccf7607de32e911df -size 57693 +oid sha256:402b1927aa8568280268ea72ed9a74d119cfb7f90b15aea33b51e2c77d676638 +size 98725 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence1.png b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence1.png new file mode 100644 index 00000000..798913fa --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6defdebce48d779d1cf9053de2a395b030f4034602ad2027a0b4a082b168cf3 +size 146340 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence1.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence1.uasset new file mode 100644 index 00000000..c61f6f3d --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence1.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a9afa23ae558b83cb702459c867762949f69aef33c0f2f8a56e183deef52932 +size 194758 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence2.png b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence2.png new file mode 100644 index 00000000..6b66e440 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40542ca5853424aac1fde9208cd0c1ed33cb85166ea4ec97ad8f0f3ca2e15346 +size 178614 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence2.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence2.uasset new file mode 100644 index 00000000..6f47784b --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b42f7563773dec9db697b0e2621bf9ce0f4f66c973f77ef24e3ffec0f633e14a +size 187754 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence3.png b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence3.png new file mode 100644 index 00000000..4dab7396 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7766c777eb648565ddd99693d5d8fb69dad34ce1d5489e69ce617939bbde6bf +size 19246 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence3.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence3.uasset new file mode 100644 index 00000000..ac6f5814 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/CinematicFrmaes/TimothyEliminatedSequence3.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:161d5bd4b9ad1fd63d358155ca4612b125d7471c35dd39219bb0727fdf255cf0 +size 46015 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset index 96dc5870..30ecc43f 100644 --- a/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b660e3da651b47390d53bd8d9007ec3d7b82bceaf97d1a266239be3c2f50c593 -size 23693 +oid sha256:c24d0e32c594435e5c24f57444e1a99c1c7e491256f16bf15f60f1a627928600 +size 23786 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/TargetEliminatedSequence.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/TargetEliminatedSequence.uasset new file mode 100644 index 00000000..cc5c5772 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/TargetEliminatedSequence.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59b317daaff6320cb349f0431e5afd1dda081e7ccd94c85e1410a79acb309b5c +size 15321 diff --git a/EndlessVendetta/Content/BountySystem/ApartmentBounty/WBP_TimothyEliminated.uasset b/EndlessVendetta/Content/BountySystem/ApartmentBounty/WBP_TimothyEliminated.uasset new file mode 100644 index 00000000..7288e08b --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/ApartmentBounty/WBP_TimothyEliminated.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cf418c167f49075338deb5047703b031ac61ed014b691277846e62a97bca97e +size 105471 diff --git a/EndlessVendetta/Content/BountySystem/CP_FinalCheckpoint.uasset b/EndlessVendetta/Content/BountySystem/CP_FinalCheckpoint.uasset index d83eaa94..069dbaf8 100644 --- a/EndlessVendetta/Content/BountySystem/CP_FinalCheckpoint.uasset +++ b/EndlessVendetta/Content/BountySystem/CP_FinalCheckpoint.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bff7e06faefe4d69d867d3c24fe024f6c2f4756865de9f78175303cb7c2c29a -size 29080 +oid sha256:b4def4c35207288e74d661944c22141894dab91956f6460bf59c67373a2732c4 +size 26814 diff --git a/EndlessVendetta/Content/Levels/MainMenuLevel.umap b/EndlessVendetta/Content/Levels/MainMenuLevel.umap index e211378a..346364de 100644 --- a/EndlessVendetta/Content/Levels/MainMenuLevel.umap +++ b/EndlessVendetta/Content/Levels/MainMenuLevel.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d351bbac850938f4243559fb2004190dc0a9ecc375e967e1beee57237a90123 -size 299666 +oid sha256:7154a02aabca9ad54b560faf66989f17a0baa31478911e832b090c33c7a4bb61 +size 299618 diff --git a/EndlessVendetta/Content/Levels/TempOpenWorld.umap b/EndlessVendetta/Content/Levels/TempOpenWorld.umap index abad9c56..331dc700 100644 --- a/EndlessVendetta/Content/Levels/TempOpenWorld.umap +++ b/EndlessVendetta/Content/Levels/TempOpenWorld.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd850d01c7675c006d7aa19c1ea2d9592326c10d27331654c11c6f2f79454d6a -size 13864680 +oid sha256:3977a136e9c4c43dad14b8288902b6cf0cf3c7b46eac4dfdcb8cc25e225edc02 +size 13864728 diff --git a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset index 42a6c437..c2a34afc 100644 --- a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset +++ b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22ae623a43a551b2c36f14689aeb372567771b015c4668c364a3fd54d4f325d5 -size 14831 +oid sha256:4c0ecf0ac0702cc2bd355ec050232a61c49e10f102448efbeb735a51824adef6 +size 14948 diff --git a/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset b/EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset index c5c3b84e..1eb32a8e 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:4a60a29ad596546d481e43dfb8698842a78cc07f4a4b1000fa397cfba4e72331 -size 158206 +oid sha256:0dcde453220655fac67fddd358a0d75a1acc371161351cf5e8ba123ea837763f +size 43745 diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp index 6b15a8b8..800f7138 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp @@ -2,17 +2,18 @@ #include "BountyHunterCharacter.h" - -#include "EndlessVendetta/EVGameInstance.h" #include "Kismet/GameplayStatics.h" void ABountyHunterCharacter::SpawnMainBounty() { UEVGameInstance* GI = Cast(GetGameInstance()); if (!IsValid(GI->MainSaveGameInstanceRef)) return; + CurrentMainBountyIndex = GI->MainSaveGameInstanceRef->LastMainBountyIndexInOpenWorld; - if (GI->MainSaveGameInstanceRef->CurrentMainBountyIndexSave > CurrentMainBountyIndex) CompleteCurrentMainBounty(); + UE_LOG(LogTemp, Warning, TEXT("Loaded current bounty as %d"), CurrentMainBountyIndex); + if (GI->MainSaveGameInstanceRef->CurrentMainBountyIndexSave > CurrentMainBountyIndex) CompleteCurrentMainBounty(GI); + if (MainBountyClasses.IsEmpty() || MainBountyClasses.Num() <= CurrentMainBountyIndex|| !IsValid(MainBountyClasses[CurrentMainBountyIndex])) { AllBountiesCompleted(); @@ -21,16 +22,19 @@ void ABountyHunterCharacter::SpawnMainBounty() CurrentMainBounty = GetWorld()->SpawnActor(MainBountyClasses[CurrentMainBountyIndex]); const FAttachmentTransformRules AttachmentTransformRules(EAttachmentRule::SnapToTarget, true); - AttachToComponent(GetRootComponent(), AttachmentTransformRules); + CurrentMainBounty->AttachToComponent(GetRootComponent(), AttachmentTransformRules); UGameplayStatics::GetCurrentLevelName(GetWorld()) == OpenWorldLevelName ? CurrentMainBounty->SpawnOpenWorldCheckpoint() : CurrentMainBounty->SpawnCheckpoints(); } -void ABountyHunterCharacter::CompleteCurrentMainBounty() +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 and moving onto next if possible")); - CurrentMainBountyIndex++; + UE_LOG(LogTemp, Warning, TEXT("Would be collecting reward for completing bounty %d"), CurrentMainBountyIndex); + + CurrentMainBountyIndex = GI->MainSaveGameInstanceRef->CurrentMainBountyIndexSave; + GI->MainSaveGameInstanceRef->LastMainBountyIndexInOpenWorld = CurrentMainBountyIndex; + UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0); } void ABountyHunterCharacter::AllBountiesCompleted() diff --git a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h index cc1719e9..27be1e7f 100644 --- a/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/Characters/BountyHunterCharacter.h @@ -4,6 +4,7 @@ #include "CoreMinimal.h" #include "EndlessVendetta/EndlessVendettaCharacter.h" +#include "EndlessVendetta/EVGameInstance.h" #include "EndlessVendetta/MainSaveGameClass.h" #include "EndlessVendetta/BountySystem/MainBountyClass.h" #include "BountyHunterCharacter.generated.h" @@ -42,7 +43,7 @@ private: void SpawnMainBounty(); // Collects Reward for Current Main Bounty and Increments the Main Bounty Index - void CompleteCurrentMainBounty(); + void CompleteCurrentMainBounty(UEVGameInstance* GI); // Replaces Normal Bounty Info UI with Unique Game Over UI void AllBountiesCompleted(); diff --git a/EndlessVendetta/Source/EndlessVendetta/EVGameInstance.cpp b/EndlessVendetta/Source/EndlessVendetta/EVGameInstance.cpp index 719e7fbd..9a27a2fd 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EVGameInstance.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/EVGameInstance.cpp @@ -11,6 +11,7 @@ void UEVGameInstance::CreateNewSaveGameInstance() MainSaveGameInstanceRef = Cast(UGameplayStatics::CreateSaveGameObject(UMainSaveGameClass::StaticClass())); MainSaveGameInstanceRef->CurrentMainBountyIndexSave = 0; + MainSaveGameInstanceRef->LastMainBountyIndexInOpenWorld = 0; UGameplayStatics::SaveGameToSlot(MainSaveGameInstanceRef, "MainSave", 0); } diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h index 9b3d51b9..a01cbd6c 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h @@ -138,6 +138,7 @@ protected: void RegenHealth(); FTimerHandle RegenHealthTimerHandle; + UFUNCTION(BlueprintCallable) void Heal(const float Amount); UFUNCTION(BlueprintImplementableEvent) diff --git a/EndlessVendetta/Source/EndlessVendetta/MainSaveGameClass.h b/EndlessVendetta/Source/EndlessVendetta/MainSaveGameClass.h index b673e1e7..16a1a718 100644 --- a/EndlessVendetta/Source/EndlessVendetta/MainSaveGameClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/MainSaveGameClass.h @@ -17,5 +17,8 @@ class ENDLESSVENDETTA_API UMainSaveGameClass : public USaveGame public: UPROPERTY() int CurrentMainBountyIndexSave; + + UPROPERTY() + int LastMainBountyIndexInOpenWorld; };