This commit is contained in:
George Taylor 2023-05-11 12:17:06 +01:00
commit 62273aca77
6 changed files with 18 additions and 7 deletions

Binary file not shown.

BIN
Content/Levels/Build.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3dcd6725cae15728675778ef6b354e65afeac29b4d17244d19c27cf8db49d025
size 3394495

View File

@ -55,7 +55,9 @@ public:
UPROPERTY(EditAnyWhere)
float TraceDistance = 200;
UFUNCTION(BlueprintCallable)
void InputDisabler();
void LineTraceLogic();
UPROPERTY()

View File

@ -54,12 +54,13 @@ void UQuestSystem::TickComponent(float DeltaTime, ELevelTick TickType, FActorCom
void UQuestSystem::CheckActiveQuestConditions()
{
TArray<UQuest*> JustCompletedQuests;
for (UQuest* Quest : ActiveQuests)
{
if (Quest->CheckConditions(GetWorldState()))
{
CompletedQuests.Add(Quest);
Quest->ApplyRewards(PlayerInventory);
JustCompletedQuests.Add(Quest);
for (TTuple<FString, bool> QuestFlag : Quest->QuestFlagsOnComplete)
{
QuestFlags.Add(QuestFlag.Key, QuestFlag.Value);
@ -79,6 +80,11 @@ void UQuestSystem::CheckActiveQuestConditions()
}
UpdateQuestGoalsUI(Quest);
}
for (UQuest* Quest : JustCompletedQuests)
{
ActiveQuests.Remove(Quest);
Quest->ApplyRewards(PlayerInventory);
}
}
UWorldState* UQuestSystem::GetWorldState() const