Update dispatchers and message for slotting items

This commit is contained in:
Michal Pikulski
2025-09-12 13:24:04 +02:00
parent 9a12a79698
commit c0df46f9f8

View File

@@ -129,14 +129,22 @@ namespace Interactions
var allowed = config?.allowedItems ?? new List<PickupItemData>();
if (allowed.Contains(itemToSlotData))
{
DebugUIMessage.Show("You correctly slotted " + itemToSlotData.itemName + " into: " + itemData.itemName, Color.green);
onCorrectItemSlotted?.Invoke();
if (itemToSlot != null)
{
DebugUIMessage.Show("You correctly slotted " + itemToSlotData.itemName + " into: " + itemData.itemName, Color.green);
onCorrectItemSlotted?.Invoke();
}
Interactable.BroadcastInteractionComplete(true);
}
else
{
DebugUIMessage.Show("I'm not sure this works.", Color.yellow);
onIncorrectItemSlotted?.Invoke();
if (itemToSlot != null)
{
DebugUIMessage.Show("I'm not sure this works.", Color.yellow);
onIncorrectItemSlotted?.Invoke();
}
Interactable.BroadcastInteractionComplete(false);
}
}