From 900feee5a9e5624f831f426fc6f341bb7cc71627 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 13:07:44 +0000 Subject: [PATCH 01/35] Updated InventoryComponent and Shop Fixed InventoryComponent to now work with singular items so you can purchase items from the shop! --- Content/Blueprints/BP_HealingJellyItem.uasset | 4 ++-- Content/Blueprints/BP_Interaction.uasset | 4 ++-- Content/Blueprints/BP_MyTempCharacter.uasset | 4 ++-- Content/Blueprints/Items/BP_HealingJelly.uasset | 2 +- Content/Levels/MerchantPrototype.umap | 4 ++-- .../BaseItems/InventoryComponent.cpp | 17 ++++++++++++----- .../BaseItems/InventoryComponent.h | 5 ++++- .../PlayerTemp/TempCharacter.cpp | 8 ++++++-- .../PlayerTemp/TempCharacter.h | 4 ++-- 9 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Content/Blueprints/BP_HealingJellyItem.uasset b/Content/Blueprints/BP_HealingJellyItem.uasset index f66b6a9..06702c4 100644 --- a/Content/Blueprints/BP_HealingJellyItem.uasset +++ b/Content/Blueprints/BP_HealingJellyItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9bb81fd6a904d7139d83d81f2d8fbecf448eda7710959bfa2a32faf2e2eee72 -size 29888 +oid sha256:8bde496e61be34dbd75c08fee0b9ad7fff9751158af26fc77f5bae97167cc2e1 +size 31249 diff --git a/Content/Blueprints/BP_Interaction.uasset b/Content/Blueprints/BP_Interaction.uasset index dcb91cb..6a6fb20 100644 --- a/Content/Blueprints/BP_Interaction.uasset +++ b/Content/Blueprints/BP_Interaction.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42db740853a281bd78c277e9281ab2af4bdf9d0ee834045782e066ee782e9e67 -size 27990 +oid sha256:e31f123a59603938d430a7a585aef68184c0c01501f4c9952ac523ff1455c2dc +size 26551 diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset index 585dc7f..6bab0dc 100644 --- a/Content/Blueprints/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c720b55a9e91e62f991279ef9d043ef8e41e3282b1b1c640ddb46dd4c8efc543 -size 53356 +oid sha256:58b898c8869c0539a2cee866134a992678874e84fc45085a2fdb8d26b9e35b1c +size 52636 diff --git a/Content/Blueprints/Items/BP_HealingJelly.uasset b/Content/Blueprints/Items/BP_HealingJelly.uasset index 65677e7..85e397d 100644 --- a/Content/Blueprints/Items/BP_HealingJelly.uasset +++ b/Content/Blueprints/Items/BP_HealingJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79844600695e0e7790cb68584c0c58f21af18a8872904ccd645f1ec3108da22d +oid sha256:228d6db7c136bd371aa3b3333cd81dbea3d396a0df920eb88f521520af3438e7 size 6681 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 6a6e864..2abd349 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:085eef600d9d08558738acea97402875c1b986649999de674e98be2749afe503 -size 24931 +oid sha256:0cf793b6df5bd19e78d63cd14065a8b98fc78f7093ec18b1d127597c8295b329 +size 25103 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index 30156e9..a5a1a9f 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -25,30 +25,32 @@ void UInventoryComponent::BeginPlay() for(auto & BaseItem : DefaultItems) { AddItem(BaseItem); - } -} - + } +} + bool UInventoryComponent::AddItem(class UBaseItem* BaseItem) { //if the items is over the maxinventoryslots then it wont add the item if (Items.Num() >= MaxItemSlots || !BaseItem) { + UE_LOG(LogTemp, Display, TEXT("THERE ARE MORE ITEMS THAN THE INVENTORY SLOTS")); return false; } BaseItem->StoredItems = this; BaseItem->World = GetWorld(); Items.Add(BaseItem); - + UE_LOG(LogTemp, Display, TEXT("ITEM HAS BEEN ADDED")); //Update UI OnInventoryUpdated.Broadcast(); return true; } -bool UInventoryComponent::Remove(UBaseItem* BaseItem) +bool UInventoryComponent::Remove(class UBaseItem* BaseItem) { if(BaseItem) { + UE_LOG(LogTemp, Display, TEXT("ItEM HAS BEEN REMOVED")); BaseItem->StoredItems = nullptr; BaseItem->World = nullptr; Items.RemoveSingle(BaseItem); @@ -58,3 +60,8 @@ bool UInventoryComponent::Remove(UBaseItem* BaseItem) return false; } +UBaseItem* UInventoryComponent::GetItem(int32 Index) +{ + return Items[Index]; +} + diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h index d2fbb5a..bcfead2 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h @@ -36,6 +36,9 @@ public: UPROPERTY(BlueprintAssignable, Category= "Inventory") FOnInventoryUpdated OnInventoryUpdated; //This is our delegate - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Items") + UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category= "Items") TArray Items; // The items currently in the inventory + + UFUNCTION(BlueprintCallable, Category= "Inventory") + class UBaseItem* GetItem(int32 Index); }; diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 6171a59..07a7ae2 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -1,6 +1,8 @@ // Fill out your copyright notice in the Description page of Project Settings. #include "TempCharacter.h" + +#include "IDetailTreeNode.h" #include "Blueprint/UserWidget.h" #include "the_twilight_abyss/BaseItems/InventoryComponent.h" #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" @@ -82,9 +84,11 @@ void ATempCharacter::LineTraceLogic() if(GoldBalance >= 100) { GoldBalance -= 100; + Inventory->AddItem(OutHit.GetActor()->FindComponentByClass()->GetItem(0)); + //Inventory->AddItem(Cast(OutHit.GetActor())); + //Inventory->AddItem(OutHit.GetActor()->Get("HealingJelly")); UE_LOG(LogTemp, Display, TEXT("Item Purchased")); - // UInventoryComponent* tempInventory = GetOwner()->FindComponentByClass(); - // tempInventory->AddItem(ItemToBuy); + } if(GoldBalance <= 0) { diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 4760f2c..b3f30c7 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -54,6 +54,6 @@ public: UFUNCTION(BlueprintCallable, Category= "Items") void BuyItem(class UBaseItem* BuyItem); - // UPROPERTY(EditAnywhere, Category= "Items") - // UBaseItem ItemToBuy; + UPROPERTY(EditAnywhere, Category= "Items") + UBaseItem* ItemToBuy; }; From cee5188d472d4f32755f4b01f919c2a4ae539d2c Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 13:28:22 +0000 Subject: [PATCH 02/35] Updated TempCharacter Updated the buy function and made it more accessible to adding other items. --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 07a7ae2..dc32492 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -79,7 +79,7 @@ void ATempCharacter::LineTraceLogic() { return; } - if(OutHit.GetActor()->ActorHasTag("HealingJelly")) + if(OutHit.GetActor()->FindComponentByClass()) { if(GoldBalance >= 100) { From 220b21f2ca5fc1661f2e02b7cfc413bd4516da6b Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 13:53:47 +0000 Subject: [PATCH 03/35] Added BuffItem Placeholder Added the buffitem placeholder to the world. Currently the buffitem just does the same as the healing item. --- Content/Blueprints/Items/BP_BuffPlacedItem.uasset | 3 +++ Content/Levels/MerchantPrototype.umap | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Content/Blueprints/Items/BP_BuffPlacedItem.uasset diff --git a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset new file mode 100644 index 0000000..f46abce --- /dev/null +++ b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9ecf966e2e7b66ad861bbcd920a76f978de85ccd4177a90c419ddd42b8f56dc +size 30858 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 2abd349..5bd9445 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0cf793b6df5bd19e78d63cd14065a8b98fc78f7093ec18b1d127597c8295b329 -size 25103 +oid sha256:261b02cd1efeab8d9566ebb56d896f50befdcf86b2d88279768ab68f3b0f5454 +size 27119 From 811856b219221034ad92c0fbf73b00e5622957e5 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 14:53:22 +0000 Subject: [PATCH 04/35] Updated InventoryComponent & TempCharacter Made it so the buy system is universal meaning any devs will not have to keep adding more if statements just to set the items price. It can all be done in editor now and it all handles itself in the code. --- .../the_twilight_abyss/BaseItems/InventoryComponent.cpp | 2 +- Source/the_twilight_abyss/BaseItems/InventoryComponent.h | 2 +- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index a5a1a9f..40d8473 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -60,7 +60,7 @@ bool UInventoryComponent::Remove(class UBaseItem* BaseItem) return false; } -UBaseItem* UInventoryComponent::GetItem(int32 Index) +UBaseItem* UInventoryComponent::GetItem(int Index) { return Items[Index]; } diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h index bcfead2..af87438 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h @@ -40,5 +40,5 @@ public: TArray Items; // The items currently in the inventory UFUNCTION(BlueprintCallable, Category= "Inventory") - class UBaseItem* GetItem(int32 Index); + class UBaseItem* GetItem(int Index); }; diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index dc32492..9a0637b 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -41,6 +41,8 @@ void ATempCharacter::RightMoveInput(float Axis) void ATempCharacter::Tick(float DeltaTime) { Super::Tick(DeltaTime); + + UE_LOG(LogTemp, Warning, TEXT("Gold: %d"),GoldBalance); } // Gives the character the functionality @@ -81,14 +83,11 @@ void ATempCharacter::LineTraceLogic() } if(OutHit.GetActor()->FindComponentByClass()) { - if(GoldBalance >= 100) + if(GoldBalance >= OutHit.GetActor()->FindComponentByClass()->GetItem(0)->ItemCostPrice) { - GoldBalance -= 100; + GoldBalance -= OutHit.GetActor()->FindComponentByClass()->GetItem(0)->ItemCostPrice; Inventory->AddItem(OutHit.GetActor()->FindComponentByClass()->GetItem(0)); - //Inventory->AddItem(Cast(OutHit.GetActor())); - //Inventory->AddItem(OutHit.GetActor()->Get("HealingJelly")); UE_LOG(LogTemp, Display, TEXT("Item Purchased")); - } if(GoldBalance <= 0) { From c835567facb1ad614f1045ea22f05070378c5340 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 14:54:30 +0000 Subject: [PATCH 05/35] Updated Item Assets Added the gold value for each of the item assets --- Content/Blueprints/BP_HealingJellyItem.uasset | 2 +- Content/Blueprints/Items/BP_BuffJelly.uasset | 4 ++-- Content/Blueprints/Items/BP_BuffPlacedItem.uasset | 4 ++-- Content/Blueprints/Items/BP_HealingJelly.uasset | 4 ++-- Content/Levels/MerchantPrototype.umap | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Content/Blueprints/BP_HealingJellyItem.uasset b/Content/Blueprints/BP_HealingJellyItem.uasset index 06702c4..ea7944f 100644 --- a/Content/Blueprints/BP_HealingJellyItem.uasset +++ b/Content/Blueprints/BP_HealingJellyItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8bde496e61be34dbd75c08fee0b9ad7fff9751158af26fc77f5bae97167cc2e1 +oid sha256:779c3fd0049d3cc80f32f0b7a047fa2421783d275495cb38559db7132e44693b size 31249 diff --git a/Content/Blueprints/Items/BP_BuffJelly.uasset b/Content/Blueprints/Items/BP_BuffJelly.uasset index c1bc784..eede26f 100644 --- a/Content/Blueprints/Items/BP_BuffJelly.uasset +++ b/Content/Blueprints/Items/BP_BuffJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:334fec1c48b0bb04fe272b83310d5211cd1c78feed1a2adbbd3d13dffdffa90f -size 6726 +oid sha256:80af4bbe64d0fee0dd0863d138736db41621200d4bb23c64876a9115dadda1ab +size 6777 diff --git a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset index f46abce..ce6bc44 100644 --- a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset +++ b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9ecf966e2e7b66ad861bbcd920a76f978de85ccd4177a90c419ddd42b8f56dc -size 30858 +oid sha256:eb18ab01f25ac65d9059d58e9d322a30bf999cb712fee1e493a94f96d54e2f24 +size 31187 diff --git a/Content/Blueprints/Items/BP_HealingJelly.uasset b/Content/Blueprints/Items/BP_HealingJelly.uasset index 85e397d..12d67cd 100644 --- a/Content/Blueprints/Items/BP_HealingJelly.uasset +++ b/Content/Blueprints/Items/BP_HealingJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:228d6db7c136bd371aa3b3333cd81dbea3d396a0df920eb88f521520af3438e7 -size 6681 +oid sha256:5744de2ec7550a3c36c966cee2b68860074da7703ce037a2ab63714a1bf5c68a +size 6732 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 5bd9445..22cb570 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:261b02cd1efeab8d9566ebb56d896f50befdcf86b2d88279768ab68f3b0f5454 +oid sha256:8f360674df3ba556f63be447912d015ef93773f49081f1ebef0ee61daf0069b2 size 27119 From 3572f066c139fb91e720123b812e350f47891bb9 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 18:19:14 +0000 Subject: [PATCH 06/35] Updated EatableItems Deleted unused code --- .../BaseItems/Items/EatableItems.cpp | 16 ++-------------- .../BaseItems/Items/EatableItems.h | 1 - 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index c2a88fb..815b09f 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -25,17 +25,5 @@ void UEatableItems::Use(ATempCharacter* Character) } } -void UEatableItems::Buy(ATempCharacter* PurchaseItem) -{ - if(PurchaseItem) - { - if(PurchaseItem->GoldBalance <= 0) - { - UE_LOG(LogTemp, Display, TEXT("Not Enough Gold")); - } - else - { - PurchaseItem->GoldBalance -= ItemCostPrice; - } - } -} + +// IF THE ITEM HAS THE TAG THEN HEAL OR IF IT HAS OTHER TAG DO SOMETHING ELSE \ No newline at end of file diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h index e189a6e..d636bcd 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h @@ -19,5 +19,4 @@ class THE_TWILIGHT_ABYSS_API UEatableItems : public UBaseItem protected: virtual void Use(class ATempCharacter* Character) override; - virtual void Buy(ATempCharacter* PurchaseItem) override; }; From 7623976bd3cb627f06c4cf1740fe3f7393dc66fb Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 19:19:04 +0000 Subject: [PATCH 07/35] Updated TempCharacter Cleaned Up Script 18/11/2022 --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 9a0637b..cab6df2 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -41,8 +41,6 @@ void ATempCharacter::RightMoveInput(float Axis) void ATempCharacter::Tick(float DeltaTime) { Super::Tick(DeltaTime); - - UE_LOG(LogTemp, Warning, TEXT("Gold: %d"),GoldBalance); } // Gives the character the functionality @@ -120,4 +118,3 @@ void ATempCharacter::BuyItem(UBaseItem* BuyItem) BuyItem->OnBuy(this); } } - From cb9c2bcb270e0372427d73d43182e4f88ee6726a Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 19:25:10 +0000 Subject: [PATCH 08/35] Updated BaseItem, TempCharacter Removed more unused code to make the scripts more readable and optimized. --- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 3 --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 8 -------- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 --- 3 files changed, 14 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 1b18b3d..88665d9 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -60,7 +60,4 @@ public: //This is the same as the use item class but its in BP instead UFUNCTION(BlueprintImplementableEvent) void OnUse(class ATempCharacter* Character); - - UFUNCTION(BlueprintImplementableEvent) - void OnBuy(class ATempCharacter* PurchaseItem); }; diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index cab6df2..b5d77ed 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -110,11 +110,3 @@ void ATempCharacter::UseItem(class UBaseItem* Item) } } -void ATempCharacter::BuyItem(UBaseItem* BuyItem) -{ - if(BuyItem) - { - BuyItem->Buy(this); - BuyItem->OnBuy(this); - } -} diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index b3f30c7..a1cf05c 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -50,9 +50,6 @@ public: //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class - - UFUNCTION(BlueprintCallable, Category= "Items") - void BuyItem(class UBaseItem* BuyItem); UPROPERTY(EditAnywhere, Category= "Items") UBaseItem* ItemToBuy; From e64b4057aca109f3460cdda52a02fc4e2b3ad5cb Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 20:05:33 +0000 Subject: [PATCH 09/35] Created Health_Gold UI --- Content/Blueprints/Health_Gold_UI/WBP_Health.uasset | 3 +++ Content/Merchant/BP_MerchantGameMode.uasset | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Content/Blueprints/Health_Gold_UI/WBP_Health.uasset diff --git a/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset b/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset new file mode 100644 index 0000000..7fc66c3 --- /dev/null +++ b/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d7ccaf051f8d3706e6e480f5aebd22ad5a2a2ea15da6a2002f35e130ac89ae3 +size 35883 diff --git a/Content/Merchant/BP_MerchantGameMode.uasset b/Content/Merchant/BP_MerchantGameMode.uasset index c974b1b..414446d 100644 --- a/Content/Merchant/BP_MerchantGameMode.uasset +++ b/Content/Merchant/BP_MerchantGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42528498febf08b71b6e27fce611f4f15415f5013e1cac461e13ca284a3a781f -size 27248 +oid sha256:ccd6dc995e1243ca504ed566c31cc2a1c1d9ade3ac5b9eafa4e257cd6a280e6e +size 27874 From 49a24325ea3598fa4c01c1a4b59505c963c7617b Mon Sep 17 00:00:00 2001 From: MH261677 Date: Sat, 19 Nov 2022 20:08:00 +0000 Subject: [PATCH 10/35] Updated TempCharacter, WBPHealth Made the health and gold variables for the character blueprintable to start implimenting them into basic UI for visual representation. --- Content/Blueprints/Health_Gold_UI/WBP_Health.uasset | 4 ++-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 2 ++ Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset b/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset index 7fc66c3..516738e 100644 --- a/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset +++ b/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d7ccaf051f8d3706e6e480f5aebd22ad5a2a2ea15da6a2002f35e130ac89ae3 -size 35883 +oid sha256:19c69f36533921dc7c6c9bf55bb290288d4878ab2c71f5af7f9bdba8a7aafab3 +size 28410 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index b5d77ed..5f69731 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -16,6 +16,8 @@ ATempCharacter::ATempCharacter() PrimaryActorTick.bCanEverTick = true; Inventory = CreateDefaultSubobject("Inventory"); Inventory->MaxItemSlots = 10; + GoldBalance = GoldBalance; + Health = Health; } // Called when the game starts or when spawned diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index a1cf05c..ae540de 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -41,10 +41,10 @@ public: void LineTraceLogic(); - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Health") + UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Health") float Health; - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Gold") + UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Gold") int GoldBalance; //Using the item in the inventory From 168a43d751f3921850e30168ffc478846e4323bc Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 00:51:00 +0000 Subject: [PATCH 11/35] Updated BaseItem and ItemBPS Gave both items booleans to make the code differentiate what the item does to the player. --- Content/Blueprints/Items/BP_BuffJelly.uasset | 4 ++-- Content/Blueprints/Items/BP_HealingJelly.uasset | 4 ++-- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Content/Blueprints/Items/BP_BuffJelly.uasset b/Content/Blueprints/Items/BP_BuffJelly.uasset index eede26f..d96742f 100644 --- a/Content/Blueprints/Items/BP_BuffJelly.uasset +++ b/Content/Blueprints/Items/BP_BuffJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80af4bbe64d0fee0dd0863d138736db41621200d4bb23c64876a9115dadda1ab -size 6777 +oid sha256:5e848bfa9970c3ca45b347fd5fc8412d76f271c8773b6c8c67dbc4318b287d55 +size 6828 diff --git a/Content/Blueprints/Items/BP_HealingJelly.uasset b/Content/Blueprints/Items/BP_HealingJelly.uasset index 12d67cd..254ad6e 100644 --- a/Content/Blueprints/Items/BP_HealingJelly.uasset +++ b/Content/Blueprints/Items/BP_HealingJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5744de2ec7550a3c36c966cee2b68860074da7703ce037a2ab63714a1bf5c68a -size 6732 +oid sha256:9b723a5754a4c921a09eedfce3c90c246ed6ffee230d0a2f68887d1e2a0ecfbf +size 6780 diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 88665d9..666f391 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -46,6 +46,12 @@ public: //The cost of the item UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item") int ItemCostPrice; + + UPROPERTY(EditAnywhere, Category = "Item") + bool isHealingItem; + + UPROPERTY(EditAnywhere, Category = "Item") + bool isDamageBuffItem; //reference to the UInventoryComponent script UPROPERTY() From 783e13075c9f1a88e81630cab8ebb464d4fe1716 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 00:55:55 +0000 Subject: [PATCH 12/35] Updated TempCharacter Made the linetrace boolean a global in the headerfile for potential future enemy detection --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 2 +- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 5f69731..eae1761 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -74,7 +74,7 @@ void ATempCharacter::LineTraceLogic() TraceParams.AddIgnoredActor(this); - bool bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); + bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); if (bHit) { if(OutHit.GetActor() == nullptr) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index ae540de..4147e2b 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -47,6 +47,9 @@ public: UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Gold") int GoldBalance; + UPROPERTY(VisibleDefaultsOnly, Category = "LineTrace") + bool bHit; + //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class From 7140faf22b0faa16b73d8768cc7aded1564783a5 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 00:56:33 +0000 Subject: [PATCH 13/35] Updated EatableItems Seperated Items into functional sub-variables that do other stuff instead of just healing the player no matte the item you make --- .../BaseItems/Items/EatableItems.cpp | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index 815b09f..04f104d 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -16,14 +16,26 @@ void UEatableItems::Use(ATempCharacter* Character) { if(Character) { - Character->Health += 10; - + if(isHealingItem == true) + { + Character->Health += 10; + UE_LOG(LogTemp, Display, TEXT("Healed")); + } + if(isDamageBuffItem == true) + { + // need to add the damage buff functionality here + UE_LOG(LogTemp, Display, TEXT("Damage Buffed")); + } if(StoredItems) { StoredItems->Remove(this); } } + + /* + when player uses the item syrengine to debuff enemies + detect what enemie actors the player is fighting with + lower their damage by a value. + */ } - -// IF THE ITEM HAS THE TAG THEN HEAL OR IF IT HAS OTHER TAG DO SOMETHING ELSE \ No newline at end of file From 7dc6f677d4519bae3c4e46f3901a555823de5afd Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 01:38:45 +0000 Subject: [PATCH 14/35] Updated WBP_PlayerInventory Added an override on keypressed so the user can press tab again to close the inventory. Also fixed the widget not being a focusable --- Content/Blueprints/BP_HealingJellyItem.uasset | 2 +- Content/Blueprints/BP_MyTempCharacter.uasset | 4 ++-- Content/Blueprints/Items/BP_BuffPlacedItem.uasset | 2 +- Content/Blueprints/WBP_PlayerInventory.uasset | 4 ++-- Content/Levels/MerchantPrototype.umap | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Content/Blueprints/BP_HealingJellyItem.uasset b/Content/Blueprints/BP_HealingJellyItem.uasset index ea7944f..76a4363 100644 --- a/Content/Blueprints/BP_HealingJellyItem.uasset +++ b/Content/Blueprints/BP_HealingJellyItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:779c3fd0049d3cc80f32f0b7a047fa2421783d275495cb38559db7132e44693b +oid sha256:d255860117db8b05edc39944f943d892679b89ebe000e8d570cb3a0e8d353244 size 31249 diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset index 6bab0dc..65ff681 100644 --- a/Content/Blueprints/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:58b898c8869c0539a2cee866134a992678874e84fc45085a2fdb8d26b9e35b1c -size 52636 +oid sha256:beb55a8fd9e34fbbcd2ed8217069ec22d1fb05e9bcad3c5afe503c94082210d3 +size 51560 diff --git a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset index ce6bc44..90836d4 100644 --- a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset +++ b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb18ab01f25ac65d9059d58e9d322a30bf999cb712fee1e493a94f96d54e2f24 +oid sha256:94b16963e5286a05340eebde2c2d5b3ca13555ba3c7ec4e6a7a59ccb41ad22ff size 31187 diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset index 1af5b3c..f1e5ab2 100644 --- a/Content/Blueprints/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38c83f1bddcf376360f7860312744872858e4c43b3c14d5153ae35923d9a8faf -size 96657 +oid sha256:54e088e39cc854a4fbd34b53019a789383ff979193ebb1bb5b3932673fb37668 +size 122583 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 22cb570..410a80c 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f360674df3ba556f63be447912d015ef93773f49081f1ebef0ee61daf0069b2 +oid sha256:059f2ed29845168a9311b512746f8166d143a24f6670bf95e9d9185ba55b7075 size 27119 From 7430029db23726fc2429879c2834672d5091406a Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 01:45:24 +0000 Subject: [PATCH 15/35] BugFix WBP_PlayerInventory Fixed cursor still showing up when closing and re-opening the inventory. --- Content/Blueprints/WBP_PlayerInventory.uasset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset index f1e5ab2..d0fe596 100644 --- a/Content/Blueprints/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54e088e39cc854a4fbd34b53019a789383ff979193ebb1bb5b3932673fb37668 -size 122583 +oid sha256:4802f43150cbbb47a96f9e8f7505b2342a4588291aa2323d6f8606e5d5a114f1 +size 125665 From 36bb1a22654bc2be9e936df06cbb9a8670a578c1 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 01:56:22 +0000 Subject: [PATCH 16/35] Updated PlayerInventory Made the inventory look slightly nicer, going to work on a nicer alpha version of the UI after this commit --- Content/Blueprints/WBP_PlayerInventory.uasset | 4 ++-- Content/Levels/MerchantPrototype.umap | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset index d0fe596..6c0d5cb 100644 --- a/Content/Blueprints/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4802f43150cbbb47a96f9e8f7505b2342a4588291aa2323d6f8606e5d5a114f1 -size 125665 +oid sha256:cd5752937d84967e62fed4779a9aada876bb26acda16aa443671f90ace8fa1a5 +size 124938 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 410a80c..4eedbd5 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:059f2ed29845168a9311b512746f8166d143a24f6670bf95e9d9185ba55b7075 +oid sha256:156e40e7bbcd94181aba52cb36330fa9f2737262de840114291db0eb7d32e99b size 27119 From 77b32edde40019c890b0eb192066b512fd0ac31d Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 17:26:35 +0000 Subject: [PATCH 17/35] Organized Content Browser Organized the content browser to make it easier to know where everything is --- Content/Blueprints/BP_CrossHair.uasset | 3 --- Content/Blueprints/BP_Interaction.uasset | 4 ++-- Content/Blueprints/BP_MyTempCharacter.uasset | 4 ++-- Content/Blueprints/Display_UI/BP_CrossHair.uasset | 3 +++ Content/Blueprints/Items/BP_BuffPlacedItem.uasset | 4 ++-- .../Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset | 3 +++ Content/Blueprints/Merchant/BP_Interaction.uasset | 3 +++ Content/Blueprints/Merchant/BP_MerchantGameMode.uasset | 3 +++ Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset | 3 +++ Content/Blueprints/Merchant_Blueprint.uasset | 3 +++ Content/Blueprints/WBP_PlayerInventory.uasset | 4 ++-- Content/Merchant/BP_MerchantGameMode.uasset | 3 --- Content/Merchant/BP_OPENDIAL.uasset | 3 --- Content/Merchant_Blueprint.uasset | 3 --- 14 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 Content/Blueprints/BP_CrossHair.uasset create mode 100644 Content/Blueprints/Display_UI/BP_CrossHair.uasset create mode 100644 Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset create mode 100644 Content/Blueprints/Merchant/BP_Interaction.uasset create mode 100644 Content/Blueprints/Merchant/BP_MerchantGameMode.uasset create mode 100644 Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset create mode 100644 Content/Blueprints/Merchant_Blueprint.uasset delete mode 100644 Content/Merchant/BP_MerchantGameMode.uasset delete mode 100644 Content/Merchant/BP_OPENDIAL.uasset delete mode 100644 Content/Merchant_Blueprint.uasset diff --git a/Content/Blueprints/BP_CrossHair.uasset b/Content/Blueprints/BP_CrossHair.uasset deleted file mode 100644 index 9f8931e..0000000 --- a/Content/Blueprints/BP_CrossHair.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a280ea28495f581d57c633b55688d29b2deee4204a9d743b96deddb02a8bc1c -size 24157 diff --git a/Content/Blueprints/BP_Interaction.uasset b/Content/Blueprints/BP_Interaction.uasset index 6a6fb20..5b52dc0 100644 --- a/Content/Blueprints/BP_Interaction.uasset +++ b/Content/Blueprints/BP_Interaction.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e31f123a59603938d430a7a585aef68184c0c01501f4c9952ac523ff1455c2dc -size 26551 +oid sha256:32d7c8498dcd0a175bb2c45ecdd805ba77d797164a59c8e5ac6e03f0bfb6e52c +size 2268 diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset index 65ff681..b2be5c5 100644 --- a/Content/Blueprints/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:beb55a8fd9e34fbbcd2ed8217069ec22d1fb05e9bcad3c5afe503c94082210d3 -size 51560 +oid sha256:d0e1eb40fc6d7f63757057a25efe833cb01ab8022b6ccac5aa3f3fccad850530 +size 50735 diff --git a/Content/Blueprints/Display_UI/BP_CrossHair.uasset b/Content/Blueprints/Display_UI/BP_CrossHair.uasset new file mode 100644 index 0000000..9189850 --- /dev/null +++ b/Content/Blueprints/Display_UI/BP_CrossHair.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55196f81c7337436eb13d58addfa806a72814afb3e9745581c23b271601bb1a6 +size 24190 diff --git a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset index 90836d4..f797e80 100644 --- a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset +++ b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94b16963e5286a05340eebde2c2d5b3ca13555ba3c7ec4e6a7a59ccb41ad22ff -size 31187 +oid sha256:a8d07a7506cfa31c8b9f69f4b1c314d68767a1b5596a8608137a744a3fd58116 +size 2368 diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset new file mode 100644 index 0000000..eae64c2 --- /dev/null +++ b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11a9b9b88cf518e73e6bc64dd07a0ba7454a2003fefb91ec7df3f674527a38cb +size 31226 diff --git a/Content/Blueprints/Merchant/BP_Interaction.uasset b/Content/Blueprints/Merchant/BP_Interaction.uasset new file mode 100644 index 0000000..1c1c83b --- /dev/null +++ b/Content/Blueprints/Merchant/BP_Interaction.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2965ad13589cf50b8112f5e97941fd3e65db67ebece69401a963a630a15ce134 +size 26706 diff --git a/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset b/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset new file mode 100644 index 0000000..c3ae569 --- /dev/null +++ b/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fd5b054c12bb77915662994c6b6e4d8c8004e8734a1887b04abddf7b2f70633 +size 27277 diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset new file mode 100644 index 0000000..dc1bc94 --- /dev/null +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bb3791cb5ab0e66b2ad4d80e3c6be0e29c6952263079e17ed30b81659c64532 +size 33650 diff --git a/Content/Blueprints/Merchant_Blueprint.uasset b/Content/Blueprints/Merchant_Blueprint.uasset new file mode 100644 index 0000000..4937f77 --- /dev/null +++ b/Content/Blueprints/Merchant_Blueprint.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:268c3ae47f009190614178c08d495213b978456d791958b23ac676f4d15d7ef8 +size 30511 diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset index 6c0d5cb..070121b 100644 --- a/Content/Blueprints/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd5752937d84967e62fed4779a9aada876bb26acda16aa443671f90ace8fa1a5 -size 124938 +oid sha256:8481ac6644662116772bc922328962fe2664b8cfd70919eb916b10a50caeadd5 +size 111926 diff --git a/Content/Merchant/BP_MerchantGameMode.uasset b/Content/Merchant/BP_MerchantGameMode.uasset deleted file mode 100644 index 414446d..0000000 --- a/Content/Merchant/BP_MerchantGameMode.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ccd6dc995e1243ca504ed566c31cc2a1c1d9ade3ac5b9eafa4e257cd6a280e6e -size 27874 diff --git a/Content/Merchant/BP_OPENDIAL.uasset b/Content/Merchant/BP_OPENDIAL.uasset deleted file mode 100644 index fd13ac9..0000000 --- a/Content/Merchant/BP_OPENDIAL.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3e50d88d0164a436cb9cc9eba8b4ffac17f428bf6b858db7a987a726d78ce6b -size 33581 diff --git a/Content/Merchant_Blueprint.uasset b/Content/Merchant_Blueprint.uasset deleted file mode 100644 index fb48a05..0000000 --- a/Content/Merchant_Blueprint.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6417b56f9b2842d2ba70bedffc0f6ff3e8b428f5f84d5aa37e5cd7e8a77256d -size 30945 From 45369c4dc755b944ff4a0245789ab40055d9de27 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 17:29:14 +0000 Subject: [PATCH 18/35] Created Inventory_UI Folder Moved all inventory UI to the folder and removed Shop UI as not used anymore --- Content/Blueprints/BP_HealingJellyItem.uasset | 4 ++-- Content/Blueprints/BP_MyTempCharacter.uasset | 4 ++-- Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset | 3 +++ Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset | 3 +++ .../Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset | 3 +++ Content/Blueprints/WBP_ItemDisplay.uasset | 3 --- Content/Blueprints/WBP_PlayerInventory.uasset | 3 --- Content/Blueprints/WBP_Shop.uasset | 3 --- 8 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset create mode 100644 Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset create mode 100644 Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset delete mode 100644 Content/Blueprints/WBP_ItemDisplay.uasset delete mode 100644 Content/Blueprints/WBP_PlayerInventory.uasset delete mode 100644 Content/Blueprints/WBP_Shop.uasset diff --git a/Content/Blueprints/BP_HealingJellyItem.uasset b/Content/Blueprints/BP_HealingJellyItem.uasset index 76a4363..e0cef3b 100644 --- a/Content/Blueprints/BP_HealingJellyItem.uasset +++ b/Content/Blueprints/BP_HealingJellyItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d255860117db8b05edc39944f943d892679b89ebe000e8d570cb3a0e8d353244 -size 31249 +oid sha256:f8b96edfd16707be503a8b2b196ed4d194946a0637b2c55ea003c05a49e6f64a +size 2398 diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset index b2be5c5..268af27 100644 --- a/Content/Blueprints/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0e1eb40fc6d7f63757057a25efe833cb01ab8022b6ccac5aa3f3fccad850530 -size 50735 +oid sha256:5d4f6b3418141e5b0cadc07641d801910eb1f8c8abe3a58cfc61be35eb519928 +size 50397 diff --git a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset new file mode 100644 index 0000000..77358b3 --- /dev/null +++ b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33d81cf1a02f7c52e2ae2251dd57b56f9e80473aa799e8cf53c32bdcd4e11ff4 +size 84006 diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset new file mode 100644 index 0000000..8457432 --- /dev/null +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d40a0ca11990f614896d0e947ee3e3798991090929eeb79be8d41651cc062bb4 +size 110259 diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset new file mode 100644 index 0000000..5e94613 --- /dev/null +++ b/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32388bd47d08a69c1f782c682fdf67358fb2fdd5f9dd821ed9fc97d66a0bda70 +size 31327 diff --git a/Content/Blueprints/WBP_ItemDisplay.uasset b/Content/Blueprints/WBP_ItemDisplay.uasset deleted file mode 100644 index 6337ca6..0000000 --- a/Content/Blueprints/WBP_ItemDisplay.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e54ac7119c349323ce6d57b3658300f982eed6ffe9922c47c13448aeb4173e8 -size 84619 diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset deleted file mode 100644 index 070121b..0000000 --- a/Content/Blueprints/WBP_PlayerInventory.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8481ac6644662116772bc922328962fe2664b8cfd70919eb916b10a50caeadd5 -size 111926 diff --git a/Content/Blueprints/WBP_Shop.uasset b/Content/Blueprints/WBP_Shop.uasset deleted file mode 100644 index 548aa62..0000000 --- a/Content/Blueprints/WBP_Shop.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a2f46e884f8c8bcd1bb029db2828769bdbd7a23296896f5a71bda84cd2626c7 -size 24782 From b7dd592d2c5eae77f989f8e9d0d0368af029e062 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 17:30:38 +0000 Subject: [PATCH 19/35] Created Player folder Organized the blueprints into more folders and cleaned up unreal project --- Content/Blueprints/BP_MyTempCharacter.uasset | 3 --- Content/Blueprints/Combat_UI/CombatCharacter.uasset | 4 ++-- Content/Blueprints/Display_UI/WBP_Health.uasset | 3 +++ Content/Blueprints/Health_Gold_UI/WBP_Health.uasset | 3 --- Content/Blueprints/Merchant/BP_MerchantGameMode.uasset | 4 ++-- Content/Blueprints/Merchant/Merchant_Blueprint.uasset | 3 +++ Content/Blueprints/Merchant_Blueprint.uasset | 3 --- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 3 +++ 8 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 Content/Blueprints/BP_MyTempCharacter.uasset create mode 100644 Content/Blueprints/Display_UI/WBP_Health.uasset delete mode 100644 Content/Blueprints/Health_Gold_UI/WBP_Health.uasset create mode 100644 Content/Blueprints/Merchant/Merchant_Blueprint.uasset delete mode 100644 Content/Blueprints/Merchant_Blueprint.uasset create mode 100644 Content/Blueprints/Player/BP_MyTempCharacter.uasset diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset deleted file mode 100644 index 268af27..0000000 --- a/Content/Blueprints/BP_MyTempCharacter.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d4f6b3418141e5b0cadc07641d801910eb1f8c8abe3a58cfc61be35eb519928 -size 50397 diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index e4f2f48..1f05819 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c31aac33ef5d0aa521d5f3d3e58b8f14a0d3fff128c14aa997250176c9f70a3 -size 58942 +oid sha256:5bab4135642f4f3a09483fba472bb06e77771ff74f14dba2d6085adf5b7e3cb6 +size 58437 diff --git a/Content/Blueprints/Display_UI/WBP_Health.uasset b/Content/Blueprints/Display_UI/WBP_Health.uasset new file mode 100644 index 0000000..6d8ecc5 --- /dev/null +++ b/Content/Blueprints/Display_UI/WBP_Health.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91f6f6a94de73f379df0167a9b2eaa6ff85dcefc020cd565f965d2003f31b389 +size 28963 diff --git a/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset b/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset deleted file mode 100644 index 516738e..0000000 --- a/Content/Blueprints/Health_Gold_UI/WBP_Health.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19c69f36533921dc7c6c9bf55bb290288d4878ab2c71f5af7f9bdba8a7aafab3 -size 28410 diff --git a/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset b/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset index c3ae569..38dc788 100644 --- a/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset +++ b/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fd5b054c12bb77915662994c6b6e4d8c8004e8734a1887b04abddf7b2f70633 -size 27277 +oid sha256:fafeaa8343b7186e04b9d4e83254fa951e1135f29c66e0eba4c159633d570fb2 +size 27659 diff --git a/Content/Blueprints/Merchant/Merchant_Blueprint.uasset b/Content/Blueprints/Merchant/Merchant_Blueprint.uasset new file mode 100644 index 0000000..57b9862 --- /dev/null +++ b/Content/Blueprints/Merchant/Merchant_Blueprint.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:872c89c4253c344d6d717e0125afd1ad0d2648cecb1d2b9b7b9c63c953d7a62a +size 30538 diff --git a/Content/Blueprints/Merchant_Blueprint.uasset b/Content/Blueprints/Merchant_Blueprint.uasset deleted file mode 100644 index 4937f77..0000000 --- a/Content/Blueprints/Merchant_Blueprint.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:268c3ae47f009190614178c08d495213b978456d791958b23ac676f4d15d7ef8 -size 30511 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset new file mode 100644 index 0000000..3520aa3 --- /dev/null +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a993a6bbd9634552a61525546373eaa029400e01b442ced0416120f91e317eb +size 50237 From 09adfcad27632fcb7114b6edaff131da059a4338 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 17:45:32 +0000 Subject: [PATCH 20/35] Updated WBP_PlayerInventory Started to work on Inventory UI and re-sized it to be 1920x1080 --- Config/DefaultEngine.ini | 2 +- Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 1fba0b6..40498d0 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -28,7 +28,7 @@ bOffsetPlayerGamepadIds=False GameInstanceClass=/Script/Engine.GameInstance GameDefaultMap=/Game/Levels/Prototype.Prototype ServerDefaultMap=/Engine/Maps/Entry.Entry -GlobalDefaultGameMode=/Game/Merchant/BP_MerchantGameMode.BP_MerchantGameMode_C +GlobalDefaultGameMode=/Game/Blueprints/Merchant/BP_MerchantGameMode.BP_MerchantGameMode_C GlobalDefaultServerGameMode=None [/Script/Engine.CollisionProfile] diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset index 8457432..c742a33 100644 --- a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d40a0ca11990f614896d0e947ee3e3798991090929eeb79be8d41651cc062bb4 -size 110259 +oid sha256:ad37adf1b6ab12431e00b8891a9bf66324d9033fbc8a5448af7a33b5f1d43e8c +size 118805 From 26bbe083dfebbab8f6a571e96a60f2c75f8a4623 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 18:13:13 +0000 Subject: [PATCH 21/35] Updated WBP_ItemDisplay, WBP_PlayerInventory Changed and resized both the UIS to fit items better and make the whole inventory look a lot cleaner --- Content/Blueprints/Combat_UI/CombatCharacter.uasset | 4 ++-- Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset | 4 ++-- Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset | 4 ++-- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index 1f05819..4c5e56f 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bab4135642f4f3a09483fba472bb06e77771ff74f14dba2d6085adf5b7e3cb6 -size 58437 +oid sha256:6fe328b7994610006922e44ead167a7fb28ac8b8ed3313a02938744c0505ca3d +size 59885 diff --git a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset index 77358b3..05473c9 100644 --- a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33d81cf1a02f7c52e2ae2251dd57b56f9e80473aa799e8cf53c32bdcd4e11ff4 -size 84006 +oid sha256:716379d6dd8c20a6f3edb7e365feb91556786304200e7c90ed32e68f315fadfa +size 84098 diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset index c742a33..a1a0611 100644 --- a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad37adf1b6ab12431e00b8891a9bf66324d9033fbc8a5448af7a33b5f1d43e8c -size 118805 +oid sha256:0e4c47dda36f8727f71eec0c45b1c754cb1200a2c2a7236fecb8bd7bdd50154a +size 125059 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 3520aa3..6d29306 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a993a6bbd9634552a61525546373eaa029400e01b442ced0416120f91e317eb -size 50237 +oid sha256:332683390d0d3643a2a4d23fead25244edc382a04ffc2938fe192e57d6311ea7 +size 50935 From 935780617887c46a1ee8f646e92738b8e724d79f Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 18:16:14 +0000 Subject: [PATCH 22/35] Updated WBP_ItemDisplay Made the item display larger and cleaner, Also added a background to the item --- Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset index 05473c9..1f1b0f8 100644 --- a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:716379d6dd8c20a6f3edb7e365feb91556786304200e7c90ed32e68f315fadfa -size 84098 +oid sha256:a774b6087e6b745c80d91a153247b7061f1f337f5e06821771bd81eab8f0965e +size 85490 From 57b532c256d8a01c23b57eeeb19a70ba176d87f6 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 19:20:32 +0000 Subject: [PATCH 23/35] Updated WBP_PlayerInventory Cleaned up the inventory UI and removed unused Blueprint code --- Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset | 4 ++-- Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset index 1f1b0f8..8a3dc67 100644 --- a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a774b6087e6b745c80d91a153247b7061f1f337f5e06821771bd81eab8f0965e -size 85490 +oid sha256:ca5bb69435dfac54ab1c7cdb03fe4521ed1961add9ff0e9438a235b479e8a68b +size 86855 diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset index a1a0611..ed7e686 100644 --- a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e4c47dda36f8727f71eec0c45b1c754cb1200a2c2a7236fecb8bd7bdd50154a -size 125059 +oid sha256:2261562994ba843b148d7320a7179fb070c93d41368bf5e743ade3376964940f +size 112456 From 5dce4dc60353c728163323a3f72c7f93823f2b3c Mon Sep 17 00:00:00 2001 From: MH261677 Date: Thu, 24 Nov 2022 00:13:20 +0000 Subject: [PATCH 24/35] Updated InventoryComponent Added comment --- Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset | 4 ++-- Content/Levels/MerchantPrototype.umap | 4 ++-- Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset index ed7e686..d2d7739 100644 --- a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2261562994ba843b148d7320a7179fb070c93d41368bf5e743ade3376964940f -size 112456 +oid sha256:4177a97bce273fa21e43e1d37185390f84f3055fe4af730ea21754e8f3715246 +size 108778 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 4eedbd5..2ebff49 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:156e40e7bbcd94181aba52cb36330fa9f2737262de840114291db0eb7d32e99b -size 27119 +oid sha256:0480c5233cfea998ff467ef611c2a4aa64649eea743ae081bca929873937499c +size 27160 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index 40d8473..fc8a784 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -46,6 +46,7 @@ bool UInventoryComponent::AddItem(class UBaseItem* BaseItem) return true; } +// remove only gets called once on the same item bool UInventoryComponent::Remove(class UBaseItem* BaseItem) { if(BaseItem) From b5772a024c24a2e727ec11483140f79969b87368 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Mon, 28 Nov 2022 22:52:51 +0000 Subject: [PATCH 25/35] Updated Interaction.cpp Added a wait timer to close the widget once open automatically --- .../Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset | 4 ++-- Content/Levels/MerchantPrototype.umap | 2 +- .../MerchantInteraction/Interaction.cpp | 10 ++++++++-- .../MerchantInteraction/Interaction.h | 3 +++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset index dc1bc94..cf030cd 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bb3791cb5ab0e66b2ad4d80e3c6be0e29c6952263079e17ed30b81659c64532 -size 33650 +oid sha256:2ab4de6dc668c0b8ca8ae692028ad12b8b9f48a63c0bcbd285d0896b77445307 +size 35241 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 2ebff49..c761fa8 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0480c5233cfea998ff467ef611c2a4aa64649eea743ae081bca929873937499c +oid sha256:088d93734195a866f6750e1bb72cd6177b555c8078682d7cacdd943f4c195f9e size 27160 diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp index 237d6ee..3f19df3 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp @@ -30,7 +30,13 @@ void AInteraction::Tick(float DeltaTime) void AInteraction::OnInteract() { - UUserWidget* spawnedWidget = CreateWidget(GetWorld(), Widget); - spawnedWidget->AddToViewport(0); + CurrentWidget = CreateWidget(GetWorld(), Widget); + CurrentWidget->AddToViewport(0); + FTimerHandle WidgetTimer; + GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, 5.0f, false); } +void AInteraction::RemoveWidget() +{ + CurrentWidget->RemoveFromViewport(); +} \ No newline at end of file diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h index 2fa21b1..3450771 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h @@ -27,5 +27,8 @@ public: TSubclassOf Widget; virtual void OnInteract(); + virtual void RemoveWidget(); + UPROPERTY() + UUserWidget* CurrentWidget; }; From 8c69f58a974ac5a8fc713bf1e54f00c1327c0fbf Mon Sep 17 00:00:00 2001 From: MH261677 Date: Mon, 28 Nov 2022 23:15:41 +0000 Subject: [PATCH 26/35] Updated BP_OPENDIAL, Interaction.cpp Changed the text in the widget and gave it a little animation. Made the Wait timer in interaction changeable in the editor. --- Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset | 4 ++-- Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp | 2 +- Source/the_twilight_abyss/MerchantInteraction/Interaction.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset index cf030cd..b1a1752 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ab4de6dc668c0b8ca8ae692028ad12b8b9f48a63c0bcbd285d0896b77445307 -size 35241 +oid sha256:b00c78b227e5926f654f4ae7c1421f83cc57c4a186be20147347e9b694ffe960 +size 71363 diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp index 3f19df3..f295c82 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp @@ -33,7 +33,7 @@ void AInteraction::OnInteract() CurrentWidget = CreateWidget(GetWorld(), Widget); CurrentWidget->AddToViewport(0); FTimerHandle WidgetTimer; - GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, 5.0f, false); + GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, WaitTimer, false); } void AInteraction::RemoveWidget() diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h index 3450771..838b8b8 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h @@ -30,5 +30,7 @@ public: virtual void RemoveWidget(); UPROPERTY() UUserWidget* CurrentWidget; + UPROPERTY(EditAnywhere) + float WaitTimer; }; From 26da472db8ba52b23a4602b5f42ca1de004933cd Mon Sep 17 00:00:00 2001 From: MH261677 Date: Mon, 28 Nov 2022 23:20:55 +0000 Subject: [PATCH 27/35] Updated MerchantPrototype Added an 8 second wait timer to the dialouge in engine --- Content/Levels/MerchantPrototype.umap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index c761fa8..8a2e9cf 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:088d93734195a866f6750e1bb72cd6177b555c8078682d7cacdd943f4c195f9e -size 27160 +oid sha256:2616e6c43b1e4c6a0150deb3383a64d5b0a9279784748ef8240c5a75dc6ca7bf +size 27207 From 120da84a3e24a95ae1d001d3e4e8ba990b1ff724 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Mon, 28 Nov 2022 23:21:36 +0000 Subject: [PATCH 28/35] Updated Interaction Hard coded the 6 second wait timer after testing in engine --- Source/the_twilight_abyss/MerchantInteraction/Interaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h index 838b8b8..64ddcbf 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h @@ -31,6 +31,6 @@ public: UPROPERTY() UUserWidget* CurrentWidget; UPROPERTY(EditAnywhere) - float WaitTimer; + float WaitTimer = 8.0f; }; From 2a590c3e33a54319799f7ee21a3f3480da42b371 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 12:43:58 +0000 Subject: [PATCH 29/35] Updated InventoryComponent,TempCharacter Commented InventoryComponent to understand logic easier and removed unused functions from TempCharacter --- Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp | 1 + Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index fc8a784..9fc609d 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -22,6 +22,7 @@ void UInventoryComponent::BeginPlay() { Super::BeginPlay(); + //activates the AddItem function for every DefaultItem that inherits BaseItem for(auto & BaseItem : DefaultItems) { AddItem(BaseItem); diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 4147e2b..972140d 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -53,7 +53,4 @@ public: //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class - - UPROPERTY(EditAnywhere, Category= "Items") - UBaseItem* ItemToBuy; }; From 3360ea203191e21f46e4e444dec38067c6d84989 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 12:55:46 +0000 Subject: [PATCH 30/35] Updated TempCharacter,TempCharacter.cpp Gave a max inventory slots of 5 for testing purposes and Refactored code in TempCharacter.cpp --- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 6d29306..eade3bb 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:332683390d0d3643a2a4d23fead25244edc382a04ffc2938fe192e57d6311ea7 -size 50935 +oid sha256:f75c1a60b8b5ff0cfd87d50b69761c177d42897fe5881e3b2348ffe93964100e +size 50991 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index eae1761..ad5e537 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -77,16 +77,18 @@ void ATempCharacter::LineTraceLogic() bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); if (bHit) { + //we store the GetItem function from InventoryComponent into ItemArray variable + auto ItemArray = OutHit.GetActor()->FindComponentByClass()->GetItem(0); if(OutHit.GetActor() == nullptr) { return; } if(OutHit.GetActor()->FindComponentByClass()) { - if(GoldBalance >= OutHit.GetActor()->FindComponentByClass()->GetItem(0)->ItemCostPrice) + if(GoldBalance >= ItemArray->ItemCostPrice) { - GoldBalance -= OutHit.GetActor()->FindComponentByClass()->GetItem(0)->ItemCostPrice; - Inventory->AddItem(OutHit.GetActor()->FindComponentByClass()->GetItem(0)); + GoldBalance -= ItemArray->ItemCostPrice; + Inventory->AddItem(ItemArray); UE_LOG(LogTemp, Display, TEXT("Item Purchased")); } if(GoldBalance <= 0) From f52ea5efb8e9f8a27e8c33d155d5fdd6eee9bc18 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 14:15:20 +0000 Subject: [PATCH 31/35] Overhauled Items Gave every single item a unique ID so no matter the item the ID will always be different --- Content/Blueprints/Items/BP_BuffJelly.uasset | 4 ++-- Content/Blueprints/Items/BP_HealingJelly.uasset | 4 ++-- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp | 6 +++++- Source/the_twilight_abyss/BaseItems/InventoryComponent.h | 5 +++++ Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 3 +++ Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Content/Blueprints/Items/BP_BuffJelly.uasset b/Content/Blueprints/Items/BP_BuffJelly.uasset index d96742f..c02d31a 100644 --- a/Content/Blueprints/Items/BP_BuffJelly.uasset +++ b/Content/Blueprints/Items/BP_BuffJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e848bfa9970c3ca45b347fd5fc8412d76f271c8773b6c8c67dbc4318b287d55 -size 6828 +oid sha256:576e1cd3b8c065e62aa79e816c7cf7da53478ec1540122f6430b7e22bc740a93 +size 6872 diff --git a/Content/Blueprints/Items/BP_HealingJelly.uasset b/Content/Blueprints/Items/BP_HealingJelly.uasset index 254ad6e..df344db 100644 --- a/Content/Blueprints/Items/BP_HealingJelly.uasset +++ b/Content/Blueprints/Items/BP_HealingJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b723a5754a4c921a09eedfce3c90c246ed6ffee230d0a2f68887d1e2a0ecfbf -size 6780 +oid sha256:f00cd0794a1bebf9ec279e08c06925fc8c70e28e5e51f21e5834b1aa89d6ab12 +size 6824 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index eade3bb..93bd6e5 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f75c1a60b8b5ff0cfd87d50b69761c177d42897fe5881e3b2348ffe93964100e -size 50991 +oid sha256:cdb552dab713052cd07463c8a6cdb840878d73101872e5f076cebdb7f909b84a +size 51402 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index 9fc609d..ccdda07 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -40,8 +40,12 @@ bool UInventoryComponent::AddItem(class UBaseItem* BaseItem) BaseItem->StoredItems = this; BaseItem->World = GetWorld(); Items.Add(BaseItem); + BaseItem->ItemID++; UE_LOG(LogTemp, Display, TEXT("ITEM HAS BEEN ADDED")); - //Update UI + //log the itemid + UE_LOG(LogTemp, Display, TEXT("ITEM ID: %d"), BaseItem->ItemID); + + //Refreshes the inventory OnInventoryUpdated.Broadcast(); return true; diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h index af87438..41476b1 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h @@ -4,6 +4,7 @@ #include "CoreMinimal.h" #include "Components/ActorComponent.h" +#include "Items/EatableItems.h" #include "InventoryComponent.generated.h" //OUR DELEGATE IS CALLED FONINVENTORYUPDATED @@ -33,6 +34,9 @@ public: UPROPERTY(EditDefaultsOnly, Category= "Inventory") int32 MaxItemSlots; + UPROPERTY(EditDefaultsOnly, Category = "Inventory") + int MaxItemStack; + UPROPERTY(BlueprintAssignable, Category= "Inventory") FOnInventoryUpdated OnInventoryUpdated; //This is our delegate @@ -41,4 +45,5 @@ public: UFUNCTION(BlueprintCallable, Category= "Inventory") class UBaseItem* GetItem(int Index); + }; diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 666f391..d05fe0c 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -52,6 +52,9 @@ public: UPROPERTY(EditAnywhere, Category = "Item") bool isDamageBuffItem; + + UPROPERTY(EditAnywhere, Category = "Item") + int ItemID; //reference to the UInventoryComponent script UPROPERTY() diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index 04f104d..09b1a43 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -9,7 +9,7 @@ UEatableItems::UEatableItems() { - + ItemID; } void UEatableItems::Use(ATempCharacter* Character) From d365fa6327f7ab6353cefc31cf7ed58f9b504924 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 14:16:55 +0000 Subject: [PATCH 32/35] Updated BaseItem.h Changed it so no one can edit the original value ID of an item --- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index d05fe0c..e832b7f 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -53,7 +53,7 @@ public: UPROPERTY(EditAnywhere, Category = "Item") bool isDamageBuffItem; - UPROPERTY(EditAnywhere, Category = "Item") + UPROPERTY() int ItemID; //reference to the UInventoryComponent script From ff733f2ab07219757648dd8d7c370f8c9771808c Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 14:18:05 +0000 Subject: [PATCH 33/35] Revert "Updated BaseItem.h" This reverts commit d365fa6327f7ab6353cefc31cf7ed58f9b504924. --- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index e832b7f..d05fe0c 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -53,7 +53,7 @@ public: UPROPERTY(EditAnywhere, Category = "Item") bool isDamageBuffItem; - UPROPERTY() + UPROPERTY(EditAnywhere, Category = "Item") int ItemID; //reference to the UInventoryComponent script From cc9384a9c1c4a49ccd979c2880ec8a09c80e96d9 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 14:19:43 +0000 Subject: [PATCH 34/35] Updated BP_BuffJelly Gave BuffJelly a unique ID of 1 --- Content/Blueprints/Items/BP_BuffJelly.uasset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content/Blueprints/Items/BP_BuffJelly.uasset b/Content/Blueprints/Items/BP_BuffJelly.uasset index c02d31a..63db595 100644 --- a/Content/Blueprints/Items/BP_BuffJelly.uasset +++ b/Content/Blueprints/Items/BP_BuffJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:576e1cd3b8c065e62aa79e816c7cf7da53478ec1540122f6430b7e22bc740a93 +oid sha256:f7f80fdb01a8d28fe48b9df04675549ec7d8b76bea8d9e7709f31387a2ddee38 size 6872 From 7199ee76a3c24611ce8179e5887c2aab6c49dc73 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 15:44:00 +0000 Subject: [PATCH 35/35] Updated Items Started to create item stacks and fix item not dissapearing bug --- .../Items/ItemsInWorld/BP_BuffPlacedItem.uasset | 4 ++-- Content/Levels/MerchantPrototype.umap | 2 +- .../BaseItems/InventoryComponent.cpp | 12 ++++++++++-- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 3 +++ .../BaseItems/Items/EatableItems.cpp | 1 + 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset index eae64c2..016dc00 100644 --- a/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset +++ b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11a9b9b88cf518e73e6bc64dd07a0ba7454a2003fefb91ec7df3f674527a38cb -size 31226 +oid sha256:ad2b40d361c7b3ad8a4c24cce72977f845a9ca15c9adb04e0ed639dbddef6c11 +size 31223 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 8a2e9cf..78d4a0a 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2616e6c43b1e4c6a0150deb3383a64d5b0a9279784748ef8240c5a75dc6ca7bf +oid sha256:a8a5622a6c5baa77fc539a091380c71a185e20f8688e5ded51a48628b582a446 size 27207 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index ccdda07..8a5a53e 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -40,10 +40,11 @@ bool UInventoryComponent::AddItem(class UBaseItem* BaseItem) BaseItem->StoredItems = this; BaseItem->World = GetWorld(); Items.Add(BaseItem); - BaseItem->ItemID++; + BaseItem->SubItemID++; UE_LOG(LogTemp, Display, TEXT("ITEM HAS BEEN ADDED")); //log the itemid UE_LOG(LogTemp, Display, TEXT("ITEM ID: %d"), BaseItem->ItemID); + UE_LOG(LogTemp, Display, TEXT("SUBITEM ID: %d"), BaseItem->SubItemID); //Refreshes the inventory OnInventoryUpdated.Broadcast(); @@ -59,7 +60,14 @@ bool UInventoryComponent::Remove(class UBaseItem* BaseItem) UE_LOG(LogTemp, Display, TEXT("ItEM HAS BEEN REMOVED")); BaseItem->StoredItems = nullptr; BaseItem->World = nullptr; - Items.RemoveSingle(BaseItem); + if(BaseItem->SubItemID < Items.Num()) + { + Items.RemoveSingle(BaseItem); + BaseItem->SubItemID --; + UE_LOG(LogTemp, Display, TEXT("ItemRemoved")); + UE_LOG(LogTemp, Display, TEXT("SUBITEM ID: %d"), BaseItem->SubItemID); + } + //Items.RemoveSingle(BaseItem); OnInventoryUpdated.Broadcast(); // Updates UI return true; } diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index d05fe0c..524269a 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -55,6 +55,9 @@ public: UPROPERTY(EditAnywhere, Category = "Item") int ItemID; + + UPROPERTY(EditAnywhere, Category = "Item") + int SubItemID; //reference to the UInventoryComponent script UPROPERTY() diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index 09b1a43..352aee9 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -10,6 +10,7 @@ UEatableItems::UEatableItems() { ItemID; + SubItemID; } void UEatableItems::Use(ATempCharacter* Character)