Implemented Bounty Tab Functionality without Bounty Tracking

This commit is contained in:
Rafal Swierczek 2024-02-07 21:51:46 +00:00
parent e44395a58f
commit f1b5e5068c
16 changed files with 137 additions and 44 deletions

View File

@ -8,15 +8,22 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment=""> <list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/TabStructs/BountyTabInfo.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/TabStructs/BountyTabInfo.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/ApartmentBounty/MB_Apartment.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/ControlsTutorial/Bounty/MB_Training.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/Dialogue/Mayor_tutorial_dialogue_tree.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/Dialogue/Mayor_tutorial_dialogue_tree.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/Levels/MainMenuLevel.umap" beforeDir="false" afterPath="$PROJECT_DIR$/Content/Levels/MainMenuLevel.umap" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/WBP_TestMenuTab.uasset" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Particles/P_Ambient_Dust.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Particles/P_Ambient_Dust.uasset" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/MainBountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/MainBountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/PauseMenuClass.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/BountiesTab.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/BountiesTab.h" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -38,28 +45,28 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;C++ Project.EndlessVendetta.executor&quot;: &quot;Run&quot;, "C++ Project.EndlessVendetta.executor": "Run",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;git-widget-placeholder&quot;: &quot;PauseMenu&quot;, "git-widget-placeholder": "PuaseMenuTabs",
&quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;, "ignore.virus.scanning.warn.message": "true",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, "nodejs_package_manager_path": "npm",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "vue.rearranger.settings.migration": "true"
}, },
&quot;keyToStringList&quot;: { "keyToStringList": {
&quot;rider.external.source.directories&quot;: [ "rider.external.source.directories": [
&quot;C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache&quot;, "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache",
&quot;C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache&quot;, "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache",
&quot;C:\\Users\\Rafal\\AppData\\Local\\Symbols\\src&quot; "C:\\Users\\Rafal\\AppData\\Local\\Symbols\\src"
] ]
} }
}</component> }]]></component>
<component name="RunManager"> <component name="RunManager">
<configuration name="EndlessVendetta" type="CppProject" factoryName="C++ Project"> <configuration name="EndlessVendetta" type="CppProject" factoryName="C++ Project">
<configuration_1> <configuration_1>
@ -135,6 +142,7 @@
<workItem from="1706972179014" duration="11096000" /> <workItem from="1706972179014" duration="11096000" />
<workItem from="1707046474738" duration="8878000" /> <workItem from="1707046474738" duration="8878000" />
<workItem from="1707103463352" duration="6662000" /> <workItem from="1707103463352" duration="6662000" />
<workItem from="1707304148719" duration="10277000" />
</task> </task>
<servers /> <servers />
</component> </component>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,9 +7,36 @@
#include "SideBountyClass.h" #include "SideBountyClass.h"
#include "MainBountyClass.generated.h" #include "MainBountyClass.generated.h"
/** USTRUCT(BlueprintType)
* struct FMainBountyStruct
*/ {
GENERATED_BODY();
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString TargetName = "";
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString TargetDOB = "";
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString TargetOccupation = "";
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString TargetLocation = "";
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString BountyDescription = "";
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
UTexture2D* TargetPhoto = nullptr;
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
UTexture2D* Floorplan = nullptr;
UPROPERTY(BlueprintReadOnly)
bool Tracked = true;
};
UCLASS() UCLASS()
class ENDLESSVENDETTA_API AMainBountyClass : public ABountyClass class ENDLESSVENDETTA_API AMainBountyClass : public ABountyClass
{ {
@ -31,6 +58,9 @@ protected:
public: public:
// Struct Containing all Data to be Displayed about the Main Bounty
UPROPERTY(EditDefaultsOnly, Category = "Bounty")
FMainBountyStruct MainBountyStruct;
// ------------------- METHODS --------------------------------- // ------------------- METHODS ---------------------------------
private: private:

View File

@ -6,6 +6,21 @@
#include "BountyClass.h" #include "BountyClass.h"
#include "SideBountyClass.generated.h" #include "SideBountyClass.generated.h"
USTRUCT(BlueprintType)
struct FSideBountyStruct
{
GENERATED_BODY();
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString BountyTitle = "";
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
FString BountyDesc = "";
UPROPERTY(BlueprintReadOnly)
bool Tracked = true;
};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FCompletedSideBounty, int, FavoursEarned); DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FCompletedSideBounty, int, FavoursEarned);
UCLASS() UCLASS()

View File

