Interactable items - slotting working correctly and calling the dispatchers each time

This commit is contained in:
Michal Pikulski
2025-09-12 12:26:44 +02:00
parent ef96d80d51
commit 445e36975d
5 changed files with 67 additions and 107 deletions

View File

@@ -311,9 +311,9 @@ public class FollowerController: MonoBehaviour
#endregion Movement
#region ItemInteractions
public void TryPickupItem(GameObject itemObject, PickupItemData itemData)
public void TryPickupItem(GameObject itemObject, PickupItemData itemData, bool dropItem = true)
{
if (_currentlyHeldItemData != null && _cachedPickupObject != null)
if (_currentlyHeldItemData != null && _cachedPickupObject != null && dropItem)
{
// Drop the currently held item at the current position
DropHeldItemAt(transform.position);