// Copyright ExByte Studios. Item Interaction Ecosystem. #pragma once #include "CoreMinimal.h" #include "ItemInteractionComponent.h" #include "WorldInteractionComponent.generated.h" /** * The interaction executor to put on a player pawn in a project that uses the * world modules. Extends the base with the modes that need ItemWorld types: * carry, drop-held, equip, install/remove from world slots, and drop-from-inventory * (stages 6-8). Keeps ItemInteraction free of any ItemWorld dependency. */ UCLASS(ClassGroup = (Interaction), meta = (BlueprintSpawnableComponent)) class ITEMWORLD_API UWorldInteractionComponent : public UItemInteractionComponent { GENERATED_BODY() protected: virtual bool ExecuteAuthorized(const FInteractionContext& Context, const FInteractionOption& Option, const FInteractionRequest& Request) override; virtual bool HandleDropFromInventory(FGuid InstanceId) override; private: bool ExecuteCarry(const FInteractionContext& Context, bool bPhysics); bool ExecuteDropHeld(const FInteractionContext& Context); bool ExecuteInstall(const FInteractionContext& Context); bool ExecuteEquip(const FInteractionContext& Context, const FInteractionRequest& Request); bool ExecuteUseHeldOnTarget(const FInteractionContext& Context, const FInteractionOption& Option); bool ExecuteRemoveFromSlot(const FInteractionContext& Context); };