save/load souls, inventory items
This commit is contained in:
parent
eeaf691a1a
commit
6ec77ff202
BIN
hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_PlayerCharacterBase.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_PlayerCharacterBase.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/ItemBP/BP_DragDropCraftOperation.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/ItemBP/BP_DragDropCraftOperation.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/Interactables/BP_Save.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/Interactables/BP_Save.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/Interactables/ItemDataTable.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/Interactables/ItemDataTable.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/UI/Crafting_HUD/BP_CookingHUDWidget.uasset
(Stored with Git LFS)
Normal file
BIN
hwanyoung2/Content/Hwanyoung/UI/Crafting_HUD/BP_CookingHUDWidget.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/UI/Crafting_HUD/BP_CraftingHUDWidget.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/UI/Crafting_HUD/BP_CraftingHUDWidget.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/UI/Crafting_HUD/BP_CraftingItemSlot.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Hwanyoung/UI/Crafting_HUD/BP_CraftingItemSlot.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/UI/Images/HUD_cooking.uasset
(Stored with Git LFS)
Normal file
BIN
hwanyoung2/Content/Hwanyoung/UI/Images/HUD_cooking.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
hwanyoung2/Content/Hwanyoung/UI/Images/HUD_crafting.uasset
(Stored with Git LFS)
Normal file
BIN
hwanyoung2/Content/Hwanyoung/UI/Images/HUD_crafting.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Buff_Haesol.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Buff_Haesol.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Creak_1.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Creak_1.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Creak_2.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Creak_2.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Water_arrow_trail3.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Water_arrow_trail3.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Water_arrow_trail_version_4.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/Combat/Water_arrow_trail_version_4.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/ExplosionBlast_S08WA_111.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/ExplosionBlast_S08WA_111.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/Sword_block_2.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/Sword_block_2.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/Illusions/Assets/bow_string.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/Illusions/Assets/bow_string.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
hwanyoung2/Content/NewPreviewMeshCollection.uasset
(Stored with Git LFS)
BIN
hwanyoung2/Content/NewPreviewMeshCollection.uasset
(Stored with Git LFS)
Binary file not shown.
@ -18,7 +18,18 @@ public:
|
|||||||
|
|
||||||
//unique ID of item that is being used to create the item
|
//unique ID of item that is being used to create the item
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
FName ComponentID;
|
FName ItemAID;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
FName ItemBID;
|
||||||
|
|
||||||
|
//unique ID of item that is being used to create the item
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
FName ItemCID;
|
||||||
|
|
||||||
|
//unique ID of item that is being used to create the item
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
FName ItemDID;
|
||||||
|
|
||||||
//unique ID of the item that gets created
|
//unique ID of the item that gets created
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
@ -28,12 +39,20 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
bool bDestroyItemA;
|
bool bDestroyItemA;
|
||||||
|
|
||||||
//
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
bool bDestroyItemB;
|
bool bDestroyItemB;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
bool bDestroyItemC;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
bool bDestroyItemD;
|
||||||
|
|
||||||
bool operator==(const FCraftingInfo& OtherItem) const {
|
bool operator==(const FCraftingInfo& OtherItem) const {
|
||||||
return ComponentID == OtherItem.ComponentID;
|
return ItemAID == OtherItem.ItemAID
|
||||||
|
&& ItemBID == OtherItem.ItemBID
|
||||||
|
&& ItemCID == OtherItem.ItemCID
|
||||||
|
&& ItemDID == OtherItem.ItemDID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,13 +39,18 @@ bool AHYPlayerCharacController::AddItemToInventoryByID(FName ID)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AHYPlayerCharacController::CraftItem(FInventoryItem ItemA, FInventoryItem ItemB)
|
void AHYPlayerCharacController::CraftItem(FInventoryItem ItemA, FInventoryItem ItemB, FInventoryItem ItemC, FInventoryItem ItemD)
|
||||||
{
|
{
|
||||||
for (auto Pair : ItemB.CraftCombinations) {
|
for (auto Combination : ItemB.CraftCombinations) {
|
||||||
if (Pair.ComponentID == ItemA.ItemID) {
|
if (Combination.ItemAID == ItemA.ItemID
|
||||||
if (Pair.bDestroyItemA) Inventory.RemoveSingle(ItemA);
|
&& Combination.ItemBID == ItemB.ItemID
|
||||||
if (Pair.bDestroyItemB) Inventory.RemoveSingle(ItemB);
|
&& Combination.ItemCID == ItemC.ItemID
|
||||||
AddItemToInventoryByID(Pair.ProductID);
|
&& Combination.ItemDID == ItemD.ItemID) {
|
||||||
|
if (Combination.bDestroyItemA) Inventory.RemoveSingle(ItemA);
|
||||||
|
if (Combination.bDestroyItemB) Inventory.RemoveSingle(ItemB);
|
||||||
|
if (Combination.bDestroyItemC) Inventory.RemoveSingle(ItemC);
|
||||||
|
if (Combination.bDestroyItemD) Inventory.RemoveSingle(ItemD);
|
||||||
|
AddItemToInventoryByID(Combination.ProductID);
|
||||||
ReloadCraftUI();
|
ReloadCraftUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
bool AddItemToInventoryByID(FName ID);
|
bool AddItemToInventoryByID(FName ID);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Utils")
|
UFUNCTION(BlueprintCallable, Category = "Utils")
|
||||||
void CraftItem(FInventoryItem ItemA, FInventoryItem ItemB);
|
void CraftItem(FInventoryItem ItemA, FInventoryItem ItemB, FInventoryItem ItemC, FInventoryItem ItemD);
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadWrite, VisibleAnywhere)
|
UPROPERTY(BlueprintReadWrite, VisibleAnywhere)
|
||||||
class AHYInteractableActor* CurrentInteractable;
|
class AHYInteractableActor* CurrentInteractable;
|
||||||
|
Loading…
Reference in New Issue
Block a user