From e602d83a31f61100d7fc40e162d8b97e87518815 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 15 Nov 2022 00:04:46 +0000 Subject: [PATCH] Updated Inventory system for Items in UI The Inventory System is working fully with the healing jelly working --- Content/Blueprints/BP_MyTempCharacter.uasset | 4 ++-- Content/Blueprints/WBP_ItemDisplay.uasset | 4 ++-- Content/Blueprints/WBP_PlayerInventory.uasset | 4 ++-- .../BaseItems/Items/EatableItems.cpp | 11 +++++++++++ .../the_twilight_abyss/BaseItems/Items/EatableItems.h | 2 ++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset index ed9200f..f840bf5 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:83b78bc2c32ead48fb4b3986da18675ab1673013673104c5232b504978a0c1ad -size 68346 +oid sha256:d49ff6579e47fa28aa35b87519939d733c3abfca7c388d4be2c900a85157f88e +size 68733 diff --git a/Content/Blueprints/WBP_ItemDisplay.uasset b/Content/Blueprints/WBP_ItemDisplay.uasset index 748f45b..1f2c632 100644 --- a/Content/Blueprints/WBP_ItemDisplay.uasset +++ b/Content/Blueprints/WBP_ItemDisplay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3326b738a1a849cc33276c0a9c12c545dee4510e510848526cc225f939996d5 -size 81310 +oid sha256:4edd0dbf94c6d8cceab4ebfdc061238344833123d145ea292e4e8274d07ce760 +size 80407 diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset index f05676b..810d0bf 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:7df9350594b51cf2639b09ee43273d07e56f0328301b51d0c89b70c8edecf450 -size 90586 +oid sha256:0f8371e5880ea4dec24ea399529d04787ab66c9fbc72973cdc964d9bffd94db0 +size 98662 diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index 63956df..ccb756f 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -3,13 +3,24 @@ #include "EatableItems.h" +#include "the_twilight_abyss/BaseItems/InventoryComponent.h" #include "the_twilight_abyss/PlayerTemp/TempCharacter.h" +UEatableItems::UEatableItems() +{ + +} + void UEatableItems::Use(ATempCharacter* Character) { if(Character) { Character->Health += 10; + + if(StoredItems) + { + StoredItems->Remove(this); + } } } diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h index 127041f..d636bcd 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h @@ -13,6 +13,8 @@ UCLASS() class THE_TWILIGHT_ABYSS_API UEatableItems : public UBaseItem { GENERATED_BODY() + UEatableItems(); + protected: