Make examination of items in hand possible (#459)

This commit is contained in:
L.E.D
2019-11-23 15:57:44 -05:00
committed by Pieter-Jan Briers
parent 17b31c417b
commit 35f9de3366
2 changed files with 18 additions and 4 deletions

View File

@@ -56,8 +56,6 @@ namespace Content.Client.UserInterface
{
IoCManager.InjectDependencies(this);
ToolTip = _loc.GetString("Your hands");
_handR = new UIBox2i(0, 0, BoxSize, BoxSize);
_handL = _handR.Translated((BoxSize + BoxSpacing, 0));
@@ -277,6 +275,15 @@ namespace Content.Client.UserInterface
}
}
else if (args.Function == ContentKeyFunctions.ExamineEntity)
{
var examine = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ExamineSystem>();
if (leftHandContains)
examine.DoExamine(LeftHand);
else if (rightHandContains)
examine.DoExamine(RightHand);
}
else if (args.Function == ContentKeyFunctions.MouseMiddle)
{
SendSwitchHandTo(handIndex);