Oakfolks Gold_1.14
Oakfolks coop game
|
Furniture assembly station for crafting items from recipes. More...
#include <FurnitureAssembler.h>
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 () |
![]() | |
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 |
AMainPlayer * | InMemPlayer |
Furniture assembly station for crafting items from recipes.
Manages recipe-based crafting system with material validation and output generation
AFurnitureAssembler::AFurnitureAssembler | ( | ) |
Initializes the furniture assembler with collision detection.
Sets up assembler zone and overlap events for player detection
|
overridevirtual |
Loads recipe data and initializes the first recipe.
Reads recipes from DataTable and sets up the initial crafting target
void AFurnitureAssembler::CraftFurniture | ( | ) |
Attempts to craft furniture with the current materials.
Validates all required materials are present and spawns the output item
FRecipiesInfo AFurnitureAssembler::GetActualRecipiesInfo | ( | ) |
Gets the current active recipe information.
CRAFTING SYSTEM //////// Recipe management
Returns the recipe data for the furniture currently being crafted
|
protected |
INTERFACE IMPLEMENTATION //////// IInteractable methods CRAFTING EVENTS //////// Blueprint events
|
protected |
Blueprint event triggered when an element is dropped on the assembler.
Called when a valid material is successfully added to the recipe
|
protected |
Handles player entry into the assembler zone.
EVENT CALLBACKS //////// Collision detection
Tracks players and their held objects for automatic item processing
OverlappedComponent | The component that was overlapped |
OtherActor | The actor that entered the assembler zone |
OtherComp | The component of the overlapping actor |
OtherBodyIndex | Body index of the collision |
bFromSweep | Whether this was from a sweep operation |
SweepResult | Hit result from sweep if applicable |
|
overridevirtual |
Handles player interaction without held objects.
Provides feedback when player approaches without required items
Player | The player interacting with the assembler |
Handles player interaction with held objects
Validates and processes material deposits for crafting
Player | The player interacting with the assembler |
Object | The object the player is holding |
Updates the assembler and processes automatic item deposits
Monitors dropped items in the zone and processes valid materials
DeltaTime | Time elapsed since the last frame in seconds |
FRecipiesInfo AFurnitureAssembler::ActualRecipies |
PROPERTIES //////// Current recipe data
|
protected |
RECIPE SYSTEM //////// Recipe data management
|
protected |
COMPONENTS //////// Interaction zone