From 553a100aaa03d076524232967a12ea8f196ae2f4 Mon Sep 17 00:00:00 2001 From: Rafal Swierczek Date: Mon, 29 Apr 2024 17:21:15 +0100 Subject: [PATCH] Created Retrieve Weapon Checkpoint --- .../BountySpecificActors/BP_GunDeposit.uasset | 4 ++-- .../Tutorial/Checkpoints/CP_DepositGun.uasset | 4 ++-- .../Checkpoints/CP_RetrieveGun.uasset | 3 +++ .../Tutorial/Checkpoints/CP_TempEmpty.uasset | 4 ++-- .../BountySystem/Tutorial/MB_Training.uasset | 4 ++-- .../Levels/TempLevels/NewTutorialMap.umap | 4 ++-- .../Architecture/Floor_400x400.uasset | 4 ++-- .../Particles/P_Ambient_Dust.uasset | 4 ++-- .../{ => Weapons}/WeaponDepositCheckpoint.cpp | 3 +-- .../{ => Weapons}/WeaponDepositCheckpoint.h | 2 +- .../WeaponRetrieveCheckpoint.cpp | 17 +++++++++++++++++ .../WeaponRetrieveCheckpoint.h | 19 +++++++++++++++++++ 12 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_RetrieveGun.uasset rename EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/{ => Weapons}/WeaponDepositCheckpoint.cpp (90%) rename EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/{ => Weapons}/WeaponDepositCheckpoint.h (93%) create mode 100644 EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.h diff --git a/EndlessVendetta/Content/BountySystem/Tutorial/BountySpecificActors/BP_GunDeposit.uasset b/EndlessVendetta/Content/BountySystem/Tutorial/BountySpecificActors/BP_GunDeposit.uasset index c84efcb5..9acbb38d 100644 --- a/EndlessVendetta/Content/BountySystem/Tutorial/BountySpecificActors/BP_GunDeposit.uasset +++ b/EndlessVendetta/Content/BountySystem/Tutorial/BountySpecificActors/BP_GunDeposit.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c39c3ffc8681f28efcecf958ec93ce03ddfd330e250e488a0b05739b58d746d6 -size 23588 +oid sha256:498749010c1058bbc654321abfb10da584ddebda88e9c4682e7ce865d5d97e62 +size 40229 diff --git a/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_DepositGun.uasset b/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_DepositGun.uasset index b3543c42..4836b5e3 100644 --- a/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_DepositGun.uasset +++ b/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_DepositGun.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbbd98bf3691755654cb904710901bbd9932099a968f9598fd762d4e508a0a6c -size 26478 +oid sha256:bb8a2909138363b6a0c71e24f9c371cb288a71c65a3b50f0e7b8032274461c11 +size 32342 diff --git a/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_RetrieveGun.uasset b/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_RetrieveGun.uasset new file mode 100644 index 00000000..d5936b61 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_RetrieveGun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4982ae2d8a6d9dd80b163a6e6eba7a9487cc46482a15507d1349e42ca174988c +size 30648 diff --git a/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_TempEmpty.uasset b/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_TempEmpty.uasset index 67a1176a..4064f30f 100644 --- a/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_TempEmpty.uasset +++ b/EndlessVendetta/Content/BountySystem/Tutorial/Checkpoints/CP_TempEmpty.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fedfe3a6f7917c088a125c6acc634a9d3a1dc49c7d400be7a30eaafd139c8ba9 -size 32826 +oid sha256:c591d6a53ea93d26dba725f80a0fb9d335bebf1101fb6375531d04554c8f33a7 +size 35311 diff --git a/EndlessVendetta/Content/BountySystem/Tutorial/MB_Training.uasset b/EndlessVendetta/Content/BountySystem/Tutorial/MB_Training.uasset index a3cfdced..291f1936 100644 --- a/EndlessVendetta/Content/BountySystem/Tutorial/MB_Training.uasset +++ b/EndlessVendetta/Content/BountySystem/Tutorial/MB_Training.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8baa41a467ba28fde6f88447a8a2147487b6609ae92ef16882234efc8b5f526 -size 26938 +oid sha256:d06d6f9b3b238779cee23536cb40584cb45a1a64b633b5c05af1c90901ee54b4 +size 27114 diff --git a/EndlessVendetta/Content/Levels/TempLevels/NewTutorialMap.umap b/EndlessVendetta/Content/Levels/TempLevels/NewTutorialMap.umap index 0a1407cf..a47e6b23 100644 --- a/EndlessVendetta/Content/Levels/TempLevels/NewTutorialMap.umap +++ b/EndlessVendetta/Content/Levels/TempLevels/NewTutorialMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4211d6e2a422b1e3f11cd0d904174b94961728a807725b7702dee221a52cb74 -size 1956244 +oid sha256:049892b98268b6c5eaf345c60f3c06976000cc22ffec4a9148ced5b0b3c00438 +size 1956716 diff --git a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset index c2a34afc..e1ddbeaa 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:4c0ecf0ac0702cc2bd355ec050232a61c49e10f102448efbeb735a51824adef6 -size 14948 +oid sha256:f34894604d187a7eba3050fa6d38553a4f5c0b71b448168bea64d66999923002 +size 14831 diff --git a/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset b/EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset index 6c346533..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:66e856b0cf7404aa1ea67da95d15a6b5e3f4054a51188318d50553d3e44ea94a -size 53268 +oid sha256:01ef616c7a8bd90cd1b7a13efb18a56f33346efbae51efa31f09804478b7621d +size 43456 diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/WeaponDepositCheckpoint.cpp b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.cpp similarity index 90% rename from EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/WeaponDepositCheckpoint.cpp rename to EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.cpp index 2f6d999e..e2171874 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/WeaponDepositCheckpoint.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.cpp @@ -8,8 +8,7 @@ void AWeaponDepositCheckpoint::Interact() { if (!Active) return; - - UE_LOG(LogTemp,Warning, TEXT("Sooooo ermmmmmm")); + AEndlessVendettaCharacter* Player = Cast(GetWorld()->GetFirstPlayerController()->GetPawn()); if (Player->bHasRifle) Player->EquipSecondary(); Player->bLockSecondary = true; diff --git a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/WeaponDepositCheckpoint.h b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.h similarity index 93% rename from EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/WeaponDepositCheckpoint.h rename to EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.h index 953f0b01..641398c9 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/WeaponDepositCheckpoint.h +++ b/EndlessVendetta/Source/EndlessVendetta/BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.h @@ -16,7 +16,7 @@ class ENDLESSVENDETTA_API AWeaponDepositCheckpoint : public ACheckpointClass, pu GENERATED_BODY() protected: - void Interact() override; + virtual void Interact() override; UFUNCTION(BlueprintImplementableEvent) void OpenElevatorDoor(); diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.cpp b/EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.cpp new file mode 100644 index 00000000..ce472e9f --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.cpp @@ -0,0 +1,17 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "WeaponRetrieveCheckpoint.h" + +#include "EndlessVendettaCharacter.h" + +void AWeaponRetrieveCheckpoint::Interact() +{ + if (!Active) return; + AEndlessVendettaCharacter* Player = Cast(GetWorld()->GetFirstPlayerController()->GetPawn()); + Player->bLockSecondary = false; + Player->EquipSecondary(); + // Doesn't actually open elevator door im just too lazy to make another blueprint implementable event lol + OpenElevatorDoor(); + BroadcastCompletion(); +} diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.h b/EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.h new file mode 100644 index 00000000..63cabaf2 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponRetrieveCheckpoint.h @@ -0,0 +1,19 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "BountySystem/CheckPoints/Weapons/WeaponDepositCheckpoint.h" +#include "WeaponRetrieveCheckpoint.generated.h" + +/** + * + */ +UCLASS() +class ENDLESSVENDETTA_API AWeaponRetrieveCheckpoint : public AWeaponDepositCheckpoint +{ + GENERATED_BODY() + + void Interact() override; + +};