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:
Moses
2020-07-26 07:25:38 -05:00
committed by GitHub
parent bab1345b87
commit 8e08c64fcf
9 changed files with 135 additions and 4 deletions

View File

@@ -51,10 +51,12 @@ namespace Content.Shared.GameObjects
protected class InventoryComponentState : ComponentState
{
public List<KeyValuePair<Slots, EntityUid>> Entities { get; }
public KeyValuePair<Slots, (EntityUid entity, bool fits)>? HoverEntity { get; }
public InventoryComponentState(List<KeyValuePair<Slots, EntityUid>> entities) : base(ContentNetIDs.STORAGE)
public InventoryComponentState(List<KeyValuePair<Slots, EntityUid>> entities, KeyValuePair<Slots, (EntityUid entity, bool fits)>? hoverEntity = null) : base(ContentNetIDs.STORAGE)
{
Entities = entities;
HoverEntity = hoverEntity;
}
}
@@ -74,7 +76,8 @@ namespace Content.Shared.GameObjects
public enum ClientInventoryUpdate
{
Equip = 0,
Use = 1
Use = 1,
Hover = 2
}
}