^
This commit is contained in:
parent
037d5442a5
commit
6846c027f1
5
hwanyoung2/Source/hwanyoung2/CraftingInfo.cpp
Normal file
5
hwanyoung2/Source/hwanyoung2/CraftingInfo.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "CraftingInfo.h"
|
||||
|
40
hwanyoung2/Source/hwanyoung2/CraftingInfo.h
Normal file
40
hwanyoung2/Source/hwanyoung2/CraftingInfo.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Engine/DataTable.h"
|
||||
#include "CraftingInfo.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct FCraftingInfo : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY();
|
||||
|
||||
public:
|
||||
|
||||
//unique ID of item that is being used to create the item
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FName ComponentID;
|
||||
|
||||
//unique ID of the item that gets created
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FName ProductID;
|
||||
|
||||
//do we want to destroy the component?
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bDestroyItemA;
|
||||
|
||||
//
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bDestroyItemB;
|
||||
|
||||
bool operator==(const FCraftingInfo& OtherItem) const {
|
||||
return ComponentID == OtherItem.ComponentID;
|
||||
}
|
||||
|
||||
|
||||
};
|
@ -6,10 +6,11 @@
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "Engine/DataTable.h"
|
||||
#include "HYManualPickUp.h"
|
||||
#include "CraftingInfo.h"
|
||||
#include "InventoryItem.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents an item that can be added to player's inventory
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct FInventoryItem : public FTableRowBase
|
||||
@ -23,6 +24,7 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FName ItemID;
|
||||
|
||||
//queue of items that are dropped and spawned back into the world
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TSubclassOf<class AHYManualPickUp> ItemPickup;
|
||||
|
||||
@ -39,13 +41,21 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool OnlyDropped;
|
||||
|
||||
//can this item be consumed/used?
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool CanBeUsed;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UTexture2D* ItemIcon;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FText ItemDescription;
|
||||
|
||||
////all the possible crafting combinations for this particular item
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<FCraftingInfo> CraftCombinations;
|
||||
|
||||
bool operator==(const FInventoryItem& OtherItem) const {
|
||||
return ItemID == OtherItem.ItemID;
|
||||
}
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user