Oakfolks Gold_1.14
Oakfolks coop game
Loading...
Searching...
No Matches
FurnitureAssembler.h
1#pragma once
2
3#include "CoreMinimal.h"
4#include "Components/BoxComponent.h"
5#include "GameFramework/Actor.h"
6#include "BCR/Headers/System/Pickable/PickableItem.h"
7#include "BCR/Headers/Interfaces/Interactable.h"
8#include "BCR/Headers/System/DeliveryPoint.h"
9#include "FurnitureAssembler.generated.h"
10
12
17USTRUCT(BlueprintType)
18struct FRecipiesInfo : public FTableRowBase
19{
20 GENERATED_BODY()
21
22 UPROPERTY(EditAnywhere, BlueprintReadWrite)
23 TMap<TSubclassOf<APickableItem>, int> Material;
24
25 UPROPERTY(EditAnywhere, BlueprintReadWrite)
26 TSubclassOf<APickableItem> Out;
27
28 UPROPERTY(EditAnywhere, BlueprintReadWrite)
29 TSubclassOf<ADeliveryPoint> DelivreryPoint;
30};
31
33
38UCLASS()
39class BCR_API AFurnitureAssembler : public AActor, public IInteractable
40{
41 GENERATED_BODY()
42
43public:
44
47 virtual void BeginPlay() override;
48 virtual void Tick(float DeltaTime) override;
49
52 UFUNCTION(BlueprintCallable)
53 FRecipiesInfo GetActualRecipiesInfo();
54
55 UFUNCTION(BlueprintCallable)
56 void CraftFurniture();
57
58 UFUNCTION(BlueprintCallable)
59 void ResetAssembler();
60
63 UPROPERTY(EditAnywhere, BlueprintReadWrite)
64 FRecipiesInfo ActualRecipies;
65 FRecipiesInfo ActualRecipiesCopy;
66
68 UPROPERTY(EditAnywhere, BlueprintReadWrite)
69 bool PlayFlowerAnimation;
70 UPROPERTY(EditAnywhere, BlueprintReadWrite)
71 bool CraftOnce = false;
72 UPROPERTY(EditAnywhere, BlueprintReadOnly)
73 int requieredMaterials = 3;
74 UPROPERTY(EditAnywhere, BlueprintReadWrite)
75 UStaticMeshComponent* PackagePosition;
76
77protected:
78
81 UPROPERTY(EditAnywhere, BlueprintReadWrite)
82 UBoxComponent* AssemblerZone;
83
86 UDataTable* AllRecipies;
87 TArray<FName> RowsNames;
88 TMap<AMainPlayer*, AActor*> PlayerHolding;
89 AActor* InMemActor;
90 AMainPlayer* InMemPlayer;
91
94 UFUNCTION()
95 void OnOverlapBegin(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
96
99 //void Interact_Implementation(AMainPlayer* Player);
100 //void InteractWithObject_Implementation(AMainPlayer* Player, AActor* Object);
101
104 UFUNCTION(BlueprintNativeEvent)
105 void OnElementDropOnAssembler();
106 void OnElementDropOnAssembler_Implementation();
107 void TimerElapsed(AActor* Value, AMainPlayer* Player);
108};
Furniture assembly station for crafting items from recipes.
Definition FurnitureAssembler.h:40
Main player character for cooperative gameplay.
Definition MainPlayer.h:32
Interface for objects that can be interacted with by players.
Definition Interactable.h:30
Recipe data for furniture crafting.
Definition FurnitureAssembler.h:19