[Interactions] Make combinable object pickup-able and swappable

This commit is contained in:
Michal Pikulski
2025-09-08 14:56:59 +02:00
parent a1b1d7475f
commit f4a183d524
7 changed files with 138 additions and 30 deletions

View File

@@ -17,9 +17,9 @@ public class CombineWithBehavior : InteractionRequirementBase
var pickup = GetComponent<Pickup>();
if (heldItem == null)
{
DebugUIMessage.Show("You need an item to combine.");
// DebugUIMessage.Show("You need an item to combine.");
OnFailure?.Invoke();
return false;
return true;
}
if (pickup == null || pickup.itemData == null)
{
@@ -40,9 +40,9 @@ public class CombineWithBehavior : InteractionRequirementBase
{
string heldName = heldItem.itemName ?? "an item";
string targetName = pickup.itemData.itemName ?? "target item";
DebugUIMessage.Show($"Cannot combine {heldName} with {targetName}.");
// DebugUIMessage.Show($"Cannot combine {heldName} with {targetName}.");
OnFailure?.Invoke();
return false;
return true;
}
}
}