5#include "CoreMinimal.h"
8#include "InventoryComponent.generated.h"
11UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent))
17 UInventoryComponent();
19 UFUNCTION(BlueprintCallable, Category="Inventory")
21 UFUNCTION(BlueprintCallable, Category="Inventory")
22 virtual
void PickupItem();
24 UFUNCTION(BlueprintCallable, Category="Inventory")
25 virtual
void DropItem();
27 UFUNCTION(BlueprintCallable, Category="Inventory")
28 int32 GetMaxNumberOfItems()
const {
return MaxNumberOfItems;}
29 UFUNCTION(BlueprintCallable, Category=
"Inventory")
30 int32 GetMaxWeight()
const {
return MaxWeight;}
32 UFUNCTION(BlueprintCallable, Category=
"Inventory")
33 int32 GetTotalWeight() const;
39 virtual
void BeginPlay() override;
42 virtual
bool SaveGame() override;
43 virtual
bool LoadGame() override;
48 virtual
void ComponentSetupComplete() override;
49 virtual
void OwnerDeath() override;
51 void SetupInventoryWidget();
54 UFUNCTION(
Server, Reliable)
55 void ServerPickupItem();
56 UFUNCTION(
Server, Reliable)
57 void ServerThrowItem();
59 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "Inventory")
63 void RemoveItemFromInventory(
const int32 ItemToRemove);
64 UFUNCTION(
Server, Reliable, WithValidation)
66 UFUNCTION(
Server, Reliable, WithValidation)
67 void ServerRemoveItemFromInventory(
const int32 ItemToRemove);
70 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=
"Inventory|Widget")
71 TSoftClassPtr<UUserWidget> InventoryWidgetClass;
76 UPROPERTY(ReplicatedUsing=OnRep_Inventory)
79 void OnRep_Inventory();
81 UPROPERTY(ReplicatedUsing=OnRep_CurrentItemIndex)
82 int32 CurrentItemIndex = 0;
84 void OnRep_CurrentItemIndex();
86 UPROPERTY(EditAnywhere, Category="Inventory|
General")
87 int32 MaxNumberOfItems = 5;
88 UPROPERTY(EditAnywhere, Category="Inventory|
General")
92 UPROPERTY(EditDefaultsOnly, Category = "Inventory")
93 TSubclassOf<AActor> ItemToSpawn;
94 UPROPERTY(EditDefaultsOnly, Category = "Inventory")
95 float PickupThrowIntensity = 500.0f;
96 UPROPERTY(VisibleAnywhere)
97 USceneComponent* ThrowPoint =
nullptr;
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition InventoryHUD.h:21
Represents a character component that can be added to an actor.
Definition InteractionData.h:127