Show if items can be placed in a slot when hovering (#1480)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
@@ -91,6 +91,14 @@ namespace Content.Client.GameObjects
|
||||
doneSlots.Add(slot);
|
||||
}
|
||||
|
||||
if (cast.HoverEntity != null)
|
||||
{
|
||||
var (slot, (entityUid, fits)) = cast.HoverEntity.Value;
|
||||
var entity = Owner.EntityManager.GetEntity(entityUid);
|
||||
|
||||
InterfaceController?.HoverInSlot(slot, entity, fits);
|
||||
}
|
||||
|
||||
foreach (var slot in _slots.Keys.ToList())
|
||||
{
|
||||
if (!doneSlots.Contains(slot))
|
||||
@@ -171,6 +179,11 @@ namespace Content.Client.GameObjects
|
||||
SendNetworkMessage(equipmessage);
|
||||
}
|
||||
|
||||
public void SendHoverMessage(Slots slot)
|
||||
{
|
||||
SendNetworkMessage(new ClientInventoryMessage(slot, ClientInventoryUpdate.Hover));
|
||||
}
|
||||
|
||||
public void SendOpenStorageUIMessage(Slots slot)
|
||||
{
|
||||
SendNetworkMessage(new OpenSlotStorageUIMessage(slot));
|
||||
|
||||
Reference in New Issue
Block a user