Items will display size when examined. (#19703)
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Examine;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -26,6 +27,8 @@ public abstract class SharedItemSystem : EntitySystem
|
||||
|
||||
SubscribeLocalEvent<ItemComponent, ComponentGetState>(OnGetState);
|
||||
SubscribeLocalEvent<ItemComponent, ComponentHandleState>(OnHandleState);
|
||||
|
||||
SubscribeLocalEvent<ItemComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
#region Public API
|
||||
@@ -129,6 +132,12 @@ public abstract class SharedItemSystem : EntitySystem
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
private void OnExamine(EntityUid uid, ItemComponent component, ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("item-component-on-examine-size",
|
||||
("size", component.Size)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies any entity that is holding or wearing this item that they may need to update their sprite.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user