You can now pick up items with an empty hand in combat mode.
Closes #2206
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.GUI;
|
using Content.Server.GameObjects.Components.GUI;
|
||||||
|
using Content.Server.GameObjects.Components.Items.Storage;
|
||||||
using Content.Server.GameObjects.Components.Mobs;
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
using Content.Server.GameObjects.Components.Movement;
|
using Content.Server.GameObjects.Components.Movement;
|
||||||
using Content.Server.GameObjects.Components.Timing;
|
using Content.Server.GameObjects.Components.Timing;
|
||||||
@@ -857,6 +858,18 @@ namespace Content.Server.GameObjects.EntitySystems.Click
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We pick up items if our hand is empty, even if we're in combat mode.
|
||||||
|
if(EntityManager.TryGetEntity(target, out var targetEnt))
|
||||||
|
{
|
||||||
|
if (targetEnt.HasComponent<ItemComponent>())
|
||||||
|
{
|
||||||
|
Interaction(player, targetEnt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var attackComponent in player.GetAllComponents<IAttack>())
|
foreach (var attackComponent in player.GetAllComponents<IAttack>())
|
||||||
|
|||||||
Reference in New Issue
Block a user