@ -26,6 +26,7 @@ void ABountyHunterCharacter::SpawnMainBounty(UEVGameInstance* GI)
CurrentMainBounty->AttachToComponent(GetRootComponent(), AttachmentTransformRules); CurrentMainBounty->AttachToComponent(GetRootComponent(), AttachmentTransformRules);
UGameplayStatics::GetCurrentLevelName(GetWorld()) == OpenWorldLevelName ? CurrentMainBounty->SpawnOpenWorldCheckpoint() : CurrentMainBounty->SpawnCheckpoints(); UGameplayStatics::GetCurrentLevelName(GetWorld()) == OpenWorldLevelName ? CurrentMainBounty->SpawnOpenWorldCheckpoint() : CurrentMainBounty->SpawnCheckpoints();
MainBountyStruct = CurrentMainBounty->MainBountyStruct;
} }
void ABountyHunterCharacter::CompleteCurrentMainBounty(UEVGameInstance* GI) void ABountyHunterCharacter::CompleteCurrentMainBounty(UEVGameInstance* GI)
@ -107,6 +108,7 @@ void ABountyHunterCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason)
void ABountyHunterCharacter::CreatePauseMenuTabs() void ABountyHunterCharacter::CreatePauseMenuTabs()
{ {
BountiesTab = CreateWidget<UBountiesTab>(GetWorld(), BountyTabWidgetClass); BountiesTab = CreateWidget<UBountiesTab>(GetWorld(), BountyTabWidgetClass);
UpdateBountyTabInfo();
FavoursTab = CreateWidget<UTabWidget>(GetWorld(), FavoursTabWidgetClass); FavoursTab = CreateWidget<UTabWidget>(GetWorld(), FavoursTabWidgetClass);
NavigationTab = CreateWidget<UTabWidget>(GetWorld(), NavigationTabWidgetClass); NavigationTab = CreateWidget<UTabWidget>(GetWorld(), NavigationTabWidgetClass);
SettingsTab = CreateWidget<UTabWidget>(GetWorld(), SettingsTabWidgetClass); SettingsTab = CreateWidget<UTabWidget>(GetWorld(), SettingsTabWidgetClass);

View File

@ -6,7 +6,9 @@
#include "EndlessVendetta/EndlessVendettaCharacter.h" #include "EndlessVendetta/EndlessVendettaCharacter.h"
#include "EndlessVendetta/EVGameInstance.h" #include "EndlessVendetta/EVGameInstance.h"
#include "EndlessVendetta/MainSaveGameClass.h" #include "EndlessVendetta/MainSaveGameClass.h"
#include "EndlessVendetta/PauseMenu/TabStructs/BountyTabInfo.h"
#include "EndlessVendetta/BountySystem/MainBountyClass.h" #include "EndlessVendetta/BountySystem/MainBountyClass.h"
#include "EndlessVendetta/BountySystem/SideBountyClass.h"
#include "EndlessVendetta/PauseMenu/BountiesTab.h" #include "EndlessVendetta/PauseMenu/BountiesTab.h"
#include "EndlessVendetta/PauseMenu/PauseMenuClass.h" #include "EndlessVendetta/PauseMenu/PauseMenuClass.h"
#include "EndlessVendetta/PauseMenu/QuitTab.h" #include "EndlessVendetta/PauseMenu/QuitTab.h"
@ -160,4 +162,19 @@ private:
{ {
PauseMenu->OpenNewTab(QuitTab); PauseMenu->OpenNewTab(QuitTab);
} }
FBountyTabInfo BountyTabInfo;
FMainBountyStruct MainBountyStruct;
TArray<FSideBountyStruct> SideBountyStruct;
void UpdateBountyTabInfo()
{
if (!IsValid(BountiesTab)) return;
BountyTabInfo.MainBountyStruct = MainBountyStruct;
BountyTabInfo.SideBountyStructs = SideBountyStruct;
BountiesTab->UpdateBountyTab(BountyTabInfo);
}
}; };

View File

@ -3,6 +3,7 @@
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "TabStructs/BountyTabInfo.h"
#include "TabWidget.h" #include "TabWidget.h"
#include "EndlessVendetta/BountySystem/BountyClass.h" #include "EndlessVendetta/BountySystem/BountyClass.h"
#include "BountiesTab.generated.h" #include "BountiesTab.generated.h"
@ -28,4 +29,6 @@ private:
protected: protected:
public: public:
UFUNCTION(BlueprintImplementableEvent)
void UpdateBountyTab(FBountyTabInfo BountyTabInfo);
}; };

View File

@ -0,0 +1 @@
#include "BountyTabInfo.h"

View File

@ -0,0 +1,17 @@
#pragma once
#include "EndlessVendetta/BountySystem/MainBountyClass.h"
#include "EndlessVendetta/BountySystem/SideBountyClass.h"
#include "BountyTabInfo.generated.h"
USTRUCT(BlueprintType)
struct FBountyTabInfo
{
GENERATED_BODY();
UPROPERTY(BlueprintReadOnly)
FMainBountyStruct MainBountyStruct;
UPROPERTY(BlueprintReadOnly)
TArray<FSideBountyStruct> SideBountyStructs;
};