Oakfolks Gold_1.14
Oakfolks coop game
Loading...
Searching...
No Matches
AFurnitureAssembler Class Reference

Furniture assembly station for crafting items from recipes. More...

#include <FurnitureAssembler.h>

Inheritance diagram for AFurnitureAssembler:
Collaboration diagram for AFurnitureAssembler:

Public Member Functions

 AFurnitureAssembler ()
 Initializes the furniture assembler with collision detection.
 
virtual void BeginPlay () override
 Loads recipe data and initializes the first recipe.
 
virtual void Tick (float DeltaTime) override
 Handles player interaction without held objects.
 
FRecipiesInfo GetActualRecipiesInfo ()
 Gets the current active recipe information.
 
void CraftFurniture ()
 Attempts to craft furniture with the current materials.
 
void ResetAssembler ()
 
- Public Member Functions inherited from IInteractable
void Interact (AMainPlayer *Player)
 
void InteractWithObject (AMainPlayer *Player, AActor *Object)
 Object-specific interaction.
 

Public Attributes

FRecipiesInfo ActualRecipies
 
FRecipiesInfo ActualRecipiesCopy
 
bool PlayFlowerAnimation
 Animation and state.
 
bool CraftOnce = false
 
int requieredMaterials = 3
 
UStaticMeshComponent * PackagePosition
 

Protected Member Functions

void OnOverlapBegin (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 Handles player entry into the assembler zone.
 
void OnElementDropOnAssembler ()
 
void OnElementDropOnAssembler_Implementation ()
 Blueprint event triggered when an element is dropped on the assembler.
 
void TimerElapsed (AActor *Value, AMainPlayer *Player)
 

Protected Attributes

UBoxComponent * AssemblerZone
 
UDataTable * AllRecipies
 
TArray< FName > RowsNames
 
TMap< AMainPlayer *, AActor * > PlayerHolding
 
AActor * InMemActor
 
AMainPlayerInMemPlayer
 

Detailed Description

Furniture assembly station for crafting items from recipes.

Manages recipe-based crafting system with material validation and output generation

Constructor & Destructor Documentation

◆ AFurnitureAssembler()

AFurnitureAssembler::AFurnitureAssembler ( )

Initializes the furniture assembler with collision detection.

Sets up assembler zone and overlap events for player detection

Here is the call graph for this function:

Member Function Documentation

◆ BeginPlay()

void AFurnitureAssembler::BeginPlay ( )
overridevirtual

Loads recipe data and initializes the first recipe.

Reads recipes from DataTable and sets up the initial crafting target

◆ CraftFurniture()

void AFurnitureAssembler::CraftFurniture ( )

Attempts to craft furniture with the current materials.

Validates all required materials are present and spawns the output item

◆ GetActualRecipiesInfo()

FRecipiesInfo AFurnitureAssembler::GetActualRecipiesInfo ( )

Gets the current active recipe information.

CRAFTING SYSTEM //////// Recipe management

Returns the recipe data for the furniture currently being crafted

Returns
Current recipe information including materials and output

◆ OnElementDropOnAssembler()

void AFurnitureAssembler::OnElementDropOnAssembler ( )
protected

INTERFACE IMPLEMENTATION //////// IInteractable methods CRAFTING EVENTS //////// Blueprint events

◆ OnElementDropOnAssembler_Implementation()

void AFurnitureAssembler::OnElementDropOnAssembler_Implementation ( )
protected

Blueprint event triggered when an element is dropped on the assembler.

Called when a valid material is successfully added to the recipe

◆ OnOverlapBegin()

void AFurnitureAssembler::OnOverlapBegin ( UPrimitiveComponent * OverlappedComponent,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )
protected

Handles player entry into the assembler zone.

EVENT CALLBACKS //////// Collision detection

Tracks players and their held objects for automatic item processing

Parameters
OverlappedComponentThe component that was overlapped
OtherActorThe actor that entered the assembler zone
OtherCompThe component of the overlapping actor
OtherBodyIndexBody index of the collision
bFromSweepWhether this was from a sweep operation
SweepResultHit result from sweep if applicable
Here is the caller graph for this function:

◆ Tick()

void AFurnitureAssembler::Tick ( float DeltaTime)
overridevirtual

Handles player interaction without held objects.

Provides feedback when player approaches without required items

Parameters
PlayerThe player interacting with the assembler

Handles player interaction with held objects

Validates and processes material deposits for crafting

Parameters
PlayerThe player interacting with the assembler
ObjectThe object the player is holding

Updates the assembler and processes automatic item deposits

Monitors dropped items in the zone and processes valid materials

Parameters
DeltaTimeTime elapsed since the last frame in seconds

Member Data Documentation

◆ ActualRecipies

FRecipiesInfo AFurnitureAssembler::ActualRecipies

PROPERTIES //////// Current recipe data

◆ AllRecipies

UDataTable* AFurnitureAssembler::AllRecipies
protected

RECIPE SYSTEM //////// Recipe data management

◆ AssemblerZone

UBoxComponent* AFurnitureAssembler::AssemblerZone
protected

COMPONENTS //////// Interaction zone


The documentation for this class was generated from the following files: