Update dispatchers and message for slotting items
This commit is contained in:
@@ -128,15 +128,23 @@ namespace Interactions
|
|||||||
var config = GameManager.Instance.GetSlotItemConfig(itemData);
|
var config = GameManager.Instance.GetSlotItemConfig(itemData);
|
||||||
var allowed = config?.allowedItems ?? new List<PickupItemData>();
|
var allowed = config?.allowedItems ?? new List<PickupItemData>();
|
||||||
if (allowed.Contains(itemToSlotData))
|
if (allowed.Contains(itemToSlotData))
|
||||||
|
{
|
||||||
|
if (itemToSlot != null)
|
||||||
{
|
{
|
||||||
DebugUIMessage.Show("You correctly slotted " + itemToSlotData.itemName + " into: " + itemData.itemName, Color.green);
|
DebugUIMessage.Show("You correctly slotted " + itemToSlotData.itemName + " into: " + itemData.itemName, Color.green);
|
||||||
onCorrectItemSlotted?.Invoke();
|
onCorrectItemSlotted?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
Interactable.BroadcastInteractionComplete(true);
|
Interactable.BroadcastInteractionComplete(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (itemToSlot != null)
|
||||||
{
|
{
|
||||||
DebugUIMessage.Show("I'm not sure this works.", Color.yellow);
|
DebugUIMessage.Show("I'm not sure this works.", Color.yellow);
|
||||||
onIncorrectItemSlotted?.Invoke();
|
onIncorrectItemSlotted?.Invoke();
|
||||||
|
}
|
||||||
Interactable.BroadcastInteractionComplete(false);
|
Interactable.BroadcastInteractionComplete(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user